diff options
author | Jing Yu <jingyu@google.com> | 2010-09-24 13:41:05 -0700 |
---|---|---|
committer | Jing Yu <jingyu@google.com> | 2010-09-24 13:41:05 -0700 |
commit | 14ebab14b4871d22f814fc8f3f2b1c77514315f1 (patch) | |
tree | d404680c2c4e55fc2dd512359d8d1b6dd2177d63 | |
parent | dc5b400295740e91151a8ea7991ba7335217a6ed (diff) | |
download | toolchain_binutils-14ebab14b4871d22f814fc8f3f2b1c77514315f1.zip toolchain_binutils-14ebab14b4871d22f814fc8f3f2b1c77514315f1.tar.gz toolchain_binutils-14ebab14b4871d22f814fc8f3f2b1c77514315f1.tar.bz2 |
A few gold and assembler patches.
See binutils-2.19/README.android for details.
Change-Id: I8069c5ed23a9c0e949e1635e76e4c5704252d9c2
69 files changed, 4392 insertions, 627 deletions
diff --git a/binutils-2.19/README.android b/binutils-2.19/README.android index b990281..93ea299 100644 --- a/binutils-2.19/README.android +++ b/binutils-2.19/README.android @@ -1,3 +1,208 @@ +2010-09-17 Doug Kwan <dougkwan@google.com> + + Backport upstream fix for mis-handling of GOT-using relocations + and two broken tests. + + http://sourceware.org/ml/binutils-cvs/2010-09/msg00107.html + + Changed files: + + gold/arm.cc + gold/testsuite/icf_safe_so_test.sh + gold/testsuite/icf_safe_test.sh + +2010-09-15 Doug Kwan <dougkwan@google.com> + + Backport upstream fix for test regressions due to broken tests. + + http://sourceware.org/ml/binutils-cvs/2010-09/msg00087.html + + Changed files: + + gold/testsuite/script_test_3.t + gold/testsuite/script_test_4.t + gold/testsuite/script_test_5.t + gold/testsuite/script_test_6.t + gold/testsuite/script_test_7.t + +2010-09-13 Jing Yu <jingyu@google.com> + + Backport upstream fixes for cortex-a8 workarounds. + + http://sourceware.org/ml/binutils-cvs/2010-05/msg00025.html + http://sourceware.org/ml/binutils-cvs/2010-08/msg00154.html + + Changed files: + + bfd/elf32-arm.c + ld/testsuite/ld-arm/arm-elf.exp + + Added files: + + ld/testsuite/ld-arm/cortex-a8-fix-bl-rel-plt.d + ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.d + ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.s + +2010-09-13 Jing Yu <jingyu@google.com> + + Backport upstream fix for barrier instructions' operand bug. + + http://sourceware.org/ml/binutils/2010-07/msg00089.html + + Changed files: + + gas/config/tc-arm.c + opcodes/arm-dis.c + + Added files: + + gas/testsuite + gas/arm/barrier.s + gas/arm/barrier.d + gas/arm/barrier-thumb.s + gas/arm/barrier-thumb.d + gas/arm/barrier-bad.s + gas/arm/barrier-bad.d + gas/arm/barrier-bad.l + gas/arm/barrier-bad-thumb.s + gas/arm/barrier-bad-thumb.d + gas/arm/barrier-bad-thumb.l + +2010-09-12 Doug Kwan <dougkwan@google.com> + + Backport upstream fix for cortex-A8 workaround bug. + + http://sourceware.org/ml/binutils-cvs/2010-09/msg00039.html + + Changed files: + + gold/arm.cc + gold/object.cc + gold/object.h + gold/testsuite/Makefile.am + gold/testsuite/Makefile.in + gold/testsuite/arm_bl_out_of_range.s + gold/testsuite/thumb_bl_out_of_range.s + gold/testsuite/thumb_blx_out_of_range.s + + Added files: + + gold/testsuite/arm_branch_out_of_range.sh + gold/testsuite/arm_cortex_a8.sh + gold/testsuite/arm_cortex_a8_b.s + gold/testsuite/arm_cortex_a8_b_cond.s + gold/testsuite/arm_cortex_a8_b_local.s + gold/testsuite/arm_cortex_a8_bl.s + gold/testsuite/arm_cortex_a8_blx.s + gold/testsuite/arm_cortex_a8_local.s + gold/testsuite/arm_cortex_a8_local_reloc.s + gold/testsuite/thumb_bl_out_of_range_local.s + +2010-08-30 Doug Kwan <dougkwan@google.com> + + Backport upstream fix for dynamic weak reference bug. + + http://sourceware.org/ml/binutils-cvs/2010-08/msg00172.html + + Changed files: + + gold/resolve.cc + gold/testsuite/Makefile.am + gold/testsuite/Makefile.in + + Added files: + + gold/testsuite/dyn_weak_ref.sh + gold/testsuite/dyn_weak_ref_1.c + gold/testsuite/dyn_weak_ref_2.c + +2010-08-23 Doug Kwan <dougkwan@google.com> + + P4 integrate CL 42476-p2 to fix OOM problem reported + by the Android team. + + Changed files: + gold/merge.cc + gold/merge.h + +2010-08-20 Doug Kwan <dougkwan@google.com> + + Backport upstream fix for x86 test failure. + + http://sourceware.org/ml/binutils-cvs/2010-08/msg00009.html + + Changed files: + + gold/i386.cc + gold/x86_64.cc + +2010-08-13 Doug Kwan <dougkwan@google.com> + + Backport upstream fix + + http://sourceware.org/ml/binutils-cvs/2010-08/msg00085.html + + for weak symbol handling. + + Changed files: + + gold/resolve.cc + gold/symtab.cc + gold/testsuite/Makefile.am + gold/testsuite/Makefile.in + gold/testsuite/strong_ref_weak_def.sh + gold/testsuite/strong_ref_weak_def_1.c + gold/testsuite/strong_ref_weak_def_2.c + +2010-08-12 Doug Kwan <dougkwan@google.com> + + Backport up-stream patch + + http://sourceware.org/ml/binutils-cvs/2010-08/msg00079.html + + Changed files: + gold/arm.cc + gold/options.h + +2010-08-11 Doug Kwan <dougkwan@google.com> + + P4 integrate CL 42145-p2, which is a back-port of + http://sourceware.org/ml/binutils/2010-07/msg00086.html + from trunk. + + Changed files: + + gold/resolve.cc + gold/symtab.cc + gold/symtab.h + gold/testsuite/weak_undef_file1.cc + gold/testsuite/weak_undef_file2.cc + gold/testsuite/weak_undef_test.cc + +2010-07-30 Sriraman Tallam <tmsriram@google.com> + + Patch to fix bug b/2842902. Fix submitted upstream and pulled down. + Please refer to : + http://sourceware.org/ml/binutils/2010-07/msg00447.html + Fix was submitted at CL : 42629-p2. + + Changed files: + + gold/arm.cc + gold/gc.h + gold/i386.cc + gold/icf.cc + gold/icf.h + gold/int_encoding.h + gold/powerpc.cc + gold/sparc.cc + gold/testsuite/Makefile.am + gold/testsuite/Makefile.in + gold/testsuite/icf_sht_rel_addend_test.sh + gold/testsuite/icf_sht_rel_addend_test_1.cc + gold/testsuite/icf_sht_rel_addend_test_2.cc + gold/x86_64.cc + 2010-07-15 Doug Kwan <dougkwan@google.com> Backport upstream patches to enhance safe ICF and to fix diff --git a/binutils-2.19/bfd/elf32-arm.c b/binutils-2.19/bfd/elf32-arm.c index 9ab35a1..e8968ad 100644 --- a/binutils-2.19/bfd/elf32-arm.c +++ b/binutils-2.19/bfd/elf32-arm.c @@ -2370,9 +2370,10 @@ struct a8_erratum_fix { struct a8_erratum_reloc { bfd_vma from; bfd_vma destination; + struct elf32_arm_link_hash_entry *hash; + const char *sym_name; unsigned int r_type; unsigned char st_type; - const char *sym_name; bfd_boolean non_a8_stub; }; @@ -3388,6 +3389,36 @@ static bfd_reloc_status_type elf32_arm_final_link_relocate Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *, const char *, int, struct elf_link_hash_entry *, bfd_boolean *, char **); +static unsigned int +arm_stub_required_alignment (enum elf32_arm_stub_type stub_type) +{ + switch (stub_type) + { + case arm_stub_a8_veneer_b_cond: + case arm_stub_a8_veneer_b: + case arm_stub_a8_veneer_bl: + return 2; + + case arm_stub_long_branch_any_any: + case arm_stub_long_branch_v4t_arm_thumb: + case arm_stub_long_branch_thumb_only: + case arm_stub_long_branch_v4t_thumb_thumb: + case arm_stub_long_branch_v4t_thumb_arm: + case arm_stub_short_branch_v4t_thumb_arm: + case arm_stub_long_branch_any_arm_pic: + case arm_stub_long_branch_any_thumb_pic: + case arm_stub_long_branch_v4t_thumb_thumb_pic: + case arm_stub_long_branch_v4t_arm_thumb_pic: + case arm_stub_long_branch_v4t_thumb_arm_pic: + case arm_stub_long_branch_thumb_only_pic: + case arm_stub_a8_veneer_blx: + return 4; + + default: + abort (); /* Should be unreachable. */ + } +} + static bfd_boolean arm_build_one_stub (struct bfd_hash_entry *gen_entry, void * in_arg) @@ -3420,9 +3451,8 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, stub_sec = stub_entry->stub_sec; if ((htab->fix_cortex_a8 < 0) - != (stub_entry->stub_type >= arm_stub_a8_veneer_lwm)) - /* We have to do the a8 fixes last, as they are less aligned than - the other veneers. */ + != (arm_stub_required_alignment (stub_entry->stub_type) == 2)) + /* We have to do less-strictly-aligned fixes last. */ return TRUE; /* Make a note of the offset within the stubs for this entry. */ @@ -3989,6 +4019,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, { char *error_message = NULL; struct elf_link_hash_entry *entry; + bfd_boolean use_plt = FALSE; /* We don't care about the error returned from this function, only if there is glue or not. */ @@ -3998,12 +4029,18 @@ cortex_a8_erratum_scan (bfd *input_bfd, if (entry) found->non_a8_stub = TRUE; - if (found->r_type == R_ARM_THM_CALL - && found->st_type != STT_ARM_TFUNC) - force_target_arm = TRUE; - else if (found->r_type == R_ARM_THM_CALL - && found->st_type == STT_ARM_TFUNC) - force_target_thumb = TRUE; + /* Keep a simpler condition, for the sake of clarity. */ + if (htab->splt != NULL && found->hash != NULL + && found->hash->root.plt.offset != (bfd_vma) -1) + use_plt = TRUE; + + if (found->r_type == R_ARM_THM_CALL) + { + if (found->st_type != STT_ARM_TFUNC || use_plt) + force_target_arm = TRUE; + else + force_target_thumb = TRUE; + } } /* Check if we have an offending branch instruction. */ @@ -4544,6 +4581,7 @@ elf32_arm_size_stubs (bfd *output_bfd, a8_relocs[num_a8_relocs].st_type = st_type; a8_relocs[num_a8_relocs].sym_name = sym_name; a8_relocs[num_a8_relocs].non_a8_stub = created_stub; + a8_relocs[num_a8_relocs].hash = hash; num_a8_relocs++; } @@ -12457,7 +12495,7 @@ make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, data = (struct a8_branch_to_stub_data *) in_arg; if (stub_entry->target_section != data->writing_section - || stub_entry->stub_type < arm_stub_a8_veneer_b_cond) + || stub_entry->stub_type < arm_stub_a8_veneer_lwm) return TRUE; contents = data->contents; diff --git a/binutils-2.19/gas/config/tc-arm.c b/binutils-2.19/gas/config/tc-arm.c index 8db76d3..7768f47 100644 --- a/binutils-2.19/gas/config/tc-arm.c +++ b/binutils-2.19/gas/config/tc-arm.c @@ -5487,7 +5487,7 @@ enum operand_parse_code OP_oSHar, /* ASR immediate */ OP_oSHllar, /* LSL or ASR immediate */ OP_oROR, /* ROR 0/8/16/24 */ - OP_oBARRIER, /* Option argument for a barrier instruction. */ + OP_oBARRIER_I15, /* Option argument for a barrier instruction. */ OP_FIRST_OPTIONAL = OP_oI7b }; @@ -5570,6 +5570,30 @@ parse_operands (char *str, const unsigned char *pattern) goto failure; \ } while (0) +#define po_barrier_or_imm(str) \ + do \ + { \ + val = parse_barrier (&str); \ + if (val == FAIL) \ + { \ + if (ISALPHA (*str)) \ + goto failure; \ + else \ + goto immediate; \ + } \ + else \ + { \ + if ((inst.instruction & 0xf0) == 0x60 \ + && val != 0xf) \ + { \ + /* ISB can only take SY as an option. */ \ + inst.error = _("invalid barrier type"); \ + goto failure; \ + } \ + } \ + } \ + while (0) + skip_whitespace (str); for (i = 0; upat[i] != OP_stop; i++) @@ -5897,7 +5921,12 @@ parse_operands (char *str, const unsigned char *pattern) case OP_oROR: val = parse_ror (&str); break; case OP_PSR: val = parse_psr (&str); break; case OP_COND: val = parse_cond (&str); break; - case OP_oBARRIER:val = parse_barrier (&str); break; + case OP_oBARRIER_I15: + po_barrier_or_imm (str); break; + immediate: + if (parse_immediate (&str, &val, 0, 15, TRUE) == FAIL) + goto failure; + break; case OP_RVC_PSR: po_reg_or_goto (REG_TYPE_VFC, try_psr); @@ -6045,7 +6074,7 @@ parse_operands (char *str, const unsigned char *pattern) case OP_PSR: case OP_RVC_PSR: case OP_COND: - case OP_oBARRIER: + case OP_oBARRIER_I15: case OP_REGLST: case OP_VRSLST: case OP_VRDLST: @@ -6110,6 +6139,7 @@ parse_operands (char *str, const unsigned char *pattern) #undef po_reg_or_goto #undef po_imm_or_fail #undef po_scalar_or_fail +#undef po_barrier_or_imm /* Shorthand macro for instruction encoding functions issuing errors. */ #define constraint(expr, err) do { \ @@ -6631,7 +6661,8 @@ do_barrier (void) if (inst.operands[0].present) { constraint ((inst.instruction & 0xf0) != 0x40 - && inst.operands[0].imm != 0xf, + && inst.operands[0].imm > 0xf + && inst.operands[0].imm < 0x0, _("bad barrier type")); inst.instruction |= inst.operands[0].imm; } @@ -8810,7 +8841,8 @@ do_t_barrier (void) if (inst.operands[0].present) { constraint ((inst.instruction & 0xf0) != 0x40 - && inst.operands[0].imm != 0xf, + && inst.operands[0].imm > 0xf + && inst.operands[0].imm < 0x0, _("bad barrier type")); inst.instruction |= inst.operands[0].imm; } @@ -14716,10 +14748,18 @@ static const struct asm_cond conds[] = static struct asm_barrier_opt barrier_opt_names[] = { - { "sy", 0xf }, - { "un", 0x7 }, - { "st", 0xe }, - { "unst", 0x6 } + { "sy", 0xf }, { "SY", 0xf }, + { "un", 0x7 }, { "UN", 0x7 }, + { "st", 0xe }, { "ST", 0xe }, + { "unst", 0x6 }, { "UNST", 0x6 }, + { "ish", 0xb }, { "ISH", 0xb }, + { "sh", 0xb }, { "SH", 0xb }, + { "ishst", 0xa }, { "ISHST", 0xa }, + { "shst", 0xa }, { "SHST", 0xa }, + { "nsh", 0x7 }, { "NSH", 0x7 }, + { "nshst", 0x6 }, { "NSHST", 0x6 }, + { "osh", 0x3 }, { "OSH", 0x3 }, + { "oshst", 0x2 }, { "OSHST", 0x2 } }; /* Table of ARM-format instructions. */ @@ -15350,9 +15390,9 @@ static const struct asm_opcode insns[] = #define ARM_VARIANT &arm_ext_barrier #undef THUMB_VARIANT #define THUMB_VARIANT &arm_ext_barrier - TUF(dmb, 57ff050, f3bf8f50, 1, (oBARRIER), barrier, t_barrier), - TUF(dsb, 57ff040, f3bf8f40, 1, (oBARRIER), barrier, t_barrier), - TUF(isb, 57ff060, f3bf8f60, 1, (oBARRIER), barrier, t_barrier), + TUF(dmb, 57ff050, f3bf8f50, 1, (oBARRIER_I15), barrier, t_barrier), + TUF(dsb, 57ff040, f3bf8f40, 1, (oBARRIER_I15), barrier, t_barrier), + TUF(isb, 57ff060, f3bf8f60, 1, (oBARRIER_I15), barrier, t_barrier), /* ARM V7 instructions. */ #undef ARM_VARIANT diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.d b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.d new file mode 100644 index 0000000..3df3f76 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.d @@ -0,0 +1,3 @@ +#name: All options expect SY are reserved for ISB +#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd +#error-output: barrier-bad-thumb.l diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.l b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.l new file mode 100644 index 0000000..a03a9e7 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.l @@ -0,0 +1,8 @@ +[^:]*: Assembler messages: +[^:]*:4: Error: invalid barrier type -- `isb st' +[^:]*:5: Error: invalid barrier type -- `isb ish' +[^:]*:6: Error: invalid barrier type -- `isb ishst' +[^:]*:7: Error: invalid barrier type -- `isb nsh' +[^:]*:8: Error: invalid barrier type -- `isb nshst' +[^:]*:9: Error: invalid barrier type -- `isb osh' +[^:]*:10: Error: invalid barrier type -- `isb oshst' diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.s b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.s new file mode 100644 index 0000000..67fc40a --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad-thumb.s @@ -0,0 +1,11 @@ +.syntax unified +.thumb +.arch armv7a +isb st +isb ish +isb ishst +isb nsh +isb nshst +isb osh +isb oshst + diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.d b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.d new file mode 100644 index 0000000..1e351bc --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.d @@ -0,0 +1,3 @@ +#name: All options expect SY are reserved for ISB +#skip: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd +#error-output: barrier-bad.l diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.l b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.l new file mode 100644 index 0000000..045ef47 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.l @@ -0,0 +1,8 @@ +[^:]*: Assembler messages: +[^:]*:3: Error: invalid barrier type -- `isb st' +[^:]*:4: Error: invalid barrier type -- `isb ish' +[^:]*:5: Error: invalid barrier type -- `isb ishst' +[^:]*:6: Error: invalid barrier type -- `isb nsh' +[^:]*:7: Error: invalid barrier type -- `isb nshst' +[^:]*:8: Error: invalid barrier type -- `isb osh' +[^:]*:9: Error: invalid barrier type -- `isb oshst' diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.s b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.s new file mode 100644 index 0000000..3dfae78 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-bad.s @@ -0,0 +1,10 @@ +.syntax unified +.arch armv7a +isb st +isb ish +isb ishst +isb nsh +isb nshst +isb osh +isb oshst + diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-thumb.d b/binutils-2.19/gas/testsuite/gas/arm/barrier-thumb.d new file mode 100644 index 0000000..075a663 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-thumb.d @@ -0,0 +1,73 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: Barrier Instruction Operands +#as: -mcpu=cortex-a8 +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd + +# Test Barrier Instruction Operands + +.*: *file format .*arm.* + +Disassembly of section .text: +00000000 <[^>]*> f3bf 8f5f dmb (sy|#15) +00000004 <[^>]*> f3bf 8f5e dmb (st|#14) +00000008 <[^>]*> f3bf 8f5b dmb (sh|ish|#11) +0000000c <[^>]*> f3bf 8f5b dmb (sh|ish|#11) +00000010 <[^>]*> f3bf 8f5a dmb (ishst|shst|#10) +00000014 <[^>]*> f3bf 8f5a dmb (ishst|shst|#10) +00000018 <[^>]*> f3bf 8f57 dmb (un|nsh|#7) +0000001c <[^>]*> f3bf 8f57 dmb (un|nsh|#7) +00000020 <[^>]*> f3bf 8f56 dmb (unst|nshst|#6) +00000024 <[^>]*> f3bf 8f56 dmb (unst|nshst|#6) +00000028 <[^>]*> f3bf 8f53 dmb (osh|#3) +0000002c <[^>]*> f3bf 8f52 dmb (oshst|#2) +00000030 <[^>]*> f3bf 8f4f dsb (sy|#15) +00000034 <[^>]*> f3bf 8f4e dsb (st|#14) +00000038 <[^>]*> f3bf 8f4b dsb (sh|ish|#11) +0000003c <[^>]*> f3bf 8f4b dsb (sh|ish|#11) +00000040 <[^>]*> f3bf 8f4a dsb (ishst|ish|#10) +00000044 <[^>]*> f3bf 8f4a dsb (ishst|ish|#10) +00000048 <[^>]*> f3bf 8f47 dsb (un|nsh|#7) +0000004c <[^>]*> f3bf 8f47 dsb (un|nsh|#7) +00000050 <[^>]*> f3bf 8f46 dsb (nshst|unst|#6) +00000054 <[^>]*> f3bf 8f46 dsb (nshst|unst|#6) +00000058 <[^>]*> f3bf 8f43 dsb (osh|#3) +0000005c <[^>]*> f3bf 8f6f isb (sy|#15) +00000060 <[^>]*> f3bf 8f6f isb (sy|#15) +00000064 <[^>]*> f3bf 8f5f dmb (sy|#15) +00000068 <[^>]*> f3bf 8f5e dmb (st|#14) +0000006c <[^>]*> f3bf 8f5b dmb (sh|ish|#11) +00000070 <[^>]*> f3bf 8f5b dmb (sh|ish|#11) +00000074 <[^>]*> f3bf 8f5a dmb (ishst|shst|#10) +00000078 <[^>]*> f3bf 8f5a dmb (ishst|shst|#10) +0000007c <[^>]*> f3bf 8f57 dmb (un|nsh|#7) +00000080 <[^>]*> f3bf 8f57 dmb (un|nsh|#7) +00000084 <[^>]*> f3bf 8f56 dmb (unst|nshst|#6) +00000088 <[^>]*> f3bf 8f56 dmb (unst|nshst|#6) +0000008c <[^>]*> f3bf 8f53 dmb (osh|#3) +00000090 <[^>]*> f3bf 8f52 dmb (oshst|#2) +00000094 <[^>]*> f3bf 8f4f dsb (sy|#15) +00000098 <[^>]*> f3bf 8f4e dsb (st|#14) +0000009c <[^>]*> f3bf 8f4b dsb (sh|ish|#11) +000000a0 <[^>]*> f3bf 8f4b dsb (sh|ish|#11) +000000a4 <[^>]*> f3bf 8f4a dsb (ishst|ish|#10) +000000a8 <[^>]*> f3bf 8f4a dsb (ishst|ish|#10) +000000ac <[^>]*> f3bf 8f47 dsb (un|nsh|#7) +000000b0 <[^>]*> f3bf 8f47 dsb (un|nsh|#7) +000000b4 <[^>]*> f3bf 8f46 dsb (nshst|unst|#6) +000000b8 <[^>]*> f3bf 8f46 dsb (nshst|unst|#6) +000000bc <[^>]*> f3bf 8f43 dsb (osh|#3) +000000c0 <[^>]*> f3bf 8f6f isb (sy|#15) +000000c4 <[^>]*> f3bf 8f40 dsb #0 +000000c8 <[^>]*> f3bf 8f4f dsb (sy|#15) +000000cc <[^>]*> f3bf 8f50 dmb #0 +000000d0 <[^>]*> f3bf 8f5f dmb (sy|#15) +000000d4 <[^>]*> f3bf 8f60 isb #0 +000000d8 <[^>]*> f3bf 8f6e isb #14 +000000dc <[^>]*> f3bf 8f6b isb #11 +000000e0 <[^>]*> f3bf 8f6a isb #10 +000000e4 <[^>]*> f3bf 8f67 isb #7 +000000e8 <[^>]*> f3bf 8f66 isb #6 +000000ec <[^>]*> f3bf 8f63 isb #3 +000000f0 <[^>]*> f3bf 8f62 isb #2 +000000f4 <[^>]*> f3bf 8f6f isb (sy|#15) diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier-thumb.s b/binutils-2.19/gas/testsuite/gas/arm/barrier-thumb.s new file mode 100644 index 0000000..cc42076 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier-thumb.s @@ -0,0 +1,74 @@ +@ Test case to validate barrier instruction operands for T2 +.thumb +.section .text +.syntax unified + @Tests to verify dsb, dmb and isb operand acceptance + dmb sy + dmb st + dmb ish + dmb sh + dmb ishst + dmb shst + dmb nsh + dmb un + dmb nshst + dmb unst + dmb osh + dmb oshst + dsb sy + dsb st + dsb ish + dsb sh + dsb ishst + dsb shst + dsb nsh + dsb un + dsb nshst + dsb unst + dsb osh + isb sy + isb + + @Sanity checks for operands in upper case + dmb SY + dmb ST + dmb ISH + dmb SH + dmb ISHST + dmb SHST + dmb NSH + dmb UN + dmb NSHST + dmb UNST + dmb OSH + dmb OSHST + dsb SY + dsb ST + dsb ISH + dsb SH + dsb ISHST + dsb SHST + dsb NSH + dsb UN + dsb NSHST + dsb UNST + dsb OSH + isb SY + + @Tests to verify immediate operands + dsb 0 + dsb #15 + + dmb 0 + dmb #15 + + isb 0 + isb #14 + isb #11 + isb #10 + isb #7 + isb #6 + isb #3 + isb #2 + + isb #15 diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier.d b/binutils-2.19/gas/testsuite/gas/arm/barrier.d new file mode 100644 index 0000000..972a511 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier.d @@ -0,0 +1,73 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: Barrier Instruction Operands +#as: -mcpu=cortex-a8 +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd + +# Test Barrier Instruction Operands + +.*: *file format .*arm.* + +Disassembly of section .text: +00000000 <[^>]*> f57ff05f dmb (sy|#15) +00000004 <[^>]*> f57ff05e dmb (st|#14) +00000008 <[^>]*> f57ff05b dmb (sh|ish|#11) +0000000c <[^>]*> f57ff05b dmb (sh|ish|#11) +00000010 <[^>]*> f57ff05a dmb (ishst|shst|#10) +00000014 <[^>]*> f57ff05a dmb (ishst|shst|#10) +00000018 <[^>]*> f57ff057 dmb (un|nsh|#7) +0000001c <[^>]*> f57ff057 dmb (un|nsh|#7) +00000020 <[^>]*> f57ff056 dmb (unst|nshst|#6) +00000024 <[^>]*> f57ff056 dmb (unst|nshst|#6) +00000028 <[^>]*> f57ff053 dmb (osh|#3) +0000002c <[^>]*> f57ff052 dmb (oshst|#2) +00000030 <[^>]*> f57ff04f dsb (sy|#15) +00000034 <[^>]*> f57ff04e dsb (st|#14) +00000038 <[^>]*> f57ff04b dsb (sh|ish|#11) +0000003c <[^>]*> f57ff04b dsb (sh|ish|#11) +00000040 <[^>]*> f57ff04a dsb (ishst|ish|#10) +00000044 <[^>]*> f57ff04a dsb (ishst|ish|#10) +00000048 <[^>]*> f57ff047 dsb (un|nsh|#7) +0000004c <[^>]*> f57ff047 dsb (un|nsh|#7) +00000050 <[^>]*> f57ff046 dsb (nshst|unst|#6) +00000054 <[^>]*> f57ff046 dsb (nshst|unst|#6) +00000058 <[^>]*> f57ff043 dsb (osh|#3) +0000005c <[^>]*> f57ff06f isb (sy|#15) +00000060 <[^>]*> f57ff06f isb (sy|#15) +00000064 <[^>]*> f57ff05f dmb (sy|#15) +00000068 <[^>]*> f57ff05e dmb (st|#14) +0000006c <[^>]*> f57ff05b dmb (sh|ish|#11) +00000070 <[^>]*> f57ff05b dmb (sh|ish|#11) +00000074 <[^>]*> f57ff05a dmb (ishst|shst|#10) +00000078 <[^>]*> f57ff05a dmb (ishst|shst|#10) +0000007c <[^>]*> f57ff057 dmb (un|nsh|#7) +00000080 <[^>]*> f57ff057 dmb (un|nsh|#7) +00000084 <[^>]*> f57ff056 dmb (unst|nshst|#6) +00000088 <[^>]*> f57ff056 dmb (unst|nshst|#6) +0000008c <[^>]*> f57ff053 dmb (osh|#3) +00000090 <[^>]*> f57ff052 dmb (oshst|#2) +00000094 <[^>]*> f57ff04f dsb (sy|#15) +00000098 <[^>]*> f57ff04e dsb (st|#14) +0000009c <[^>]*> f57ff04b dsb (sh|ish|#11) +000000a0 <[^>]*> f57ff04b dsb (sh|ish|#11) +000000a4 <[^>]*> f57ff04a dsb (ishst|ish|#10) +000000a8 <[^>]*> f57ff04a dsb (ishst|ish|#10) +000000ac <[^>]*> f57ff047 dsb (un|nsh|#7) +000000b0 <[^>]*> f57ff047 dsb (un|nsh|#7) +000000b4 <[^>]*> f57ff046 dsb (nshst|unst|#6) +000000b8 <[^>]*> f57ff046 dsb (nshst|unst|#6) +000000bc <[^>]*> f57ff043 dsb (osh|#3) +000000c0 <[^>]*> f57ff06f isb (sy|#15) +000000c4 <[^>]*> f57ff040 dsb #0 +000000c8 <[^>]*> f57ff04f dsb (sy|#15) +000000cc <[^>]*> f57ff050 dmb #0 +000000d0 <[^>]*> f57ff05f dmb (sy|#15) +000000d4 <[^>]*> f57ff060 isb #0 +000000d8 <[^>]*> f57ff06e isb #14 +000000dc <[^>]*> f57ff06b isb #11 +000000e0 <[^>]*> f57ff06a isb #10 +000000e4 <[^>]*> f57ff067 isb #7 +000000e8 <[^>]*> f57ff066 isb #6 +000000ec <[^>]*> f57ff063 isb #3 +000000f0 <[^>]*> f57ff062 isb #2 +000000f4 <[^>]*> f57ff06f isb (sy|#15) diff --git a/binutils-2.19/gas/testsuite/gas/arm/barrier.s b/binutils-2.19/gas/testsuite/gas/arm/barrier.s new file mode 100644 index 0000000..a4574e8 --- /dev/null +++ b/binutils-2.19/gas/testsuite/gas/arm/barrier.s @@ -0,0 +1,74 @@ +@ Test case to validate barrier instruction operands +.section .text +.syntax unified + @Tests to verify dsb, dmb and isb operand acceptance + dmb sy + dmb st + dmb ish + dmb sh + dmb ishst + dmb shst + dmb nsh + dmb un + dmb nshst + dmb unst + dmb osh + dmb oshst + dsb sy + dsb st + dsb ish + dsb sh + dsb ishst + dsb shst + dsb nsh + dsb un + dsb nshst + dsb unst + dsb osh + isb sy + isb + + @Sanity checks for operands in upper case + dmb SY + dmb ST + dmb ISH + dmb SH + dmb ISHST + dmb SHST + dmb NSH + dmb UN + dmb NSHST + dmb UNST + dmb OSH + dmb OSHST + dsb SY + dsb ST + dsb ISH + dsb SH + dsb ISHST + dsb SHST + dsb NSH + dsb UN + dsb NSHST + dsb UNST + dsb OSH + isb SY + + @Tests to verify immediate operands + dsb 0 + dsb #15 + + dmb 0 + dmb #15 + + isb 0 + isb #14 + isb #11 + isb #10 + isb #7 + isb #6 + isb #3 + isb #2 + + isb #15 + diff --git a/binutils-2.19/gold/arm.cc b/binutils-2.19/gold/arm.cc index 566e326..9edfa90 100644 --- a/binutils-2.19/gold/arm.cc +++ b/binutils-2.19/gold/arm.cc @@ -1064,6 +1064,11 @@ class Arm_exidx_cantunwind : public Output_section_data this->do_fixed_endian_write<false>(of); } + // Write to a map file. + void + do_print_to_mapfile(Mapfile* mapfile) const + { mapfile->print_output_data(this, _("** ARM cantunwind")); } + private: // Implement do_write for a given endianness. template<bool big_endian> @@ -8199,7 +8204,8 @@ Target_arm<big_endian>::gc_process_relocs(Symbol_table* symtab, typedef Target_arm<big_endian> Arm; typedef typename Target_arm<big_endian>::Scan Scan; - gold::gc_process_relocs<32, big_endian, Arm, elfcpp::SHT_REL, Scan>( + gold::gc_process_relocs<32, big_endian, Arm, elfcpp::SHT_REL, Scan, + Relocatable_size_for_reloc>( symtab, layout, this, @@ -8475,7 +8481,46 @@ Target_arm<big_endian>::Relocate::relocate( Arm_address thumb_bit = 0; Symbol_value<32> symval; bool is_weakly_undefined_without_plt = false; - if (relnum != Target_arm<big_endian>::fake_relnum_for_stubs) + bool have_got_offset = false; + unsigned int got_offset = 0; + + // If the relocation uses the GOT entry of a symbol instead of the symbol + // itself, we don't care about whether the symbol is defined or what kind + // of symbol it is. + if (reloc_property->uses_got_entry()) + { + // Get the GOT offset. + // The GOT pointer points to the end of the GOT section. + // We need to subtract the size of the GOT section to get + // the actual offset to use in the relocation. + // TODO: We should move GOT offset computing code in TLS relocations + // to here. + switch (r_type) + { + case elfcpp::R_ARM_GOT_BREL: + case elfcpp::R_ARM_GOT_PREL: + if (gsym != NULL) + { + gold_assert(gsym->has_got_offset(GOT_TYPE_STANDARD)); + got_offset = (gsym->got_offset(GOT_TYPE_STANDARD) + - target->got_size()); + } + else + { + unsigned int r_sym = elfcpp::elf_r_sym<32>(rel.get_r_info()); + gold_assert(object->local_has_got_offset(r_sym, + GOT_TYPE_STANDARD)); + got_offset = (object->local_got_offset(r_sym, GOT_TYPE_STANDARD) + - target->got_size()); + } + have_got_offset = true; + break; + + default: + break; + } + } + else if (relnum != Target_arm<big_endian>::fake_relnum_for_stubs) { if (gsym != NULL) { @@ -8544,36 +8589,6 @@ Target_arm<big_endian>::Relocate::relocate( psymval = &symval; } - // Get the GOT offset if needed. - // The GOT pointer points to the end of the GOT section. - // We need to subtract the size of the GOT section to get - // the actual offset to use in the relocation. - bool have_got_offset = false; - unsigned int got_offset = 0; - switch (r_type) - { - case elfcpp::R_ARM_GOT_BREL: - case elfcpp::R_ARM_GOT_PREL: - if (gsym != NULL) - { - gold_assert(gsym->has_got_offset(GOT_TYPE_STANDARD)); - got_offset = (gsym->got_offset(GOT_TYPE_STANDARD) - - target->got_size()); - } - else - { - unsigned int r_sym = elfcpp::elf_r_sym<32>(rel.get_r_info()); - gold_assert(object->local_has_got_offset(r_sym, GOT_TYPE_STANDARD)); - got_offset = (object->local_got_offset(r_sym, GOT_TYPE_STANDARD) - - target->got_size()); - } - have_got_offset = true; - break; - - default: - break; - } - // To look up relocation stubs, we need to pass the symbol table index of // a local symbol. unsigned int r_sym = elfcpp::elf_r_sym<32>(rel.get_r_info()); @@ -10251,11 +10266,11 @@ Target_arm<big_endian>::merge_object_attributes( out_attr[i].set_int_value(in_attr[i].int_value()); break; case elfcpp::Tag_ABI_PCS_wchar_t: - // FIXME: Make it possible to turn off this warning. if (out_attr[i].int_value() && in_attr[i].int_value() && out_attr[i].int_value() != in_attr[i].int_value() - && parameters->options().warn_mismatch()) + && parameters->options().warn_mismatch() + && parameters->options().wchar_size_warning()) { gold_warning(_("%s uses %u-byte wchar_t yet the output is to " "use %u-byte wchar_t; use of wchar_t values " @@ -10276,10 +10291,10 @@ Target_arm<big_endian>::merge_object_attributes( // Use whatever requirements the new object has. out_attr[i].set_int_value(in_attr[i].int_value()); } - // FIXME: Make it possible to turn off this warning. else if (in_attr[i].int_value() != elfcpp::AEABI_enum_forced_wide && out_attr[i].int_value() != in_attr[i].int_value() - && parameters->options().warn_mismatch()) + && parameters->options().warn_mismatch() + && parameters->options().enum_size_warning()) { unsigned int in_value = in_attr[i].int_value(); unsigned int out_value = out_attr[i].int_value(); @@ -10775,6 +10790,8 @@ Target_arm<big_endian>::scan_reloc_section_for_stubs( Symbol_value<32> symval; const Symbol_value<32> *psymval; + bool is_defined_in_discarded_section; + unsigned int shndx; if (r_sym < local_count) { sym = NULL; @@ -10786,45 +10803,53 @@ Target_arm<big_endian>::scan_reloc_section_for_stubs( // counterpart in the kept section. The symbol must not // correspond to a section we are folding. bool is_ordinary; - unsigned int shndx = psymval->input_shndx(&is_ordinary); - if (is_ordinary - && shndx != elfcpp::SHN_UNDEF - && !arm_object->is_section_included(shndx) - && !(relinfo->symtab->is_section_folded(arm_object, shndx))) + shndx = psymval->input_shndx(&is_ordinary); + is_defined_in_discarded_section = + (is_ordinary + && shndx != elfcpp::SHN_UNDEF + && !arm_object->is_section_included(shndx) + && !relinfo->symtab->is_section_folded(arm_object, shndx)); + + // We need to compute the would-be final value of this local + // symbol. + if (!is_defined_in_discarded_section) { - if (comdat_behavior == CB_UNDETERMINED) - { - std::string name = - arm_object->section_name(relinfo->data_shndx); - comdat_behavior = get_comdat_behavior(name.c_str()); - } - if (comdat_behavior == CB_PRETEND) - { - bool found; - typename elfcpp::Elf_types<32>::Elf_Addr value = - arm_object->map_to_kept_section(shndx, &found); - if (found) - symval.set_output_value(value + psymval->input_value()); - else - symval.set_output_value(0); - } + typedef Sized_relobj<32, big_endian> ObjType; + typename ObjType::Compute_final_local_value_status status = + arm_object->compute_final_local_value(r_sym, psymval, &symval, + relinfo->symtab); + if (status == ObjType::CFLV_OK) + { + // Currently we cannot handle a branch to a target in + // a merged section. If this is the case, issue an error + // and also free the merge symbol value. + if (!symval.has_output_value()) + { + const std::string& section_name = + arm_object->section_name(shndx); + arm_object->error(_("cannot handle branch to local %u " + "in a merged section %s"), + r_sym, section_name.c_str()); + } + psymval = &symval; + } else - { - symval.set_output_value(0); - } - symval.set_no_output_symtab_entry(); - psymval = &symval; + { + // We cannot determine the final value. + continue; + } } } else { - const Symbol* gsym = arm_object->global_symbol(r_sym); + const Symbol* gsym; + gsym = arm_object->global_symbol(r_sym); gold_assert(gsym != NULL); if (gsym->is_forwarder()) gsym = relinfo->symtab->resolve_forwards(gsym); sym = static_cast<const Sized_symbol<32>*>(gsym); - if (sym->has_symtab_index()) + if (sym->has_symtab_index() && sym->symtab_index() != -1U) symval.set_output_symtab_index(sym->symtab_index()); else symval.set_no_output_symtab_entry(); @@ -10841,9 +10866,51 @@ Target_arm<big_endian>::scan_reloc_section_for_stubs( // Skip this if the symbol has not output section. if (status == Symbol_table::CFVS_NO_OUTPUT_SECTION) continue; - symval.set_output_value(value); + + if (gsym->type() == elfcpp::STT_TLS) + symval.set_is_tls_symbol(); psymval = &symval; + + is_defined_in_discarded_section = + (gsym->is_defined_in_discarded_section() + && gsym->is_undefined()); + shndx = 0; + } + + Symbol_value<32> symval2; + if (is_defined_in_discarded_section) + { + if (comdat_behavior == CB_UNDETERMINED) + { + std::string name = arm_object->section_name(relinfo->data_shndx); + comdat_behavior = get_comdat_behavior(name.c_str()); + } + if (comdat_behavior == CB_PRETEND) + { + // FIXME: This case does not work for global symbols. + // We have no place to store the original section index. + // Fortunately this does not matter for comdat sections, + // only for sections explicitly discarded by a linker + // script. + bool found; + typename elfcpp::Elf_types<32>::Elf_Addr value = + arm_object->map_to_kept_section(shndx, &found); + if (found) + symval2.set_output_value(value + psymval->input_value()); + else + symval2.set_output_value(0); + } + else + { + if (comdat_behavior == CB_WARNING) + gold_warning_at_location(relinfo, i, offset, + _("relocation refers to discarded " + "section")); + symval2.set_output_value(0); + } + symval2.set_no_output_symtab_entry(); + psymval = &symval2; } // If symbol is a section symbol, we don't know the actual type of diff --git a/binutils-2.19/gold/gc.h b/binutils-2.19/gold/gc.h index 77ac6da..fa65496 100644 --- a/binutils-2.19/gold/gc.h +++ b/binutils-2.19/gold/gc.h @@ -151,6 +151,20 @@ struct Symbols_data section_size_type symbol_names_size; }; +// Relocations of type SHT_REL store the addend value in their bytes. +// This function returns the size of the embedded addend which is +// nothing but the size of the relocation. + +template<typename Classify_reloc> +inline unsigned int +get_embedded_addend_size(int sh_type, int r_type, Relobj* obj) +{ + if (sh_type != elfcpp::SHT_REL) + return 0; + Classify_reloc classify_reloc; + return classify_reloc.get_size_for_reloc(r_type, obj); +} + // This function implements the generic part of reloc // processing to map a section to all the sections it // references through relocs. It is called only during @@ -158,7 +172,7 @@ struct Symbols_data // folding (--icf). template<int size, bool big_endian, typename Target_type, int sh_type, - typename Scan> + typename Scan, typename Classify_reloc> inline void gc_process_relocs( Symbol_table* symtab, @@ -185,6 +199,7 @@ gc_process_relocs( Icf::Symbol_info* symvec = NULL; Icf::Addend_info* addendvec = NULL; Icf::Offset_info* offsetvec = NULL; + Icf::Reloc_addend_size_info* reloc_addend_size_vec = NULL; bool is_icf_tracked = false; const char* cident_section_name = NULL; @@ -205,6 +220,7 @@ gc_process_relocs( symvec = &reloc_info->symbol_info; addendvec = &reloc_info->addend_info; offsetvec = &reloc_info->offset_info; + reloc_addend_size_vec = &reloc_info->reloc_addend_size_info; } check_section_for_function_pointers = @@ -243,6 +259,9 @@ gc_process_relocs( uint64_t reloc_offset = convert_to_section_size_type(reloc.get_r_offset()); (*offsetvec).push_back(reloc_offset); + (*reloc_addend_size_vec).push_back( + get_embedded_addend_size<Classify_reloc>(sh_type, r_type, + src_obj)); } // When doing safe folding, check to see if this relocation is that @@ -316,6 +335,9 @@ gc_process_relocs( uint64_t reloc_offset = convert_to_section_size_type(reloc.get_r_offset()); (*offsetvec).push_back(reloc_offset); + (*reloc_addend_size_vec).push_back( + get_embedded_addend_size<Classify_reloc>(sh_type, r_type, + src_obj)); } if (gsym->source() != Symbol::FROM_OBJECT) diff --git a/binutils-2.19/gold/i386.cc b/binutils-2.19/gold/i386.cc index e7b700c..bb1de1c 100644 --- a/binutils-2.19/gold/i386.cc +++ b/binutils-2.19/gold/i386.cc @@ -1,6 +1,6 @@ // i386.cc -- i386 target support for gold. -// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. @@ -59,8 +59,9 @@ class Target_i386 : public Target_freebsd<32, false> Target_i386() : Target_freebsd<32, false>(&i386_info), - got_(NULL), plt_(NULL), got_plt_(NULL), global_offset_table_(NULL), - rel_dyn_(NULL), copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL), + got_(NULL), plt_(NULL), got_plt_(NULL), got_tlsdesc_(NULL), + global_offset_table_(NULL), rel_dyn_(NULL), + copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL), got_mod_index_offset_(-1U), tls_base_symbol_defined_(false) { } @@ -381,6 +382,14 @@ class Target_i386 : public Target_freebsd<32, false> return this->got_plt_; } + // Get the GOT section for TLSDESC entries. + Output_data_got<32, false>* + got_tlsdesc_section() const + { + gold_assert(this->got_tlsdesc_ != NULL); + return this->got_tlsdesc_; + } + // Create a PLT entry for a global symbol. void make_plt_entry(Symbol_table*, Layout*, Symbol*); @@ -443,6 +452,8 @@ class Target_i386 : public Target_freebsd<32, false> Output_data_plt_i386* plt_; // The GOT PLT section. Output_data_space* got_plt_; + // The GOT section for TLSDESC relocations. + Output_data_got<32, false>* got_tlsdesc_; // The _GLOBAL_OFFSET_TABLE_ symbol. Symbol* global_offset_table_; // The dynamic reloc section. @@ -519,6 +530,15 @@ Target_i386::got_section(Symbol_table* symtab, Layout* layout) elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN, 0, false, false); + + // If there are any TLSDESC relocations, they get GOT entries in + // .got.plt after the jump slot entries. + this->got_tlsdesc_ = new Output_data_got<32, false>(); + layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), + this->got_tlsdesc_, false, false, false, + true); } return this->got_; @@ -1115,9 +1135,13 @@ Target_i386::Scan::local(Symbol_table* symtab, target->define_tls_base_symbol(symtab, layout); if (optimized_type == tls::TLSOPT_NONE) { - // Create a double GOT entry with an R_386_TLS_DESC reloc. - Output_data_got<32, false>* got - = target->got_section(symtab, layout); + // Create a double GOT entry with an R_386_TLS_DESC + // reloc. The R_386_TLS_DESC reloc is resolved + // lazily, so the GOT entry needs to be in an area in + // .got.plt, not .got. Call got_section to make sure + // the section has been created. + target->got_section(symtab, layout); + Output_data_got<32, false>* got = target->got_tlsdesc_section(); unsigned int r_sym = elfcpp::elf_r_sym<32>(reloc.get_r_info()); if (!object->local_has_got_offset(r_sym, GOT_TYPE_TLS_DESC)) { @@ -1499,9 +1523,13 @@ Target_i386::Scan::global(Symbol_table* symtab, target->define_tls_base_symbol(symtab, layout); if (optimized_type == tls::TLSOPT_NONE) { - // Create a double GOT entry with an R_386_TLS_DESC reloc. - Output_data_got<32, false>* got - = target->got_section(symtab, layout); + // Create a double GOT entry with an R_386_TLS_DESC + // reloc. The R_386_TLS_DESC reloc is resolved + // lazily, so the GOT entry needs to be in an area in + // .got.plt, not .got. Call got_section to make sure + // the section has been created. + target->got_section(symtab, layout); + Output_data_got<32, false>* got = target->got_tlsdesc_section(); Reloc_section* rt = target->rel_tls_desc_section(layout); got->add_global_pair_with_rel(gsym, GOT_TYPE_TLS_DESC, rt, elfcpp::R_386_TLS_DESC, 0); @@ -1622,7 +1650,8 @@ Target_i386::gc_process_relocs(Symbol_table* symtab, const unsigned char* plocal_symbols) { gold::gc_process_relocs<32, false, Target_i386, elfcpp::SHT_REL, - Target_i386::Scan>( + Target_i386::Scan, + Target_i386::Relocatable_size_for_reloc>( symtab, layout, this, @@ -2043,18 +2072,27 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo, unsigned int got_type = (optimized_type == tls::TLSOPT_TO_IE ? GOT_TYPE_TLS_NOFFSET : GOT_TYPE_TLS_DESC); - unsigned int got_offset; + unsigned int got_offset = 0; + if (r_type == elfcpp::R_386_TLS_GOTDESC + && optimized_type == tls::TLSOPT_NONE) + { + // We created GOT entries in the .got.tlsdesc portion of + // the .got.plt section, but the offset stored in the + // symbol is the offset within .got.tlsdesc. + got_offset = (target->got_size() + + target->got_plt_section()->data_size()); + } if (gsym != NULL) { gold_assert(gsym->has_got_offset(got_type)); - got_offset = gsym->got_offset(got_type) - target->got_size(); + got_offset += gsym->got_offset(got_type) - target->got_size(); } else { unsigned int r_sym = elfcpp::elf_r_sym<32>(rel.get_r_info()); gold_assert(object->local_has_got_offset(r_sym, got_type)); - got_offset = (object->local_got_offset(r_sym, got_type) - - target->got_size()); + got_offset += (object->local_got_offset(r_sym, got_type) + - target->got_size()); } if (optimized_type == tls::TLSOPT_TO_IE) { diff --git a/binutils-2.19/gold/icf.cc b/binutils-2.19/gold/icf.cc index 47b6c60..31312bb 100644 --- a/binutils-2.19/gold/icf.cc +++ b/binutils-2.19/gold/icf.cc @@ -145,6 +145,8 @@ #include "symtab.h" #include "libiberty.h" #include "demangle.h" +#include "elfcpp.h" +#include "int_encoding.h" namespace gold { @@ -269,12 +271,16 @@ get_section_contents(bool first_iteration, Icf::Addend_info a = (it_reloc_info_list->second).addend_info; // Stores the offset of the reloc. Icf::Offset_info o = (it_reloc_info_list->second).offset_info; + Icf::Reloc_addend_size_info reloc_addend_size_info = + (it_reloc_info_list->second).reloc_addend_size_info; Icf::Sections_reachable_info::iterator it_v = v.begin(); Icf::Symbol_info::iterator it_s = s.begin(); Icf::Addend_info::iterator it_a = a.begin(); Icf::Offset_info::iterator it_o = o.begin(); + Icf::Reloc_addend_size_info::iterator it_addend_size = + reloc_addend_size_info.begin(); - for (; it_v != v.end(); ++it_v, ++it_s, ++it_a, ++it_o) + for (; it_v != v.end(); ++it_v, ++it_s, ++it_a, ++it_o, ++it_addend_size) { // ADDEND_STR stores the symbol value and addend and offset, // each atmost 16 hex digits long. it_a points to a pair @@ -372,6 +378,46 @@ get_section_contents(bool first_iteration, if (addend < 0xffffff00) offset = offset + addend; + // For SHT_REL relocation sections, the addend is stored in the + // text section at the relocation offset. + uint64_t reloc_addend_value = 0; + const unsigned char* reloc_addend_ptr = + contents + static_cast<unsigned long long>(*it_o); + switch(*it_addend_size) + { + case 0: + { + break; + } + case 1: + { + reloc_addend_value = + read_from_pointer<8>(reloc_addend_ptr); + break; + } + case 2: + { + reloc_addend_value = + read_from_pointer<16>(reloc_addend_ptr); + break; + } + case 4: + { + reloc_addend_value = + read_from_pointer<32>(reloc_addend_ptr); + break; + } + case 8: + { + reloc_addend_value = + read_from_pointer<64>(reloc_addend_ptr); + break; + } + default: + gold_unreachable(); + } + offset = offset + reloc_addend_value; + section_size_type secn_len; const unsigned char* str_contents = (it_v->first)->section_contents(it_v->second, diff --git a/binutils-2.19/gold/icf.h b/binutils-2.19/gold/icf.h index c968c9d..1a4d1be 100644 --- a/binutils-2.19/gold/icf.h +++ b/binutils-2.19/gold/icf.h @@ -43,6 +43,7 @@ class Icf typedef std::vector<Symbol*> Symbol_info; typedef std::vector<std::pair<long long, long long> > Addend_info; typedef std::vector<uint64_t> Offset_info; + typedef std::vector<unsigned int> Reloc_addend_size_info; typedef Unordered_map<Section_id, unsigned int, Section_id_hash> Uniq_secn_id_map; @@ -57,6 +58,7 @@ class Icf // This stores the symbol value and the addend for a reloc. Addend_info addend_info; Offset_info offset_info; + Reloc_addend_size_info reloc_addend_size_info; } Reloc_info; typedef Unordered_map<Section_id, Reloc_info, diff --git a/binutils-2.19/gold/int_encoding.h b/binutils-2.19/gold/int_encoding.h index b60e969..6485a93 100644 --- a/binutils-2.19/gold/int_encoding.h +++ b/binutils-2.19/gold/int_encoding.h @@ -77,6 +77,20 @@ void insert_into_vector(std::vector<unsigned char>* destination, destination->insert(destination->end(), buffer, buffer + valsize / 8); } +// Read a possibly unaligned integer of SIZE from SOURCE. + +template <int valsize> +typename elfcpp::Valtype_base<valsize>::Valtype +read_from_pointer(const unsigned char* source) +{ + typename elfcpp::Valtype_base<valsize>::Valtype return_value; + if (parameters->target().is_big_endian()) + return_value = elfcpp::Swap_unaligned<valsize, true>::readval(source); + else + return_value = elfcpp::Swap_unaligned<valsize, false>::readval(source); + return return_value; +} + // Read a possibly unaligned integer of SIZE. Update SOURCE after read. template <int valsize> diff --git a/binutils-2.19/gold/merge.cc b/binutils-2.19/gold/merge.cc index 6e44ddd..1554e69 100644 --- a/binutils-2.19/gold/merge.cc +++ b/binutils-2.19/gold/merge.cc @@ -509,6 +509,11 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object, size_t count = 0; + Merged_strings_list* merged_strings_list = + new Merged_strings_list(object, shndx); + this->merged_strings_lists_.push_back(merged_strings_list); + Merged_strings& merged_strings = merged_strings_list->merged_strings; + // The index I is in bytes, not characters. section_size_type i = 0; while (i < len) @@ -527,18 +532,20 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object, } Stringpool::Key key; - const Char_type* str = this->stringpool_.add_with_length(p, pl - p, true, - &key); + this->stringpool_.add_with_length(p, pl - p, true, &key); section_size_type bytelen_with_null = ((pl - p) + 1) * sizeof(Char_type); - this->merged_strings_.push_back(Merged_string(object, shndx, i, str, - bytelen_with_null, key)); + merged_strings.push_back(Merged_string(i, key)); p = pl + 1; i += bytelen_with_null; ++count; } + // Record the last offset in the input section so that we can + // compute the length of the last string. + merged_strings.push_back(Merged_string(i, 0)); + this->input_count_ += count; // For script processing, we keep the input sections. @@ -557,20 +564,34 @@ Output_merge_string<Char_type>::finalize_merged_data() { this->stringpool_.set_string_offsets(); - for (typename Merged_strings::const_iterator p = - this->merged_strings_.begin(); - p != this->merged_strings_.end(); - ++p) + for (typename Merged_strings_lists::const_iterator l = + this->merged_strings_lists_.begin(); + l != this->merged_strings_lists_.end(); + ++l) { - section_offset_type offset = - this->stringpool_.get_offset_from_key(p->stringpool_key); - this->add_mapping(p->object, p->shndx, p->offset, p->length, offset); + section_offset_type last_input_offset = 0; + section_offset_type last_output_offset = 0; + for (typename Merged_strings::const_iterator p = + (*l)->merged_strings.begin(); + p != (*l)->merged_strings.end(); + ++p) + { + section_size_type length = p->offset - last_input_offset; + if (length > 0) + this->add_mapping((*l)->object, (*l)->shndx, last_input_offset, + length, last_output_offset); + last_input_offset = p->offset; + if (p->stringpool_key != 0) + last_output_offset = + this->stringpool_.get_offset_from_key(p->stringpool_key); + } + delete *l; } // Save some memory. This also ensures that this function will work // if called twice, as may happen if Layout::set_segment_offsets // finds a better alignment. - this->merged_strings_.clear(); + this->merged_strings_lists_.clear(); return this->stringpool_.get_strtab_size(); } diff --git a/binutils-2.19/gold/merge.h b/binutils-2.19/gold/merge.h index c2d305b..b1284ae 100644 --- a/binutils-2.19/gold/merge.h +++ b/binutils-2.19/gold/merge.h @@ -462,7 +462,7 @@ class Output_merge_string : public Output_merge_base public: Output_merge_string(uint64_t addralign) : Output_merge_base(sizeof(Char_type), addralign), stringpool_(), - merged_strings_(), input_count_(0) + merged_strings_lists_(), input_count_(0) { gold_assert(addralign <= sizeof(Char_type)); this->stringpool_.set_no_zero_null(); @@ -531,34 +531,39 @@ class Output_merge_string : public Output_merge_base // index and offset to strings. struct Merged_string { - // The input object where the string was found. - Relobj* object; - // The input section in the input object. - unsigned int shndx; // The offset in the input section. section_offset_type offset; - // The string itself, a pointer into a Stringpool. - const Char_type* string; - // The length of the string in bytes, including the null terminator. - size_t length; // The key in the Stringpool. Stringpool::Key stringpool_key; - Merged_string(Relobj *objecta, unsigned int shndxa, - section_offset_type offseta, const Char_type* stringa, - size_t lengtha, Stringpool::Key stringpool_keya) - : object(objecta), shndx(shndxa), offset(offseta), string(stringa), - length(lengtha), stringpool_key(stringpool_keya) + Merged_string(section_offset_type offseta, Stringpool::Key stringpool_keya) + : offset(offseta), stringpool_key(stringpool_keya) { } }; typedef std::vector<Merged_string> Merged_strings; + struct Merged_strings_list + { + // The input object where the strings were found. + Relobj* object; + // The input section in the input object. + unsigned int shndx; + // The list of merged strings. + Merged_strings merged_strings; + + Merged_strings_list(Relobj* objecta, unsigned int shndxa) + : object(objecta), shndx(shndxa), merged_strings() + { } + }; + + typedef std::vector<Merged_strings_list*> Merged_strings_lists; + // As we see the strings, we add them to a Stringpool. Stringpool_template<Char_type> stringpool_; // Map from a location in an input object to an entry in the // Stringpool. - Merged_strings merged_strings_; + Merged_strings_lists merged_strings_lists_; // The number of entries seen in input files. size_t input_count_; }; diff --git a/binutils-2.19/gold/object.cc b/binutils-2.19/gold/object.cc index 02366c0..2005c6f 100644 --- a/binutils-2.19/gold/object.cc +++ b/binutils-2.19/gold/object.cc @@ -1636,6 +1636,178 @@ Sized_relobj<size, big_endian>::do_count_local_symbols(Stringpool* pool, this->output_local_dynsym_count_ = dyncount; } +// Compute the final value of a local symbol. + +template<int size, bool big_endian> +typename Sized_relobj<size, big_endian>::Compute_final_local_value_status +Sized_relobj<size, big_endian>::compute_final_local_value_internal( + unsigned int r_sym, + const Symbol_value<size>* lv_in, + Symbol_value<size>* lv_out, + bool relocatable, + const Output_sections& out_sections, + const std::vector<Address>& out_offsets, + const Symbol_table* symtab) +{ + // We are going to overwrite *LV_OUT, if it has a merged symbol value, + // we may have a memory leak. + gold_assert(lv_out->has_output_value()); + + bool is_ordinary; + unsigned int shndx = lv_in->input_shndx(&is_ordinary); + + // Set the output symbol value. + + if (!is_ordinary) + { + if (shndx == elfcpp::SHN_ABS || Symbol::is_common_shndx(shndx)) + lv_out->set_output_value(lv_in->input_value()); + else + { + this->error(_("unknown section index %u for local symbol %u"), + shndx, r_sym); + lv_out->set_output_value(0); + return This::CFLV_ERROR; + } + } + else + { + if (shndx >= this->shnum()) + { + this->error(_("local symbol %u section index %u out of range"), + r_sym, shndx); + lv_out->set_output_value(0); + return This::CFLV_ERROR; + } + + Output_section* os = out_sections[shndx]; + Address secoffset = out_offsets[shndx]; + if (symtab->is_section_folded(this, shndx)) + { + gold_assert(os == NULL && secoffset == invalid_address); + // Get the os of the section it is folded onto. + Section_id folded = symtab->icf()->get_folded_section(this, + shndx); + gold_assert(folded.first != NULL); + Sized_relobj<size, big_endian>* folded_obj = reinterpret_cast + <Sized_relobj<size, big_endian>*>(folded.first); + os = folded_obj->output_section(folded.second); + gold_assert(os != NULL); + secoffset = folded_obj->get_output_section_offset(folded.second); + + // This could be a relaxed input section. + if (secoffset == invalid_address) + { + const Output_relaxed_input_section* relaxed_section = + os->find_relaxed_input_section(folded_obj, folded.second); + gold_assert(relaxed_section != NULL); + secoffset = relaxed_section->address() - os->address(); + } + } + + if (os == NULL) + { + // This local symbol belongs to a section we are discarding. + // In some cases when applying relocations later, we will + // attempt to match it to the corresponding kept section, + // so we leave the input value unchanged here. + return This::CFLV_DISCARDED; + } + else if (secoffset == invalid_address) + { + uint64_t start; + + // This is a SHF_MERGE section or one which otherwise + // requires special handling. + if (shndx == this->discarded_eh_frame_shndx_) + { + // This local symbol belongs to a discarded .eh_frame + // section. Just treat it like the case in which + // os == NULL above. + gold_assert(this->has_eh_frame_); + return This::CFLV_DISCARDED; + } + else if (!lv_in->is_section_symbol()) + { + // This is not a section symbol. We can determine + // the final value now. + lv_out->set_output_value( + os->output_address(this, shndx, lv_in->input_value())); + } + else if (!os->find_starting_output_address(this, shndx, &start)) + { + // This is a section symbol, but apparently not one in a + // merged section. First check to see if this is a relaxed + // input section. If so, use its address. Otherwise just + // use the start of the output section. This happens with + // relocatable links when the input object has section + // symbols for arbitrary non-merge sections. + const Output_section_data* posd = + os->find_relaxed_input_section(this, shndx); + if (posd != NULL) + { + Address relocatable_link_adjustment = + relocatable ? os->address() : 0; + lv_out->set_output_value(posd->address() + - relocatable_link_adjustment); + } + else + lv_out->set_output_value(os->address()); + } + else + { + // We have to consider the addend to determine the + // value to use in a relocation. START is the start + // of this input section. If we are doing a relocatable + // link, use offset from start output section instead of + // address. + Address adjusted_start = + relocatable ? start - os->address() : start; + Merged_symbol_value<size>* msv = + new Merged_symbol_value<size>(lv_in->input_value(), + adjusted_start); + lv_out->set_merged_symbol_value(msv); + } + } + else if (lv_in->is_tls_symbol()) + lv_out->set_output_value(os->tls_offset() + + secoffset + + lv_in->input_value()); + else + lv_out->set_output_value((relocatable ? 0 : os->address()) + + secoffset + + lv_in->input_value()); + } + return This::CFLV_OK; +} + +// Compute final local symbol value. R_SYM is the index of a local +// symbol in symbol table. LV points to a symbol value, which is +// expected to hold the input value and to be over-written by the +// final value. SYMTAB points to a symbol table. Some targets may want +// to know would-be-finalized local symbol values in relaxation. +// Hence we provide this method. Since this method updates *LV, a +// callee should make a copy of the original local symbol value and +// use the copy instead of modifying an object's local symbols before +// everything is finalized. The caller should also free up any allocated +// memory in the return value in *LV. +template<int size, bool big_endian> +typename Sized_relobj<size, big_endian>::Compute_final_local_value_status +Sized_relobj<size, big_endian>::compute_final_local_value( + unsigned int r_sym, + const Symbol_value<size>* lv_in, + Symbol_value<size>* lv_out, + const Symbol_table* symtab) +{ + // This is just a wrapper of compute_final_local_value_internal. + const bool relocatable = parameters->options().relocatable(); + const Output_sections& out_sections(this->output_sections()); + const std::vector<Address>& out_offsets(this->section_offsets_); + return this->compute_final_local_value_internal(r_sym, lv_in, lv_out, + relocatable, out_sections, + out_offsets, symtab); +} + // Finalize the local symbols. Here we set the final value in // THIS->LOCAL_VALUES_ and set their output symbol table indexes. // This function is always called from a singleton thread. The actual @@ -1655,141 +1827,31 @@ Sized_relobj<size, big_endian>::do_finalize_local_symbols(unsigned int index, const bool relocatable = parameters->options().relocatable(); const Output_sections& out_sections(this->output_sections()); const std::vector<Address>& out_offsets(this->section_offsets_); - unsigned int shnum = this->shnum(); for (unsigned int i = 1; i < loccount; ++i) { - Symbol_value<size>& lv(this->local_values_[i]); - - bool is_ordinary; - unsigned int shndx = lv.input_shndx(&is_ordinary); + Symbol_value<size>* lv = &this->local_values_[i]; - // Set the output symbol value. - - if (!is_ordinary) + Compute_final_local_value_status cflv_status = + this->compute_final_local_value_internal(i, lv, lv, relocatable, + out_sections, out_offsets, + symtab); + switch (cflv_status) { - if (shndx == elfcpp::SHN_ABS || Symbol::is_common_shndx(shndx)) - lv.set_output_value(lv.input_value()); - else + case CFLV_OK: + if (!lv->is_output_symtab_index_set()) { - this->error(_("unknown section index %u for local symbol %u"), - shndx, i); - lv.set_output_value(0); + lv->set_output_symtab_index(index); + ++index; } + break; + case CFLV_DISCARDED: + case CFLV_ERROR: + // Do nothing. + break; + default: + gold_unreachable(); } - else - { - if (shndx >= shnum) - { - this->error(_("local symbol %u section index %u out of range"), - i, shndx); - shndx = 0; - } - - Output_section* os = out_sections[shndx]; - Address secoffset = out_offsets[shndx]; - if (symtab->is_section_folded(this, shndx)) - { - gold_assert (os == NULL && secoffset == invalid_address); - // Get the os of the section it is folded onto. - Section_id folded = symtab->icf()->get_folded_section(this, - shndx); - gold_assert(folded.first != NULL); - Sized_relobj<size, big_endian>* folded_obj = reinterpret_cast - <Sized_relobj<size, big_endian>*>(folded.first); - os = folded_obj->output_section(folded.second); - gold_assert(os != NULL); - secoffset = folded_obj->get_output_section_offset(folded.second); - - // This could be a relaxed input section. - if (secoffset == invalid_address) - { - const Output_relaxed_input_section* relaxed_section = - os->find_relaxed_input_section(folded_obj, folded.second); - gold_assert(relaxed_section != NULL); - secoffset = relaxed_section->address() - os->address(); - } - } - - if (os == NULL) - { - // This local symbol belongs to a section we are discarding. - // In some cases when applying relocations later, we will - // attempt to match it to the corresponding kept section, - // so we leave the input value unchanged here. - continue; - } - else if (secoffset == invalid_address) - { - uint64_t start; - - // This is a SHF_MERGE section or one which otherwise - // requires special handling. - if (shndx == this->discarded_eh_frame_shndx_) - { - // This local symbol belongs to a discarded .eh_frame - // section. Just treat it like the case in which - // os == NULL above. - gold_assert(this->has_eh_frame_); - continue; - } - else if (!lv.is_section_symbol()) - { - // This is not a section symbol. We can determine - // the final value now. - lv.set_output_value(os->output_address(this, shndx, - lv.input_value())); - } - else if (!os->find_starting_output_address(this, shndx, &start)) - { - // This is a section symbol, but apparently not one in a - // merged section. First check to see if this is a relaxed - // input section. If so, use its address. Otherwise just - // use the start of the output section. This happens with - // relocatable links when the input object has section - // symbols for arbitrary non-merge sections. - const Output_section_data* posd = - os->find_relaxed_input_section(this, shndx); - if (posd != NULL) - { - Address relocatable_link_adjustment = - relocatable ? os->address() : 0; - lv.set_output_value(posd->address() - - relocatable_link_adjustment); - } - else - lv.set_output_value(os->address()); - } - else - { - // We have to consider the addend to determine the - // value to use in a relocation. START is the start - // of this input section. If we are doing a relocatable - // link, use offset from start output section instead of - // address. - Address adjusted_start = - relocatable ? start - os->address() : start; - Merged_symbol_value<size>* msv = - new Merged_symbol_value<size>(lv.input_value(), - adjusted_start); - lv.set_merged_symbol_value(msv); - } - } - else if (lv.is_tls_symbol()) - lv.set_output_value(os->tls_offset() - + secoffset - + lv.input_value()); - else - lv.set_output_value((relocatable ? 0 : os->address()) - + secoffset - + lv.input_value()); - } - - if (!lv.is_output_symtab_index_set()) - { - lv.set_output_symtab_index(index); - ++index; - } } return index; } diff --git a/binutils-2.19/gold/object.h b/binutils-2.19/gold/object.h index 59da7c1..5d009e2 100644 --- a/binutils-2.19/gold/object.h +++ b/binutils-2.19/gold/object.h @@ -1020,6 +1020,12 @@ class Symbol_value is_tls_symbol_(false), has_output_value_(true) { this->u_.value = 0; } + ~Symbol_value() + { + if (!this->has_output_value_) + delete this->u_.merged_symbol_value; + } + // Get the value of this symbol. OBJECT is the object in which this // symbol is defined, and ADDEND is an addend to add to the value. template<bool big_endian> @@ -1235,6 +1241,11 @@ class Symbol_value is_tls_symbol() const { return this->is_tls_symbol_; } + // Return true if this has output value. + bool + has_output_value() const + { return this->has_output_value_; } + private: // The index of this local symbol in the output symbol table. This // will be 0 if no value has been assigned yet, and the symbol may @@ -1387,6 +1398,16 @@ class Sized_relobj : public Relobj static const Address invalid_address = static_cast<Address>(0) - 1; + enum Compute_final_local_value_status + { + // No error. + CFLV_OK, + // An error occurred. + CFLV_ERROR, + // The local symbol has no output section. + CFLV_DISCARDED + }; + Sized_relobj(const std::string& name, Input_file* input_file, off_t offset, const typename elfcpp::Ehdr<size, big_endian>&); @@ -1547,6 +1568,22 @@ class Sized_relobj : public Relobj Address map_to_kept_section(unsigned int shndx, bool* found) const; + // Compute final local symbol value. R_SYM is the local symbol index. + // LV_IN points to a local symbol value containing the input value. + // LV_OUT points to a local symbol value storing the final output value, + // which must not be a merged symbol value since before calling this + // method to avoid memory leak. SYMTAB points to a symbol table. + // + // The method returns a status code at return. If the return status is + // CFLV_OK, *LV_OUT contains the final value. If the return status is + // CFLV_ERROR, *LV_OUT is 0. If the return status is CFLV_DISCARDED, + // *LV_OUT is not modified. + Compute_final_local_value_status + compute_final_local_value(unsigned int r_sym, + const Symbol_value<size>* lv_in, + Symbol_value<size>* lv_out, + const Symbol_table* symtab); + protected: // Set up. virtual void @@ -1912,6 +1949,28 @@ class Sized_relobj : public Relobj return true; } + // Compute final local symbol value. R_SYM is the local symbol index. + // LV_IN points to a local symbol value containing the input value. + // LV_OUT points to a local symbol value storing the final output value, + // which must not be a merged symbol value since before calling this + // method to avoid memory leak. RELOCATABLE indicates whether we are + // linking a relocatable output. OUT_SECTIONS is an array of output + // sections. OUT_OFFSETS is an array of offsets of the sections. SYMTAB + // points to a symbol table. + // + // The method returns a status code at return. If the return status is + // CFLV_OK, *LV_OUT contains the final value. If the return status is + // CFLV_ERROR, *LV_OUT is 0. If the return status is CFLV_DISCARDED, + // *LV_OUT is not modified. + inline Compute_final_local_value_status + compute_final_local_value_internal(unsigned int r_sym, + const Symbol_value<size>* lv_in, + Symbol_value<size>* lv_out, + bool relocatable, + const Output_sections& out_sections, + const std::vector<Address>& out_offsets, + const Symbol_table* symtab); + // The GOT offsets of local symbols. This map also stores GOT offsets // for tp-relative offsets for TLS symbols. typedef Unordered_map<unsigned int, Got_offset_list*> Local_got_offsets; diff --git a/binutils-2.19/gold/options.h b/binutils-2.19/gold/options.h index 2e427ce..1f9c921 100644 --- a/binutils-2.19/gold/options.h +++ b/binutils-2.19/gold/options.h @@ -721,6 +721,10 @@ class General_options DEFINE_special(EL, options::ONE_DASH, '\0', N_("Link little-endian objects."), NULL); + DEFINE_bool(enum_size_warning, options::TWO_DASHES, '\0', true, NULL, + N_("(ARM only) Do not warn about objects with incompatible " + "enum sizes")); + DEFINE_bool(fatal_warnings, options::TWO_DASHES, '\0', false, N_("Treat warnings as errors"), N_("Do not treat warnings as errors")); @@ -1018,6 +1022,10 @@ class General_options N_("Report unresolved symbols as errors"), NULL, true); + DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL, + N_("(ARM only) Do not warn about objects with incompatible " + "wchar_t sizes")); + DEFINE_bool(whole_archive, options::TWO_DASHES, '\0', false, N_("Include all archive contents"), N_("Include only needed archive contents")); diff --git a/binutils-2.19/gold/powerpc.cc b/binutils-2.19/gold/powerpc.cc index 0eda0a9..78334e9 100644 --- a/binutils-2.19/gold/powerpc.cc +++ b/binutils-2.19/gold/powerpc.cc @@ -1493,7 +1493,8 @@ Target_powerpc<size, big_endian>::gc_process_relocs( typedef Target_powerpc<size, big_endian> Powerpc; typedef typename Target_powerpc<size, big_endian>::Scan Scan; - gold::gc_process_relocs<size, big_endian, Powerpc, elfcpp::SHT_RELA, Scan>( + gold::gc_process_relocs<size, big_endian, Powerpc, elfcpp::SHT_RELA, Scan, + Relocatable_size_for_reloc>( symtab, layout, this, diff --git a/binutils-2.19/gold/resolve.cc b/binutils-2.19/gold/resolve.cc index 8b1c321..4864f1e 100644 --- a/binutils-2.19/gold/resolve.cc +++ b/binutils-2.19/gold/resolve.cc @@ -335,18 +335,33 @@ Symbol_table::resolve(Sized_symbol<size>* to, sym.get_st_type()); bool adjust_common_sizes; + bool adjust_dyndef; typename Sized_symbol<size>::Size_type tosize = to->symsize(); if (Symbol_table::should_override(to, frombits, OBJECT, object, - &adjust_common_sizes)) + &adjust_common_sizes, + &adjust_dyndef)) { + elfcpp::STB tobinding = to->binding(); this->override(to, sym, st_shndx, is_ordinary, object, version); if (adjust_common_sizes && tosize > to->symsize()) to->set_symsize(tosize); + if (adjust_dyndef) + { + // We are overriding an UNDEF or WEAK UNDEF with a DYN DEF. + // Remember which kind of UNDEF it was for future reference. + to->set_undef_binding(tobinding); + } } else { if (adjust_common_sizes && sym.get_st_size() > tosize) to->set_symsize(sym.get_st_size()); + if (adjust_dyndef) + { + // We are keeping a DYN DEF after seeing an UNDEF or WEAK UNDEF. + // Remember which kind of UNDEF it was. + to->set_undef_binding(sym.get_st_bind()); + } // The ELF ABI says that even for a reference to a symbol we // merge the visibility. to->override_visibility(sym.get_st_visibility()); @@ -381,9 +396,11 @@ Symbol_table::resolve(Sized_symbol<size>* to, bool Symbol_table::should_override(const Symbol* to, unsigned int frombits, Defined defined, Object* object, - bool* adjust_common_sizes) + bool* adjust_common_sizes, + bool* adjust_dyndef) { *adjust_common_sizes = false; + *adjust_dyndef = false; unsigned int tobits; if (to->source() == Symbol::IS_UNDEFINED) @@ -531,12 +548,17 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits, return false; case UNDEF * 16 + DYN_DEF: - case WEAK_UNDEF * 16 + DYN_DEF: case DYN_UNDEF * 16 + DYN_DEF: case DYN_WEAK_UNDEF * 16 + DYN_DEF: // Use a dynamic definition if we have a reference. return true; + case WEAK_UNDEF * 16 + DYN_DEF: + // When overriding a weak undef by a dynamic definition, + // we need to remember that the original undef was weak. + *adjust_dyndef = true; + return true; + case COMMON * 16 + DYN_DEF: case WEAK_COMMON * 16 + DYN_DEF: case DYN_COMMON * 16 + DYN_DEF: @@ -554,12 +576,22 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits, return false; case UNDEF * 16 + DYN_WEAK_DEF: - case WEAK_UNDEF * 16 + DYN_WEAK_DEF: + // When overriding an undef by a dynamic weak definition, + // we need to remember that the original undef was not weak. + *adjust_dyndef = true; + return true; + case DYN_UNDEF * 16 + DYN_WEAK_DEF: case DYN_WEAK_UNDEF * 16 + DYN_WEAK_DEF: // Use a weak dynamic definition if we have a reference. return true; + case WEAK_UNDEF * 16 + DYN_WEAK_DEF: + // When overriding a weak undef by a dynamic definition, + // we need to remember that the original undef was weak. + *adjust_dyndef = true; + return true; + case COMMON * 16 + DYN_WEAK_DEF: case WEAK_COMMON * 16 + DYN_WEAK_DEF: case DYN_COMMON * 16 + DYN_WEAK_DEF: @@ -570,12 +602,16 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits, case DEF * 16 + UNDEF: case WEAK_DEF * 16 + UNDEF: - case DYN_DEF * 16 + UNDEF: - case DYN_WEAK_DEF * 16 + UNDEF: case UNDEF * 16 + UNDEF: // A new undefined reference tells us nothing. return false; + case DYN_DEF * 16 + UNDEF: + case DYN_WEAK_DEF * 16 + UNDEF: + // For a dynamic def, we need to remember which kind of undef we see. + *adjust_dyndef = true; + return false; + case WEAK_UNDEF * 16 + UNDEF: case DYN_UNDEF * 16 + UNDEF: case DYN_WEAK_UNDEF * 16 + UNDEF: @@ -591,17 +627,28 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits, case DEF * 16 + WEAK_UNDEF: case WEAK_DEF * 16 + WEAK_UNDEF: - case DYN_DEF * 16 + WEAK_UNDEF: - case DYN_WEAK_DEF * 16 + WEAK_UNDEF: case UNDEF * 16 + WEAK_UNDEF: case WEAK_UNDEF * 16 + WEAK_UNDEF: case DYN_UNDEF * 16 + WEAK_UNDEF: - case DYN_WEAK_UNDEF * 16 + WEAK_UNDEF: case COMMON * 16 + WEAK_UNDEF: case WEAK_COMMON * 16 + WEAK_UNDEF: case DYN_COMMON * 16 + WEAK_UNDEF: case DYN_WEAK_COMMON * 16 + WEAK_UNDEF: - // A new weak undefined reference tells us nothing. + // A new weak undefined reference tells us nothing unless the + // exisiting symbol is a dynamic weak reference. + return false; + + case DYN_WEAK_UNDEF * 16 + WEAK_UNDEF: + // A new weak reference overrides an existing dynamic weak reference. + // This is necessary because a dynamic weak reference remembers + // the old binding, which may not be weak. If we keeps the existing + // dynamic weak reference, the weakness may be dropped in the output. + return true; + + case DYN_DEF * 16 + WEAK_UNDEF: + case DYN_WEAK_DEF * 16 + WEAK_UNDEF: + // For a dynamic def, we need to remember which kind of undef we see. + *adjust_dyndef = true; return false; case DEF * 16 + DYN_UNDEF: @@ -811,10 +858,12 @@ bool Symbol_table::should_override_with_special(const Symbol* to, Defined defined) { bool adjust_common_sizes; + bool adjust_dyn_def; unsigned int frombits = global_flag | regular_flag | def_flag; bool ret = Symbol_table::should_override(to, frombits, defined, NULL, - &adjust_common_sizes); - gold_assert(!adjust_common_sizes); + &adjust_common_sizes, + &adjust_dyn_def); + gold_assert(!adjust_common_sizes && !adjust_dyn_def); return ret; } diff --git a/binutils-2.19/gold/sparc.cc b/binutils-2.19/gold/sparc.cc index 5355c7b..a22f64f 100644 --- a/binutils-2.19/gold/sparc.cc +++ b/binutils-2.19/gold/sparc.cc @@ -2331,7 +2331,8 @@ Target_sparc<size, big_endian>::gc_process_relocs( typedef Target_sparc<size, big_endian> Sparc; typedef typename Target_sparc<size, big_endian>::Scan Scan; - gold::gc_process_relocs<size, big_endian, Sparc, elfcpp::SHT_RELA, Scan>( + gold::gc_process_relocs<size, big_endian, Sparc, elfcpp::SHT_RELA, Scan, + Relocatable_size_for_reloc>( symtab, layout, this, diff --git a/binutils-2.19/gold/symtab.cc b/binutils-2.19/gold/symtab.cc index 416a07c..72cd398 100644 --- a/binutils-2.19/gold/symtab.cc +++ b/binutils-2.19/gold/symtab.cc @@ -76,6 +76,8 @@ Symbol::init_fields(const char* name, const char* version, this->is_ordinary_shndx_ = false; this->in_real_elf_ = false; this->is_defined_in_discarded_section_ = false; + this->undef_binding_set_ = false; + this->undef_binding_weak_ = false; } // Return the demangled version of the symbol's name, but only @@ -2697,6 +2699,7 @@ Symbol_table::sized_write_globals(const Stringpool* sympool, unsigned int shndx; typename elfcpp::Elf_types<size>::Elf_Addr sym_value = sym->value(); typename elfcpp::Elf_types<size>::Elf_Addr dynsym_value = sym_value; + elfcpp::STB binding = sym->binding(); switch (sym->source()) { case Symbol::FROM_OBJECT: @@ -2720,6 +2723,10 @@ Symbol_table::sized_write_globals(const Stringpool* sympool, if (sym->needs_dynsym_value()) dynsym_value = target.dynsym_value(sym); shndx = elfcpp::SHN_UNDEF; + if (sym->is_undef_binding_weak()) + binding = elfcpp::STB_WEAK; + else + binding = elfcpp::STB_GLOBAL; } else if (symobj->pluginobj() != NULL) shndx = elfcpp::SHN_UNDEF; @@ -2800,7 +2807,7 @@ Symbol_table::sized_write_globals(const Stringpool* sympool, gold_assert(sym_index < output_count); unsigned char* ps = psyms + (sym_index * sym_size); this->sized_write_symbol<size, big_endian>(sym, sym_value, shndx, - sympool, ps); + binding, sympool, ps); } if (dynsym_index != -1U) @@ -2809,7 +2816,7 @@ Symbol_table::sized_write_globals(const Stringpool* sympool, gold_assert(dynsym_index < dynamic_count); unsigned char* pd = dynamic_view + (dynsym_index * sym_size); this->sized_write_symbol<size, big_endian>(sym, dynsym_value, shndx, - dynpool, pd); + binding, dynpool, pd); } } @@ -2827,6 +2834,7 @@ Symbol_table::sized_write_symbol( Sized_symbol<size>* sym, typename elfcpp::Elf_types<size>::Elf_Addr value, unsigned int shndx, + elfcpp::STB binding, const Stringpool* pool, unsigned char* p) const { @@ -2847,7 +2855,7 @@ Symbol_table::sized_write_symbol( if (sym->is_forced_local()) osym.put_st_info(elfcpp::elf_st_info(elfcpp::STB_LOCAL, type)); else - osym.put_st_info(elfcpp::elf_st_info(sym->binding(), type)); + osym.put_st_info(elfcpp::elf_st_info(binding, type)); osym.put_st_other(elfcpp::elf_st_other(sym->visibility(), sym->nonvis())); osym.put_st_shndx(shndx); } diff --git a/binutils-2.19/gold/symtab.h b/binutils-2.19/gold/symtab.h index 4a97461..c420949 100644 --- a/binutils-2.19/gold/symtab.h +++ b/binutils-2.19/gold/symtab.h @@ -227,6 +227,23 @@ class Symbol void override_visibility(elfcpp::STV); + // Set whether the symbol was originally a weak undef or a regular undef + // when resolved by a dynamic def. + inline void + set_undef_binding(elfcpp::STB bind) + { + if (!this->undef_binding_set_ || this->undef_binding_weak_) + { + this->undef_binding_weak_ = bind == elfcpp::STB_WEAK; + this->undef_binding_set_ = true; + } + } + + // Return TRUE if a weak undef was resolved by a dynamic def. + inline bool + is_undef_binding_weak() const + { return this->undef_binding_weak_; } + // Return the non-visibility part of the st_other field. unsigned char nonvis() const @@ -942,6 +959,11 @@ class Symbol // True if this symbol is defined in a section which was discarded // (bit 31). bool is_defined_in_discarded_section_ : 1; + // True if UNDEF_BINDING_WEAK_ has been set (bit 32). + bool undef_binding_set_ : 1; + // True if this symbol was a weak undef resolved by a dynamic def + // (bit 33). + bool undef_binding_weak_ : 1; }; // The parts of a symbol which are size specific. Using a template @@ -1529,7 +1551,7 @@ class Symbol_table // Whether we should override a symbol, based on flags in // resolve.cc. static bool - should_override(const Symbol*, unsigned int, Defined, Object*, bool*); + should_override(const Symbol*, unsigned int, Defined, Object*, bool*, bool*); // Report a problem in symbol resolution. static void @@ -1660,7 +1682,7 @@ class Symbol_table void sized_write_symbol(Sized_symbol<size>*, typename elfcpp::Elf_types<size>::Elf_Addr value, - unsigned int shndx, + unsigned int shndx, elfcpp::STB, const Stringpool*, unsigned char* p) const; // Possibly warn about an undefined symbol from a dynamic object. diff --git a/binutils-2.19/gold/testsuite/Makefile.am b/binutils-2.19/gold/testsuite/Makefile.am index 764ec26..0d15853 100644 --- a/binutils-2.19/gold/testsuite/Makefile.am +++ b/binutils-2.19/gold/testsuite/Makefile.am @@ -220,6 +220,18 @@ icf_string_merge_test: icf_string_merge_test.o gcctestdir/ld icf_string_merge_test.stdout: icf_string_merge_test $(TEST_NM) icf_string_merge_test > icf_string_merge_test.stdout +check_SCRIPTS += icf_sht_rel_addend_test.sh +check_DATA += icf_sht_rel_addend_test.stdout +MOSTLYCLEANFILES += icf_sht_rel_addend_test +icf_sht_rel_addend_test_1.o: icf_sht_rel_addend_test_1.cc + $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $< +icf_sht_rel_addend_test_2.o: icf_sht_rel_addend_test_2.cc + $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $< +icf_sht_rel_addend_test: icf_sht_rel_addend_test_1.o icf_sht_rel_addend_test_2.o gcctestdir/ld + $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_sht_rel_addend_test_1.o icf_sht_rel_addend_test_2.o +icf_sht_rel_addend_test.stdout: icf_sht_rel_addend_test + $(TEST_NM) icf_sht_rel_addend_test > icf_sht_rel_addend_test.stdout + check_PROGRAMS += basic_test check_PROGRAMS += basic_static_test check_PROGRAMS += basic_pic_test @@ -1416,6 +1428,43 @@ no_version_test.o: no_version_test.c no_version_test.stdout: libno_version_test.so $(TEST_OBJDUMP) -h $< > $@ +# Test that strong reference to a weak symbol in a DSO remains strong. +check_SCRIPTS += strong_ref_weak_def.sh +check_DATA += strong_ref_weak_def.stdout +MOSTLYCLEANFILES += strong_ref_weak_def_1.so strong_ref_weak_def_2.so \ + strong_ref_weak_def.stdout +strong_ref_weak_def_2.o: strong_ref_weak_def_2.c + $(COMPILE) -o $@ -c -fPIC $< +strong_ref_weak_def_2.so: strong_ref_weak_def_2.o gcctestdir/ld + gcctestdir/ld -shared -o $@ strong_ref_weak_def_2.o +strong_ref_weak_def_1.o: strong_ref_weak_def_1.c + $(COMPILE) -o $@ -c -fPIC $< +strong_ref_weak_def_1.so: strong_ref_weak_def_1.o strong_ref_weak_def_2.so \ + gcctestdir/ld + gcctestdir/ld -shared -o $@ strong_ref_weak_def_1.o \ + strong_ref_weak_def_2.so +strong_ref_weak_def.stdout: strong_ref_weak_def_1.so + $(TEST_READELF) -sWD $< > $@ + +# Test that a strong weak reference remains strong if there is another +# weak reference in a DSO. +check_SCRIPTS += dyn_weak_ref.sh +check_DATA += dyn_weak_ref.stdout +MOSTLYCLEANFILES += dyn_weak_ref_1.so dyn_weak_ref_2.so \ + dyn_weak_ref.stdout +dyn_weak_ref_2.o: dyn_weak_ref_2.c + $(COMPILE) -o $@ -c -fPIC $< +dyn_weak_ref_2.so: dyn_weak_ref_2.o gcctestdir/ld + gcctestdir/ld -shared -o $@ dyn_weak_ref_2.o +dyn_weak_ref_1.o: dyn_weak_ref_1.c + $(COMPILE) -o $@ -c -fPIC $< +# We intentionally put dyn_weak_ref_2.so in front of dyn_weak_ref_1.o +# so that the weak ref there goes to gold's symbol table first. +dyn_weak_ref_1.so: dyn_weak_ref_1.o dyn_weak_ref_2.so gcctestdir/ld + gcctestdir/ld -shared -o $@ dyn_weak_ref_2.so dyn_weak_ref_1.o +dyn_weak_ref.stdout: dyn_weak_ref_1.so + $(TEST_READELF) -sWD $< > $@ + endif GCC endif NATIVE_LINKER @@ -1512,12 +1561,13 @@ arm_abs_global.stdout: arm_abs_global MOSTLYCLEANFILES += arm_abs_global -check_SCRIPTS += arm_branch_in_range.sh +check_SCRIPTS += arm_branch_in_range.sh arm_branch_out_of_range.sh check_DATA += arm_bl_in_range.stdout arm_bl_out_of_range.stdout \ thumb_bl_in_range.stdout thumb_bl_out_of_range.stdout \ thumb2_bl_in_range.stdout thumb2_bl_out_of_range.stdout \ thumb_blx_in_range.stdout thumb_blx_out_of_range.stdout \ - thumb2_blx_in_range.stdout thumb2_blx_out_of_range.stdout + thumb2_blx_in_range.stdout thumb2_blx_out_of_range.stdout \ + thumb_bl_out_of_range_local.stdout arm_bl_in_range.stdout: arm_bl_in_range $(TEST_OBJDUMP) -D $< > $@ @@ -1609,10 +1659,19 @@ thumb2_blx_out_of_range: thumb2_blx_out_of_range.o ../ld-new thumb2_blx_out_of_range.o: thumb_blx_out_of_range.s $(TEST_AS) -o $@ -march=armv7-a $< +thumb_bl_out_of_range_local.stdout: thumb_bl_out_of_range_local + $(TEST_OBJDUMP) -D $< > $@ + +thumb_bl_out_of_range_local: thumb_bl_out_of_range_local.o ../ld-new + ../ld-new -T $(srcdir)/thumb_branch_range.t -o $@ $< + +thumb_bl_out_of_range_local.o: thumb_bl_out_of_range_local.s + $(TEST_AS) -o $@ -march=armv5te $< + MOSTLYCLEANFILES += arm_bl_in_range arm_bl_out_of_range thumb_bl_in_range \ thumb_bl_out_of_range thumb2_bl_in_range thumb2_bl_out_of_range \ thumb_blx_in_range thumb_blx_out_of_range thumb2_blx_in_range \ - thumb2_blx_out_of_range + thumb2_blx_out_of_range thumb_bl_out_of_range_local check_SCRIPTS += arm_fix_v4bx.sh check_DATA += arm_fix_v4bx.stdout arm_fix_v4bx_interworking.stdout \ @@ -1641,4 +1700,68 @@ arm_no_fix_v4bx: arm_fix_v4bx.o ../ld-new MOSTLYCLEANFILES += arm_fix_v4bx arm_fix_v4bx_interworking arm_no_fix_v4bx +# Cortex-A8 workaround test. + +check_SCRIPTS += arm_cortex_a8.sh +check_DATA += arm_cortex_a8_b_cond.stdout arm_cortex_a8_b.stdout \ + arm_cortex_a8_bl.stdout arm_cortex_a8_blx.stdout \ + arm_cortex_a8_local.stdout arm_cortex_a8_local_reloc.stdout + +arm_cortex_a8_b_cond.stdout: arm_cortex_a8_b_cond + $(TEST_OBJDUMP) -D -j.text $< > $@ + +arm_cortex_a8_b_cond: arm_cortex_a8_b_cond.o ../ld-new + ../ld-new -o $@ $< + +arm_cortex_a8_b_cond.o: arm_cortex_a8_b_cond.s + $(TEST_AS) -o $@ $< + +arm_cortex_a8_b.stdout: arm_cortex_a8_b + $(TEST_OBJDUMP) -D -j.text $< > $@ + +arm_cortex_a8_b: arm_cortex_a8_b.o ../ld-new + ../ld-new --fix-cortex-a8 -o $@ $< + +arm_cortex_a8_b.o: arm_cortex_a8_b.s + $(TEST_AS) -o $@ $< + +arm_cortex_a8_bl.stdout: arm_cortex_a8_bl + $(TEST_OBJDUMP) -D -j.text $< > $@ + +arm_cortex_a8_bl: arm_cortex_a8_bl.o ../ld-new + ../ld-new -o $@ $< + +arm_cortex_a8_bl.o: arm_cortex_a8_bl.s + $(TEST_AS) -o $@ $< + +arm_cortex_a8_blx.stdout: arm_cortex_a8_blx + $(TEST_OBJDUMP) -D -j.text $< > $@ + +arm_cortex_a8_blx: arm_cortex_a8_blx.o ../ld-new + ../ld-new -o $@ $< + +arm_cortex_a8_blx.o: arm_cortex_a8_blx.s + $(TEST_AS) -o $@ $< + +arm_cortex_a8_local.stdout: arm_cortex_a8_local + $(TEST_OBJDUMP) -D -j.text $< > $@ + +arm_cortex_a8_local: arm_cortex_a8_local.o ../ld-new + ../ld-new -o $@ $< + +arm_cortex_a8_local.o: arm_cortex_a8_local.s + $(TEST_AS) -o $@ $< + +arm_cortex_a8_local_reloc.stdout: arm_cortex_a8_local_reloc + $(TEST_OBJDUMP) -D -j.text $< > $@ + +arm_cortex_a8_local_reloc: arm_cortex_a8_local_reloc.o ../ld-new + ../ld-new -o $@ $< + +arm_cortex_a8_local_reloc.o: arm_cortex_a8_local_reloc.s + $(TEST_AS) -o $@ $< + +MOSTLYCLEANFILES += arm_cortex_a8_b_cond arm_cortex_a8_b arm_cortex_a8_bl \ + arm_cortex_a8_blx arm_cortex_a8_local arm_cortex_a8_local_reloc + endif DEFAULT_TARGET_ARM diff --git a/binutils-2.19/gold/testsuite/Makefile.in b/binutils-2.19/gold/testsuite/Makefile.in index bc92bb4..4e101b4 100644 --- a/binutils-2.19/gold/testsuite/Makefile.in +++ b/binutils-2.19/gold/testsuite/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -64,6 +64,7 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_safe_so_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test.sh \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared.sh weak_plt.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg.sh undef_symbol.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_1.sh ver_test_2.sh \ @@ -95,6 +96,7 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_safe_so_test_2.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test.stdout \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared.dbg \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_plt_shared.so debug_msg.err \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_so.err \ @@ -119,6 +121,7 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_virtual_function_folding_test \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_preemptible_functions_test \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared.dbg \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/weak_undef_lib.so @GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_4 = icf_virtual_function_folding_test \ @@ -277,18 +280,27 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ # Test that no .gnu.version sections are created when # symbol versioning is not used. + +# Test that strong reference to a weak symbol in a DSO remains strong. + +# Test that a strong weak reference remains strong if there is another +# weak reference in a DSO. @GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_27 = exclude_libs_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ hidden_test.sh \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ retain_symbols_file_test.sh \ -@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.sh +@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.sh \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.sh \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.sh @GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_28 = exclude_libs_test.syms \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.syms \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test1.syms \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test2.syms \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ hidden_test.err \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ retain_symbols_file_test.stdout \ -@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.stdout +@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.stdout @GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_29 = exclude_libs_test.syms \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_1.a \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_2.a \ @@ -306,7 +318,13 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ searched_file_test_lib.o \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/searched_file_test_lib.a \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ libno_version_test.so \ -@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.stdout +@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def_1.so \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def_2.so \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.stdout \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref_1.so \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref_2.so \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.stdout @GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__append_30 = large @GCC_FALSE@large_DEPENDENCIES = @MCMODEL_MEDIUM_FALSE@large_DEPENDENCIES = @@ -336,9 +354,12 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @DEFAULT_TARGET_X86_64_TRUE@am__append_37 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \ @DEFAULT_TARGET_X86_64_TRUE@ split_x86_64_4 split_x86_64_r + +# Cortex-A8 workaround test. @DEFAULT_TARGET_ARM_TRUE@am__append_38 = arm_abs_global.sh \ @DEFAULT_TARGET_ARM_TRUE@ arm_branch_in_range.sh \ -@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx.sh +@DEFAULT_TARGET_ARM_TRUE@ arm_branch_out_of_range.sh \ +@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx.sh arm_cortex_a8.sh @DEFAULT_TARGET_ARM_TRUE@am__append_39 = arm_abs_global.stdout \ @DEFAULT_TARGET_ARM_TRUE@ arm_bl_in_range.stdout \ @DEFAULT_TARGET_ARM_TRUE@ arm_bl_out_of_range.stdout \ @@ -350,9 +371,16 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @DEFAULT_TARGET_ARM_TRUE@ thumb_blx_out_of_range.stdout \ @DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_in_range.stdout \ @DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_out_of_range.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ thumb_bl_out_of_range_local.stdout \ @DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx.stdout \ @DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx_interworking.stdout \ -@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx.stdout +@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_b_cond.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_b.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_bl.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_blx.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_local.stdout \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_local_reloc.stdout @DEFAULT_TARGET_ARM_TRUE@am__append_40 = arm_abs_global \ @DEFAULT_TARGET_ARM_TRUE@ arm_bl_in_range arm_bl_out_of_range \ @DEFAULT_TARGET_ARM_TRUE@ thumb_bl_in_range \ @@ -362,11 +390,16 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \ @DEFAULT_TARGET_ARM_TRUE@ thumb_blx_in_range \ @DEFAULT_TARGET_ARM_TRUE@ thumb_blx_out_of_range \ @DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_in_range \ -@DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_out_of_range arm_fix_v4bx \ +@DEFAULT_TARGET_ARM_TRUE@ thumb2_blx_out_of_range \ +@DEFAULT_TARGET_ARM_TRUE@ thumb_bl_out_of_range_local \ +@DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx \ @DEFAULT_TARGET_ARM_TRUE@ arm_fix_v4bx_interworking \ -@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx +@DEFAULT_TARGET_ARM_TRUE@ arm_no_fix_v4bx arm_cortex_a8_b_cond \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_b arm_cortex_a8_bl \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_blx arm_cortex_a8_local \ +@DEFAULT_TARGET_ARM_TRUE@ arm_cortex_a8_local_reloc subdir = testsuite -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/gettext-sister.m4 \ @@ -515,7 +548,6 @@ basic_test_LDADD = $(LDADD) basic_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__binary_test_SOURCES_DIST = binary_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_binary_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test.$(OBJEXT) binary_test_OBJECTS = $(am_binary_test_OBJECTS) @@ -527,19 +559,16 @@ binary_unittest_LDADD = $(LDADD) binary_unittest_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__common_test_1_SOURCES_DIST = common_test_1.c @GCC_TRUE@@NATIVE_LINKER_TRUE@am_common_test_1_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ common_test_1.$(OBJEXT) common_test_1_OBJECTS = $(am_common_test_1_OBJECTS) common_test_1_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(common_test_1_LDFLAGS) $(LDFLAGS) -o $@ -am__common_test_2_SOURCES_DIST = common_test_1.c @GCC_TRUE@@NATIVE_LINKER_TRUE@am_common_test_2_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ common_test_1.$(OBJEXT) common_test_2_OBJECTS = $(am_common_test_2_OBJECTS) common_test_2_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(common_test_2_LDFLAGS) $(LDFLAGS) -o $@ -am__constructor_static_test_SOURCES_DIST = constructor_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am__objects_1 = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test.$(OBJEXT) @GCC_TRUE@@NATIVE_LINKER_TRUE@am_constructor_static_test_OBJECTS = \ @@ -548,19 +577,16 @@ constructor_static_test_OBJECTS = \ $(am_constructor_static_test_OBJECTS) constructor_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(constructor_static_test_LDFLAGS) $(LDFLAGS) -o $@ -am__constructor_test_SOURCES_DIST = constructor_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_constructor_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test.$(OBJEXT) constructor_test_OBJECTS = $(am_constructor_test_OBJECTS) constructor_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(constructor_test_LDFLAGS) $(LDFLAGS) -o $@ -am__copy_test_SOURCES_DIST = copy_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_copy_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ copy_test.$(OBJEXT) copy_test_OBJECTS = $(am_copy_test_OBJECTS) copy_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(copy_test_LDFLAGS) $(LDFLAGS) -o $@ -am__discard_locals_test_SOURCES_DIST = discard_locals_test.c @GCC_TRUE@@NATIVE_LINKER_TRUE@am_discard_locals_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.$(OBJEXT) discard_locals_test_OBJECTS = $(am_discard_locals_test_OBJECTS) @@ -570,15 +596,12 @@ discard_locals_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) discard_locals_test_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(discard_locals_test_LDFLAGS) $(LDFLAGS) -o $@ -am__exception_same_shared_test_SOURCES_DIST = exception_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_same_shared_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) exception_same_shared_test_OBJECTS = \ $(am_exception_same_shared_test_OBJECTS) exception_same_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(exception_same_shared_test_LDFLAGS) $(LDFLAGS) -o $@ -am__exception_separate_shared_12_test_SOURCES_DIST = \ - exception_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_separate_shared_12_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) exception_separate_shared_12_test_OBJECTS = \ @@ -586,8 +609,6 @@ exception_separate_shared_12_test_OBJECTS = \ exception_separate_shared_12_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(exception_separate_shared_12_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__exception_separate_shared_21_test_SOURCES_DIST = \ - exception_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_separate_shared_21_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) exception_separate_shared_21_test_OBJECTS = \ @@ -595,8 +616,6 @@ exception_separate_shared_21_test_OBJECTS = \ exception_separate_shared_21_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(exception_separate_shared_21_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__exception_shared_1_test_SOURCES_DIST = exception_test_2.cc \ - exception_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_shared_1_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_2.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) @@ -604,8 +623,6 @@ exception_shared_1_test_OBJECTS = \ $(am_exception_shared_1_test_OBJECTS) exception_shared_1_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(exception_shared_1_test_LDFLAGS) $(LDFLAGS) -o $@ -am__exception_shared_2_test_SOURCES_DIST = exception_test_1.cc \ - exception_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_shared_2_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_1.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) @@ -613,8 +630,6 @@ exception_shared_2_test_OBJECTS = \ $(am_exception_shared_2_test_OBJECTS) exception_shared_2_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(exception_shared_2_test_LDFLAGS) $(LDFLAGS) -o $@ -am__exception_static_test_SOURCES_DIST = exception_test_main.cc \ - exception_test_1.cc exception_test_2.cc exception_test.h @GCC_TRUE@@NATIVE_LINKER_TRUE@am__objects_2 = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_1.$(OBJEXT) \ @@ -624,8 +639,6 @@ am__exception_static_test_SOURCES_DIST = exception_test_main.cc \ exception_static_test_OBJECTS = $(am_exception_static_test_OBJECTS) exception_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(exception_static_test_LDFLAGS) $(LDFLAGS) -o $@ -am__exception_test_SOURCES_DIST = exception_test_main.cc \ - exception_test_1.cc exception_test_2.cc exception_test.h @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_1.$(OBJEXT) \ @@ -633,7 +646,6 @@ am__exception_test_SOURCES_DIST = exception_test_main.cc \ exception_test_OBJECTS = $(am_exception_test_OBJECTS) exception_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(exception_test_LDFLAGS) $(LDFLAGS) -o $@ -am__exclude_libs_test_SOURCES_DIST = exclude_libs_test.c @GCC_TRUE@@NATIVE_LINKER_TRUE@am_exclude_libs_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ exclude_libs_test.$(OBJEXT) exclude_libs_test_OBJECTS = $(am_exclude_libs_test_OBJECTS) @@ -670,18 +682,15 @@ icf_virtual_function_folding_test_LDADD = $(LDADD) icf_virtual_function_folding_test_DEPENDENCIES = libgoldtest.a \ ../libgold.a ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__initpri1_SOURCES_DIST = initpri1.c @CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri1_OBJECTS = initpri1.$(OBJEXT) initpri1_OBJECTS = $(am_initpri1_OBJECTS) initpri1_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(initpri1_LDFLAGS) \ $(LDFLAGS) -o $@ -am__justsyms_SOURCES_DIST = justsyms_1.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_justsyms_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_1.$(OBJEXT) justsyms_OBJECTS = $(am_justsyms_OBJECTS) justsyms_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(justsyms_LDFLAGS) $(LDFLAGS) -o $@ -am__large_SOURCES_DIST = large.c @GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am_large_OBJECTS = large-large.$(OBJEXT) large_OBJECTS = $(am_large_OBJECTS) large_LINK = $(CCLD) $(large_CFLAGS) $(CFLAGS) $(large_LDFLAGS) \ @@ -698,7 +707,6 @@ many_sections_r_test_LDADD = $(LDADD) many_sections_r_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__many_sections_test_SOURCES_DIST = many_sections_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_many_sections_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_test.$(OBJEXT) many_sections_test_OBJECTS = $(am_many_sections_test_OBJECTS) @@ -746,8 +754,6 @@ plugin_test_5_LDADD = $(LDADD) plugin_test_5_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__protected_1_SOURCES_DIST = protected_main_1.cc protected_main_2.cc \ - protected_main_3.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_protected_1_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_main_1.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_main_2.$(OBJEXT) \ @@ -755,33 +761,27 @@ am__protected_1_SOURCES_DIST = protected_main_1.cc protected_main_2.cc \ protected_1_OBJECTS = $(am_protected_1_OBJECTS) protected_1_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(protected_1_LDFLAGS) $(LDFLAGS) -o $@ -am__protected_2_SOURCES_DIST = protected_main_1.cc protected_3.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_protected_2_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_main_1.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_3.$(OBJEXT) protected_2_OBJECTS = $(am_protected_2_OBJECTS) protected_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(protected_2_LDFLAGS) $(LDFLAGS) -o $@ -am__relro_script_test_SOURCES_DIST = relro_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_relro_script_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test_main.$(OBJEXT) relro_script_test_OBJECTS = $(am_relro_script_test_OBJECTS) relro_script_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(relro_script_test_LDFLAGS) $(LDFLAGS) -o $@ -am__relro_test_SOURCES_DIST = relro_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_relro_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test_main.$(OBJEXT) relro_test_OBJECTS = $(am_relro_test_OBJECTS) relro_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(relro_test_LDFLAGS) $(LDFLAGS) -o $@ -am__script_test_1_SOURCES_DIST = script_test_1.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_script_test_1_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_1.$(OBJEXT) script_test_1_OBJECTS = $(am_script_test_1_OBJECTS) script_test_1_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(script_test_1_LDFLAGS) $(LDFLAGS) -o $@ -am__script_test_2_SOURCES_DIST = script_test_2.cc script_test_2a.cc \ - script_test_2b.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_script_test_2_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2a.$(OBJEXT) \ @@ -795,25 +795,21 @@ script_test_3_LDADD = $(LDADD) script_test_3_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__searched_file_test_SOURCES_DIST = searched_file_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_searched_file_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ searched_file_test.$(OBJEXT) searched_file_test_OBJECTS = $(am_searched_file_test_OBJECTS) searched_file_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(searched_file_test_LDFLAGS) $(LDFLAGS) -o $@ -am__thin_archive_test_1_SOURCES_DIST = thin_archive_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_thin_archive_test_1_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_main.$(OBJEXT) thin_archive_test_1_OBJECTS = $(am_thin_archive_test_1_OBJECTS) thin_archive_test_1_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(thin_archive_test_1_LDFLAGS) $(LDFLAGS) -o $@ -am__thin_archive_test_2_SOURCES_DIST = thin_archive_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_thin_archive_test_2_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_main.$(OBJEXT) thin_archive_test_2_OBJECTS = $(am_thin_archive_test_2_OBJECTS) thin_archive_test_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(thin_archive_test_2_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_pic_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_pic_test_OBJECTS = tls_test_main.$(OBJEXT) tls_pic_test_OBJECTS = $(am_tls_pic_test_OBJECTS) tls_pic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ @@ -830,40 +826,33 @@ tls_pie_test_LDADD = $(LDADD) tls_pie_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__tls_shared_gd_to_ie_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_shared_gd_to_ie_test_OBJECTS = tls_test_main.$(OBJEXT) tls_shared_gd_to_ie_test_OBJECTS = \ $(am_tls_shared_gd_to_ie_test_OBJECTS) tls_shared_gd_to_ie_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_shared_gd_to_ie_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_shared_gnu2_gd_to_ie_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am_tls_shared_gnu2_gd_to_ie_test_OBJECTS = tls_test_main.$(OBJEXT) tls_shared_gnu2_gd_to_ie_test_OBJECTS = \ $(am_tls_shared_gnu2_gd_to_ie_test_OBJECTS) tls_shared_gnu2_gd_to_ie_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(tls_shared_gnu2_gd_to_ie_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__tls_shared_gnu2_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am_tls_shared_gnu2_test_OBJECTS = tls_test_main.$(OBJEXT) tls_shared_gnu2_test_OBJECTS = $(am_tls_shared_gnu2_test_OBJECTS) tls_shared_gnu2_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_shared_gnu2_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_shared_ie_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_shared_ie_test_OBJECTS = tls_test_main.$(OBJEXT) tls_shared_ie_test_OBJECTS = $(am_tls_shared_ie_test_OBJECTS) tls_shared_ie_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_shared_ie_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_shared_nonpic_test_SOURCES_DIST = tls_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_shared_nonpic_test_OBJECTS = tls_test_main.$(OBJEXT) tls_shared_nonpic_test_OBJECTS = $(am_tls_shared_nonpic_test_OBJECTS) tls_shared_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_shared_nonpic_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_shared_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_shared_test_OBJECTS = tls_test_main.$(OBJEXT) tls_shared_test_OBJECTS = $(am_tls_shared_test_OBJECTS) tls_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_shared_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_static_pic_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_3 = tls_test_main.$(OBJEXT) @GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_pic_test_OBJECTS = $(am__objects_3) tls_static_pic_test_OBJECTS = $(am_tls_static_pic_test_OBJECTS) @@ -873,8 +862,6 @@ tls_static_pic_test_OBJECTS = $(am_tls_static_pic_test_OBJECTS) @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_c_pic.o tls_static_pic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_static_pic_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_static_test_SOURCES_DIST = tls_test.cc tls_test_file2.cc \ - tls_test_main.cc tls_test.h @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_4 = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_file2.$(OBJEXT) \ @@ -885,8 +872,6 @@ tls_static_test_OBJECTS = $(am_tls_static_test_OBJECTS) @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_c.o tls_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_static_test_LDFLAGS) $(LDFLAGS) -o $@ -am__tls_test_SOURCES_DIST = tls_test.cc tls_test_file2.cc \ - tls_test_main.cc tls_test.h @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_file2.$(OBJEXT) \ @@ -894,20 +879,17 @@ am__tls_test_SOURCES_DIST = tls_test.cc tls_test_file2.cc \ tls_test_OBJECTS = $(am_tls_test_OBJECTS) tls_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(tls_test_LDFLAGS) $(LDFLAGS) -o $@ -am__two_file_mixed_2_shared_test_SOURCES_DIST = two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_mixed_2_shared_test_OBJECTS = two_file_test_main.$(OBJEXT) two_file_mixed_2_shared_test_OBJECTS = \ $(am_two_file_mixed_2_shared_test_OBJECTS) two_file_mixed_2_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_mixed_2_shared_test_LDFLAGS) $(LDFLAGS) \ -o $@ -am__two_file_mixed_shared_test_SOURCES_DIST = two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_mixed_shared_test_OBJECTS = two_file_test_main.$(OBJEXT) two_file_mixed_shared_test_OBJECTS = \ $(am_two_file_mixed_shared_test_OBJECTS) two_file_mixed_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(two_file_mixed_shared_test_LDFLAGS) $(LDFLAGS) -o $@ -am__two_file_pic_test_SOURCES_DIST = two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_pic_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_pic_test_OBJECTS = $(am_two_file_pic_test_OBJECTS) @@ -919,23 +901,18 @@ two_file_pie_test_LDADD = $(LDADD) two_file_pie_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__two_file_relocatable_test_SOURCES_DIST = two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_relocatable_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_relocatable_test_OBJECTS = \ $(am_two_file_relocatable_test_OBJECTS) two_file_relocatable_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(two_file_relocatable_test_LDFLAGS) $(LDFLAGS) -o $@ -am__two_file_same_shared_nonpic_test_SOURCES_DIST = \ - two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_same_shared_nonpic_test_OBJECTS = two_file_test_main.$(OBJEXT) two_file_same_shared_nonpic_test_OBJECTS = \ $(am_two_file_same_shared_nonpic_test_OBJECTS) two_file_same_shared_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_same_shared_nonpic_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_same_shared_strip_test_SOURCES_DIST = \ - two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_same_shared_strip_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_same_shared_strip_test_OBJECTS = \ @@ -943,23 +920,18 @@ two_file_same_shared_strip_test_OBJECTS = \ two_file_same_shared_strip_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_same_shared_strip_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_same_shared_test_SOURCES_DIST = two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_same_shared_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_same_shared_test_OBJECTS = \ $(am_two_file_same_shared_test_OBJECTS) two_file_same_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(two_file_same_shared_test_LDFLAGS) $(LDFLAGS) -o $@ -am__two_file_separate_shared_12_nonpic_test_SOURCES_DIST = \ - two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_12_nonpic_test_OBJECTS = two_file_test_main.$(OBJEXT) two_file_separate_shared_12_nonpic_test_OBJECTS = \ $(am_two_file_separate_shared_12_nonpic_test_OBJECTS) two_file_separate_shared_12_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_separate_shared_12_nonpic_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_separate_shared_12_test_SOURCES_DIST = \ - two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_12_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_separate_shared_12_test_OBJECTS = \ @@ -967,16 +939,12 @@ two_file_separate_shared_12_test_OBJECTS = \ two_file_separate_shared_12_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_separate_shared_12_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_separate_shared_21_nonpic_test_SOURCES_DIST = \ - two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_21_nonpic_test_OBJECTS = two_file_test_main.$(OBJEXT) two_file_separate_shared_21_nonpic_test_OBJECTS = \ $(am_two_file_separate_shared_21_nonpic_test_OBJECTS) two_file_separate_shared_21_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_separate_shared_21_nonpic_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_separate_shared_21_test_SOURCES_DIST = \ - two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_separate_shared_21_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_separate_shared_21_test_OBJECTS = \ @@ -984,8 +952,6 @@ two_file_separate_shared_21_test_OBJECTS = \ two_file_separate_shared_21_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_separate_shared_21_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_shared_1_nonpic_test_SOURCES_DIST = two_file_test_2.cc \ - two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_1_nonpic_test_OBJECTS = two_file_test_2.$(OBJEXT) \ @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_shared_1_nonpic_test_OBJECTS = \ @@ -993,7 +959,6 @@ two_file_shared_1_nonpic_test_OBJECTS = \ two_file_shared_1_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_shared_1_nonpic_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_shared_1_pic_2_test_SOURCES_DIST = two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_1_pic_2_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_shared_1_pic_2_test_OBJECTS = \ @@ -1001,16 +966,12 @@ two_file_shared_1_pic_2_test_OBJECTS = \ two_file_shared_1_pic_2_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_shared_1_pic_2_test_LDFLAGS) $(LDFLAGS) \ -o $@ -am__two_file_shared_1_test_SOURCES_DIST = two_file_test_2.cc \ - two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_1_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_shared_1_test_OBJECTS = $(am_two_file_shared_1_test_OBJECTS) two_file_shared_1_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(two_file_shared_1_test_LDFLAGS) $(LDFLAGS) -o $@ -am__two_file_shared_2_nonpic_test_SOURCES_DIST = two_file_test_1.cc \ - two_file_test_1b.cc two_file_test_main.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_2_nonpic_test_OBJECTS = two_file_test_1.$(OBJEXT) \ @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1b.$(OBJEXT) \ @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) @@ -1019,7 +980,6 @@ two_file_shared_2_nonpic_test_OBJECTS = \ two_file_shared_2_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_shared_2_nonpic_test_LDFLAGS) \ $(LDFLAGS) -o $@ -am__two_file_shared_2_pic_1_test_SOURCES_DIST = two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_2_pic_1_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) two_file_shared_2_pic_1_test_OBJECTS = \ @@ -1027,8 +987,6 @@ two_file_shared_2_pic_1_test_OBJECTS = \ two_file_shared_2_pic_1_test_LINK = $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(two_file_shared_2_pic_1_test_LDFLAGS) $(LDFLAGS) \ -o $@ -am__two_file_shared_2_test_SOURCES_DIST = two_file_test_1.cc \ - two_file_test_1b.cc two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_shared_2_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1b.$(OBJEXT) \ @@ -1036,9 +994,6 @@ am__two_file_shared_2_test_SOURCES_DIST = two_file_test_1.cc \ two_file_shared_2_test_OBJECTS = $(am_two_file_shared_2_test_OBJECTS) two_file_shared_2_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(two_file_shared_2_test_LDFLAGS) $(LDFLAGS) -o $@ -am__two_file_static_test_SOURCES_DIST = two_file_test_1.cc \ - two_file_test_1b.cc two_file_test_2.cc two_file_test_main.cc \ - two_file_test.h @GCC_TRUE@@NATIVE_LINKER_TRUE@am__objects_5 = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1b.$(OBJEXT) \ @@ -1055,9 +1010,6 @@ two_file_strip_test_LDADD = $(LDADD) two_file_strip_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__two_file_test_SOURCES_DIST = two_file_test_1.cc \ - two_file_test_1b.cc two_file_test_2.cc two_file_test_main.cc \ - two_file_test.h @GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.$(OBJEXT) \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1b.$(OBJEXT) \ @@ -1066,43 +1018,36 @@ am__two_file_test_SOURCES_DIST = two_file_test_1.cc \ two_file_test_OBJECTS = $(am_two_file_test_OBJECTS) two_file_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(two_file_test_LDFLAGS) $(LDFLAGS) -o $@ -am__ver_test_SOURCES_DIST = ver_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main.$(OBJEXT) ver_test_OBJECTS = $(am_ver_test_OBJECTS) ver_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ver_test_LDFLAGS) $(LDFLAGS) -o $@ -am__ver_test_11_SOURCES_DIST = ver_test_main_2.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_11_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main_2.$(OBJEXT) ver_test_11_OBJECTS = $(am_ver_test_11_OBJECTS) ver_test_11_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ver_test_11_LDFLAGS) $(LDFLAGS) -o $@ -am__ver_test_2_SOURCES_DIST = ver_test_main_2.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_2_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main_2.$(OBJEXT) ver_test_2_OBJECTS = $(am_ver_test_2_OBJECTS) ver_test_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ver_test_2_LDFLAGS) $(LDFLAGS) -o $@ -am__ver_test_6_SOURCES_DIST = ver_test_6.c @GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_6_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6.$(OBJEXT) ver_test_6_OBJECTS = $(am_ver_test_6_OBJECTS) ver_test_6_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ver_test_6_LDFLAGS) \ $(LDFLAGS) -o $@ -am__ver_test_8_SOURCES_DIST = two_file_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_8_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT) ver_test_8_OBJECTS = $(am_ver_test_8_OBJECTS) ver_test_8_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ver_test_8_LDFLAGS) $(LDFLAGS) -o $@ -am__ver_test_9_SOURCES_DIST = ver_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_9_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main.$(OBJEXT) ver_test_9_OBJECTS = $(am_ver_test_9_OBJECTS) ver_test_9_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ver_test_9_LDFLAGS) $(LDFLAGS) -o $@ -am__weak_alias_test_SOURCES_DIST = weak_alias_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_weak_alias_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_main.$(OBJEXT) weak_alias_test_OBJECTS = $(am_weak_alias_test_OBJECTS) @@ -1114,18 +1059,15 @@ weak_plt_LDADD = $(LDADD) weak_plt_DEPENDENCIES = libgoldtest.a ../libgold.a \ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__weak_test_SOURCES_DIST = weak_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_weak_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_test.$(OBJEXT) weak_test_OBJECTS = $(am_weak_test_OBJECTS) weak_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(weak_test_LDFLAGS) $(LDFLAGS) -o $@ -am__weak_undef_nonpic_test_SOURCES_DIST = weak_undef_test.cc @FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_weak_undef_nonpic_test_OBJECTS = weak_undef_test.$(OBJEXT) weak_undef_nonpic_test_OBJECTS = $(am_weak_undef_nonpic_test_OBJECTS) weak_undef_nonpic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(weak_undef_nonpic_test_LDFLAGS) $(LDFLAGS) -o $@ -am__weak_undef_test_SOURCES_DIST = weak_undef_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@am_weak_undef_test_OBJECTS = \ @GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test.$(OBJEXT) weak_undef_test_OBJECTS = $(am_weak_undef_test_OBJECTS) @@ -1199,81 +1141,80 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \ $(ver_test_9_SOURCES) $(weak_alias_test_SOURCES) weak_plt.c \ $(weak_test_SOURCES) $(weak_undef_nonpic_test_SOURCES) \ $(weak_undef_test_SOURCES) -DIST_SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \ - basic_pie_test.c basic_static_pic_test.c basic_static_test.c \ - basic_test.c $(am__binary_test_SOURCES_DIST) \ - $(binary_unittest_SOURCES) $(am__common_test_1_SOURCES_DIST) \ - $(am__common_test_2_SOURCES_DIST) \ - $(am__constructor_static_test_SOURCES_DIST) \ - $(am__constructor_test_SOURCES_DIST) \ - $(am__copy_test_SOURCES_DIST) \ - $(am__discard_locals_test_SOURCES_DIST) \ - $(am__exception_same_shared_test_SOURCES_DIST) \ - $(am__exception_separate_shared_12_test_SOURCES_DIST) \ - $(am__exception_separate_shared_21_test_SOURCES_DIST) \ - $(am__exception_shared_1_test_SOURCES_DIST) \ - $(am__exception_shared_2_test_SOURCES_DIST) \ - $(am__exception_static_test_SOURCES_DIST) \ - $(am__exception_test_SOURCES_DIST) \ - $(am__exclude_libs_test_SOURCES_DIST) \ - flagstest_compress_debug_sections.c flagstest_o_specialfile.c \ - flagstest_o_specialfile_and_compress_debug_sections.c \ - icf_virtual_function_folding_test.c \ - $(am__initpri1_SOURCES_DIST) $(am__justsyms_SOURCES_DIST) \ - $(am__large_SOURCES_DIST) local_labels_test.c \ - many_sections_r_test.c $(am__many_sections_test_SOURCES_DIST) \ - $(object_unittest_SOURCES) permission_test.c plugin_test_1.c \ - plugin_test_2.c plugin_test_3.c plugin_test_4.c \ - plugin_test_5.c $(am__protected_1_SOURCES_DIST) \ - $(am__protected_2_SOURCES_DIST) \ - $(am__relro_script_test_SOURCES_DIST) \ - $(am__relro_test_SOURCES_DIST) \ - $(am__script_test_1_SOURCES_DIST) \ - $(am__script_test_2_SOURCES_DIST) script_test_3.c \ - $(am__searched_file_test_SOURCES_DIST) \ - $(am__thin_archive_test_1_SOURCES_DIST) \ - $(am__thin_archive_test_2_SOURCES_DIST) \ - $(am__tls_pic_test_SOURCES_DIST) tls_pie_pic_test.c \ - tls_pie_test.c $(am__tls_shared_gd_to_ie_test_SOURCES_DIST) \ - $(am__tls_shared_gnu2_gd_to_ie_test_SOURCES_DIST) \ - $(am__tls_shared_gnu2_test_SOURCES_DIST) \ - $(am__tls_shared_ie_test_SOURCES_DIST) \ - $(am__tls_shared_nonpic_test_SOURCES_DIST) \ - $(am__tls_shared_test_SOURCES_DIST) \ - $(am__tls_static_pic_test_SOURCES_DIST) \ - $(am__tls_static_test_SOURCES_DIST) \ - $(am__tls_test_SOURCES_DIST) \ - $(am__two_file_mixed_2_shared_test_SOURCES_DIST) \ - $(am__two_file_mixed_shared_test_SOURCES_DIST) \ - $(am__two_file_pic_test_SOURCES_DIST) two_file_pie_test.c \ - $(am__two_file_relocatable_test_SOURCES_DIST) \ - $(am__two_file_same_shared_nonpic_test_SOURCES_DIST) \ - $(am__two_file_same_shared_strip_test_SOURCES_DIST) \ - $(am__two_file_same_shared_test_SOURCES_DIST) \ - $(am__two_file_separate_shared_12_nonpic_test_SOURCES_DIST) \ - $(am__two_file_separate_shared_12_test_SOURCES_DIST) \ - $(am__two_file_separate_shared_21_nonpic_test_SOURCES_DIST) \ - $(am__two_file_separate_shared_21_test_SOURCES_DIST) \ - $(am__two_file_shared_1_nonpic_test_SOURCES_DIST) \ - $(am__two_file_shared_1_pic_2_test_SOURCES_DIST) \ - $(am__two_file_shared_1_test_SOURCES_DIST) \ - $(am__two_file_shared_2_nonpic_test_SOURCES_DIST) \ - $(am__two_file_shared_2_pic_1_test_SOURCES_DIST) \ - $(am__two_file_shared_2_test_SOURCES_DIST) \ - $(am__two_file_static_test_SOURCES_DIST) two_file_strip_test.c \ - $(am__two_file_test_SOURCES_DIST) $(am__ver_test_SOURCES_DIST) \ - $(am__ver_test_11_SOURCES_DIST) $(am__ver_test_2_SOURCES_DIST) \ - $(am__ver_test_6_SOURCES_DIST) $(am__ver_test_8_SOURCES_DIST) \ - $(am__ver_test_9_SOURCES_DIST) \ - $(am__weak_alias_test_SOURCES_DIST) weak_plt.c \ - $(am__weak_test_SOURCES_DIST) \ - $(am__weak_undef_nonpic_test_SOURCES_DIST) \ - $(am__weak_undef_test_SOURCES_DIST) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +# Restructured Text title and section. +am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//' +am__rst_section = sed 'p;s/./=/g;p;g' +# Put stdin (possibly several lines separated by ". ") in a box. +am__text_box = $(AWK) '{ \ + n = split($$0, lines, "\\. "); max = 0; \ + for (i = 1; i <= n; ++i) \ + if (max < length(lines[i])) \ + max = length(lines[i]); \ + for (i = 0; i < max; ++i) line = line "="; \ + print line; \ + for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\ + print line; \ +}' +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log, and passes +# TESTS_ENVIRONMENT. Save and restore TERM around use of +# TESTS_ENVIRONMENT, in case that unsets it. +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +srcdir=$(srcdir); export srcdir; \ +rm -f $@-t; \ +trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \ + 1 2 13 15; \ +am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ +test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \ +$(TESTS_ENVIRONMENT) +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check check-html recheck recheck-html +TEST_SUITE_LOG = test-suite.log +TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ @@ -1819,7 +1760,7 @@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .cc .o .obj +.SUFFIXES: .c .cc .html .log .o .obj .test .test$(EXEEXT) $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -2399,128 +2340,440 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done +# To be appended to the command running the test. Handle the stdout +# and stderr redirection, and catch the exit status. +am__check_post = \ +>$@-t 2>&1; \ +estatus=$$?; \ +if test -n '$(DISABLE_HARD_ERRORS)' \ + && test $$estatus -eq 99; then \ + estatus=1; \ +fi; \ +TERM=$$__SAVED_TERM; export TERM; \ +$(am__tty_colors); \ +xfailed=PASS; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + xfailed=XFAIL;; \ +esac; \ +case $$estatus:$$xfailed in \ + 0:XFAIL) col=$$red; res=XPASS;; \ + 0:*) col=$$grn; res=PASS ;; \ + 77:*) col=$$blu; res=SKIP ;; \ + 99:*) col=$$red; res=FAIL ;; \ + *:XFAIL) col=$$lgn; res=XFAIL;; \ + *:*) col=$$red; res=FAIL ;; \ +esac; \ +echo "$${col}$$res$${std}: $$f"; \ +echo "$$res: $$f (exit: $$estatus)" | \ + $(am__rst_section) >$@; \ +cat $@-t >>$@; \ +rm -f $@-t + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__sh_e_setup); \ + list='$(TEST_LOGS)'; \ + results=`for f in $$list; do \ + read line < $$f && echo "$$line" || echo FAIL; \ + done`; \ + all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \ + fail=`echo "$$results" | grep -c '^FAIL'`; \ + pass=`echo "$$results" | grep -c '^PASS'`; \ + skip=`echo "$$results" | grep -c '^SKIP'`; \ + xfail=`echo "$$results" | grep -c '^XFAIL'`; \ + xpass=`echo "$$results" | grep -c '^XPASS'`; \ + failures=`expr $$fail + $$xpass`; \ + all=`expr $$all - $$skip`; \ + if test "$$all" -eq 1; then tests=test; All=; \ + else tests=tests; All="All "; fi; \ + case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \ + fail=0:xpass=0:xfail=0) \ + msg="$$All$$all $$tests passed. "; \ + exit=true;; \ + fail=0:xpass=0:xfail=*) \ + msg="$$All$$all $$tests behaved as expected"; \ + if test "$$xfail" -eq 1; then xfailures=failure; \ + else xfailures=failures; fi; \ + msg="$$msg ($$xfail expected $$xfailures). "; \ + exit=true;; \ + fail=*:xpass=0:xfail=*) \ + msg="$$fail of $$all $$tests failed. "; \ + exit=false;; \ + fail=*:xpass=*:xfail=*) \ + msg="$$failures of $$all $$tests did not behave as expected"; \ + if test "$$xpass" -eq 1; then xpasses=pass; \ + else xpasses=passes; fi; \ + msg="$$msg ($$xpass unexpected $$xpasses). "; \ + exit=false;; \ + *) \ + echo >&2 "incorrect case"; exit 4;; \ + esac; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + msg="$$msg($$skip test was not run). "; \ + else \ + msg="$$msg($$skip tests were not run). "; \ + fi; \ + fi; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + echo "$$msg"; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for f in $$list; do \ + read line < $$f; \ + case $$line in \ + PASS:*|XFAIL:*);; \ + *) echo; cat $$f;; \ + esac; \ + done; \ + } >$(TEST_SUITE_LOG).tmp; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if test "$$failures" -ne 0; then \ + msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \ + fi; \ + fi; \ + test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \ + $(am__tty_colors); \ + if $$exit; then \ + echo $(ECHO_N) "$$grn$(ECHO_C)"; \ + else \ + echo $(ECHO_N) "$$red$(ECHO_C)"; \ + fi; \ + echo "$$msg" | $(am__text_box); \ + echo $(ECHO_N) "$$std$(ECHO_C)"; \ + $$exit + +# Run all the tests. +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test .log = $$f || echo $$f; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" + +.log.html: + @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \ + for r2h in $$list; do \ + if ($$r2h --version) >/dev/null 2>&1; then \ + R2H=$$r2h; \ + fi; \ + done; \ + if test -z "$$R2H"; then \ + echo >&2 "cannot find rst2html, cannot create $@"; \ + exit 2; \ + fi; \ + $$R2H $< >$@.tmp + @mv $@.tmp $@ + +# Be sure to run check first, and then to convert the result. +# Beware of concurrent executions. Run "check" not "check-TESTS", as +# check-SCRIPTS and other dependencies are rebuilt by the former only. +# And expect check to fail. +check-html: + @if $(MAKE) $(AM_MAKEFLAGS) check; then \ + rv=0; else rv=$$?; \ + fi; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ + exit $$rv +recheck recheck-html: + @target=`echo $@ | sed 's,^re,,'`; \ + list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test -f $$f || continue; \ + if read line < $$f; then \ + case $$line in FAIL*|XPASS*) echo $$f;; esac; \ + else echo $$f; fi; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"' +incremental_test.sh.log: incremental_test.sh + @p='incremental_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +gc_comdat_test.sh.log: gc_comdat_test.sh + @p='gc_comdat_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +gc_tls_test.sh.log: gc_tls_test.sh + @p='gc_tls_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +gc_orphan_section_test.sh.log: gc_orphan_section_test.sh + @p='gc_orphan_section_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_test.sh.log: icf_test.sh + @p='icf_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_keep_unique_test.sh.log: icf_keep_unique_test.sh + @p='icf_keep_unique_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_safe_test.sh.log: icf_safe_test.sh + @p='icf_safe_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_safe_so_test.sh.log: icf_safe_so_test.sh + @p='icf_safe_so_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_preemptible_functions_test.sh.log: icf_preemptible_functions_test.sh + @p='icf_preemptible_functions_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_string_merge_test.sh.log: icf_string_merge_test.sh + @p='icf_string_merge_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_sht_rel_addend_test.sh.log: icf_sht_rel_addend_test.sh + @p='icf_sht_rel_addend_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared.sh.log: two_file_shared.sh + @p='two_file_shared.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +weak_plt.sh.log: weak_plt.sh + @p='weak_plt.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +debug_msg.sh.log: debug_msg.sh + @p='debug_msg.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +undef_symbol.sh.log: undef_symbol.sh + @p='undef_symbol.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_1.sh.log: ver_test_1.sh + @p='ver_test_1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_2.sh.log: ver_test_2.sh + @p='ver_test_2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_4.sh.log: ver_test_4.sh + @p='ver_test_4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_5.sh.log: ver_test_5.sh + @p='ver_test_5.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_7.sh.log: ver_test_7.sh + @p='ver_test_7.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_10.sh.log: ver_test_10.sh + @p='ver_test_10.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_matching_test.sh.log: ver_matching_test.sh + @p='ver_matching_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_3.sh.log: script_test_3.sh + @p='script_test_3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_4.sh.log: script_test_4.sh + @p='script_test_4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_5.sh.log: script_test_5.sh + @p='script_test_5.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_6.sh.log: script_test_6.sh + @p='script_test_6.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_7.sh.log: script_test_7.sh + @p='script_test_7.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_8.sh.log: script_test_8.sh + @p='script_test_8.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +dynamic_list.sh.log: dynamic_list.sh + @p='dynamic_list.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_1.sh.log: plugin_test_1.sh + @p='plugin_test_1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_2.sh.log: plugin_test_2.sh + @p='plugin_test_2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_3.sh.log: plugin_test_3.sh + @p='plugin_test_3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_4.sh.log: plugin_test_4.sh + @p='plugin_test_4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exclude_libs_test.sh.log: exclude_libs_test.sh + @p='exclude_libs_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +discard_locals_test.sh.log: discard_locals_test.sh + @p='discard_locals_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +hidden_test.sh.log: hidden_test.sh + @p='hidden_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +retain_symbols_file_test.sh.log: retain_symbols_file_test.sh + @p='retain_symbols_file_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +no_version_test.sh.log: no_version_test.sh + @p='no_version_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +strong_ref_weak_def.sh.log: strong_ref_weak_def.sh + @p='strong_ref_weak_def.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +dyn_weak_ref.sh.log: dyn_weak_ref.sh + @p='dyn_weak_ref.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +split_i386.sh.log: split_i386.sh + @p='split_i386.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +split_x86_64.sh.log: split_x86_64.sh + @p='split_x86_64.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +arm_abs_global.sh.log: arm_abs_global.sh + @p='arm_abs_global.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +arm_branch_in_range.sh.log: arm_branch_in_range.sh + @p='arm_branch_in_range.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +arm_branch_out_of_range.sh.log: arm_branch_out_of_range.sh + @p='arm_branch_out_of_range.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +arm_fix_v4bx.sh.log: arm_fix_v4bx.sh + @p='arm_fix_v4bx.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +arm_cortex_a8.sh.log: arm_cortex_a8.sh + @p='arm_cortex_a8.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +object_unittest.log: object_unittest$(EXEEXT) + @p='object_unittest$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +binary_unittest.log: binary_unittest$(EXEEXT) + @p='binary_unittest$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +icf_virtual_function_folding_test.log: icf_virtual_function_folding_test$(EXEEXT) + @p='icf_virtual_function_folding_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +basic_test.log: basic_test$(EXEEXT) + @p='basic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +basic_static_test.log: basic_static_test$(EXEEXT) + @p='basic_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +basic_pic_test.log: basic_pic_test$(EXEEXT) + @p='basic_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +basic_static_pic_test.log: basic_static_pic_test$(EXEEXT) + @p='basic_static_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +basic_pie_test.log: basic_pie_test$(EXEEXT) + @p='basic_pie_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +constructor_test.log: constructor_test$(EXEEXT) + @p='constructor_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +constructor_static_test.log: constructor_static_test$(EXEEXT) + @p='constructor_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_test.log: two_file_test$(EXEEXT) + @p='two_file_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_static_test.log: two_file_static_test$(EXEEXT) + @p='two_file_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_pic_test.log: two_file_pic_test$(EXEEXT) + @p='two_file_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared_1_test.log: two_file_shared_1_test$(EXEEXT) + @p='two_file_shared_1_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared_2_test.log: two_file_shared_2_test$(EXEEXT) + @p='two_file_shared_2_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared_1_pic_2_test.log: two_file_shared_1_pic_2_test$(EXEEXT) + @p='two_file_shared_1_pic_2_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared_2_pic_1_test.log: two_file_shared_2_pic_1_test$(EXEEXT) + @p='two_file_shared_2_pic_1_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_same_shared_test.log: two_file_same_shared_test$(EXEEXT) + @p='two_file_same_shared_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_separate_shared_12_test.log: two_file_separate_shared_12_test$(EXEEXT) + @p='two_file_separate_shared_12_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_separate_shared_21_test.log: two_file_separate_shared_21_test$(EXEEXT) + @p='two_file_separate_shared_21_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_relocatable_test.log: two_file_relocatable_test$(EXEEXT) + @p='two_file_relocatable_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_pie_test.log: two_file_pie_test$(EXEEXT) + @p='two_file_pie_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared_1_nonpic_test.log: two_file_shared_1_nonpic_test$(EXEEXT) + @p='two_file_shared_1_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_shared_2_nonpic_test.log: two_file_shared_2_nonpic_test$(EXEEXT) + @p='two_file_shared_2_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_same_shared_nonpic_test.log: two_file_same_shared_nonpic_test$(EXEEXT) + @p='two_file_same_shared_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_separate_shared_12_nonpic_test.log: two_file_separate_shared_12_nonpic_test$(EXEEXT) + @p='two_file_separate_shared_12_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_separate_shared_21_nonpic_test.log: two_file_separate_shared_21_nonpic_test$(EXEEXT) + @p='two_file_separate_shared_21_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_mixed_shared_test.log: two_file_mixed_shared_test$(EXEEXT) + @p='two_file_mixed_shared_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_mixed_2_shared_test.log: two_file_mixed_2_shared_test$(EXEEXT) + @p='two_file_mixed_2_shared_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_strip_test.log: two_file_strip_test$(EXEEXT) + @p='two_file_strip_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +two_file_same_shared_strip_test.log: two_file_same_shared_strip_test$(EXEEXT) + @p='two_file_same_shared_strip_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +common_test_1.log: common_test_1$(EXEEXT) + @p='common_test_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +common_test_2.log: common_test_2$(EXEEXT) + @p='common_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_test.log: exception_test$(EXEEXT) + @p='exception_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_static_test.log: exception_static_test$(EXEEXT) + @p='exception_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_shared_1_test.log: exception_shared_1_test$(EXEEXT) + @p='exception_shared_1_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_shared_2_test.log: exception_shared_2_test$(EXEEXT) + @p='exception_shared_2_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_same_shared_test.log: exception_same_shared_test$(EXEEXT) + @p='exception_same_shared_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_separate_shared_12_test.log: exception_separate_shared_12_test$(EXEEXT) + @p='exception_separate_shared_12_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exception_separate_shared_21_test.log: exception_separate_shared_21_test$(EXEEXT) + @p='exception_separate_shared_21_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +weak_test.log: weak_test$(EXEEXT) + @p='weak_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +weak_undef_test.log: weak_undef_test$(EXEEXT) + @p='weak_undef_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +weak_undef_nonpic_test.log: weak_undef_nonpic_test$(EXEEXT) + @p='weak_undef_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +weak_alias_test.log: weak_alias_test$(EXEEXT) + @p='weak_alias_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +weak_plt.log: weak_plt$(EXEEXT) + @p='weak_plt$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +copy_test.log: copy_test$(EXEEXT) + @p='copy_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_test.log: tls_test$(EXEEXT) + @p='tls_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_pic_test.log: tls_pic_test$(EXEEXT) + @p='tls_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_pie_test.log: tls_pie_test$(EXEEXT) + @p='tls_pie_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_pie_pic_test.log: tls_pie_pic_test$(EXEEXT) + @p='tls_pie_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_shared_test.log: tls_shared_test$(EXEEXT) + @p='tls_shared_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_shared_ie_test.log: tls_shared_ie_test$(EXEEXT) + @p='tls_shared_ie_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_shared_gd_to_ie_test.log: tls_shared_gd_to_ie_test$(EXEEXT) + @p='tls_shared_gd_to_ie_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_shared_gnu2_gd_to_ie_test.log: tls_shared_gnu2_gd_to_ie_test$(EXEEXT) + @p='tls_shared_gnu2_gd_to_ie_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_shared_gnu2_test.log: tls_shared_gnu2_test$(EXEEXT) + @p='tls_shared_gnu2_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_static_test.log: tls_static_test$(EXEEXT) + @p='tls_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_static_pic_test.log: tls_static_pic_test$(EXEEXT) + @p='tls_static_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +tls_shared_nonpic_test.log: tls_shared_nonpic_test$(EXEEXT) + @p='tls_shared_nonpic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +many_sections_test.log: many_sections_test$(EXEEXT) + @p='many_sections_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +many_sections_r_test.log: many_sections_r_test$(EXEEXT) + @p='many_sections_r_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +initpri1.log: initpri1$(EXEEXT) + @p='initpri1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +flagstest_o_specialfile.log: flagstest_o_specialfile$(EXEEXT) + @p='flagstest_o_specialfile$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +flagstest_compress_debug_sections.log: flagstest_compress_debug_sections$(EXEEXT) + @p='flagstest_compress_debug_sections$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +flagstest_o_specialfile_and_compress_debug_sections.log: flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT) + @p='flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test.log: ver_test$(EXEEXT) + @p='ver_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_2.log: ver_test_2$(EXEEXT) + @p='ver_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_6.log: ver_test_6$(EXEEXT) + @p='ver_test_6$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_8.log: ver_test_8$(EXEEXT) + @p='ver_test_8$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_9.log: ver_test_9$(EXEEXT) + @p='ver_test_9$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +ver_test_11.log: ver_test_11$(EXEEXT) + @p='ver_test_11$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +protected_1.log: protected_1$(EXEEXT) + @p='protected_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +protected_2.log: protected_2$(EXEEXT) + @p='protected_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +relro_test.log: relro_test$(EXEEXT) + @p='relro_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +relro_script_test.log: relro_script_test$(EXEEXT) + @p='relro_script_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_1.log: script_test_1$(EXEEXT) + @p='script_test_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_2.log: script_test_2$(EXEEXT) + @p='script_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +justsyms.log: justsyms$(EXEEXT) + @p='justsyms$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +binary_test.log: binary_test$(EXEEXT) + @p='binary_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +script_test_3.log: script_test_3$(EXEEXT) + @p='script_test_3$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +thin_archive_test_1.log: thin_archive_test_1$(EXEEXT) + @p='thin_archive_test_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +thin_archive_test_2.log: thin_archive_test_2$(EXEEXT) + @p='thin_archive_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_1.log: plugin_test_1$(EXEEXT) + @p='plugin_test_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_2.log: plugin_test_2$(EXEEXT) + @p='plugin_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_3.log: plugin_test_3$(EXEEXT) + @p='plugin_test_3$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_4.log: plugin_test_4$(EXEEXT) + @p='plugin_test_4$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +plugin_test_5.log: plugin_test_5$(EXEEXT) + @p='plugin_test_5$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +exclude_libs_test.log: exclude_libs_test$(EXEEXT) + @p='exclude_libs_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +local_labels_test.log: local_labels_test$(EXEEXT) + @p='local_labels_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +discard_locals_test.log: discard_locals_test$(EXEEXT) + @p='discard_locals_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +large.log: large$(EXEEXT) + @p='large$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +permission_test.log: permission_test$(EXEEXT) + @p='permission_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +searched_file_test.log: searched_file_test$(EXEEXT) + @p='searched_file_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) +.test.log: + @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) \ $(check_SCRIPTS) $(check_DATA) @@ -2546,6 +2799,10 @@ install-strip: echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP) + -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -2627,12 +2884,13 @@ ps-am: uninstall-am: -.MAKE: all check check-am install install-am install-strip +.MAKE: all check check-am check-html install install-am install-strip \ + recheck recheck-html -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkLIBRARIES clean-checkPROGRAMS clean-generic ctags \ - distclean distclean-compile distclean-generic distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am check-html \ + clean clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ + ctags distclean distclean-compile distclean-generic \ + distclean-tags dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ @@ -2640,7 +2898,7 @@ uninstall-am: install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am + recheck recheck-html tags uninstall uninstall-am # --------------------------------------------------------------------- @@ -2739,6 +2997,14 @@ uninstall-am: @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_string_merge_test.o @GCC_TRUE@@NATIVE_LINKER_TRUE@icf_string_merge_test.stdout: icf_string_merge_test @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) icf_string_merge_test > icf_string_merge_test.stdout +@GCC_TRUE@@NATIVE_LINKER_TRUE@icf_sht_rel_addend_test_1.o: icf_sht_rel_addend_test_1.cc +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@icf_sht_rel_addend_test_2.o: icf_sht_rel_addend_test_2.cc +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@icf_sht_rel_addend_test: icf_sht_rel_addend_test_1.o icf_sht_rel_addend_test_2.o gcctestdir/ld +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_sht_rel_addend_test_1.o icf_sht_rel_addend_test_2.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@icf_sht_rel_addend_test.stdout: icf_sht_rel_addend_test +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) icf_sht_rel_addend_test > icf_sht_rel_addend_test.stdout @GCC_TRUE@@NATIVE_LINKER_TRUE@basic_test.o: basic_test.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -o $@ $< @GCC_TRUE@@NATIVE_LINKER_TRUE@basic_test: basic_test.o gcctestdir/ld @@ -3246,6 +3512,30 @@ uninstall-am: @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c -fPIC $< @GCC_TRUE@@NATIVE_LINKER_TRUE@no_version_test.stdout: libno_version_test.so @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_OBJDUMP) -h $< > $@ +@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def_2.o: strong_ref_weak_def_2.c +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c -fPIC $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def_2.so: strong_ref_weak_def_2.o gcctestdir/ld +@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -shared -o $@ strong_ref_weak_def_2.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def_1.o: strong_ref_weak_def_1.c +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c -fPIC $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def_1.so: strong_ref_weak_def_1.o strong_ref_weak_def_2.so \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld +@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -shared -o $@ strong_ref_weak_def_1.o \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def_2.so +@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def.stdout: strong_ref_weak_def_1.so +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -sWD $< > $@ +@GCC_TRUE@@NATIVE_LINKER_TRUE@dyn_weak_ref_2.o: dyn_weak_ref_2.c +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c -fPIC $< +@GCC_TRUE@@NATIVE_LINKER_TRUE@dyn_weak_ref_2.so: dyn_weak_ref_2.o gcctestdir/ld +@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -shared -o $@ dyn_weak_ref_2.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@dyn_weak_ref_1.o: dyn_weak_ref_1.c +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c -fPIC $< +# We intentionally put dyn_weak_ref_2.so in front of dyn_weak_ref_1.o +# so that the weak ref there goes to gold's symbol table first. +@GCC_TRUE@@NATIVE_LINKER_TRUE@dyn_weak_ref_1.so: dyn_weak_ref_1.o dyn_weak_ref_2.so gcctestdir/ld +@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -shared -o $@ dyn_weak_ref_2.so dyn_weak_ref_1.o +@GCC_TRUE@@NATIVE_LINKER_TRUE@dyn_weak_ref.stdout: dyn_weak_ref_1.so +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -sWD $< > $@ @DEFAULT_TARGET_I386_TRUE@split_i386_1.o: split_i386_1.s @DEFAULT_TARGET_I386_TRUE@ $(TEST_AS) -o $@ $< @DEFAULT_TARGET_I386_TRUE@split_i386_2.o: split_i386_2.s @@ -3399,6 +3689,15 @@ uninstall-am: @DEFAULT_TARGET_ARM_TRUE@thumb2_blx_out_of_range.o: thumb_blx_out_of_range.s @DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ -march=armv7-a $< +@DEFAULT_TARGET_ARM_TRUE@thumb_bl_out_of_range_local.stdout: thumb_bl_out_of_range_local +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@thumb_bl_out_of_range_local: thumb_bl_out_of_range_local.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -T $(srcdir)/thumb_branch_range.t -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@thumb_bl_out_of_range_local.o: thumb_bl_out_of_range_local.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ -march=armv5te $< + @DEFAULT_TARGET_ARM_TRUE@arm_fix_v4bx.stdout: arm_fix_v4bx @DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ @@ -3420,6 +3719,60 @@ uninstall-am: @DEFAULT_TARGET_ARM_TRUE@arm_no_fix_v4bx: arm_fix_v4bx.o ../ld-new @DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $< +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_b_cond.stdout: arm_cortex_a8_b_cond +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_b_cond: arm_cortex_a8_b_cond.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_b_cond.o: arm_cortex_a8_b_cond.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_b.stdout: arm_cortex_a8_b +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_b: arm_cortex_a8_b.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new --fix-cortex-a8 -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_b.o: arm_cortex_a8_b.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_bl.stdout: arm_cortex_a8_bl +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_bl: arm_cortex_a8_bl.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_bl.o: arm_cortex_a8_bl.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_blx.stdout: arm_cortex_a8_blx +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_blx: arm_cortex_a8_blx.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_blx.o: arm_cortex_a8_blx.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_local.stdout: arm_cortex_a8_local +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_local: arm_cortex_a8_local.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_local.o: arm_cortex_a8_local.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_local_reloc.stdout: arm_cortex_a8_local_reloc +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@ + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_local_reloc: arm_cortex_a8_local_reloc.o ../ld-new +@DEFAULT_TARGET_ARM_TRUE@ ../ld-new -o $@ $< + +@DEFAULT_TARGET_ARM_TRUE@arm_cortex_a8_local_reloc.o: arm_cortex_a8_local_reloc.s +@DEFAULT_TARGET_ARM_TRUE@ $(TEST_AS) -o $@ $< + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/binutils-2.19/gold/testsuite/arm_bl_out_of_range.s b/binutils-2.19/gold/testsuite/arm_bl_out_of_range.s index 786d9aa..cb5ff53 100644 --- a/binutils-2.19/gold/testsuite/arm_bl_out_of_range.s +++ b/binutils-2.19/gold/testsuite/arm_bl_out_of_range.s @@ -15,7 +15,8 @@ _backward_target: .size _backward_target, .-_backward_target .text - .align 2 +# Use 256-byte alignment so that we know where the stubs start. + .align 8 # Define _start so that linker does not complain. .global _start diff --git a/binutils-2.19/gold/testsuite/arm_branch_out_of_range.sh b/binutils-2.19/gold/testsuite/arm_branch_out_of_range.sh new file mode 100755 index 0000000..aac638f --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_branch_out_of_range.sh @@ -0,0 +1,123 @@ +#!/bin/sh + +# arm_branch_out_of_range.sh -- test ARM/THUMB/THUMB branch instructions whose +# targets are just out of the branch range limits. + +# Copyright 2010 Free Software Foundation, Inc. +# Written by Doug Kwan <dougkwan@google.com> + +# This file is part of gold. + +# 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. + +# This file goes with the assembler source files arm_bl_out_of_range.s, +# thumb_bl_out_of_range.s and thumb_bl_out_of_range_local.s that are assembled +# and linked to check that branches whose target are just out of the branch +# range limits are handle correctly. + +check() +{ + file=$1 + pattern=$2 + + found=`grep "$pattern" $file` + if test -z "$found"; then + echo "pattern \"$pattern\" not found in file $file." + exit 1 + fi +} + +# This is a bit crude. Also, there are tabs in the grep patterns. + +check arm_bl_out_of_range.stdout \ + " 4000004: eb00003d bl 4000100 <.*>" +check arm_bl_out_of_range.stdout \ + " 4000008: eb00003e bl 4000108 <.*>" +check arm_bl_out_of_range.stdout \ + " 4000100: e51ff004 ldr pc, \[pc, #-4\]" +check arm_bl_out_of_range.stdout \ + " 4000104: 02000008 " +check arm_bl_out_of_range.stdout \ + " 4000108: e51ff004 ldr pc, \[pc, #-4\]" +check arm_bl_out_of_range.stdout \ + " 400010c: 06000010 " + +check thumb_bl_out_of_range.stdout \ + " 800004: f000 e87c blx 800100 <.*>" +check thumb_bl_out_of_range.stdout \ + " 800008: f000 e87e blx 800108 <.*>" +check thumb_bl_out_of_range.stdout \ + " 800100: e51ff004 ldr pc, \[pc, #-4\]" +check thumb_bl_out_of_range.stdout \ + " 800104: 00400007 " +check thumb_bl_out_of_range.stdout \ + " 800108: e51ff004 ldr pc, \[pc, #-4\]" +check thumb_bl_out_of_range.stdout \ + " 80010c: 00c0000d " + +check thumb_blx_out_of_range.stdout \ + " 800004: f000 e87c blx 800100 <.*>" +check thumb_blx_out_of_range.stdout \ + " 80000a: f000 e87e blx 800108 <.*>" +check thumb_blx_out_of_range.stdout \ + " 800100: e51ff004 ldr pc, \[pc, #-4\]" +check thumb_blx_out_of_range.stdout \ + " 800104: 00400004 " +check thumb_blx_out_of_range.stdout \ + " 800108: e51ff004 ldr pc, \[pc, #-4\]" +check thumb_blx_out_of_range.stdout \ + " 80010c: 00c0000c " + +check thumb_bl_out_of_range_local.stdout \ + " 800004: f000 e87c blx 800100 <.*>" +check thumb_bl_out_of_range_local.stdout \ + " 800008: f000 e87e blx 800108 <.*>" +check thumb_bl_out_of_range_local.stdout \ + " 800100: e51ff004 ldr pc, \[pc, #-4\]" +check thumb_bl_out_of_range_local.stdout \ + " 800104: 00400007 " +check thumb_bl_out_of_range_local.stdout \ + " 800108: e51ff004 ldr pc, \[pc, #-4\]" +check thumb_bl_out_of_range_local.stdout \ + " 80010c: 00c0000d " + +check thumb2_bl_out_of_range.stdout \ + " 2000004: f000 e87c blx 2000100 <.*>" +check thumb2_bl_out_of_range.stdout \ + " 2000008: f000 e87e blx 2000108 <.*>" +check thumb2_bl_out_of_range.stdout \ + " 2000100: e51ff004 ldr pc, \[pc, #-4\]" +check thumb2_bl_out_of_range.stdout \ + " 2000104: 01000007 " +check thumb2_bl_out_of_range.stdout \ + " 2000108: e51ff004 ldr pc, \[pc, #-4\]" +check thumb2_bl_out_of_range.stdout \ + " 200010c: 0300000d " + +check thumb2_blx_out_of_range.stdout \ + " 2000004: f000 e87c blx 2000100 <.*>" +check thumb2_blx_out_of_range.stdout \ + " 200000a: f000 e87e blx 2000108 <.*>" +check thumb2_blx_out_of_range.stdout \ + " 2000100: e51ff004 ldr pc, \[pc, #-4\]" +check thumb2_blx_out_of_range.stdout \ + " 2000104: 01000004 " +check thumb2_blx_out_of_range.stdout \ + " 2000108: e51ff004 ldr pc, \[pc, #-4\]" +check thumb2_blx_out_of_range.stdout \ + " 200010c: 0300000c " + +exit 0 diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8.sh b/binutils-2.19/gold/testsuite/arm_cortex_a8.sh new file mode 100755 index 0000000..5e25c25 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +# arm_cortex_a8.sh -- a test case for the Cortex-A8 workaround. + +# Copyright 2010 Free Software Foundation, Inc. +# Written by Doug Kwan <dougkwan@google.com>. + +# This file is part of gold. + +# 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. + +# This file goes with arm_v4bx.s, an ARM assembly source file constructed to +# have test the handling of R_ARM_V4BX relocation. + +check() +{ + if ! grep -q "$2" "$1" + then + echo "Did not find expected instruction in $1:" + echo " $2" + echo "" + echo "Actual instructions below:" + cat "$1" + exit 1 + fi +} + +# Test branch. +check arm_cortex_a8_b.stdout ".*ffe: .* b.w .*000 <.*>" +check arm_cortex_a8_b.stdout ".000: .* b.w .*100 <_func>" + +# Test conditional branch. +check arm_cortex_a8_b_cond.stdout ".*ffe: .* b.w .*000 <.*>" +check arm_cortex_a8_b_cond.stdout ".000: .* beq.n .*006 <.*>" +check arm_cortex_a8_b_cond.stdout ".002: .* b.w .*002 <.*>" +check arm_cortex_a8_b_cond.stdout ".006: .* b.w .*100 <_func>" + +# Test branch and link. +check arm_cortex_a8_bl.stdout ".*ffe: .* bl .*000 <.*>" +check arm_cortex_a8_bl.stdout ".000: .* b.w .*100 <_func>" + +# Test blx +check arm_cortex_a8_blx.stdout ".*ffe: .* blx .*000 <.*>" +check arm_cortex_a8_blx.stdout ".000: .* b .*100 <_func>" + +# Test a local branch without relocation. +check arm_cortex_a8_local.stdout ".*ffe: .* b.w .*000 <.*>" +check arm_cortex_a8_local.stdout ".000: .* bpl.n .*006 <.*>" +check arm_cortex_a8_local.stdout ".002: .* b.w .*002 <.*>" +check arm_cortex_a8_local.stdout ".006: .* b.w .*100 <.*>" + +exit 0 diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_b.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_b.s new file mode 100644 index 0000000..d2316a0 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_b.s @@ -0,0 +1,30 @@ + .syntax unified + .cpu cortex-a8 + + .text + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .align 8 + .thumb + .global _func + .type _func,%function +_func: + bx lr + .size _func,.-_func + + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test + .type _test,%function +_test: + add.w r0, r0, 0 + b.w _func + .size _test,.-_test diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_b_cond.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_b_cond.s new file mode 100644 index 0000000..a244aa7 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_b_cond.s @@ -0,0 +1,30 @@ + .syntax unified + .cpu cortex-a8 + + .text + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .align 8 + .thumb + .global _func + .type _func,%function +_func: + bx lr + .size _func,.-_func + + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test + .type _test,%function +_test: + add.w r0, r0, 0 + beq.w _func + .size _test,.-_test diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_b_local.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_b_local.s new file mode 100644 index 0000000..2432d91 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_b_local.s @@ -0,0 +1,52 @@ + .syntax unified + .cpu cortex-a8 + + .section .text.0, "x" + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .section .text.1, "x" + .align 11 + .thumb + .type .Lfunc1,%function +.Lfunc1: + bx lr + .size .Lfunc1,.-.Lfunc1 + + .section .text.2, "x" + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test1 + .type _test1,%function +_test1: + add.w r0, r0, 0 + b.w .Lfunc1 + .size _test1,.-_test1 + + .align 8 + .thumb + .type .Lfunc2,%function +.Lfunc2: + bx lr + .size .Lfunc2,.-.Lfunc1 + + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test2 + .type _test2,%function +_test2: + add.w r0, r0, 0 + b.w .Lfunc2 + .size _test2,.-_test2 + + diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_bl.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_bl.s new file mode 100644 index 0000000..c78fa8d --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_bl.s @@ -0,0 +1,30 @@ + .syntax unified + .cpu cortex-a8 + + .text + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .align 8 + .thumb + .global _func + .type _func,%function +_func: + bx lr + .size _func,.-_func + + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test + .type _test,%function +_test: + add.w r0, r0, 0 + bl _func + .size _test,.-_test diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_blx.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_blx.s new file mode 100644 index 0000000..c323d25 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_blx.s @@ -0,0 +1,33 @@ + .syntax unified + .cpu cortex-a8 + + .text + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .align 8 + .global _func + .type _func,%function +_func: + bx lr + .size _func,.-_func + + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test + .type _test,%function +_test: + add.w r0, r0, 0 + blx _func + .size _test,.-_test + +# We have no mapping symbols for stubs. This make the disassembler +# list the stub correctly in ARM mode. + .arm diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_local.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_local.s new file mode 100644 index 0000000..462aa18 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_local.s @@ -0,0 +1,29 @@ + .syntax unified + .cpu cortex-a8 + + .text + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .align 8 + .thumb + .type .Lfunc,%function +.Lfunc: + bx lr + .size .Lfunc,.-.Lfunc + + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test + .type _test,%function +_test: + add.w r0, r0, 0 + bpl.w .Lfunc + .size _test,.-_test diff --git a/binutils-2.19/gold/testsuite/arm_cortex_a8_local_reloc.s b/binutils-2.19/gold/testsuite/arm_cortex_a8_local_reloc.s new file mode 100644 index 0000000..2b49184 --- /dev/null +++ b/binutils-2.19/gold/testsuite/arm_cortex_a8_local_reloc.s @@ -0,0 +1,31 @@ + .syntax unified + .cpu cortex-a8 + + .section .text.0, "x" + .align 12 + +_start: + .type _start,%function + bx lr + .size _start,.-_start + + .section .text.1, "x" + .align 11 + .thumb + .type .Lfunc,%function +.Lfunc: + bx lr + .size .Lfunc,.-.Lfunc + + .section .text.2, "x" + .align 11 + .space 2042 + + .align 1 + .thumb + .global _test + .type _test,%function +_test: + add.w r0, r0, 0 + b.w .Lfunc + .size _test,.-_test diff --git a/binutils-2.19/gold/testsuite/dyn_weak_ref.sh b/binutils-2.19/gold/testsuite/dyn_weak_ref.sh new file mode 100755 index 0000000..b52efac --- /dev/null +++ b/binutils-2.19/gold/testsuite/dyn_weak_ref.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# dyn_weak_ref.sh -- test weak reference remains weak in output even if +# gold sees a dynamic weak reference before a static one. + +# Copyright 2010 Free Software Foundation, Inc. +# Written by Doug Kwan <dougkwan@google.com>. + +# This file is part of gold. + +# 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. + +# This checks that the reference to 'weak_ref' have WEAK binding. + +check() +{ + file=$1 + pattern=$2 + found=`grep "$pattern" $file` + if test -z "$found"; then + echo "pattern \"$pattern\" not found in file $file." + echo $found + exit 1 + fi +} + +check dyn_weak_ref.stdout ".* WEAK .* UND.* weak_ref" + +exit 0 diff --git a/binutils-2.19/gold/testsuite/dyn_weak_ref_1.c b/binutils-2.19/gold/testsuite/dyn_weak_ref_1.c new file mode 100644 index 0000000..fdd78dd --- /dev/null +++ b/binutils-2.19/gold/testsuite/dyn_weak_ref_1.c @@ -0,0 +1,39 @@ +// dyn_weak_ref_1.c -- test that a weak ref remains weak in output when +// there is a DSO with the same weak ref. + +// Copyright 2010 Free Software Foundation, Inc. +// Written by Doug Kwan <dougkwan@google.com>. + +// This file is part of gold. + +// 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. + +// We test that we correctly deal with a weak reference to from both +// a DSO and a weak reference to the same symbol in an executable. The +// symbol should remains weak. + +// This source is used to build an DSO that references the same weak +// symbol as in a dependent DSO. + +extern void weak_ref (void) __attribute__((weak)); + +void* ptr1 = weak_ref; + +int +main (void) +{ + return 0; +} diff --git a/binutils-2.19/gold/testsuite/dyn_weak_ref_2.c b/binutils-2.19/gold/testsuite/dyn_weak_ref_2.c new file mode 100644 index 0000000..8a087a1 --- /dev/null +++ b/binutils-2.19/gold/testsuite/dyn_weak_ref_2.c @@ -0,0 +1,32 @@ +// dyn_weak_ref_1.c -- test that a weak ref remains weak in output when +// there is a DSO with the same weak ref. + +// Copyright 2010 Free Software Foundation, Inc. +// Written by Doug Kwan <dougkwan@google.com>. + +// This file is part of gold. + +// 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. + +// We test that we correctly deal with a weak reference to from both +// a DSO and a weak reference to the same symbol in an executable. The +// symbol should remains weak. + +// This source is used to build a DSO that contains a weak reference. + +extern void weak_ref (void) __attribute__((weak)); + +void* ptr2 = weak_ref; diff --git a/binutils-2.19/gold/testsuite/icf_safe_so_test.sh b/binutils-2.19/gold/testsuite/icf_safe_so_test.sh index 47ad390..315a016 100755 --- a/binutils-2.19/gold/testsuite/icf_safe_so_test.sh +++ b/binutils-2.19/gold/testsuite/icf_safe_so_test.sh @@ -84,9 +84,9 @@ arch_specific_safe_fold() fi } -X86_32_specific_safe_fold() +X86_32_or_ARM_specific_safe_fold() { - grep -e "Intel 80386" $1 > /dev/null 2>&1 + grep -e "Intel 80386" -e "ARM" $1 > /dev/null 2>&1 arch_specific_safe_fold $? $2 $3 $4 } @@ -96,10 +96,10 @@ X86_64_specific_safe_fold() arch_specific_safe_fold $? $2 $3 $4 } -X86_32_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_prot" "foo_hidden" -X86_32_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_prot" "foo_internal" -X86_32_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_prot" "foo_static" -X86_32_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_hidden" "foo_internal" -X86_32_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_hidden" "foo_static" -X86_32_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_internal" "foo_static" +X86_32_or_ARM_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_prot" "foo_hidden" +X86_32_or_ARM_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_prot" "foo_internal" +X86_32_or_ARM_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_prot" "foo_static" +X86_32_or_ARM_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_hidden" "foo_internal" +X86_32_or_ARM_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_hidden" "foo_static" +X86_32_or_ARM_specific_safe_fold icf_safe_so_test_2.stdout icf_safe_so_test_1.stdout "foo_internal" "foo_static" check_nofold icf_safe_so_test_1.stdout "foo_glob" "bar_glob" diff --git a/binutils-2.19/gold/testsuite/icf_safe_test.sh b/binutils-2.19/gold/testsuite/icf_safe_test.sh index 23e4e29..d26d40b 100755 --- a/binutils-2.19/gold/testsuite/icf_safe_test.sh +++ b/binutils-2.19/gold/testsuite/icf_safe_test.sh @@ -49,7 +49,7 @@ check_fold() arch_specific_safe_fold() { - grep_x86=`grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" $2` + grep_x86=`grep -q -e "Advanced Micro Devices X86-64" -e "Intel 80386" -e "ARM" $2` if [ $? == 0 ]; then check_fold $1 $3 $4 diff --git a/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test.sh b/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test.sh new file mode 100755 index 0000000..d2a05e4 --- /dev/null +++ b/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test.sh @@ -0,0 +1,35 @@ +# icf_sht_rel_addend_test.sh -- test --icf=all + +# Copyright 2010 Free Software Foundation, Inc. +# Written by Sriraman Tallam <tmsriram@google.com>. + +# This file is part of gold. + +# 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. + + +check() +{ + func_addr_1=`grep $2 $1 | awk '{print $1}'` + func_addr_2=`grep $3 $1 | awk '{print $1}'` + if [ $func_addr_1 = $func_addr_2 ] + then + echo "Identical Code Folding should not fold" $2 "and" $3 + exit 1 + fi +} + +check icf_sht_rel_addend_test.stdout "name1" "name2" diff --git a/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test_1.cc b/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test_1.cc new file mode 100644 index 0000000..ecc2a1b --- /dev/null +++ b/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test_1.cc @@ -0,0 +1,44 @@ +// icf_sht_rel_addend_test_1.cc -- a test case for gold + +// Copyright 2010 Free Software Foundation, Inc. +// Written by Sriraman Tallam <tmsriram@google.com>. + +// This file is part of gold. + +// 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. + +// The goal of this program is to verify is strings are handled correctly +// by ICF when the relocation types are SHT_REL. ICF inlines strings that +// can be merged. To do this, it must get the addend of the relocation +// pointing to the string. For SHT_REL relocations, the addend is encoded +// in the text section at the offset of the relocation. If ICF fails to +// get the addend correctly, function name1 will be incorrectly folded with +// function name2 in icf_sht_rel_addend_test_2.cc. + + +const char* bar() +{ + return "AAAAAA"; +} +const char* name1() +{ + return "Name1"; +} + +int main() +{ + return 0; +} diff --git a/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test_2.cc b/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test_2.cc new file mode 100644 index 0000000..d85e3b4 --- /dev/null +++ b/binutils-2.19/gold/testsuite/icf_sht_rel_addend_test_2.cc @@ -0,0 +1,39 @@ +// icf_sht_rel_addend_test_2.cc -- a test case for gold + +// Copyright 2010 Free Software Foundation, Inc. +// Written by Sriraman Tallam <tmsriram@google.com>. + +// This file is part of gold. + +// 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. + +// The goal of this program is to verify is strings are handled correctly +// by ICF when the relocation types are SHT_REL. ICF inlines strings that +// can be merged. To do this, it must get the addend of the relocation +// pointing to the string. For SHT_REL relocations, the addend is encoded +// in the text section at the offset of the relocation. If ICF fails to +// get the addend correctly, function name1 in icf_sht_rel_addend_test_1.cc +// will be incorrectly folded with name2. + + +const char* foo() +{ + return "AAAAAA"; +} +const char* name2() +{ + return "Name2"; +} diff --git a/binutils-2.19/gold/testsuite/script_test_3.t b/binutils-2.19/gold/testsuite/script_test_3.t index 9910349..9cba4d8 100644 --- a/binutils-2.19/gold/testsuite/script_test_3.t +++ b/binutils-2.19/gold/testsuite/script_test_3.t @@ -28,6 +28,9 @@ SECTIONS /* With luck this will be enough to get the program working. */ .interp : { *(.interp) } :text :interp .text : { *(.text) } :text + /* Required by the ARM target. */ + .ARM.extab : { *(.ARM.extab*) } + .ARM.exidx : { *(.ARM.exidx*) } . += 0x100000; . = ALIGN(0x100); .dynamic : { *(.dynamic) } :data :dynamic diff --git a/binutils-2.19/gold/testsuite/script_test_4.t b/binutils-2.19/gold/testsuite/script_test_4.t index 47ae066..9841773 100644 --- a/binutils-2.19/gold/testsuite/script_test_4.t +++ b/binutils-2.19/gold/testsuite/script_test_4.t @@ -30,6 +30,9 @@ SECTIONS /* With luck this will be enough to get the program working. */ .interp : { *(.interp) } .text : { *(.text) } + /* Required by the ARM target. */ + .ARM.extab : { *(.ARM.extab*) } + .ARM.exidx : { *(.ARM.exidx*) } . += 0x100000; . = ALIGN(0x100); .dynamic : { *(.dynamic) } diff --git a/binutils-2.19/gold/testsuite/script_test_5.t b/binutils-2.19/gold/testsuite/script_test_5.t index b5e83aa..fe67c4e 100644 --- a/binutils-2.19/gold/testsuite/script_test_5.t +++ b/binutils-2.19/gold/testsuite/script_test_5.t @@ -30,6 +30,9 @@ SECTIONS /* With luck this will be enough to get the program working. */ .interp : { *(.interp) } .text : { *(.text) } + /* Required by the ARM target. */ + .ARM.extab : { *(.ARM.extab*) } + .ARM.exidx : { *(.ARM.exidx*) } . += 0x100000; . = ALIGN(0x100); .dynamic : { *(.dynamic) } diff --git a/binutils-2.19/gold/testsuite/script_test_6.t b/binutils-2.19/gold/testsuite/script_test_6.t index 9676371..01a8a17 100644 --- a/binutils-2.19/gold/testsuite/script_test_6.t +++ b/binutils-2.19/gold/testsuite/script_test_6.t @@ -31,6 +31,9 @@ SECTIONS .interp : { *(.interp) } .text : { *(.text .text.*) } .rodata : { *(.rodata .rodata.*) } + /* Required by the ARM target. */ + .ARM.extab : { *(.ARM.extab*) } + .ARM.exidx : { *(.ARM.exidx*) } . += 0x100000; . = ALIGN(0x100); .dynamic : { *(.dynamic) } diff --git a/binutils-2.19/gold/testsuite/script_test_7.t b/binutils-2.19/gold/testsuite/script_test_7.t index a4c4973..7adcf5f 100644 --- a/binutils-2.19/gold/testsuite/script_test_7.t +++ b/binutils-2.19/gold/testsuite/script_test_7.t @@ -31,6 +31,9 @@ SECTIONS .interp : { *(.interp) } .text : { *(.text .text.*) } .rodata : { *(.rodata .rodata.*) } + /* Required by the ARM target. */ + .ARM.extab : { *(.ARM.extab*) } + .ARM.exidx : { *(.ARM.exidx*) } .dynamic : { *(.dynamic) } . = SEGMENT_START(".data", 0x10200000); diff --git a/binutils-2.19/gold/testsuite/strong_ref_weak_def.sh b/binutils-2.19/gold/testsuite/strong_ref_weak_def.sh new file mode 100755 index 0000000..17afc5b --- /dev/null +++ b/binutils-2.19/gold/testsuite/strong_ref_weak_def.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# strong_ref_weak_def.sh -- test non-weak reference to a weak symbol defined +# in a DSO. + +# Copyright 2010 Free Software Foundation, Inc. +# Written by Doug Kwan <dougkwan@google.com>. + +# This file is part of gold. + +# 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. + +# This checks that the reference to 'weak_def' have GLOBAL binding. + +check() +{ + file=$1 + pattern=$2 + found=`grep "$pattern" $file` + if test -z "$found"; then + echo "pattern \"$pattern\" not found in file $file." + echo $found + exit 1 + fi +} + +check strong_ref_weak_def.stdout ".* FUNC.* GLOBAL.* UND.* weak_def" + +exit 0 diff --git a/binutils-2.19/gold/testsuite/strong_ref_weak_def_1.c b/binutils-2.19/gold/testsuite/strong_ref_weak_def_1.c new file mode 100644 index 0000000..bc00e77 --- /dev/null +++ b/binutils-2.19/gold/testsuite/strong_ref_weak_def_1.c @@ -0,0 +1,39 @@ +// strong_ref_weak_def_1.c -- test a strong reference to a weak definition +// in a DSO. + +// Copyright 2010 Free Software Foundation, Inc. +// Written by Doug Kwan <dougkwan@google.com>. + +// This file is part of gold. + +// 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. + +// We test that we correctly deal with a non-weak reference to +// a weak symbol in an DSO. We need to make sure that reference +// is not turned into a weak one. + +// This source is used to build an executable that references a weak +// symbol in a DSO. + +// Strong reference to a weak symbol. +extern void weak_def (void); + +int +main (void) +{ + weak_def (); + return 0; +} diff --git a/binutils-2.19/gold/testsuite/strong_ref_weak_def_2.c b/binutils-2.19/gold/testsuite/strong_ref_weak_def_2.c new file mode 100644 index 0000000..4801f6d --- /dev/null +++ b/binutils-2.19/gold/testsuite/strong_ref_weak_def_2.c @@ -0,0 +1,37 @@ +// strong_ref_weak_def_2.c -- test a strong reference to a weak definition +// in a DSO. + +// Copyright 2010 Free Software Foundation, Inc. +// Written by Doug Kwan <dougkwan@google.com>. + +// This file is part of gold. + +// 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. + +// We test that we correctly deal with a non-weak reference to +// a weak symbol in an DSO. We need to make sure that reference +// is not turned into a weak one. + +// This source is used to build a shared library that defines a +// weak symbol. + +void weak_def (void); + +void +__attribute__((weak)) +weak_def (void) +{ +} diff --git a/binutils-2.19/gold/testsuite/thumb_bl_out_of_range.s b/binutils-2.19/gold/testsuite/thumb_bl_out_of_range.s index 6629d74..d0906d9 100644 --- a/binutils-2.19/gold/testsuite/thumb_bl_out_of_range.s +++ b/binutils-2.19/gold/testsuite/thumb_bl_out_of_range.s @@ -16,6 +16,8 @@ _backward_target: .size _backward_target, .-_backward_target .text +# Use 256-byte alignment so that we know where the stubs start. + .align 8 # Define _start so that linker does not complain. .global _start @@ -42,6 +44,10 @@ _forward_test: bl _forward_target .size _forward_test, .-_forward_test +# switch back to ARM mode so that stubs are disassembled correctly. + .code 32 + nop + .section .text.post,"x" # Add padding so that target is just out of branch range. diff --git a/binutils-2.19/gold/testsuite/thumb_bl_out_of_range_local.s b/binutils-2.19/gold/testsuite/thumb_bl_out_of_range_local.s new file mode 100644 index 0000000..48de1e1 --- /dev/null +++ b/binutils-2.19/gold/testsuite/thumb_bl_out_of_range_local.s @@ -0,0 +1,61 @@ +# thumb_bl_out_of_range_local.s +# Test THUMB/THUMB-2 bl instructions just out of the branch range limits +# and with local branch targets. + .syntax unified + + .section .text.pre,"x" + +# Add padding so that target is just output of branch range. + .space 6 + + .code 16 + .thumb_func + .type .Lbackward_target, %function +.Lbackward_target: + bx lr + .size .Lbackward_target, .-.Lbackward_target + + .text +# Use 256-byte alignment so that we know where the stubs start. + .align 8 + +# Define _start so that linker does not complain. + .global _start + .code 32 + .align 2 + .type _start, %function +_start: + bx lr + .size _start, .-_start + + .global _backward_test + .code 16 + .thumb_func + .type _backward_test, %function +_backward_test: + bl .Lbackward_target + .size _backward_test, .-_backward_test + + .global _forward_test + .code 16 + .thumb_func + .type _forward_test, %function +_forward_test: + bl .Lforward_target + .size _forward_test, .-_forward_test + +# Switch back to ARM mode so that we can see stubs + .code 32 + nop + + .section .text.post,"x" + +# Add padding so that target is just out of branch range. + .space 12 + + .code 16 + .thumb_func + .type .Lforward_target, %function +.Lforward_target: + bx lr + .size .Lforward_target, .-.Lforward_target diff --git a/binutils-2.19/gold/testsuite/thumb_blx_out_of_range.s b/binutils-2.19/gold/testsuite/thumb_blx_out_of_range.s index fc5beb5..f6f4b39 100644 --- a/binutils-2.19/gold/testsuite/thumb_blx_out_of_range.s +++ b/binutils-2.19/gold/testsuite/thumb_blx_out_of_range.s @@ -5,9 +5,9 @@ .section .text.pre,"x" # Add padding so that target is just output of branch range. - .space 6 + .space 4 - .global _forward_target + .align 2 .global _backward_target .type _backword_target, %function _backward_target: @@ -15,6 +15,8 @@ _backward_target: .size _backward_target, .-_backward_target .text +# Use 256-byte alignment so that we know where the stubs start. + .align 8 # Define _start so that linker does not complain. .align 2 @@ -41,12 +43,15 @@ _backward_test: _forward_test: # Bit 1 of the BLX target comes from bit 1 of branch base address, # which is BLX instruction's address + 4. We intentionally put this - # forward BLX at an address n*4 + 2 so that the branch offset is + # _forward BLX at an address n*4 + 2 so that the branch offset is # bumped up by 2. nop.n bl _forward_target .size _forward_test, .-_forward_test + +# switch _back to ARM mode so that stubs are disassembled correctly. .code 32 + nop .section .text.post,"x" diff --git a/binutils-2.19/gold/testsuite/weak_undef_file1.cc b/binutils-2.19/gold/testsuite/weak_undef_file1.cc index 743eea6..fd28870 100644 --- a/binutils-2.19/gold/testsuite/weak_undef_file1.cc +++ b/binutils-2.19/gold/testsuite/weak_undef_file1.cc @@ -1,6 +1,6 @@ // weak_undef_file1.cc -- test handling of weak undefined symbols for gold -// Copyright 2008 Free Software Foundation, Inc. +// Copyright 2008, 2010 Free Software Foundation, Inc. // Written by Cary Coutant <ccoutant@google.com>. // This file is part of gold. @@ -33,13 +33,19 @@ // so that we can detect whether the symbol was left for runtime // resolution. - #include <cstdio> #include "weak_undef.h" int is_such_symbol_ = 1; +// We also define a symbol that is not defined by the alternate +// library. The main program contains a weak reference to this +// symbol, and tests that the reference remains weak even after +// the definition was found at link time. + +int link_time_only = 1; + extern int v2 __attribute__ ((weak)); int *v3 = &v2; diff --git a/binutils-2.19/gold/testsuite/weak_undef_file2.cc b/binutils-2.19/gold/testsuite/weak_undef_file2.cc index 610c25e..33701b2 100644 --- a/binutils-2.19/gold/testsuite/weak_undef_file2.cc +++ b/binutils-2.19/gold/testsuite/weak_undef_file2.cc @@ -1,6 +1,6 @@ -// weak_undef_file1.cc -- test handling of weak undefined symbols for gold +// weak_undef_file2.cc -- test handling of weak undefined symbols for gold -// Copyright 2008 Free Software Foundation, Inc. +// Copyright 2008, 2010 Free Software Foundation, Inc. // Written by Cary Coutant <ccoutant@google.com>. // This file is part of gold. diff --git a/binutils-2.19/gold/testsuite/weak_undef_test.cc b/binutils-2.19/gold/testsuite/weak_undef_test.cc index 962b6bf..880d5cd 100644 --- a/binutils-2.19/gold/testsuite/weak_undef_test.cc +++ b/binutils-2.19/gold/testsuite/weak_undef_test.cc @@ -34,14 +34,24 @@ // so that we can detect whether the symbol was left for runtime // resolution. +// Similarly, this file will be linked with a shared library that +// does define a different symbol, and loaded with an alternate +// shared library that does not define that symbol. We check that +// the weak reference remains weak, and that it is resolved to +// zero at runtime. + #include <cstdio> #include "weak_undef.h" extern int no_such_symbol_ __attribute__ ((weak)); +extern int link_time_only __attribute__ ((weak)); + int *p1 = &no_such_symbol_; +int *p2 = &link_time_only; + int v2 = 42; int @@ -85,5 +95,12 @@ main() status = 1; } + if (p2 != NULL) + { + fprintf(stderr, "FAILED weak undef test 6: %s\n", + "p2 is not NULL"); + status = 1; + } + return status; } diff --git a/binutils-2.19/gold/x86_64.cc b/binutils-2.19/gold/x86_64.cc index 9110278..61299c2 100644 --- a/binutils-2.19/gold/x86_64.cc +++ b/binutils-2.19/gold/x86_64.cc @@ -1,6 +1,6 @@ // x86_64.cc -- x86_64 target support for gold. -// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. @@ -64,8 +64,9 @@ class Target_x86_64 : public Target_freebsd<64, false> Target_x86_64() : Target_freebsd<64, false>(&x86_64_info), - got_(NULL), plt_(NULL), got_plt_(NULL), global_offset_table_(NULL), - rela_dyn_(NULL), copy_relocs_(elfcpp::R_X86_64_COPY), dynbss_(NULL), + got_(NULL), plt_(NULL), got_plt_(NULL), got_tlsdesc_(NULL), + global_offset_table_(NULL), rela_dyn_(NULL), + copy_relocs_(elfcpp::R_X86_64_COPY), dynbss_(NULL), got_mod_index_offset_(-1U), tlsdesc_reloc_info_(), tls_base_symbol_defined_(false) { } @@ -403,6 +404,14 @@ class Target_x86_64 : public Target_freebsd<64, false> return this->got_plt_; } + // Get the GOT section for TLSDESC entries. + Output_data_got<64, false>* + got_tlsdesc_section() const + { + gold_assert(this->got_tlsdesc_ != NULL); + return this->got_tlsdesc_; + } + // Create the PLT section. void make_plt_section(Symbol_table* symtab, Layout* layout); @@ -486,6 +495,8 @@ class Target_x86_64 : public Target_freebsd<64, false> Output_data_plt_x86_64* plt_; // The GOT PLT section. Output_data_space* got_plt_; + // The GOT section for TLSDESC relocations. + Output_data_got<64, false>* got_tlsdesc_; // The _GLOBAL_OFFSET_TABLE_ symbol. Symbol* global_offset_table_; // The dynamic reloc section. @@ -576,6 +587,15 @@ Target_x86_64::got_section(Symbol_table* symtab, Layout* layout) elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN, 0, false, false); + + // If there are any TLSDESC relocations, they get GOT entries in + // .got.plt after the jump slot entries. + this->got_tlsdesc_ = new Output_data_got<64, false>(); + layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS, + (elfcpp::SHF_ALLOC + | elfcpp::SHF_WRITE), + this->got_tlsdesc_, false, false, false, + true); } return this->got_; @@ -1308,9 +1328,13 @@ Target_x86_64::Scan::local(Symbol_table* symtab, // Create reserved PLT and GOT entries for the resolver. target->reserve_tlsdesc_entries(symtab, layout); - // Generate a double GOT entry with an R_X86_64_TLSDESC reloc. - Output_data_got<64, false>* got - = target->got_section(symtab, layout); + // Generate a double GOT entry with an + // R_X86_64_TLSDESC reloc. The R_X86_64_TLSDESC reloc + // is resolved lazily, so the GOT entry needs to be in + // an area in .got.plt, not .got. Call got_section to + // make sure the section has been created. + target->got_section(symtab, layout); + Output_data_got<64, false>* got = target->got_tlsdesc_section(); unsigned int r_sym = elfcpp::elf_r_sym<64>(reloc.get_r_info()); if (!object->local_has_got_offset(r_sym, GOT_TYPE_TLS_DESC)) { @@ -1689,9 +1713,13 @@ Target_x86_64::Scan::global(Symbol_table* symtab, // Create reserved PLT and GOT entries for the resolver. target->reserve_tlsdesc_entries(symtab, layout); - // Create a double GOT entry with an R_X86_64_TLSDESC reloc. - Output_data_got<64, false>* got - = target->got_section(symtab, layout); + // Create a double GOT entry with an R_X86_64_TLSDESC + // reloc. The R_X86_64_TLSDESC reloc is resolved + // lazily, so the GOT entry needs to be in an area in + // .got.plt, not .got. Call got_section to make sure + // the section has been created. + target->got_section(symtab, layout); + Output_data_got<64, false>* got = target->got_tlsdesc_section(); Reloc_section *rt = target->rela_tlsdesc_section(layout); got->add_global_pair_with_rela(gsym, GOT_TYPE_TLS_DESC, rt, elfcpp::R_X86_64_TLSDESC, 0); @@ -1783,7 +1811,8 @@ Target_x86_64::gc_process_relocs(Symbol_table* symtab, } gold::gc_process_relocs<64, false, Target_x86_64, elfcpp::SHT_RELA, - Target_x86_64::Scan>( + Target_x86_64::Scan, + Target_x86_64::Relocatable_size_for_reloc>( symtab, layout, this, @@ -2230,18 +2259,27 @@ Target_x86_64::Relocate::relocate_tls(const Relocate_info<64, false>* relinfo, unsigned int got_type = (optimized_type == tls::TLSOPT_TO_IE ? GOT_TYPE_TLS_OFFSET : GOT_TYPE_TLS_DESC); - unsigned int got_offset; + unsigned int got_offset = 0; + if (r_type == elfcpp::R_X86_64_GOTPC32_TLSDESC + && optimized_type == tls::TLSOPT_NONE) + { + // We created GOT entries in the .got.tlsdesc portion of + // the .got.plt section, but the offset stored in the + // symbol is the offset within .got.tlsdesc. + got_offset = (target->got_size() + + target->got_plt_section()->data_size()); + } if (gsym != NULL) { gold_assert(gsym->has_got_offset(got_type)); - got_offset = gsym->got_offset(got_type) - target->got_size(); + got_offset += gsym->got_offset(got_type) - target->got_size(); } else { unsigned int r_sym = elfcpp::elf_r_sym<64>(rela.get_r_info()); gold_assert(object->local_has_got_offset(r_sym, got_type)); - got_offset = (object->local_got_offset(r_sym, got_type) - - target->got_size()); + got_offset += (object->local_got_offset(r_sym, got_type) + - target->got_size()); } if (optimized_type == tls::TLSOPT_TO_IE) { diff --git a/binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp b/binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp index 6aa4a97..dbaf384 100644 --- a/binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp +++ b/binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp @@ -193,6 +193,11 @@ set armelftests { "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s} {{objdump -dr cortex-a8-fix-bl-rel-thumb.d}} "cortex-a8-fix-bl-rel-thumb"} + {"Cortex-A8 erratum fix, relocate bl.w to PLT" + "-EL --section-start=.plt=0x8e00 -Ttext=0x8f00 --fix-cortex-a8 -shared" + "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s} + {{objdump "-dr -j.plt -j.text" cortex-a8-fix-bl-rel-plt.d}} + "cortex-a8-fix-bl-rel-thumb"} {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb" "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s} {{objdump -dr cortex-a8-fix-bcc-rel-thumb.d}} @@ -209,6 +214,10 @@ set armelftests { "-EL -Ttext=0x00 --fix-cortex-a8 --defsym far_fn1=0x80000000 --defsym far_fn2=0x80000004 --defsym far_fn=0x7fff0000 --defsym _start=0" "-EL" {cortex-a8-far-1.s cortex-a8-far-2.s} {{objdump -dr cortex-a8-far.d}} "cortex-a8-far"} + {"Cortex-A8 erratum fix, blx.w and b<cond>.w together" + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx-bcond.s} + {{objdump -dr cortex-a8-fix-blx-bcond.d}} + "cortex-a8-fix-blx-bcond"} {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s} {{objdump -sj.data gc-unwind.d}} "gc-unwind"} diff --git a/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-bl-rel-plt.d b/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-bl-rel-plt.d new file mode 100644 index 0000000..295e4ba --- /dev/null +++ b/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-bl-rel-plt.d @@ -0,0 +1,92 @@ + +.*: file format .* + + +Disassembly of section \.plt: + +00008e00 <\.plt>: + 8e00: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\) + 8e04: e59fe004 ldr lr, \[pc, #4\] ; 8e10 <targetfn-0xf0> + 8e08: e08fe00e add lr, pc, lr + 8e0c: e5bef008 ldr pc, \[lr, #8\]! + 8e10: 0000127c \.word 0x0000127c + 8e14: e28fc600 add ip, pc, #0 ; 0x0 + 8e18: e28cca01 add ip, ip, #4096 ; 0x1000 + 8e1c: e5bcf27c ldr pc, \[ip, #636\]! + +Disassembly of section \.text: + +00008f00 <targetfn>: + 8f00: 4770 bx lr + 8f02: bf00 nop + 8f04: f3af 8000 nop\.w + +00008f08 <_start>: + 8f08: bf00 nop + 8f0a: eb01 0002 add\.w r0, r1, r2 + 8f0e: f7ff ef82 blx 8e14 <targetfn-0xec> + 8f12: eb01 0002 add\.w r0, r1, r2 + 8f16: f7ff ef7e blx 8e14 <targetfn-0xec> + 8f1a: eb01 0002 add\.w r0, r1, r2 + 8f1e: f7ff ef7a blx 8e14 <targetfn-0xec> + 8f22: eb01 0002 add\.w r0, r1, r2 + 8f26: f7ff ef76 blx 8e14 <targetfn-0xec> + 8f2a: eb01 0002 add\.w r0, r1, r2 + 8f2e: f7ff ef72 blx 8e14 <targetfn-0xec> + 8f32: eb01 0002 add\.w r0, r1, r2 + 8f36: f7ff ef6e blx 8e14 <targetfn-0xec> + 8f3a: eb01 0002 add\.w r0, r1, r2 + 8f3e: f7ff ef6a blx 8e14 <targetfn-0xec> + 8f42: eb01 0002 add\.w r0, r1, r2 + 8f46: f7ff ef66 blx 8e14 <targetfn-0xec> + 8f4a: eb01 0002 add\.w r0, r1, r2 + 8f4e: f7ff ef62 blx 8e14 <targetfn-0xec> + 8f52: eb01 0002 add\.w r0, r1, r2 + 8f56: f7ff ef5e blx 8e14 <targetfn-0xec> + 8f5a: eb01 0002 add\.w r0, r1, r2 + 8f5e: f7ff ef5a blx 8e14 <targetfn-0xec> + 8f62: eb01 0002 add\.w r0, r1, r2 + 8f66: f7ff ef56 blx 8e14 <targetfn-0xec> + 8f6a: eb01 0002 add\.w r0, r1, r2 + 8f6e: f7ff ef52 blx 8e14 <targetfn-0xec> + 8f72: eb01 0002 add\.w r0, r1, r2 + 8f76: f7ff ef4e blx 8e14 <targetfn-0xec> + 8f7a: eb01 0002 add\.w r0, r1, r2 + 8f7e: f7ff ef4a blx 8e14 <targetfn-0xec> + 8f82: eb01 0002 add\.w r0, r1, r2 + 8f86: f7ff ef46 blx 8e14 <targetfn-0xec> + 8f8a: eb01 0002 add\.w r0, r1, r2 + 8f8e: f7ff ef42 blx 8e14 <targetfn-0xec> + 8f92: eb01 0002 add\.w r0, r1, r2 + 8f96: f7ff ef3e blx 8e14 <targetfn-0xec> + 8f9a: eb01 0002 add\.w r0, r1, r2 + 8f9e: f7ff ef3a blx 8e14 <targetfn-0xec> + 8fa2: eb01 0002 add\.w r0, r1, r2 + 8fa6: f7ff ef36 blx 8e14 <targetfn-0xec> + 8faa: eb01 0002 add\.w r0, r1, r2 + 8fae: f7ff ef32 blx 8e14 <targetfn-0xec> + 8fb2: eb01 0002 add\.w r0, r1, r2 + 8fb6: f7ff ef2e blx 8e14 <targetfn-0xec> + 8fba: eb01 0002 add\.w r0, r1, r2 + 8fbe: f7ff ef2a blx 8e14 <targetfn-0xec> + 8fc2: eb01 0002 add\.w r0, r1, r2 + 8fc6: f7ff ef26 blx 8e14 <targetfn-0xec> + 8fca: eb01 0002 add\.w r0, r1, r2 + 8fce: f7ff ef22 blx 8e14 <targetfn-0xec> + 8fd2: eb01 0002 add\.w r0, r1, r2 + 8fd6: f7ff ef1e blx 8e14 <targetfn-0xec> + 8fda: eb01 0002 add\.w r0, r1, r2 + 8fde: f7ff ef1a blx 8e14 <targetfn-0xec> + 8fe2: eb01 0002 add\.w r0, r1, r2 + 8fe6: f7ff ef16 blx 8e14 <targetfn-0xec> + 8fea: eb01 0002 add\.w r0, r1, r2 + 8fee: f7ff ef12 blx 8e14 <targetfn-0xec> + 8ff2: eb01 0002 add\.w r0, r1, r2 + 8ff6: f7ff ef0e blx 8e14 <targetfn-0xec> + 8ffa: eb01 0002 add\.w r0, r1, r2 + 8ffe: f000 e808 blx 9010 <_start\+0x108> + 9002: eb01 0002 add\.w r0, r1, r2 + 9006: f7ff ef06 blx 8e14 <targetfn-0xec> + 900a: 4770 bx lr + 900c: f3af 8000 nop\.w + 9010: eaffff7f b 8e14 <targetfn-0xec> diff --git a/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.d b/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.d new file mode 100644 index 0000000..692a606 --- /dev/null +++ b/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.d @@ -0,0 +1,1107 @@ + +.*: file format .* + + +Disassembly of section \.text: + +00008f00 <_start>: + 8f00: bf00 nop + 8f02: eb01 0002 add\.w r0, r1, r2 + 8f06: f47f affc bne\.w 8f02 <_start\+0x2> + 8f0a: eb01 0002 add\.w r0, r1, r2 + 8f0e: f47f aff8 bne\.w 8f02 <_start\+0x2> + 8f12: eb01 0002 add\.w r0, r1, r2 + 8f16: f47f aff4 bne\.w 8f02 <_start\+0x2> + 8f1a: eb01 0002 add\.w r0, r1, r2 + 8f1e: f47f aff0 bne\.w 8f02 <_start\+0x2> + 8f22: eb01 0002 add\.w r0, r1, r2 + 8f26: f47f affc bne\.w 8f22 <_start\+0x22> + 8f2a: eb01 0002 add\.w r0, r1, r2 + 8f2e: f47f aff8 bne\.w 8f22 <_start\+0x22> + 8f32: eb01 0002 add\.w r0, r1, r2 + 8f36: f47f aff4 bne\.w 8f22 <_start\+0x22> + 8f3a: eb01 0002 add\.w r0, r1, r2 + 8f3e: f47f aff0 bne\.w 8f22 <_start\+0x22> + 8f42: eb01 0002 add\.w r0, r1, r2 + 8f46: f47f affc bne\.w 8f42 <_start\+0x42> + 8f4a: eb01 0002 add\.w r0, r1, r2 + 8f4e: f47f aff8 bne\.w 8f42 <_start\+0x42> + 8f52: eb01 0002 add\.w r0, r1, r2 + 8f56: f47f aff4 bne\.w 8f42 <_start\+0x42> + 8f5a: eb01 0002 add\.w r0, r1, r2 + 8f5e: f47f aff0 bne\.w 8f42 <_start\+0x42> + 8f62: eb01 0002 add\.w r0, r1, r2 + 8f66: f47f affc bne\.w 8f62 <_start\+0x62> + 8f6a: eb01 0002 add\.w r0, r1, r2 + 8f6e: f47f aff8 bne\.w 8f62 <_start\+0x62> + 8f72: eb01 0002 add\.w r0, r1, r2 + 8f76: f47f aff4 bne\.w 8f62 <_start\+0x62> + 8f7a: eb01 0002 add\.w r0, r1, r2 + 8f7e: f47f aff0 bne\.w 8f62 <_start\+0x62> + 8f82: eb01 0002 add\.w r0, r1, r2 + 8f86: f47f affc bne\.w 8f82 <_start\+0x82> + 8f8a: eb01 0002 add\.w r0, r1, r2 + 8f8e: f47f aff8 bne\.w 8f82 <_start\+0x82> + 8f92: eb01 0002 add\.w r0, r1, r2 + 8f96: f47f aff4 bne\.w 8f82 <_start\+0x82> + 8f9a: eb01 0002 add\.w r0, r1, r2 + 8f9e: f47f aff0 bne\.w 8f82 <_start\+0x82> + 8fa2: eb01 0002 add\.w r0, r1, r2 + 8fa6: f47f affc bne\.w 8fa2 <_start\+0xa2> + 8faa: eb01 0002 add\.w r0, r1, r2 + 8fae: f47f aff8 bne\.w 8fa2 <_start\+0xa2> + 8fb2: eb01 0002 add\.w r0, r1, r2 + 8fb6: f47f aff4 bne\.w 8fa2 <_start\+0xa2> + 8fba: eb01 0002 add\.w r0, r1, r2 + 8fbe: f47f aff0 bne\.w 8fa2 <_start\+0xa2> + 8fc2: eb01 0002 add\.w r0, r1, r2 + 8fc6: f47f affc bne\.w 8fc2 <_start\+0xc2> + 8fca: eb01 0002 add\.w r0, r1, r2 + 8fce: f47f aff8 bne\.w 8fc2 <_start\+0xc2> + 8fd2: eb01 0002 add\.w r0, r1, r2 + 8fd6: f47f aff4 bne\.w 8fc2 <_start\+0xc2> + 8fda: eb01 0002 add\.w r0, r1, r2 + 8fde: f47f aff0 bne\.w 8fc2 <_start\+0xc2> + 8fe2: eb01 0002 add\.w r0, r1, r2 + 8fe6: f47f affc bne\.w 8fe2 <_start\+0xe2> + 8fea: eb01 0002 add\.w r0, r1, r2 + 8fee: f47f aff8 bne\.w 8fe2 <_start\+0xe2> + 8ff2: eb01 0002 add\.w r0, r1, r2 + 8ff6: f47f aff4 bne\.w 8fe2 <_start\+0xe2> + 8ffa: eb01 0002 add\.w r0, r1, r2 + 8ffe: f001 b805 b\.w a00c <bl_insns\+0x10c> + 9002: bf00 nop + 9004: f3af 8000 nop\.w + 9008: f3af 8000 nop\.w + 900c: f3af 8000 nop\.w + 9010: f3af 8000 nop\.w + 9014: f3af 8000 nop\.w + 9018: f3af 8000 nop\.w + 901c: f3af 8000 nop\.w + 9020: f3af 8000 nop\.w + 9024: f3af 8000 nop\.w + 9028: f3af 8000 nop\.w + 902c: f3af 8000 nop\.w + 9030: f3af 8000 nop\.w + 9034: f3af 8000 nop\.w + 9038: f3af 8000 nop\.w + 903c: f3af 8000 nop\.w + 9040: f3af 8000 nop\.w + 9044: f3af 8000 nop\.w + 9048: f3af 8000 nop\.w + 904c: f3af 8000 nop\.w + 9050: f3af 8000 nop\.w + 9054: f3af 8000 nop\.w + 9058: f3af 8000 nop\.w + 905c: f3af 8000 nop\.w + 9060: f3af 8000 nop\.w + 9064: f3af 8000 nop\.w + 9068: f3af 8000 nop\.w + 906c: f3af 8000 nop\.w + 9070: f3af 8000 nop\.w + 9074: f3af 8000 nop\.w + 9078: f3af 8000 nop\.w + 907c: f3af 8000 nop\.w + 9080: f3af 8000 nop\.w + 9084: f3af 8000 nop\.w + 9088: f3af 8000 nop\.w + 908c: f3af 8000 nop\.w + 9090: f3af 8000 nop\.w + 9094: f3af 8000 nop\.w + 9098: f3af 8000 nop\.w + 909c: f3af 8000 nop\.w + 90a0: f3af 8000 nop\.w + 90a4: f3af 8000 nop\.w + 90a8: f3af 8000 nop\.w + 90ac: f3af 8000 nop\.w + 90b0: f3af 8000 nop\.w + 90b4: f3af 8000 nop\.w + 90b8: f3af 8000 nop\.w + 90bc: f3af 8000 nop\.w + 90c0: f3af 8000 nop\.w + 90c4: f3af 8000 nop\.w + 90c8: f3af 8000 nop\.w + 90cc: f3af 8000 nop\.w + 90d0: f3af 8000 nop\.w + 90d4: f3af 8000 nop\.w + 90d8: f3af 8000 nop\.w + 90dc: f3af 8000 nop\.w + 90e0: f3af 8000 nop\.w + 90e4: f3af 8000 nop\.w + 90e8: f3af 8000 nop\.w + 90ec: f3af 8000 nop\.w + 90f0: f3af 8000 nop\.w + 90f4: f3af 8000 nop\.w + 90f8: f3af 8000 nop\.w + 90fc: f3af 8000 nop\.w + 9100: f3af 8000 nop\.w + 9104: f3af 8000 nop\.w + 9108: f3af 8000 nop\.w + 910c: f3af 8000 nop\.w + 9110: f3af 8000 nop\.w + 9114: f3af 8000 nop\.w + 9118: f3af 8000 nop\.w + 911c: f3af 8000 nop\.w + 9120: f3af 8000 nop\.w + 9124: f3af 8000 nop\.w + 9128: f3af 8000 nop\.w + 912c: f3af 8000 nop\.w + 9130: f3af 8000 nop\.w + 9134: f3af 8000 nop\.w + 9138: f3af 8000 nop\.w + 913c: f3af 8000 nop\.w + 9140: f3af 8000 nop\.w + 9144: f3af 8000 nop\.w + 9148: f3af 8000 nop\.w + 914c: f3af 8000 nop\.w + 9150: f3af 8000 nop\.w + 9154: f3af 8000 nop\.w + 9158: f3af 8000 nop\.w + 915c: f3af 8000 nop\.w + 9160: f3af 8000 nop\.w + 9164: f3af 8000 nop\.w + 9168: f3af 8000 nop\.w + 916c: f3af 8000 nop\.w + 9170: f3af 8000 nop\.w + 9174: f3af 8000 nop\.w + 9178: f3af 8000 nop\.w + 917c: f3af 8000 nop\.w + 9180: f3af 8000 nop\.w + 9184: f3af 8000 nop\.w + 9188: f3af 8000 nop\.w + 918c: f3af 8000 nop\.w + 9190: f3af 8000 nop\.w + 9194: f3af 8000 nop\.w + 9198: f3af 8000 nop\.w + 919c: f3af 8000 nop\.w + 91a0: f3af 8000 nop\.w + 91a4: f3af 8000 nop\.w + 91a8: f3af 8000 nop\.w + 91ac: f3af 8000 nop\.w + 91b0: f3af 8000 nop\.w + 91b4: f3af 8000 nop\.w + 91b8: f3af 8000 nop\.w + 91bc: f3af 8000 nop\.w + 91c0: f3af 8000 nop\.w + 91c4: f3af 8000 nop\.w + 91c8: f3af 8000 nop\.w + 91cc: f3af 8000 nop\.w + 91d0: f3af 8000 nop\.w + 91d4: f3af 8000 nop\.w + 91d8: f3af 8000 nop\.w + 91dc: f3af 8000 nop\.w + 91e0: f3af 8000 nop\.w + 91e4: f3af 8000 nop\.w + 91e8: f3af 8000 nop\.w + 91ec: f3af 8000 nop\.w + 91f0: f3af 8000 nop\.w + 91f4: f3af 8000 nop\.w + 91f8: f3af 8000 nop\.w + 91fc: f3af 8000 nop\.w + 9200: f3af 8000 nop\.w + 9204: f3af 8000 nop\.w + 9208: f3af 8000 nop\.w + 920c: f3af 8000 nop\.w + 9210: f3af 8000 nop\.w + 9214: f3af 8000 nop\.w + 9218: f3af 8000 nop\.w + 921c: f3af 8000 nop\.w + 9220: f3af 8000 nop\.w + 9224: f3af 8000 nop\.w + 9228: f3af 8000 nop\.w + 922c: f3af 8000 nop\.w + 9230: f3af 8000 nop\.w + 9234: f3af 8000 nop\.w + 9238: f3af 8000 nop\.w + 923c: f3af 8000 nop\.w + 9240: f3af 8000 nop\.w + 9244: f3af 8000 nop\.w + 9248: f3af 8000 nop\.w + 924c: f3af 8000 nop\.w + 9250: f3af 8000 nop\.w + 9254: f3af 8000 nop\.w + 9258: f3af 8000 nop\.w + 925c: f3af 8000 nop\.w + 9260: f3af 8000 nop\.w + 9264: f3af 8000 nop\.w + 9268: f3af 8000 nop\.w + 926c: f3af 8000 nop\.w + 9270: f3af 8000 nop\.w + 9274: f3af 8000 nop\.w + 9278: f3af 8000 nop\.w + 927c: f3af 8000 nop\.w + 9280: f3af 8000 nop\.w + 9284: f3af 8000 nop\.w + 9288: f3af 8000 nop\.w + 928c: f3af 8000 nop\.w + 9290: f3af 8000 nop\.w + 9294: f3af 8000 nop\.w + 9298: f3af 8000 nop\.w + 929c: f3af 8000 nop\.w + 92a0: f3af 8000 nop\.w + 92a4: f3af 8000 nop\.w + 92a8: f3af 8000 nop\.w + 92ac: f3af 8000 nop\.w + 92b0: f3af 8000 nop\.w + 92b4: f3af 8000 nop\.w + 92b8: f3af 8000 nop\.w + 92bc: f3af 8000 nop\.w + 92c0: f3af 8000 nop\.w + 92c4: f3af 8000 nop\.w + 92c8: f3af 8000 nop\.w + 92cc: f3af 8000 nop\.w + 92d0: f3af 8000 nop\.w + 92d4: f3af 8000 nop\.w + 92d8: f3af 8000 nop\.w + 92dc: f3af 8000 nop\.w + 92e0: f3af 8000 nop\.w + 92e4: f3af 8000 nop\.w + 92e8: f3af 8000 nop\.w + 92ec: f3af 8000 nop\.w + 92f0: f3af 8000 nop\.w + 92f4: f3af 8000 nop\.w + 92f8: f3af 8000 nop\.w + 92fc: f3af 8000 nop\.w + 9300: f3af 8000 nop\.w + 9304: f3af 8000 nop\.w + 9308: f3af 8000 nop\.w + 930c: f3af 8000 nop\.w + 9310: f3af 8000 nop\.w + 9314: f3af 8000 nop\.w + 9318: f3af 8000 nop\.w + 931c: f3af 8000 nop\.w + 9320: f3af 8000 nop\.w + 9324: f3af 8000 nop\.w + 9328: f3af 8000 nop\.w + 932c: f3af 8000 nop\.w + 9330: f3af 8000 nop\.w + 9334: f3af 8000 nop\.w + 9338: f3af 8000 nop\.w + 933c: f3af 8000 nop\.w + 9340: f3af 8000 nop\.w + 9344: f3af 8000 nop\.w + 9348: f3af 8000 nop\.w + 934c: f3af 8000 nop\.w + 9350: f3af 8000 nop\.w + 9354: f3af 8000 nop\.w + 9358: f3af 8000 nop\.w + 935c: f3af 8000 nop\.w + 9360: f3af 8000 nop\.w + 9364: f3af 8000 nop\.w + 9368: f3af 8000 nop\.w + 936c: f3af 8000 nop\.w + 9370: f3af 8000 nop\.w + 9374: f3af 8000 nop\.w + 9378: f3af 8000 nop\.w + 937c: f3af 8000 nop\.w + 9380: f3af 8000 nop\.w + 9384: f3af 8000 nop\.w + 9388: f3af 8000 nop\.w + 938c: f3af 8000 nop\.w + 9390: f3af 8000 nop\.w + 9394: f3af 8000 nop\.w + 9398: f3af 8000 nop\.w + 939c: f3af 8000 nop\.w + 93a0: f3af 8000 nop\.w + 93a4: f3af 8000 nop\.w + 93a8: f3af 8000 nop\.w + 93ac: f3af 8000 nop\.w + 93b0: f3af 8000 nop\.w + 93b4: f3af 8000 nop\.w + 93b8: f3af 8000 nop\.w + 93bc: f3af 8000 nop\.w + 93c0: f3af 8000 nop\.w + 93c4: f3af 8000 nop\.w + 93c8: f3af 8000 nop\.w + 93cc: f3af 8000 nop\.w + 93d0: f3af 8000 nop\.w + 93d4: f3af 8000 nop\.w + 93d8: f3af 8000 nop\.w + 93dc: f3af 8000 nop\.w + 93e0: f3af 8000 nop\.w + 93e4: f3af 8000 nop\.w + 93e8: f3af 8000 nop\.w + 93ec: f3af 8000 nop\.w + 93f0: f3af 8000 nop\.w + 93f4: f3af 8000 nop\.w + 93f8: f3af 8000 nop\.w + 93fc: f3af 8000 nop\.w + 9400: f3af 8000 nop\.w + 9404: f3af 8000 nop\.w + 9408: f3af 8000 nop\.w + 940c: f3af 8000 nop\.w + 9410: f3af 8000 nop\.w + 9414: f3af 8000 nop\.w + 9418: f3af 8000 nop\.w + 941c: f3af 8000 nop\.w + 9420: f3af 8000 nop\.w + 9424: f3af 8000 nop\.w + 9428: f3af 8000 nop\.w + 942c: f3af 8000 nop\.w + 9430: f3af 8000 nop\.w + 9434: f3af 8000 nop\.w + 9438: f3af 8000 nop\.w + 943c: f3af 8000 nop\.w + 9440: f3af 8000 nop\.w + 9444: f3af 8000 nop\.w + 9448: f3af 8000 nop\.w + 944c: f3af 8000 nop\.w + 9450: f3af 8000 nop\.w + 9454: f3af 8000 nop\.w + 9458: f3af 8000 nop\.w + 945c: f3af 8000 nop\.w + 9460: f3af 8000 nop\.w + 9464: f3af 8000 nop\.w + 9468: f3af 8000 nop\.w + 946c: f3af 8000 nop\.w + 9470: f3af 8000 nop\.w + 9474: f3af 8000 nop\.w + 9478: f3af 8000 nop\.w + 947c: f3af 8000 nop\.w + 9480: f3af 8000 nop\.w + 9484: f3af 8000 nop\.w + 9488: f3af 8000 nop\.w + 948c: f3af 8000 nop\.w + 9490: f3af 8000 nop\.w + 9494: f3af 8000 nop\.w + 9498: f3af 8000 nop\.w + 949c: f3af 8000 nop\.w + 94a0: f3af 8000 nop\.w + 94a4: f3af 8000 nop\.w + 94a8: f3af 8000 nop\.w + 94ac: f3af 8000 nop\.w + 94b0: f3af 8000 nop\.w + 94b4: f3af 8000 nop\.w + 94b8: f3af 8000 nop\.w + 94bc: f3af 8000 nop\.w + 94c0: f3af 8000 nop\.w + 94c4: f3af 8000 nop\.w + 94c8: f3af 8000 nop\.w + 94cc: f3af 8000 nop\.w + 94d0: f3af 8000 nop\.w + 94d4: f3af 8000 nop\.w + 94d8: f3af 8000 nop\.w + 94dc: f3af 8000 nop\.w + 94e0: f3af 8000 nop\.w + 94e4: f3af 8000 nop\.w + 94e8: f3af 8000 nop\.w + 94ec: f3af 8000 nop\.w + 94f0: f3af 8000 nop\.w + 94f4: f3af 8000 nop\.w + 94f8: f3af 8000 nop\.w + 94fc: f3af 8000 nop\.w + 9500: f3af 8000 nop\.w + 9504: f3af 8000 nop\.w + 9508: f3af 8000 nop\.w + 950c: f3af 8000 nop\.w + 9510: f3af 8000 nop\.w + 9514: f3af 8000 nop\.w + 9518: f3af 8000 nop\.w + 951c: f3af 8000 nop\.w + 9520: f3af 8000 nop\.w + 9524: f3af 8000 nop\.w + 9528: f3af 8000 nop\.w + 952c: f3af 8000 nop\.w + 9530: f3af 8000 nop\.w + 9534: f3af 8000 nop\.w + 9538: f3af 8000 nop\.w + 953c: f3af 8000 nop\.w + 9540: f3af 8000 nop\.w + 9544: f3af 8000 nop\.w + 9548: f3af 8000 nop\.w + 954c: f3af 8000 nop\.w + 9550: f3af 8000 nop\.w + 9554: f3af 8000 nop\.w + 9558: f3af 8000 nop\.w + 955c: f3af 8000 nop\.w + 9560: f3af 8000 nop\.w + 9564: f3af 8000 nop\.w + 9568: f3af 8000 nop\.w + 956c: f3af 8000 nop\.w + 9570: f3af 8000 nop\.w + 9574: f3af 8000 nop\.w + 9578: f3af 8000 nop\.w + 957c: f3af 8000 nop\.w + 9580: f3af 8000 nop\.w + 9584: f3af 8000 nop\.w + 9588: f3af 8000 nop\.w + 958c: f3af 8000 nop\.w + 9590: f3af 8000 nop\.w + 9594: f3af 8000 nop\.w + 9598: f3af 8000 nop\.w + 959c: f3af 8000 nop\.w + 95a0: f3af 8000 nop\.w + 95a4: f3af 8000 nop\.w + 95a8: f3af 8000 nop\.w + 95ac: f3af 8000 nop\.w + 95b0: f3af 8000 nop\.w + 95b4: f3af 8000 nop\.w + 95b8: f3af 8000 nop\.w + 95bc: f3af 8000 nop\.w + 95c0: f3af 8000 nop\.w + 95c4: f3af 8000 nop\.w + 95c8: f3af 8000 nop\.w + 95cc: f3af 8000 nop\.w + 95d0: f3af 8000 nop\.w + 95d4: f3af 8000 nop\.w + 95d8: f3af 8000 nop\.w + 95dc: f3af 8000 nop\.w + 95e0: f3af 8000 nop\.w + 95e4: f3af 8000 nop\.w + 95e8: f3af 8000 nop\.w + 95ec: f3af 8000 nop\.w + 95f0: f3af 8000 nop\.w + 95f4: f3af 8000 nop\.w + 95f8: f3af 8000 nop\.w + 95fc: f3af 8000 nop\.w + 9600: f3af 8000 nop\.w + 9604: f3af 8000 nop\.w + 9608: f3af 8000 nop\.w + 960c: f3af 8000 nop\.w + 9610: f3af 8000 nop\.w + 9614: f3af 8000 nop\.w + 9618: f3af 8000 nop\.w + 961c: f3af 8000 nop\.w + 9620: f3af 8000 nop\.w + 9624: f3af 8000 nop\.w + 9628: f3af 8000 nop\.w + 962c: f3af 8000 nop\.w + 9630: f3af 8000 nop\.w + 9634: f3af 8000 nop\.w + 9638: f3af 8000 nop\.w + 963c: f3af 8000 nop\.w + 9640: f3af 8000 nop\.w + 9644: f3af 8000 nop\.w + 9648: f3af 8000 nop\.w + 964c: f3af 8000 nop\.w + 9650: f3af 8000 nop\.w + 9654: f3af 8000 nop\.w + 9658: f3af 8000 nop\.w + 965c: f3af 8000 nop\.w + 9660: f3af 8000 nop\.w + 9664: f3af 8000 nop\.w + 9668: f3af 8000 nop\.w + 966c: f3af 8000 nop\.w + 9670: f3af 8000 nop\.w + 9674: f3af 8000 nop\.w + 9678: f3af 8000 nop\.w + 967c: f3af 8000 nop\.w + 9680: f3af 8000 nop\.w + 9684: f3af 8000 nop\.w + 9688: f3af 8000 nop\.w + 968c: f3af 8000 nop\.w + 9690: f3af 8000 nop\.w + 9694: f3af 8000 nop\.w + 9698: f3af 8000 nop\.w + 969c: f3af 8000 nop\.w + 96a0: f3af 8000 nop\.w + 96a4: f3af 8000 nop\.w + 96a8: f3af 8000 nop\.w + 96ac: f3af 8000 nop\.w + 96b0: f3af 8000 nop\.w + 96b4: f3af 8000 nop\.w + 96b8: f3af 8000 nop\.w + 96bc: f3af 8000 nop\.w + 96c0: f3af 8000 nop\.w + 96c4: f3af 8000 nop\.w + 96c8: f3af 8000 nop\.w + 96cc: f3af 8000 nop\.w + 96d0: f3af 8000 nop\.w + 96d4: f3af 8000 nop\.w + 96d8: f3af 8000 nop\.w + 96dc: f3af 8000 nop\.w + 96e0: f3af 8000 nop\.w + 96e4: f3af 8000 nop\.w + 96e8: f3af 8000 nop\.w + 96ec: f3af 8000 nop\.w + 96f0: f3af 8000 nop\.w + 96f4: f3af 8000 nop\.w + 96f8: f3af 8000 nop\.w + 96fc: f3af 8000 nop\.w + 9700: f3af 8000 nop\.w + 9704: f3af 8000 nop\.w + 9708: f3af 8000 nop\.w + 970c: f3af 8000 nop\.w + 9710: f3af 8000 nop\.w + 9714: f3af 8000 nop\.w + 9718: f3af 8000 nop\.w + 971c: f3af 8000 nop\.w + 9720: f3af 8000 nop\.w + 9724: f3af 8000 nop\.w + 9728: f3af 8000 nop\.w + 972c: f3af 8000 nop\.w + 9730: f3af 8000 nop\.w + 9734: f3af 8000 nop\.w + 9738: f3af 8000 nop\.w + 973c: f3af 8000 nop\.w + 9740: f3af 8000 nop\.w + 9744: f3af 8000 nop\.w + 9748: f3af 8000 nop\.w + 974c: f3af 8000 nop\.w + 9750: f3af 8000 nop\.w + 9754: f3af 8000 nop\.w + 9758: f3af 8000 nop\.w + 975c: f3af 8000 nop\.w + 9760: f3af 8000 nop\.w + 9764: f3af 8000 nop\.w + 9768: f3af 8000 nop\.w + 976c: f3af 8000 nop\.w + 9770: f3af 8000 nop\.w + 9774: f3af 8000 nop\.w + 9778: f3af 8000 nop\.w + 977c: f3af 8000 nop\.w + 9780: f3af 8000 nop\.w + 9784: f3af 8000 nop\.w + 9788: f3af 8000 nop\.w + 978c: f3af 8000 nop\.w + 9790: f3af 8000 nop\.w + 9794: f3af 8000 nop\.w + 9798: f3af 8000 nop\.w + 979c: f3af 8000 nop\.w + 97a0: f3af 8000 nop\.w + 97a4: f3af 8000 nop\.w + 97a8: f3af 8000 nop\.w + 97ac: f3af 8000 nop\.w + 97b0: f3af 8000 nop\.w + 97b4: f3af 8000 nop\.w + 97b8: f3af 8000 nop\.w + 97bc: f3af 8000 nop\.w + 97c0: f3af 8000 nop\.w + 97c4: f3af 8000 nop\.w + 97c8: f3af 8000 nop\.w + 97cc: f3af 8000 nop\.w + 97d0: f3af 8000 nop\.w + 97d4: f3af 8000 nop\.w + 97d8: f3af 8000 nop\.w + 97dc: f3af 8000 nop\.w + 97e0: f3af 8000 nop\.w + 97e4: f3af 8000 nop\.w + 97e8: f3af 8000 nop\.w + 97ec: f3af 8000 nop\.w + 97f0: f3af 8000 nop\.w + 97f4: f3af 8000 nop\.w + 97f8: f3af 8000 nop\.w + 97fc: f3af 8000 nop\.w + 9800: f3af 8000 nop\.w + 9804: f3af 8000 nop\.w + 9808: f3af 8000 nop\.w + 980c: f3af 8000 nop\.w + 9810: f3af 8000 nop\.w + 9814: f3af 8000 nop\.w + 9818: f3af 8000 nop\.w + 981c: f3af 8000 nop\.w + 9820: f3af 8000 nop\.w + 9824: f3af 8000 nop\.w + 9828: f3af 8000 nop\.w + 982c: f3af 8000 nop\.w + 9830: f3af 8000 nop\.w + 9834: f3af 8000 nop\.w + 9838: f3af 8000 nop\.w + 983c: f3af 8000 nop\.w + 9840: f3af 8000 nop\.w + 9844: f3af 8000 nop\.w + 9848: f3af 8000 nop\.w + 984c: f3af 8000 nop\.w + 9850: f3af 8000 nop\.w + 9854: f3af 8000 nop\.w + 9858: f3af 8000 nop\.w + 985c: f3af 8000 nop\.w + 9860: f3af 8000 nop\.w + 9864: f3af 8000 nop\.w + 9868: f3af 8000 nop\.w + 986c: f3af 8000 nop\.w + 9870: f3af 8000 nop\.w + 9874: f3af 8000 nop\.w + 9878: f3af 8000 nop\.w + 987c: f3af 8000 nop\.w + 9880: f3af 8000 nop\.w + 9884: f3af 8000 nop\.w + 9888: f3af 8000 nop\.w + 988c: f3af 8000 nop\.w + 9890: f3af 8000 nop\.w + 9894: f3af 8000 nop\.w + 9898: f3af 8000 nop\.w + 989c: f3af 8000 nop\.w + 98a0: f3af 8000 nop\.w + 98a4: f3af 8000 nop\.w + 98a8: f3af 8000 nop\.w + 98ac: f3af 8000 nop\.w + 98b0: f3af 8000 nop\.w + 98b4: f3af 8000 nop\.w + 98b8: f3af 8000 nop\.w + 98bc: f3af 8000 nop\.w + 98c0: f3af 8000 nop\.w + 98c4: f3af 8000 nop\.w + 98c8: f3af 8000 nop\.w + 98cc: f3af 8000 nop\.w + 98d0: f3af 8000 nop\.w + 98d4: f3af 8000 nop\.w + 98d8: f3af 8000 nop\.w + 98dc: f3af 8000 nop\.w + 98e0: f3af 8000 nop\.w + 98e4: f3af 8000 nop\.w + 98e8: f3af 8000 nop\.w + 98ec: f3af 8000 nop\.w + 98f0: f3af 8000 nop\.w + 98f4: f3af 8000 nop\.w + 98f8: f3af 8000 nop\.w + 98fc: f3af 8000 nop\.w + 9900: f3af 8000 nop\.w + 9904: f3af 8000 nop\.w + 9908: f3af 8000 nop\.w + 990c: f3af 8000 nop\.w + 9910: f3af 8000 nop\.w + 9914: f3af 8000 nop\.w + 9918: f3af 8000 nop\.w + 991c: f3af 8000 nop\.w + 9920: f3af 8000 nop\.w + 9924: f3af 8000 nop\.w + 9928: f3af 8000 nop\.w + 992c: f3af 8000 nop\.w + 9930: f3af 8000 nop\.w + 9934: f3af 8000 nop\.w + 9938: f3af 8000 nop\.w + 993c: f3af 8000 nop\.w + 9940: f3af 8000 nop\.w + 9944: f3af 8000 nop\.w + 9948: f3af 8000 nop\.w + 994c: f3af 8000 nop\.w + 9950: f3af 8000 nop\.w + 9954: f3af 8000 nop\.w + 9958: f3af 8000 nop\.w + 995c: f3af 8000 nop\.w + 9960: f3af 8000 nop\.w + 9964: f3af 8000 nop\.w + 9968: f3af 8000 nop\.w + 996c: f3af 8000 nop\.w + 9970: f3af 8000 nop\.w + 9974: f3af 8000 nop\.w + 9978: f3af 8000 nop\.w + 997c: f3af 8000 nop\.w + 9980: f3af 8000 nop\.w + 9984: f3af 8000 nop\.w + 9988: f3af 8000 nop\.w + 998c: f3af 8000 nop\.w + 9990: f3af 8000 nop\.w + 9994: f3af 8000 nop\.w + 9998: f3af 8000 nop\.w + 999c: f3af 8000 nop\.w + 99a0: f3af 8000 nop\.w + 99a4: f3af 8000 nop\.w + 99a8: f3af 8000 nop\.w + 99ac: f3af 8000 nop\.w + 99b0: f3af 8000 nop\.w + 99b4: f3af 8000 nop\.w + 99b8: f3af 8000 nop\.w + 99bc: f3af 8000 nop\.w + 99c0: f3af 8000 nop\.w + 99c4: f3af 8000 nop\.w + 99c8: f3af 8000 nop\.w + 99cc: f3af 8000 nop\.w + 99d0: f3af 8000 nop\.w + 99d4: f3af 8000 nop\.w + 99d8: f3af 8000 nop\.w + 99dc: f3af 8000 nop\.w + 99e0: f3af 8000 nop\.w + 99e4: f3af 8000 nop\.w + 99e8: f3af 8000 nop\.w + 99ec: f3af 8000 nop\.w + 99f0: f3af 8000 nop\.w + 99f4: f3af 8000 nop\.w + 99f8: f3af 8000 nop\.w + 99fc: f3af 8000 nop\.w + 9a00: f3af 8000 nop\.w + 9a04: f3af 8000 nop\.w + 9a08: f3af 8000 nop\.w + 9a0c: f3af 8000 nop\.w + 9a10: f3af 8000 nop\.w + 9a14: f3af 8000 nop\.w + 9a18: f3af 8000 nop\.w + 9a1c: f3af 8000 nop\.w + 9a20: f3af 8000 nop\.w + 9a24: f3af 8000 nop\.w + 9a28: f3af 8000 nop\.w + 9a2c: f3af 8000 nop\.w + 9a30: f3af 8000 nop\.w + 9a34: f3af 8000 nop\.w + 9a38: f3af 8000 nop\.w + 9a3c: f3af 8000 nop\.w + 9a40: f3af 8000 nop\.w + 9a44: f3af 8000 nop\.w + 9a48: f3af 8000 nop\.w + 9a4c: f3af 8000 nop\.w + 9a50: f3af 8000 nop\.w + 9a54: f3af 8000 nop\.w + 9a58: f3af 8000 nop\.w + 9a5c: f3af 8000 nop\.w + 9a60: f3af 8000 nop\.w + 9a64: f3af 8000 nop\.w + 9a68: f3af 8000 nop\.w + 9a6c: f3af 8000 nop\.w + 9a70: f3af 8000 nop\.w + 9a74: f3af 8000 nop\.w + 9a78: f3af 8000 nop\.w + 9a7c: f3af 8000 nop\.w + 9a80: f3af 8000 nop\.w + 9a84: f3af 8000 nop\.w + 9a88: f3af 8000 nop\.w + 9a8c: f3af 8000 nop\.w + 9a90: f3af 8000 nop\.w + 9a94: f3af 8000 nop\.w + 9a98: f3af 8000 nop\.w + 9a9c: f3af 8000 nop\.w + 9aa0: f3af 8000 nop\.w + 9aa4: f3af 8000 nop\.w + 9aa8: f3af 8000 nop\.w + 9aac: f3af 8000 nop\.w + 9ab0: f3af 8000 nop\.w + 9ab4: f3af 8000 nop\.w + 9ab8: f3af 8000 nop\.w + 9abc: f3af 8000 nop\.w + 9ac0: f3af 8000 nop\.w + 9ac4: f3af 8000 nop\.w + 9ac8: f3af 8000 nop\.w + 9acc: f3af 8000 nop\.w + 9ad0: f3af 8000 nop\.w + 9ad4: f3af 8000 nop\.w + 9ad8: f3af 8000 nop\.w + 9adc: f3af 8000 nop\.w + 9ae0: f3af 8000 nop\.w + 9ae4: f3af 8000 nop\.w + 9ae8: f3af 8000 nop\.w + 9aec: f3af 8000 nop\.w + 9af0: f3af 8000 nop\.w + 9af4: f3af 8000 nop\.w + 9af8: f3af 8000 nop\.w + 9afc: f3af 8000 nop\.w + 9b00: f3af 8000 nop\.w + 9b04: f3af 8000 nop\.w + 9b08: f3af 8000 nop\.w + 9b0c: f3af 8000 nop\.w + 9b10: f3af 8000 nop\.w + 9b14: f3af 8000 nop\.w + 9b18: f3af 8000 nop\.w + 9b1c: f3af 8000 nop\.w + 9b20: f3af 8000 nop\.w + 9b24: f3af 8000 nop\.w + 9b28: f3af 8000 nop\.w + 9b2c: f3af 8000 nop\.w + 9b30: f3af 8000 nop\.w + 9b34: f3af 8000 nop\.w + 9b38: f3af 8000 nop\.w + 9b3c: f3af 8000 nop\.w + 9b40: f3af 8000 nop\.w + 9b44: f3af 8000 nop\.w + 9b48: f3af 8000 nop\.w + 9b4c: f3af 8000 nop\.w + 9b50: f3af 8000 nop\.w + 9b54: f3af 8000 nop\.w + 9b58: f3af 8000 nop\.w + 9b5c: f3af 8000 nop\.w + 9b60: f3af 8000 nop\.w + 9b64: f3af 8000 nop\.w + 9b68: f3af 8000 nop\.w + 9b6c: f3af 8000 nop\.w + 9b70: f3af 8000 nop\.w + 9b74: f3af 8000 nop\.w + 9b78: f3af 8000 nop\.w + 9b7c: f3af 8000 nop\.w + 9b80: f3af 8000 nop\.w + 9b84: f3af 8000 nop\.w + 9b88: f3af 8000 nop\.w + 9b8c: f3af 8000 nop\.w + 9b90: f3af 8000 nop\.w + 9b94: f3af 8000 nop\.w + 9b98: f3af 8000 nop\.w + 9b9c: f3af 8000 nop\.w + 9ba0: f3af 8000 nop\.w + 9ba4: f3af 8000 nop\.w + 9ba8: f3af 8000 nop\.w + 9bac: f3af 8000 nop\.w + 9bb0: f3af 8000 nop\.w + 9bb4: f3af 8000 nop\.w + 9bb8: f3af 8000 nop\.w + 9bbc: f3af 8000 nop\.w + 9bc0: f3af 8000 nop\.w + 9bc4: f3af 8000 nop\.w + 9bc8: f3af 8000 nop\.w + 9bcc: f3af 8000 nop\.w + 9bd0: f3af 8000 nop\.w + 9bd4: f3af 8000 nop\.w + 9bd8: f3af 8000 nop\.w + 9bdc: f3af 8000 nop\.w + 9be0: f3af 8000 nop\.w + 9be4: f3af 8000 nop\.w + 9be8: f3af 8000 nop\.w + 9bec: f3af 8000 nop\.w + 9bf0: f3af 8000 nop\.w + 9bf4: f3af 8000 nop\.w + 9bf8: f3af 8000 nop\.w + 9bfc: f3af 8000 nop\.w + 9c00: f3af 8000 nop\.w + 9c04: f3af 8000 nop\.w + 9c08: f3af 8000 nop\.w + 9c0c: f3af 8000 nop\.w + 9c10: f3af 8000 nop\.w + 9c14: f3af 8000 nop\.w + 9c18: f3af 8000 nop\.w + 9c1c: f3af 8000 nop\.w + 9c20: f3af 8000 nop\.w + 9c24: f3af 8000 nop\.w + 9c28: f3af 8000 nop\.w + 9c2c: f3af 8000 nop\.w + 9c30: f3af 8000 nop\.w + 9c34: f3af 8000 nop\.w + 9c38: f3af 8000 nop\.w + 9c3c: f3af 8000 nop\.w + 9c40: f3af 8000 nop\.w + 9c44: f3af 8000 nop\.w + 9c48: f3af 8000 nop\.w + 9c4c: f3af 8000 nop\.w + 9c50: f3af 8000 nop\.w + 9c54: f3af 8000 nop\.w + 9c58: f3af 8000 nop\.w + 9c5c: f3af 8000 nop\.w + 9c60: f3af 8000 nop\.w + 9c64: f3af 8000 nop\.w + 9c68: f3af 8000 nop\.w + 9c6c: f3af 8000 nop\.w + 9c70: f3af 8000 nop\.w + 9c74: f3af 8000 nop\.w + 9c78: f3af 8000 nop\.w + 9c7c: f3af 8000 nop\.w + 9c80: f3af 8000 nop\.w + 9c84: f3af 8000 nop\.w + 9c88: f3af 8000 nop\.w + 9c8c: f3af 8000 nop\.w + 9c90: f3af 8000 nop\.w + 9c94: f3af 8000 nop\.w + 9c98: f3af 8000 nop\.w + 9c9c: f3af 8000 nop\.w + 9ca0: f3af 8000 nop\.w + 9ca4: f3af 8000 nop\.w + 9ca8: f3af 8000 nop\.w + 9cac: f3af 8000 nop\.w + 9cb0: f3af 8000 nop\.w + 9cb4: f3af 8000 nop\.w + 9cb8: f3af 8000 nop\.w + 9cbc: f3af 8000 nop\.w + 9cc0: f3af 8000 nop\.w + 9cc4: f3af 8000 nop\.w + 9cc8: f3af 8000 nop\.w + 9ccc: f3af 8000 nop\.w + 9cd0: f3af 8000 nop\.w + 9cd4: f3af 8000 nop\.w + 9cd8: f3af 8000 nop\.w + 9cdc: f3af 8000 nop\.w + 9ce0: f3af 8000 nop\.w + 9ce4: f3af 8000 nop\.w + 9ce8: f3af 8000 nop\.w + 9cec: f3af 8000 nop\.w + 9cf0: f3af 8000 nop\.w + 9cf4: f3af 8000 nop\.w + 9cf8: f3af 8000 nop\.w + 9cfc: f3af 8000 nop\.w + 9d00: f3af 8000 nop\.w + 9d04: f3af 8000 nop\.w + 9d08: f3af 8000 nop\.w + 9d0c: f3af 8000 nop\.w + 9d10: f3af 8000 nop\.w + 9d14: f3af 8000 nop\.w + 9d18: f3af 8000 nop\.w + 9d1c: f3af 8000 nop\.w + 9d20: f3af 8000 nop\.w + 9d24: f3af 8000 nop\.w + 9d28: f3af 8000 nop\.w + 9d2c: f3af 8000 nop\.w + 9d30: f3af 8000 nop\.w + 9d34: f3af 8000 nop\.w + 9d38: f3af 8000 nop\.w + 9d3c: f3af 8000 nop\.w + 9d40: f3af 8000 nop\.w + 9d44: f3af 8000 nop\.w + 9d48: f3af 8000 nop\.w + 9d4c: f3af 8000 nop\.w + 9d50: f3af 8000 nop\.w + 9d54: f3af 8000 nop\.w + 9d58: f3af 8000 nop\.w + 9d5c: f3af 8000 nop\.w + 9d60: f3af 8000 nop\.w + 9d64: f3af 8000 nop\.w + 9d68: f3af 8000 nop\.w + 9d6c: f3af 8000 nop\.w + 9d70: f3af 8000 nop\.w + 9d74: f3af 8000 nop\.w + 9d78: f3af 8000 nop\.w + 9d7c: f3af 8000 nop\.w + 9d80: f3af 8000 nop\.w + 9d84: f3af 8000 nop\.w + 9d88: f3af 8000 nop\.w + 9d8c: f3af 8000 nop\.w + 9d90: f3af 8000 nop\.w + 9d94: f3af 8000 nop\.w + 9d98: f3af 8000 nop\.w + 9d9c: f3af 8000 nop\.w + 9da0: f3af 8000 nop\.w + 9da4: f3af 8000 nop\.w + 9da8: f3af 8000 nop\.w + 9dac: f3af 8000 nop\.w + 9db0: f3af 8000 nop\.w + 9db4: f3af 8000 nop\.w + 9db8: f3af 8000 nop\.w + 9dbc: f3af 8000 nop\.w + 9dc0: f3af 8000 nop\.w + 9dc4: f3af 8000 nop\.w + 9dc8: f3af 8000 nop\.w + 9dcc: f3af 8000 nop\.w + 9dd0: f3af 8000 nop\.w + 9dd4: f3af 8000 nop\.w + 9dd8: f3af 8000 nop\.w + 9ddc: f3af 8000 nop\.w + 9de0: f3af 8000 nop\.w + 9de4: f3af 8000 nop\.w + 9de8: f3af 8000 nop\.w + 9dec: f3af 8000 nop\.w + 9df0: f3af 8000 nop\.w + 9df4: f3af 8000 nop\.w + 9df8: f3af 8000 nop\.w + 9dfc: f3af 8000 nop\.w + 9e00: f3af 8000 nop\.w + 9e04: f3af 8000 nop\.w + 9e08: f3af 8000 nop\.w + 9e0c: f3af 8000 nop\.w + 9e10: f3af 8000 nop\.w + 9e14: f3af 8000 nop\.w + 9e18: f3af 8000 nop\.w + 9e1c: f3af 8000 nop\.w + 9e20: f3af 8000 nop\.w + 9e24: f3af 8000 nop\.w + 9e28: f3af 8000 nop\.w + 9e2c: f3af 8000 nop\.w + 9e30: f3af 8000 nop\.w + 9e34: f3af 8000 nop\.w + 9e38: f3af 8000 nop\.w + 9e3c: f3af 8000 nop\.w + 9e40: f3af 8000 nop\.w + 9e44: f3af 8000 nop\.w + 9e48: f3af 8000 nop\.w + 9e4c: f3af 8000 nop\.w + 9e50: f3af 8000 nop\.w + 9e54: f3af 8000 nop\.w + 9e58: f3af 8000 nop\.w + 9e5c: f3af 8000 nop\.w + 9e60: f3af 8000 nop\.w + 9e64: f3af 8000 nop\.w + 9e68: f3af 8000 nop\.w + 9e6c: f3af 8000 nop\.w + 9e70: f3af 8000 nop\.w + 9e74: f3af 8000 nop\.w + 9e78: f3af 8000 nop\.w + 9e7c: f3af 8000 nop\.w + 9e80: f3af 8000 nop\.w + 9e84: f3af 8000 nop\.w + 9e88: f3af 8000 nop\.w + 9e8c: f3af 8000 nop\.w + 9e90: f3af 8000 nop\.w + 9e94: f3af 8000 nop\.w + 9e98: f3af 8000 nop\.w + 9e9c: f3af 8000 nop\.w + 9ea0: f3af 8000 nop\.w + 9ea4: f3af 8000 nop\.w + 9ea8: f3af 8000 nop\.w + 9eac: f3af 8000 nop\.w + 9eb0: f3af 8000 nop\.w + 9eb4: f3af 8000 nop\.w + 9eb8: f3af 8000 nop\.w + 9ebc: f3af 8000 nop\.w + 9ec0: f3af 8000 nop\.w + 9ec4: f3af 8000 nop\.w + 9ec8: f3af 8000 nop\.w + 9ecc: f3af 8000 nop\.w + 9ed0: f3af 8000 nop\.w + 9ed4: f3af 8000 nop\.w + 9ed8: f3af 8000 nop\.w + 9edc: f3af 8000 nop\.w + 9ee0: f3af 8000 nop\.w + 9ee4: f3af 8000 nop\.w + 9ee8: f3af 8000 nop\.w + 9eec: f3af 8000 nop\.w + 9ef0: f3af 8000 nop\.w + 9ef4: f3af 8000 nop\.w + +00009ef8 <arm_target>: + 9ef8: e0843005 add r3, r4, r5 + 9efc: e12fff1e bx lr + +00009f00 <bl_insns>: + 9f00: bf00 nop + 9f02: eb01 0002 add\.w r0, r1, r2 + 9f06: f7ff eff8 blx 9ef8 <arm_target> + 9f0a: eb01 0002 add\.w r0, r1, r2 + 9f0e: f7ff eff4 blx 9ef8 <arm_target> + 9f12: eb01 0002 add\.w r0, r1, r2 + 9f16: f7ff eff0 blx 9ef8 <arm_target> + 9f1a: eb01 0002 add\.w r0, r1, r2 + 9f1e: f7ff efec blx 9ef8 <arm_target> + 9f22: eb01 0002 add\.w r0, r1, r2 + 9f26: f7ff efe8 blx 9ef8 <arm_target> + 9f2a: eb01 0002 add\.w r0, r1, r2 + 9f2e: f7ff efe4 blx 9ef8 <arm_target> + 9f32: eb01 0002 add\.w r0, r1, r2 + 9f36: f7ff efe0 blx 9ef8 <arm_target> + 9f3a: eb01 0002 add\.w r0, r1, r2 + 9f3e: f7ff efdc blx 9ef8 <arm_target> + 9f42: eb01 0002 add\.w r0, r1, r2 + 9f46: f7ff efd8 blx 9ef8 <arm_target> + 9f4a: eb01 0002 add\.w r0, r1, r2 + 9f4e: f7ff efd4 blx 9ef8 <arm_target> + 9f52: eb01 0002 add\.w r0, r1, r2 + 9f56: f7ff efd0 blx 9ef8 <arm_target> + 9f5a: eb01 0002 add\.w r0, r1, r2 + 9f5e: f7ff efcc blx 9ef8 <arm_target> + 9f62: eb01 0002 add\.w r0, r1, r2 + 9f66: f7ff efc8 blx 9ef8 <arm_target> + 9f6a: eb01 0002 add\.w r0, r1, r2 + 9f6e: f7ff efc4 blx 9ef8 <arm_target> + 9f72: eb01 0002 add\.w r0, r1, r2 + 9f76: f7ff efc0 blx 9ef8 <arm_target> + 9f7a: eb01 0002 add\.w r0, r1, r2 + 9f7e: f7ff efbc blx 9ef8 <arm_target> + 9f82: eb01 0002 add\.w r0, r1, r2 + 9f86: f7ff efb8 blx 9ef8 <arm_target> + 9f8a: eb01 0002 add\.w r0, r1, r2 + 9f8e: f7ff efb4 blx 9ef8 <arm_target> + 9f92: eb01 0002 add\.w r0, r1, r2 + 9f96: f7ff efb0 blx 9ef8 <arm_target> + 9f9a: eb01 0002 add\.w r0, r1, r2 + 9f9e: f7ff efac blx 9ef8 <arm_target> + 9fa2: eb01 0002 add\.w r0, r1, r2 + 9fa6: f7ff efa8 blx 9ef8 <arm_target> + 9faa: eb01 0002 add\.w r0, r1, r2 + 9fae: f7ff efa4 blx 9ef8 <arm_target> + 9fb2: eb01 0002 add\.w r0, r1, r2 + 9fb6: f7ff efa0 blx 9ef8 <arm_target> + 9fba: eb01 0002 add\.w r0, r1, r2 + 9fbe: f7ff ef9c blx 9ef8 <arm_target> + 9fc2: eb01 0002 add\.w r0, r1, r2 + 9fc6: f7ff ef98 blx 9ef8 <arm_target> + 9fca: eb01 0002 add\.w r0, r1, r2 + 9fce: f7ff ef94 blx 9ef8 <arm_target> + 9fd2: eb01 0002 add\.w r0, r1, r2 + 9fd6: f7ff ef90 blx 9ef8 <arm_target> + 9fda: eb01 0002 add\.w r0, r1, r2 + 9fde: f7ff ef8c blx 9ef8 <arm_target> + 9fe2: eb01 0002 add\.w r0, r1, r2 + 9fe6: f7ff ef88 blx 9ef8 <arm_target> + 9fea: eb01 0002 add\.w r0, r1, r2 + 9fee: f7ff ef84 blx 9ef8 <arm_target> + 9ff2: eb01 0002 add\.w r0, r1, r2 + 9ff6: f7ff ef80 blx 9ef8 <arm_target> + 9ffa: eb01 0002 add\.w r0, r1, r2 + 9ffe: f000 e804 blx a008 <bl_insns\+0x108> + a002: 4770 bx lr + a004: f3af 8000 nop\.w + a008: eaffffba b 9ef8 <arm_target> + a00c: d101 bne\.n a012 <bl_insns\+0x112> + a00e: f7fe bff8 b\.w 9002 <_start\+0x102> + a012: f7fe bfe6 b\.w 8fe2 <_start\+0xe2> diff --git a/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.s b/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.s new file mode 100644 index 0000000..cb40fb4 --- /dev/null +++ b/binutils-2.19/ld/testsuite/ld-arm/cortex-a8-fix-blx-bcond.s @@ -0,0 +1,81 @@ + .syntax unified + .cpu cortex-a8 + .thumb + .text + + @ expansion 32 bytes + .macro bw1 +1: + add.w r0, r1, r2 + blx.w arm_target + add.w r0, r1, r2 + blx.w arm_target + add.w r0, r1, r2 + blx.w arm_target + add.w r0, r1, r2 + blx.w arm_target + .endm + + @ expansion 128 bytes + .macro bw2 + bw1 + bw1 + bw1 + bw1 + .endm + + @ expansion 32 bytes + .macro bw3 +1: + add.w r0, r1, r2 + bne.w 1b + add.w r0, r1, r2 + bne.w 1b + add.w r0, r1, r2 + bne.w 1b + add.w r0, r1, r2 + bne.w 1b + .endm + + @ expansion 128 bytes + .macro bw4 + bw3 + bw3 + bw3 + bw3 + .endm + + .align 3 + .global _start + + .thumb + .thumb_func + .type _start, %function +_start: + nop + + @ Trigger Cortex-A8 erratum workaround with b<cond> instructions. + bw4 + bw4 + + nop + + .rept 957 + nop.w + .endr + + .arm +arm_target: + add r3, r4, r5 + bx lr + + .thumb +bl_insns: + + nop + + @ ...and again with bl instructions. + bw2 + bw2 + + bx lr diff --git a/binutils-2.19/opcodes/arm-dis.c b/binutils-2.19/opcodes/arm-dis.c index 155e495..95ba822 100644 --- a/binutils-2.19/opcodes/arm-dis.c +++ b/binutils-2.19/opcodes/arm-dis.c @@ -2906,15 +2906,32 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given) break; case 'U': - switch (given & 0xf) + if ((given & 0xf0) == 0x60) { - case 0xf: func(stream, "sy"); break; - case 0x7: func(stream, "un"); break; - case 0xe: func(stream, "st"); break; - case 0x6: func(stream, "unst"); break; - default: - func(stream, "#%d", (int)given & 0xf); - break; + switch (given & 0xf) + { + case 0xf: func (stream, "sy"); break; + default: + func (stream, "#%d", (int) given & 0xf); + break; + } + } + else + { + switch (given & 0xf) + { + case 0xf: func (stream, "sy"); break; + case 0x7: func (stream, "un"); break; + case 0xe: func (stream, "st"); break; + case 0x6: func (stream, "unst"); break; + case 0xb: func (stream, "ish"); break; + case 0xa: func (stream, "ishst"); break; + case 0x3: func (stream, "osh"); break; + case 0x2: func (stream, "oshst"); break; + default: + func (stream, "#%d", (int) given & 0xf); + break; + } } break; @@ -3663,16 +3680,33 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) break; case 'U': - switch (given & 0xf) + if ((given & 0xf0) == 0x60) { - case 0xf: func(stream, "sy"); break; - case 0x7: func(stream, "un"); break; - case 0xe: func(stream, "st"); break; - case 0x6: func(stream, "unst"); break; - default: - func(stream, "#%d", (int)given & 0xf); - break; + switch (given & 0xf) + { + case 0xf: func (stream, "sy"); break; + default: + func (stream, "#%d", (int) given & 0xf); + break; + } } + else + { + switch (given & 0xf) + { + case 0xf: func (stream, "sy"); break; + case 0x7: func (stream, "un"); break; + case 0xe: func (stream, "st"); break; + case 0x6: func (stream, "unst"); break; + case 0xb: func (stream, "ish"); break; + case 0xa: func (stream, "ishst"); break; + case 0x3: func (stream, "osh"); break; + case 0x2: func (stream, "oshst"); break; + default: + func (stream, "#%d", (int) given & 0xf); + break; + } + } break; case 'C': |