This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
got and plt section attributes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Cc: "H.J. Lu" <hongjiu dot lu at intel dot com>
- Date: Mon, 28 Jul 2003 23:54:40 +0930
- Subject: got and plt section attributes
This fixes warnings about "setting incorrect section attributes for
.got" when compiling gcc/config/rs6000/eabi-ci.asm.
* elf.c (special_sections): Set attributes for .got and .plt.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.193
diff -u -p -r1.193 elf.c
--- bfd/elf.c 26 Jul 2003 01:06:27 -0000 1.193
+++ bfd/elf.c 28 Jul 2003 14:10:11 -0000
@@ -2192,13 +2192,13 @@ static struct bfd_elf_special_section co
{ ".dynsym", 0, NULL, 0,
SHT_DYNSYM, SHF_ALLOC },
{ ".got", 0, NULL, 0,
- SHT_PROGBITS, 0 },
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
{ ".hash", 0, NULL, 0,
SHT_HASH, SHF_ALLOC },
{ ".interp", 0, NULL, 0,
SHT_PROGBITS, 0 },
{ ".plt", 0, NULL, 0,
- SHT_PROGBITS, 0 },
+ SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
{ ".shstrtab", 0, NULL, 0,
SHT_STRTAB, 0 },
{ ".strtab", 0, NULL, 0,
--
Alan Modra
IBM OzLabs - Linux Technology Centre