diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 19 | ||||
-rw-r--r-- | ld/emulparams/elf32_x86_64.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_i386.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_i386_be.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_i386_ldso.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_i386_vxworks.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_k1om.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_l1om.sh | 1 | ||||
-rw-r--r-- | ld/emulparams/elf_x86_64.sh | 1 | ||||
-rw-r--r-- | ld/ldlang.c | 2 | ||||
-rw-r--r-- | ld/ldwrite.c | 1 | ||||
-rw-r--r-- | ld/scripttempl/elf.sc | 14 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsbindesc.dd | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlsnopic.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/tlspic.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsbin.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlsbindesc.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/tlspic.dd | 3 |
19 files changed, 47 insertions, 29 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 20c35b1..00075ed 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,22 @@ +2012-01-31 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/13616 + * emulparams/elf32_x86_64.sh: Remove NOP. + * emulparams/elf_i386.sh: Likewise. + * emulparams/elf_i386_be.sh: Likewise. + * emulparams/elf_i386_ldso.sh: Likewise. + * emulparams/elf_i386_vxworks.sh: Likewise. + * emulparams/elf_k1om.sh: Likewise. + * emulparams/elf_l1om.sh: Likewise. + * emulparams/elf_x86_64.sh: Likewise. + + * ldlang.c (zero_fill): Initialized to 0. + + * ldwrite.c (build_link_order): Set data size to linker odrder + size when they are the same. + + * scripttempl/elf.sc: Don't specify fill if NOP is undefined. + 2012-01-17 Alan Modra <amodra@gmail.com> * ldver.c (ldversion): Update copyright message year. diff --git a/ld/emulparams/elf32_x86_64.sh b/ld/emulparams/elf32_x86_64.sh index d26a67f..fb94003 100644 --- a/ld/emulparams/elf32_x86_64.sh +++ b/ld/emulparams/elf32_x86_64.sh @@ -8,7 +8,6 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH="i386:x64-32" MACHINE= -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh index 1d1e4b4..2b2f910 100644 --- a/ld/emulparams/elf_i386.sh +++ b/ld/emulparams/elf_i386.sh @@ -7,7 +7,6 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH=i386 MACHINE= -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/ld/emulparams/elf_i386_be.sh b/ld/emulparams/elf_i386_be.sh index efe1a86..1e27faa 100644 --- a/ld/emulparams/elf_i386_be.sh +++ b/ld/emulparams/elf_i386_be.sh @@ -5,7 +5,6 @@ TEXT_START_ADDR=0x80000000 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ARCH=i386 MACHINE= -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes NO_SMALL_DATA=yes diff --git a/ld/emulparams/elf_i386_ldso.sh b/ld/emulparams/elf_i386_ldso.sh index 183731d..e1a2cb7 100644 --- a/ld/emulparams/elf_i386_ldso.sh +++ b/ld/emulparams/elf_i386_ldso.sh @@ -6,7 +6,6 @@ TEXT_START_ADDR=0x08048000 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" ARCH=i386 MACHINE= -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\" diff --git a/ld/emulparams/elf_i386_vxworks.sh b/ld/emulparams/elf_i386_vxworks.sh index 6933128..61839c8 100644 --- a/ld/emulparams/elf_i386_vxworks.sh +++ b/ld/emulparams/elf_i386_vxworks.sh @@ -6,7 +6,6 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH=i386 MACHINE= -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/ld/emulparams/elf_k1om.sh b/ld/emulparams/elf_k1om.sh index ad4b955..d28ffc0 100644 --- a/ld/emulparams/elf_k1om.sh +++ b/ld/emulparams/elf_k1om.sh @@ -9,7 +9,6 @@ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH="k1om" MACHINE= COMPILE_IN=yes -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/ld/emulparams/elf_l1om.sh b/ld/emulparams/elf_l1om.sh index 1d22d69..80152fe 100644 --- a/ld/emulparams/elf_l1om.sh +++ b/ld/emulparams/elf_l1om.sh @@ -9,7 +9,6 @@ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH="l1om" MACHINE= COMPILE_IN=yes -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh index a921878..c38e845 100644 --- a/ld/emulparams/elf_x86_64.sh +++ b/ld/emulparams/elf_x86_64.sh @@ -8,7 +8,6 @@ MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ARCH="i386:x86-64" MACHINE= -NOP=0x90909090 TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes diff --git a/ld/ldlang.c b/ld/ldlang.c index 5e01fc0..24fd7da 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4600,7 +4600,7 @@ insert_pad (lang_statement_union_type **ptr, asection *output_section, bfd_vma dot) { - static fill_type zero_fill = { 1, { 0 } }; + static fill_type zero_fill; lang_statement_union_type *pad = NULL; if (ptr != &statement_list.head) diff --git a/ld/ldwrite.c b/ld/ldwrite.c index b7a1469..481fef4 100644 --- a/ld/ldwrite.c +++ b/ld/ldwrite.c @@ -183,6 +183,7 @@ build_link_order (lang_statement_union_type *statement) default: abort (); } + link_order->u.data.size = link_order->size; } break; diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 149eec7..7994b5f 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -1,6 +1,6 @@ # # Unusual variables checked by this code: -# NOP - four byte opcode for no-op (defaults to 0) +# NOP - four byte opcode for no-op (defaults to none) # NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not # empty. # SMALL_DATA_CTOR - .ctors contains small data. @@ -91,6 +91,12 @@ # # Each of these can also have corresponding .rel.* and .rela.* sections. +if test -n "$NOP"; then + FILL="=$NOP" +else + FILL= +fi + test -z "$RODATA_NAME" && RODATA_NAME=rodata test -z "$SDATA_NAME" && SDATA_NAME=sdata test -z "$SBSS_NAME" && SBSS_NAME=sbss @@ -438,7 +444,7 @@ cat <<EOF ${RELOCATING+${INIT_START}} KEEP (*(.init)) ${RELOCATING+${INIT_END}} - } =${NOP-0} + } ${FILL} ${TEXT_PLT+${PLT}} ${TINY_READONLY_SECTION} @@ -453,13 +459,13 @@ cat <<EOF /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) ${RELOCATING+${OTHER_TEXT_SECTIONS}} - } =${NOP-0} + } ${FILL} .fini ${RELOCATING-0} : { ${RELOCATING+${FINI_START}} KEEP (*(.fini)) ${RELOCATING+${FINI_END}} - } =${NOP-0} + } ${FILL} ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);} ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);} ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);} diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index efeed55..037bfa0 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2012-01-31 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/13616 + * ld-i386/tlsbindesc.dd: Update no-op padding. + * ld-i386/tlsnopic.dd: Likewise. + * ld-i386/tlspic.dd: Likewise. + * ld-x86-64/tlsbin.dd: Likewise. + * ld-x86-64/tlsbindesc.dd: Likewise. + * ld-x86-64/tlspic.dd: Likewise. + 2012-01-17 Alan Modra <amodra@gmail.com> * config/default.exp: Provide tmpdir/ld/collect-ld. diff --git a/ld/testsuite/ld-i386/tlsbindesc.dd b/ld/testsuite/ld-i386/tlsbindesc.dd index db54764..79a26d1 100644 --- a/ld/testsuite/ld-i386/tlsbindesc.dd +++ b/ld/testsuite/ld-i386/tlsbindesc.dd @@ -223,8 +223,7 @@ Disassembly of section .text: [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]+: 66 90[ ]+xchg %ax,%ax [0-9a-f]+ <_start>: [0-9a-f]+: 55[ ]+push %ebp diff --git a/ld/testsuite/ld-i386/tlsnopic.dd b/ld/testsuite/ld-i386/tlsnopic.dd index 995cdaa..d6a16d0 100644 --- a/ld/testsuite/ld-i386/tlsnopic.dd +++ b/ld/testsuite/ld-i386/tlsnopic.dd @@ -156,6 +156,4 @@ Disassembly of section .text: 10ec: 8b 5d fc[ ]+mov -0x4\(%ebp\),%ebx 10ef: c9[ ]+leave * 10f0: c3[ ]+ret * - 10f1: 90[ ]+nop * - 10f2: 90[ ]+nop * - 10f3: 90[ ]+nop * + 10f1: 0f 1f 00[ ]+nopl \(%eax\) diff --git a/ld/testsuite/ld-i386/tlspic.dd b/ld/testsuite/ld-i386/tlspic.dd index b0c046d..d85b385 100644 --- a/ld/testsuite/ld-i386/tlspic.dd +++ b/ld/testsuite/ld-i386/tlspic.dd @@ -406,6 +406,4 @@ Disassembly of section .text: [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]+: 0f 1f 00[ ]+nopl \(%eax\) diff --git a/ld/testsuite/ld-x86-64/tlsbin.dd b/ld/testsuite/ld-x86-64/tlsbin.dd index 5bb5979..e028753 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.dd +++ b/ld/testsuite/ld-x86-64/tlsbin.dd @@ -174,9 +174,7 @@ Disassembly of section .text: 401136: 90[ ]+nop * 401137: c9[ ]+leaveq * 401138: c3[ ]+retq * - 401139: 90[ ]+nop * - 40113a: 90[ ]+nop * - 40113b: 90[ ]+nop * + 401139: 0f 1f 00[ ]+nopl \(%rax\) 0+40113c <_start>: 40113c: 55[ ]+push %rbp diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.dd b/ld/testsuite/ld-x86-64/tlsbindesc.dd index b1cfacb..03f0169 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.dd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.dd @@ -165,9 +165,7 @@ Disassembly of section .text: [0-9a-f]+: 90[ ]+nop * [0-9a-f]+: c9[ ]+leaveq * [0-9a-f]+: c3[ ]+retq * - [0-9a-f]+: 90[ ]+nop * - [0-9a-f]+: 90[ ]+nop * - [0-9a-f]+: 90[ ]+nop * + [0-9a-f]+: 0f 1f 00[ ]+nopl \(%rax\) [0-9a-f]+ <_start>: [0-9a-f]+: 55[ ]+push %rbp diff --git a/ld/testsuite/ld-x86-64/tlspic.dd b/ld/testsuite/ld-x86-64/tlspic.dd index 6f55456..0c474a9 100644 --- a/ld/testsuite/ld-x86-64/tlspic.dd +++ b/ld/testsuite/ld-x86-64/tlspic.dd @@ -226,5 +226,4 @@ Disassembly of section .text: +11a7: 90[ ]+nop * +11a8: c9[ ]+leaveq * +11a9: c3[ ]+retq * - +11aa: 90[ ]+nop * - +11ab: 90[ ]+nop * + +11aa: 66 90[ ]+xchg %ax,%ax |