incorrect section attribute warning
Alan Modra
amodra@bigpond.net.au
Wed Jul 30 14:10:00 GMT 2003
Fixes lots of gcc testsuite failures I was seeing due to gas complaining
"setting incorrect section attributes for .note.GNU-stack".
Source like
.section .note.GNU-stack,"x",@progbits
* config/obj-elf.c (obj_elf_change_section): Allow "x" for .note*.
Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.71
diff -u -p -r1.71 obj-elf.c
--- gas/config/obj-elf.c 29 Jul 2003 02:03:32 -0000 1.71
+++ gas/config/obj-elf.c 30 Jul 2003 14:05:26 -0000
@@ -675,8 +675,9 @@ obj_elf_change_section (name, type, attr
/* As a GNU extension, we permit a .note section to be
allocatable. If the linker sees an allocateable .note
section, it will create a PT_NOTE segment in the output
- file. */
- if (strcmp (name, ".note") != 0 || attr != SHF_ALLOC)
+ file. We also allow "x" for .note.GNU-stack. */
+ if (!(def_type == SHT_NOTE
+ && (attr == SHF_ALLOC || attr == SHF_EXECINSTR)))
as_warn (_("setting incorrect section attributes for %s"),
name);
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list