From: H.J. Lu Date: Sun, 12 Dec 2010 14:49:25 +0000 (+0000) Subject: Mark .gnu.lto_* sections with SHF_EXCLUDE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68efed4197a833bbc5ca02116098e6f67a2608d6;p=binutils-gdb.git Mark .gnu.lto_* sections with SHF_EXCLUDE. bfd/ 2010-12-12 H.J. Lu * elf.c (special_sections_g): Add ".gnu.lto_". gas/testsuite/ 2010-12-12 H.J. Lu * gas/elf/elf.exp: Run section9. * gas/elf/section9.d: New. * gas/elf/section9.s: Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 10d3b98c6f9..102e0823120 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2010-12-12 H.J. Lu + + * elf.c (special_sections_g): Add ".gnu.lto_". + 2010-12-10 Alan Modra * config.bfd: Configure rs6000-*-aix* as for powerpc-*-aix*. diff --git a/bfd/elf.c b/bfd/elf.c index 075a668c308..0e7cd9af6e4 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -2082,6 +2082,7 @@ static const struct bfd_elf_special_section special_sections_f[] = static const struct bfd_elf_special_section special_sections_g[] = { { STRING_COMMA_LEN (".gnu.linkonce.b"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, + { STRING_COMMA_LEN (".gnu.lto_"), -1, SHT_PROGBITS, SHF_EXCLUDE }, { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, { STRING_COMMA_LEN (".gnu.version"), 0, SHT_GNU_versym, 0 }, { STRING_COMMA_LEN (".gnu.version_d"), 0, SHT_GNU_verdef, 0 }, diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 8b4e8019de4..8592bf08e0e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,4 +1,11 @@ -2010-12-11 Mingming Sun +2010-12-12 H.J. Lu + + * gas/elf/elf.exp: Run section9. + + * gas/elf/section9.d: New. + * gas/elf/section9.s: Likewise. + +2010-12-11 Mingming Sun * gas/mips/loongson-3a.s, gas/mips/loongson-3a.d: New test. * gas/mips/mips.exp: Run it. diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 3babe0b1cb4..7f86266e11c 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -174,6 +174,7 @@ if { ([istarget "*-*-*elf*"] run_dump_test "section6" run_dump_test "section7" run_dump_test "section8" + run_dump_test "section9" run_dump_test "dwarf2-1" run_dump_test "dwarf2-2" run_dump_test "dwarf2-3" diff --git a/gas/testsuite/gas/elf/section9.d b/gas/testsuite/gas/elf/section9.d new file mode 100644 index 00000000000..1acf63e8193 --- /dev/null +++ b/gas/testsuite/gas/elf/section9.d @@ -0,0 +1,7 @@ +#readelf: -S --wide +#name: section flags + +#... +[ ]*\[.*\][ ]+\.gnu\.lto_main[ ]+PROGBITS.*[ ]+E[ ]+.* +[ ]*\[.*\][ ]+\.gnu\.lto_\.pureconst[ ]+PROGBITS.*[ ]+E[ ]+.* +#pass diff --git a/gas/testsuite/gas/elf/section9.s b/gas/testsuite/gas/elf/section9.s new file mode 100644 index 00000000000..6b8b1074ca3 --- /dev/null +++ b/gas/testsuite/gas/elf/section9.s @@ -0,0 +1,4 @@ + .section .gnu.lto_main,"",%progbits + .byte 0,0,0,0 + .section .gnu.lto_.pureconst,"",%progbits + .byte 0,0,0,0