diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-08-23 16:13:37 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-08-23 16:13:37 +0000 |
commit | 142411caf2c5e5625b3870049219e1c52e2ffaec (patch) | |
tree | ab2942b407f292abe049b2f6e1c532a233bba446 /ld | |
parent | f467aa98dd0bed5ff38471789d6134b9d3bd75cf (diff) | |
download | fsf-binutils-gdb-142411caf2c5e5625b3870049219e1c52e2ffaec.zip fsf-binutils-gdb-142411caf2c5e5625b3870049219e1c52e2ffaec.tar.gz fsf-binutils-gdb-142411caf2c5e5625b3870049219e1c52e2ffaec.tar.bz2 |
bfd/
2007-08-23 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c: Include "bfd_stdint.h".
(elf_i386_rtype_to_howto): New function.
(elf_i386_info_to_howto_rel): Use it.
(x86_64_opcode16): New union type.
(elf_i386_check_tls_transition): New function.
(elf_i386_tls_transition): Updated to check transition and
issue an error if a transition isn't supported.
(elf_i386_check_relocs): Return FALSE if
elf_i386_tls_transition returns FALSE.
(elf_i386_gc_sweep_hook): Likewise.
(elf_i386_relocate_section): Likewise. Remove BFD_ASSERT
on TLS transitions.
* elf64-x86-64.c: Include "bfd_stdint.h".
(x86_64_opcode16): New union type.
(x86_64_opcode32): Likewise.
(elf64_x86_64_check_tls_transition): New function.
(elf64_x86_64_tls_transition): Updated to check transition and
issue an error if a transition isn't supported.
(elf64_x86_64_check_relocs): Return FALSE if
elf64_x86_64_tls_transition returns FALSE.
(elf64_x86_64_gc_sweep_hook): Likewise.
(elf64_x86_64_relocate_section): Likewise. Remove BFD_ASSERT
on TLS transitions.
ld/testsuite/
2007-08-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-i386/tlsbinpic.s: Add a new GD -> IE test.
* ld-i386/tlsgd1.s: Add a new GD -> LE test.
* ld-i386/tlsbin.dd: Updated.
* ld-i386/tlsbin.rd: Likewise.
* ld-i386/tlsgd1.dd: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.dd | 364 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbin.rd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbinpic.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsgd1.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsgd1.s | 3 |
6 files changed, 208 insertions, 180 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 59223f0..ad42541 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2007-08-23 H.J. Lu <hongjiu.lu@intel.com> + + * ld-i386/tlsbinpic.s: Add a new GD -> IE test. + + * ld-i386/tlsgd1.s: Add a new GD -> LE test. + + * ld-i386/tlsbin.dd: Updated. + * ld-i386/tlsbin.rd: Likewise. + * ld-i386/tlsgd1.dd: Likewise. + 2007-08-17 Jakub Jelinek <jakub@redhat.com> * ld-sparc/tlssunnopic32.dd: Fix up #target. diff --git a/ld/testsuite/ld-i386/tlsbin.dd b/ld/testsuite/ld-i386/tlsbin.dd index 0e3ef4d..e399f86 100644 --- a/ld/testsuite/ld-i386/tlsbin.dd +++ b/ld/testsuite/ld-i386/tlsbin.dd @@ -222,235 +222,243 @@ Disassembly of section .text: 8049170: 90[ ]+nop * 8049171: 90[ ]+nop * 8049172: 90[ ]+nop * - 8049173: 8b 5d fc[ ]+mov -0x4\(%ebp\),%ebx - 8049176: c9[ ]+leave * - 8049177: c3[ ]+ret * +# 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 +# ->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+8049178 <_start>: - 8049178: 55[ ]+push %ebp - 8049179: 89 e5[ ]+mov %esp,%ebp - 804917b: e8 00 00 00 00[ ]+call 8049180 <_start\+0x8> - 8049180: 59[ ]+pop %ecx - 8049181: 81 c1 a4 0f 00 00[ ]+add \$0xfa4,%ecx - 8049187: 90[ ]+nop * - 8049188: 90[ ]+nop * - 8049189: 90[ ]+nop * - 804918a: 90[ ]+nop * +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 * # @gottpoff IE against global var - 804918b: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx - 8049192: 90[ ]+nop * - 8049193: 90[ ]+nop * - 8049194: 2b 91 f4 ff ff ff[ ]+sub -0xc\(%ecx\),%edx + 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 # ->R_386_TLS_TPOFF32 sG6 - 804919a: 90[ ]+nop * - 804919b: 90[ ]+nop * - 804919c: 90[ ]+nop * - 804919d: 90[ ]+nop * -# @indntpoff IE against global var - 804919e: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax - 80491a4: 90[ ]+nop * - 80491a5: 90[ ]+nop * - 80491a6: 03 05 08 a1 04 08[ ]+add 0x804a108,%eax -# ->R_386_TLS_TPOFF sG7 + 80491aa: 90[ ]+nop * + 80491ab: 90[ ]+nop * 80491ac: 90[ ]+nop * 80491ad: 90[ ]+nop * - 80491ae: 90[ ]+nop * - 80491af: 90[ ]+nop * -# @indntpoff direct %gs access IE against global var - 80491b0: 8b 15 20 a1 04 08[ ]+mov 0x804a120,%edx -# ->R_386_TLS_TPOFF sG8 - 80491b6: 90[ ]+nop * - 80491b7: 90[ ]+nop * - 80491b8: 65 8b 02[ ]+mov %gs:\(%edx\),%eax - 80491bb: 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 +# ->R_386_TLS_TPOFF sG7 80491bc: 90[ ]+nop * 80491bd: 90[ ]+nop * 80491be: 90[ ]+nop * -# @gottpoff IE -> LE against global var defined in exec - 80491bf: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx + 80491bf: 90[ ]+nop * +# @indntpoff direct %gs access IE against global var + 80491c0: 8b 15 20 a1 04 08[ ]+mov 0x804a120,%edx +# ->R_386_TLS_TPOFF sG8 80491c6: 90[ ]+nop * 80491c7: 90[ ]+nop * - 80491c8: 81 ea 8c 0f 00 00[ ]+sub \$0xf8c,%edx -# bg6 + 80491c8: 65 8b 02[ ]+mov %gs:\(%edx\),%eax + 80491cb: 90[ ]+nop * + 80491cc: 90[ ]+nop * + 80491cd: 90[ ]+nop * 80491ce: 90[ ]+nop * - 80491cf: 90[ ]+nop * - 80491d0: 90[ ]+nop * - 80491d1: 90[ ]+nop * -# @indntpoff IE -> LE against global var defined in exec - 80491d2: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax - 80491d8: 90[ ]+nop * - 80491d9: 90[ ]+nop * - 80491da: 81 c0 78 f0 ff ff[ ]+add \$0xfffff078,%eax -# bg7 +# @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 +# bg6 + 80491de: 90[ ]+nop * + 80491df: 90[ ]+nop * 80491e0: 90[ ]+nop * 80491e1: 90[ ]+nop * - 80491e2: 90[ ]+nop * - 80491e3: 90[ ]+nop * -# @indntpoff direct %gs access IE -> LE against global var defined -# in exec - 80491e4: c7 c2 7c f0 ff ff[ ]+mov \$0xfffff07c,%edx -# bg8 - 80491ea: 90[ ]+nop * - 80491eb: 90[ ]+nop * - 80491ec: 65 8b 02[ ]+mov %gs:\(%edx\),%eax - 80491ef: 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 +# bg7 80491f0: 90[ ]+nop * 80491f1: 90[ ]+nop * 80491f2: 90[ ]+nop * -# @gottpoff IE -> LE against local var - 80491f3: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx + 80491f3: 90[ ]+nop * +# @indntpoff direct %gs access IE -> LE against global var defined +# in exec + 80491f4: c7 c2 7c f0 ff ff[ ]+mov \$0xfffff07c,%edx +# bg8 80491fa: 90[ ]+nop * 80491fb: 90[ ]+nop * - 80491fc: 81 ea 6c 0f 00 00[ ]+sub \$0xf6c,%edx -# bl6 + 80491fc: 65 8b 02[ ]+mov %gs:\(%edx\),%eax + 80491ff: 90[ ]+nop * + 8049200: 90[ ]+nop * + 8049201: 90[ ]+nop * 8049202: 90[ ]+nop * - 8049203: 90[ ]+nop * - 8049204: 90[ ]+nop * - 8049205: 90[ ]+nop * -# @indntpoff IE -> LE against local var - 8049206: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax - 804920c: 90[ ]+nop * - 804920d: 90[ ]+nop * - 804920e: 81 c0 98 f0 ff ff[ ]+add \$0xfffff098,%eax -# bl7 +# @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 +# bl6 + 8049212: 90[ ]+nop * + 8049213: 90[ ]+nop * 8049214: 90[ ]+nop * 8049215: 90[ ]+nop * - 8049216: 90[ ]+nop * - 8049217: 90[ ]+nop * -# @indntpoff direct %gs access IE -> LE against local var - 8049218: c7 c2 9c f0 ff ff[ ]+mov \$0xfffff09c,%edx -# bl8 - 804921e: 90[ ]+nop * - 804921f: 90[ ]+nop * - 8049220: 65 8b 02[ ]+mov %gs:\(%edx\),%eax - 8049223: 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 +# bl7 8049224: 90[ ]+nop * 8049225: 90[ ]+nop * 8049226: 90[ ]+nop * -# @gottpoff IE -> LE against hidden but not local var - 8049227: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx + 8049227: 90[ ]+nop * +# @indntpoff direct %gs access IE -> LE against local var + 8049228: c7 c2 9c f0 ff ff[ ]+mov \$0xfffff09c,%edx +# bl8 804922e: 90[ ]+nop * 804922f: 90[ ]+nop * - 8049230: 81 ea ac 0f 00 00[ ]+sub \$0xfac,%edx -# sh6 + 8049230: 65 8b 02[ ]+mov %gs:\(%edx\),%eax + 8049233: 90[ ]+nop * + 8049234: 90[ ]+nop * + 8049235: 90[ ]+nop * 8049236: 90[ ]+nop * - 8049237: 90[ ]+nop * - 8049238: 90[ ]+nop * - 8049239: 90[ ]+nop * -# @indntpoff IE -> LE against hidden but not local var - 804923a: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax - 8049240: 90[ ]+nop * - 8049241: 90[ ]+nop * - 8049242: 81 c0 58 f0 ff ff[ ]+add \$0xfffff058,%eax -# sh7 +# @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 +# sh6 + 8049246: 90[ ]+nop * + 8049247: 90[ ]+nop * 8049248: 90[ ]+nop * 8049249: 90[ ]+nop * - 804924a: 90[ ]+nop * - 804924b: 90[ ]+nop * -# @indntpoff direct %gs access IE -> LE against hidden but not -# local var - 804924c: c7 c2 5c f0 ff ff[ ]+mov \$0xfffff05c,%edx -# sh8 - 8049252: 90[ ]+nop * - 8049253: 90[ ]+nop * - 8049254: 65 8b 02[ ]+mov %gs:\(%edx\),%eax - 8049257: 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 +# sh7 8049258: 90[ ]+nop * 8049259: 90[ ]+nop * 804925a: 90[ ]+nop * -# LE @tpoff, global var defined in exec - 804925b: ba 00 10 00 00[ ]+mov \$0x1000,%edx -# sg1 - 8049260: 90[ ]+nop * - 8049261: 90[ ]+nop * - 8049262: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax + 804925b: 90[ ]+nop * +# @indntpoff direct %gs access IE -> LE against hidden but not +# local var + 804925c: 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: 29 d0[ ]+sub %edx,%eax - 804926c: 90[ ]+nop * - 804926d: 90[ ]+nop * - 804926e: 90[ ]+nop * - 804926f: 90[ ]+nop * -# LE @tpoff, local var - 8049270: b8 7f 0f 00 00[ ]+mov \$0xf7f,%eax -# bl1+1 - 8049275: 90[ ]+nop * - 8049276: 90[ ]+nop * - 8049277: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx + 804926a: 90[ ]+nop * +# LE @tpoff, global var defined in exec + 804926b: 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 * - 8049280: 29 c2[ ]+sub %eax,%edx - 8049282: 90[ ]+nop * - 8049283: 90[ ]+nop * - 8049284: 90[ ]+nop * +# LE @tpoff, local var + 8049280: b8 7f 0f 00 00[ ]+mov \$0xf7f,%eax +# bl1+1 8049285: 90[ ]+nop * -# LE @tpoff, hidden var defined in exec - 8049286: b8 bd 0f 00 00[ ]+mov \$0xfbd,%eax -# sh1+3 - 804928b: 90[ ]+nop * - 804928c: 90[ ]+nop * - 804928d: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx + 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 * - 8049296: 29 c2[ ]+sub %eax,%edx - 8049298: 90[ ]+nop * - 8049299: 90[ ]+nop * - 804929a: 90[ ]+nop * +# LE @tpoff, hidden var defined in exec + 8049296: b8 bd 0f 00 00[ ]+mov \$0xfbd,%eax +# sh1+3 804929b: 90[ ]+nop * -# LE @ntpoff, global var defined in exec - 804929c: 65 a1 00 00 00 00[ ]+mov %gs:0x0,%eax - 80492a2: 90[ ]+nop * - 80492a3: 90[ ]+nop * - 80492a4: 8d 90 04 f0 ff ff[ ]+lea -0xffc\(%eax\),%edx -# sg2 + 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 * - 80492ac: 90[ ]+nop * - 80492ad: 90[ ]+nop * -# LE @ntpoff, local var, non-canonical sequence - 80492ae: b8 86 f0 ff ff[ ]+mov \$0xfffff086,%eax -# bl2+2 +# 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: 90[ ]+nop * - 80492b5: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx + 80492b4: 8d 90 04 f0 ff ff[ ]+lea -0xffc\(%eax\),%edx +# sg2 + 80492ba: 90[ ]+nop * + 80492bb: 90[ ]+nop * 80492bc: 90[ ]+nop * 80492bd: 90[ ]+nop * - 80492be: 01 c2[ ]+add %eax,%edx - 80492c0: 90[ ]+nop * - 80492c1: 90[ ]+nop * - 80492c2: 90[ ]+nop * +# LE @ntpoff, local var, non-canonical sequence + 80492be: b8 86 f0 ff ff[ ]+mov \$0xfffff086,%eax +# bl2+2 80492c3: 90[ ]+nop * -# LE @ntpoff, hidden var defined in exec, non-canonical sequence - 80492c4: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx - 80492cb: 90[ ]+nop * + 80492c4: 90[ ]+nop * + 80492c5: 65 8b 15 00 00 00 00[ ]+mov %gs:0x0,%edx 80492cc: 90[ ]+nop * - 80492cd: 81 c2 45 f0 ff ff[ ]+add \$0xfffff045,%edx -# sh2+1 + 80492cd: 90[ ]+nop * + 80492ce: 01 c2[ ]+add %eax,%edx + 80492d0: 90[ ]+nop * + 80492d1: 90[ ]+nop * + 80492d2: 90[ ]+nop * 80492d3: 90[ ]+nop * - 80492d4: 90[ ]+nop * - 80492d5: 90[ ]+nop * - 80492d6: 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 +# sh2+1 + 80492e3: 90[ ]+nop * + 80492e4: 90[ ]+nop * + 80492e5: 90[ ]+nop * + 80492e6: 90[ ]+nop * # LE @ntpoff, global var defined in exec - 80492d7: 65 a1 08 f0 ff ff[ ]+mov %gs:0xfffff008,%eax + 80492e7: 65 a1 08 f0 ff ff[ ]+mov %gs:0xfffff008,%eax # sg3 - 80492dd: 90[ ]+nop * - 80492de: 90[ ]+nop * - 80492df: 90[ ]+nop * - 80492e0: 90[ ]+nop * + 80492ed: 90[ ]+nop * + 80492ee: 90[ ]+nop * + 80492ef: 90[ ]+nop * + 80492f0: 90[ ]+nop * # LE @ntpoff, local var - 80492e1: 65 8b 15 8b f0 ff ff[ ]+mov %gs:0xfffff08b,%edx + 80492f1: 65 8b 15 8b f0 ff ff[ ]+mov %gs:0xfffff08b,%edx # bl3+3 - 80492e8: 90[ ]+nop * - 80492e9: 90[ ]+nop * - 80492ea: 90[ ]+nop * - 80492eb: 90[ ]+nop * + 80492f8: 90[ ]+nop * + 80492f9: 90[ ]+nop * + 80492fa: 90[ ]+nop * + 80492fb: 90[ ]+nop * # LE @ntpoff, hidden var defined in exec - 80492ec: 65 8b 15 49 f0 ff ff[ ]+mov %gs:0xfffff049,%edx + 80492fc: 65 8b 15 49 f0 ff ff[ ]+mov %gs:0xfffff049,%edx # sh3+1 - 80492f3: 90[ ]+nop * - 80492f4: 90[ ]+nop * - 80492f5: 90[ ]+nop * - 80492f6: 90[ ]+nop * - 80492f7: 8b 5d fc[ ]+mov -0x4\(%ebp\),%ebx - 80492fa: c9[ ]+leave * - 80492fb: c3[ ]+ret * + 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 * diff --git a/ld/testsuite/ld-i386/tlsbin.rd b/ld/testsuite/ld-i386/tlsbin.rd index 54abd8b..10934cb 100644 --- a/ld/testsuite/ld-i386/tlsbin.rd +++ b/ld/testsuite/ld-i386/tlsbin.rd @@ -32,7 +32,7 @@ Key to Flags: .* Elf file type is EXEC \(Executable file\) -Entry point 0x8049178 +Entry point 0x8049188 There are 6 program headers, starting at offset [0-9]+ Program Headers: @@ -137,7 +137,7 @@ Symbol table '.symtab' contains 70 entries: +[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+8049178 +0 FUNC +GLOBAL DEFAULT +8 _start + +[0-9]+: 0+8049188 +0 FUNC +GLOBAL DEFAULT +8 _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 diff --git a/ld/testsuite/ld-i386/tlsbinpic.s b/ld/testsuite/ld-i386/tlsbinpic.s index 844f952..9c8a006 100644 --- a/ld/testsuite/ld-i386/tlsbinpic.s +++ b/ld/testsuite/ld-i386/tlsbinpic.s @@ -162,6 +162,11 @@ fn2: movl %gs:(%edx), %edx nop;nop;nop;nop + /* GD -> IE because variable is not defined in executable */ + leal sG1@tlsgd(%ebx), %eax + call ___tls_get_addr@plt + nop;nop;nop;nop;nop + movl -4(%ebp), %ebx leave ret diff --git a/ld/testsuite/ld-i386/tlsgd1.dd b/ld/testsuite/ld-i386/tlsgd1.dd index 54d7416..9a33132 100644 --- a/ld/testsuite/ld-i386/tlsgd1.dd +++ b/ld/testsuite/ld-i386/tlsgd1.dd @@ -11,4 +11,6 @@ Disassembly of section .text: [a-f0-9]+ <_start>: [ ]*[a-f0-9]+: 65 a1 00 00 00 00 mov %gs:0x0,%eax [ ]*[a-f0-9]+: 81 e8 04 00 00 00 sub \$0x4,%eax +[ ]*[a-f0-9]+: 65 a1 00 00 00 00 mov %gs:0x0,%eax +[ ]*[a-f0-9]+: 81 e8 04 00 00 00 sub \$0x4,%eax #pass diff --git a/ld/testsuite/ld-i386/tlsgd1.s b/ld/testsuite/ld-i386/tlsgd1.s index 2b3ed0e..552ca09 100644 --- a/ld/testsuite/ld-i386/tlsgd1.s +++ b/ld/testsuite/ld-i386/tlsgd1.s @@ -3,6 +3,9 @@ _start: leal foo@TLSGD(,%ebx,1), %eax call ___tls_get_addr + leal foo@TLSGD(%ebx), %eax + call ___tls_get_addr + nop .globl foo .section .tdata,"awT",@progbits .align 4 |