[v2,3/6] LoongArch: opcodes: Add support for linker relaxation.

Message ID 20221213065851.2777297-4-mengqinggang@loongson.cn
State Accepted
Headers
Series LoongArch linker relaxation support. |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

mengqinggang Dec. 13, 2022, 6:58 a.m. UTC
  Set gas default to enable relax.

opcodes/ChangeLog:

	* loongarch-opc.c (struct loongarch_ASEs_option): New member relax and
	  the default value is 1.
---
 opcodes/loongarch-opc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Hans-Peter Nilsson Dec. 14, 2022, 7:21 p.m. UTC | #1
On Tue, 13 Dec 2022, mengqinggang wrote:

> Set gas default to enable relax.
> 
> opcodes/ChangeLog:
> 
> 	* loongarch-opc.c (struct loongarch_ASEs_option): New member relax and
> 	  the default value is 1.

Not that ChangeLog entries are required anymore, but seeing this 
consistent formatting error hurts my nits.  Here and the rest of 
your patches:

ChangeLog continuation lines line up with a TAB character to the 
"*" on the first line, not the text on that line.  Like so:

<TAB>* loongarch-opc.c (struct ...
<TAB>the default value ...

See existing ChangeLog entries.

Also, now that I can take my eyes away from the error, I think 
it's "New member relax with the default value 1" but I guess 
that's more up to poetic freedom.

brgds, H-P
  

Patch

diff --git a/opcodes/loongarch-opc.c b/opcodes/loongarch-opc.c
index 1b510048c29..aa43fbc3fb7 100644
--- a/opcodes/loongarch-opc.c
+++ b/opcodes/loongarch-opc.c
@@ -22,7 +22,10 @@ 
 #include "opcode/loongarch.h"
 #include "libiberty.h"
 
-struct loongarch_ASEs_option LARCH_opts;
+struct loongarch_ASEs_option LARCH_opts =
+{
+  .relax = 1
+};
 
 size_t
 loongarch_insn_length (insn_t insn ATTRIBUTE_UNUSED)