bfd/
authorRoland McGrath <roland@gnu.org>
Tue, 3 Apr 2012 16:01:38 +0000 (16:01 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 3 Apr 2012 16:01:38 +0000 (16:01 +0000)
2012-04-03  Roland McGrath  <mcgrathr@google.com>

* elf-nacl.c: New file.
* elf-nacl.h: New file.
* elf32-i386.c (elf_backend_modify_segment_map): Define for
bfd_elf32_i386_nacl_vec.
(elf_backend_modify_program_headers): Likewise.
* elf64-x86-64.c (elf_backend_modify_segment_map): Define for
bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
(elf_backend_modify_program_headers): Likewise.
* Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
(BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
* Makefile.in: Regenerated.
* configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
(bfd_elf32_x86_64_nacl_vec): Likewise.
(bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
(bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
(bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
(bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
(bfd_elf32_i386_nacl_vec): Likewise.
(bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
(bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
* configure: Regenerated.

binutils/testsuite/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

* lib/binutils-common.exp (is_elf_format): Consider *-*-nacl* to
be ELF too.

* binutils-all/elfedit-4.d: Add "#as: --64" option.

* binutils-all/i386/i386.exp: Accept nacl targets too.
* binutils-all/x86-64/x86-64.exp: Likewise.

gas/testsuite/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

* gas/i386/k1om.d: Add not-target match for *-*-nacl*.
* gas/i386/l1om.d: Likewise.

ld/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

* configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
* emulparams/elf_nacl.sh: New file.
* emulparams/elf_i386_nacl.sh: New file.
* emulparams/elf32_x86_64_nacl.sh: New file.
* emulparams/elf_x86_64_nacl.sh: New file.
* Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
(ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
eelf_x86_64_nacl.c here.
(eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
New targets.
* Makefile.in: Regenerated.

* scripttempl/elf.sc: Handle SEPARATE_CODE cases.

ld/testsuite/
2012-04-03  Roland McGrath  <mcgrathr@google.com>

* ld-x86-64/ilp32-4-nacl.d: New file.
* ld-x86-64/x86-64.exp: Run it.

* ld-discard/discard.exp: Accept nacl targets too.
* ld-elf/binutils.exp: Likewise.
* ld-elf/comm-data.exp: Likewise.
* ld-elf/elf.exp: Likewise.
* ld-elf/tls_common.exp: Likewise.
* ld-elfvers/vers.exp: Likewise.
* ld-elfvsb/elfvsb.exp: Likewise.
* ld-elfweak/elfweak.exp: Likewise.
* ld-gc/gc.exp: Likewise.
* ld-ifunc/binutils.exp: Likewise.
* ld-ifunc/ifunc.exp: Likewise.
* ld-linkonce/linkonce.exp:Likewise.
* ld-pie/pie.exp: Likewise.
* ld-shared/shared.exp: Likewise.
* ld-undefined/weak-undef.exp: Likewise.
* ld-unique/unique.exp: Likewise.
* ld-x86-64/dwarfreloc.exp: Likewise.
* ld-x86-64/line.exp: Likewise.

* lib/ld-lib.exp (slurp_options): Support global array
options_regsub to apply substitutions to the contents
of options lines read from the file.
* ld-i386/emit-relocs.d: Renamed to ...
* ld-i386/emit-relocs.rd: ... this.
* ld-i386/i386.exp: Accept nacl targets too.
For them, use options_regsub to replace elf_i386 with
elf_i386_nacl in run_dump_test cases; apply the same
substitution in $i386tests; replace foo.rd expectations
files with foo-nacl.rd in $i386tests.
(i386tests): Change emit-relocs.d to emit-relocs.rd here.
* ld-i386/emit-relocs-nacl.rd: New file.
* ld-i386/plt-nacl.pd: New file.
* ld-i386/plt-pic-nacl.pd: New file.
* ld-i386/tlsbin-nacl.rd: New file.
* ld-i386/tlsbindesc-nacl.rd: New file.
* ld-i386/tlsdesc-nacl.rd: New file.
* ld-i386/tlsgdesc-nacl.rd: New file.
* ld-i386/tlsnopic-nacl.rd: New file.
* ld-i386/tlspic-nacl.rd: New file.
* ld-x86-64/x86-64.exp: Accept nacl targets too.
For them, use options_regsub to replace elf_x86_64 with
elf_x86_64_nacl in run_dump_test cases; apply the same
substitution in $x86_64tests; replace foo.rd expectations
files with foo-nacl.rd in $x86_64tests.
Add explicit -melf_x86_64 to ld options in tests that need it,
in case the default emulation is x32 (as it is for x86_64-nacl).
* ld/testsuite/ld-x86-64/plt-nacl.pd: New file.
* ld/testsuite/ld-x86-64/split-by-file-nacl.rd: New file.
* ld/testsuite/ld-x86-64/tlsbin-nacl.rd: New file.
* ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: New file.
* ld/testsuite/ld-x86-64/tlsdesc-nacl.pd: New file.
* ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: New file.
* ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd: New file.
* ld/testsuite/ld-x86-64/tlspic-nacl.rd: New file.

* ld-i386/hidden2.d: Loosen regexps to match any file format variant,
and not to depend on exact addresses, displacements, etc. where
they are irrelevant.
* ld-i386/pcrel16.d: Likewise.
* ld-i386/pcrel16abs.d: Likewise.
* ld-i386/pr12718.d: Likewise.
* ld-i386/pr12921.d: Likewise.
* ld-i386/reloc.d: Likewise.
* ld-i386/tlsbin.dd: Likewise.
* ld-i386/tlsbin.sd: Likewise.
* ld-i386/tlsbin.td: Likewise.
* ld-i386/tlsbindesc.dd: Likewise.
* ld-i386/tlsbindesc.sd: Likewise.
* ld-i386/tlsbindesc.td: Likewise.
* ld-i386/tlsdesc.dd: Likewise.
* ld-i386/tlsdesc.sd: Likewise.
* ld-i386/tlsdesc.td: Likewise.
* ld-i386/tlsg.sd: Likewise.
* ld-i386/tlsgdesc.dd: Likewise.
* ld-i386/tlsindntpoff.dd: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlsnopic.sd: Likewise.
* ld-i386/tlspic.dd: Likewise.
* ld-i386/tlspic.sd: Likewise.
* ld-i386/tlspic.td: Likewise.
* ld-i386/tlspie2.d: Likewise.
* ld-x86-64/hidden2.d: Likewise.
* ld-x86-64/pcrel16.d: Likewise.
* ld-x86-64/pr12718.d: Likewise.
* ld-x86-64/pr12921.d: Likewise.
* ld-x86-64/protected3.d: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlsbin.sd: Likewise.
* ld-x86-64/tlsbin.td: Likewise.
* ld-x86-64/tlsbindesc.dd: Likewise.
* ld-x86-64/tlsbindesc.sd: Likewise.
* ld-x86-64/tlsbindesc.td: Likewise.
* ld-x86-64/tlsdesc.dd: Likewise.
* ld-x86-64/tlsdesc.sd: Likewise.
* ld-x86-64/tlsdesc.td: Likewise.
* ld-x86-64/tlsg.sd: Likewise.
* ld-x86-64/tlsgd5.dd: Likewise.
* ld-x86-64/tlsgd6.dd: Likewise.
* ld-x86-64/tlsgdesc.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlspic.sd: Likewise.
* ld-x86-64/tlspic.td: Likewise.

* ld-x86-64/ilp32-8.d: Match any file format variant.
Use a -Ttext and adjust expected results, to handle variant layouts.
* ld-x86-64/ilp32-9.d: Likewise.

* ld-i386/alloc.t: Remove superfluous OUTPUT_FORMAT statement.
* ld-i386/pr12627.t: Likewise.

* ld-x86-64/abs-l1om.d: Add target: constraint.
* ld-x86-64/protected2-l1om.d: Likewise.
* ld-x86-64/protected3-l1om.d: Likewise.
* ld-x86-64/ilp32-4.d: Likewise.

* ld-x86-64/plt.s: New file.
* ld-x86-64/pltlib.s: New file.
* ld-x86-64/plt.pd: New file.
* ld-x86-64/x86-64.exp (x86_64tests): Add them.

* ld-i386/plt.s: New file.
* ld-i386/pltlib.s: New file.
* ld-i386/plt.pd: New file.
* ld-i386/plt-pic.s: New file.
* ld-i386/plt-pic.pd: New file.
* ld-i386/i386.exp (i386tests): Add them.

129 files changed:
bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/configure
bfd/configure.in
bfd/elf-nacl.c [new file with mode: 0644]
bfd/elf-nacl.h [new file with mode: 0644]
bfd/elf32-i386.c
bfd/elf64-x86-64.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/elfedit-4.d
binutils/testsuite/binutils-all/i386/i386.exp
binutils/testsuite/binutils-all/x86-64/x86-64.exp
binutils/testsuite/lib/binutils-common.exp
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/k1om.d
gas/testsuite/gas/i386/l1om.d
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/elf32_x86_64_nacl.sh [new file with mode: 0644]
ld/emulparams/elf_i386_nacl.sh [new file with mode: 0644]
ld/emulparams/elf_nacl.sh [new file with mode: 0644]
ld/emulparams/elf_x86_64_nacl.sh [new file with mode: 0644]
ld/scripttempl/elf.sc
ld/testsuite/ChangeLog
ld/testsuite/ld-discard/discard.exp
ld/testsuite/ld-elf/binutils.exp
ld/testsuite/ld-elf/comm-data.exp
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/tls_common.exp
ld/testsuite/ld-elfvers/vers.exp
ld/testsuite/ld-elfvsb/elfvsb.exp
ld/testsuite/ld-elfweak/elfweak.exp
ld/testsuite/ld-gc/gc.exp
ld/testsuite/ld-i386/alloc.t
ld/testsuite/ld-i386/emit-relocs-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/emit-relocs.rd [moved from ld/testsuite/ld-i386/emit-relocs.d with 100% similarity]
ld/testsuite/ld-i386/hidden2.d
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pcrel16.d
ld/testsuite/ld-i386/pcrel16abs.d
ld/testsuite/ld-i386/plt-nacl.pd [new file with mode: 0644]
ld/testsuite/ld-i386/plt-pic-nacl.pd [new file with mode: 0644]
ld/testsuite/ld-i386/plt-pic.pd [new file with mode: 0644]
ld/testsuite/ld-i386/plt-pic.s [new file with mode: 0644]
ld/testsuite/ld-i386/plt.pd [new file with mode: 0644]
ld/testsuite/ld-i386/plt.s [new file with mode: 0644]
ld/testsuite/ld-i386/pltlib.s [new file with mode: 0644]
ld/testsuite/ld-i386/pr12627.t
ld/testsuite/ld-i386/pr12718.d
ld/testsuite/ld-i386/pr12921.d
ld/testsuite/ld-i386/reloc.d
ld/testsuite/ld-i386/tlsbin-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/tlsbin.dd
ld/testsuite/ld-i386/tlsbin.sd
ld/testsuite/ld-i386/tlsbin.td
ld/testsuite/ld-i386/tlsbindesc-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/tlsbindesc.dd
ld/testsuite/ld-i386/tlsbindesc.sd
ld/testsuite/ld-i386/tlsbindesc.td
ld/testsuite/ld-i386/tlsdesc-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/tlsdesc.dd
ld/testsuite/ld-i386/tlsdesc.sd
ld/testsuite/ld-i386/tlsdesc.td
ld/testsuite/ld-i386/tlsg.sd
ld/testsuite/ld-i386/tlsgdesc-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/tlsgdesc.dd
ld/testsuite/ld-i386/tlsindntpoff.dd
ld/testsuite/ld-i386/tlsnopic-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/tlsnopic.dd
ld/testsuite/ld-i386/tlsnopic.sd
ld/testsuite/ld-i386/tlspic-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-i386/tlspic.dd
ld/testsuite/ld-i386/tlspic.sd
ld/testsuite/ld-i386/tlspic.td
ld/testsuite/ld-i386/tlspie2.d
ld/testsuite/ld-ifunc/binutils.exp
ld/testsuite/ld-ifunc/ifunc.exp
ld/testsuite/ld-linkonce/linkonce.exp
ld/testsuite/ld-pie/pie.exp
ld/testsuite/ld-shared/shared.exp
ld/testsuite/ld-undefined/weak-undef.exp
ld/testsuite/ld-unique/unique.exp
ld/testsuite/ld-x86-64/abs-l1om.d
ld/testsuite/ld-x86-64/dwarfreloc.exp
ld/testsuite/ld-x86-64/hidden2.d
ld/testsuite/ld-x86-64/ilp32-4-nacl.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/ilp32-4.d
ld/testsuite/ld-x86-64/ilp32-8.d
ld/testsuite/ld-x86-64/ilp32-9.d
ld/testsuite/ld-x86-64/line.exp
ld/testsuite/ld-x86-64/pcrel16.d
ld/testsuite/ld-x86-64/plt-nacl.pd [new file with mode: 0644]
ld/testsuite/ld-x86-64/plt-pic.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/plt.pd [new file with mode: 0644]
ld/testsuite/ld-x86-64/plt.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pltlib.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr12718.d
ld/testsuite/ld-x86-64/pr12921.d
ld/testsuite/ld-x86-64/protected2-l1om.d
ld/testsuite/ld-x86-64/protected3-l1om.d
ld/testsuite/ld-x86-64/protected3.d
ld/testsuite/ld-x86-64/split-by-file-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsbin-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsbin.dd
ld/testsuite/ld-x86-64/tlsbin.sd
ld/testsuite/ld-x86-64/tlsbin.td
ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsbindesc.dd
ld/testsuite/ld-x86-64/tlsbindesc.sd
ld/testsuite/ld-x86-64/tlsbindesc.td
ld/testsuite/ld-x86-64/tlsdesc-nacl.pd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsdesc-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsdesc.dd
ld/testsuite/ld-x86-64/tlsdesc.sd
ld/testsuite/ld-x86-64/tlsdesc.td
ld/testsuite/ld-x86-64/tlsg.sd
ld/testsuite/ld-x86-64/tlsgd5.dd
ld/testsuite/ld-x86-64/tlsgd6.dd
ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlsgdesc.dd
ld/testsuite/ld-x86-64/tlspic-nacl.rd [new file with mode: 0644]
ld/testsuite/ld-x86-64/tlspic.dd
ld/testsuite/ld-x86-64/tlspic.sd
ld/testsuite/ld-x86-64/tlspic.td
ld/testsuite/ld-x86-64/x86-64.exp
ld/testsuite/lib/ld-lib.exp

index 384235e..56a1121 100644 (file)
@@ -1,3 +1,27 @@
+2012-04-03  Roland McGrath  <mcgrathr@google.com>
+
+       * elf-nacl.c: New file.
+       * elf-nacl.h: New file.
+       * elf32-i386.c (elf_backend_modify_segment_map): Define for
+       bfd_elf32_i386_nacl_vec.
+       (elf_backend_modify_program_headers): Likewise.
+       * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
+       bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
+       (elf_backend_modify_program_headers): Likewise.
+       * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
+       (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
+       * Makefile.in: Regenerated.
+       * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
+       (bfd_elf32_x86_64_nacl_vec): Likewise.
+       (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
+       (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
+       (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
+       (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
+       (bfd_elf32_i386_nacl_vec): Likewise.
+       (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
+       (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
+       * configure: Regenerated.
+
 2012-03-31  Andreas Schwab  <schwab@linux-m68k.org>
 
        * elf32-m68k.c (elf_m68k_relocate_section): Allow
index 8f4fbee..50c84ee 100644 (file)
@@ -275,6 +275,7 @@ BFD32_BACKENDS = \
        elf-ifunc.lo \
        elf-m10200.lo \
        elf-m10300.lo \
+       elf-nacl.lo \
        elf-strtab.lo \
        elf-vxworks.lo \
        elf.lo \
@@ -461,6 +462,7 @@ BFD32_BACKENDS_CFILES = \
        elf-ifunc.c \
        elf-m10200.c \
        elf-m10300.c \
+       elf-nacl.c \
        elf-strtab.c \
        elf-vxworks.c \
        elf.c \
@@ -609,6 +611,7 @@ BFD64_BACKENDS = \
        coff-x86_64.lo \
        coff64-rs6000.lo \
        demo64.lo \
+       elf-nacl.lo \
        elf32-ia64.lo \
        elf32-score.lo \
        elf32-score7.lo \
@@ -645,6 +648,7 @@ BFD64_BACKENDS_CFILES = \
        coff-x86_64.c \
        coff64-rs6000.c \
        demo64.c \
+       elf-nacl.c \
        elf32-score.c \
        elf32-score7.c \
        elf64-alpha.c \
index 437bafc..cf7b380 100644 (file)
@@ -575,6 +575,7 @@ BFD32_BACKENDS = \
        elf-ifunc.lo \
        elf-m10200.lo \
        elf-m10300.lo \
+       elf-nacl.lo \
        elf-strtab.lo \
        elf-vxworks.lo \
        elf.lo \
@@ -761,6 +762,7 @@ BFD32_BACKENDS_CFILES = \
        elf-ifunc.c \
        elf-m10200.c \
        elf-m10300.c \
+       elf-nacl.c \
        elf-strtab.c \
        elf-vxworks.c \
        elf.c \
@@ -910,6 +912,7 @@ BFD64_BACKENDS = \
        coff-x86_64.lo \
        coff64-rs6000.lo \
        demo64.lo \
+       elf-nacl.lo \
        elf32-ia64.lo \
        elf32-score.lo \
        elf32-score7.lo \
@@ -946,6 +949,7 @@ BFD64_BACKENDS_CFILES = \
        coff-x86_64.c \
        coff64-rs6000.c \
        demo64.c \
+       elf-nacl.c \
        elf32-score.c \
        elf32-score7.c \
        elf64-alpha.c \
@@ -1341,6 +1345,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-ifunc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10200.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-m10300.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-nacl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-strtab.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf-vxworks.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf.Plo@am__quote@
index 58a57ba..dd274bd 100755 (executable)
     bfd_elf32_hppa_nbsd_vec)   tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)                tb="$tb elf32-i370.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_sol2_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_nacl_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vec)                tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_sol2_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_nacl_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vec)                tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i860_vec)                tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)                tb="$tb elf32-i960.lo elf32.lo $elf" ;;
                                tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
                                tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf32_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
-    bfd_elf32_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     bfd_mmo_vec)               tb="$tb mmo.lo" target_size=64 ;;
     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
index f443915..af3622b 100644 (file)
@@ -711,11 +711,11 @@ do
     bfd_elf32_hppa_nbsd_vec)   tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_hppa_vec)                tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
     bfd_elf32_i370_vec)                tb="$tb elf32-i370.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_sol2_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_nacl_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
-    bfd_elf32_i386_vec)                tb="$tb elf32-i386.lo elf-ifunc.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_sol2_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_freebsd_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_nacl_vec)   tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vxworks_vec)        tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+    bfd_elf32_i386_vec)                tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
     bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i860_vec)                tb="$tb elf32-i860.lo elf32.lo $elf" ;;
     bfd_elf32_i960_vec)                tb="$tb elf32-i960.lo elf32.lo $elf" ;;
@@ -850,16 +850,16 @@ do
                                tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
     bfd_elf64_tradlittlemips_vec | bfd_elf64_tradlittlemips_freebsd_vec)
                                tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
-    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf32_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
-    bfd_elf32_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
-    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_sol2_vec)  tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_vec)      tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+    bfd_elf32_x86_64_nacl_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo elf32.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_l1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_vec)                tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
+    bfd_elf64_k1om_freebsd_vec) tb="$tb elf64-x86-64.lo elf-ifunc.lo elf-nacl.lo elf64.lo $elf"; target_size=64 ;;
     bfd_mmo_vec)               tb="$tb mmo.lo" target_size=64 ;;
     bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
     bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c
new file mode 100644 (file)
index 0000000..3ba7f55
--- /dev/null
@@ -0,0 +1,205 @@
+/* Native Client support for ELF
+   Copyright 2012 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+   MA 02111-1307, USA.  */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "elf-bfd.h"
+#include "elf-nacl.h"
+#include "elf/common.h"
+#include "elf/internal.h"
+
+static bfd_boolean
+segment_executable (struct elf_segment_map *seg)
+{
+  if (seg->p_flags_valid)
+    return (seg->p_flags & PF_X) != 0;
+  else
+    {
+      /* The p_flags value has not been computed yet,
+         so we have to look through the sections.  */
+      unsigned int i;
+      for (i = 0; i < seg->count; ++i)
+        if (seg->sections[i]->flags & SEC_CODE)
+          return TRUE;
+    }
+  return FALSE;
+}
+
+static bfd_boolean
+segment_nonexecutable_and_has_contents (struct elf_segment_map *seg)
+{
+  bfd_boolean any_contents = FALSE;
+  unsigned int i;
+  for (i = 0; i < seg->count; ++i)
+    {
+      if (seg->sections[i]->flags & SEC_CODE)
+        return FALSE;
+      if (seg->sections[i]->flags & SEC_HAS_CONTENTS)
+        any_contents = TRUE;
+    }
+  return any_contents;
+}
+
+
+/* We permute the segment_map to get BFD to do the file layout we want:
+   The first non-executable PT_LOAD segment appears first in the file
+   and contains the ELF file header and phdrs.  */
+bfd_boolean
+nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+  struct elf_segment_map **m = &elf_tdata (abfd)->segment_map;
+  struct elf_segment_map **first_load = NULL;
+  struct elf_segment_map **last_load = NULL;
+  bfd_boolean moved_headers = FALSE;
+
+  while (*m != NULL)
+    {
+      struct elf_segment_map *seg = *m;
+
+      if (seg->p_type == PT_LOAD)
+        {
+          /* First, we're just finding the earliest PT_LOAD.
+             By the normal rules, this will be the lowest-addressed one.
+             We only have anything interesting to do if it's executable.  */
+          last_load = m;
+          if (first_load == NULL)
+            {
+              if (!segment_executable (*m))
+                return TRUE;
+              first_load = m;
+            }
+          /* Now that we've noted the first PT_LOAD, we're looking for
+             the first non-executable PT_LOAD with a nonempty p_filesz.  */
+          else if (!moved_headers
+                   && segment_nonexecutable_and_has_contents (seg))
+            {
+              /* This is the one we were looking for!
+
+                 First, clear the flags on previous segments that
+                 say they include the file header and phdrs.  */
+              struct elf_segment_map *prevseg;
+              for (prevseg = *first_load;
+                   prevseg != seg;
+                   prevseg = prevseg->next)
+                if (prevseg->p_type == PT_LOAD)
+                  {
+                    prevseg->includes_filehdr = 0;
+                    prevseg->includes_phdrs = 0;
+                  }
+
+              /* This segment will include those headers instead.  */
+              seg->includes_filehdr = 1;
+              seg->includes_phdrs = 1;
+
+              moved_headers = TRUE;
+            }
+        }
+
+      m = &seg->next;
+    }
+
+  if (first_load != last_load && moved_headers)
+    {
+      /* Now swap the first and last PT_LOAD segments'
+         positions in segment_map.  */
+      struct elf_segment_map *first = *first_load;
+      struct elf_segment_map *last = *last_load;
+      *first_load = first->next;
+      first->next = last->next;
+      last->next = first;
+    }
+
+  return TRUE;
+}
+
+/* After nacl_modify_segment_map has done its work, the file layout has
+   been done as we wanted.  But the PT_LOAD phdrs are no longer in the
+   proper order for the ELF rule that they must appear in ascending address
+   order.  So find the two segments we swapped before, and swap them back.  */
+bfd_boolean
+nacl_modify_program_headers (bfd *abfd,
+                             struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+  struct elf_segment_map **m = &elf_tdata (abfd)->segment_map;
+  Elf_Internal_Phdr *phdr = elf_tdata (abfd)->phdr;
+  Elf_Internal_Phdr *p = phdr;
+
+  /* Find the PT_LOAD that contains the headers (should be the first).  */
+  while (*m != NULL)
+    {
+      if ((*m)->p_type == PT_LOAD && (*m)->includes_filehdr)
+        break;
+
+      m = &(*m)->next;
+      ++p;
+    }
+
+  if (*m != NULL)
+    {
+      struct elf_segment_map **first_load_seg = m;
+      Elf_Internal_Phdr *first_load_phdr = p;
+      struct elf_segment_map **next_load_seg = NULL;
+      Elf_Internal_Phdr *next_load_phdr = NULL;
+
+      /* Now move past that first one and find the PT_LOAD that should be
+         before it by address order.  */
+
+      m = &(*m)->next;
+      ++p;
+
+      while ((*m) != NULL)
+        {
+          if (p->p_type == PT_LOAD && p->p_vaddr < first_load_phdr->p_vaddr)
+            {
+              next_load_seg = m;
+              next_load_phdr = p;
+              break;
+            }
+
+          m = &(*m)->next;
+          ++p;
+        }
+
+      /* Swap their positions in the segment_map back to how they used to be.
+         The phdrs have already been set up by now, so we have to slide up
+         the earlier ones to insert the one that should be first.  */
+      if (next_load_seg != NULL)
+        {
+          Elf_Internal_Phdr move_phdr;
+          struct elf_segment_map *first_seg = *first_load_seg;
+          struct elf_segment_map *next_seg = *next_load_seg;
+          struct elf_segment_map *first_next = first_seg->next;
+          struct elf_segment_map *next_next = next_seg->next;
+
+          first_seg->next = next_next;
+          *first_load_seg = next_seg;
+
+          next_seg->next = first_next;
+          *next_load_seg = first_seg;
+
+          move_phdr = *next_load_phdr;
+          memmove (first_load_phdr + 1, first_load_phdr,
+                   (next_load_phdr - first_load_phdr) * sizeof move_phdr);
+          *first_load_phdr = move_phdr;
+        }
+    }
+
+  return TRUE;
+}
diff --git a/bfd/elf-nacl.h b/bfd/elf-nacl.h
new file mode 100644 (file)
index 0000000..417c7e3
--- /dev/null
@@ -0,0 +1,24 @@
+/* Native Client support for ELF
+   Copyright 2012 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+   MA 02111-1307, USA.  */
+
+#include "bfd.h"
+
+bfd_boolean nacl_modify_segment_map (bfd *, struct bfd_link_info *);
+bfd_boolean nacl_modify_program_headers (bfd *, struct bfd_link_info *);
index f35e3c2..d5a2614 100644 (file)
@@ -25,6 +25,7 @@
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
+#include "elf-nacl.h"
 #include "elf-vxworks.h"
 #include "bfd_stdint.h"
 #include "objalloc.h"
@@ -5207,8 +5208,17 @@ static const struct elf_i386_backend_data elf_i386_nacl_arch_bed =
 #undef elf_backend_arch_data
 #define elf_backend_arch_data  &elf_i386_nacl_arch_bed
 
+#undef elf_backend_modify_segment_map
+#define        elf_backend_modify_segment_map          nacl_modify_segment_map
+#undef elf_backend_modify_program_headers
+#define        elf_backend_modify_program_headers      nacl_modify_program_headers
+
 #include "elf32-target.h"
 
+/* Restore defaults.  */
+#undef elf_backend_modify_segment_map
+#undef elf_backend_modify_program_headers
+
 /* VxWorks support.  */
 
 #undef TARGET_LITTLE_SYM
index cc5ee42..8ca811c 100644 (file)
@@ -26,6 +26,7 @@
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
+#include "elf-nacl.h"
 #include "bfd_stdint.h"
 #include "objalloc.h"
 #include "hashtab.h"
@@ -5227,6 +5228,11 @@ static const struct elf_x86_64_backend_data elf_x86_64_nacl_arch_bed =
 #undef elf_backend_arch_data
 #define        elf_backend_arch_data   &elf_x86_64_nacl_arch_bed
 
+#undef elf_backend_modify_segment_map
+#define        elf_backend_modify_segment_map          nacl_modify_segment_map
+#undef elf_backend_modify_program_headers
+#define        elf_backend_modify_program_headers      nacl_modify_program_headers
+
 #include "elf64-target.h"
 
 /* Native Client x32 support.  */
@@ -5264,10 +5270,12 @@ static const struct elf_x86_64_backend_data elf_x86_64_nacl_arch_bed =
 #include "elf32-target.h"
 
 /* Restore defaults.  */
-#undef elf_backend_object_p
+#undef elf_backend_object_p
 #define elf_backend_object_p               elf64_x86_64_elf_object_p
-#undef elf_backend_bfd_from_remote_memory
-#undef elf_backend_size_info
+#undef elf_backend_bfd_from_remote_memory
+#undef elf_backend_size_info
+#undef elf_backend_modify_segment_map
+#undef elf_backend_modify_program_headers
 
 /* Intel L1OM support.  */
 
index bc33a5b..db44b92 100644 (file)
@@ -1,3 +1,13 @@
+2012-04-03  Roland McGrath  <mcgrathr@google.com>
+
+       * lib/binutils-common.exp (is_elf_format): Consider *-*-nacl* to
+       be ELF too.
+
+       * binutils-all/elfedit-4.d: Add "#as: --64" option.
+
+       * binutils-all/i386/i386.exp: Accept nacl targets too.
+       * binutils-all/x86-64/x86-64.exp: Likewise.
+
 2012-03-13  Hans-Peter Nilsson  <hp@axis.com>
 
        PR binutils/3807
index cc20044..4336dd8 100644 (file)
@@ -1,6 +1,7 @@
 #PROG: elfedit
 #elfedit: --output-mach k1om
 #source: empty.s
+#as: --64
 #readelf: -h
 #name: Update ELF header 4
 #target: x86_64-*-*
index 5b33e67..d06501a 100644 (file)
@@ -1,23 +1,24 @@
-#   Copyright 2010
+#   Copyright 2010, 2012
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
 if {!([istarget "i*86-*-linux*"]
       || [istarget "i*86-*-gnu*"]
-      || [istarget "x86_64-*-linux*"])
+      || [istarget "i*86-*-nacl*"]
+      || [istarget "x86_64-*-nacl*"])
     || ![is_elf_format]
     || [is_remote host]} then {
     return
index 1934ca2..ccabc63 100644 (file)
@@ -1,21 +1,23 @@
-#   Copyright 2010
+#   Copyright 2010, 2012
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
-if {![istarget "x86_64-*-linux*"] || [is_remote host]} then {
+if {!([istarget "x86_64-*-linux*"]
+      || [istarget "x86_64-*-nacl*"])
+    || [is_remote host]} {
     return
 }
 
index f9dcfd2..0054184 100644 (file)
@@ -1,5 +1,5 @@
 # Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2004, 2006, 2007,
-# 2009, 2010, 2011 Free Software Foundation, Inc.
+# 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -30,6 +30,7 @@ proc is_elf_format {} {
         && ![istarget ia64-*-hpux*]
         && ![istarget *-*-linux*]
         && ![istarget *-*-gnu*]
+        && ![istarget *-*-nacl*]
         && ![istarget frv-*-uclinux*]
         && ![istarget bfin-*-uclinux]
         && ![istarget sh*-*-uclinux*]
index 6895347..f157c74 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-03  Roland McGrath  <mcgrathr@google.com>
+
+       * gas/i386/k1om.d: Add not-target match for *-*-nacl*.
+       * gas/i386/l1om.d: Likewise.
+
 2012-04-02  DJ Delorie  <dj@redhat.com>
 
        * gas/rx/mov.d: Update patterns for fixed MOV.W encoding.
index 0682444..1a796d8 100644 (file)
@@ -2,6 +2,7 @@
 #as: -J -march=k1om
 #objdump: -dw
 #name: k1om
+#not-target: *-*-nacl*
 
 .*: +file format elf64-k1om.*
 
index 1b73fb8..6d2fc57 100644 (file)
@@ -2,6 +2,7 @@
 #as: -J -march=l1om
 #objdump: -dw --insn-width=7
 #name: l1om
+#not-target: *-*-nacl*
 
 .*: +file format elf64-l1om.*
 
index 203f986..1d5e511 100644 (file)
@@ -1,3 +1,19 @@
+2012-04-03  Roland McGrath  <mcgrathr@google.com>
+
+       * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them.
+       * emulparams/elf_nacl.sh: New file.
+       * emulparams/elf_i386_nacl.sh: New file.
+       * emulparams/elf32_x86_64_nacl.sh: New file.
+       * emulparams/elf_x86_64_nacl.sh: New file.
+       * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here.
+       (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and
+       eelf_x86_64_nacl.c here.
+       (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c):
+       New targets.
+       * Makefile.in: Regenerated.
+
+       * scripttempl/elf.sc: Handle SEPARATE_CODE cases.
+
 2012-04-02  Mike Frysinger  <vapier@gentoo.org>
 
        * ldmisc.c (vfinfo): Assign new local str to fmt.  Delete
index 37f8d1f..524350e 100644 (file)
@@ -263,6 +263,7 @@ ALL_EMULATION_SOURCES = \
        eelf_i386_chaos.c \
        eelf_i386_fbsd.c \
        eelf_i386_ldso.c \
+       eelf_i386_nacl.c \
        eelf_i386_sol2.c \
        eelf_i386_vxworks.c \
        eelf_s390.c \
@@ -462,6 +463,7 @@ ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
 
 ALL_64_EMULATION_SOURCES = \
        eelf32_x86_64.c \
+       eelf32_x86_64_nacl.c \
        eelf64_aix.c \
        eelf64_ia64.c \
        eelf64_ia64_fbsd.c \
@@ -483,13 +485,14 @@ ALL_64_EMULATION_SOURCES = \
        eelf64ppc.c \
        eelf64ppc_fbsd.c \
        eelf64tilegx.c \
-       eelf64tilegx_be.c \
+       eelf64tilegx_be.c \
        eelf_l1om.c \
        eelf_l1om_fbsd.c \
        eelf_k1om.c \
        eelf_k1om_fbsd.c \
        eelf_x86_64.c \
        eelf_x86_64_fbsd.c \
+       eelf_x86_64_nacl.c \
        eelf_x86_64_sol2.c \
        ehppa64linux.c \
        emmo.c \
@@ -1030,8 +1033,8 @@ eelf32lm32.c: $(srcdir)/emulparams/elf32lm32.sh \
        ${GENSCRIPTS} elf32lm32 "$(tdir_elf32lm32)"
 eelf32lm32fd.c: $(srcdir)/emulparams/elf32lm32fd.sh \
   $(srcdir)/emulparams/elf32lm32.sh $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 
-       ${GENSCRIPTS} elf32lm32fd "$(tdir_elf32lm32fd)" 
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32lm32fd "$(tdir_elf32lm32fd)"
 eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -1202,6 +1205,11 @@ eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
 eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \
+  $(srcdir)/emulparams/elf_i386.sh \
+  $(srcdir)/emulparams/elf_nacl.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf_i386_nacl "$(tdir_elf_i386_nacl)"
 eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \
   $(srcdir)/emulparams/solaris2.sh \
   $(srcdir)/emultempl/solaris2.em \
@@ -1729,11 +1737,11 @@ eriscix.c: $(srcdir)/emulparams/riscix.sh \
        ${GENSCRIPTS} riscix "$(tdir_riscix)"
 escore3_elf.c: $(srcdir)/emulparams/scoreelf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 
-       ${GENSCRIPTS} score3_elf "$(tdir_score3_elf)" scoreelf 
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} score3_elf "$(tdir_score3_elf)" scoreelf
 escore7_elf.c: $(srcdir)/emulparams/scoreelf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} score7_elf "$(tdir_score7_elf)" scoreelf
 esh.c: $(srcdir)/emulparams/sh.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
@@ -1901,6 +1909,11 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
 eelf32_x86_64.c: $(srcdir)/emulparams/elf32_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32_x86_64 "$(tdir_elf32_x86_64)"
+eelf32_x86_64_nacl.c: $(srcdir)/emulparams/elf32_x86_64_nacl.sh \
+  $(srcdir)/emulparams/elf32_x86_64.sh \
+  $(srcdir)/emulparams/elf_nacl.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32_x86_64_nacl "$(tdir_elf32_x86_64_nacl)"
 eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
@@ -2020,6 +2033,11 @@ eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
   $(srcdir)/emulparams/elf_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
+eelf_x86_64_nacl.c: $(srcdir)/emulparams/elf_x86_64_nacl.sh \
+  $(srcdir)/emulparams/elf_x86_64.sh \
+  $(srcdir)/emulparams/elf_nacl.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf_x86_64_nacl "$(tdir_elf_x86_64_nacl)"
 eelf_x86_64_sol2.c: $(srcdir)/emulparams/elf_x86_64_sol2.sh \
   $(srcdir)/emulparams/elf_x86_64.sh \
   $(srcdir)/emulparams/solaris2.sh \
@@ -2139,7 +2157,7 @@ bootstrap: ld3$(EXEEXT)
 
 # END OF CHECK TARGETS
 
-# 
+#
 # Build a dummy plugin using libtool.
 #
 if ENABLE_PLUGINS
@@ -2164,9 +2182,9 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi
        touch $@
        -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
        -($(POD2MAN) ld.pod | \
-               sed -e '/^.if n .na/d' > $@.T$$$$ && \
-               mv -f $@.T$$$$ $@) || \
-               (rm -f $@.T$$$$ && exit 1)
+               sed -e '/^.if n .na/d' > $@.T$$$$ && \
+               mv -f $@.T$$$$ $@) || \
+               (rm -f $@.T$$$$ && exit 1)
        rm -f ld.pod
 
 MAINTAINERCLEANFILES = configdoc.texi ld.1
index 1616f58..776a4e0 100644 (file)
@@ -569,6 +569,7 @@ ALL_EMULATION_SOURCES = \
        eelf_i386_chaos.c \
        eelf_i386_fbsd.c \
        eelf_i386_ldso.c \
+       eelf_i386_nacl.c \
        eelf_i386_sol2.c \
        eelf_i386_vxworks.c \
        eelf_s390.c \
@@ -767,6 +768,7 @@ ALL_EMULATION_SOURCES = \
 ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
 ALL_64_EMULATION_SOURCES = \
        eelf32_x86_64.c \
+       eelf32_x86_64_nacl.c \
        eelf64_aix.c \
        eelf64_ia64.c \
        eelf64_ia64_fbsd.c \
@@ -788,13 +790,14 @@ ALL_64_EMULATION_SOURCES = \
        eelf64ppc.c \
        eelf64ppc_fbsd.c \
        eelf64tilegx.c \
-       eelf64tilegx_be.c \
+       eelf64tilegx_be.c \
        eelf_l1om.c \
        eelf_l1om_fbsd.c \
        eelf_k1om.c \
        eelf_k1om_fbsd.c \
        eelf_x86_64.c \
        eelf_x86_64_fbsd.c \
+       eelf_x86_64_nacl.c \
        eelf_x86_64_sol2.c \
        ehppa64linux.c \
        emmo.c \
@@ -886,7 +889,7 @@ ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $
 
 # END OF CHECK TARGETS
 
-# 
+#
 # Build a dummy plugin using libtool.
 #
 @ENABLE_PLUGINS_TRUE@noinst_LTLIBRARIES = libldtestplug.la
@@ -1104,6 +1107,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_linux_be.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_tic6x_linux_le.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32_x86_64_nacl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32am33lin.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32b4300.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32bfin.Po@am__quote@
@@ -1196,6 +1200,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_chaos.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_ldso.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_nacl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_sol2.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_vxworks.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om.Po@am__quote@
@@ -1205,6 +1210,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_s390.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_nacl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_sol2.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egld960.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egld960coff.Po@am__quote@
@@ -2488,8 +2494,8 @@ eelf32lm32.c: $(srcdir)/emulparams/elf32lm32.sh \
        ${GENSCRIPTS} elf32lm32 "$(tdir_elf32lm32)"
 eelf32lm32fd.c: $(srcdir)/emulparams/elf32lm32fd.sh \
   $(srcdir)/emulparams/elf32lm32.sh $(ELF_DEPS) \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 
-       ${GENSCRIPTS} elf32lm32fd "$(tdir_elf32lm32fd)" 
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32lm32fd "$(tdir_elf32lm32fd)"
 eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
   $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
@@ -2660,6 +2666,11 @@ eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
 eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \
+  $(srcdir)/emulparams/elf_i386.sh \
+  $(srcdir)/emulparams/elf_nacl.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf_i386_nacl "$(tdir_elf_i386_nacl)"
 eelf_i386_sol2.c: $(srcdir)/emulparams/elf_i386_sol2.sh \
   $(srcdir)/emulparams/solaris2.sh \
   $(srcdir)/emultempl/solaris2.em \
@@ -3187,11 +3198,11 @@ eriscix.c: $(srcdir)/emulparams/riscix.sh \
        ${GENSCRIPTS} riscix "$(tdir_riscix)"
 escore3_elf.c: $(srcdir)/emulparams/scoreelf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 
-       ${GENSCRIPTS} score3_elf "$(tdir_score3_elf)" scoreelf 
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} score3_elf "$(tdir_score3_elf)" scoreelf
 escore7_elf.c: $(srcdir)/emulparams/scoreelf.sh \
   $(ELF_DEPS) $(srcdir)/emultempl/scoreelf.em \
-  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} 
+  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} score7_elf "$(tdir_score7_elf)" scoreelf
 esh.c: $(srcdir)/emulparams/sh.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
@@ -3359,6 +3370,11 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \
 eelf32_x86_64.c: $(srcdir)/emulparams/elf32_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf32_x86_64 "$(tdir_elf32_x86_64)"
+eelf32_x86_64_nacl.c: $(srcdir)/emulparams/elf32_x86_64_nacl.sh \
+  $(srcdir)/emulparams/elf32_x86_64.sh \
+  $(srcdir)/emulparams/elf_nacl.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf32_x86_64_nacl "$(tdir_elf32_x86_64_nacl)"
 eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
@@ -3478,6 +3494,11 @@ eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
   $(srcdir)/emulparams/elf_x86_64.sh \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
+eelf_x86_64_nacl.c: $(srcdir)/emulparams/elf_x86_64_nacl.sh \
+  $(srcdir)/emulparams/elf_x86_64.sh \
+  $(srcdir)/emulparams/elf_nacl.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf_x86_64_nacl "$(tdir_elf_x86_64_nacl)"
 eelf_x86_64_sol2.c: $(srcdir)/emulparams/elf_x86_64_sol2.sh \
   $(srcdir)/emulparams/elf_x86_64.sh \
   $(srcdir)/emulparams/solaris2.sh \
@@ -3565,9 +3586,9 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi
        touch $@
        -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
        -($(POD2MAN) ld.pod | \
-               sed -e '/^.if n .na/d' > $@.T$$$$ && \
-               mv -f $@.T$$$$ $@) || \
-               (rm -f $@.T$$$$ && exit 1)
+               sed -e '/^.if n .na/d' > $@.T$$$$ && \
+               mv -f $@.T$$$$ $@) || \
+               (rm -f $@.T$$$$ && exit 1)
        rm -f ld.pod
 mostlyclean-local:
        -rm -rf tmpdir
index 8cd2915..6418768 100644 (file)
@@ -145,7 +145,7 @@ fr30-*-*)           targ_emul=elf32fr30
 frv-*-*linux*)         targ_emul=elf32frvfd ;;
 frv-*-*)               targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
                        ;;
-moxie-*-*)             targ_emul=elf32moxie 
+moxie-*-*)             targ_emul=elf32moxie
                        ;;
 h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
                        targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;;
@@ -281,6 +281,15 @@ i[3-7]86-*-beos*)  targ_emul=elf_i386_be ;;
 i[3-7]86-*-vxworks*)   targ_emul=elf_i386_vxworks ;;
 i[3-7]86-*-chaos)      targ_emul=elf_i386_chaos
                        ;;
+i[3-7]86-*-nacl*)      targ_emul=elf_i386_nacl
+                       targ64_extra_emuls="elf32_x86_64_nacl elf_x86_64_nacl"
+                       targ64_extra_libpath="elf32_x86_64_nacl elf_x86_64_nacl"
+                       ;;
+x86_64-*-nacl*)                targ_emul=elf32_x86_64_nacl
+                       targ_extra_emuls="elf_i386_nacl elf_x86_64_nacl"
+                       targ_extra_libpath="elf_i386_nacl elf_x86_64_nacl"
+                       tdir_elf_i386_nacl=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
+                       ;;
 i860-*-coff)           targ_emul=coff_i860 ;;
 i860-stardent-sysv4* | i860-stardent-elf*)
                        targ_emul=elf32_i860
@@ -306,7 +315,7 @@ ip2k-*-elf)         targ_emul=elf32ip2k
 iq2000-*-elf)           targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10"
                        ;;
 lm32-*-*linux*)         targ_emul=elf32lm32fd ;;
-lm32-*-*)               targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd" 
+lm32-*-*)               targ_emul=elf32lm32 ; targ_extra_emuls="elf32lm32fd"
                         ;;
 m32c-*-elf | m32c-*-rtems*)
                        targ_emul=elf32m32c
@@ -317,9 +326,9 @@ m32r*-*-elf* | m32r*-*-rtems*)
 m32r*le-*-linux-*)      targ_emul=m32rlelf_linux ;;
 m32r*-*-linux-*)        targ_emul=m32relf_linux
                        ;;
-m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf 
+m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
                        targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
-m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf 
+m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
                        targ_extra_emuls="m68hc12elfb m68hc11elf m68hc11elfb" ;;
 m68*-sun-sunos[34]*)   targ_emul=sun3 ;;
 m68*-wrs-vxworks*)     targ_emul=sun3 ;;
@@ -672,7 +681,7 @@ vax-*-linux-*)      targ_emul=elf32vax
                        ;;
 w65-*-*)               targ_emul=w65
                        ;;
-xc16x-*-elf)           targ_emul=elf32xc16x 
+xc16x-*-elf)           targ_emul=elf32xc16x
                         targ_extra_emuls="elf32xc16xl elf32xc16xs"
                         ;;
 xstormy16-*-*)         targ_emul=elf32xstormy16
diff --git a/ld/emulparams/elf32_x86_64_nacl.sh b/ld/emulparams/elf32_x86_64_nacl.sh
new file mode 100644 (file)
index 0000000..4570ef9
--- /dev/null
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf32_x86_64.sh
+. ${srcdir}/emulparams/elf_nacl.sh
+OUTPUT_FORMAT="elf32-x86-64-nacl"
diff --git a/ld/emulparams/elf_i386_nacl.sh b/ld/emulparams/elf_i386_nacl.sh
new file mode 100644 (file)
index 0000000..81992d7
--- /dev/null
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf_i386.sh
+. ${srcdir}/emulparams/elf_nacl.sh
+OUTPUT_FORMAT="elf32-i386-nacl"
diff --git a/ld/emulparams/elf_nacl.sh b/ld/emulparams/elf_nacl.sh
new file mode 100644 (file)
index 0000000..0073c0f
--- /dev/null
@@ -0,0 +1,6 @@
+ENABLE_INITFINI_ARRAY=yes
+SEPARATE_CODE=yes
+TEXT_START_ADDR=0x20000
+NACL_RODATA_DISTANCE=0x10000000
+RODATA_ADDR="${TEXT_START_ADDR} + ${NACL_RODATA_DISTANCE} + SIZEOF_HEADERS"
+SHLIB_RODATA_ADDR="${NACL_RODATA_DISTANCE} + SIZEOF_HEADERS"
diff --git a/ld/emulparams/elf_x86_64_nacl.sh b/ld/emulparams/elf_x86_64_nacl.sh
new file mode 100644 (file)
index 0000000..7c79eee
--- /dev/null
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf_x86_64.sh
+. ${srcdir}/emulparams/elf_nacl.sh
+OUTPUT_FORMAT="elf64-x86-64-nacl"
index 7994b5f..5796b0a 100644 (file)
@@ -40,7 +40,7 @@
 #      NO_RELA_RELOCS - Don't include .rela.* sections in script
 #      NON_ALLOC_DYN - Place dynamic sections after data segment.
 #      TEXT_DYNAMIC - .dynamic in text segment, not data segment.
-#      EMBEDDED - whether this is for an embedded system. 
+#      EMBEDDED - whether this is for an embedded system.
 #      SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
 #              start address of shared library.
 #      INPUT_FILES - INPUT command of files to always include
@@ -53,6 +53,9 @@
 #      OTHER_SYMBOLS - symbols to place right at the end of the script.
 #      ETEXT_NAME - name of a symbol for the end of the text section,
 #              normally etext.
+#      SEPARATE_CODE - if set, .text and similar sections containing
+#              actual machine instructions must be in wholly disjoint
+#              pages from any other data, including headers
 #      SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
 #              so that .got can be in the RELRO area.  It should be set to
 #              the number of bytes in the beginning of .got.plt which can be
@@ -170,7 +173,7 @@ if test -z "${NO_SMALL_DATA}"; then
   SDATA="/* We want the small data sections together, so single-instruction offsets
      can access them all, and initialized data all before uninitialized, so
      we can shorten the on-disk segment size.  */
-  .${SDATA_NAME}        ${RELOCATING-0} : 
+  .${SDATA_NAME}        ${RELOCATING-0} :
   {
     ${RELOCATING+${SDATA_START_SYMBOLS}}
     ${CREATE_SHLIB+*(.${SDATA_NAME}2 .${SDATA_NAME}2.* .gnu.linkonce.s2.*)}
@@ -255,7 +258,7 @@ FINI_ARRAY=".fini_array   ${RELOCATING-0} :
     ${DTORS_IN_FINI_ARRAY}
     ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
   }"
-CTOR=".ctors        ${CONSTRUCTING-0} : 
+CTOR=".ctors        ${CONSTRUCTING-0} :
   {
     ${CONSTRUCTING+${CTOR_START}}
     /* gcc uses crtbegin.o to find the start of
@@ -300,9 +303,15 @@ STACK="  .stack        ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
 TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${TEXT_START_ADDR})"
 SHLIB_TEXT_START_ADDR="SEGMENT_START(\"text-segment\", ${SHLIB_TEXT_START_ADDR:-0})"
 
+if [ -z "$SEPARATE_CODE" ]; then
+  SIZEOF_HEADERS_CODE=" + SIZEOF_HEADERS"
+else
+  SIZEOF_HEADERS_CODE=
+fi
+
 # if this is for an embedded system, don't add SIZEOF_HEADERS.
 if [ -z "$EMBEDDED" ]; then
-   test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
+   test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}${SIZEOF_HEADERS_CODE}"
 else
    test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
 fi
@@ -325,11 +334,19 @@ SECTIONS
 {
   /* Read-only sections, merged into text segment: */
   ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
-  ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR} + SIZEOF_HEADERS;}}
-  ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR} + SIZEOF_HEADERS;}}
+  ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
+  ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
+EOF
+
+emit_early_ro()
+{
+  cat <<EOF
   ${INITIAL_READONLY_SECTIONS}
   .note.gnu.build-id : { *(.note.gnu.build-id) }
 EOF
+}
+
+test -n "${SEPARATE_CODE}" || emit_early_ro
 
 test -n "${RELOCATING+0}" || unset NON_ALLOC_DYN
 test -z "${NON_ALLOC_DYN}" || TEXT_DYNAMIC=
@@ -424,7 +441,8 @@ cat >> ldscripts/dyntmp.$$ <<EOF
   ${OTHER_PLT_RELOC_SECTIONS}
 EOF
 
-if test -z "${NON_ALLOC_DYN}"; then
+emit_dyn()
+{
   if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
     cat ldscripts/dyntmp.$$
   else
@@ -436,11 +454,13 @@ if test -z "${NON_ALLOC_DYN}"; then
     fi
   fi
   rm -f ldscripts/dyntmp.$$
-fi
+}
+
+test -n "${NON_ALLOC_DYN}${SEPARATE_CODE}" || emit_dyn
 
 cat <<EOF
-  .init         ${RELOCATING-0} : 
-  { 
+  .init         ${RELOCATING-0} :
+  {
     ${RELOCATING+${INIT_START}}
     KEEP (*(.init))
     ${RELOCATING+${INIT_END}}
@@ -469,6 +489,21 @@ cat <<EOF
   ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
   ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
   ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
+EOF
+
+if test -n "${SEPARATE_CODE}"; then
+  cat <<EOF
+  /* Adjust the address for the rodata segment.  We want to adjust up to
+     the same address within the page on the next page up.  */
+  ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${RODATA_ADDR-ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))};}}}
+  ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_RODATA_ADDR-ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
+  ${CREATE_PIE+${RELOCATING+. = ${SHLIB_RODATA_ADDR-ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
+EOF
+  emit_early_ro
+  emit_dyn
+fi
+
+cat <<EOF
   ${WRITABLE_RODATA-${RODATA}}
   .${RODATA_NAME}1      ${RELOCATING-0} : { *(.${RODATA_NAME}1) }
   ${CREATE_SHLIB-${SDATA2}}
@@ -565,19 +600,7 @@ cat <<EOF
   ${RELOCATING+${DATA_SEGMENT_END}}
 EOF
 
-if test -n "${NON_ALLOC_DYN}"; then
-  if test -z "${NO_REL_RELOCS}${NO_RELA_RELOCS}"; then
-    cat ldscripts/dyntmp.$$
-  else
-    if test -z "${NO_REL_RELOCS}"; then
-      sed -e '/^[      ]*\.rela\.[^}]*$/,/}/d' -e '/^[         ]*\.rela\./d' ldscripts/dyntmp.$$
-    fi
-    if test -z "${NO_RELA_RELOCS}"; then
-      sed -e '/^[      ]*\.rel\.[^}]*$/,/}/d' -e '/^[  ]*\.rel\./d' ldscripts/dyntmp.$$
-    fi
-  fi
-  rm -f ldscripts/dyntmp.$$
-fi
+test -z "${NON_ALLOC_DYN}" || emit_dyn
 
 cat <<EOF
   /* Stabs debugging sections.  */
index dc8643b..f8d6dc0 100644 (file)
@@ -1,3 +1,135 @@
+2012-04-03  Roland McGrath  <mcgrathr@google.com>
+
+       * ld-x86-64/ilp32-4-nacl.d: New file.
+       * ld-x86-64/x86-64.exp: Run it.
+
+       * ld-discard/discard.exp: Accept nacl targets too.
+       * ld-elf/binutils.exp: Likewise.
+       * ld-elf/comm-data.exp: Likewise.
+       * ld-elf/elf.exp: Likewise.
+       * ld-elf/tls_common.exp: Likewise.
+       * ld-elfvers/vers.exp: Likewise.
+       * ld-elfvsb/elfvsb.exp: Likewise.
+       * ld-elfweak/elfweak.exp: Likewise.
+       * ld-gc/gc.exp: Likewise.
+       * ld-ifunc/binutils.exp: Likewise.
+       * ld-ifunc/ifunc.exp: Likewise.
+       * ld-linkonce/linkonce.exp:Likewise.
+       * ld-pie/pie.exp: Likewise.
+       * ld-shared/shared.exp: Likewise.
+       * ld-undefined/weak-undef.exp: Likewise.
+       * ld-unique/unique.exp: Likewise.
+       * ld-x86-64/dwarfreloc.exp: Likewise.
+       * ld-x86-64/line.exp: Likewise.
+
+       * lib/ld-lib.exp (slurp_options): Support global array
+       options_regsub to apply substitutions to the contents
+       of options lines read from the file.
+       * ld-i386/emit-relocs.d: Renamed to ...
+       * ld-i386/emit-relocs.rd: ... this.
+       * ld-i386/i386.exp: Accept nacl targets too.
+       For them, use options_regsub to replace elf_i386 with
+       elf_i386_nacl in run_dump_test cases; apply the same
+       substitution in $i386tests; replace foo.rd expectations
+       files with foo-nacl.rd in $i386tests.
+       (i386tests): Change emit-relocs.d to emit-relocs.rd here.
+       * ld-i386/emit-relocs-nacl.rd: New file.
+       * ld-i386/plt-nacl.pd: New file.
+       * ld-i386/plt-pic-nacl.pd: New file.
+       * ld-i386/tlsbin-nacl.rd: New file.
+       * ld-i386/tlsbindesc-nacl.rd: New file.
+       * ld-i386/tlsdesc-nacl.rd: New file.
+       * ld-i386/tlsgdesc-nacl.rd: New file.
+       * ld-i386/tlsnopic-nacl.rd: New file.
+       * ld-i386/tlspic-nacl.rd: New file.
+       * ld-x86-64/x86-64.exp: Accept nacl targets too.
+       For them, use options_regsub to replace elf_x86_64 with
+       elf_x86_64_nacl in run_dump_test cases; apply the same
+       substitution in $x86_64tests; replace foo.rd expectations
+       files with foo-nacl.rd in $x86_64tests.
+       Add explicit -melf_x86_64 to ld options in tests that need it,
+       in case the default emulation is x32 (as it is for x86_64-nacl).
+       * ld/testsuite/ld-x86-64/plt-nacl.pd: New file.
+       * ld/testsuite/ld-x86-64/split-by-file-nacl.rd: New file.
+       * ld/testsuite/ld-x86-64/tlsbin-nacl.rd: New file.
+       * ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: New file.
+       * ld/testsuite/ld-x86-64/tlsdesc-nacl.pd: New file.
+       * ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: New file.
+       * ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd: New file.
+       * ld/testsuite/ld-x86-64/tlspic-nacl.rd: New file.
+
+       * ld-i386/hidden2.d: Loosen regexps to match any file format variant,
+       and not to depend on exact addresses, displacements, etc. where
+       they are irrelevant.
+       * ld-i386/pcrel16.d: Likewise.
+       * ld-i386/pcrel16abs.d: Likewise.
+       * ld-i386/pr12718.d: Likewise.
+       * ld-i386/pr12921.d: Likewise.
+       * ld-i386/reloc.d: Likewise.
+       * ld-i386/tlsbin.dd: Likewise.
+       * ld-i386/tlsbin.sd: Likewise.
+       * ld-i386/tlsbin.td: Likewise.
+       * ld-i386/tlsbindesc.dd: Likewise.
+       * ld-i386/tlsbindesc.sd: Likewise.
+       * ld-i386/tlsbindesc.td: Likewise.
+       * ld-i386/tlsdesc.dd: Likewise.
+       * ld-i386/tlsdesc.sd: Likewise.
+       * ld-i386/tlsdesc.td: Likewise.
+       * ld-i386/tlsg.sd: Likewise.
+       * ld-i386/tlsgdesc.dd: Likewise.
+       * ld-i386/tlsindntpoff.dd: Likewise.
+       * ld-i386/tlsnopic.dd: Likewise.
+       * ld-i386/tlsnopic.sd: Likewise.
+       * ld-i386/tlspic.dd: Likewise.
+       * ld-i386/tlspic.sd: Likewise.
+       * ld-i386/tlspic.td: Likewise.
+       * ld-i386/tlspie2.d: Likewise.
+       * ld-x86-64/hidden2.d: Likewise.
+       * ld-x86-64/pcrel16.d: Likewise.
+       * ld-x86-64/pr12718.d: Likewise.
+       * ld-x86-64/pr12921.d: Likewise.
+       * ld-x86-64/protected3.d: Likewise.
+       * ld-x86-64/tlsbin.dd: Likewise.
+       * ld-x86-64/tlsbin.sd: Likewise.
+       * ld-x86-64/tlsbin.td: Likewise.
+       * ld-x86-64/tlsbindesc.dd: Likewise.
+       * ld-x86-64/tlsbindesc.sd: Likewise.
+       * ld-x86-64/tlsbindesc.td: Likewise.
+       * ld-x86-64/tlsdesc.dd: Likewise.
+       * ld-x86-64/tlsdesc.sd: Likewise.
+       * ld-x86-64/tlsdesc.td: Likewise.
+       * ld-x86-64/tlsg.sd: Likewise.
+       * ld-x86-64/tlsgd5.dd: Likewise.
+       * ld-x86-64/tlsgd6.dd: Likewise.
+       * ld-x86-64/tlsgdesc.dd: Likewise.
+       * ld-x86-64/tlspic.dd: Likewise.
+       * ld-x86-64/tlspic.sd: Likewise.
+       * ld-x86-64/tlspic.td: Likewise.
+
+       * ld-x86-64/ilp32-8.d: Match any file format variant.
+       Use a -Ttext and adjust expected results, to handle variant layouts.
+       * ld-x86-64/ilp32-9.d: Likewise.
+
+       * ld-i386/alloc.t: Remove superfluous OUTPUT_FORMAT statement.
+       * ld-i386/pr12627.t: Likewise.
+
+       * ld-x86-64/abs-l1om.d: Add target: constraint.
+       * ld-x86-64/protected2-l1om.d: Likewise.
+       * ld-x86-64/protected3-l1om.d: Likewise.
+       * ld-x86-64/ilp32-4.d: Likewise.
+
+       * ld-x86-64/plt.s: New file.
+       * ld-x86-64/pltlib.s: New file.
+       * ld-x86-64/plt.pd: New file.
+       * ld-x86-64/x86-64.exp (x86_64tests): Add them.
+
+       * ld-i386/plt.s: New file.
+       * ld-i386/pltlib.s: New file.
+       * ld-i386/plt.pd: New file.
+       * ld-i386/plt-pic.s: New file.
+       * ld-i386/plt-pic.pd: New file.
+       * ld-i386/i386.exp (i386tests): Add them.
+
 2012-03-25  Alan Modra  <amodra@gmail.com>
 
        * ld-powerpc/vxworks-relax.rd: Remove check on reloc section
index f1038cd..4fd4c43 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld discard tests
-#   Copyright 2001, 2002, 2005, 2007, 2010 Free Software Foundation, Inc.
+#   Copyright 2001, 2002, 2005, 2007, 2010, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -27,6 +27,7 @@
 
 if { ![istarget *-*-linux*]
      && ![istarget *-*-gnu*]
+     && ![istarget *-*-nacl*]
      && ![istarget hppa*64*-*-hpux*]
      && ![istarget *-*-elf] } {
     return
index 382d50f..4d91105 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for binutils tests
-#   Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#   Copyright 2006, 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -24,6 +24,7 @@
 # Make sure that binutils can correctly handle ld output in ELF.
 
 if { ![istarget *-*-linux*]
+     && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*]} {
     return
 }
@@ -109,13 +110,15 @@ binutils_test strip "-z relro" relro1
 binutils_test strip "-z relro -shared" relro1
 binutils_test objcopy "-z relro" relro1
 binutils_test objcopy "-z relro -shared" relro1
-if { ([istarget "i?86-*-elf*"]         
+if { ([istarget "i?86-*-elf*"]
       || (([istarget "i?86-*-linux*"]
           || [istarget "i?86-*-gnu*"])
          && ![istarget "*-*-*aout*"]
          && ![istarget "*-*-*oldld*"])
       || [istarget "x86_64-*-linux*"]
-      || [istarget "amd64-*-linux*"]) } {
+      || [istarget "amd64-*-linux*"]
+      || [istarget "i?86-*nacl*"]
+      || [istarget "x86_64-*nacl*"]) } {
     binutils_test strip "-z relro -shared" relro2
     binutils_test objcopy "-z relro -shared" relro2
 }
index 3bc8484..2258afb 100644 (file)
@@ -32,6 +32,7 @@ if ![is_elf_format] {
 # Exclude some more targets; feel free to include your favorite one
 # if you like.
 if { ![istarget *-*-linux*]
+     && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*] } {
     return
 }
index 42b5541..e2050fc 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various ELF tests.
-#   Copyright 2002, 2003, 2005, 2007, 2009, 2010, 2011
+#   Copyright 2002, 2003, 2005, 2007, 2009, 2010, 2011, 2012
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -77,6 +77,7 @@ foreach t $test_list {
 }
 
 if { [istarget *-*-linux*]
+     || [istarget *-*-nacl*]
      || [istarget *-*-gnu*] } {
     run_ld_link_tests {
        {"Weak symbols in dynamic objects 1 (support)"
@@ -136,6 +137,7 @@ set xfails [list "*-*-netbsdelf*"]
 run_ld_link_exec_tests $xfails $array_tests
 
 if { [istarget *-*-linux*]
+     || [istarget *-*-nacl*]
      || [istarget *-*-gnu*] } {
     run_ld_link_exec_tests $xfails $array_tests_pie
 }
index 77dca2c..fee4031 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for .tls_common tests
-#   Copyright 2006, 2007, 2010 Free Software Foundation, Inc.
+#   Copyright 2006, 2007, 2010, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -24,6 +24,7 @@
 # Make sure that binutils can correctly handle ld output in ELF.
 
 if { ![istarget *-*-linux*]
+     && ![istarget *-*-nacl*]
      && ![istarget *-*-gnu*] } {
     return
 }
@@ -60,7 +61,7 @@ if { ![ld_simple_link $ld tmpdir/tls_common "tmpdir/tls_common1.o"] } {
        unresolved "tls_common"
     }
     return
-} 
+}
 
 set readelf_output [run_host_cmd "$READELF" "-l --wide tmpdir/tls_common"]
 if ![regexp ".*TLS.*0x0+ 0x0+4 R .*" $readelf_output] then {
index c770c6f..4bea6e4 100644 (file)
@@ -36,6 +36,7 @@ if { ![istarget hppa*64*-*-hpux*]
      && ![istarget i?86-*-elf*]
      && ![istarget i?86-*-linux*]
      && ![istarget i?86-*-gnu*]
+     && ![istarget i?86-*-nacl*]
      && ![istarget ia64-*-elf*]
      && ![istarget ia64-*-linux*]
      && ![istarget m68k-*-linux*]
@@ -51,7 +52,8 @@ if { ![istarget hppa*64*-*-hpux*]
      && ![istarget alpha*-*-linux*]
      && ![istarget s390*-*-linux*]
      && ![istarget sh\[34\]*-*-linux*]
-     && ![istarget x86_64-*-linux*] } {
+     && ![istarget x86_64-*-linux*]
+     && ![istarget x86_64-*-nacl*] } {
     return
 }
 
@@ -119,7 +121,7 @@ proc test_ar { test lib object expect } {
        unresolved "$test"
        return
     }
-    
+
     verbose -log "$nm --print-armap $tmpdir/$lib | grep \" in \" | egrep \"VERS\\|bar\\|foo\" | sort > $tmpdir/nm.out"
 
     catch "exec $nm --print-armap $tmpdir/$lib | grep \\\ in\\\  | egrep VERS\\\|bar\\\|foo | sort > $tmpdir/nm.out" exec_output
@@ -261,7 +263,7 @@ proc objdump_symstuff { objdump object expectfile } {
            perror "$expectfile doesn't exist"
            return 0
        }
-       
+
        if [file exists $tmpdir/objdump.out] then {
            set file_b [open $tmpdir/objdump.out r]
        } else {
@@ -291,11 +293,11 @@ proc objdump_symstuff { objdump object expectfile } {
            }
        }
        close $file_b
-       
+
        for { set i 0 } { $i < [llength $list_a] } { incr i } {
            set line_a [lindex $list_a $i]
            set line_b [lindex $list_b $i]
-           
+
 
            verbose "\t$expectfile: $i: $line_a" 3
            verbose "\t/tmp/objdump.out: $i: $line_b" 3
@@ -304,20 +306,20 @@ proc objdump_symstuff { objdump object expectfile } {
            } else {
                verbose -log "\t$expectfile: $i: $line_a"
                verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
-               
+
                return 0
            }
        }
-       
+
        if { [llength $list_a] != [llength $list_b] } {
            verbose -log "Line count"
            return 0
        }
-       
+
        if $differences<1 then {
            return 1
        }
-       
+
        return 0
     } else {
        verbose -log "$exec_output"
@@ -356,7 +358,7 @@ proc objdump_dynsymstuff { objdump object expectfile } {
            warning "$expectfile doesn't exist"
            return 0
        }
-       
+
        if [file exists $tmpdir/objdump.out] then {
            set file_b [open $tmpdir/objdump.out r]
        } else {
@@ -386,7 +388,7 @@ proc objdump_dynsymstuff { objdump object expectfile } {
            }
        }
        close $file_b
-       
+
        # Support empty files.
        if { ![info exists list_a] && ![info exists list_b] } then {
            return 1
@@ -394,12 +396,12 @@ proc objdump_dynsymstuff { objdump object expectfile } {
 
        for { set i 0 } { $i < [llength $list_b] } { incr i } {
            set line_b [lindex $list_b $i]
-           
+
 # The tests are rigged so that we should never export a symbol with the
 # word 'hide' in it.  Thus we just search for it, and bail if we find it.
            if [regexp "hide" $line_b] then {
                verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
-               
+
                return 0
            }
 
@@ -419,20 +421,20 @@ proc objdump_dynsymstuff { objdump object expectfile } {
 
            if { $j >= [llength $list_a] } {
                verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
-               
+
                return 0
            }
        }
-       
+
        if { [llength $list_a] != [llength $list_b] } {
            verbose -log "Line count"
            return 0
        }
-       
+
        if $differences<1 then {
            return 1
        }
-       
+
        return 0
     } else {
        verbose -log "$exec_output"
@@ -564,7 +566,7 @@ proc build_binary { shared pic test source libname other mapfile verexp versymex
     }
 
     pass $test
-    
+
 }
 
 proc build_executable { test source libname other mapfile verexp versymexp symexp } {
@@ -678,12 +680,12 @@ proc test_strip_vers_lib { test srclib libname verexp versymexp } {
            fail "$test"
            return
        }
-       
+
        if {![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$versymexp ]}     {
            fail "$test"
            return
        }
-       
+
     } else {
        verbose -log "$exec_output"
        fail "$test"
@@ -876,11 +878,11 @@ test_ar "ar with versioned solib" vers13.a vers1.so vers13.asym
 #
 # Strip a shared library, and make sure we didn't screw something up in there.
 #
-test_strip_vers_lib "vers14" vers1.so vers14 vers1.ver vers1.dsym 
+test_strip_vers_lib "vers14" vers1.so vers14 vers1.ver vers1.dsym
 
 
 #
-# Build another test with some versioned symbols.  Here we are going to 
+# Build another test with some versioned symbols.  Here we are going to
 # try and override something from the library, and we shouldn't get
 # any errors.
 #
@@ -912,7 +914,7 @@ build_vers_lib_pic "vers22" vers22.c vers22 "vers22a.so vers22b.so" "" vers22.ve
 
 # Test versioned definitions in different files.
 if [string match "yes" $pic] then {
-    xfail "vers23a" 
+    xfail "vers23a"
     xfail "vers23b"
     xfail "vers23c"
     xfail "vers23d"
index 58bc8f2..e2c1b4c 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-visibility tests
-#   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010
+#   Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2012
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -31,6 +31,7 @@ if { ![istarget hppa*64*-*-hpux*] \
      && ![istarget hppa*-*-linux*] \
      && ![istarget i?86-*-linux*] \
      && ![istarget i?86-*-gnu*] \
+     && ![istarget *-*-nacl*] \
      && ![istarget ia64-*-linux*] \
      && ![istarget m68k-*-linux*] \
      && ![istarget mips*-*-linux*] \
@@ -95,13 +96,13 @@ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
 
 if [istarget arm*-*-linux*] {
     # On ARM section anchors can change the symbol pre-emptability for
-    # non-PIC shared libraries, causing these tests to fail.  Turn section 
+    # non-PIC shared libraries, causing these tests to fail.  Turn section
     # anchors off.
     set SHCFLAG "-fno-section-anchors"
 
-    # On targets that have MOVW the compiler will emit relocations which 
+    # On targets that have MOVW the compiler will emit relocations which
     # the linker doesn't support when compiling -shared without -fpic.  The
-    # test to find out whether we want to XFAIL the non-PIC tests requires 
+    # test to find out whether we want to XFAIL the non-PIC tests requires
     # a compile - so we pre-calculate it here.  We also note that this can
     # only affect arm*-*-*eabi targets as the old ABI doesn't support v7.
     if [istarget arm*-*-*eabi] {
@@ -117,6 +118,7 @@ if [istarget arm*-*-linux*] {
 set support_protected "no"
 
 if { [istarget *-*-linux*]
+     || [istarget *-*-nacl*]
      || [istarget *-*-gnu*] } {
     if [ld_compile "$CC -g $CFLAGS -DPROTECTED_CHECK" $srcdir/$subdir/main.c $tmpdir/main.o] {
       if [ld_simple_link $CC $tmpdir/main "$tmpdir/main.o"] {
@@ -363,7 +365,7 @@ proc visibility_run {visibility} {
 
        # Now compile the code using -fpic.
 
-       if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] 
+       if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
            || ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
            unresolved "visibility ($visibility)"
        } else {
index 1b60b89..91e683b 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-weak tests
-#   Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2010
+#   Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2012
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -49,7 +49,8 @@ if {    ![istarget alpha*-*-linux*]
      && ![istarget sh\[34\]*-*-linux*]
      && ![istarget sparc*-*-elf]
      && ![istarget sparc*-*-solaris2*]
-     && ![istarget sparc*-*-linux*] } {
+     && ![istarget sparc*-*-linux*]
+     && ![istarget *-*-nacl*] } {
     return
 }
 
@@ -110,7 +111,7 @@ proc objdump_symstuff { objdump object expectfile } {
            perror "$expectfile doesn't exist"
            return 0
        }
-       
+
        if [file exists $tmpdir/objdump.out] then {
            set file_b [open $tmpdir/objdump.out r]
        } else {
@@ -140,11 +141,11 @@ proc objdump_symstuff { objdump object expectfile } {
            }
        }
        close $file_b
-       
+
        for { set i 0 } { $i < [llength $list_a] } { incr i } {
            set line_a [lindex $list_a $i]
            set line_b [lindex $list_b $i]
-           
+
 
            verbose "\t$expectfile: $i: $line_a" 3
            verbose "\t/tmp/objdump.out: $i: $line_b" 3
@@ -153,20 +154,20 @@ proc objdump_symstuff { objdump object expectfile } {
            } else {
                verbose -log "\t$expectfile: $i: $line_a"
                verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
-               
+
                return 0
            }
        }
-       
+
        if { [llength $list_a] != [llength $list_b] } {
            verbose -log "Line count"
            return 0
        }
-       
+
        if $differences<1 then {
            return 1
        }
-       
+
        return 0
     } else {
        verbose -log "$exec_output"
@@ -205,7 +206,7 @@ proc objdump_dynsymstuff { objdump object expectfile } {
            warning "$expectfile doesn't exist"
            return 0
        }
-       
+
        if [file exists $tmpdir/objdump.out] then {
            set file_b [open $tmpdir/objdump.out r]
        } else {
@@ -235,15 +236,15 @@ proc objdump_dynsymstuff { objdump object expectfile } {
            }
        }
        close $file_b
-       
+
        for { set i 0 } { $i < [llength $list_b] } { incr i } {
            set line_b [lindex $list_b $i]
-           
+
 # The tests are rigged so that we should never export a symbol with the
 # word 'hide' in it.  Thus we just search for it, and bail if we find it.
            if [regexp "hide" $line_b] then {
                verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
-               
+
                return 0
            }
 
@@ -263,20 +264,20 @@ proc objdump_dynsymstuff { objdump object expectfile } {
 
            if { $j >= [llength $list_a] } {
                verbose -log "\t$tmpdir/objdump.out: $i: $line_b"
-               
+
                return 0
            }
        }
-       
+
        if { [llength $list_a] != [llength $list_b] } {
            verbose -log "Line count"
            return 0
        }
-       
+
        if $differences<1 then {
            return 1
        }
-       
+
        return 0
     } else {
        verbose -log "$exec_output"
index d8d34fa..996eac4 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-gc tests
-#   Copyright 2008, 2009, 2010
+#   Copyright 2008, 2009, 2010, 2012
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -113,6 +113,7 @@ if { [is_elf_format] && [check_shared_lib_support] } then {
 
 if { [is_remote host] || [which $CC] != 0 } {
     if { [istarget "*-*-linux*"]
+        || [istarget "*-*-nacl*"]
         || [istarget "*-*-gnu*"] } {
        ld_compile "$CC -fPIC $CFLAGS $cflags" $srcdir/$subdir/pr11218-1.c tmpdir/pr11218-1.o
        ld_simple_link $ld tmpdir/pr11218-1.so "-shared tmpdir/pr11218-1.o"
index ea7f48c..f7dd17a 100644 (file)
@@ -1,4 +1,3 @@
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 PHDRS {
  text PT_LOAD FLAGS(5); /* R_E */
diff --git a/ld/testsuite/ld-i386/emit-relocs-nacl.rd b/ld/testsuite/ld-i386/emit-relocs-nacl.rd
new file mode 100644 (file)
index 0000000..82472c0
--- /dev/null
@@ -0,0 +1,8 @@
+
+Relocation section '\.rel\.text' at offset .* contains 1 entries:
+ Offset     Info    Type            Sym\.Value  Sym\. Name
+.*  .*04 R_386_PLT32       00000000   foo
+
+Relocation section '\.rel\.plt' at offset .* contains 1 entries:
+ Offset     Info    Type            Sym\.Value  Sym\. Name
+.*  .*07 R_386_JUMP_SLOT   00000000   foo
index 0d800ce..ae5b83b 100644 (file)
@@ -8,6 +8,6 @@
 Disassembly of section .text:
 
 [a-f0-9]+ <bar>:
-[      ]*[a-f0-9]+:    e8 cf fe ff ff          call   0 .*
-[      ]*[a-f0-9]+:    c3                      ret    
+[      ]*[a-f0-9]+:    e8 ([0-9a-f]{2} ){4}\s+call   0 .*
+[      ]*[a-f0-9]+:    c3\s+ret *
 #pass
index ff9db98..d1031c5 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-i386 tests
-#   Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010
+#   Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2012
 #   Free Software Foundation
 #
 # This file is part of the GNU Binutils.
@@ -98,11 +98,13 @@ if [istarget "*-*-go32*"] {
     }
 }
 
-if { !([istarget "i?86-*-elf*"]                
+if { !([istarget "i?86-*-elf*"]
        || (([istarget "i?86-*-linux*"]
            || [istarget "i?86-*-gnu*"])
           && ![istarget "*-*-*aout*"]
           && ![istarget "*-*-*oldld*"])
+       || [istarget "i?86-*-nacl*"]
+       || [istarget "x86_64-*-nacl*"]
        || [istarget "x86_64-*-linux*"]
        || [istarget "amd64-*-linux*"]) } {
     return
@@ -118,6 +120,14 @@ if { !([istarget "i?86-*-elf*"]
 # readelf: Apply readelf options on result.  Compare with regex (last arg).
 
 set i386tests {
+    {"Helper shared library (basic PLT test)"
+      "-shared -melf_i386" "--32" {pltlib.s} {} "libpltlib.so"}
+    {"basic PLT generation (non-PIC)"
+     "-melf_i386 tmpdir/libpltlib.so" "--32" {plt.s}
+     {{objdump -drj.plt plt.pd}} "plt"}
+    {"basic PLT generation (PIC)"
+     "-shared -melf_i386 tmpdir/libpltlib.so" "--32" {plt-pic.s}
+     {{objdump -drj.plt plt-pic.pd}} "libplt-pic.so"}
     {"TLS -fpic -shared transitions"
      "-shared -melf_i386 --no-ld-generated-unwind-info"
      "--32" {tlspic1.s tlspic2.s}
@@ -161,7 +171,7 @@ set i386tests {
     {"Reloc section order" "-shared -melf_i386 -z nocombreloc" "--32"
      {reloc.s} {{objdump -hw reloc.d}} "reloc.so"}
     {"Basic --emit-relocs support" "-shared -melf_i386 --emit-relocs" "--32"
-     {emit-relocs.s} {{readelf --relocs emit-relocs.d}} "emit-relocs.so"}
+     {emit-relocs.s} {{readelf --relocs emit-relocs.rd}} "emit-relocs.so"}
     {"-z combreloc relocation sections" "-shared -melf_i386 -z combreloc"
      "--32" {combreloc.s} {{readelf -r combreloc.d}} "combreloc.so"}
     {"TLS GD->LE transition" "-melf_i386"
@@ -175,6 +185,24 @@ set i386tests {
      {{objdump -dwr tlsie1.dd}} "tlsie1"}
 }
 
+# So as to avoid rewriting every last test case here in a nacl variant,
+# we use black magic to massage the generic cases into nacl-variant cases.
+if [istarget "*-*-nacl*"] {
+    # Change all the -melf_i386 to -melf_i386_nacl so linking can succeed.
+    regsub -all elf_i386 $i386tests elf_i386_nacl i386tests
+
+    # Same, applied to all the run_dump_test cases.
+    set options_regsub(ld) {-melf_i386 -melf_i386_nacl}
+
+    # The section/segment layout differs too much for the vanilla
+    # readelf output files to match.  So massage the cases so that
+    # they refer to a foo-nacl.rd file instead of a foo.rd file.
+    regsub -all {([a-z0-9]+)\.rd} $i386tests {\1-nacl.rd} i386tests
+
+    # Likewise for PLTs.
+    regsub -all -- {([a-z0-9]+)\.pd} $i386tests {\1-nacl.pd} i386tests
+}
+
 run_ld_link_tests $i386tests
 
 run_dump_test "abs"
@@ -206,6 +234,8 @@ run_dump_test "pr12921"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
+       || [istarget "i?86-*-nacl*"]
+       || [istarget "x86_64-*-nacl*"]
        || [istarget "x86_64-*-linux*"]) } {
     return
 }
index 3d45afe..0645d84 100644 (file)
@@ -3,7 +3,7 @@
 #ld: -melf_i386 -Ttext 0x0
 #objdump: -drj.text -m i8086
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
index f4bfca5..501e565 100644 (file)
@@ -3,10 +3,10 @@
 #ld: -melf_i386 -Ttext 0xfffffff0
 #objdump: -drj.text -m i8086
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
 f+0 <_start>:
-f+0:   e9 0d e0[       ]+jmp[  ]+ffffe000 <SEGMENT_SIZE\+0xfffee000>
+f+0:   e9 0d e0[       ]+jmp[  ]+ffffe000 <.*>
 #pass
diff --git a/ld/testsuite/ld-i386/plt-nacl.pd b/ld/testsuite/ld-i386/plt-nacl.pd
new file mode 100644 (file)
index 0000000..0f8e114
--- /dev/null
@@ -0,0 +1,162 @@
+#source: plt.s
+#as: --32
+#ld: -melf_i386_nacl
+#objdump: -drj.plt
+#target: i?86-*-nacl*
+
+.*: +file format .*
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <fn1@plt-0x40>:
+ +[0-9a-f]+:   ff 35 ([0-9a-f]{2} ){4} *       pushl  0x[0-9a-f]+
+ +[0-9a-f]+:   8b 0d ([0-9a-f]{2} ){4} *       mov    0x[0-9a-f]+,%ecx
+ +[0-9a-f]+:   83 e1 e0                and    \$0xffffffe0,%ecx
+ +[0-9a-f]+:   ff e1                   jmp    \*%ecx
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+
+[0-9a-f]+ <fn1@plt>:
+ +[0-9a-f]+:   8b 0d ([0-9a-f]{2} ){4} *       mov    0x[0-9a-f]+,%ecx
+ +[0-9a-f]+:   83 e1 e0                and    \$0xffffffe0,%ecx
+ +[0-9a-f]+:   ff e1                   jmp    \*%ecx
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   68 00 00 00 00          push   \$0x0
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x40>
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+
+[0-9a-f]+ <fn2@plt>:
+ +[0-9a-f]+:   8b 0d ([0-9a-f]{2} ){4} *       mov    0x[0-9a-f]+,%ecx
+ +[0-9a-f]+:   83 e1 e0                and    \$0xffffffe0,%ecx
+ +[0-9a-f]+:   ff e1                   jmp    \*%ecx
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   68 08 00 00 00          push   \$0x8
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x40>
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
diff --git a/ld/testsuite/ld-i386/plt-pic-nacl.pd b/ld/testsuite/ld-i386/plt-pic-nacl.pd
new file mode 100644 (file)
index 0000000..77e8a2a
--- /dev/null
@@ -0,0 +1,168 @@
+#source: plt.s
+#as: --32
+#ld: -shared -melf_i386_nacl
+#objdump: -drj.plt
+#target: i?86-*-nacl*
+
+.*: +file format .*
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <fn1@plt-0x40>:
+ +[0-9a-f]+:   ff 73 04                pushl  0x4\(%ebx\)
+ +[0-9a-f]+:   8b 4b 08                mov    0x8\(%ebx\),%ecx
+ +[0-9a-f]+:   83 e1 e0                and    \$0xffffffe0,%ecx
+ +[0-9a-f]+:   ff e1                   jmp    \*%ecx
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+
+[0-9a-f]+ <fn1@plt>:
+ +[0-9a-f]+:   8b 8b 0c 00 00 00       mov    0xc\(%ebx\),%ecx
+ +[0-9a-f]+:   83 e1 e0                and    \$0xffffffe0,%ecx
+ +[0-9a-f]+:   ff e1                   jmp    \*%ecx
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   68 00 00 00 00          push   \$0x0
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x40>
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+
+[0-9a-f]+ <fn2@plt>:
+ +[0-9a-f]+:   8b 8b 10 00 00 00       mov    0x10\(%ebx\),%ecx
+ +[0-9a-f]+:   83 e1 e0                and    \$0xffffffe0,%ecx
+ +[0-9a-f]+:   ff e1                   jmp    \*%ecx
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   68 08 00 00 00          push   \$0x8
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x40>
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
+ +[0-9a-f]+:   90                      nop
diff --git a/ld/testsuite/ld-i386/plt-pic.pd b/ld/testsuite/ld-i386/plt-pic.pd
new file mode 100644 (file)
index 0000000..5fe2930
--- /dev/null
@@ -0,0 +1,24 @@
+#source: plt.s
+#as: --32
+#ld: -shared -melf_i386
+#objdump: -drj.plt
+#target: i?86-*-*
+
+.*: +file format .*
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <fn1@plt-0x10>:
+ +[0-9a-f]+:   ff b3 04 00 00 00       pushl  0x4\(%ebx\)
+ +[0-9a-f]+:   ff a3 08 00 00 00       jmp    \*0x8\(%ebx\)
+#...
+
+[0-9a-f]+ <fn1@plt>:
+ +[0-9a-f]+:   ff a3 ([0-9a-f]{2} ){4} *       jmp    \*0x[0-9a-f]+\(%ebx\)
+ +[0-9a-f]+:   68 00 00 00 00          push   \$0x0
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x10>
+
+[0-9a-f]+ <fn2@plt>:
+ +[0-9a-f]+:   ff a3 ([0-9a-f]{2} ){4} *       jmp    \*0x[0-9a-f]+\(%ebx\)
+ +[0-9a-f]+:   68 08 00 00 00          push   \$0x8
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x10>
diff --git a/ld/testsuite/ld-i386/plt-pic.s b/ld/testsuite/ld-i386/plt-pic.s
new file mode 100644 (file)
index 0000000..a6f03de
--- /dev/null
@@ -0,0 +1,6 @@
+       .text
+       .globl foo
+       .type foo,@function
+foo:
+       call fn1@plt
+       jmp fn2@plt
diff --git a/ld/testsuite/ld-i386/plt.pd b/ld/testsuite/ld-i386/plt.pd
new file mode 100644 (file)
index 0000000..1b1f57d
--- /dev/null
@@ -0,0 +1,24 @@
+#source: plt.s
+#as: --32
+#ld: -melf_i386
+#objdump: -drj.plt
+#target: i?86-*-*
+
+.*: +file format .*
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <fn1@plt-0x10>:
+ +[0-9a-f]+:   ff 35 ([0-9a-f]{2} ){4} *       pushl  0x[0-9a-f]+
+ +[0-9a-f]+:   ff 25 ([0-9a-f]{2} ){4} *       jmp    \*0x[0-9a-f]+
+#...
+
+[0-9a-f]+ <fn1@plt>:
+ +[0-9a-f]+:   ff 25 ([0-9a-f]{2} ){4} *       jmp    \*0x[0-9a-f]+
+ +[0-9a-f]+:   68 00 00 00 00          push   \$0x0
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x10>
+
+[0-9a-f]+ <fn2@plt>:
+ +[0-9a-f]+:   ff 25 ([0-9a-f]{2} ){4} *       jmp    \*0x[0-9a-f]+
+ +[0-9a-f]+:   68 08 00 00 00          push   \$0x8
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmp    [0-9a-f]+ <fn1@plt-0x10>
diff --git a/ld/testsuite/ld-i386/plt.s b/ld/testsuite/ld-i386/plt.s
new file mode 100644 (file)
index 0000000..3fd01af
--- /dev/null
@@ -0,0 +1,6 @@
+       .text
+       .globl _start
+       .type _start,@function
+_start:
+       call fn1
+       call fn2
diff --git a/ld/testsuite/ld-i386/pltlib.s b/ld/testsuite/ld-i386/pltlib.s
new file mode 100644 (file)
index 0000000..99e2bb4
--- /dev/null
@@ -0,0 +1,10 @@
+       .text
+       .globl fn1
+       .type fn1,@function
+fn1:
+       ret
+
+       .globl fn2
+       .type fn2,@function
+fn2:
+       ret
index d824920..99b64f9 100644 (file)
@@ -1,4 +1,3 @@
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 EXTERN(_start)
 ENTRY(_start)
index 57eea4e..5980aee 100644 (file)
@@ -3,15 +3,15 @@
 #ld: -melf_i386
 #readelf: -S
 
-There are 5 section headers, starting at offset 0x7c:
+There are 5 section headers, starting at offset 0x[0-9a-f]+:
 
 Section Headers:
 \[Nr\] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 \[ 0\]                   NULL            00000000 000000 000000 00      0   0  0
 \[ 1\] .text             PROGBITS        08048054 000054 000006 00  AX  0   0  4
 \[ 2\] .shstrtab         STRTAB          00000000 00005a 000021 00      0   0  1
 \[ 3\] .symtab           SYMTAB          00000000 000144 000070 10      4   2  4
 \[ 4\] .strtab           STRTAB          00000000 0001b4 000024 00      0   0  1
+\[Nr\] Name +Type +Addr +Off +Size +ES +Flg +Lk +Inf +Al
+\[ 0\] +NULL +0+ +0+ +0+ +0+ +0 +0 +0
+\[ 1\] +.text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +000006 00 +AX +0 +0 +4
+\[ 2\] +.shstrtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ +0+ +0 +0 +1
+\[ 3\] +.symtab +SYMTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 10 +4 +2 +4
+\[ 4\] +.strtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 00 +0 +0 +1
 Key to Flags:
   W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\)
   I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
index 4b75888..269c9f9 100644 (file)
@@ -3,17 +3,17 @@
 #ld: -melf_i386
 #readelf: -S --wide
 
-There are 7 section headers, starting at offset 0x204c:
+There are 7 section headers, starting at offset 0x[0-9a-f]+:
 
 Section Headers:
 \[Nr\] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 \[ 0\]                   NULL            00000000 000000 000000 00      0   0  0
 \[ 1\] .text             PROGBITS        08049000 001000 000001 00  AX  0   0 4096
 \[ 2\] .data             PROGBITS        0804b000 002000 000020 00  WA  0   0 4096
 \[ 3\] .bss              NOBITS          0804c000 002020 010000 00  WA  0   0 4096
 \[ 4\] .shstrtab         STRTAB          00000000 002020 00002c 00      0   0  1
 \[ 5\] .symtab           SYMTAB          00000000 002164 0000c0 10      6   6  4
 \[ 6\] .strtab           STRTAB          00000000 002224 000037 00      0   0  1
+\[Nr\] Name +Type +Addr +Off +Size +ES +Flg +Lk +Inf +Al
+\[ 0\] +NULL +0+ +0+ +0+ +0+ +0 +0 +0
+\[ 1\] .text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+1 00 +AX +0 +0 +4096
+\[ 2\] .data +PROGBITS +[0-9a-f]+ +[0-9a-f]+000 +0+20 +00 +WA +0 +0 +4096
+\[ 3\] .bss +NOBITS +[0-9a-f]+ +[0-9a-f]+020 +0+10000 +00 +WA +0 +0 +4096
+\[ 4\] .shstrtab +STRTAB +0+ +[0-9a-f]+ +0+2c +00 +0 +0 +1
+\[ 5\] .symtab +SYMTAB +0+ +[0-9a-f]+ +0+c0 +10 +6 +6 +4
+\[ 6\] .strtab +STRTAB +0+ +[0-9a-f]+ +0+37 +00 +0 +0 +1
 Key to Flags:
   W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\)
   I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
index e559e53..b627451 100644 (file)
@@ -5,7 +5,7 @@
 #ld: -shared -melf_i386 -z nocombreloc
 #objdump: -hw
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 #...
 .*\.relplatypus.*
 #...
diff --git a/ld/testsuite/ld-i386/tlsbin-nacl.rd b/ld/testsuite/ld-i386/tlsbin-nacl.rd
new file mode 100644 (file)
index 0000000..dd3f4fa
--- /dev/null
@@ -0,0 +1,162 @@
+#source: tlsbinpic.s
+#source: tlsbin.s
+#as: --32
+#ld: -melf_i386_nacl tmpdir/libtlslib.so --no-ld-generated-unwind-info
+#readelf: -Ssrl
+#target: i?86-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.plt +.*
+ +\[[ 0-9]+\] \.text +PROGBITS +0+21000 .*
+ +\[[ 0-9]+\] \.interp +.*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rel.dyn +.*
+ +\[[ 0-9]+\] \.rel.plt +.*
+ +\[[ 0-9]+\] \.tdata +PROGBITS +0*10031000 [0-9a-f]+ 000060 00 WAT +0 +0 4096
+ +\[[ 0-9]+\] \.tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ 000040 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.dynamic +DYNAMIC +0*10031060 .*
+ +\[[ 0-9]+\] \.got +PROGBITS +0*10031100 .*
+ +\[[ 0-9]+\] \.got\.plt +PROGBITS +0*10031124 .*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is EXEC \(Executable file\)
+Entry point 0x0*21188
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +PHDR.*
+ +INTERP.*
+.*Requesting program interpreter.*
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +
+ +01 +.interp *
+ +02 +.plt .text *
+ +03 +.interp .hash .dynsym .dynstr .rel.dyn .rel.plt *
+ +04 +.tdata .dynamic .got .got.plt *
+ +05 +.dynamic *
+ +06 +.tdata .tbss *
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG3
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG5
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG7
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sG2
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sG4
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG4
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sG6
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sG1
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG8
+
+Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_JUMP_SLOT +[0-9a-f]+ +___tls_get_addr
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG7
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG8
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +UND ___tls_get_addr
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +11 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +12 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +13 *
+ +[0-9]+: 00000020 +0 +TLS +LOCAL +DEFAULT +9 sl1
+ +[0-9]+: 00000024 +0 +TLS +LOCAL +DEFAULT +9 sl2
+ +[0-9]+: 00000028 +0 +TLS +LOCAL +DEFAULT +9 sl3
+ +[0-9]+: 0000002c +0 +TLS +LOCAL +DEFAULT +9 sl4
+ +[0-9]+: 00000030 +0 +TLS +LOCAL +DEFAULT +9 sl5
+ +[0-9]+: 00000034 +0 +TLS +LOCAL +DEFAULT +9 sl6
+ +[0-9]+: 00000038 +0 +TLS +LOCAL +DEFAULT +9 sl7
+ +[0-9]+: 0000003c +0 +TLS +LOCAL +DEFAULT +9 sl8
+ +[0-9]+: 00000080 +0 +TLS +LOCAL +DEFAULT +10 bl1
+ +[0-9]+: 00000084 +0 +TLS +LOCAL +DEFAULT +10 bl2
+ +[0-9]+: 00000088 +0 +TLS +LOCAL +DEFAULT +10 bl3
+ +[0-9]+: 0000008c +0 +TLS +LOCAL +DEFAULT +10 bl4
+ +[0-9]+: 00000090 +0 +TLS +LOCAL +DEFAULT +10 bl5
+ +[0-9]+: 00000094 +0 +TLS +LOCAL +DEFAULT +10 bl6
+ +[0-9]+: 00000098 +0 +TLS +LOCAL +DEFAULT +10 bl7
+ +[0-9]+: 0000009c +0 +TLS +LOCAL +DEFAULT +10 bl8
+ +[0-9]+: 0*10031060 +0 +OBJECT +LOCAL +DEFAULT +11 _DYNAMIC
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +13 _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0000001c +0 +TLS +GLOBAL +DEFAULT +9 sg8
+ +[0-9]+: 0000007c +0 +TLS +GLOBAL +DEFAULT +10 bg8
+ +[0-9]+: 00000074 +0 +TLS +GLOBAL +DEFAULT +10 bg6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 00000068 +0 +TLS +GLOBAL +DEFAULT +10 bg3
+ +[0-9]+: 00000008 +0 +TLS +GLOBAL +DEFAULT +9 sg3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG7
+ +[0-9]+: 00000048 +0 +TLS +GLOBAL +HIDDEN +9 sh3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0000000c +0 +TLS +GLOBAL +DEFAULT +9 sg4
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: 00000010 +0 +TLS +GLOBAL +DEFAULT +9 sg5
+ +[0-9]+: 00000070 +0 +TLS +GLOBAL +DEFAULT +10 bg5
+ +[0-9]+: 00000058 +0 +TLS +GLOBAL +HIDDEN +9 sh7
+ +[0-9]+: 0000005c +0 +TLS +GLOBAL +HIDDEN +9 sh8
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +9 sg1
+ +[0-9]+: 0+21188 +0 +FUNC +GLOBAL +DEFAULT +2 _start
+ +[0-9]+: 0000004c +0 +TLS +GLOBAL +HIDDEN +9 sh4
+ +[0-9]+: 00000078 +0 +TLS +GLOBAL +DEFAULT +10 bg7
+ +[0-9]+: 00000050 +0 +TLS +GLOBAL +HIDDEN +9 sh5
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: 0+21000 +0 +FUNC +GLOBAL +DEFAULT +2 fn2
+ +[0-9]+: 00000004 +0 +TLS +GLOBAL +DEFAULT +9 sg2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: 00000040 +0 +TLS +GLOBAL +HIDDEN +9 sh1
+ +[0-9]+: 00000014 +0 +TLS +GLOBAL +DEFAULT +9 sg6
+ +[0-9]+: 00000018 +0 +TLS +GLOBAL +DEFAULT +9 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 00000044 +0 +TLS +GLOBAL +HIDDEN +9 sh2
+ +[0-9]+: 00000054 +0 +TLS +GLOBAL +HIDDEN +9 sh6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG8
+ +[0-9]+: 00000064 +0 +TLS +GLOBAL +DEFAULT +10 bg2
+ +[0-9]+: 00000060 +0 +TLS +GLOBAL +DEFAULT +10 bg1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +UND ___tls_get_addr
+ +[0-9]+: 0000006c +0 +TLS +GLOBAL +DEFAULT +10 bg4
index 6f6c0e4..c0f5103 100644 (file)
 # 0x60         -0x40           bg1..bg8
 # 0x80         -0x20           bl1..bl8
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
-0+8049000 <fn2>:
8049000:      55[     ]+push   %ebp
8049001:      89 e5[  ]+mov    %esp,%ebp
8049003:      53[     ]+push   %ebx
8049004:      50[     ]+push   %eax
8049005:      e8 00 00 00 00[         ]+call   804900a <fn2\+0xa>
804900a:      5b[     ]+pop    %ebx
804900b:      81 c3 1a 11 00 00[      ]+add    \$0x111a,%ebx
8049011:      90[     ]+nop *
8049012:      90[     ]+nop *
8049013:      90[     ]+nop *
8049014:      90[     ]+nop *
+[0-9a-f]+ <fn2>:
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   53[     ]+push   %ebx
+[0-9a-f]+:   50[     ]+push   %eax
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <fn2\+0xa>
+[0-9a-f]+:   5b[     ]+pop    %ebx
+[0-9a-f]+:   81 c3 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]+,%ebx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable
8049015:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804901b:      2b 83 f8 ff ff ff[      ]+sub    -0x8\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 f8 ff ff ff[      ]+sub    -0x8\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG1
8049021:      90[     ]+nop *
8049022:      90[     ]+nop *
8049023:      90[     ]+nop *
8049024:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through @gottpoff too
8049025:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804902b:      2b 83 e8 ff ff ff[      ]+sub    -0x18\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 e8 ff ff ff[      ]+sub    -0x18\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG2
8049031:      90[     ]+nop *
8049032:      90[     ]+nop *
8049033:      90[     ]+nop *
8049034:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through @gotntpoff too
8049035:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804903b:      03 83 dc ff ff ff[      ]+add    -0x24\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 dc ff ff ff[      ]+add    -0x24\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG3
8049041:      90[     ]+nop *
8049042:      90[     ]+nop *
8049043:      90[     ]+nop *
8049044:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through @gottpoff and @gotntpoff too
8049045:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804904b:      2b 83 ec ff ff ff[      ]+sub    -0x14\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 ec ff ff ff[      ]+sub    -0x14\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG4
8049051:      90[     ]+nop *
8049052:      90[     ]+nop *
8049053:      90[     ]+nop *
8049054:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with global variable defined in executable
8049055:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804905b:      81 e8 00 10 00 00[      ]+sub    \$0x1000,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   81 e8 00 10 00 00[      ]+sub    \$0x1000,%eax
 #                                                      sg1
8049061:      90[     ]+nop *
8049062:      90[     ]+nop *
8049063:      90[     ]+nop *
8049064:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with local variable defined in executable
8049065:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804906b:      81 e8 e0 0f 00 00[      ]+sub    \$0xfe0,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   81 e8 e0 0f 00 00[      ]+sub    \$0xfe0,%eax
 #                                                      sl1
8049071:      90[     ]+nop *
8049072:      90[     ]+nop *
8049073:      90[     ]+nop *
8049074:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with hidden variable defined in executable
8049075:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804907b:      81 e8 c0 0f 00 00[      ]+sub    \$0xfc0,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   81 e8 c0 0f 00 00[      ]+sub    \$0xfc0,%eax
 #                                                      sh1
8049081:      90[     ]+nop *
8049082:      90[     ]+nop *
8049083:      90[     ]+nop *
8049084:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE
8049085:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804908b:      90[     ]+nop *
804908c:      8d 74 26 00[    ]+lea    0x0\(%esi,%eiz,1\),%esi
8049090:      90[     ]+nop *
8049091:      90[     ]+nop *
8049092:      8d 90 20 f0 ff ff[      ]+lea    -0xfe0\(%eax\),%edx
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 74 26 00[    ]+lea    0x0\(%esi,%eiz,1\),%esi
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 20 f0 ff ff[      ]+lea    -0xfe0\(%eax\),%edx
 #                                                      sl1
8049098:      90[     ]+nop *
8049099:      90[     ]+nop *
804909a:      8d 88 24 f0 ff ff[      ]+lea    -0xfdc\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 24 f0 ff ff[      ]+lea    -0xfdc\(%eax\),%ecx
 #                                                      sl2
80490a0:      90[     ]+nop *
80490a1:      90[     ]+nop *
80490a2:      90[     ]+nop *
80490a3:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE against hidden variables
80490a4:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
80490aa:      90[     ]+nop *
80490ab:      8d 74 26 00[    ]+lea    0x0\(%esi,%eiz,1\),%esi
80490af:      90[     ]+nop *
80490b0:      90[     ]+nop *
80490b1:      8d 90 40 f0 ff ff[      ]+lea    -0xfc0\(%eax\),%edx
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 74 26 00[    ]+lea    0x0\(%esi,%eiz,1\),%esi
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 40 f0 ff ff[      ]+lea    -0xfc0\(%eax\),%edx
 #                                                      sh1
80490b7:      90[     ]+nop *
80490b8:      90[     ]+nop *
80490b9:      8d 88 44 f0 ff ff[      ]+lea    -0xfbc\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 44 f0 ff ff[      ]+lea    -0xfbc\(%eax\),%ecx
 #                                                      sh2
80490bf:      90[     ]+nop *
80490c0:      90[     ]+nop *
80490c1:      90[     ]+nop *
80490c2:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
80490c3:      65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
80490ca:      90[     ]+nop *
80490cb:      90[     ]+nop *
80490cc:      2b 8b e8 ff ff ff[      ]+sub    -0x18\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b e8 ff ff ff[      ]+sub    -0x18\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     sG2
80490d2:      90[     ]+nop *
80490d3:      90[     ]+nop *
80490d4:      90[     ]+nop *
80490d5:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
80490d6:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
80490dc:      90[     ]+nop *
80490dd:      90[     ]+nop *
80490de:      2b 83 ec ff ff ff[      ]+sub    -0x14\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 ec ff ff ff[      ]+sub    -0x14\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG4
80490e4:      90[     ]+nop *
80490e5:      90[     ]+nop *
80490e6:      90[     ]+nop *
80490e7:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
80490e8:      65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
80490ef:      90[     ]+nop *
80490f0:      90[     ]+nop *
80490f1:      03 8b dc ff ff ff[      ]+add    -0x24\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b dc ff ff ff[      ]+add    -0x24\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sG3
80490f7:      90[     ]+nop *
80490f8:      90[     ]+nop *
80490f9:      90[     ]+nop *
80490fa:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
80490fb:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
8049101:      90[     ]+nop *
8049102:      90[     ]+nop *
8049103:      03 83 f0 ff ff ff[      ]+add    -0x10\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 f0 ff ff ff[      ]+add    -0x10\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG4
8049109:      90[     ]+nop *
804910a:      90[     ]+nop *
804910b:      90[     ]+nop *
804910c:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against global var defined in exec
804910d:      65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
8049114:      90[     ]+nop *
8049115:      90[     ]+nop *
8049116:      81 e9 00 10 00 00[      ]+sub    \$0x1000,%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 e9 00 10 00 00[      ]+sub    \$0x1000,%ecx
 #                                                      sg1
804911c:      90[     ]+nop *
804911d:      90[     ]+nop *
804911e:      90[     ]+nop *
804911f:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE -> LE against local var
8049120:      65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
8049127:      90[     ]+nop *
8049128:      90[     ]+nop *
8049129:      81 c0 20 f0 ff ff[      ]+add    \$0xfffff020,%eax
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 20 f0 ff ff[      ]+add    \$0xfffff020,%eax
 #                                                      sl1
804912f:      90[     ]+nop *
8049130:      90[     ]+nop *
8049131:      90[     ]+nop *
8049132:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against hidden var
8049133:      65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
804913a:      90[     ]+nop *
804913b:      90[     ]+nop *
804913c:      81 e9 c0 0f 00 00[      ]+sub    \$0xfc0,%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 e9 c0 0f 00 00[      ]+sub    \$0xfc0,%ecx
 #                                                      sh1
8049142:      90[     ]+nop *
8049143:      90[     ]+nop *
8049144:      90[     ]+nop *
8049145:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %gs
 #  @gotntpoff IE against global var
8049146:      8b 8b e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%ecx
+[0-9a-f]+:   8b 8b e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sG5
804914c:      90[     ]+nop *
804914d:      90[     ]+nop *
804914e:      65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
8049151:      90[     ]+nop *
8049152:      90[     ]+nop *
8049153:      90[     ]+nop *
8049154:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE->LE against local var
8049155:      c7 c0 30 f0 ff ff[      ]+mov    \$0xfffff030,%eax
+[0-9a-f]+:   c7 c0 30 f0 ff ff[      ]+mov    \$0xfffff030,%eax
 #                                                      sl5
804915b:      90[     ]+nop *
804915c:      90[     ]+nop *
804915d:      65 8b 10[       ]+mov    %gs:\(%eax\),%edx
8049160:      90[     ]+nop *
8049161:      90[     ]+nop *
8049162:      90[     ]+nop *
8049163:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 10[       ]+mov    %gs:\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE->LE against hidden var
8049164:      c7 c2 50 f0 ff ff[      ]+mov    \$0xfffff050,%edx
+[0-9a-f]+:   c7 c2 50 f0 ff ff[      ]+mov    \$0xfffff050,%edx
 #                                                      sh5
804916a:      90[     ]+nop *
804916b:      90[     ]+nop *
804916c:      65 8b 12[       ]+mov    %gs:\(%edx\),%edx
804916f:      90[     ]+nop *
8049170:      90[     ]+nop *
8049171:      90[     ]+nop *
8049172:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 12[       ]+mov    %gs:\(%edx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable
8049173:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
8049179:      2b 83 f8 ff ff ff[      ]+sub    -0x8\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 f8 ff ff ff[      ]+sub    -0x8\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG1
804917f:      90[     ]+nop *
8049180:      90[     ]+nop *
8049181:      90[     ]+nop *
8049182:      90[     ]+nop *
8049183:      8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
8049186:      c9[     ]+leave *
8049187:      c3[     ]+ret *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
 
-0+8049188 <_start>:
8049188:      55[     ]+push   %ebp
8049189:      89 e5[  ]+mov    %esp,%ebp
804918b:      e8 00 00 00 00[         ]+call   8049190 <_start\+0x8>
8049190:      59[     ]+pop    %ecx
8049191:      81 c1 94 0f 00 00[      ]+add    \$0xf94,%ecx
8049197:      90[     ]+nop *
8049198:      90[     ]+nop *
8049199:      90[     ]+nop *
804919a:      90[     ]+nop *
+[0-9a-f]+ <_start>:
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <_start\+0x8>
+[0-9a-f]+:   59[     ]+pop    %ecx
+[0-9a-f]+:   81 c1 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]*f94,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
804919b:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
80491a2:      90[     ]+nop *
80491a3:      90[     ]+nop *
80491a4:      2b 91 f4 ff ff ff[      ]+sub    -0xc\(%ecx\),%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 91 f4 ff ff ff[      ]+sub    -0xc\(%ecx\),%edx
 #                              ->R_386_TLS_TPOFF32     sG6
80491aa:      90[     ]+nop *
80491ab:      90[     ]+nop *
80491ac:      90[     ]+nop *
80491ad:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE against global var
80491ae:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
80491b4:      90[     ]+nop *
80491b5:      90[     ]+nop *
80491b6:      03 05 08 a1 04 08[      ]+add    0x804a108,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 05 ([0-9a-f]{2} ){4}[        ]+add    0x[0-9a-f]+108,%eax
 #                              ->R_386_TLS_TPOFF       sG7
80491bc:      90[     ]+nop *
80491bd:      90[     ]+nop *
80491be:      90[     ]+nop *
80491bf:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE against global var
80491c0:      8b 15 20 a1 04 08[      ]+mov    0x804a120,%edx
+[0-9a-f]+:   8b 15 ([0-9a-f]{2} ){4}[        ]+mov    0x[0-9a-f]+120,%edx
 #                              ->R_386_TLS_TPOFF       sG8
80491c6:      90[     ]+nop *
80491c7:      90[     ]+nop *
80491c8:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
80491cb:      90[     ]+nop *
80491cc:      90[     ]+nop *
80491cd:      90[     ]+nop *
80491ce:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against global var defined in exec
80491cf:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
80491d6:      90[     ]+nop *
80491d7:      90[     ]+nop *
80491d8:      81 ea 8c 0f 00 00[      ]+sub    \$0xf8c,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 ea 8c 0f 00 00[      ]+sub    \$0xf8c,%edx
 #                                                      bg6
80491de:      90[     ]+nop *
80491df:      90[     ]+nop *
80491e0:      90[     ]+nop *
80491e1:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE -> LE against global var defined in exec
80491e2:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
80491e8:      90[     ]+nop *
80491e9:      90[     ]+nop *
80491ea:      81 c0 78 f0 ff ff[      ]+add    \$0xfffff078,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 78 f0 ff ff[      ]+add    \$0xfffff078,%eax
 #                                                      bg7
80491f0:      90[     ]+nop *
80491f1:      90[     ]+nop *
80491f2:      90[     ]+nop *
80491f3:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE -> LE against global var defined
 #  in exec
80491f4:      c7 c2 7c f0 ff ff[      ]+mov    \$0xfffff07c,%edx
+[0-9a-f]+:   c7 c2 7c f0 ff ff[      ]+mov    \$0xfffff07c,%edx
 #                                                      bg8
80491fa:      90[     ]+nop *
80491fb:      90[     ]+nop *
80491fc:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
80491ff:      90[     ]+nop *
8049200:      90[     ]+nop *
8049201:      90[     ]+nop *
8049202:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against local var
8049203:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
804920a:      90[     ]+nop *
804920b:      90[     ]+nop *
804920c:      81 ea 6c 0f 00 00[      ]+sub    \$0xf6c,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 ea 6c 0f 00 00[      ]+sub    \$0xf6c,%edx
 #                                                      bl6
8049212:      90[     ]+nop *
8049213:      90[     ]+nop *
8049214:      90[     ]+nop *
8049215:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE -> LE against local var
8049216:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
804921c:      90[     ]+nop *
804921d:      90[     ]+nop *
804921e:      81 c0 98 f0 ff ff[      ]+add    \$0xfffff098,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 98 f0 ff ff[      ]+add    \$0xfffff098,%eax
 #                                                      bl7
8049224:      90[     ]+nop *
8049225:      90[     ]+nop *
8049226:      90[     ]+nop *
8049227:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE -> LE against local var
8049228:      c7 c2 9c f0 ff ff[      ]+mov    \$0xfffff09c,%edx
+[0-9a-f]+:   c7 c2 9c f0 ff ff[      ]+mov    \$0xfffff09c,%edx
 #                                                      bl8
804922e:      90[     ]+nop *
804922f:      90[     ]+nop *
8049230:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
8049233:      90[     ]+nop *
8049234:      90[     ]+nop *
8049235:      90[     ]+nop *
8049236:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against hidden but not local var
8049237:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
804923e:      90[     ]+nop *
804923f:      90[     ]+nop *
8049240:      81 ea ac 0f 00 00[      ]+sub    \$0xfac,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 ea ac 0f 00 00[      ]+sub    \$0xfac,%edx
 #                                                      sh6
8049246:      90[     ]+nop *
8049247:      90[     ]+nop *
8049248:      90[     ]+nop *
8049249:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE -> LE against hidden but not local var
804924a:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
8049250:      90[     ]+nop *
8049251:      90[     ]+nop *
8049252:      81 c0 58 f0 ff ff[      ]+add    \$0xfffff058,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 58 f0 ff ff[      ]+add    \$0xfffff058,%eax
 #                                                      sh7
8049258:      90[     ]+nop *
8049259:      90[     ]+nop *
804925a:      90[     ]+nop *
804925b:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE -> LE against hidden but not
 #  local var
804925c:      c7 c2 5c f0 ff ff[      ]+mov    \$0xfffff05c,%edx
+[0-9a-f]+:   c7 c2 5c f0 ff ff[      ]+mov    \$0xfffff05c,%edx
 #                                                      sh8
8049262:      90[     ]+nop *
8049263:      90[     ]+nop *
8049264:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
8049267:      90[     ]+nop *
8049268:      90[     ]+nop *
8049269:      90[     ]+nop *
804926a:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, global var defined in exec
804926b:      ba 00 10 00 00[         ]+mov    \$0x1000,%edx
+[0-9a-f]+:   ba 00 10 00 00[         ]+mov    \$0x1000,%edx
 #                                                      sg1
8049270:      90[     ]+nop *
8049271:      90[     ]+nop *
8049272:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
8049278:      90[     ]+nop *
8049279:      90[     ]+nop *
804927a:      29 d0[  ]+sub    %edx,%eax
804927c:      90[     ]+nop *
804927d:      90[     ]+nop *
804927e:      90[     ]+nop *
804927f:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 d0[  ]+sub    %edx,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, local var
8049280:      b8 7f 0f 00 00[         ]+mov    \$0xf7f,%eax
+[0-9a-f]+:   b8 7f 0f 00 00[         ]+mov    \$0xf7f,%eax
 #                                                      bl1+1
8049285:      90[     ]+nop *
8049286:      90[     ]+nop *
8049287:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
804928e:      90[     ]+nop *
804928f:      90[     ]+nop *
8049290:      29 c2[  ]+sub    %eax,%edx
8049292:      90[     ]+nop *
8049293:      90[     ]+nop *
8049294:      90[     ]+nop *
8049295:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 c2[  ]+sub    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, hidden var defined in exec
8049296:      b8 bd 0f 00 00[         ]+mov    \$0xfbd,%eax
+[0-9a-f]+:   b8 bd 0f 00 00[         ]+mov    \$0xfbd,%eax
 #                                                      sh1+3
804929b:      90[     ]+nop *
804929c:      90[     ]+nop *
804929d:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
80492a4:      90[     ]+nop *
80492a5:      90[     ]+nop *
80492a6:      29 c2[  ]+sub    %eax,%edx
80492a8:      90[     ]+nop *
80492a9:      90[     ]+nop *
80492aa:      90[     ]+nop *
80492ab:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 c2[  ]+sub    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, global var defined in exec
80492ac:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
80492b2:      90[     ]+nop *
80492b3:      90[     ]+nop *
80492b4:      8d 90 04 f0 ff ff[      ]+lea    -0xffc\(%eax\),%edx
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 04 f0 ff ff[      ]+lea    -0xffc\(%eax\),%edx
 #                                                      sg2
80492ba:      90[     ]+nop *
80492bb:      90[     ]+nop *
80492bc:      90[     ]+nop *
80492bd:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, local var, non-canonical sequence
80492be:      b8 86 f0 ff ff[         ]+mov    \$0xfffff086,%eax
+[0-9a-f]+:   b8 86 f0 ff ff[         ]+mov    \$0xfffff086,%eax
 #                                                      bl2+2
80492c3:      90[     ]+nop *
80492c4:      90[     ]+nop *
80492c5:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
80492cc:      90[     ]+nop *
80492cd:      90[     ]+nop *
80492ce:      01 c2[  ]+add    %eax,%edx
80492d0:      90[     ]+nop *
80492d1:      90[     ]+nop *
80492d2:      90[     ]+nop *
80492d3:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   01 c2[  ]+add    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, hidden var defined in exec, non-canonical sequence
80492d4:      65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
80492db:      90[     ]+nop *
80492dc:      90[     ]+nop *
80492dd:      81 c2 45 f0 ff ff[      ]+add    \$0xfffff045,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c2 45 f0 ff ff[      ]+add    \$0xfffff045,%edx
 #                                                      sh2+1
80492e3:      90[     ]+nop *
80492e4:      90[     ]+nop *
80492e5:      90[     ]+nop *
80492e6:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, global var defined in exec
80492e7:      65 a1 08 f0 ff ff[      ]+mov    %gs:0xfffff008,%eax
+[0-9a-f]+:   65 a1 08 f0 ff ff[      ]+mov    %gs:0xfffff008,%eax
 #                                                      sg3
80492ed:      90[     ]+nop *
80492ee:      90[     ]+nop *
80492ef:      90[     ]+nop *
80492f0:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, local var
80492f1:      65 8b 15 8b f0 ff ff[   ]+mov    %gs:0xfffff08b,%edx
+[0-9a-f]+:   65 8b 15 8b f0 ff ff[   ]+mov    %gs:0xfffff08b,%edx
 #                                                      bl3+3
80492f8:      90[     ]+nop *
80492f9:      90[     ]+nop *
80492fa:      90[     ]+nop *
80492fb:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, hidden var defined in exec
80492fc:      65 8b 15 49 f0 ff ff[   ]+mov    %gs:0xfffff049,%edx
+[0-9a-f]+:   65 8b 15 49 f0 ff ff[   ]+mov    %gs:0xfffff049,%edx
 #                                                      sh3+1
8049303:      90[     ]+nop *
8049304:      90[     ]+nop *
8049305:      90[     ]+nop *
8049306:      90[     ]+nop *
8049307:      8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
804930a:      c9[     ]+leave *
804930b:      c3[     ]+ret *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
index 99dc4c5..4e14b24 100644 (file)
@@ -5,9 +5,9 @@
 #objdump: -sj.got
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.got:
804a100 [0-9a-f]+ 00000000 00000000 [0-9a-f]+  .*
804a110 00000000 00000000 00000000 00000000  .*
804a120 00000000  +.*
[0-9a-f]+100 [0-9a-f]+ 00000000 00000000 [0-9a-f]+  .*
[0-9a-f]+110 00000000 00000000 00000000 00000000  .*
[0-9a-f]+120 00000000  +.*
index a1ed433..d960295 100644 (file)
@@ -5,12 +5,12 @@
 #objdump: -sj.tdata
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.tdata:
804a000 11000000 12000000 13000000 14000000  .*
804a010 15000000 16000000 17000000 18000000  .*
804a020 41000000 42000000 43000000 44000000  .*
804a030 45000000 46000000 47000000 48000000  .*
804a040 01010000 02010000 03010000 04010000  .*
804a050 05010000 06010000 07010000 08010000  .*
[0-9a-f]+000 11000000 12000000 13000000 14000000  .*
[0-9a-f]+010 15000000 16000000 17000000 18000000  .*
[0-9a-f]+020 41000000 42000000 43000000 44000000  .*
[0-9a-f]+030 45000000 46000000 47000000 48000000  .*
[0-9a-f]+040 01010000 02010000 03010000 04010000  .*
[0-9a-f]+050 05010000 06010000 07010000 08010000  .*
diff --git a/ld/testsuite/ld-i386/tlsbindesc-nacl.rd b/ld/testsuite/ld-i386/tlsbindesc-nacl.rd
new file mode 100644 (file)
index 0000000..cad0bc5
--- /dev/null
@@ -0,0 +1,153 @@
+#source: tlsbindesc.s
+#source: tlsbin.s
+#as: --32
+#ld: -melf_i386_nacl tmpdir/libtlslib.so --no-ld-generated-unwind-info
+#readelf: -Ssrl
+#target: i?86-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.text +PROGBITS +0+20000 .*
+ +\[[ 0-9]+\] \.interp +.*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rel.dyn +.*
+ +\[[ 0-9]+\] \.tdata +PROGBITS +0*10031000 [0-9a-f]+ 000060 00 WAT +0 +0 4096
+ +\[[ 0-9]+\] \.tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ 000040 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.dynamic +DYNAMIC +0*10031060 .*
+ +\[[ 0-9]+\] \.got +PROGBITS +0*100310e0 .*
+ +\[[ 0-9]+\] \.got\.plt +PROGBITS +0*10031104 .*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is EXEC \(Executable file\)
+Entry point 0x0*20158
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +PHDR.*
+ +INTERP.*
+.*Requesting program interpreter.*
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +
+ +01 +.interp *
+ +02 +.text *
+ +03 +.interp .hash .dynsym .dynstr .rel.dyn *
+ +04 +.tdata .dynamic .got .got.plt *
+ +05 +.dynamic *
+ +06 +.tdata .tbss *
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+0*100310e0 +0000010e R_386_TLS_TPOFF +0+ +sG3
+0*100310e4 +0000020e R_386_TLS_TPOFF +0+ +sG5
+0*100310e8 +0000030e R_386_TLS_TPOFF +0+ +sG7
+0*100310ec +00000425 R_386_TLS_TPOFF32 0+ +sG2
+0*100310f0 +00000525 R_386_TLS_TPOFF32 0+ +sG4
+0*100310f4 +0000050e R_386_TLS_TPOFF +0+ +sG4
+0*100310f8 +00000725 R_386_TLS_TPOFF32 0+ +sG6
+0*100310fc +00000825 R_386_TLS_TPOFF32 0+ +sG1
+0*10031100 +00000b0e R_386_TLS_TPOFF +0+ +sG8
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG7
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG8
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +11 *
+ +[0-9]+: 00000020 +0 +TLS +LOCAL +DEFAULT +7 sl1
+ +[0-9]+: 00000024 +0 +TLS +LOCAL +DEFAULT +7 sl2
+ +[0-9]+: 00000028 +0 +TLS +LOCAL +DEFAULT +7 sl3
+ +[0-9]+: 0000002c +0 +TLS +LOCAL +DEFAULT +7 sl4
+ +[0-9]+: 00000030 +0 +TLS +LOCAL +DEFAULT +7 sl5
+ +[0-9]+: 00000034 +0 +TLS +LOCAL +DEFAULT +7 sl6
+ +[0-9]+: 00000038 +0 +TLS +LOCAL +DEFAULT +7 sl7
+ +[0-9]+: 0000003c +0 +TLS +LOCAL +DEFAULT +7 sl8
+ +[0-9]+: 00000080 +0 +TLS +LOCAL +DEFAULT +8 bl1
+ +[0-9]+: 00000084 +0 +TLS +LOCAL +DEFAULT +8 bl2
+ +[0-9]+: 00000088 +0 +TLS +LOCAL +DEFAULT +8 bl3
+ +[0-9]+: 0000008c +0 +TLS +LOCAL +DEFAULT +8 bl4
+ +[0-9]+: 00000090 +0 +TLS +LOCAL +DEFAULT +8 bl5
+ +[0-9]+: 00000094 +0 +TLS +LOCAL +DEFAULT +8 bl6
+ +[0-9]+: 00000098 +0 +TLS +LOCAL +DEFAULT +8 bl7
+ +[0-9]+: 0000009c +0 +TLS +LOCAL +DEFAULT +8 bl8
+ +[0-9]+: 00001000 +0 +TLS +LOCAL +DEFAULT +7 _TLS_MODULE_BASE_
+ +[0-9]+: 0*10031060 +0 +OBJECT +LOCAL +DEFAULT +9 _DYNAMIC
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0000001c +0 +TLS +GLOBAL +DEFAULT +7 sg8
+ +[0-9]+: 0000007c +0 +TLS +GLOBAL +DEFAULT +8 bg8
+ +[0-9]+: 00000074 +0 +TLS +GLOBAL +DEFAULT +8 bg6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 00000068 +0 +TLS +GLOBAL +DEFAULT +8 bg3
+ +[0-9]+: 00000008 +0 +TLS +GLOBAL +DEFAULT +7 sg3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG7
+ +[0-9]+: 00000048 +0 +TLS +GLOBAL +HIDDEN +7 sh3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0000000c +0 +TLS +GLOBAL +DEFAULT +7 sg4
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: 00000010 +0 +TLS +GLOBAL +DEFAULT +7 sg5
+ +[0-9]+: 00000070 +0 +TLS +GLOBAL +DEFAULT +8 bg5
+ +[0-9]+: 00000058 +0 +TLS +GLOBAL +HIDDEN +7 sh7
+ +[0-9]+: 0000005c +0 +TLS +GLOBAL +HIDDEN +7 sh8
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1
+ +[0-9]+: 0+20158 +0 +FUNC +GLOBAL +DEFAULT +1 _start
+ +[0-9]+: 0000004c +0 +TLS +GLOBAL +HIDDEN +7 sh4
+ +[0-9]+: 00000078 +0 +TLS +GLOBAL +DEFAULT +8 bg7
+ +[0-9]+: 00000050 +0 +TLS +GLOBAL +HIDDEN +7 sh5
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: 0+20000 +0 +FUNC +GLOBAL +DEFAULT +1 fn2
+ +[0-9]+: 00000004 +0 +TLS +GLOBAL +DEFAULT +7 sg2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: 00000040 +0 +TLS +GLOBAL +HIDDEN +7 sh1
+ +[0-9]+: 00000014 +0 +TLS +GLOBAL +DEFAULT +7 sg6
+ +[0-9]+: 00000018 +0 +TLS +GLOBAL +DEFAULT +7 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 00000044 +0 +TLS +GLOBAL +HIDDEN +7 sh2
+ +[0-9]+: 00000054 +0 +TLS +GLOBAL +HIDDEN +7 sh6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG8
+ +[0-9]+: 00000064 +0 +TLS +GLOBAL +DEFAULT +8 bg2
+ +[0-9]+: 00000060 +0 +TLS +GLOBAL +DEFAULT +8 bg1
+ +[0-9]+: 0000006c +0 +TLS +GLOBAL +DEFAULT +8 bg4
index 79a26d1..04a37a1 100644 (file)
 # 0x60         -0x40           bg1..bg8
 # 0x80         -0x20           bl1..bl8
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
 [0-9a-f]+ <fn2>:
[0-9a-f]+:    55[     ]+push   %ebp
[0-9a-f]+:    89 e5[  ]+mov    %esp,%ebp
[0-9a-f]+:    53[     ]+push   %ebx
[0-9a-f]+:    50[     ]+push   %eax
[0-9a-f]+:    e8 00 00 00 00[         ]+call   [0-9a-f]+ <fn2\+0xa>
[0-9a-f]+:    5b[     ]+pop    %ebx
[0-9a-f]+:    81 c3 fa 10 00 00[      ]+add    \$0x10fa,%ebx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   53[     ]+push   %ebx
+[0-9a-f]+:   50[     ]+push   %eax
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <fn2\+0xa>
+[0-9a-f]+:   5b[     ]+pop    %ebx
+[0-9a-f]+:   81 c3 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]*10fa,%ebx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable
[0-9a-f]+:    8b 83 f8 ff ff ff[      ]+mov    -0x8\(%ebx\),%eax
+[0-9a-f]+:   8b 83 f8 ff ff ff[      ]+mov    -0x8\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG1
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through @gottpoff too
[0-9a-f]+:    8b 83 e8 ff ff ff[      ]+mov    -0x18\(%ebx\),%eax
+[0-9a-f]+:   8b 83 e8 ff ff ff[      ]+mov    -0x18\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG2
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through @gotntpoff too
[0-9a-f]+:    8b 83 dc ff ff ff[      ]+mov    -0x24\(%ebx\),%eax
+[0-9a-f]+:   8b 83 dc ff ff ff[      ]+mov    -0x24\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG3
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through @gottpoff and @gotntpoff too
[0-9a-f]+:    8b 83 f0 ff ff ff[      ]+mov    -0x10\(%ebx\),%eax
+[0-9a-f]+:   8b 83 f0 ff ff ff[      ]+mov    -0x10\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG4
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with global variable defined in executable
[0-9a-f]+:    8d 05 00 f0 ff ff[      ]+lea    0xfffff000,%eax
+[0-9a-f]+:   8d 05 00 f0 ff ff[      ]+lea    0xfffff000,%eax
 #                                                      sg1
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with local variable defined in executable
[0-9a-f]+:    8d 05 20 f0 ff ff[      ]+lea    0xfffff020,%eax
+[0-9a-f]+:   8d 05 20 f0 ff ff[      ]+lea    0xfffff020,%eax
 #                                                      sl1
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with hidden variable defined in executable
[0-9a-f]+:    8d 05 40 f0 ff ff[      ]+lea    0xfffff040,%eax
+[0-9a-f]+:   8d 05 40 f0 ff ff[      ]+lea    0xfffff040,%eax
 #                                                      sh1
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE
[0-9a-f]+:    8d 05 00 00 00 00[      ]+lea    0x0,%eax
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 20 f0 ff ff[      ]+lea    -0xfe0\(%eax\),%edx
+[0-9a-f]+:   8d 05 00 00 00 00[      ]+lea    0x0,%eax
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 20 f0 ff ff[      ]+lea    -0xfe0\(%eax\),%edx
 #                                                      sl1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 24 f0 ff ff[      ]+lea    -0xfdc\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 24 f0 ff ff[      ]+lea    -0xfdc\(%eax\),%ecx
 #                                                      sl2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE against hidden variables
[0-9a-f]+:    8d 05 00 00 00 00[      ]+lea    0x0,%eax
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 40 f0 ff ff[      ]+lea    -0xfc0\(%eax\),%edx
+[0-9a-f]+:   8d 05 00 00 00 00[      ]+lea    0x0,%eax
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 40 f0 ff ff[      ]+lea    -0xfc0\(%eax\),%edx
 #                                                      sh1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 44 f0 ff ff[      ]+lea    -0xfbc\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 44 f0 ff ff[      ]+lea    -0xfbc\(%eax\),%ecx
 #                                                      sh2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b e8 ff ff ff[      ]+sub    -0x18\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b e8 ff ff ff[      ]+sub    -0x18\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     sG2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 ec ff ff ff[      ]+sub    -0x14\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 ec ff ff ff[      ]+sub    -0x14\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b dc ff ff ff[      ]+add    -0x24\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b dc ff ff ff[      ]+add    -0x24\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sG3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 f0 ff ff ff[      ]+add    -0x10\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 f0 ff ff ff[      ]+add    -0x10\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against global var defined in exec
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 e9 00 10 00 00[      ]+sub    \$0x1000,%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 e9 00 10 00 00[      ]+sub    \$0x1000,%ecx
 #                                                      sg1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE -> LE against local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 c0 20 f0 ff ff[      ]+add    \$0xfffff020,%eax
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 20 f0 ff ff[      ]+add    \$0xfffff020,%eax
 #                                                      sl1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against hidden var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 e9 c0 0f 00 00[      ]+sub    \$0xfc0,%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 e9 c0 0f 00 00[      ]+sub    \$0xfc0,%ecx
 #                                                      sh1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %gs
 #  @gotntpoff IE against global var
[0-9a-f]+:    8b 8b e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%ecx
+[0-9a-f]+:   8b 8b e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sG5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE->LE against local var
[0-9a-f]+:    c7 c0 30 f0 ff ff[      ]+mov    \$0xfffff030,%eax
+[0-9a-f]+:   c7 c0 30 f0 ff ff[      ]+mov    \$0xfffff030,%eax
 #                                                      sl5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 10[       ]+mov    %gs:\(%eax\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 10[       ]+mov    %gs:\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE->LE against hidden var
[0-9a-f]+:    c7 c2 50 f0 ff ff[      ]+mov    \$0xfffff050,%edx
+[0-9a-f]+:   c7 c2 50 f0 ff ff[      ]+mov    \$0xfffff050,%edx
 #                                                      sh5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 12[       ]+mov    %gs:\(%edx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
[0-9a-f]+:    c9[     ]+leave *
[0-9a-f]+:    c3[     ]+ret *
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 12[       ]+mov    %gs:\(%edx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 
 [0-9a-f]+ <_start>:
[0-9a-f]+:    55[     ]+push   %ebp
[0-9a-f]+:    89 e5[  ]+mov    %esp,%ebp
[0-9a-f]+:    e8 00 00 00 00[         ]+call   [0-9a-f]+ <_start\+0x8>
[0-9a-f]+:    59[     ]+pop    %ecx
[0-9a-f]+:    81 c1 a4 0f 00 00[      ]+add    \$0xfa4,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <_start\+0x8>
+[0-9a-f]+:   59[     ]+pop    %ecx
+[0-9a-f]+:   81 c1 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]*fa4,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 91 f4 ff ff ff[      ]+sub    -0xc\(%ecx\),%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 91 f4 ff ff ff[      ]+sub    -0xc\(%ecx\),%edx
 #                              ->R_386_TLS_TPOFF32     sG6
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 05 e8 a0 04 08[      ]+add    0x804a0e8,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 05 ([0-9a-f]{2} ){4}[        ]+add    0x[0-9a-f]+0e8,%eax
 #                              ->R_386_TLS_TPOFF       sG7
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE against global var
[0-9a-f]+:    8b 15 00 a1 04 08[      ]+mov    0x804a100,%edx
+[0-9a-f]+:   8b 15 ([0-9a-f]{2} ){4}[        ]+mov    0x[0-9a-f]+100,%edx
 #                              ->R_386_TLS_TPOFF       sG8
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 02[       ]+mov    %gs:\(%edx\),%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against global var defined in exec
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 ea 8c 0f 00 00[      ]+sub    \$0xf8c,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 ea 8c 0f 00 00[      ]+sub    \$0xf8c,%edx
 #                                                      bg6
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE -> LE against global var defined in exec
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 c0 78 f0 ff ff[      ]+add    \$0xfffff078,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 78 f0 ff ff[      ]+add    \$0xfffff078,%eax
 #                                                      bg7
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE -> LE against global var defined
 #  in exec
[0-9a-f]+:    c7 c2 7c f0 ff ff[      ]+mov    \$0xfffff07c,%edx
+[0-9a-f]+:   c7 c2 7c f0 ff ff[      ]+mov    \$0xfffff07c,%edx
 #                                                      bg8
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 02[       ]+mov    %gs:\(%edx\),%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against local var
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 ea 6c 0f 00 00[      ]+sub    \$0xf6c,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 ea 6c 0f 00 00[      ]+sub    \$0xf6c,%edx
 #                                                      bl6
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE -> LE against local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 c0 98 f0 ff ff[      ]+add    \$0xfffff098,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 98 f0 ff ff[      ]+add    \$0xfffff098,%eax
 #                                                      bl7
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE -> LE against local var
[0-9a-f]+:    c7 c2 9c f0 ff ff[      ]+mov    \$0xfffff09c,%edx
+[0-9a-f]+:   c7 c2 9c f0 ff ff[      ]+mov    \$0xfffff09c,%edx
 #                                                      bl8
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 02[       ]+mov    %gs:\(%edx\),%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE -> LE against hidden but not local var
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 ea ac 0f 00 00[      ]+sub    \$0xfac,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 ea ac 0f 00 00[      ]+sub    \$0xfac,%edx
 #                                                      sh6
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE -> LE against hidden but not local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 c0 58 f0 ff ff[      ]+add    \$0xfffff058,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c0 58 f0 ff ff[      ]+add    \$0xfffff058,%eax
 #                                                      sh7
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE -> LE against hidden but not
 #  local var
[0-9a-f]+:    c7 c2 5c f0 ff ff[      ]+mov    \$0xfffff05c,%edx
+[0-9a-f]+:   c7 c2 5c f0 ff ff[      ]+mov    \$0xfffff05c,%edx
 #                                                      sh8
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 02[       ]+mov    %gs:\(%edx\),%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, global var defined in exec
[0-9a-f]+:    ba 00 10 00 00[         ]+mov    \$0x1000,%edx
+[0-9a-f]+:   ba 00 10 00 00[         ]+mov    \$0x1000,%edx
 #                                                      sg1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    29 d0[  ]+sub    %edx,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 d0[  ]+sub    %edx,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, local var
[0-9a-f]+:    b8 7f 0f 00 00[         ]+mov    \$0xf7f,%eax
+[0-9a-f]+:   b8 7f 0f 00 00[         ]+mov    \$0xf7f,%eax
 #                                                      bl1+1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    29 c2[  ]+sub    %eax,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 c2[  ]+sub    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, hidden var defined in exec
[0-9a-f]+:    b8 bd 0f 00 00[         ]+mov    \$0xfbd,%eax
+[0-9a-f]+:   b8 bd 0f 00 00[         ]+mov    \$0xfbd,%eax
 #                                                      sh1+3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    29 c2[  ]+sub    %eax,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 c2[  ]+sub    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, global var defined in exec
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 04 f0 ff ff[      ]+lea    -0xffc\(%eax\),%edx
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 04 f0 ff ff[      ]+lea    -0xffc\(%eax\),%edx
 #                                                      sg2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, local var, non-canonical sequence
[0-9a-f]+:    b8 86 f0 ff ff[         ]+mov    \$0xfffff086,%eax
+[0-9a-f]+:   b8 86 f0 ff ff[         ]+mov    \$0xfffff086,%eax
 #                                                      bl2+2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    01 c2[  ]+add    %eax,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   01 c2[  ]+add    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, hidden var defined in exec, non-canonical sequence
[0-9a-f]+:    65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    81 c2 45 f0 ff ff[      ]+add    \$0xfffff045,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00[   ]+mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c2 45 f0 ff ff[      ]+add    \$0xfffff045,%edx
 #                                                      sh2+1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, global var defined in exec
[0-9a-f]+:    65 a1 08 f0 ff ff[      ]+mov    %gs:0xfffff008,%eax
+[0-9a-f]+:   65 a1 08 f0 ff ff[      ]+mov    %gs:0xfffff008,%eax
 #                                                      sg3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, local var
[0-9a-f]+:    65 8b 15 8b f0 ff ff[   ]+mov    %gs:0xfffff08b,%edx
+[0-9a-f]+:   65 8b 15 8b f0 ff ff[   ]+mov    %gs:0xfffff08b,%edx
 #                                                      bl3+3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, hidden var defined in exec
[0-9a-f]+:    65 8b 15 49 f0 ff ff[   ]+mov    %gs:0xfffff049,%edx
+[0-9a-f]+:   65 8b 15 49 f0 ff ff[   ]+mov    %gs:0xfffff049,%edx
 #                                                      sh3+1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
[0-9a-f]+:    c9[     ]+leave *
[0-9a-f]+:    c3[     ]+ret *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
index 7d56466..d719eea 100644 (file)
@@ -5,9 +5,9 @@
 #objdump: -sj.got
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.got:
804a0e0 [0-9a-f]+ 00000000 00000000 [0-9a-f]+  .*
804a0f0 00000000 00000000 00000000 00000000  .*
804a100 00000000  +.*
[0-9a-f]+0e0 [0-9a-f]+ 00000000 00000000 [0-9a-f]+  .*
[0-9a-f]+0f0 00000000 00000000 00000000 00000000  .*
[0-9a-f]+100 00000000  +.*
index 64859dd..12a5a89 100644 (file)
@@ -5,12 +5,12 @@
 #objdump: -sj.tdata
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.tdata:
804a000 11000000 12000000 13000000 14000000  .*
804a010 15000000 16000000 17000000 18000000  .*
804a020 41000000 42000000 43000000 44000000  .*
804a030 45000000 46000000 47000000 48000000  .*
804a040 01010000 02010000 03010000 04010000  .*
804a050 05010000 06010000 07010000 08010000  .*
[0-9a-f]+000 11000000 12000000 13000000 14000000  .*
[0-9a-f]+010 15000000 16000000 17000000 18000000  .*
[0-9a-f]+020 41000000 42000000 43000000 44000000  .*
[0-9a-f]+030 45000000 46000000 47000000 48000000  .*
[0-9a-f]+040 01010000 02010000 03010000 04010000  .*
[0-9a-f]+050 05010000 06010000 07010000 08010000  .*
diff --git a/ld/testsuite/ld-i386/tlsdesc-nacl.rd b/ld/testsuite/ld-i386/tlsdesc-nacl.rd
new file mode 100644 (file)
index 0000000..a9e602c
--- /dev/null
@@ -0,0 +1,151 @@
+#source: tlsdesc.s
+#source: tlspic2.s
+#as: --32
+#ld: -shared -melf_i386_nacl --no-ld-generated-unwind-info
+#readelf: -Ssrl
+#target: i?86-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.text +.*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rel.dyn +.*
+ +\[[ 0-9]+\] \.rel.plt +.*
+ +\[[ 0-9]+\] \.tdata +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000060 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.tbss +NOBITS +[0-9aa-f]+ [0-9a-f]+ 000020 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.dynamic +.*
+ +\[[ 0-9]+\] \.got +.*
+ +\[[ 0-9]+\] \.got.plt +.*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x[0-9a-f]+
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.text *
+ +01 +.hash .dynsym .dynstr .rel.dyn .rel.plt *
+ +02 +.tdata .dynamic .got .got.plt *
+ +03 +.dynamic *
+ +04 +.tdata .tbss *
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF +0+8 +sg3
+[0-9a-f ]+R_386_TLS_TPOFF32 0+c +sg4
+[0-9a-f ]+R_386_TLS_TPOFF +0+c +sg4
+[0-9a-f ]+R_386_TLS_TPOFF +0+10 +sg5
+[0-9a-f ]+R_386_TLS_TPOFF32 0+4 +sg2
+
+Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 5 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_TLS_DESC * 0+ +sg1
+[0-9a-f ]+R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC *
+[0-9a-f ]+R_386_TLS_DESC *
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +7 sg8
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +7 sg3
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +7 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +7 sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +1 fn1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +7 sg2
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +7 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +7 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +11 *
+ +[0-9]+: 0+20 +0 +TLS +LOCAL +DEFAULT +7 sl1
+ +[0-9]+: 0+24 +0 +TLS +LOCAL +DEFAULT +7 sl2
+ +[0-9]+: 0+28 +0 +TLS +LOCAL +DEFAULT +7 sl3
+ +[0-9]+: 0+2c +0 +TLS +LOCAL +DEFAULT +7 sl4
+ +[0-9]+: 0+30 +0 +TLS +LOCAL +DEFAULT +7 sl5
+ +[0-9]+: 0+34 +0 +TLS +LOCAL +DEFAULT +7 sl6
+ +[0-9]+: 0+38 +0 +TLS +LOCAL +DEFAULT +7 sl7
+ +[0-9]+: 0+3c +0 +TLS +LOCAL +DEFAULT +7 sl8
+ +[0-9]+: 0+60 +0 +TLS +LOCAL +DEFAULT +8 sH1
+ +[0-9]+: 0+ +0 +TLS +LOCAL +DEFAULT +7 _TLS_MODULE_BASE_
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+48 +0 +TLS +LOCAL +DEFAULT +7 sh3
+ +[0-9]+: 0+64 +0 +TLS +LOCAL +DEFAULT +8 sH2
+ +[0-9]+: 0+78 +0 +TLS +LOCAL +DEFAULT +8 sH7
+ +[0-9]+: 0+58 +0 +TLS +LOCAL +DEFAULT +7 sh7
+ +[0-9]+: 0+5c +0 +TLS +LOCAL +DEFAULT +7 sh8
+ +[0-9]+: 0+6c +0 +TLS +LOCAL +DEFAULT +8 sH4
+ +[0-9]+: 0+4c +0 +TLS +LOCAL +DEFAULT +7 sh4
+ +[0-9]+: 0+68 +0 +TLS +LOCAL +DEFAULT +8 sH3
+ +[0-9]+: 0+50 +0 +TLS +LOCAL +DEFAULT +7 sh5
+ +[0-9]+: 0+70 +0 +TLS +LOCAL +DEFAULT +8 sH5
+ +[0-9]+: 0+74 +0 +TLS +LOCAL +DEFAULT +8 sH6
+ +[0-9]+: 0+7c +0 +TLS +LOCAL +DEFAULT +8 sH8
+ +[0-9]+: 0+40 +0 +TLS +LOCAL +DEFAULT +7 sh1
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+44 +0 +TLS +LOCAL +DEFAULT +7 sh2
+ +[0-9]+: 0+54 +0 +TLS +LOCAL +DEFAULT +7 sh6
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +7 sg8
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +7 sg3
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +7 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +7 sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +1 fn1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +7 sg2
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +7 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +7 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
index 85db8dd..fad3706 100644 (file)
 #objdump: -drj.text
 #target: i?86-*-*
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
 [0-9a-f]+ <fn1>:
[0-9a-f]+:    55[     ]+push   %ebp
[0-9a-f]+:    89 e5[  ]+mov    %esp,%ebp
[0-9a-f]+:    53[     ]+push   %ebx
[0-9a-f]+:    50[     ]+push   %eax
[0-9a-f]+:    e8 00 00 00 00[         ]+call   [0-9a-f]+ <fn1\+0xa>
[0-9a-f]+:    5b[     ]+pop    %ebx
[0-9a-f]+:    81 c3 9a 13 00 00[      ]+add    \$0x[0-9a-f]+,%ebx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   53[     ]+push   %ebx
+[0-9a-f]+:   50[     ]+push   %eax
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <.*>
+[0-9a-f]+:   5b[     ]+pop    %ebx
+[0-9a-f]+:   81 c3 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]+,%ebx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GDesc
[0-9a-f]+:    8d 83 24 00 00 00[      ]+lea    0x24\(%ebx\),%eax
+[0-9a-f]+:   8d 83 24 00 00 00[      ]+lea    0x24\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        sg1
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gottpoff too
[0-9a-f]+:    8b 83 f8 ff ff ff[      ]+mov    -0x8\(%ebx\),%eax
+[0-9a-f]+:   8b 83 f8 ff ff ff[      ]+mov    -0x8\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sg2
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gotntpoff too
[0-9a-f]+:    8b 83 c4 ff ff ff[      ]+mov    -0x3c\(%ebx\),%eax
+[0-9a-f]+:   8b 83 c4 ff ff ff[      ]+mov    -0x3c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sg3
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gottpoff and
[0-9a-f]+:    8b 83 d4 ff ff ff[      ]+mov    -0x2c\(%ebx\),%eax
+[0-9a-f]+:   8b 83 d4 ff ff ff[      ]+mov    -0x2c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sg4
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD against local variable
[0-9a-f]+:    8d 83 0c 00 00 00[      ]+lea    0xc\(%ebx\),%eax
+[0-9a-f]+:   8d 83 0c 00 00 00[      ]+lea    0xc\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        sl1
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through @gottpoff too
[0-9a-f]+:    8b 83 b0 ff ff ff[      ]+mov    -0x50\(%ebx\),%eax
+[0-9a-f]+:   8b 83 b0 ff ff ff[      ]+mov    -0x50\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sl2
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through @gotntpoff
[0-9a-f]+:    8b 83 b4 ff ff ff[      ]+mov    -0x4c\(%ebx\),%eax
+[0-9a-f]+:   8b 83 b4 ff ff ff[      ]+mov    -0x4c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sl3
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through @gottpoff and
[0-9a-f]+:    8b 83 bc ff ff ff[      ]+mov    -0x44\(%ebx\),%eax
+[0-9a-f]+:   8b 83 bc ff ff ff[      ]+mov    -0x44\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sl4
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD against hidden and local variable
[0-9a-f]+:    8d 83 2c 00 00 00[      ]+lea    0x2c\(%ebx\),%eax
+[0-9a-f]+:   8d 83 2c 00 00 00[      ]+lea    0x2c\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        sh1
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through @gottpoff too
[0-9a-f]+:    8b 83 fc ff ff ff[      ]+mov    -0x4\(%ebx\),%eax
+[0-9a-f]+:   8b 83 fc ff ff ff[      ]+mov    -0x4\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sh2
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through @gotntpoff too
[0-9a-f]+:    8b 83 c8 ff ff ff[      ]+mov    -0x38\(%ebx\),%eax
+[0-9a-f]+:   8b 83 c8 ff ff ff[      ]+mov    -0x38\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sh3
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through @gottpoff and @gotntpoff too
[0-9a-f]+:    8b 83 e8 ff ff ff[      ]+mov    -0x18\(%ebx\),%eax
+[0-9a-f]+:   8b 83 e8 ff ff ff[      ]+mov    -0x18\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sh4
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD against hidden but not local variable
[0-9a-f]+:    8d 83 14 00 00 00[      ]+lea    0x14\(%ebx\),%eax
+[0-9a-f]+:   8d 83 14 00 00 00[      ]+lea    0x14\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        sH1
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through
[0-9a-f]+:    8b 83 cc ff ff ff[      ]+mov    -0x34\(%ebx\),%eax
+[0-9a-f]+:   8b 83 cc ff ff ff[      ]+mov    -0x34\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sH2
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through
[0-9a-f]+:    8b 83 ec ff ff ff[      ]+mov    -0x14\(%ebx\),%eax
+[0-9a-f]+:   8b 83 ec ff ff ff[      ]+mov    -0x14\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sH3
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through
[0-9a-f]+:    8b 83 e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%eax
+[0-9a-f]+:   8b 83 e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sH4
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD
[0-9a-f]+:    8d 83 1c 00 00 00[      ]+lea    0x1c\(%ebx\),%eax
+[0-9a-f]+:   8d 83 1c 00 00 00[      ]+lea    0x1c\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        _TLS_MODULE_BASE_
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 20 00 00 00[      ]+lea    0x20\(%eax\),%edx
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 20 00 00 00[      ]+lea    0x20\(%eax\),%edx
 #                                                      sl1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 26 00 00 00[      ]+lea    0x26\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 26 00 00 00[      ]+lea    0x26\(%eax\),%ecx
 #                                                      sl2+2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD against hidden and local variables
[0-9a-f]+:    8d 90 40 00 00 00[      ]+lea    0x40\(%eax\),%edx
+[0-9a-f]+:   8d 90 40 00 00 00[      ]+lea    0x40\(%eax\),%edx
 #                                                      sh1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 47 00 00 00[      ]+lea    0x47\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 47 00 00 00[      ]+lea    0x47\(%eax\),%ecx
 #                                                      sh2+3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD against hidden but not local variables
[0-9a-f]+:    8d 90 60 00 00 00[      ]+lea    0x60\(%eax\),%edx
+[0-9a-f]+:   8d 90 60 00 00 00[      ]+lea    0x60\(%eax\),%edx
 #                                                      sH1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 65 00 00 00[      ]+lea    0x65\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 65 00 00 00[      ]+lea    0x65\(%eax\),%ecx
 #                                                      sH2+1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b f8 ff ff ff[      ]+sub    -0x8\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b f8 ff ff ff[      ]+sub    -0x8\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     sg2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 d0 ff ff ff[      ]+sub    -0x30\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 d0 ff ff ff[      ]+sub    -0x30\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sg4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b c4 ff ff ff[      ]+add    -0x3c\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b c4 ff ff ff[      ]+add    -0x3c\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sg3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 d4 ff ff ff[      ]+add    -0x2c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 d4 ff ff ff[      ]+add    -0x2c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sg4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b b0 ff ff ff[      ]+sub    -0x50\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b b0 ff ff ff[      ]+sub    -0x50\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     [0xdcffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 b8 ff ff ff[      ]+sub    -0x48\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 b8 ff ff ff[      ]+sub    -0x48\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xd4ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b b4 ff ff ff[      ]+add    -0x4c\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b b4 ff ff ff[      ]+add    -0x4c\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x28000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 bc ff ff ff[      ]+add    -0x44\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 bc ff ff ff[      ]+add    -0x44\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x2c000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden and local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b fc ff ff ff[      ]+sub    -0x4\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b fc ff ff ff[      ]+sub    -0x4\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     [0xbcffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden and local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 e4 ff ff ff[      ]+sub    -0x1c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 e4 ff ff ff[      ]+sub    -0x1c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xb4ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden and local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b c8 ff ff ff[      ]+add    -0x38\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b c8 ff ff ff[      ]+add    -0x38\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x48000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden and local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 e8 ff ff ff[      ]+add    -0x18\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 e8 ff ff ff[      ]+add    -0x18\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x4c000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden but not local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b cc ff ff ff[      ]+sub    -0x34\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b cc ff ff ff[      ]+sub    -0x34\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     [0x9cffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden but not local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 dc ff ff ff[      ]+sub    -0x24\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 dc ff ff ff[      ]+sub    -0x24\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0x94ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden but not local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b ec ff ff ff[      ]+add    -0x14\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b ec ff ff ff[      ]+add    -0x14\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x68000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden but not local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 e0 ff ff ff[      ]+add    -0x20\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 e0 ff ff ff[      ]+add    -0x20\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x6c000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %gs
 #  @gotntpoff IE against global var
[0-9a-f]+:    8b 8b d8 ff ff ff[      ]+mov    -0x28\(%ebx\),%ecx
+[0-9a-f]+:   8b 8b d8 ff ff ff[      ]+mov    -0x28\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sg5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against local var
[0-9a-f]+:    8b 83 c0 ff ff ff[      ]+mov    -0x40\(%ebx\),%eax
+[0-9a-f]+:   8b 83 c0 ff ff ff[      ]+mov    -0x40\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x30000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 10[       ]+mov    %gs:\(%eax\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 10[       ]+mov    %gs:\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden and local var
[0-9a-f]+:    8b 93 f0 ff ff ff[      ]+mov    -0x10\(%ebx\),%edx
+[0-9a-f]+:   8b 93 f0 ff ff ff[      ]+mov    -0x10\(%ebx\),%edx
 #                              ->R_386_TLS_TPOFF       [0x50000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 12[       ]+mov    %gs:\(%edx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 12[       ]+mov    %gs:\(%edx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden but not local var
[0-9a-f]+:    8b 8b f4 ff ff ff[      ]+mov    -0xc\(%ebx\),%ecx
+[0-9a-f]+:   8b 8b f4 ff ff ff[      ]+mov    -0xc\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x70000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
[0-9a-f]+:    c9[     ]+leave *
[0-9a-f]+:    c3[     ]+ret *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
index ad3d1e3..996da5f 100644 (file)
@@ -5,7 +5,7 @@
 #objdump: -s -j.got -j.got.plt
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.got:
  [0-9a-f]+ dcffffff 28000000 d4ffffff 2c000000  .*
@@ -14,7 +14,7 @@ Contents of section \.got:
  [0-9a-f]+ 6c000000 b4ffffff 4c000000 68000000  .*
  [0-9a-f]+ 50000000 70000000 00000000 bcffffff  .*
 Contents of section \.got\.plt:
- [0-9a-f]+ b0150000 00000000 00000000 00000000  .*
+ [0-9a-f]+ [0-9a-f]{8} 00000000 00000000 00000000  .*
  [0-9a-f]+ 20000000 00000000 60000000 00000000  .*
  [0-9a-f]+ 00000000 00000000 00000000 00000000  .*
  [0-9a-f]+ 40000000 +.*
index 12cc43c..f178e12 100644 (file)
@@ -5,7 +5,7 @@
 #objdump: -sj.tdata
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.tdata:
  [0-9a-f]+ 11000000 12000000 13000000 14000000  .*
index d794762..6558abe 100644 (file)
@@ -4,7 +4,7 @@
 #objdump: -sj.debug_foobar
 #target: i?86-*-*
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Contents of section .debug_foobar:
  0+ 18000000  +.*
diff --git a/ld/testsuite/ld-i386/tlsgdesc-nacl.rd b/ld/testsuite/ld-i386/tlsgdesc-nacl.rd
new file mode 100644 (file)
index 0000000..77ad08f
--- /dev/null
@@ -0,0 +1,105 @@
+#source: tlsgdesc.s
+#as: --32
+#ld: -shared -melf_i386_nacl --no-ld-generated-unwind-info
+#readelf: -Ssrl
+#target: i?86-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.plt +.*
+ +\[[ 0-9]+\] \.text +.*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rel.dyn +.*
+ +\[[ 0-9]+\] \.rel.plt +.*
+ +\[[ 0-9]+\] \.dynamic +.*
+ +\[[ 0-9]+\] \.got +.*
+ +\[[ 0-9]+\] \.got.plt +.*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x[0-9a-f]+
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.plt .text *
+ +01 +.hash .dynsym .dynstr .rel.dyn .rel.plt *
+ +02 +.dynamic .got .got.plt *
+ +03 +.dynamic *
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sG3
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG5
+[0-9a-f ]+R_386_TLS_DTPMOD3 0+ +sG2
+[0-9a-f ]+R_386_TLS_DTPOFF3 0+ +sG2
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sG4
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sG6
+[0-9a-f ]+R_386_TLS_DTPMOD3 0+ +sG1
+[0-9a-f ]+R_386_TLS_DTPOFF3 0+ +sG1
+
+Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 3 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_JUMP_SLOT +0+ +___tls_get_addr
+[0-9a-f ]+R_386_TLS_DESC +0+ +sG1
+[0-9a-f ]+R_386_TLS_DESC +0+ +sG2
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +2 fc1
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND ___tls_get_addr
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +2 fc1
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND ___tls_get_addr
index 92062ce..301876c 100644 (file)
 #objdump: -drj.text
 #target: i?86-*-*
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
 [0-9a-f]+ <fc1>:
[0-9a-f]+:    55[     ]+push   %ebp
[0-9a-f]+:    89 e5[  ]+mov    %esp,%ebp
[0-9a-f]+:    53[     ]+push   %ebx
[0-9a-f]+:    50[     ]+push   %eax
[0-9a-f]+:    e8 00 00 00 00[         ]+call   [0-9a-f]+ <.*>
[0-9a-f]+:    5b[     ]+pop    %ebx
[0-9a-f]+:    81 c3 be 11 00 00[      ]+add    \$0x[0-9a-f]+,%ebx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   53[     ]+push   %ebx
+[0-9a-f]+:   50[     ]+push   %eax
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <.*>
+[0-9a-f]+:   5b[     ]+pop    %ebx
+[0-9a-f]+:   81 c3 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]+,%ebx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b e0 ff ff ff[      ]+sub    -0x20\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b e0 ff ff ff[      ]+sub    -0x20\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     sG3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b f0 ff ff ff[      ]+add    -0x10\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b f0 ff ff ff[      ]+add    -0x10\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sG4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD
[0-9a-f]+:    8d 04 1d f8 ff ff ff[   ]+lea    -0x8\(,%ebx,1\),%eax
+[0-9a-f]+:   8d 04 1d f8 ff ff ff[   ]+lea    -0x8\(,%ebx,1\),%eax
 #                              ->R_386_TLS_DTPMOD32    sG1
[0-9a-f]+:    e8 a9 ff ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 83 18 00 00 00[      ]+lea    0x18\(%ebx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 83 18 00 00 00[      ]+lea    0x18\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        sG1
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 83 10 00 00 00[      ]+lea    0x10\(%ebx\),%eax
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 83 10 00 00 00[      ]+lea    0x10\(%ebx\),%eax
 #                              ->R_386_TLS_DESC        sG2
[0-9a-f]+:    ff 10[  ]+call   \*\(%eax\)
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 04 1d e8 ff ff ff[   ]+lea    -0x18\(,%ebx,1\),%eax
+[0-9a-f]+:   ff 10[  ]+call   \*\(%eax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 04 1d e8 ff ff ff[   ]+lea    -0x18\(,%ebx,1\),%eax
 #                              ->R_386_TLS_DTPMOD32    sG2
[0-9a-f]+:    e8 81 ff ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gottpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 e0 ff ff ff[      ]+sub    -0x20\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 e0 ff ff ff[      ]+sub    -0x20\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 83 e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 83 e0 ff ff ff[      ]+mov    -0x20\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG3
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gotntpoff too
[0-9a-f]+:    8b 83 f0 ff ff ff[      ]+mov    -0x10\(%ebx\),%eax
+[0-9a-f]+:   8b 83 f0 ff ff ff[      ]+mov    -0x10\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG4
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    03 83 f0 ff ff ff[      ]+add    -0x10\(%ebx\),%eax
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 f0 ff ff ff[      ]+add    -0x10\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gotntpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    03 83 e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 83 e4 ff ff ff[      ]+mov    -0x1c\(%ebx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 83 e4 ff ff ff[      ]+mov    -0x1c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sG5
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gottpoff too
[0-9a-f]+:    8b 83 f4 ff ff ff[      ]+mov    -0xc\(%ebx\),%eax
+[0-9a-f]+:   8b 83 f4 ff ff ff[      ]+mov    -0xc\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG6
[0-9a-f]+:    f7 d8[  ]+neg    %eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 f4 ff ff ff[      ]+sub    -0xc\(%ebx\),%eax
+[0-9a-f]+:   f7 d8[  ]+neg    %eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 f4 ff ff ff[      ]+sub    -0xc\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sG6
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sG5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b f4 ff ff ff[      ]+sub    -0xc\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b f4 ff ff ff[      ]+sub    -0xc\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     sG6
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
[0-9a-f]+:    c9[     ]+leave *
[0-9a-f]+:    c3[     ]+ret *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
index db20de1..3942a4f 100644 (file)
@@ -4,13 +4,13 @@
 #objdump: -drj.text
 #target: i?86-*-*
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
 [0-9a-f]+000 <_start>:
[0-9a-f]+000: 39 d8[  ]+cmp    %ebx,%eax
[0-9a-f]+002: 73 08[  ]+jae    [0-9a-f]+00c <_start\+0xc>
[0-9a-f]+004: b8 fc ff ff ff[         ]+mov    \$0xfffffffc,%eax
[0-9a-f]+009: 65 8b 00[       ]+mov    %gs:\(%eax\),%eax
[0-9a-f]+00c: c3[     ]+ret *
+[0-9a-f]+000:        39 d8[  ]+cmp    %ebx,%eax
+[0-9a-f]+002:        73 08[  ]+jae    [0-9a-f]+00c <_start\+0xc>
+[0-9a-f]+004:        b8 fc ff ff ff[         ]+mov    \$0xfffffffc,%eax
+[0-9a-f]+009:        65 8b 00[       ]+mov    %gs:\(%eax\),%eax
+[0-9a-f]+00c:        c3[     ]+ret *
diff --git a/ld/testsuite/ld-i386/tlsnopic-nacl.rd b/ld/testsuite/ld-i386/tlsnopic-nacl.rd
new file mode 100644 (file)
index 0000000..9c8f4c2
--- /dev/null
@@ -0,0 +1,118 @@
+#source: tlsnopic1.s
+#source: tlsnopic2.s
+#as: --32
+#ld: -shared -melf_i386_nacl --no-ld-generated-unwind-info
+#readelf: -Ssrl
+#target: i?86-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.text +PROGBITS +0+ .*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rel.dyn +.*
+ +\[[ 0-9]+\] \.tbss +NOBITS +[0-9a-f]+ [0-9a-f]+ 000024 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.dynamic +DYNAMIC +0*10010284 .*
+ +\[[ 0-9]+\] \.got +PROGBITS +0*10010304 .*
+ +\[[ 0-9]+\] \.got.plt +PROGBITS +0*1001031c .*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x0+
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.text *
+ +01 +.hash .dynsym .dynstr .rel.dyn *
+ +02 +.dynamic .got .got.plt *
+ +03 +.dynamic *
+ +04 +.tbss *
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_RELATIVE +
+[0-9a-f ]+R_386_TLS_TPOFF32 0+ +sg3
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sg4
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sg5
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sg1
+[0-9a-f ]+R_386_TLS_TPOFF +0+ +sg2
+
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg4
+ +[0-9]+: 0+ +0 +FUNC +GLOBAL +DEFAULT +1 fn3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg2
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: 0+00 +0 +TLS +LOCAL +DEFAULT +6 bl1
+ +[0-9]+: 0+04 +0 +TLS +LOCAL +DEFAULT +6 bl2
+ +[0-9]+: 0+08 +0 +TLS +LOCAL +DEFAULT +6 bl3
+ +[0-9]+: 0+0c +0 +TLS +LOCAL +DEFAULT +6 bl4
+ +[0-9]+: 0+10 +0 +TLS +LOCAL +DEFAULT +6 bl5
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+1c +0 +TLS +LOCAL +DEFAULT +6 sh3
+ +[0-9]+: 0+20 +0 +TLS +LOCAL +DEFAULT +6 sh4
+ +[0-9]+: 0+14 +0 +TLS +LOCAL +DEFAULT +6 sh1
+ +[0-9]+: 0*1001031c +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+18 +0 +TLS +LOCAL +DEFAULT +6 sh2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg4
+ +[0-9]+: 0+ +0 +FUNC +GLOBAL +DEFAULT +1 fn3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sg2
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
index 027d288..bd18de3 100644 (file)
 #objdump: -drj.text
 #target: i?86-*-*
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
-0+1000 <fn3>:
   1000:      55[     ]+push   %ebp
   1001:      89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+ <fn3>:
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
 #  @indntpoff IE against global var
   1003:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
   1009:      90[     ]+nop *
   100a:      90[     ]+nop *
   100b:      03 05 7c 21 00 00[      ]+add    0x217c,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 05 ([0-9a-f]{2} ){4}[        ]+add    0x[0-9a-f]+c,%eax
 #                              ->R_386_TLS_TPOFF       sg1
   1011:      90[     ]+nop *
   1012:      90[     ]+nop *
   1013:      90[     ]+nop *
   1014:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE against global var
   1015:      8b 15 80 21 00 00[      ]+mov    0x2180,%edx
+[0-9a-f]+:   8b 15 ([0-9a-f]{2} ){4}[        ]+mov    0x[0-9a-f]+0,%edx
 #                              ->R_386_TLS_TPOFF       sg2
   101b:      90[     ]+nop *
   101c:      90[     ]+nop *
   101d:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
   1020:      90[     ]+nop *
   1021:      90[     ]+nop *
   1022:      90[     ]+nop *
   1023:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE against hidden var
   1024:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
   102a:      90[     ]+nop *
   102b:      90[     ]+nop *
   102c:      03 05 84 21 00 00[      ]+add    0x2184,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 05 ([0-9a-f]{2} ){4}[        ]+add    0x[0-9a-f]+4,%eax
 #                              ->R_386_TLS_TPOFF       [0x14000000]
   1032:      90[     ]+nop *
   1033:      90[     ]+nop *
   1034:      90[     ]+nop *
   1035:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE against hidden var
   1036:      8b 15 88 21 00 00[      ]+mov    0x2188,%edx
+[0-9a-f]+:   8b 15 ([0-9a-f]{2} ){4}[        ]+mov    0x[0-9a-f]+8,%edx
 #                              ->R_386_TLS_TPOFF       [0x18000000]
   103c:      90[     ]+nop *
   103d:      90[     ]+nop *
   103e:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
   1041:      90[     ]+nop *
   1042:      90[     ]+nop *
   1043:      90[     ]+nop *
   1044:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff IE against local var
   1045:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
   104b:      90[     ]+nop *
   104c:      90[     ]+nop *
   104d:      03 05 74 21 00 00[      ]+add    0x2174,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 05 ([0-9a-f]{2} ){4}[        ]+add    0x[0-9a-f]+4,%eax
 #                              ->R_386_TLS_TPOFF       [0x00000000]
   1053:      90[     ]+nop *
   1054:      90[     ]+nop *
   1055:      90[     ]+nop *
   1056:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @indntpoff direct %gs access IE against local var
   1057:      8b 15 78 21 00 00[      ]+mov    0x2178,%edx
+[0-9a-f]+:   8b 15 ([0-9a-f]{2} ){4}[        ]+mov    0x[0-9a-f]+8,%edx
 #                              ->R_386_TLS_TPOFF       [0x04000000]
   105d:      90[     ]+nop *
   105e:      90[     ]+nop *
   105f:      65 8b 02[       ]+mov    %gs:\(%edx\),%eax
   1062:      90[     ]+nop *
   1063:      90[     ]+nop *
   1064:      90[     ]+nop *
   1065:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 02[       ]+mov    %gs:\(%edx\),%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, global var
   1066:      ba fd ff ff ff[         ]+mov    \$0xfffffffd,%edx
+[0-9a-f]+:   ba fd ff ff ff[         ]+mov    \$0xfffffffd,%edx
 #                              R_386_TLS_TPOFF32       sg3
   106b:      90[     ]+nop *
   106c:      90[     ]+nop *
   106d:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
   1073:      90[     ]+nop *
   1074:      90[     ]+nop *
   1075:      29 d0[  ]+sub    %edx,%eax
   1077:      90[     ]+nop *
   1078:      90[     ]+nop *
   1079:      90[     ]+nop *
   107a:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 d0[  ]+sub    %edx,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @tpoff, local var
   107b:      b8 f7 ff ff ff[         ]+mov    \$0xfffffff7,%eax
+[0-9a-f]+:   b8 f7 ff ff ff[         ]+mov    \$0xfffffff7,%eax
 #                              R_386_TLS_TPOFF32
   1080:      90[     ]+nop *
   1081:      90[     ]+nop *
   1082:      65 8b 15 00 00 00 00    mov    %gs:0x0,%edx
   1089:      90[     ]+nop *
   108a:      90[     ]+nop *
   108b:      29 c2[  ]+sub    %eax,%edx
   108d:      90[     ]+nop *
   108e:      90[     ]+nop *
   108f:      90[     ]+nop *
   1090:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00    mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   29 c2[  ]+sub    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, global var
   1091:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
   1097:      90[     ]+nop *
   1098:      90[     ]+nop *
   1099:      8d 90 02 00 00 00[      ]+lea    0x2\(%eax\),%edx
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 02 00 00 00[      ]+lea    0x2\(%eax\),%edx
 #                              R_386_TLS_TPOFF         sg4
   109f:      90[     ]+nop *
   10a0:      90[     ]+nop *
   10a1:      90[     ]+nop *
   10a2:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, hidden var, non-canonical sequence
   10a3:      b8 1c 00 00 00[         ]+mov    \$0x1c,%eax
+[0-9a-f]+:   b8 1c 00 00 00[         ]+mov    \$0x1c,%eax
 #                              R_386_TLS_TPOFF
   10a8:      90[     ]+nop *
   10a9:      90[     ]+nop *
   10aa:      65 8b 15 00 00 00 00    mov    %gs:0x0,%edx
   10b1:      90[     ]+nop *
   10b2:      90[     ]+nop *
   10b3:      01 c2[  ]+add    %eax,%edx
   10b5:      90[     ]+nop *
   10b6:      90[     ]+nop *
   10b7:      90[     ]+nop *
   10b8:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 15 00 00 00 00    mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   01 c2[  ]+add    %eax,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, local var, non-canonical sequence
   10b9:      65 8b 15 00 00 00 00    mov    %gs:0x0,%edx
   10c0:      90[     ]+nop *
   10c1:      90[     ]+nop *
   10c2:      81 c2 0d 00 00 00[      ]+add    \$0xd,%edx
+[0-9a-f]+:   65 8b 15 00 00 00 00    mov    %gs:0x0,%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   81 c2 0d 00 00 00[      ]+add    \$0xd,%edx
 #                              R_386_TLS_TPOFF
   10c8:      90[     ]+nop *
   10c9:      90[     ]+nop *
   10ca:      90[     ]+nop *
   10cb:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct %gs access
 #  LE @ntpoff, global var
   10cc:      65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
 #                              R_386_TLS_TPOFF         sg5
   10d2:      90[     ]+nop *
   10d3:      90[     ]+nop *
   10d4:      90[     ]+nop *
   10d5:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, local var
   10d6:      65 8b 15 13 00 00 00    mov    %gs:0x13,%edx
+[0-9a-f]+:   65 8b 15 13 00 00 00    mov    %gs:0x13,%edx
 #                              R_386_TLS_TPOFF
   10dd:      90[     ]+nop *
   10de:      90[     ]+nop *
   10df:      90[     ]+nop *
   10e0:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE @ntpoff, hidden var
   10e1:      65 8b 15 21 00 00 00    mov    %gs:0x21,%edx
+[0-9a-f]+:   65 8b 15 21 00 00 00    mov    %gs:0x21,%edx
 #                              R_386_TLS_TPOFF
   10e8:      90[     ]+nop *
   10e9:      90[     ]+nop *
   10ea:      90[     ]+nop *
   10eb:      90[     ]+nop *
   10ec:      8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
   10ef:      c9[     ]+leave *
   10f0:      c3[     ]+ret *
   10f1:      66 90[  ]+xchg   %ax,%ax
   10f3:      90[     ]+nop
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop
index 925c5d5..786aac6 100644 (file)
@@ -5,8 +5,8 @@
 #objdump: -sj.got
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.got:
2174 00000000 04000000 00000000 00000000  .*
2184 14000000 18000000  +.*
[0-9a-f]+4 00000000 04000000 00000000 00000000  .*
[0-9a-f]+4 14000000 18000000  +.*
diff --git a/ld/testsuite/ld-i386/tlspic-nacl.rd b/ld/testsuite/ld-i386/tlspic-nacl.rd
new file mode 100644 (file)
index 0000000..3ea30b1
--- /dev/null
@@ -0,0 +1,156 @@
+#source: tlspic1.s
+#source: tlspic2.s
+#as: --32
+#ld: -shared -melf_i386_nacl --no-ld-generated-unwind-info
+#readelf: -Ssrl
+#target: i?86-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.plt +.*
+ +\[[ 0-9]+\] \.text +.*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rel.dyn +.*
+ +\[[ 0-9]+\] \.rel.plt +.*
+ +\[[ 0-9]+\] \.tdata +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000060 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.tbss +NOBITS +[0-9aa-f]+ [0-9a-f]+ 000020 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] \.dynamic +.*
+ +\[[ 0-9]+\] \.got +.*
+ +\[[ 0-9]+\] \.got.plt +.*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x[0-9a-f]+
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+ +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.plt .text *
+ +01 +.hash .dynsym .dynstr .rel.dyn .rel.plt *
+ +02 +.tdata .dynamic .got .got.plt *
+ +03 +.dynamic *
+ +04 +.tdata .tbss *
+
+Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_TPOFF *
+[0-9a-f ]+R_386_TLS_DTPMOD3
+[0-9a-f ]+R_386_TLS_TPOFF32
+[0-9a-f ]+R_386_TLS_TPOFF +0+8 +sg3
+[0-9a-f ]+R_386_TLS_TPOFF32 0+c +sg4
+[0-9a-f ]+R_386_TLS_TPOFF +0+c +sg4
+[0-9a-f ]+R_386_TLS_TPOFF +0+10 +sg5
+[0-9a-f ]+R_386_TLS_DTPMOD3 0+ +sg1
+[0-9a-f ]+R_386_TLS_DTPOFF3 0+ +sg1
+[0-9a-f ]+R_386_TLS_TPOFF32 0+4 +sg2
+
+Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+ Offset +Info +Type +Sym.Value +Sym. Name
+[0-9a-f ]+R_386_JUMP_SLOT +0+ +___tls_get_addr
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +8 sg8
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +8 sg3
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +8 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +8 sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +8 sg1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +2 fn1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +8 sg2
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +8 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +8 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND ___tls_get_addr
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +11 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +12 *
+ +[0-9]+: 0+20 +0 +TLS +LOCAL +DEFAULT +8 sl1
+ +[0-9]+: 0+24 +0 +TLS +LOCAL +DEFAULT +8 sl2
+ +[0-9]+: 0+28 +0 +TLS +LOCAL +DEFAULT +8 sl3
+ +[0-9]+: 0+2c +0 +TLS +LOCAL +DEFAULT +8 sl4
+ +[0-9]+: 0+30 +0 +TLS +LOCAL +DEFAULT +8 sl5
+ +[0-9]+: 0+34 +0 +TLS +LOCAL +DEFAULT +8 sl6
+ +[0-9]+: 0+38 +0 +TLS +LOCAL +DEFAULT +8 sl7
+ +[0-9]+: 0+3c +0 +TLS +LOCAL +DEFAULT +8 sl8
+ +[0-9]+: 0+60 +0 +TLS +LOCAL +DEFAULT +9 sH1
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+48 +0 +TLS +LOCAL +DEFAULT +8 sh3
+ +[0-9]+: 0+64 +0 +TLS +LOCAL +DEFAULT +9 sH2
+ +[0-9]+: 0+78 +0 +TLS +LOCAL +DEFAULT +9 sH7
+ +[0-9]+: 0+58 +0 +TLS +LOCAL +DEFAULT +8 sh7
+ +[0-9]+: 0+5c +0 +TLS +LOCAL +DEFAULT +8 sh8
+ +[0-9]+: 0+6c +0 +TLS +LOCAL +DEFAULT +9 sH4
+ +[0-9]+: 0+4c +0 +TLS +LOCAL +DEFAULT +8 sh4
+ +[0-9]+: 0+68 +0 +TLS +LOCAL +DEFAULT +9 sH3
+ +[0-9]+: 0+50 +0 +TLS +LOCAL +DEFAULT +8 sh5
+ +[0-9]+: 0+70 +0 +TLS +LOCAL +DEFAULT +9 sH5
+ +[0-9]+: 0+74 +0 +TLS +LOCAL +DEFAULT +9 sH6
+ +[0-9]+: 0+7c +0 +TLS +LOCAL +DEFAULT +9 sH8
+ +[0-9]+: 0+40 +0 +TLS +LOCAL +DEFAULT +8 sh1
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+44 +0 +TLS +LOCAL +DEFAULT +8 sh2
+ +[0-9]+: 0+54 +0 +TLS +LOCAL +DEFAULT +8 sh6
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +8 sg8
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +8 sg3
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +8 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +8 sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +8 sg1
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +2 fn1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +8 sg2
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +8 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +8 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND ___tls_get_addr
index ace06e6..6746821 100644 (file)
 #objdump: -drj.text
 #target: i?86-*-*
 
-.*: +file format elf32-i386
+.*: +file format elf32-i386.*
 
 Disassembly of section .text:
 
 [0-9a-f]+ <fn1>:
[0-9a-f]+:    55[     ]+push   %ebp
[0-9a-f]+:    89 e5[  ]+mov    %esp,%ebp
[0-9a-f]+:    53[     ]+push   %ebx
[0-9a-f]+:    50[     ]+push   %eax
[0-9a-f]+:    e8 00 00 00 00[         ]+call   [0-9a-f]+ <fn1\+0xa>
[0-9a-f]+:    5b[     ]+pop    %ebx
[0-9a-f]+:    81 c3 42 14 00 00[      ]+add    \$0x[0-9a-f]+,%ebx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   55[     ]+push   %ebp
+[0-9a-f]+:   89 e5[  ]+mov    %esp,%ebp
+[0-9a-f]+:   53[     ]+push   %ebx
+[0-9a-f]+:   50[     ]+push   %eax
+[0-9a-f]+:   e8 00 00 00 00[         ]+call   [0-9a-f]+ <fn1\+0xa>
+[0-9a-f]+:   5b[     ]+pop    %ebx
+[0-9a-f]+:   81 c3 ([0-9a-f]{2} ){4}[        ]+add    \$0x[0-9a-f]+,%ebx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD
[0-9a-f]+:    8d 04 1d d4 ff ff ff[   ]+lea    -0x2c\(,%ebx,1\),%eax
+[0-9a-f]+:   8d 04 1d d4 ff ff ff[   ]+lea    -0x2c\(,%ebx,1\),%eax
 #                              ->R_386_TLS_DTPMOD32    sg1
[0-9a-f]+:    e8 cf ff ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gottpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 f0 ff ff ff[      ]+sub    -0x10\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 f0 ff ff ff[      ]+sub    -0x10\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sg2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gotntpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    03 83 b4 ff ff ff[      ]+add    -0x4c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 b4 ff ff ff[      ]+add    -0x4c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sg3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through @gottpoff and
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 c0 ff ff ff[      ]+sub    -0x40\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 c0 ff ff ff[      ]+sub    -0x40\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sg4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD against local variable
[0-9a-f]+:    8d 04 1d 88 ff ff ff[   ]+lea    -0x78\(,%ebx,1\),%eax
+[0-9a-f]+:   8d 04 1d 88 ff ff ff[   ]+lea    -0x78\(,%ebx,1\),%eax
 #                              ->R_386_TLS_DTPMOD32    [0x00000000 0x20000000]
[0-9a-f]+:    e8 8f ff ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through @gottpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 90 ff ff ff[      ]+sub    -0x70\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 90 ff ff ff[      ]+sub    -0x70\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xdcffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through @gotntpoff
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    03 83 94 ff ff ff[      ]+add    -0x6c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 94 ff ff ff[      ]+add    -0x6c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x28000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through @gottpoff and
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 98 ff ff ff[      ]+sub    -0x68\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 98 ff ff ff[      ]+sub    -0x68\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xd4ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD against hidden and local variable
[0-9a-f]+:    8d 04 1d f4 ff ff ff[   ]+lea    -0xc\(,%ebx,1\),%eax
+[0-9a-f]+:   8d 04 1d f4 ff ff ff[   ]+lea    -0xc\(,%ebx,1\),%eax
 #                              ->R_386_TLS_DTPMOD32    [0x00000000 0x40000000]
[0-9a-f]+:    e8 4f ff ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through @gottpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 fc ff ff ff[      ]+sub    -0x4\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 fc ff ff ff[      ]+sub    -0x4\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xbcffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through @gotntpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    03 83 b8 ff ff ff[      ]+add    -0x48\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 b8 ff ff ff[      ]+add    -0x48\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x48000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through @gottpoff and @gotntpoff too
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 dc ff ff ff[      ]+sub    -0x24\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 dc ff ff ff[      ]+sub    -0x24\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xb4ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD against hidden but not local variable
[0-9a-f]+:    8d 04 1d ac ff ff ff[   ]+lea    -0x54\(,%ebx,1\),%eax
+[0-9a-f]+:   8d 04 1d ac ff ff ff[   ]+lea    -0x54\(,%ebx,1\),%eax
 #                              ->R_386_TLS_DTPMOD32    [0x00000000 0x60000000]
[0-9a-f]+:    e8 0f ff ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 bc ff ff ff[      ]+sub    -0x44\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 bc ff ff ff[      ]+sub    -0x44\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0x9cffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    03 83 e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   03 83 e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x68000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    2b 83 cc ff ff ff[      ]+sub    -0x34\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   2b 83 cc ff ff ff[      ]+sub    -0x34\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0x94ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD
[0-9a-f]+:    8d 83 a4 ff ff ff[      ]+lea    -0x5c\(%ebx\),%eax
+[0-9a-f]+:   8d 83 a4 ff ff ff[      ]+lea    -0x5c\(%ebx\),%eax
 #                              ->R_386_TLS_DTPMOD32    [0x00000000 0x00000000]
[0-9a-f]+:    e8 d0 fe ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 20 00 00 00[      ]+lea    0x20\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 20 00 00 00[      ]+lea    0x20\(%eax\),%edx
 #                                                      sl1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 26 00 00 00[      ]+lea    0x26\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 26 00 00 00[      ]+lea    0x26\(%eax\),%ecx
 #                                                      sl2+2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD against hidden and local variables
[0-9a-f]+:    8d 83 a4 ff ff ff[      ]+lea    -0x5c\(%ebx\),%eax
+[0-9a-f]+:   8d 83 a4 ff ff ff[      ]+lea    -0x5c\(%ebx\),%eax
 #                              ->R_386_TLS_DTPMOD32    [0x00000000 0x00000000]
[0-9a-f]+:    e8 b1 fe ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 40 00 00 00[      ]+lea    0x40\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 40 00 00 00[      ]+lea    0x40\(%eax\),%edx
 #                                                      sh1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 47 00 00 00[      ]+lea    0x47\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 47 00 00 00[      ]+lea    0x47\(%eax\),%ecx
 #                                                      sh2+3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD against hidden but not local variables
[0-9a-f]+:    8d 83 a4 ff ff ff[      ]+lea    -0x5c\(%ebx\),%eax
+[0-9a-f]+:   8d 83 a4 ff ff ff[      ]+lea    -0x5c\(%ebx\),%eax
 #                              ->R_386_TLS_DTPMOD32    [0x00000000 0x00000000]
[0-9a-f]+:    e8 92 fe ff ff[         ]+call   [0-9a-f]+ <___tls_get_addr@plt>
+[0-9a-f]+:   e8 ([0-9a-f]{2} ){4}[   ]+call   [0-9a-f]+ <___tls_get_addr@plt>
 #                              ->R_386_JUMP_SLOT       ___tls_get_addr
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 90 60 00 00 00[      ]+lea    0x60\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 90 60 00 00 00[      ]+lea    0x60\(%eax\),%edx
 #                                                      sH1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8d 88 65 00 00 00[      ]+lea    0x65\(%eax\),%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8d 88 65 00 00 00[      ]+lea    0x65\(%eax\),%ecx
 #                                                      sH2+1
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b f0 ff ff ff[      ]+sub    -0x10\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b f0 ff ff ff[      ]+sub    -0x10\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     sg2
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 c0 ff ff ff[      ]+sub    -0x40\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 c0 ff ff ff[      ]+sub    -0x40\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     sg4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b b4 ff ff ff[      ]+add    -0x4c\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b b4 ff ff ff[      ]+add    -0x4c\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sg3
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against global var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 c4 ff ff ff[      ]+add    -0x3c\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 c4 ff ff ff[      ]+add    -0x3c\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       sg4
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b 90 ff ff ff[      ]+sub    -0x70\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b 90 ff ff ff[      ]+sub    -0x70\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     [0xdcffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 98 ff ff ff[      ]+sub    -0x68\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 98 ff ff ff[      ]+sub    -0x68\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xd4ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b 94 ff ff ff[      ]+add    -0x6c\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b 94 ff ff ff[      ]+add    -0x6c\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x28000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 9c ff ff ff[      ]+add    -0x64\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 9c ff ff ff[      ]+add    -0x64\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x2c000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden and local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b fc ff ff ff[      ]+sub    -0x4\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b fc ff ff ff[      ]+sub    -0x4\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     [0xbcffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden and local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 dc ff ff ff[      ]+sub    -0x24\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 dc ff ff ff[      ]+sub    -0x24\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0xb4ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden and local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b b8 ff ff ff[      ]+add    -0x48\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b b8 ff ff ff[      ]+add    -0x48\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x48000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden and local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 e0 ff ff ff[      ]+add    -0x20\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 e0 ff ff ff[      ]+add    -0x20\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x4c000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden but not local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 8b bc ff ff ff[      ]+sub    -0x44\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 8b bc ff ff ff[      ]+sub    -0x44\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF32     [0x9cffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gottpoff IE against hidden but not local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    2b 83 cc ff ff ff[      ]+sub    -0x34\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   2b 83 cc ff ff ff[      ]+sub    -0x34\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF32     [0x94ffffff]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden but not local var
[0-9a-f]+:    65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 8b e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%ecx
+[0-9a-f]+:   65 8b 0d 00 00 00 00[   ]+mov    %gs:0x0,%ecx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 8b e4 ff ff ff[      ]+add    -0x1c\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x68000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden but not local var
[0-9a-f]+:    65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    03 83 d0 ff ff ff[      ]+add    -0x30\(%ebx\),%eax
+[0-9a-f]+:   65 a1 00 00 00 00[      ]+mov    %gs:0x0,%eax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   03 83 d0 ff ff ff[      ]+add    -0x30\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x6c000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %gs
 #  @gotntpoff IE against global var
[0-9a-f]+:    8b 8b c8 ff ff ff[      ]+mov    -0x38\(%ebx\),%ecx
+[0-9a-f]+:   8b 8b c8 ff ff ff[      ]+mov    -0x38\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       sg5
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against local var
[0-9a-f]+:    8b 83 a0 ff ff ff[      ]+mov    -0x60\(%ebx\),%eax
+[0-9a-f]+:   8b 83 a0 ff ff ff[      ]+mov    -0x60\(%ebx\),%eax
 #                              ->R_386_TLS_TPOFF       [0x30000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 10[       ]+mov    %gs:\(%eax\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 10[       ]+mov    %gs:\(%eax\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden and local var
[0-9a-f]+:    8b 93 e8 ff ff ff[      ]+mov    -0x18\(%ebx\),%edx
+[0-9a-f]+:   8b 93 e8 ff ff ff[      ]+mov    -0x18\(%ebx\),%edx
 #                              ->R_386_TLS_TPOFF       [0x50000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 12[       ]+mov    %gs:\(%edx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 12[       ]+mov    %gs:\(%edx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  @gotntpoff IE against hidden but not local var
[0-9a-f]+:    8b 8b ec ff ff ff[      ]+mov    -0x14\(%ebx\),%ecx
+[0-9a-f]+:   8b 8b ec ff ff ff[      ]+mov    -0x14\(%ebx\),%ecx
 #                              ->R_386_TLS_TPOFF       [0x70000000]
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    90[     ]+nop *
[0-9a-f]+:    8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
[0-9a-f]+:    c9[     ]+leave *
[0-9a-f]+:    c3[     ]+ret *
[0-9a-f]+:    66 90[  ]+xchg   %ax,%ax
[0-9a-f]+:    90[     ]+nop
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   65 8b 11[       ]+mov    %gs:\(%ecx\),%edx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   8b 5d fc[       ]+mov    -0x4\(%ebp\),%ebx
+[0-9a-f]+:   c9[     ]+leave *
+[0-9a-f]+:   c3[     ]+ret *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop
index 15b3b93..0b10ba2 100644 (file)
@@ -5,7 +5,7 @@
 #objdump: -sj.got
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.got:
  [0-9a-f]+ 00000000 20000000 dcffffff 28000000  .*
index a96d6f6..d4c64a3 100644 (file)
@@ -5,7 +5,7 @@
 #objdump: -sj.tdata
 #target: i?86-*-*
 
-.*:     file format elf32-i386
+.*:     file format elf32-i386.*
 
 Contents of section \.tdata:
  [0-9a-f]+ 11000000 12000000 13000000 14000000  .*
index 16d6ae4..799d646 100644 (file)
@@ -8,6 +8,6 @@
 
 Disassembly of section .text:
 
-0+188 <_start>:
+[0-9a-f]+ <_start>:
 [      ]*[a-f0-9]+:    8d 05 fc ff ff ff       lea    0xfffffffc,%eax
 #pass
index d24caf8..e035421 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for binutils tests
-#   Copyright 2009, 2010 Free Software Foundation, Inc.
+#   Copyright 2009, 2010, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
 # Make sure that binutils can correctly handle ld output in ELF with
 # STT_GNU_IFUNC symbols.
 
-if { !([istarget "i?86-*-elf*"]                
+if { !([istarget "i?86-*-elf*"]
        || (([istarget "i?86-*-linux*"]
            || [istarget "i?86-*-gnu*"])
           && ![istarget "*-*-*aout*"]
           && ![istarget "*-*-*oldld*"])
+       || [istarget "i?86-*-nacl*"]
+       || [istarget "x86_64-*-nacl*"]
        || [istarget "x86_64-*-linux*"]
        || [istarget "amd64-*-linux*"]) } {
     return
index 60599ff..3eef3a9 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for linker support of IFUNC symbols and relocations.
 #
-#   Copyright 2009, 2010 Free Software Foundation, Inc.
+#   Copyright 2009, 2010, 2012 Free Software Foundation, Inc.
 #   Contributed by Red Hat.
 #
 # This file is part of the GNU Binutils.
@@ -30,6 +30,7 @@ if {!(([istarget "i?86-*-*"]
        || [istarget "powerpc*-*-*"]
        || [istarget "sparc*-*-*"])
       && ([istarget "*-*-elf*"]
+         || [istarget "*-*-nacl*"]
          || (([istarget "*-*-linux*"]
               || [istarget "*-*-gnu*"])
              && ![istarget "*-*-*aout*"]
@@ -77,7 +78,7 @@ proc check_osabi { binary_file expected_osabi } {
     }
 
     verbose "Expected OSABI: $expected_osabi, Obtained osabi: $osabi"
-    
+
     return 0
 }
 
index e8b85ac..0211114 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld linkonce tests
-#   Copyright 2001, 2002, 2005, 2007, 2010 Free Software Foundation, Inc.
+#   Copyright 2001, 2002, 2005, 2007, 2010, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -26,6 +26,7 @@
 
 if { ![istarget *-*-linux*] \
      && ![istarget *-*-gnu*] \
+     && ![istarget *-*-nacl*] \
      && ![istarget hppa*64*-*-hpux*] \
      && ![istarget *-*-elf] } {
     return
index ea4370c..1e00130 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various PIE tests.
-#   Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+#   Copyright 2006, 2007, 2009, 2010, 2012 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -23,6 +23,7 @@
 if ![isnative] then {return}
 
 if { ![istarget *-*-linux*]
+     && ![istarget *-*-nacl*] } {
      && ![istarget *-*-gnu*] } {
     return
 }
index c31ac7d..b5ada60 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for ld-shared tests
 #   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-#   2004, 2005, 2007, 2008, 2009, 2010
+#   2004, 2005, 2007, 2008, 2009, 2010, 2012
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -39,6 +39,7 @@ if { ![istarget hppa*64*-*-hpux*] \
      && ![istarget i?86-*-elf*] \
      && ![istarget i?86-*-linux*] \
      && ![istarget i?86-*-gnu*] \
+     && ![istarget *-*-nacl*] \
      && ![istarget ia64-*-elf*] \
      && ![istarget ia64-*-linux*] \
      && ![istarget m68k-*-linux*] \
@@ -101,13 +102,13 @@ if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
 
 if [istarget arm*-*-linux*] {
     # On ARM section anchors can change the symbol pre-emptability for
-    # non-PIC shared libraries, causing these tests to fail.  Turn section 
+    # non-PIC shared libraries, causing these tests to fail.  Turn section
     # anchors off.
     set SHCFLAG "-fno-section-anchors"
 
-    # On targets that have MOVW the compiler will emit relocations which 
+    # On targets that have MOVW the compiler will emit relocations which
     # the linker doesn't support when compiling -shared without -fpic.  The
-    # test to find out whether we want to XFAIL the non-PIC tests requires 
+    # test to find out whether we want to XFAIL the non-PIC tests requires
     # a compile - so we pre-calculate it here.  We also note that this can
     # only affect arm*-*-*eabi targets as the old ABI doesn't support v7.
     if [istarget arm*-*-*eabi] {
@@ -275,7 +276,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
 
     # Now compile the code using -fpic.
 
-    if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o] 
+    if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
         || ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
        unresolved "shared"
     } else {
@@ -288,7 +289,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
            shared_test shp "shared" mainnp.o sh1p.o sh2p.o shared
            ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o
            ld_compile "$CC $CFLAGS -DSYMBOLIC_TEST -DXCOFF_TEST $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o
-           shared_test shp "shared -Bsymbolic" mainnp.o sh1p.o sh2p.o symbolic "-Bsymbolic" 
+           shared_test shp "shared -Bsymbolic" mainnp.o sh1p.o sh2p.o symbolic "-Bsymbolic"
            ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o
            ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o
        } }
index 2f70eeb..c802a11 100644 (file)
@@ -1,5 +1,5 @@
 # Test handling of weak undefined symbols
-#   Copyright 2001, 2002, 2004, 2005, 2007, 2010, 2011
+#   Copyright 2001, 2002, 2004, 2005, 2007, 2010, 2011, 2012
 #   Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -31,6 +31,7 @@ if { ![istarget *-*-sysv4*] \
      && ![istarget hppa*64*-*-hpux*] \
      && ![istarget *-*-linux*] \
      && ![istarget *-*-gnu*] \
+     && ![istarget *-*-nacl*] \
      && ![istarget *-*-irix5*] \
      && ![istarget *-*-irix6*] \
      && ![is_pecoff_format] \
index d9e93ca..646e5ec 100644 (file)
@@ -1,6 +1,6 @@
 # Expect script for linker support of STB_GNU_UNIQUE symbols
 #
-#   Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
+#   Copyright 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #   Contributed by Red Hat.
 #
 # This file is part of the GNU Binutils.
@@ -32,6 +32,7 @@ if {!(([istarget "i?86-*-*"]
        || [istarget "powerpc*-*-*"]
        || [istarget "sparc*-*-*"])
       && ([istarget "*-*-elf*"]
+         || [istarget "*-*-nacl*"]
          || (([istarget "*-*-linux*"]
               || [istarget "*-*-gnu*"])
              && ![istarget "*-*-*aout*"]
index 1b2231c..1fb96d4 100644 (file)
@@ -4,6 +4,7 @@
 #as: --64 -march=l1om
 #ld: -m elf_l1om
 #objdump: -rs -j .text
+#target: x86_64-*-linux*
 
 .*:     file format .*
 
index 8137a3d..9de192e 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for DWARF relocation test.
-#   Copyright 2008  Free Software Foundation, Inc.
+#   Copyright 2008, 2012  Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
 # `ld -r'.
 #
 #  <1><57>: Abbrev Number: 2 (DW_TAG_variable)
-#     <58>   DW_AT_name        : i2    
+#     <58>   DW_AT_name        : i2
 #  ...
-#     <5d>   DW_AT_type        : <0x32>        
+#     <5d>   DW_AT_type        : <0x32>
 # vs.
-#     <5d>   DW_AT_type        : <0x0> 
+#     <5d>   DW_AT_type        : <0x0>
 
 # Only the testcase .s files are arch-dependent, the relocations are cross-arch.
 if { !([istarget "x86_64-*-elf*"]
+       || [istarget "x86_64-*-nacl*"]
        || [istarget "x86_64-*-linux*"]) } {
     return
 }
index 9a29f9a..d51c2fb 100644 (file)
@@ -8,6 +8,6 @@
 Disassembly of section .text:
 
 [a-f0-9]+ <bar>:
-[      ]*[a-f0-9]+:    e8 33 fe ff ff          callq  0 .*
-[      ]*[a-f0-9]+:    c3                      retq   
+[      ]*[a-f0-9]+:    e8 ([0-9a-f]{2} ){4} *  callq  0 .*
+[      ]*[a-f0-9]+:    c3                      retq *
 #pass
diff --git a/ld/testsuite/ld-x86-64/ilp32-4-nacl.d b/ld/testsuite/ld-x86-64/ilp32-4-nacl.d
new file mode 100644 (file)
index 0000000..4de7e66
--- /dev/null
@@ -0,0 +1,32 @@
+#source: ilp32-4.s
+#as: --x32
+#ld: -m elf32_x86_64_nacl -shared --no-ld-generated-unwind-info
+#readelf: -d -S --wide
+#target: x86_64-*-nacl*
+
+There are 9 section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Addr +Off +Size +ES +Flg +Lk +Inf +Al
+ +\[ 0\] +NULL +0+ 0+ 0+ 00 +0 +0 +0
+ +\[ 1\] \.text +PROGBITS +0+ 0+10000 +0+1 +00 +AX +0 +0 +4
+ +\[ 2\] \.hash +HASH +100000b4 +0+b4 +0+2c +04 +A +3 +0 +4
+ +\[ 3\] \.dynsym +DYNSYM +100000e0 +0+e0 +0+60 +10 +A +4 +2 +4
+ +\[ 4\] \.dynstr +STRTAB +10000140 +0+140 +0+19 +00 +A +0 +0 +1
+ +\[ 5\] \.dynamic +DYNAMIC +1001015c +0+15c +0+58 +08 +WA +4 +0 +4
+ +\[ 6\] \.shstrtab +STRTAB +0+ +0+10001 +0+40 +00 +0 +0 +1
+ +\[ 7\] \.symtab +SYMTAB +0+0 +0+101ac +0+c0 +10 +8 +8 +4
+ +\[ 8\] \.strtab +STRTAB +0+ 0+1026c 0+3f +00 +0 +0 +1
+Key to Flags:
+  W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), l \(large\)
+  I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
+  O \(extra OS processing required\) o \(OS specific\), p \(processor specific\)
+
+Dynamic section at offset 0x15c contains 6 entries:
+  Tag        Type                         Name/Value
+ 0x00000004 \(HASH\)                       0x100000b4
+ 0x00000005 \(STRTAB\)                     0x10000140
+ 0x00000006 \(SYMTAB\)                     0x100000e0
+ 0x0000000a \(STRSZ\)                      25 \(bytes\)
+ 0x0000000b \(SYMENT\)                     16 \(bytes\)
+ 0x00000000 \(NULL\)                       0x0
index 92d8a67..8c2d22c 100644 (file)
@@ -1,6 +1,7 @@
 #as: --x32
 #ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info
 #readelf: -d -S --wide
+#target: x86_64-*-linux*
 
 There are 9 section headers, starting at offset 0x1d8:
 
index 2fe2c60..500d1e5 100644 (file)
@@ -1,13 +1,13 @@
 #as: --x32
-#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000
+#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000 -Ttext 0xe0010000
 #objdump: -dw
 
-.*: +file format elf32-x86-64
+.*: +file format elf32-x86-64.*
 
 
 Disassembly of section .text:
 
-e0000054 <_start>:
-[      ]*[a-f0-9]+:    48 b8 54 00 00 e0 00 00 00 00   movabs \$0xe0000054,%rax
-[      ]*[a-f0-9]+:    48 a1 54 00 00 e0 00 00 00 00   movabs 0xe0000054,%rax
+e0010000 <_start>:
+[      ]*[a-f0-9]+:    48 b8 00 00 01 e0 00 00 00 00   movabs \$0xe0010000,%rax
+[      ]*[a-f0-9]+:    48 a1 00 00 01 e0 00 00 00 00   movabs 0xe0010000,%rax
 #pass
index 8fced17..e73d53d 100644 (file)
@@ -1,9 +1,9 @@
 #as: --x32
-#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000
+#ld: -m elf32_x86_64 -Ttext-segment 0xe0000000 -Ttext 0xe0010000
 #objdump: -s -j .text
 
 .*: +file format .*
 
 Contents of section .text:
- e0000054 540000e0 00000000                    T.......        
+ e0010000 000001e0 00000000                    ........        
 #pass
index c68daaa..3ddaf17 100644 (file)
@@ -1,6 +1,6 @@
 # Test that the linker reports undefined symbol line number correctly.
 #
-#   Copyright 2007  Free Software Foundation, Inc.
+#   Copyright 2007, 2012  Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
 # MA 02110-1301, USA.
 
 if { !([istarget "x86_64-*-elf*"]
+       || [istarget "x86_64-*-nacl*"]
        || [istarget "x86_64-*-linux*"]) } {
     return
 }
 
+if [istarget "*-*-nacl*"] {
+    set emul "elf_x86_64_nacl"
+} else {
+    set emul "elf_x86_64"
+}
+
 set testline "undefined line"
 
 if ![ld_assemble $as "--64 $srcdir/$subdir/undefined.s" tmpdir/undefined.o] {
@@ -36,8 +43,8 @@ remote_file host delete "tmpdir/undefined"
 
 # Using -e start prevents the SunOS linker from trying to build a
 # shared library.
-send_log "$ld -e start -melf_x86_64 -o tmpdir/undefined tmpdir/undefined.o\n"
-set exec_output [run_host_cmd "$ld" "-e start -melf_x86_64 -o tmpdir/undefined tmpdir/undefined.o"]
+send_log "$ld -e start -m$emul -o tmpdir/undefined tmpdir/undefined.o\n"
+set exec_output [run_host_cmd "$ld" "-e start -m$emul -o tmpdir/undefined tmpdir/undefined.o"]
 
 send_log "$exec_output\n"
 verbose "$exec_output"
index 5bbbb3e..b9dff1f 100644 (file)
@@ -3,7 +3,7 @@
 #ld: -Ttext 0x0
 #objdump: -drj.text -m i8086
 
-.*: +file format elf.*-x86-64
+.*: +file format elf.*-x86-64.*
 
 Disassembly of section .text:
 
diff --git a/ld/testsuite/ld-x86-64/plt-nacl.pd b/ld/testsuite/ld-x86-64/plt-nacl.pd
new file mode 100644 (file)
index 0000000..9a6c6b3
--- /dev/null
@@ -0,0 +1,54 @@
+#source: plt.s
+#as: --64
+#ld: -melf_x86_64_nacl
+#objdump: -drj.plt
+#target: x86_64-*-nacl*
+
+.*: +file format .*
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <fn1@plt-0x40>:
+ +[0-9a-f]+:   ff 35 ([0-9a-f]{2} ){4} *       pushq  0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x8>
+ +[0-9a-f]+:   4c 8b 1d ([0-9a-f]{2} ){4} *    mov    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x10>
+ +[0-9a-f]+:   41 83 e3 e0             and    \$0xffffffe0,%r11d
+ +[0-9a-f]+:   4d 01 fb                add    %r15,%r11
+ +[0-9a-f]+:   41 ff e3                jmpq   \*%r11
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 66 2e 0f 1f 84 00    data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   00 00 00 00 *
+
+[0-9a-f]+ <fn1@plt>:
+ +[0-9a-f]+:   4c 8b 1d ([0-9a-f]{2} ){4} *    mov    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x18>
+ +[0-9a-f]+:   41 83 e3 e0             and    \$0xffffffe0,%r11d
+ +[0-9a-f]+:   4d 01 fb                add    %r15,%r11
+ +[0-9a-f]+:   41 ff e3                jmpq   \*%r11
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   68 00 00 00 00          pushq  \$0x0
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmpq   [0-9a-f]+ <fn1@plt-0x40>
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   0f 1f 80 00 00 00 00    nopl   0x0\(%rax\)
+
+[0-9a-f]+ <fn2@plt>:
+ +[0-9a-f]+:   4c 8b 1d ([0-9a-f]{2} ){4} *    mov    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x20>
+ +[0-9a-f]+:   41 83 e3 e0             and    \$0xffffffe0,%r11d
+ +[0-9a-f]+:   4d 01 fb                add    %r15,%r11
+ +[0-9a-f]+:   41 ff e3                jmpq   \*%r11
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   68 01 00 00 00          pushq  \$0x1
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmpq   [0-9a-f]+ <fn1@plt-0x40>
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   0f 1f 80 00 00 00 00    nopl   0x0\(%rax\)
diff --git a/ld/testsuite/ld-x86-64/plt-pic.s b/ld/testsuite/ld-x86-64/plt-pic.s
new file mode 100644 (file)
index 0000000..a6f03de
--- /dev/null
@@ -0,0 +1,6 @@
+       .text
+       .globl foo
+       .type foo,@function
+foo:
+       call fn1@plt
+       jmp fn2@plt
diff --git a/ld/testsuite/ld-x86-64/plt.pd b/ld/testsuite/ld-x86-64/plt.pd
new file mode 100644 (file)
index 0000000..b11cc22
--- /dev/null
@@ -0,0 +1,24 @@
+#source: plt.s
+#as: --64
+#ld: -melf_x86_64
+#objdump: -drj.plt
+#target: x86_64-*-*
+
+.*: +file format .*
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <fn1@plt-0x10>:
+ +[0-9a-f]+:   ff 35 ([0-9a-f]{2} ){4} *       pushq  0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x8>
+ +[0-9a-f]+:   ff 25 ([0-9a-f]{2} ){4} *       jmpq   \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x10>
+ +[0-9a-f]+:   0f 1f 40 00             nopl   0x0\(%rax\)
+
+[0-9a-f]+ <fn1@plt>:
+ +[0-9a-f]+:   ff 25 ([0-9a-f]{2} ){4} *       jmpq   \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x18>
+ +[0-9a-f]+:   68 00 00 00 00          pushq  \$0x0
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmpq   [0-9a-f]+ <fn1@plt-0x10>
+
+[0-9a-f]+ <fn2@plt>:
+ +[0-9a-f]+:   ff 25 ([0-9a-f]{2} ){4} *       jmpq   \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x20>
+ +[0-9a-f]+:   68 01 00 00 00          pushq  \$0x1
+ +[0-9a-f]+:   e9 ([0-9a-f]{2} ){4} *  jmpq   [0-9a-f]+ <fn1@plt-0x10>
diff --git a/ld/testsuite/ld-x86-64/plt.s b/ld/testsuite/ld-x86-64/plt.s
new file mode 100644 (file)
index 0000000..3fd01af
--- /dev/null
@@ -0,0 +1,6 @@
+       .text
+       .globl _start
+       .type _start,@function
+_start:
+       call fn1
+       call fn2
diff --git a/ld/testsuite/ld-x86-64/pltlib.s b/ld/testsuite/ld-x86-64/pltlib.s
new file mode 100644 (file)
index 0000000..99e2bb4
--- /dev/null
@@ -0,0 +1,10 @@
+       .text
+       .globl fn1
+       .type fn1,@function
+fn1:
+       ret
+
+       .globl fn2
+       .type fn2,@function
+fn2:
+       ret
index ed04fd6..a5e904e 100644 (file)
@@ -3,15 +3,15 @@
 #ld: -melf_x86_64
 #readelf: -S --wide
 
-There are 5 section headers, starting at offset 0xa0:
+There are 5 section headers, starting at offset 0x[0-9a-f]+:
 
 Section Headers:
 \[Nr\] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
 \[ 0\]                   NULL            0000000000000000 000000 000000 00      0   0  0
 \[ 1\] .text             PROGBITS        0000000000400078 000078 000006 00  AX  0   0  4
 \[ 2\] .shstrtab         STRTAB          0000000000000000 00007e 000021 00      0   0  1
 \[ 3\] .symtab           SYMTAB          0000000000000000 0001e0 0000a8 18      4   2  8
 \[ 4\] .strtab           STRTAB          0000000000000000 000288 000024 00      0   0  1
+\[Nr\] Name +Type +Address +Off +Size +ES +Flg +Lk +Inf +Al
+\[ 0\] +NULL +0+ +0+ +0+ +0+ +0 +0 +0
+\[ 1\] +.text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +000006 00 +AX +0 +0 +4
+\[ 2\] +.shstrtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ +0+ +0 +0 +1
+\[ 3\] +.symtab +SYMTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 18 +4 +2 +8
+\[ 4\] +.strtab +STRTAB +0+ +[0-9a-f]+ +[0-9a-f]+ 00 +0 +0 +1
 Key to Flags:
   W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), l \(large\)
   I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
index c0fe8ab..5c9537b 100644 (file)
@@ -3,17 +3,17 @@
 #ld: -melf_x86_64
 #readelf: -S --wide
 
-There are 7 section headers, starting at offset 0x2058:
+There are 7 section headers, starting at offset 0x[0-9a-f]+:
 
 Section Headers:
 \[Nr\] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
 \[ 0\]                   NULL            0000000000000000 000000 000000 00      0   0  0
 \[ 1\] .text             PROGBITS        0000000000401000 001000 000001 00  AX  0   0 4096
 \[ 2\] .data             PROGBITS        0000000000602000 002000 000028 00  WA  0   0 4096
 \[ 3\] .bss              NOBITS          0000000000603000 002028 010000 00  WA  0   0 4096
 \[ 4\] .shstrtab         STRTAB          0000000000000000 002028 00002c 00      0   0  1
 \[ 5\] .symtab           SYMTAB          0000000000000000 002218 000120 18      6   6  8
 \[ 6\] .strtab           STRTAB          0000000000000000 002338 000037 00      0   0  1
+\[Nr\] Name +Type +Address +Off +Size +ES +Flg +Lk +Inf +Al
+\[ 0\] +NULL +0+ +0+ +0+ +0+ +0 +0 +0
+\[ 1\] .text +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+1 00 +AX +0 +0 +4096
+\[ 2\] .data +PROGBITS +[0-9a-f]+ +[0-9a-f]+000 +0+28 +00 +WA +0 +0 +4096
+\[ 3\] .bss +NOBITS +[0-9a-f]+ +[0-9a-f]+028 +0+10000 +00 +WA +0 +0 +4096
+\[ 4\] .shstrtab +STRTAB +0+ +[0-9a-f]+ +0+2c +00 +0 +0 +1
+\[ 5\] .symtab +SYMTAB +0+ +[0-9a-f]+ +0+120 +18 +6 +6 +8
+\[ 6\] .strtab +STRTAB +0+ +[0-9a-f]+ +0+37 +00 +0 +0 +1
 Key to Flags:
   W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), l \(large\)
   I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
index 32311a2..9142f8e 100644 (file)
@@ -2,6 +2,7 @@
 #as: --64 -march=l1om
 #ld: -shared -melf_l1om
 #objdump: -drw --insn-width=7
+#target: x86_64-*-linux*
 
 .*: +file format .*
 
index 701d4e1..9ecc89c 100644 (file)
@@ -2,6 +2,7 @@
 #as: --64 -march=l1om
 #ld: -shared -melf_l1om
 #readelf: -h
+#target: x86_64-*-linux*
 
 ELF Header:
   Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
index 897c1cf..22a36ac 100644 (file)
@@ -8,6 +8,6 @@
 Disassembly of section .text:
 
 0+[a-f0-9]+ <bar>:
-[      ]*[a-f0-9]+:    8b 05 [a-f0-9][a-f0-9] 00 [a-f0-9][a-f0-9] 00           mov    0x[a-f0-9]+\(%rip\),%eax        # [a-f0-9]+ <foo>
-[      ]*[a-f0-9]+:    c3                      retq   
+[      ]*[a-f0-9]+:    8b 05 ([0-9a-f]{2} ){4} *       mov    0x[a-f0-9]+\(%rip\),%eax        # [a-f0-9]+ <foo>
+[      ]*[a-f0-9]+:    c3                      retq *
 #pass
diff --git a/ld/testsuite/ld-x86-64/split-by-file-nacl.rd b/ld/testsuite/ld-x86-64/split-by-file-nacl.rd
new file mode 100644 (file)
index 0000000..7c63aaa
--- /dev/null
@@ -0,0 +1,17 @@
+There are 9 section headers, starting at offset 0x80:
+
+Section Headers:
+  \[Nr\] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
+  \[ 0\]                   NULL            0000000000000000 000000 000000 00      0   0  0
+  \[ 1\] .text             PROGBITS        0000000000000000 000040 000000 00  AX  0   0  4
+  \[ 2\] .foo              PROGBITS        0000000000000000 000040 000003 00 AXl  0   0  1
+  \[ 3\] .data             PROGBITS        0000000000000000 000044 000000 00  WA  0   0  4
+  \[ 4\] .bss              NOBITS          0000000000000000 000044 000000 00  WA  0   0  4
+  \[ 5\] .foo.0            PROGBITS        0000000000000003 000044 000003 00 AXl  0   0  1
+  \[ 6\] .shstrtab         STRTAB          0000000000000000 000047 000038 00      0   0  1
+  \[ 7\] .symtab           SYMTAB          0000000000000000 0002c0 0000d8 18      8   6  8
+  \[ 8\] .strtab           STRTAB          0000000000000000 000398 000016 00      0   0  1
+Key to Flags:
+  W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\), l \(large\)
+  I \(info\), L \(link order\), G \(group\), T \(TLS\), E \(exclude\), x \(unknown\)
+  O \(extra OS processing required\) o \(OS specific\), p \(processor specific\)
diff --git a/ld/testsuite/ld-x86-64/tlsbin-nacl.rd b/ld/testsuite/ld-x86-64/tlsbin-nacl.rd
new file mode 100644 (file)
index 0000000..5655b8c
--- /dev/null
@@ -0,0 +1,149 @@
+#source: tlsbinpic.s
+#source: tlsbin.s
+#as: --64
+#ld: -shared -melf_x86_64_nacl --no-ld-generated-unwind-info
+#readelf: -WSsrl
+#target: x86_64-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 00 +0 +0 +0
+ +\[[ 0-9]+\] .plt +.*
+ +\[[ 0-9]+\] .text +PROGBITS +0+21000 [0-9a-f]+ 0+234 00 +AX +0 +0 +4096
+ +\[[ 0-9]+\] .interp +.*
+ +\[[ 0-9]+\] .hash +.*
+ +\[[ 0-9]+\] .dynsym +.*
+ +\[[ 0-9]+\] .dynstr +.*
+ +\[[ 0-9]+\] .rela.dyn +.*
+ +\[[ 0-9]+\] .rela.plt +.*
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+100303b0 [0-9a-f]+ 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+10030410 [0-9a-f]+ 0+40 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+10030410 [0-9a-f]+ 0+140 10 +WA +6 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+10030550 [0-9a-f]+ 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+10030570 [0-9a-f]+ 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .shstrtab +.*
+ +\[[ 0-9]+\] .symtab +.*
+ +\[[ 0-9]+\] .strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is EXEC \(Executable file\)
+Entry point 0x2113c
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +PHDR.*
+ +INTERP.*
+.*Requesting program interpreter.*
+ +LOAD +0x0+10000 0x0+20000 0x0+20000 0x0+1234 0x0+1234 R E +0x10000
+ +LOAD +0x0+ 0x0+10020000 0x0+10020000 0x0+3b0 0x0+3b0 R +0x10000
+ +LOAD +0x0+3b0 0x0+100303b0 0x0+100303b0 0x0+1e0 0x0+1e0 RW +0x10000
+ +DYNAMIC +0x0+410 0x0+10030410 0x0+10030410 0x0+140 0x0+140 RW +0x8
+ +TLS +0x0+3b0 0x0+100303b0 0x0+100303b0 0x0+60 0x0+a0 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 *
+ +01 +.interp *
+ +02 +.plt .text *
+ +03 +.interp .hash .dynsym .dynstr .rela.dyn .rela.plt *
+ +04 +.tdata .dynamic .got .got.plt *
+ +05 +.dynamic *
+ +06 +.tdata .tbss *
+
+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+[0-9a-f ]+R_X86_64_TPOFF64 +0+ sG5 \+ 0
+[0-9a-f ]+R_X86_64_TPOFF64 +0+ sG2 \+ 0
+[0-9a-f ]+R_X86_64_TPOFF64 +0+ sG6 \+ 0
+[0-9a-f ]+R_X86_64_TPOFF64 +0+ sG1 \+ 0
+
+Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+[0-9a-f ]+R_X86_64_JUMP_SLOT[0-9a-f ]+__tls_get_addr \+ 0
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+.* NOTYPE +LOCAL +DEFAULT +UND *
+.* TLS +GLOBAL +DEFAULT +UND sG5
+.* TLS +GLOBAL +DEFAULT +UND sG2
+.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr
+.* NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+.* TLS +GLOBAL +DEFAULT +UND sG6
+.* TLS +GLOBAL +DEFAULT +UND sG1
+.* NOTYPE +GLOBAL +DEFAULT +ABS _edata
+.* NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 *
+.* SECTION +LOCAL +DEFAULT +2 *
+.* SECTION +LOCAL +DEFAULT +3 *
+.* SECTION +LOCAL +DEFAULT +4 *
+.* SECTION +LOCAL +DEFAULT +5 *
+.* SECTION +LOCAL +DEFAULT +6 *
+.* SECTION +LOCAL +DEFAULT +7 *
+.* SECTION +LOCAL +DEFAULT +8 *
+.* SECTION +LOCAL +DEFAULT +9 *
+.* SECTION +LOCAL +DEFAULT +10 *
+.* SECTION +LOCAL +DEFAULT +11 *
+.* SECTION +LOCAL +DEFAULT +12 *
+.* SECTION +LOCAL +DEFAULT +13 *
+.* TLS +LOCAL +DEFAULT +9 sl1
+.* TLS +LOCAL +DEFAULT +9 sl2
+.* TLS +LOCAL +DEFAULT +9 sl3
+.* TLS +LOCAL +DEFAULT +9 sl4
+.* TLS +LOCAL +DEFAULT +9 sl5
+.* TLS +LOCAL +DEFAULT +9 sl6
+.* TLS +LOCAL +DEFAULT +9 sl7
+.* TLS +LOCAL +DEFAULT +9 sl8
+.* TLS +LOCAL +DEFAULT +10 bl1
+.* TLS +LOCAL +DEFAULT +10 bl2
+.* TLS +LOCAL +DEFAULT +10 bl3
+.* TLS +LOCAL +DEFAULT +10 bl4
+.* TLS +LOCAL +DEFAULT +10 bl5
+.* TLS +LOCAL +DEFAULT +10 bl6
+.* TLS +LOCAL +DEFAULT +10 bl7
+.* TLS +LOCAL +DEFAULT +10 bl8
+.* OBJECT +LOCAL +DEFAULT +11 _DYNAMIC
+.* OBJECT +LOCAL +DEFAULT +13 _GLOBAL_OFFSET_TABLE_
+.* TLS +GLOBAL +DEFAULT +9 sg8
+.* TLS +GLOBAL +DEFAULT +10 bg8
+.* TLS +GLOBAL +DEFAULT +10 bg6
+.* TLS +GLOBAL +DEFAULT +UND sG5
+.* TLS +GLOBAL +DEFAULT +10 bg3
+.* TLS +GLOBAL +DEFAULT +9 sg3
+.* TLS +GLOBAL +HIDDEN +9 sh3
+.* TLS +GLOBAL +DEFAULT +UND sG2
+.* TLS +GLOBAL +DEFAULT +9 sg4
+.* TLS +GLOBAL +DEFAULT +9 sg5
+.* TLS +GLOBAL +DEFAULT +10 bg5
+.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr
+.* TLS +GLOBAL +HIDDEN +9 sh7
+.* TLS +GLOBAL +HIDDEN +9 sh8
+.* TLS +GLOBAL +DEFAULT +9 sg1
+.* FUNC +GLOBAL +DEFAULT +2 _start
+.* TLS +GLOBAL +HIDDEN +9 sh4
+.* TLS +GLOBAL +DEFAULT +10 bg7
+.* TLS +GLOBAL +HIDDEN +9 sh5
+.* NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+.* TLS +GLOBAL +DEFAULT +UND sG6
+.* FUNC +GLOBAL +DEFAULT +2 fn2
+.* TLS +GLOBAL +DEFAULT +9 sg2
+.* TLS +GLOBAL +DEFAULT +UND sG1
+.* TLS +GLOBAL +HIDDEN +9 sh1
+.* TLS +GLOBAL +DEFAULT +9 sg6
+.* TLS +GLOBAL +DEFAULT +9 sg7
+.* NOTYPE +GLOBAL +DEFAULT +ABS _edata
+.* NOTYPE +GLOBAL +DEFAULT +ABS _end
+.* TLS +GLOBAL +HIDDEN +9 sh2
+.* TLS +GLOBAL +HIDDEN +9 sh6
+.* TLS +GLOBAL +DEFAULT +10 bg2
+.* TLS +GLOBAL +DEFAULT +10 bg1
+.* TLS +GLOBAL +DEFAULT +10 bg4
index e028753..a2ad193 100644 (file)
 # 0x60          -0x40           bg1..bg8
 # 0x80          -0x20           bl1..bl8
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Disassembly of section .text:
 
-0+401000 <fn2>:
 401000:      55[     ]+push   %rbp
 401001:      48 89 e5[       ]+mov    %rsp,%rbp
+[0-9a-f]+ <fn2>:
+[0-9a-f]+:   55[     ]+push   %rbp
+[0-9a-f]+:   48 89 e5[       ]+mov    %rsp,%rbp
 #  GD -> IE because variable is not defined in executable
 401004:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 40100b:      00 00 *
 40100d:      48 03 05 dc 03 20 00[   ]+add    0x2003dc\(%rip\),%rax +# 6013f0 <.*>
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x158>
 #                              -> R_X86_64_TPOFF64     sG1
 401014:      90[     ]+nop *
 401015:      90[     ]+nop *
 401016:      90[     ]+nop *
 401017:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through IE too
 401018:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 40101f:      00 00 *
 401021:      48 03 05 b8 03 20 00[   ]+add    0x2003b8\(%rip\),%rax +# 6013e0 <.*>
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x148>
 #                              -> R_X86_64_TPOFF64     sG2
 401028:      90[     ]+nop *
 401029:      90[     ]+nop *
 40102a:      90[     ]+nop *
 40102b:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with global variable defined in executable
 40102c:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 401033:      00 00 *
 401035:      48 8d 80 60 ff ff ff[   ]+lea    -0xa0\(%rax\),%rax
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   48 8d 80 60 ff ff ff[   ]+lea    -0xa0\(%rax\),%rax
 #                                                      sg1
 40103c:      90[     ]+nop *
 40103d:      90[     ]+nop *
 40103e:      90[     ]+nop *
 40103f:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with local variable defined in executable
 401040:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 401047:      00 00 *
 401049:      48 8d 80 80 ff ff ff[   ]+lea    -0x80\(%rax\),%rax
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   48 8d 80 80 ff ff ff[   ]+lea    -0x80\(%rax\),%rax
 #                                                      sl1
 401050:      90[     ]+nop *
 401051:      90[     ]+nop *
 401052:      90[     ]+nop *
 401053:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with hidden variable defined in executable
 401054:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 40105b:      00 00 *
 40105d:      48 8d 80 a0 ff ff ff[   ]+lea    -0x60\(%rax\),%rax
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   48 8d 80 a0 ff ff ff[   ]+lea    -0x60\(%rax\),%rax
 #                                                      sh1
 401064:      90[     ]+nop *
 401065:      90[     ]+nop *
 401066:      90[     ]+nop *
 401067:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE
 401068:      66 66 66 64 48 8b 04[   ]+data32 data32 data32 mov %fs:0x0,%rax
 40106f:      25 00 00 00 00 *
 401074:      90[     ]+nop *
 401075:      90[     ]+nop *
 401076:      48 8d 90 81 ff ff ff[   ]+lea    -0x7f\(%rax\),%rdx
+[0-9a-f]+:   66 66 66 64 48 8b 04[   ]+data32 data32 data32 mov %fs:0x0,%rax
+[0-9a-f]+:   25 00 00 00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 90 81 ff ff ff[   ]+lea    -0x7f\(%rax\),%rdx
 #                                                      sl1+1
 40107d:      90[     ]+nop *
 40107e:      90[     ]+nop *
 40107f:      4c 8d 88 86 ff ff ff[   ]+lea    -0x7a\(%rax\),%r9
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 8d 88 86 ff ff ff[   ]+lea    -0x7a\(%rax\),%r9
 #                                                      sl2+2
 401086:      90[     ]+nop *
 401087:      90[     ]+nop *
 401088:      90[     ]+nop *
 401089:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE against hidden variables
 40108a:      66 66 66 64 48 8b 04[   ]+data32 data32 data32 mov %fs:0x0,%rax
 401091:      25 00 00 00 00 *
 401096:      90[     ]+nop *
 401097:      90[     ]+nop *
 401098:      48 8d 90 a0 ff ff ff[   ]+lea    -0x60\(%rax\),%rdx
+[0-9a-f]+:   66 66 66 64 48 8b 04[   ]+data32 data32 data32 mov %fs:0x0,%rax
+[0-9a-f]+:   25 00 00 00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 90 a0 ff ff ff[   ]+lea    -0x60\(%rax\),%rdx
 #                                                      sh1
 40109f:      90[     ]+nop *
 4010a0:      90[     ]+nop *
 4010a1:      48 8d 88 a7 ff ff ff[   ]+lea    -0x59\(%rax\),%rcx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 88 a7 ff ff ff[   ]+lea    -0x59\(%rax\),%rcx
 #                                                      sh2+3
 4010a8:      90[     ]+nop *
 4010a9:      90[     ]+nop *
 4010aa:      90[     ]+nop *
 4010ab:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE against global var
 4010ac:      64 4c 8b 0c 25 00 00[   ]+mov    %fs:0x0,%r9
 4010b3:      00 00 *
 4010b5:      90[     ]+nop *
 4010b6:      90[     ]+nop *
 4010b7:      4c 03 0d 22 03 20 00[   ]+add    0x200322\(%rip\),%r9 +# 6013e0 <.*>
+[0-9a-f]+:   64 4c 8b 0c 25 00 00[   ]+mov    %fs:0x0,%r9
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%r9 +# [0-9a-f]+ <_DYNAMIC\+0x148>
 #                              -> R_X86_64_TPOFF64     sG2
 4010be:      90[     ]+nop *
 4010bf:      90[     ]+nop *
 4010c0:      90[     ]+nop *
 4010c1:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against global var defined in exec
 4010c2:      64 4c 8b 14 25 00 00[   ]+mov    %fs:0x0,%r10
 4010c9:      00 00 *
 4010cb:      90[     ]+nop *
 4010cc:      90[     ]+nop *
 4010cd:      4d 8d 92 60 ff ff ff[   ]+lea    -0xa0\(%r10\),%r10
+[0-9a-f]+:   64 4c 8b 14 25 00 00[   ]+mov    %fs:0x0,%r10
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4d 8d 92 60 ff ff ff[   ]+lea    -0xa0\(%r10\),%r10
 #                                                      sg1
 4010d4:      90[     ]+nop *
 4010d5:      90[     ]+nop *
 4010d6:      90[     ]+nop *
 4010d7:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against local var
 4010d8:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 4010df:      00 00 *
 4010e1:      90[     ]+nop *
 4010e2:      90[     ]+nop *
 4010e3:      48 8d 80 80 ff ff ff[   ]+lea    -0x80\(%rax\),%rax
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 80 80 ff ff ff[   ]+lea    -0x80\(%rax\),%rax
 #                                                      sl1
 4010ea:      90[     ]+nop *
 4010eb:      90[     ]+nop *
 4010ec:      90[     ]+nop *
 4010ed:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against hidden var
 4010ee:      64 48 8b 0c 25 00 00[   ]+mov    %fs:0x0,%rcx
 4010f5:      00 00 *
 4010f7:      90[     ]+nop *
 4010f8:      90[     ]+nop *
 4010f9:      48 8d 89 a0 ff ff ff[   ]+lea    -0x60\(%rcx\),%rcx
+[0-9a-f]+:   64 48 8b 0c 25 00 00[   ]+mov    %fs:0x0,%rcx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 89 a0 ff ff ff[   ]+lea    -0x60\(%rcx\),%rcx
 #                                                      sh1
 401100:      90[     ]+nop *
 401101:      90[     ]+nop *
 401102:      90[     ]+nop *
 401103:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %fs
 #  IE against global var
 401104:      48 8b 0d cd 02 20 00[   ]+mov    0x2002cd\(%rip\),%rcx +# 6013d8 <.*>
+[0-9a-f]+:   48 8b 0d ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x140>
 #                              -> R_X86_64_TPOFF64     sG5
 40110b:      90[     ]+nop *
 40110c:      90[     ]+nop *
 40110d:      64 48 8b 11[    ]+mov    %fs:\(%rcx\),%rdx
 401111:      90[     ]+nop *
 401112:      90[     ]+nop *
 401113:      90[     ]+nop *
 401114:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 11[    ]+mov    %fs:\(%rcx\),%rdx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE->LE against local var
 401115:      49 c7 c3 90 ff ff ff[   ]+mov    \$0xf+90,%r11
+[0-9a-f]+:   49 c7 c3 90 ff ff ff[   ]+mov    \$0xf+90,%r11
 #                                                      sl5
 40111c:      90[     ]+nop *
 40111d:      90[     ]+nop *
 40111e:      64 4d 8b 23[    ]+mov    %fs:\(%r11\),%r12
 401122:      90[     ]+nop *
 401123:      90[     ]+nop *
 401124:      90[     ]+nop *
 401125:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 4d 8b 23[    ]+mov    %fs:\(%r11\),%r12
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE->LE against hidden var
 401126:      48 c7 c2 b0 ff ff ff[   ]+mov    \$0xf+b0,%rdx
 40112d:      90[     ]+nop *
 40112e:      90[     ]+nop *
 40112f:      64 48 8b 12[    ]+mov    %fs:\(%rdx\),%rdx
+[0-9a-f]+:   48 c7 c2 b0 ff ff ff[   ]+mov    \$0xf+b0,%rdx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 12[    ]+mov    %fs:\(%rdx\),%rdx
 #                                                      sh5
 401133:      90[     ]+nop *
 401134:      90[     ]+nop *
 401135:      90[     ]+nop *
 401136:      90[     ]+nop *
 401137:      c9[     ]+leaveq *
 401138:      c3[     ]+retq *
 401139:      0f 1f 00[       ]+nopl   \(%rax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   c9[     ]+leaveq *
+[0-9a-f]+:   c3[     ]+retq *
+[0-9a-f]+:   0f 1f 00[       ]+nopl   \(%rax\)
 
-0+40113c <_start>:
 40113c:      55[     ]+push   %rbp
 40113d:      48 89 e5[       ]+mov    %rsp,%rbp
+[0-9a-f]+ <_start>:
+[0-9a-f]+:   55[     ]+push   %rbp
+[0-9a-f]+:   48 89 e5[       ]+mov    %rsp,%rbp
 #  IE against global var
 401140:      64 4c 8b 1c 25 00 00[   ]+mov    %fs:0x0,%r11
 401147:      00 00 *
 401149:      90[     ]+nop *
 40114a:      90[     ]+nop *
 40114b:      4c 03 1d 96 02 20 00[   ]+add    0x200296\(%rip\),%r11 +# 6013e8 <.*>
+[0-9a-f]+:   64 4c 8b 1c 25 00 00[   ]+mov    %fs:0x0,%r11
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 03 1d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_TPOFF64     sG6
 401152:      90[     ]+nop *
 401153:      90[     ]+nop *
 401154:      90[     ]+nop *
 401155:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against global var defined in exec
 401156:      64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 40115d:      00 00 *
 40115f:      90[     ]+nop *
 401160:      90[     ]+nop *
 401161:      48 8d 92 d4 ff ff ff[   ]+lea    -0x2c\(%rdx\),%rdx
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 92 d4 ff ff ff[   ]+lea    -0x2c\(%rdx\),%rdx
 #                                                      bg6
 401168:      90[     ]+nop *
 401169:      90[     ]+nop *
 40116a:      90[     ]+nop *
 40116b:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against local var
 40116c:      64 4c 8b 24 25 00 00[   ]+mov    %fs:0x0,%r12
 401173:      00 00 *
 401175:      90[     ]+nop *
 401176:      90[     ]+nop *
 401177:      49 81 c4 f4 ff ff ff[   ]+add    \$0xf+f4,%r12
+[0-9a-f]+:   64 4c 8b 24 25 00 00[   ]+mov    %fs:0x0,%r12
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   49 81 c4 f4 ff ff ff[   ]+add    \$0xf+f4,%r12
 #                                                      bl6
 40117e:      90[     ]+nop *
 40117f:      90[     ]+nop *
 401180:      90[     ]+nop *
 401181:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  direct %fs access IE -> LE against local var
 401182:      48 c7 c2 fc ff ff ff[   ]+mov    \$0xf+fc,%rdx
+[0-9a-f]+:   48 c7 c2 fc ff ff ff[   ]+mov    \$0xf+fc,%rdx
 #                                                      bl8
 401189:      90[     ]+nop *
 40118a:      90[     ]+nop *
 40118b:      64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
 40118f:      90[     ]+nop *
 401190:      90[     ]+nop *
 401191:      90[     ]+nop *
 401192:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against hidden but not local var
 401193:      64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 40119a:      00 00 *
 40119c:      90[     ]+nop *
 40119d:      90[     ]+nop *
 40119e:      48 8d 92 b4 ff ff ff[   ]+lea    -0x4c\(%rdx\),%rdx
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 92 b4 ff ff ff[   ]+lea    -0x4c\(%rdx\),%rdx
 #                                                      sh6
 4011a5:      90[     ]+nop *
 4011a6:      90[     ]+nop *
 4011a7:      90[     ]+nop *
 4011a8:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  direct %fs access IE -> LE against hidden but not local var
 4011a9:      48 c7 c2 bc ff ff ff[   ]+mov    \$0xf+bc,%rdx
+[0-9a-f]+:   48 c7 c2 bc ff ff ff[   ]+mov    \$0xf+bc,%rdx
 #                                                      sh8
 4011b0:      90[     ]+nop *
 4011b1:      90[     ]+nop *
 4011b2:      64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
 4011b6:      90[     ]+nop *
 4011b7:      90[     ]+nop *
 4011b8:      90[     ]+nop *
 4011b9:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, global var defined in exec
 4011ba:      64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 4011c1:      00 00 *
 4011c3:      90[     ]+nop *
 4011c4:      90[     ]+nop *
 4011c5:      48 8d 90 64 ff ff ff[   ]+lea    -0x9c\(%rax\),%rdx
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 90 64 ff ff ff[   ]+lea    -0x9c\(%rax\),%rdx
 #                                                      sg2
 4011cc:      90[     ]+nop *
 4011cd:      90[     ]+nop *
 4011ce:      90[     ]+nop *
 4011cf:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, local var, non-canonical sequence
 4011d0:      49 c7 c1 e6 ff ff ff[   ]+mov    \$0xf+e6,%r9
+[0-9a-f]+:   49 c7 c1 e6 ff ff ff[   ]+mov    \$0xf+e6,%r9
 #                                                      bl2+2
 4011d7:      90[     ]+nop *
 4011d8:      90[     ]+nop *
 4011d9:      64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 4011e0:      00 00 *
 4011e2:      90[     ]+nop *
 4011e3:      90[     ]+nop *
 4011e4:      4c 01 ca[       ]+add    %r9,%rdx
 4011e7:      90[     ]+nop *
 4011e8:      90[     ]+nop *
 4011e9:      90[     ]+nop *
 4011ea:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 01 ca[       ]+add    %r9,%rdx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, hidden var defined in exec, non-canonical sequence
 4011eb:      64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 4011f2:      00 00 *
 4011f4:      90[     ]+nop *
 4011f5:      90[     ]+nop *
 4011f6:      48 81 c2 a5 ff ff ff[   ]+add    \$0xf+a5,%rdx
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 81 c2 a5 ff ff ff[   ]+add    \$0xf+a5,%rdx
 #                                                      sh2+1
 4011fd:      90[     ]+nop *
 4011fe:      90[     ]+nop *
 4011ff:      90[     ]+nop *
 401200:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct %fs access
 #  LE, global var defined in exec
 401201:      64 48 8b 04 25 68 ff[   ]+mov    %fs:0xf+68,%rax
 401208:      ff ff *
+[0-9a-f]+:   64 48 8b 04 25 68 ff[   ]+mov    %fs:0xf+68,%rax
+[0-9a-f]+:   ff ff *
 #                                                      sg3
 40120a:      90[     ]+nop *
 40120b:      90[     ]+nop *
 40120c:      90[     ]+nop *
 40120d:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, local var
 40120e:      64 4c 8b 14 25 eb ff[   ]+mov    %fs:0xf+eb,%r10
 401215:      ff ff *
+[0-9a-f]+:   64 4c 8b 14 25 eb ff[   ]+mov    %fs:0xf+eb,%r10
+[0-9a-f]+:   ff ff *
 #                                                      bl3+3
 401217:      90[     ]+nop *
 401218:      90[     ]+nop *
 401219:      90[     ]+nop *
 40121a:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, hidden var defined in exec
 40121b:      64 48 8b 14 25 a9 ff[   ]+mov    %fs:0xf+a9,%rdx
 401222:      ff ff *
+[0-9a-f]+:   64 48 8b 14 25 a9 ff[   ]+mov    %fs:0xf+a9,%rdx
+[0-9a-f]+:   ff ff *
 #                                                      sh3+1
 401224:      90[     ]+nop *
 401225:      90[     ]+nop *
 401226:      90[     ]+nop *
 401227:      90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, large model
 401228:      48 ba a5 ff ff ff ff[   ]+movabs \$0xffffffffffffffa5,%rdx
 40122f:      ff ff ff *
 401232:      c9[     ]+leaveq *
 401233:      c3[     ]+retq *
+[0-9a-f]+:   48 ba a5 ff ff ff ff[   ]+movabs \$0xffffffffffffffa5,%rdx
+[0-9a-f]+:   ff ff ff *
+[0-9a-f]+:   c9[     ]+leaveq *
+[0-9a-f]+:   c3[     ]+retq *
index 7fa7904..5a31dcd 100644 (file)
@@ -5,8 +5,8 @@
 #objdump: -sj.got
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .got:
6013d8 00000000 00000000 00000000 00000000  .*
6013e8 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
index 6f87a19..0f7b3a5 100644 (file)
@@ -5,12 +5,12 @@
 #objdump: -sj.tdata
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .tdata:
601234 11000000 12000000 13000000 14000000  .*
601244 15000000 16000000 17000000 18000000  .*
601254 41000000 42000000 43000000 44000000  .*
601264 45000000 46000000 47000000 48000000  .*
601274 01010000 02010000 03010000 04010000  .*
601284 05010000 06010000 07010000 08010000  .*
[0-9a-f]+ 11000000 12000000 13000000 14000000  .*
[0-9a-f]+ 15000000 16000000 17000000 18000000  .*
[0-9a-f]+ 41000000 42000000 43000000 44000000  .*
[0-9a-f]+ 45000000 46000000 47000000 48000000  .*
[0-9a-f]+ 01010000 02010000 03010000 04010000  .*
[0-9a-f]+ 05010000 06010000 07010000 08010000  .*
diff --git a/ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd b/ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd
new file mode 100644 (file)
index 0000000..7d5e81d
--- /dev/null
@@ -0,0 +1,140 @@
+#source: tlsbindesc.s
+#source: tlsbin.s
+#as: --64
+#ld: -shared -melf_x86_64_nacl --no-ld-generated-unwind-info
+#readelf: -WSsrl
+#target: x86_64-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 00 +0 +0 +0
+ +\[[ 0-9]+\] .text +PROGBITS +0+20000 0+10000 0+200 00 +AX +0 +0 +4096
+ +\[[ 0-9]+\] .interp +.*
+ +\[[ 0-9]+\] .hash +.*
+ +\[[ 0-9]+\] .dynsym +.*
+ +\[[ 0-9]+\] .dynstr +.*
+ +\[[ 0-9]+\] .rela.dyn +.*
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+10030370 0+370 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+100303d0 0+3d0 0+40 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+100303d0 0+3d0 0+100 10 +WA +5 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+100304d0 0+4d0 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+100304f0 0+4f0 0+18 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .shstrtab +.*
+ +\[[ 0-9]+\] .symtab +.*
+ +\[[ 0-9]+\] .strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is EXEC \(Executable file\)
+Entry point 0x20108
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +PHDR.*
+ +INTERP.*
+.*Requesting program interpreter.*
+ +LOAD +0x0+10000 0x0+20000 0x0+20000 0x0+200 0x0+200 R E 0x10000
+ +LOAD +0x0+ 0x0+10020000 0x0+10020000 0x0+370 0x0+370 R +0x10000
+ +LOAD +0x0+370 0x0+10030370 0x0+10030370 0x0+198 0x0+198 RW +0x10000
+ +DYNAMIC +0x0+3d0 0x0+100303d0 0x0+100303d0 0x0+100 0x0+100 RW +0x8
+ +TLS +0x0+370 0x0+10030370 0x0+10030370 0x0+60 0x0+a0 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 *
+ +01 +.interp *
+ +02 +.text *
+ +03 +.interp .hash .dynsym .dynstr .rela.dyn *
+ +04 +.tdata .dynamic .got .got.plt *
+ +05 +.dynamic *
+ +06 +.tdata .tbss *
+
+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+0+100304d0 +0+100000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0
+0+100304d8 +0+200000012 R_X86_64_TPOFF64 +0+ sG2 \+ 0
+0+100304e0 +0+400000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0
+0+100304e8 +0+500000012 R_X86_64_TPOFF64 +0+ sG1 \+ 0
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: 0+[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: 0+[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +11 *
+ +[0-9]+: 0+20 +0 +TLS +LOCAL +DEFAULT +7 sl1
+ +[0-9]+: 0+24 +0 +TLS +LOCAL +DEFAULT +7 sl2
+ +[0-9]+: 0+28 +0 +TLS +LOCAL +DEFAULT +7 sl3
+ +[0-9]+: 0+2c +0 +TLS +LOCAL +DEFAULT +7 sl4
+ +[0-9]+: 0+30 +0 +TLS +LOCAL +DEFAULT +7 sl5
+ +[0-9]+: 0+34 +0 +TLS +LOCAL +DEFAULT +7 sl6
+ +[0-9]+: 0+38 +0 +TLS +LOCAL +DEFAULT +7 sl7
+ +[0-9]+: 0+3c +0 +TLS +LOCAL +DEFAULT +7 sl8
+ +[0-9]+: 0+80 +0 +TLS +LOCAL +DEFAULT +8 bl1
+ +[0-9]+: 0+84 +0 +TLS +LOCAL +DEFAULT +8 bl2
+ +[0-9]+: 0+88 +0 +TLS +LOCAL +DEFAULT +8 bl3
+ +[0-9]+: 0+8c +0 +TLS +LOCAL +DEFAULT +8 bl4
+ +[0-9]+: 0+90 +0 +TLS +LOCAL +DEFAULT +8 bl5
+ +[0-9]+: 0+94 +0 +TLS +LOCAL +DEFAULT +8 bl6
+ +[0-9]+: 0+98 +0 +TLS +LOCAL +DEFAULT +8 bl7
+ +[0-9]+: 0+9c +0 +TLS +LOCAL +DEFAULT +8 bl8
+ +[0-9]+: 0+a0 +0 +TLS +LOCAL +DEFAULT +7 _TLS_MODULE_BASE_
+ +[0-9]+: 0+100303d0 +0 +OBJECT +LOCAL +DEFAULT +9 _DYNAMIC
+ +[0-9]+: 0+100304f0 +0 +OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +7 sg8
+ +[0-9]+: 0+7c +0 +TLS +GLOBAL +DEFAULT +8 bg8
+ +[0-9]+: 0+74 +0 +TLS +GLOBAL +DEFAULT +8 bg6
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+68 +0 +TLS +GLOBAL +DEFAULT +8 bg3
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +7 sg3
+ +[0-9]+: 0+48 +0 +TLS +GLOBAL +HIDDEN +7 sh3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +7 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +7 sg5
+ +[0-9]+: 0+70 +0 +TLS +GLOBAL +DEFAULT +8 bg5
+ +[0-9]+: 0+58 +0 +TLS +GLOBAL +HIDDEN +7 sh7
+ +[0-9]+: 0+5c +0 +TLS +GLOBAL +HIDDEN +7 sh8
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +7 sg1
+ +[0-9]+: 0+20108 +0 +FUNC +GLOBAL +DEFAULT +1 _start
+ +[0-9]+: 0+4c +0 +TLS +GLOBAL +HIDDEN +7 sh4
+ +[0-9]+: 0+78 +0 +TLS +GLOBAL +DEFAULT +8 bg7
+ +[0-9]+: 0+50 +0 +TLS +GLOBAL +HIDDEN +7 sh5
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: 0+20000 +0 +FUNC +GLOBAL +DEFAULT +1 fn2
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +7 sg2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: 0+40 +0 +TLS +GLOBAL +HIDDEN +7 sh1
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +7 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +7 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+ +[0-9]+: 0+44 +0 +TLS +GLOBAL +HIDDEN +7 sh2
+ +[0-9]+: 0+54 +0 +TLS +GLOBAL +HIDDEN +7 sh6
+ +[0-9]+: 0+64 +0 +TLS +GLOBAL +DEFAULT +8 bg2
+ +[0-9]+: 0+60 +0 +TLS +GLOBAL +DEFAULT +8 bg1
+ +[0-9]+: 0+6c +0 +TLS +GLOBAL +DEFAULT +8 bg4
index 03f0169..166ec94 100644 (file)
 # 0x60          -0x40           bg1..bg8
 # 0x80          -0x20           bl1..bl8
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Disassembly of section .text:
 
-0+401000 <fn2>:
 [0-9a-f]+:   55[     ]+push   %rbp
 [0-9a-f]+:   48 89 e5[       ]+mov    %rsp,%rbp
+[0-9a-f]+ <fn2>:
+[0-9a-f]+:   55[     ]+push   %rbp
+[0-9a-f]+:   48 89 e5[       ]+mov    %rsp,%rbp
 #  GD -> IE because variable is not defined in executable
 [0-9a-f]+:   48 8b 05 6d 03 20 00[   ]+mov    0x20036d\(%rip\),%rax +# 601378 <.*>
+[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x118>
 #                              -> R_X86_64_TPOFF64     sG1
 [0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is not defined in executable where
 #  the variable is referenced through IE too
 [0-9a-f]+:   48 8b 05 50 03 20 00[   ]+mov    0x200350\(%rip\),%rax +# 601368 <.*>
+[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x108>
 #                              -> R_X86_64_TPOFF64     sG2
 [0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with global variable defined in executable
 [0-9a-f]+:   48 c7 c0 60 ff ff ff[   ]+mov    \$0xf+60,%rax
+[0-9a-f]+:   48 c7 c0 60 ff ff ff[   ]+mov    \$0xf+60,%rax
 #                                                      sg1
 [0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with local variable defined in executable
 [0-9a-f]+:   48 c7 c0 80 ff ff ff[   ]+mov    \$0xf+80,%rax
+[0-9a-f]+:   48 c7 c0 80 ff ff ff[   ]+mov    \$0xf+80,%rax
 #                                                      sl1
 [0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  GD -> LE with hidden variable defined in executable
 [0-9a-f]+:   48 c7 c0 a0 ff ff ff[   ]+mov    \$0xf+a0,%rax
+[0-9a-f]+:   48 c7 c0 a0 ff ff ff[   ]+mov    \$0xf+a0,%rax
 #                                                      sh1
 [0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE
 [0-9a-f]+:   48 c7 c0 00 00 00 00[   ]+mov    \$0x0,%rax
 [0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 90 81 ff ff ff[   ]+lea    -0x7f\(%rax\),%rdx
+[0-9a-f]+:   48 c7 c0 00 00 00 00[   ]+mov    \$0x0,%rax
+[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 90 81 ff ff ff[   ]+lea    -0x7f\(%rax\),%rdx
 #                                                      sl1+1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   4c 8d 88 86 ff ff ff[   ]+lea    -0x7a\(%rax\),%r9
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 8d 88 86 ff ff ff[   ]+lea    -0x7a\(%rax\),%r9
 #                                                      sl2+2
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LD -> LE against hidden variables
 [0-9a-f]+:   48 8d 90 a0 ff ff ff[   ]+lea    -0x60\(%rax\),%rdx
+[0-9a-f]+:   48 8d 90 a0 ff ff ff[   ]+lea    -0x60\(%rax\),%rdx
 #                                                      sh1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 88 a7 ff ff ff[   ]+lea    -0x59\(%rax\),%rcx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 88 a7 ff ff ff[   ]+lea    -0x59\(%rax\),%rcx
 #                                                      sh2+3
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE against global var
 [0-9a-f]+:   64 4c 8b 0c 25 00 00[   ]+mov    %fs:0x0,%r9
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   4c 03 0d de 02 20 00[   ]+add    0x2002de\(%rip\),%r9 +# 601368 <.*>
+[0-9a-f]+:   64 4c 8b 0c 25 00 00[   ]+mov    %fs:0x0,%r9
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%r9 +# [0-9a-f]+ <_DYNAMIC\+0x108>
 #                              -> R_X86_64_TPOFF64     sG2
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against global var defined in exec
 [0-9a-f]+:   64 4c 8b 14 25 00 00[   ]+mov    %fs:0x0,%r10
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   4d 8d 92 60 ff ff ff[   ]+lea    -0xa0\(%r10\),%r10
+[0-9a-f]+:   64 4c 8b 14 25 00 00[   ]+mov    %fs:0x0,%r10
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4d 8d 92 60 ff ff ff[   ]+lea    -0xa0\(%r10\),%r10
 #                                                      sg1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against local var
 [0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 80 80 ff ff ff[   ]+lea    -0x80\(%rax\),%rax
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 80 80 ff ff ff[   ]+lea    -0x80\(%rax\),%rax
 #                                                      sl1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against hidden var
 [0-9a-f]+:   64 48 8b 0c 25 00 00[   ]+mov    %fs:0x0,%rcx
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 89 a0 ff ff ff[   ]+lea    -0x60\(%rcx\),%rcx
+[0-9a-f]+:   64 48 8b 0c 25 00 00[   ]+mov    %fs:0x0,%rcx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 89 a0 ff ff ff[   ]+lea    -0x60\(%rcx\),%rcx
 #                                                      sh1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %fs
 #  IE against global var
 [0-9a-f]+:   48 8b 0d 89 02 20 00[   ]+mov    0x200289\(%rip\),%rcx +# 601360 <.*>
+[0-9a-f]+:   48 8b 0d ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x100>
 #                              -> R_X86_64_TPOFF64     sG5
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   64 48 8b 11[    ]+mov    %fs:\(%rcx\),%rdx
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 11[    ]+mov    %fs:\(%rcx\),%rdx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE->LE against local var
 [0-9a-f]+:   49 c7 c3 90 ff ff ff[   ]+mov    \$0xf+90,%r11
+[0-9a-f]+:   49 c7 c3 90 ff ff ff[   ]+mov    \$0xf+90,%r11
 #                                                      sl5
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   64 4d 8b 23[    ]+mov    %fs:\(%r11\),%r12
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 4d 8b 23[    ]+mov    %fs:\(%r11\),%r12
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE->LE against hidden var
 [0-9a-f]+:   48 c7 c2 b0 ff ff ff[   ]+mov    \$0xf+b0,%rdx
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   64 48 8b 12[    ]+mov    %fs:\(%rdx\),%rdx
+[0-9a-f]+:   48 c7 c2 b0 ff ff ff[   ]+mov    \$0xf+b0,%rdx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 12[    ]+mov    %fs:\(%rdx\),%rdx
 #                                                      sh5
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   c9[     ]+leaveq *
 [0-9a-f]+:   c3[     ]+retq *
 [0-9a-f]+:   0f 1f 00[       ]+nopl   \(%rax\)
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   c9[     ]+leaveq *
+[0-9a-f]+:   c3[     ]+retq *
+[0-9a-f]+:   0f 1f 00[       ]+nopl   \(%rax\)
 
 [0-9a-f]+ <_start>:
 [0-9a-f]+:   55[     ]+push   %rbp
 [0-9a-f]+:   48 89 e5[       ]+mov    %rsp,%rbp
+[0-9a-f]+:   55[     ]+push   %rbp
+[0-9a-f]+:   48 89 e5[       ]+mov    %rsp,%rbp
 #  IE against global var
 [0-9a-f]+:   64 4c 8b 1c 25 00 00[   ]+mov    %fs:0x0,%r11
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   4c 03 1d 52 02 20 00[   ]+add    0x200252\(%rip\),%r11 +# 601370 <.*>
+[0-9a-f]+:   64 4c 8b 1c 25 00 00[   ]+mov    %fs:0x0,%r11
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 03 1d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_DYNAMIC\+0x110>
 #                              -> R_X86_64_TPOFF64     sG6
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against global var defined in exec
 [0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 92 d4 ff ff ff[   ]+lea    -0x2c\(%rdx\),%rdx
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 92 d4 ff ff ff[   ]+lea    -0x2c\(%rdx\),%rdx
 #                                                      bg6
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against local var
 [0-9a-f]+:   64 4c 8b 24 25 00 00[   ]+mov    %fs:0x0,%r12
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   49 81 c4 f4 ff ff ff[   ]+add    \$0xf+f4,%r12
+[0-9a-f]+:   64 4c 8b 24 25 00 00[   ]+mov    %fs:0x0,%r12
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   49 81 c4 f4 ff ff ff[   ]+add    \$0xf+f4,%r12
 #                                                      bl6
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  direct %fs access IE -> LE against local var
 [0-9a-f]+:   48 c7 c2 fc ff ff ff[   ]+mov    \$0xf+fc,%rdx
+[0-9a-f]+:   48 c7 c2 fc ff ff ff[   ]+mov    \$0xf+fc,%rdx
 #                                                      bl8
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  IE -> LE against hidden but not local var
 [0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 92 b4 ff ff ff[   ]+lea    -0x4c\(%rdx\),%rdx
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 92 b4 ff ff ff[   ]+lea    -0x4c\(%rdx\),%rdx
 #                                                      sh6
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  direct %fs access IE -> LE against hidden but not local var
 [0-9a-f]+:   48 c7 c2 bc ff ff ff[   ]+mov    \$0xf+bc,%rdx
+[0-9a-f]+:   48 c7 c2 bc ff ff ff[   ]+mov    \$0xf+bc,%rdx
 #                                                      sh8
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 02[    ]+mov    %fs:\(%rdx\),%rax
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, global var defined in exec
 [0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 8d 90 64 ff ff ff[   ]+lea    -0x9c\(%rax\),%rdx
+[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 8d 90 64 ff ff ff[   ]+lea    -0x9c\(%rax\),%rdx
 #                                                      sg2
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, local var, non-canonical sequence
 [0-9a-f]+:   49 c7 c1 e6 ff ff ff[   ]+mov    \$0xf+e6,%r9
+[0-9a-f]+:   49 c7 c1 e6 ff ff ff[   ]+mov    \$0xf+e6,%r9
 #                                                      bl2+2
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   4c 01 ca[       ]+add    %r9,%rdx
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   4c 01 ca[       ]+add    %r9,%rdx
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, hidden var defined in exec, non-canonical sequence
 [0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
 [0-9a-f]+:   00 00 *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   48 81 c2 a5 ff ff ff[   ]+add    \$0xf+a5,%rdx
+[0-9a-f]+:   64 48 8b 14 25 00 00[   ]+mov    %fs:0x0,%rdx
+[0-9a-f]+:   00 00 *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   48 81 c2 a5 ff ff ff[   ]+add    \$0xf+a5,%rdx
 #                                                      sh2+1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  Direct %fs access
 #  LE, global var defined in exec
 [0-9a-f]+:   64 48 8b 04 25 68 ff[   ]+mov    %fs:0xf+68,%rax
 [0-9a-f]+:   ff ff *
+[0-9a-f]+:   64 48 8b 04 25 68 ff[   ]+mov    %fs:0xf+68,%rax
+[0-9a-f]+:   ff ff *
 #                                                      sg3
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, local var
 [0-9a-f]+:   64 4c 8b 14 25 eb ff[   ]+mov    %fs:0xf+eb,%r10
 [0-9a-f]+:   ff ff *
+[0-9a-f]+:   64 4c 8b 14 25 eb ff[   ]+mov    %fs:0xf+eb,%r10
+[0-9a-f]+:   ff ff *
 #                                                      bl3+3
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, hidden var defined in exec
 [0-9a-f]+:   64 48 8b 14 25 a9 ff[   ]+mov    %fs:0xf+a9,%rdx
 [0-9a-f]+:   ff ff *
+[0-9a-f]+:   64 48 8b 14 25 a9 ff[   ]+mov    %fs:0xf+a9,%rdx
+[0-9a-f]+:   ff ff *
 #                                                      sh3+1
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
 [0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
+[0-9a-f]+:   90[     ]+nop *
 #  LE, large model
 [0-9a-f]+:   48 ba a5 ff ff ff ff[   ]+movabs \$0xffffffffffffffa5,%rdx
 [0-9a-f]+:   ff ff ff *
 [0-9a-f]+:   c9[     ]+leaveq *
 [0-9a-f]+:   c3[     ]+retq *
+[0-9a-f]+:   48 ba a5 ff ff ff ff[   ]+movabs \$0xffffffffffffffa5,%rdx
+[0-9a-f]+:   ff ff ff *
+[0-9a-f]+:   c9[     ]+leaveq *
+[0-9a-f]+:   c3[     ]+retq *
index dbea32d..50e6fa5 100644 (file)
@@ -5,8 +5,8 @@
 #objdump: -sj.got
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .got:
601360 00000000 00000000 00000000 00000000  .*
601370 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
index 1dc6c28..54ec0e3 100644 (file)
@@ -5,12 +5,12 @@
 #objdump: -sj.tdata
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .tdata:
601200 11000000 12000000 13000000 14000000  .*
601210 15000000 16000000 17000000 18000000  .*
601220 41000000 42000000 43000000 44000000  .*
601230 45000000 46000000 47000000 48000000  .*
601240 01010000 02010000 03010000 04010000  .*
601250 05010000 06010000 07010000 08010000  .*
[0-9a-f]+ 11000000 12000000 13000000 14000000  .*
[0-9a-f]+ 15000000 16000000 17000000 18000000  .*
[0-9a-f]+ 41000000 42000000 43000000 44000000  .*
[0-9a-f]+ 45000000 46000000 47000000 48000000  .*
[0-9a-f]+ 01010000 02010000 03010000 04010000  .*
[0-9a-f]+ 05010000 06010000 07010000 08010000  .*
diff --git a/ld/testsuite/ld-x86-64/tlsdesc-nacl.pd b/ld/testsuite/ld-x86-64/tlsdesc-nacl.pd
new file mode 100644 (file)
index 0000000..066d760
--- /dev/null
@@ -0,0 +1,40 @@
+#source: tlsdesc.s
+#source: tlspic2.s
+#as: --64
+#ld: -shared -melf_x86_64_nacl --no-ld-generated-unwind-info
+#objdump: -drj.plt
+#target: x86_64-*-nacl*
+
+.*: +file format elf64-x86-64-nacl
+
+Disassembly of section .plt:
+
+[0-9a-f]+ <.*@plt-0x40>:
+ +[0-9a-f]+:   ff 35 .. .. .. ..       pushq  0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x8>
+ +[0-9a-f]+:   4c 8b 1d .. .. .. ..    mov    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x10>
+ +[0-9a-f]+:   41 83 e3 e0             and    \$0xffffffe0,%r11d
+ +[0-9a-f]+:   4d 01 fb                add    %r15,%r11
+ +[0-9a-f]+:   41 ff e3                jmpq   \*%r11
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 66 2e 0f 1f 84 00    data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   00 00 00 00 *
+
+[0-9a-f]+ <.*@plt>:
+ +[0-9a-f]+:   ff 35 .. .. .. ..       pushq  0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x8>
+ +[0-9a-f]+:   4c 8b 1d .. .. .. ..    mov    0x[0-9a-f]+\(%rip\),%r11 +# [0-9a-f]+ <_DYNAMIC\+0x190>
+ +[0-9a-f]+:   41 83 e3 e0             and    \$0xffffffe0,%r11d
+ +[0-9a-f]+:   4d 01 fb                add    %r15,%r11
+ +[0-9a-f]+:   41 ff e3                jmpq   \*%r11
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 66 66 66 66 66 2e    data32 data32 data32 data32 data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   0f 1f 84 00 00 00 00 *
+ +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 66 2e 0f 1f 84 00    data32 nopw %cs:0x0\(%rax,%rax,1\)
+ +[0-9a-f]+:   00 00 00 00 *
diff --git a/ld/testsuite/ld-x86-64/tlsdesc-nacl.rd b/ld/testsuite/ld-x86-64/tlsdesc-nacl.rd
new file mode 100644 (file)
index 0000000..3a3c600
--- /dev/null
@@ -0,0 +1,162 @@
+#source: tlsdesc.s
+#source: tlspic2.s
+#as: --64
+#ld: -shared -melf_x86_64_nacl --no-ld-generated-unwind-info
+#readelf: -WSsrld
+#target: x86_64-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 00 +0 +0 +0
+ +\[[ 0-9]+\] .plt +PROGBITS +0+ [0-9a-f]+ +0+80 +40 +AX +0 +0 +32
+ +\[[ 0-9]+\] .text +PROGBITS +0+1000 [0-9a-f]+ +0+154 00 +AX +0 +0 4096
+ +\[[ 0-9]+\] .hash +.*
+ +\[[ 0-9]+\] .dynsym +.*
+ +\[[ 0-9]+\] .dynstr +.*
+ +\[[ 0-9]+\] .rela.dyn +.*
+ +\[[ 0-9]+\] .rela.plt +.*
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+10010488 [0-9a-f]+ +0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+100104e8 [0-9a-f]+ 0+20 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+100104e8 [0-9a-f]+ 0+150 10 +WA +5 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+10010638 [0-9a-f]+ 0+48 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+10010680 [0-9a-f]+ 0+68 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .shstrtab +.*
+ +\[[ 0-9]+\] .symtab +.*
+ +\[[ 0-9]+\] .strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x1000
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD +0x[0-9a-f]+ 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
+ +LOAD +0x[0-9a-f]+ 0x0+10000000 0x0+10000000 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x10000
+ +LOAD +0x[0-9a-f]+ 0x0+10010488 0x0+10010488 0x0+260 0x0+260 RW +0x10000
+ +DYNAMIC +0x[0-9a-f]+ 0x0+100104e8 0x0+100104e8 0x0+150 0x0+150 RW +0x8
+ +TLS +0x[0-9a-f]+ 0x0+10010488 0x0+10010488 0x0+60 0x0+80 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.plt .text *
+ +01 +.hash .dynsym .dynstr .rela.dyn .rela.plt *
+ +02 +.tdata .dynamic .got .got.plt *
+ +03 +.dynamic *
+ +04 +.tdata .tbss *
+
+Dynamic section at offset 0x[0-9a-f]+ contains 16 entries:
+ +Tag +Type +Name/Value
+ 0x[0-9a-f]+ +\(HASH\).*
+ 0x[0-9a-f]+ +\(STRTAB\).*
+ 0x[0-9a-f]+ +\(SYMTAB\).*
+ 0x[0-9a-f]+ +\(STRSZ\).*
+ 0x[0-9a-f]+ +\(SYMENT\).*
+ 0x[0-9a-f]+ +\(PLTGOT\).*
+ 0x[0-9a-f]+ +\(PLTRELSZ\).*
+ 0x[0-9a-f]+ +\(PLTREL\).*
+ 0x[0-9a-f]+ +\(JMPREL\).*
+ 0x[0-9a-f]+ +\(TLSDESC_PLT\) +0x40
+ 0x[0-9a-f]+ +\(TLSDESC_GOT\) +0x10010678
+ 0x[0-9a-f]+ +\(RELA\).*
+ 0x[0-9a-f]+ +\(RELASZ\).*
+ 0x[0-9a-f]+ +\(RELAENT\).*
+ 0x[0-9a-f]+ +\(FLAGS\).*
+ 0x[0-9a-f]+ +\(NULL\).*
+
+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+0+10010638 +[0-9a-f]+ R_X86_64_TPOFF64 +0+24
+0+10010640 +[0-9a-f]+ R_X86_64_TPOFF64 +0+30
+0+10010648 +[0-9a-f]+ R_X86_64_TPOFF64 +0+64
+0+10010658 +[0-9a-f]+ R_X86_64_TPOFF64 +0+50
+0+10010660 +[0-9a-f]+ R_X86_64_TPOFF64 +0+70
+0+10010670 +[0-9a-f]+ R_X86_64_TPOFF64 +0+44
+0+10010650 +[0-9a-f]+ R_X86_64_TPOFF64 +0+10 sg5 \+ 0
+0+10010668 +[0-9a-f]+ R_X86_64_TPOFF64 +0+4 sg2 \+ 0
+
+Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 5 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+0+100106c8 +[0-9a-f]+ R_X86_64_TLSDESC +0+ sg1 \+ 0
+0+10010698 +[0-9a-f]+ R_X86_64_TLSDESC +0+20
+0+100106d8 +[0-9a-f]+ R_X86_64_TLSDESC +0+40
+0+100106a8 +[0-9a-f]+ R_X86_64_TLSDESC +0+60
+0+100106b8 +[0-9a-f]+ R_X86_64_TLSDESC +0+
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +8 sg8
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +8 sg3
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +8 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +8 sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +8 sg1
+ +[0-9]+: 0+1000 +0 +FUNC +GLOBAL +DEFAULT +2 fn1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +8 sg2
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +8 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +8 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +11 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +12 *
+ +[0-9]+: 0+20 +0 +TLS +LOCAL +DEFAULT +8 sl1
+ +[0-9]+: 0+24 +0 +TLS +LOCAL +DEFAULT +8 sl2
+ +[0-9]+: 0+28 +0 +TLS +LOCAL +DEFAULT +8 sl3
+ +[0-9]+: 0+2c +0 +TLS +LOCAL +DEFAULT +8 sl4
+ +[0-9]+: 0+30 +0 +TLS +LOCAL +DEFAULT +8 sl5
+ +[0-9]+: 0+34 +0 +TLS +LOCAL +DEFAULT +8 sl6
+ +[0-9]+: 0+38 +0 +TLS +LOCAL +DEFAULT +8 sl7
+ +[0-9]+: 0+3c +0 +TLS +LOCAL +DEFAULT +8 sl8
+ +[0-9]+: 0+60 +0 +TLS +LOCAL +DEFAULT +9 sH1
+ +[0-9]+: 0+ +0 +TLS +LOCAL +DEFAULT +8 _TLS_MODULE_BASE_
+ +[0-9]+: 0+100104e8 +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+ +[0-9]+: 0+48 +0 +TLS +LOCAL +DEFAULT +8 sh3
+ +[0-9]+: 0+64 +0 +TLS +LOCAL +DEFAULT +9 sH2
+ +[0-9]+: 0+78 +0 +TLS +LOCAL +DEFAULT +9 sH7
+ +[0-9]+: 0+58 +0 +TLS +LOCAL +DEFAULT +8 sh7
+ +[0-9]+: 0+5c +0 +TLS +LOCAL +DEFAULT +8 sh8
+ +[0-9]+: 0+6c +0 +TLS +LOCAL +DEFAULT +9 sH4
+ +[0-9]+: 0+4c +0 +TLS +LOCAL +DEFAULT +8 sh4
+ +[0-9]+: 0+68 +0 +TLS +LOCAL +DEFAULT +9 sH3
+ +[0-9]+: 0+50 +0 +TLS +LOCAL +DEFAULT +8 sh5
+ +[0-9]+: 0+70 +0 +TLS +LOCAL +DEFAULT +9 sH5
+ +[0-9]+: 0+74 +0 +TLS +LOCAL +DEFAULT +9 sH6
+ +[0-9]+: 0+7c +0 +TLS +LOCAL +DEFAULT +9 sH8
+ +[0-9]+: 0+40 +0 +TLS +LOCAL +DEFAULT +8 sh1
+ +[0-9]+: 0+10010680 +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+44 +0 +TLS +LOCAL +DEFAULT +8 sh2
+ +[0-9]+: 0+54 +0 +TLS +LOCAL +DEFAULT +8 sh6
+ +[0-9]+: 0+1c +0 +TLS +GLOBAL +DEFAULT +8 sg8
+ +[0-9]+: 0+8 +0 +TLS +GLOBAL +DEFAULT +8 sg3
+ +[0-9]+: 0+c +0 +TLS +GLOBAL +DEFAULT +8 sg4
+ +[0-9]+: 0+10 +0 +TLS +GLOBAL +DEFAULT +8 sg5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +8 sg1
+ +[0-9]+: 0+1000 +0 +FUNC +GLOBAL +DEFAULT +2 fn1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+4 +0 +TLS +GLOBAL +DEFAULT +8 sg2
+ +[0-9]+: 0+14 +0 +TLS +GLOBAL +DEFAULT +8 sg6
+ +[0-9]+: 0+18 +0 +TLS +GLOBAL +DEFAULT +8 sg7
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
index 2507e42..9f3fcbe 100644 (file)
@@ -5,7 +5,7 @@
 #objdump: -drj.text
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Disassembly of section .text:
 
@@ -17,7 +17,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD
- +[0-9a-f]+:   48 8d 05 89 03 20 00[   ]+lea    0x200389\(%rip\),%rax +# 201398 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x48>
 #                              -> R_X86_64_TLSDESC     sg1
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
@@ -25,7 +25,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE because variable is referenced through IE too
- +[0-9a-f]+:   48 8b 05 1c 03 20 00[   ]+mov    0x20031c\(%rip\),%rax +# 201338 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x180>
 #                              -> R_X86_64_TPOFF64     sg2
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -33,7 +33,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD against local variable
- +[0-9a-f]+:   48 8d 05 3f 03 20 00[   ]+lea    0x20033f\(%rip\),%rax +# 201368 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x18>
 #                              -> R_X86_64_TLSDESC     [0 0x2000000000000000]
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
@@ -41,7 +41,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against local variable referenced through IE too
- +[0-9a-f]+:   48 8b 05 d2 02 20 00[   ]+mov    0x2002d2\(%rip\),%rax +# 201308 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x24
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -49,7 +49,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD against hidden and local variable
- +[0-9a-f]+:   48 8d 05 65 03 20 00[   ]+lea    0x200365\(%rip\),%rax +# 2013a8 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x58>
 #                              -> R_X86_64_TLSDESC     [0 0x4000000000000000]
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
@@ -57,7 +57,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden and local variable referenced through IE too
- +[0-9a-f]+:   48 8b 05 f0 02 20 00[   ]+mov    0x2002f0\(%rip\),%rax +# 201340 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x188>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x44
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -65,7 +65,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD against hidden but not local variable
- +[0-9a-f]+:   48 8d 05 1b 03 20 00[   ]+lea    0x20031b\(%rip\),%rax +# 201378 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x28>
 #                              -> R_X86_64_TLSDESC     [0 0x6000000000000000]
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
@@ -73,7 +73,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  GD -> IE against hidden but not local variable referenced through IE too
- +[0-9a-f]+:   48 8b 05 ae 02 20 00[   ]+mov    0x2002ae\(%rip\),%rax +# 201318 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x160>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x64
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -81,7 +81,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  LD
- +[0-9a-f]+:   48 8d 05 11 03 20 00[   ]+lea    0x200311\(%rip\),%rax +# 201388 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x38>
 #                              -> R_X86_64_TLSDESC     [0 0x000000000000000]
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
@@ -115,7 +115,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 71 02 20 00[   ]+add    0x200271\(%rip\),%rcx +# 201338 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x180>
 #                              -> R_X86_64_TPOFF64     sg2
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -126,7 +126,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   4c 03 35 2b 02 20 00[   ]+add    0x20022b\(%rip\),%r14 +# 201308 <.*>
+ +[0-9a-f]+:   4c 03 35 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%r14 +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x24
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -137,7 +137,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 4d 02 20 00[   ]+add    0x20024d\(%rip\),%rcx +# 201340 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x188>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x44
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -148,7 +148,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 0f 02 20 00[   ]+add    0x20020f\(%rip\),%rcx +# 201318 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x160>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x64
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -156,7 +156,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
 #  Direct access through %fs
 #  IE against global var
- +[0-9a-f]+:   48 8b 0d 0c 02 20 00[   ]+mov    0x20020c\(%rip\),%rcx +# 201320 <.*>
+ +[0-9a-f]+:   48 8b 0d ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x168>
 #                              -> R_X86_64_TPOFF64     sg5
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -166,7 +166,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  IE against local var
- +[0-9a-f]+:   4c 8b 15 eb 01 20 00[   ]+mov    0x2001eb\(%rip\),%r10 +# 201310 <.*>
+ +[0-9a-f]+:   4c 8b 15 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%r10 +# [0-9a-f]+ <_DYNAMIC\+0x158>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x30
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -176,7 +176,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  IE against hidden and local var
- +[0-9a-f]+:   48 8b 15 f2 01 20 00[   ]+mov    0x2001f2\(%rip\),%rdx +# 201328 <.*>
+ +[0-9a-f]+:   48 8b 15 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rdx +# [0-9a-f]+ <_DYNAMIC\+0x170>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x50
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -186,7 +186,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 #  IE against hidden but not local var
- +[0-9a-f]+:   48 8b 0d e9 01 20 00[   ]+mov    0x2001e9\(%rip\),%rcx +# 201330 <.*>
+ +[0-9a-f]+:   48 8b 0d ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x178>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x70
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
index 89e2a39..88b9354 100644 (file)
@@ -5,19 +5,19 @@
 #objdump: -s -j.got -j.got.plt
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section \.got:
201308 00000000 00000000 00000000 00000000  .*
201318 00000000 00000000 00000000 00000000  .*
201328 00000000 00000000 00000000 00000000  .*
201338 00000000 00000000 00000000 00000000  .*
201348 00000000 00000000                    .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000                    .*
 Contents of section \.got\.plt:
201350 b8112000 00000000 00000000 00000000  .*
201360 00000000 00000000 00000000 00000000  .*
201370 00000000 00000000 00000000 00000000  .*
201380 00000000 00000000 00000000 00000000  .*
201390 00000000 00000000 00000000 00000000  .*
2013a0 00000000 00000000 00000000 00000000  .*
2013b0 00000000 00000000                    .*
[0-9a-f]+ [0-9a-f]+ 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000                    .*
index 479cb84..ac28992 100644 (file)
@@ -5,12 +5,12 @@
 #objdump: -sj.tdata
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .tdata:
201154 11000000 12000000 13000000 14000000  .*
201164 15000000 16000000 17000000 18000000  .*
201174 41000000 42000000 43000000 44000000  .*
201184 45000000 46000000 47000000 48000000  .*
201194 01010000 02010000 03010000 04010000  .*
2011a4 05010000 06010000 07010000 08010000  .*
[0-9a-f]+ 11000000 12000000 13000000 14000000  .*
[0-9a-f]+ 15000000 16000000 17000000 18000000  .*
[0-9a-f]+ 41000000 42000000 43000000 44000000  .*
[0-9a-f]+ 45000000 46000000 47000000 48000000  .*
[0-9a-f]+ 01010000 02010000 03010000 04010000  .*
[0-9a-f]+ 05010000 06010000 07010000 08010000  .*
index 4eaf3cd..7652d57 100644 (file)
@@ -4,7 +4,7 @@
 #objdump: -sj.debug_foobar
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .debug_foobar:
  0+ 18000000 0+  +.*
index ad9cd6e..64ad1cd 100644 (file)
@@ -2,7 +2,7 @@
 #as: --64
 #ld: -melf_x86_64 tmpdir/tlsgd5
 #objdump: -drw
-#target: x86_64-*-linux*
+#target: x86_64-*-linux* x86_64-*-nacl*
 
 .*: +file format .*
 
@@ -10,5 +10,5 @@ Disassembly of section .text:
 
 [a-f0-9]+ <_start>:
 [      ]*[a-f0-9]+:    64 48 8b 04 25 00 00 00 00      mov    %fs:0x0,%rax
-[      ]*[a-f0-9]+:    48 03 05 40 01 20 00    add    0x200140\(%rip\),%rax        # 6003a8 <_DYNAMIC\+0x100>
+[      ]*[a-f0-9]+:    48 03 05 ([0-9a-f]{2} ){4} *    add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x100>
 #pass
index 8bdb468..146fbc4 100644 (file)
@@ -10,5 +10,5 @@ Disassembly of section .text:
 
 [a-f0-9]+ <_start>:
 [      ]*[a-f0-9]+:    64 8b 04 25 00 00 00 00         mov    %fs:0x0,%eax
-[      ]*[a-f0-9]+:    48 03 05 c5 00 20 00    add    0x2000c5\(%rip\),%rax        # 600270 <_DYNAMIC\+0x80>
+[      ]*[a-f0-9]+:    48 03 05 ([0-9a-f]{2} ){4} *    add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x80>
 #pass
diff --git a/ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd b/ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd
new file mode 100644 (file)
index 0000000..d163238
--- /dev/null
@@ -0,0 +1,106 @@
+#source: tlsgdesc.s
+#as: --64
+#ld: -shared -melf64_x86_64_nacl --no-ld-generated-unwind-info
+#readelf: -WSsrl
+#target: x86_64-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 0+ +0 +0 +0
+ +\[[ 0-9]+\] \.plt +.*
+ +\[[ 0-9]+\] \.text +.*
+ +\[[ 0-9]+\] \.hash +.*
+ +\[[ 0-9]+\] \.dynsym +.*
+ +\[[ 0-9]+\] \.dynstr +.*
+ +\[[ 0-9]+\] \.rela.dyn +.*
+ +\[[ 0-9]+\] \.rela.plt +.*
+ +\[[ 0-9]+\] \.dynamic +.*
+ +\[[ 0-9]+\] \.got +.*
+ +\[[ 0-9]+\] \.got.plt +.*
+ +\[[ 0-9]+\] \.shstrtab +.*
+ +\[[ 0-9]+\] \.symtab +.*
+ +\[[ 0-9]+\] \.strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x[0-9a-f]+
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD.*
+ +LOAD.*
+ +LOAD.*
+ +DYNAMIC.*
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.plt .text *
+ +01 +.hash .dynsym .dynstr .rela.dyn .rela.plt *
+ +02 +.dynamic .got .got.plt *
+ +03 +.dynamic *
+
+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+[0-9a-f]+ +0+200000012 R_X86_64_TPOFF64 +0+ sG3 \+ 0
+[0-9a-f]+ +0+300000012 R_X86_64_TPOFF64 +0+ sG5 \+ 0
+[0-9a-f]+ +0+400000010 R_X86_64_DTPMOD64 +0+ sG2 \+ 0
+[0-9a-f]+ +0+400000011 R_X86_64_DTPOFF64 +0+ sG2 \+ 0
+[0-9a-f]+ +0+500000012 R_X86_64_TPOFF64 +0+ sG4 \+ 0
+[0-9a-f]+ +0+800000012 R_X86_64_TPOFF64 +0+ sG6 \+ 0
+[0-9a-f]+ +0+a00000010 R_X86_64_DTPMOD64 +0+ sG1 \+ 0
+[0-9a-f]+ +0+a00000011 R_X86_64_DTPOFF64 +0+ sG1 \+ 0
+
+Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 3 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+[0-9a-f]+ +0+600000007 R_X86_64_JUMP_SLOT +0+ __tls_get_addr \+ 0
+[0-9a-f]+ +0+a00000024 R_X86_64_TLSDESC +0+ sG1 \+ 0
+[0-9a-f]+ +0+400000024 R_X86_64_TLSDESC +0+ sG2 \+ 0
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +2 fc1
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+ +[0-9]+: 0+ +0 +NOTYPE +LOCAL +DEFAULT +UND *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +1 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +2 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +3 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +4 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +5 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +6 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +7 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +8 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +9 *
+ +[0-9]+: [0-9a-f]+ +0 +SECTION +LOCAL +DEFAULT +10 *
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+ +[0-9]+: [0-9a-f]+ +0 +OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG3
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG5
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG2
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG4
+ +[0-9]+: 0+ +0 +NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG6
+ +[0-9]+: [0-9a-f]+ +0 +FUNC +GLOBAL +DEFAULT +2 fc1
+ +[0-9]+: 0+ +0 +TLS +GLOBAL +DEFAULT +UND sG1
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _edata
+ +[0-9]+: [0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +ABS _end
index fa467a5..635974c 100644 (file)
@@ -4,7 +4,7 @@
 #objdump: -drj.text
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Disassembly of section .text:
 
@@ -20,7 +20,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 5e 02 20 00[   ]+add    0x20025e\(%rip\),%rcx +# 200668 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_TPOFF64     sG3
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -31,24 +31,24 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 68 02 20 00[   ]+add    0x200268\(%rip\),%rcx +# 200688 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x170>
 #                              -> R_X86_64_TPOFF64     sG4
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 # GD, gd first
- +[0-9a-f]+:   66 48 8d 3d 6c 02 20[   ]+data32 lea 0x20026c\(%rip\),%rdi +# 200698 <.*>
- +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 48 8d 3d ([0-9a-f]{2} ){3}[  ]+data32 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x180>
+ +[0-9a-f]+:   [0-9a-f]{2} *
 #                              -> R_X86_64_DTPMOD64    sG1
- +[0-9a-f]+:   66 66 48 e8 9c ff ff[   ]+data32 data32 callq [0-9a-f]+ <.*>
- +[0-9a-f]+:   ff[     ]+
+ +[0-9a-f]+:   66 66 48 e8 ([0-9a-f]{2} ){3}[  ]+data32 data32 callq [0-9a-f]+ <__tls_get_addr@plt>
+ +[0-9a-f]+:   [0-9a-f]{2} *
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 8d 05 a1 02 20 00[   ]+lea    0x2002a1\(%rip\),%rax +# 2006e0 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x30>
 #                              -> R_X86_64_TLSDESC     sG1
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
@@ -56,18 +56,18 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 # GD, desc first
- +[0-9a-f]+:   48 8d 05 84 02 20 00[   ]+lea    0x200284\(%rip\),%rax +# 2006d0 <.*>
+ +[0-9a-f]+:   48 8d 05 ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_GLOBAL_OFFSET_TABLE_\+0x20>
 #                              -> R_X86_64_TLSDESC     sG2
  +[0-9a-f]+:   ff 10[  ]+callq  \*\(%rax\)
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   66 48 8d 3d 1e 02 20[   ]+data32 lea 0x20021e\(%rip\),%rdi +# 200678 <.*>
- +[0-9a-f]+:   00 *
+ +[0-9a-f]+:   66 48 8d 3d ([0-9a-f]{2} ){3}[  ]+data32 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x160>
+ +[0-9a-f]+:   [0-9a-f]{2} *
 #                              -> R_X86_64_DTPMOD64    sG2
- +[0-9a-f]+:   66 66 48 e8 6e ff ff[   ]+data32 data32 callq [0-9a-f]+ <.*>
- +[0-9a-f]+:   ff[     ]+
+ +[0-9a-f]+:   66 66 48 e8 ([0-9a-f]{2} ){3}[  ]+data32 data32 callq [0-9a-f]+ <__tls_get_addr@plt>
+ +[0-9a-f]+:   [0-9a-f]{2} *
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -76,13 +76,13 @@ Disassembly of section .text:
 # GD -> IE, gd first, after IE use
  +[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +[0-9a-f]+:   00 00 *
- +[0-9a-f]+:   48 03 05 f2 01 20 00[   ]+add    0x2001f2\(%rip\),%rax +# 200668 <.*>
+ +[0-9a-f]+:   48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_TPOFF64     sG3
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 8b 05 e7 01 20 00[   ]+mov    0x2001e7\(%rip\),%rax +# 200668 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_TPOFF64     sG3
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -90,7 +90,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 # GD -> IE, desc first, after IE use
- +[0-9a-f]+:   48 8b 05 fa 01 20 00[   ]+mov    0x2001fa\(%rip\),%rax +# 200688 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x170>
 #                              -> R_X86_64_TPOFF64     sG4
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -99,7 +99,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +[0-9a-f]+:   00 00 *
- +[0-9a-f]+:   48 03 05 e4 01 20 00[   ]+add    0x2001e4\(%rip\),%rax +# 200688 <.*>
+ +[0-9a-f]+:   48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x170>
 #                              -> R_X86_64_TPOFF64     sG4
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -108,13 +108,13 @@ Disassembly of section .text:
 # GD -> IE, gd first, before IE use
  +[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +[0-9a-f]+:   00 00 *
- +[0-9a-f]+:   48 03 05 b8 01 20 00[   ]+add    0x2001b8\(%rip\),%rax +# 200670 <.*>
+ +[0-9a-f]+:   48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x158>
 #                              -> R_X86_64_TPOFF64     sG5
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 8b 05 ad 01 20 00[   ]+mov    0x2001ad\(%rip\),%rax +# 200670 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x158>
 #                              -> R_X86_64_TPOFF64     sG5
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -122,7 +122,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
 # GD -> IE, desc first, before IE use
- +[0-9a-f]+:   48 8b 05 c0 01 20 00[   ]+mov    0x2001c0\(%rip\),%rax +# 200690 <.*>
+ +[0-9a-f]+:   48 8b 05 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x178>
 #                              -> R_X86_64_TPOFF64     sG6
  +[0-9a-f]+:   66 90[  ]+xchg   %ax,%ax
  +[0-9a-f]+:   90[     ]+nop *
@@ -131,7 +131,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +[0-9a-f]+:   00 00 *
- +[0-9a-f]+:   48 03 05 aa 01 20 00[   ]+add    0x2001aa\(%rip\),%rax +# 200690 <.*>
+ +[0-9a-f]+:   48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x178>
 #                              -> R_X86_64_TPOFF64     sG6
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -142,7 +142,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 74 01 20 00[   ]+add    0x200174\(%rip\),%rcx +# 200670 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x158>
 #                              -> R_X86_64_TPOFF64     sG5
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
@@ -153,7 +153,7 @@ Disassembly of section .text:
  +[0-9a-f]+:   00 00 *
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
- +[0-9a-f]+:   48 03 0d 7e 01 20 00[   ]+add    0x20017e\(%rip\),%rcx +# 200690 <.*>
+ +[0-9a-f]+:   48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x178>
 #                              -> R_X86_64_TPOFF64     sG6
  +[0-9a-f]+:   90[     ]+nop *
  +[0-9a-f]+:   90[     ]+nop *
diff --git a/ld/testsuite/ld-x86-64/tlspic-nacl.rd b/ld/testsuite/ld-x86-64/tlspic-nacl.rd
new file mode 100644 (file)
index 0000000..56a07bf
--- /dev/null
@@ -0,0 +1,146 @@
+#source: tlspic1.s
+#source: tlspic2.s
+#as: --64
+#ld: -shared -melf_x86_64_nacl --no-ld-generated-unwind-info
+#readelf: -WSsrl
+#target: x86_64-*-nacl*
+
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+ +\[Nr\] Name +Type +Address +Off +Size +ES Flg Lk Inf Al
+ +\[[ 0-9]+\] +NULL +0+ 0+ 0+ 00 +0 +0 +0
+ +\[[ 0-9]+\] .plt +.*
+ +\[[ 0-9]+\] .text +PROGBITS +0+1000 [0-9a-f]+ 0+1ac 00 +AX +0 +0 4096
+ +\[[ 0-9]+\] .hash +.*
+ +\[[ 0-9]+\] .dynsym +.*
+ +\[[ 0-9]+\] .dynstr +.*
+ +\[[ 0-9]+\] .rela.dyn +.*
+ +\[[ 0-9]+\] .rela.plt +.*
+ +\[[ 0-9]+\] .tdata +PROGBITS +0+100104e8 [0-9a-f]+ 0+60 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .tbss +NOBITS +0+10010548 [0-9a-f]+ 0+20 00 WAT +0 +0 +1
+ +\[[ 0-9]+\] .dynamic +DYNAMIC +0+10010548 [0-9a-f]+ 0+130 10 +WA +5 +0 +8
+ +\[[ 0-9]+\] .got +PROGBITS +0+10010678 [0-9a-f]+ 0+90 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .got.plt +PROGBITS +0+10010708 [0-9a-f]+ 0+20 08 +WA +0 +0 +8
+ +\[[ 0-9]+\] .shstrtab +.*
+ +\[[ 0-9]+\] .symtab +.*
+ +\[[ 0-9]+\] .strtab +.*
+Key to Flags:
+.*
+.*
+.*
+
+Elf file type is DYN \(Shared object file\)
+Entry point 0x1000
+There are [0-9]+ program headers, starting at offset [0-9]+
+
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
+ +LOAD +0x0+10000 0x0+ 0x0+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
+ +LOAD +0x0+ 0x0+10000000 0x0+10000000 0x0+4e8 0x0+4e8 R +0x10000
+ +LOAD +0x0+4e8 0x0+100104e8 0x0+100104e8 0x0+240 0x0+240 RW +0x10000
+ +DYNAMIC +0x0+548 0x0+10010548 0x0+10010548 0x0+130 0x0+130 RW +0x8
+ +TLS +0x0+4e8 0x0+100104e8 0x0+100104e8 0x0+60 0x0+80 R +0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.plt .text *
+ +01 +.hash .dynsym .dynstr .rela.dyn .rela.plt *
+ +02 +.tdata .dynamic .got .got.plt *
+ +03 +.dynamic *
+ +04 +.tdata .tbss *
+
+Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+[0-9a-f ]+R_X86_64_DTPMOD64 +0+
+[0-9a-f ]+R_X86_64_TPOFF64 +0+24
+[0-9a-f ]+R_X86_64_TPOFF64 +0+30
+[0-9a-f ]+R_X86_64_DTPMOD64 +0+
+[0-9a-f ]+R_X86_64_DTPMOD64 +0+
+[0-9a-f ]+R_X86_64_TPOFF64 +0+64
+[0-9a-f ]+R_X86_64_TPOFF64 +0+50
+[0-9a-f ]+R_X86_64_TPOFF64 +0+70
+[0-9a-f ]+R_X86_64_DTPMOD64 +0+
+[0-9a-f ]+R_X86_64_TPOFF64 +0+44
+[0-9a-f ]+R_X86_64_TPOFF64 +0+10 sg5 \+ 0
+[0-9a-f ]+R_X86_64_DTPMOD64 +0+ sg1 \+ 0
+[0-9a-f ]+R_X86_64_DTPOFF64 +0+ sg1 \+ 0
+[0-9a-f ]+R_X86_64_TPOFF64 +0+4 sg2 \+ 0
+
+Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries:
+ +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
+[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ __tls_get_addr \+ 0
+
+Symbol table '\.dynsym' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +2 *
+.* SECTION +LOCAL +DEFAULT +8 *
+.* TLS +GLOBAL +DEFAULT +8 sg8
+.* TLS +GLOBAL +DEFAULT +8 sg3
+.* TLS +GLOBAL +DEFAULT +8 sg4
+.* TLS +GLOBAL +DEFAULT +8 sg5
+.* NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
+.* TLS +GLOBAL +DEFAULT +8 sg1
+.* FUNC +GLOBAL +DEFAULT +2 fn1
+.* NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+.* TLS +GLOBAL +DEFAULT +8 sg2
+.* TLS +GLOBAL +DEFAULT +8 sg6
+.* TLS +GLOBAL +DEFAULT +8 sg7
+.* NOTYPE +GLOBAL +DEFAULT +ABS _edata
+.* NOTYPE +GLOBAL +DEFAULT +ABS _end
+
+Symbol table '\.symtab' contains [0-9]+ entries:
+ +Num: +Value +Size +Type +Bind +Vis +Ndx +Name
+.* NOTYPE +LOCAL +DEFAULT +UND *
+.* SECTION +LOCAL +DEFAULT +1 *
+.* SECTION +LOCAL +DEFAULT +2 *
+.* SECTION +LOCAL +DEFAULT +3 *
+.* SECTION +LOCAL +DEFAULT +4 *
+.* SECTION +LOCAL +DEFAULT +5 *
+.* SECTION +LOCAL +DEFAULT +6 *
+.* SECTION +LOCAL +DEFAULT +7 *
+.* SECTION +LOCAL +DEFAULT +8 *
+.* SECTION +LOCAL +DEFAULT +9 *
+.* SECTION +LOCAL +DEFAULT +10 *
+.* SECTION +LOCAL +DEFAULT +11 *
+.* SECTION +LOCAL +DEFAULT +12 *
+.* TLS +LOCAL +DEFAULT +8 sl1
+.* TLS +LOCAL +DEFAULT +8 sl2
+.* TLS +LOCAL +DEFAULT +8 sl3
+.* TLS +LOCAL +DEFAULT +8 sl4
+.* TLS +LOCAL +DEFAULT +8 sl5
+.* TLS +LOCAL +DEFAULT +8 sl6
+.* TLS +LOCAL +DEFAULT +8 sl7
+.* TLS +LOCAL +DEFAULT +8 sl8
+.* TLS +LOCAL +DEFAULT +9 sH1
+.* OBJECT +LOCAL +DEFAULT +ABS _DYNAMIC
+.* TLS +LOCAL +DEFAULT +8 sh3
+.* TLS +LOCAL +DEFAULT +9 sH2
+.* TLS +LOCAL +DEFAULT +9 sH7
+.* TLS +LOCAL +DEFAULT +8 sh7
+.* TLS +LOCAL +DEFAULT +8 sh8
+.* TLS +LOCAL +DEFAULT +9 sH4
+.* TLS +LOCAL +DEFAULT +8 sh4
+.* TLS +LOCAL +DEFAULT +9 sH3
+.* TLS +LOCAL +DEFAULT +8 sh5
+.* TLS +LOCAL +DEFAULT +9 sH5
+.* TLS +LOCAL +DEFAULT +9 sH6
+.* TLS +LOCAL +DEFAULT +9 sH8
+.* TLS +LOCAL +DEFAULT +8 sh1
+.* OBJECT +LOCAL +DEFAULT +ABS _GLOBAL_OFFSET_TABLE_
+.* TLS +LOCAL +DEFAULT +8 sh2
+.* TLS +LOCAL +DEFAULT +8 sh6
+.* TLS +GLOBAL +DEFAULT +8 sg8
+.* TLS +GLOBAL +DEFAULT +8 sg3
+.* TLS +GLOBAL +DEFAULT +8 sg4
+.* TLS +GLOBAL +DEFAULT +8 sg5
+.* NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr
+.* TLS +GLOBAL +DEFAULT +8 sg1
+.* FUNC +GLOBAL +DEFAULT +2 fn1
+.* NOTYPE +GLOBAL +DEFAULT +ABS __bss_start
+.* TLS +GLOBAL +DEFAULT +8 sg2
+.* TLS +GLOBAL +DEFAULT +8 sg6
+.* TLS +GLOBAL +DEFAULT +8 sg7
+.* NOTYPE +GLOBAL +DEFAULT +ABS _edata
+.* NOTYPE +GLOBAL +DEFAULT +ABS _end
index 0c474a9..93baac0 100644 (file)
@@ -5,7 +5,7 @@
 #objdump: -drj.text
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Disassembly of section .text:
 
@@ -17,8 +17,8 @@ Disassembly of section .text:
  +1006:        90[     ]+nop *
  +1007:        90[     ]+nop *
 #  GD
- +1008:        66 48 8d 3d 80 03 20[   ]+data32 lea 0x200380\(%rip\),%rdi +# 201390 <.*>
- +100f:        00 *
+ +1008:        66 48 8d 3d ([0-9a-f]{2} ){3}[  ]+data32 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x180>
+ +100f:        [0-9a-f         ]+
 #                              -> R_X86_64_DTPMOD64    sg1
  +1010:        66 66 48 e8 [0-9a-f     ]+data32 data32 callq [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -30,15 +30,15 @@ Disassembly of section .text:
 #  GD -> IE because variable is referenced through IE too
  +101c:        64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +1023:        00 00 *
- +1025:        48 03 05 84 03 20 00[   ]+add    0x200384\(%rip\),%rax +# 2013b0 <.*>
+ +1025:        48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x1a0>
 #                              -> R_X86_64_TPOFF64     sg2
  +102c:        90[     ]+nop *
  +102d:        90[     ]+nop *
  +102e:        90[     ]+nop *
  +102f:        90[     ]+nop *
 #  GD against local variable
- +1030:        66 48 8d 3d 08 03 20[   ]+data32 lea 0x200308\(%rip\),%rdi +# 201340 <.*>
- +1037:        00 *
+ +1030:        66 48 8d 3d ([0-9a-f]{2} ){3}[  ]+data32 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x130>
+ +1037:        [0-9a-f         ]+
 #                              -> R_X86_64_DTPMOD64    [0 0x2000000000000000]
  +1038:        66 66 48 e8 [0-9a-f     ]+data32 data32 callq [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -50,15 +50,15 @@ Disassembly of section .text:
 #  GD -> IE against local variable referenced through IE too
  +1044:        64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +104b:        00 00 *
- +104d:        48 03 05 fc 02 20 00[   ]+add    0x2002fc\(%rip\),%rax +# 201350 <.*>
+ +104d:        48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x140>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x24
  +1054:        90[     ]+nop *
  +1055:        90[     ]+nop *
  +1056:        90[     ]+nop *
  +1057:        90[     ]+nop *
 #  GD against hidden and local variable
- +1058:        66 48 8d 3d 58 03 20[   ]+data32 lea 0x200358\(%rip\),%rdi +# 2013b8 <.*>
- +105f:        00 *
+ +1058:        66 48 8d 3d ([0-9a-f]{2} ){3}[  ]+data32 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x1a8>
+ +105f:        [0-9a-f         ]+
 #                              -> R_X86_64_DTPMOD64    [0 0x4000000000000000]
  +1060:        66 66 48 e8 [0-9a-f     ]+data32 data32 callq [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -70,15 +70,15 @@ Disassembly of section .text:
 #  GD -> IE against hidden and local variable referenced through IE too
  +106c:        64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +1073:        00 00 *
- +1075:        48 03 05 4c 03 20 00[   ]+add    0x20034c\(%rip\),%rax +# 2013c8 <.*>
+ +1075:        48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x1b8>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x44
  +107c:        90[     ]+nop *
  +107d:        90[     ]+nop *
  +107e:        90[     ]+nop *
  +107f:        90[     ]+nop *
 #  GD against hidden but not local variable
- +1080:        66 48 8d 3d e8 02 20[   ]+data32 lea 0x2002e8\(%rip\),%rdi +# 201370 <.*>
- +1087:        00 *
+ +1080:        66 48 8d 3d ([0-9a-f]{2} ){3}[  ]+data32 lea 0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x160>
+ +1087:        [0-9a-f         ]+
 #                              -> R_X86_64_DTPMOD64    [0 0x6000000000000000]
  +1088:        66 66 48 e8 [0-9a-f     ]+data32 data32 callq [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -90,14 +90,14 @@ Disassembly of section .text:
 #  GD -> IE against hidden but not local variable referenced through IE too
  +1094:        64 48 8b 04 25 00 00[   ]+mov    %fs:0x0,%rax
  +109b:        00 00 *
- +109d:        48 03 05 dc 02 20 00[   ]+add    0x2002dc\(%rip\),%rax +# 201380 <.*>
+ +109d:        48 03 05 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rax +# [0-9a-f]+ <_DYNAMIC\+0x170>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x64
  +10a4:        90[     ]+nop *
  +10a5:        90[     ]+nop *
  +10a6:        90[     ]+nop *
  +10a7:        90[     ]+nop *
 #  LD
- +10a8:        48 8d 3d b1 02 20 00[   ]+lea    0x2002b1\(%rip\),%rdi +# 201360 <.*>
+ +10a8:        48 8d 3d ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_DTPMOD64    [0 0x000000000000000]
  +10af:        e8 [0-9a-f      ]+callq  [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -112,7 +112,7 @@ Disassembly of section .text:
  +10c8:        90[     ]+nop *
  +10c9:        90[     ]+nop *
 #  LD against hidden and local variables
- +10ca:        48 8d 3d 8f 02 20 00[   ]+lea    0x20028f\(%rip\),%rdi +# 201360 <.*>
+ +10ca:        48 8d 3d ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_DTPMOD64    [0 0x000000000000000]
  +10d1:        e8 [0-9a-f      ]+callq  [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -127,7 +127,7 @@ Disassembly of section .text:
  +10ea:        90[     ]+nop *
  +10eb:        90[     ]+nop *
 #  LD against hidden but not local variables
- +10ec:        48 8d 3d 6d 02 20 00[   ]+lea    0x20026d\(%rip\),%rdi +# 201360 <.*>
+ +10ec:        48 8d 3d ([0-9a-f]{2} ){4}[     ]+lea    0x[0-9a-f]+\(%rip\),%rdi +# [0-9a-f]+ <_DYNAMIC\+0x150>
 #                              -> R_X86_64_DTPMOD64    [0 0x000000000000000]
  +10f3:        e8 [0-9a-f      ]+callq  [0-9a-f]+ <.*>
 #                              -> R_X86_64_JUMP_SLOT   __tls_get_addr
@@ -144,7 +144,7 @@ Disassembly of section .text:
  +1113:        00 00 *
  +1115:        90[     ]+nop *
  +1116:        90[     ]+nop *
- +1117:        48 03 0d 92 02 20 00[   ]+add    0x200292\(%rip\),%rcx +# 2013b0 <.*>
+ +1117:        48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x1a0>
 #                              -> R_X86_64_TPOFF64     sg2
  +111e:        90[     ]+nop *
  +111f:        90[     ]+nop *
@@ -155,7 +155,7 @@ Disassembly of section .text:
  +1129:        00 00 *
  +112b:        90[     ]+nop *
  +112c:        90[     ]+nop *
- +112d:        4c 03 35 1c 02 20 00[   ]+add    0x20021c\(%rip\),%r14 +# 201350 <.*>
+ +112d:        4c 03 35 ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%r14 +# [0-9a-f]+ <_DYNAMIC\+0x140>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x24
  +1134:        90[     ]+nop *
  +1135:        90[     ]+nop *
@@ -166,7 +166,7 @@ Disassembly of section .text:
  +113f:        00 00 *
  +1141:        90[     ]+nop *
  +1142:        90[     ]+nop *
- +1143:        48 03 0d 7e 02 20 00[   ]+add    0x20027e\(%rip\),%rcx +# 2013c8 <.*>
+ +1143:        48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x1b8>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x44
  +114a:        90[     ]+nop *
  +114b:        90[     ]+nop *
@@ -177,7 +177,7 @@ Disassembly of section .text:
  +1155:        00 00 *
  +1157:        90[     ]+nop *
  +1158:        90[     ]+nop *
- +1159:        48 03 0d 20 02 20 00[   ]+add    0x200220\(%rip\),%rcx +# 201380 <.*>
+ +1159:        48 03 0d ([0-9a-f]{2} ){4}[     ]+add    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x170>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x64
  +1160:        90[     ]+nop *
  +1161:        90[     ]+nop *
@@ -185,7 +185,7 @@ Disassembly of section .text:
  +1163:        90[     ]+nop *
 #  Direct access through %fs
 #  IE against global var
- +1164:        48 8b 0d 1d 02 20 00[   ]+mov    0x20021d\(%rip\),%rcx +# 201388 <.*>
+ +1164:        48 8b 0d ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x178>
 #                              -> R_X86_64_TPOFF64     sg5
  +116b:        90[     ]+nop *
  +116c:        90[     ]+nop *
@@ -195,7 +195,7 @@ Disassembly of section .text:
  +1173:        90[     ]+nop *
  +1174:        90[     ]+nop *
 #  IE against local var
- +1175:        4c 8b 15 dc 01 20 00[   ]+mov    0x2001dc\(%rip\),%r10 +# 201358 <.*>
+ +1175:        4c 8b 15 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%r10 +# [0-9a-f]+ <_DYNAMIC\+0x148>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x30
  +117c:        90[     ]+nop *
  +117d:        90[     ]+nop *
@@ -205,7 +205,7 @@ Disassembly of section .text:
  +1184:        90[     ]+nop *
  +1185:        90[     ]+nop *
 #  IE against hidden and local var
- +1186:        48 8b 15 13 02 20 00[   ]+mov    0x200213\(%rip\),%rdx +# 2013a0 <.*>
+ +1186:        48 8b 15 ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rdx +# [0-9a-f]+ <_DYNAMIC\+0x190>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x50
  +118d:        90[     ]+nop *
  +118e:        90[     ]+nop *
@@ -215,7 +215,7 @@ Disassembly of section .text:
  +1195:        90[     ]+nop *
  +1196:        90[     ]+nop *
 #  IE against hidden but not local var
- +1197:        48 8b 0d 0a 02 20 00[   ]+mov    0x20020a\(%rip\),%rcx +# 2013a8 <.*>
+ +1197:        48 8b 0d ([0-9a-f]{2} ){4}[     ]+mov    0x[0-9a-f]+\(%rip\),%rcx +# [0-9a-f]+ <_DYNAMIC\+0x198>
 #                              -> R_X86_64_TPOFF64     *ABS*+0x70
  +119e:        90[     ]+nop *
  +119f:        90[     ]+nop *
index 36c1b52..e26c954 100644 (file)
@@ -5,15 +5,15 @@
 #objdump: -sj.got
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .got:
201340 00000000 00000000 20000000 00000000  .*
201350 00000000 00000000 00000000 00000000  .*
201360 00000000 00000000 00000000 00000000  .*
201370 00000000 00000000 60000000 00000000  .*
201380 00000000 00000000 00000000 00000000  .*
201390 00000000 00000000 00000000 00000000  .*
2013a0 00000000 00000000 00000000 00000000  .*
2013b0 00000000 00000000 00000000 00000000  .*
2013c0 40000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 20000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 60000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 00000000 00000000 00000000 00000000  .*
[0-9a-f]+ 40000000 00000000 00000000 00000000  .*
index 36a7f8e..8fc12c6 100644 (file)
@@ -5,12 +5,12 @@
 #objdump: -sj.tdata
 #target: x86_64-*-*
 
-.*: +file format elf64-x86-64
+.*: +file format elf64-x86-64.*
 
 Contents of section .tdata:
2011ac 11000000 12000000 13000000 14000000  .*
2011bc 15000000 16000000 17000000 18000000  .*
2011cc 41000000 42000000 43000000 44000000  .*
2011dc 45000000 46000000 47000000 48000000  .*
2011ec 01010000 02010000 03010000 04010000  .*
2011fc 05010000 06010000 07010000 08010000  .*
[0-9a-f]+ 11000000 12000000 13000000 14000000  .*
[0-9a-f]+ 15000000 16000000 17000000 18000000  .*
[0-9a-f]+ 41000000 42000000 43000000 44000000  .*
[0-9a-f]+ 45000000 46000000 47000000 48000000  .*
[0-9a-f]+ 01010000 02010000 03010000 04010000  .*
[0-9a-f]+ 05010000 06010000 07010000 08010000  .*
index c258251..963e8e7 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ld-x86_64 tests
-#   Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+#   Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
 #   Free Software Foundation
 #
 # This file is part of the GNU Binutils.
 # tools like objdump as well as the linker.
 
 if { !([istarget "x86_64-*-elf*"]
+       || [istarget "x86_64-*-nacl*"]
        || [istarget "x86_64-*-linux*"]) } {
     return
 }
 
+if [istarget "*-*-nacl*"] {
+    set emul "elf_x86_64_nacl"
+} else {
+    set emul "elf_x86_64"
+}
+
 # List contains test-items with 3 items followed by 2 lists:
 # 0:name 1:ld options 2:assembler options
 # 3:filenames of assembler files 4: action and options. 5: name of output file
@@ -38,6 +45,11 @@ if { !([istarget "x86_64-*-elf*"]
 # readelf: Apply readelf options on result.  Compare with regex (last arg).
 
 set x86_64tests {
+    {"Helper shared library (basic PLT test)"
+      "-shared -melf_x86_64" "--64" {pltlib.s} {} "libpltlib.so"}
+    {"basic PLT generation"
+     "-melf_x86_64 tmpdir/libpltlib.so" "--64" {plt.s}
+     {{objdump -drj.plt plt.pd}} "plt"}
     {"TLS -fpic -shared transitions"
      "-shared -melf_x86_64 --no-ld-generated-unwind-info"
      "--64" {tlspic1.s tlspic2.s}
@@ -111,10 +123,35 @@ set x86_64tests {
     {"TLS X32 LD->LE transition" "-melf32_x86_64"
      "--x32" {tlsld2.s}
      {{objdump -dwr tlsld2.dd}} "tlsld2"}
-     {"build 32-bit object with 33 locals" "-e 0" "--32" {32bit.s} {{ ld incompatible.l }} "dummy" }
-     {"build 64-bit object" "-e 0 --defsym foo=1" "--64" {64bit.s} {} "dummy" }
-     {"link mixed objects"  "-e 0 tmpdir/32bit.o tmpdir/64bit.o" "" {} { { ld incompatible.l } } "mixed"}
+
+     {"build 32-bit object with 33 locals" "-melf_x86_64 -e 0" "--32" {32bit.s} {{ ld incompatible.l }} "dummy" }
+     {"build 64-bit object" "-melf_x86_64 -e 0 --defsym foo=1" "--64" {64bit.s} {} "dummy" }
+     {"link mixed objects"  "-melf_x86_64 -e 0 tmpdir/32bit.o tmpdir/64bit.o" "" {} { { ld incompatible.l } } "mixed"}
+}
+
+# So as to avoid rewriting every last test case here in a nacl variant,
+# we use black magic to massage the generic cases into nacl-variant cases.
+if [istarget "*-*-nacl*"] {
+    set emul elf_x86_64_nacl
+
+    set lhs {elf(32)?_(i386|x86_64)[[:>:]]}
+    set rhs {&_nacl}
+
+    # Change all the -melf_x86_64 to -melf_x86_64_nacl so linking can succeed.
+    regsub -all -- $lhs $x86_64tests $rhs x86_64tests
+
+    # Same, applied to all the run_dump_test cases.
+    set options_regsub(ld) [list $lhs $rhs]
+
+    # The section/segment layout differs too much for the vanilla
+    # readelf output files to match.  So massage the cases so that
+    # they refer to a foo-nacl.rd file instead of a foo.rd file.
+    regsub -all -- {([a-z0-9]+)\.rd} $x86_64tests {\1-nacl.rd} x86_64tests
+
+    # Likewise for PLTs.
+    regsub -all -- {([a-z0-9]+)\.pd} $x86_64tests {\1-nacl.pd} x86_64tests
+} else {
+    set emul elf_x86_64
 }
 
 run_ld_link_tests $x86_64tests
@@ -124,21 +161,21 @@ global ld
 
 set test_name "Mixed x86_64 and i386 input test 1"
 set test mixed1
-if { ![ld_simple_link $ld tmpdir/$test "-melf_x86_64 tmpdir/${test}a.o tmpdir/${test}b.o"] } {
+if { ![ld_simple_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}b.o"] } {
     if [string match "*i386 architecture of input file `tmpdir/${test}b.o' is incompatible with i386:x86-64 output*" $link_output] {
-       pass "$test_name" 
+       pass "$test_name"
     } {
-       fail "$test_name" 
+       fail "$test_name"
     }
 }
 
 set test_name "Mixed x86_64 and i386 input test 2"
 set test mixed2
-if { ![ld_simple_link $ld tmpdir/$test "-melf_x86_64 tmpdir/${test}a.o tmpdir/${test}b.o"] } {
+if { ![ld_simple_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}b.o"] } {
     if [string match "*i386 architecture of input file `tmpdir/${test}b.o' is incompatible with i386:x86-64 output*" $link_output] {
-       pass "$test_name" 
+       pass "$test_name"
     } {
-       fail "$test_name" 
+       fail "$test_name"
     }
 }
 
@@ -169,36 +206,36 @@ run_dump_test "discarded1"
 run_dump_test "pr12718"
 run_dump_test "pr12921"
 
-if { ![istarget "x86_64-*-linux*"] } {
+if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
     return
 }
 
-if ![ld_assemble $as "--x32 $srcdir/$subdir/start.s" tmpdir/startx32.o] { 
+if ![ld_assemble $as "--x32 $srcdir/$subdir/start.s" tmpdir/startx32.o] {
     unresolved "Build ILP32 start.o"
     return
 }
 
-if ![ld_assemble $as "--32 $srcdir/$subdir/start.s" tmpdir/start32.o] { 
+if ![ld_assemble $as "--32 $srcdir/$subdir/start.s" tmpdir/start32.o] {
     unresolved "Build ia32 start.o"
     return
 }
 
-if ![ld_assemble $as "--64 $srcdir/$subdir/start.s" tmpdir/start64.o] { 
+if ![ld_assemble $as "--64 $srcdir/$subdir/start.s" tmpdir/start64.o] {
     unresolved "Build LP64 start.o"
     return
 }
 
-if ![ld_assemble $as "--x32 $srcdir/$subdir/foo.s" tmpdir/foox32.o] { 
+if ![ld_assemble $as "--x32 $srcdir/$subdir/foo.s" tmpdir/foox32.o] {
     unresolved "Build ILP32 foo.o"
     return
 }
 
-if ![ld_assemble $as "--32 $srcdir/$subdir/foo.s" tmpdir/foo32.o] { 
+if ![ld_assemble $as "--32 $srcdir/$subdir/foo.s" tmpdir/foo32.o] {
     unresolved "Build ia32 foo.o"
     return
 }
 
-if ![ld_assemble $as "--64 $srcdir/$subdir/foo.s" tmpdir/foo64.o] { 
+if ![ld_assemble $as "--64 $srcdir/$subdir/foo.s" tmpdir/foo64.o] {
     unresolved "Build LP64 foo.o"
     return
 }
@@ -208,6 +245,7 @@ run_dump_test "ilp32-1"
 run_dump_test "ilp32-2"
 run_dump_test "ilp32-3"
 run_dump_test "ilp32-4"
+run_dump_test "ilp32-4-nacl"
 run_dump_test "ilp32-5"
 run_dump_test "ilp32-6"
 run_dump_test "ilp32-7"
index 8b51123..9797dff 100644 (file)
@@ -1,6 +1,6 @@
 # Support routines for LD testsuite.
 #   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-#    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+#    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
 #    Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
@@ -31,7 +31,7 @@ load_common_lib binutils-common.exp
 # Returns 0 otherwise.
 #
 proc at_least_gcc_version { major minor } {
-    
+
     if {![info exists CC]} {
        set CC [find_gcc]
     }
@@ -870,6 +870,10 @@ proc run_dump_test { name } {
 }
 
 proc slurp_options { file } {
+    # If options_regsub(foo) is set to {a b}, then the contents of a
+    # "#foo:" line will have regsub -all applied to replace a with b.
+    global options_regsub
+
     if [catch { set f [open $file r] } x] {
        #perror "couldn't open `$file': $x"
        perror "$x"
@@ -887,6 +891,11 @@ proc slurp_options { file } {
        # Whitespace here is space-tab.
        if [regexp $pat $line xxx opt_name opt_val] {
            # match!
+           if [info exists options_regsub($opt_name)] {
+               set subst $options_regsub($opt_name)
+               regsub -all -- [lindex $subst 0] $opt_val [lindex $subst 1] \
+                   opt_val
+           }
            lappend opt_array [list $opt_name $opt_val]
        } else {
            break
@@ -940,7 +949,7 @@ proc ar_simple_create { ar aropts target objects } {
 #   objdump: Apply objdump options on result.
 #   nm: Apply nm options on result.
 #   readelf: Apply readelf options on result.
-#   ld: Don't apply anything on result.  Compare output during linking with 
+#   ld: Don't apply anything on result.  Compare output during linking with
 #     the file containing regexps (which is the second arg, not the third).
 #     Note that this *must* be the first action if it is to be used at all;
 #     in all other cases, any output from the linker during linking is
@@ -1076,7 +1085,7 @@ proc run_ld_link_tests { ldtests } {
                    set comp_output [prune_warnings [file_contents "ld.stderr"]]
                    remote_file host delete "ld.stderr"
                    remote_file build delete "ld.stderr"
-                    
+
                    if {[info exists old_lc_all]} {
                        set env(LC_ALL) $old_lc_all
                    } else {
@@ -1237,7 +1246,7 @@ proc run_ld_link_exec_tests { targets_to_xfail ldtests } {
                send_log "Running: $binfile > $binfile.out\n"
                verbose "Running: $binfile > $binfile.out"
                catch "exec $binfile > $binfile.out" exec_output
-           
+
                if ![string match "" $exec_output] then {
                    send_log "$exec_output\n"
                    verbose "$exec_output" 1
@@ -1435,7 +1444,7 @@ proc run_cc_link_tests { ldtests } {
 proc check_gc_sections_available { } {
     global gc_sections_available_saved
     global ld
-    
+
     if {![info exists gc_sections_available_saved]} {
        # Some targets don't support gc-sections despite whatever's
        # advertised by ld's options.