Mark .gnu.lto_* sections with SHF_EXCLUDE.
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 12 Dec 2010 14:49:25 +0000 (14:49 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 12 Dec 2010 14:49:25 +0000 (14:49 +0000)
bfd/

2010-12-12  H.J. Lu  <hongjiu.lu@intel.com>

* elf.c (special_sections_g): Add ".gnu.lto_".

gas/testsuite/

2010-12-12  H.J. Lu  <hongjiu.lu@intel.com>

* gas/elf/elf.exp: Run section9.

* gas/elf/section9.d: New.
* gas/elf/section9.s: Likewise.

bfd/ChangeLog
bfd/elf.c
gas/testsuite/ChangeLog
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/section9.d [new file with mode: 0644]
gas/testsuite/gas/elf/section9.s [new file with mode: 0644]

index 10d3b98c6f9ead30b47a19060aece300c35fd8fb..102e0823120ac054442bb1023021fc27d09bf43c 100644 (file)
@@ -1,3 +1,7 @@
+2010-12-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf.c (special_sections_g): Add ".gnu.lto_".
+
 2010-12-10  Alan Modra  <amodra@gmail.com>
 
        * config.bfd: Configure rs6000-*-aix* as for powerpc-*-aix*.
index 075a668c3089c5d09868565c305d2ea5f59dc78f..0e7cd9af6e4e5ba3ec5e0f5499c2f5e65e65908e 100644 (file)
--- 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 },
index 8b4e8019de45cbe3574fdde3c7f2caaf13efa8d8..8592bf08e0e3137f845fc6f8033882f45e101785 100644 (file)
@@ -1,4 +1,11 @@
-2010-12-11 Mingming Sun <mingm.sun@gmail.com>
+2010-12-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gas/elf/elf.exp: Run section9.
+
+       * gas/elf/section9.d: New.
+       * gas/elf/section9.s: Likewise.
+
+2010-12-11  Mingming Sun  <mingm.sun@gmail.com>
 
        * gas/mips/loongson-3a.s, gas/mips/loongson-3a.d: New test.
        * gas/mips/mips.exp: Run it.
index 3babe0b1cb4948f8d7cca1b66027c2c60c5e0a60..7f86266e11cd17d5b95431b56b322ff94d39acba 100644 (file)
@@ -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 (file)
index 0000000..1acf63e
--- /dev/null
@@ -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 (file)
index 0000000..6b8b107
--- /dev/null
@@ -0,0 +1,4 @@
+       .section .gnu.lto_main,"",%progbits
+       .byte 0,0,0,0
+       .section .gnu.lto_.pureconst,"",%progbits
+       .byte 0,0,0,0
This page took 0.031714 seconds and 4 git commands to generate.