diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-09-19 19:01:18 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-09-19 19:01:18 +0000 |
commit | 37e55690c4f22ba8d0a24fb9a3ccbb1515e49790 (patch) | |
tree | 9402d50f3d4ef21d38bd384f6e3fb92636523b3e /ld/testsuite/ld-i386/tlsnopic.dd | |
parent | e21b0cc13f51883a0dd05ec2ecfd0eedf0e59039 (diff) | |
download | gdb-37e55690c4f22ba8d0a24fb9a3ccbb1515e49790.zip gdb-37e55690c4f22ba8d0a24fb9a3ccbb1515e49790.tar.gz gdb-37e55690c4f22ba8d0a24fb9a3ccbb1515e49790.tar.bz2 |
bfd/
* reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
BFD_RELOC_386_TLS_GOTIE): Add.
* bfd-in2.h, libbfd.h: Rebuilt.
* elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
and R_386_TLS_GOTIE.
(elf_i386_reloc_type_lookup): Handle it.
(struct elf_i386_link_hash_entry): Change tls_type type to unsigned
char instead of enum, change GOT_* into defines.
(GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
(elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
(elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
R_386_PLT32 cases so that R_386_TLS_IE can fall through.
Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
(elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
(allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
tls_type is GOT_TLS_IE_BOTH.
(elf_i386_size_dynamic_sections): Likewise.
(elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
(elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
all 4 GOT_TLS_* TLS types.
gas/
* config/tc-i386.c (tc_i386_fix_adjustable): Handle
BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE.
(BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Define to 0
if not defined.
(lex_got): Handle @GOTNTPOFF and @INDNTPOFF.
(md_apply_fix3, tc_gen_reloc): Handle BFD_RELOC_386_TLS_IE and
BFD_RELOC_386_TLS_GOTIE.
gas/testsuite/
* gas/i386/tlspic.s: Add tests.
* gas/i386/tlspic.d: Regenerated.
* gas/i386/tlsnopic.s: Add tests.
* gas/i386/tlsnopic.d: Regenerated.
include/
* elf/i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE):
Define.
ld/testsuite/
* ld-i386/i386.exp: New.
* ld-i386/tlsbin.dd: New test.
* ld-i386/tlsbinpic.s: New test.
* ld-i386/tlsbin.rd: New test.
* ld-i386/tlsbin.s: New test.
* ld-i386/tlsbin.sd: New test.
* ld-i386/tlsbin.td: New test.
* ld-i386/tlslib.s: New test.
* ld-i386/tlsnopic1.s: New test.
* ld-i386/tlsnopic2.s: New test.
* ld-i386/tlsnopic.dd: New test.
* ld-i386/tlsnopic.rd: New test.
* ld-i386/tlsnopic.sd: New test.
* ld-i386/tlspic1.s: New test.
* ld-i386/tlspic2.s: New test.
* ld-i386/tlspic.dd: New test.
* ld-i386/tlspic.rd: New test.
* ld-i386/tlspic.sd: New test.
* ld-i386/tlspic.td: New test.
Diffstat (limited to 'ld/testsuite/ld-i386/tlsnopic.dd')
-rw-r--r-- | ld/testsuite/ld-i386/tlsnopic.dd | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/tlsnopic.dd b/ld/testsuite/ld-i386/tlsnopic.dd new file mode 100644 index 0000000..bb9f6e5 --- /dev/null +++ b/ld/testsuite/ld-i386/tlsnopic.dd @@ -0,0 +1,161 @@ +#source: tlsnopic1.s +#source: tlsnopic2.s +#as: --32 +#ld: -shared -melf_i386 +#objdump: -drj.text +#target: i?86-*-* + +.*: +file format elf32-i386 + +Disassembly of section .text: + +0+1000 <fn3>: + 1000: 55[ ]+push %ebp + 1001: 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 94 20 00 00[ ]+add 0x2094,%eax +# ->R_386_TLS_TPOFF sg1 + 1011: 90[ ]+nop * + 1012: 90[ ]+nop * + 1013: 90[ ]+nop * + 1014: 90[ ]+nop * +# @indntpoff direct %gs access IE against global var + 1015: 8b 15 98 20 00 00[ ]+mov 0x2098,%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 * +# @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 9c 20 00 00[ ]+add 0x209c,%eax +# ->R_386_TLS_TPOFF [0x14000000] + 1032: 90[ ]+nop * + 1033: 90[ ]+nop * + 1034: 90[ ]+nop * + 1035: 90[ ]+nop * +# @indntpoff direct %gs access IE against hidden var + 1036: 8b 15 a0 20 00 00[ ]+mov 0x20a0,%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 * +# @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 8c 20 00 00[ ]+add 0x208c,%eax +# ->R_386_TLS_TPOFF [0x00000000] + 1053: 90[ ]+nop * + 1054: 90[ ]+nop * + 1055: 90[ ]+nop * + 1056: 90[ ]+nop * +# @indntpoff direct %gs access IE against local var + 1057: 8b 15 90 20 00 00[ ]+mov 0x2090,%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 * +# LE @tpoff, global var + 1066: 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 * +# LE @tpoff, local var + 107b: 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 * +# 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 +# R_386_TLS_TPOFF sg4 + 109f: 90[ ]+nop * + 10a0: 90[ ]+nop * + 10a1: 90[ ]+nop * + 10a2: 90[ ]+nop * +# LE @ntpoff, hidden var, non-canonical sequence + 10a3: 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 * +# 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 +# R_386_TLS_TPOFF + 10c8: 90[ ]+nop * + 10c9: 90[ ]+nop * + 10ca: 90[ ]+nop * + 10cb: 90[ ]+nop * +# Direct %gs access +# LE @ntpoff, global var + 10cc: 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 * +# LE @ntpoff, local var + 10d6: 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 * +# LE @ntpoff, hidden var + 10e1: 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 0xfffffffc\(%ebp\),%ebx + 10ef: c9[ ]+leave * + 10f0: c3[ ]+ret * + 10f1: 90[ ]+nop * + 10f2: 90[ ]+nop * + 10f3: 90[ ]+nop * |