aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2016-08-19Place .shstrtab section after .symtab and .strtab, thus restoring ↵Nick Clifton2-7/+12
monotonically increasing section offsets. bfd * elf.c (assign_section_numbers): Assign number for the .shstrtab section after the symbol table and string table sections. binutils * testsuite/binutils-all/readelf.s: Adjust expected ordering of sections. * testsuite/binutils-all/readelf.s-64: Likewise. gas * testsuite/gas/i386/ilp32/x86-64-unwind.d: Adjust expected ordering of sections. * testsuite/gas/i386/x86-64-unwind.d: Likewise. * testsuite/gas/ia64/alias-ilp32.d: Likewise. * testsuite/gas/ia64/alias.d: Likewise. * testsuite/gas/ia64/group-1.d: Likewise. * testsuite/gas/ia64/group-2.d: Likewise. * testsuite/gas/ia64/secname-ilp32.d: Likewise. * testsuite/gas/ia64/secname.d: Likewise. * testsuite/gas/ia64/unwind-ilp32.d: Likewise. * testsuite/gas/ia64/unwind.d: Likewise. * testsuite/gas/ia64/xdata-ilp32.d: Likewise. * testsuite/gas/ia64/xdata.d: Likewise. * testsuite/gas/mmix/bspec-1.d: Likewise. * testsuite/gas/mmix/bspec-2.d: Likewise. * testsuite/gas/mmix/byte-1.d: Likewise. * testsuite/gas/mmix/loc-1.d: Likewise. * testsuite/gas/mmix/loc-2.d: Likewise. * testsuite/gas/mmix/loc-3.d: Likewise. * testsuite/gas/mmix/loc-4.d: Likewise. * testsuite/gas/mmix/loc-5.d: Likewise. * testsuite/gas/tic6x/scomm-directive-4.d: Likewise. ld * testsuite/ld-alpha/tlsbin.rd: Adjust expected ordering of sections. * testsuite/ld-alpha/tlsbinr.rd: Likewise. * testsuite/ld-alpha/tlspic.rd: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-i386/nogot1.d: Likewise. * testsuite/ld-i386/pr12718.d: Likewise. * testsuite/ld-i386/pr12921.d: Likewise. * testsuite/ld-i386/tlsbin-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin.rd: Likewise. * testsuite/ld-i386/tlsbin2-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin2.rd: Likewise. * testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsbindesc.rd: Likewise. * testsuite/ld-i386/tlsdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsdesc.rd: Likewise. * testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsgdesc.rd: Likewise. * testsuite/ld-i386/tlsnopic-nacl.rd: Likewise. * testsuite/ld-i386/tlsnopic.rd: Likewise. * testsuite/ld-i386/tlspic-nacl.rd: Likewise. * testsuite/ld-i386/tlspic.rd: Likewise. * testsuite/ld-i386/tlspic2-nacl.rd: Likewise. * testsuite/ld-i386/tlspic2.rd: Likewise. * testsuite/ld-ia64/tlsbin.rd: Likewise. * testsuite/ld-ia64/tlspic.rd: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-50.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-60.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-70.d: Likewise. * testsuite/ld-mmix/bspec1.d: Likewise. * testsuite/ld-mmix/bspec2.d: Likewise. * testsuite/ld-mmix/local1.d: Likewise. * testsuite/ld-mmix/local3.d: Likewise. * testsuite/ld-mmix/local5.d: Likewise. * testsuite/ld-mmix/local7.d: Likewise. * testsuite/ld-mmix/undef-3.d: Likewise. * testsuite/ld-powerpc/tlsexe.r: Likewise. * testsuite/ld-powerpc/tlsexe32.r: Likewise. * testsuite/ld-powerpc/tlsexetoc.r: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. * testsuite/ld-powerpc/tlstocso.r: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-sh/sh64/crange1.rd: Likewise. * testsuite/ld-sh/sh64/crange2.rd: Likewise. * testsuite/ld-sh/sh64/crange3-cmpct.rd: Likewise. * testsuite/ld-sh/sh64/crange3-media.rd: Likewise. * testsuite/ld-sh/sh64/crange3.rd: Likewise. * testsuite/ld-sh/sh64/crangerel1.rd: Likewise. * testsuite/ld-sh/sh64/crangerel2.rd: Likewise. * testsuite/ld-sh/tlsbin-2.d: Likewise. * testsuite/ld-sh/tlspic-2.d: Likewise. * testsuite/ld-sparc/gotop32.rd: Likewise. * testsuite/ld-sparc/gotop64.rd: Likewise. * testsuite/ld-sparc/tlssunbin32.rd: Likewise. * testsuite/ld-sparc/tlssunbin64.rd: Likewise. * testsuite/ld-sparc/tlssunnopic32.rd: Likewise. * testsuite/ld-sparc/tlssunnopic64.rd: Likewise. * testsuite/ld-sparc/tlssunpic32.rd: Likewise. * testsuite/ld-sparc/tlssunpic64.rd: Likewise. * testsuite/ld-tic6x/common.d: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/ilp32-4.d: Likewise. * testsuite/ld-x86-64/nogot1.d: Likewise. * testsuite/ld-x86-64/pr12718.d: Likewise. * testsuite/ld-x86-64/pr12921.d: Likewise. * testsuite/ld-x86-64/split-by-file-nacl.rd: Likewise. * testsuite/ld-x86-64/split-by-file.rd: Likewise. * testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin.rd: Likewise. * testsuite/ld-x86-64/tlsbin2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin2.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. * testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsdesc.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc.rd: Likewise. * testsuite/ld-x86-64/tlspic-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic.rd: Likewise. * testsuite/ld-x86-64/tlspic2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic2.rd: Likewise. * testsuite/ld-xtensa/tlsbin.rd: Likewise. * testsuite/ld-xtensa/tlspic.rd: Likewise.
2016-08-19PowerPC64, Don't copy weak symbol dyn_relocs to weakdef.Alan Modra2-31/+77
At the cost of an extra field in the symbol table hash entries, this simplification to the relocate_section dynamic reloc test should help maintainability. * elf64-ppc.c (struct ppc_link_hash_entry): Add weakref. (ppc64_elf_copy_indirect_symbol): Set weakref. Don't merge dyn_relocs for weakdefs. (alias_readonly_dynrelocs): New function. (ppc64_elf_adjust_dynamic_symbol): Use alias_readonly_dynrelocs. (ppc64_elf_relocate_section): Simplify condition under which dyn_relocs are emitted.
2016-08-19PR 20472, PowerPC64 ifunc confusionAlan Modra2-65/+111
This patch fixes quite a lot of confusion in allocate_dynrelocs over ifuncs. Function descriptors make ELFv1 quite different to ELFv2. PR 20472 * elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test. (readonly_dynrelocs): Comment fix. (global_entry_stub): New function. (ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test. Match ELFv2 code deciding on dynamic relocs vs. global entry stubs to that in size_global_entry_stubs, handling ifunc too. Delete dead weak sym code. (allocate_dynrelocs): Ensure dyn_relocs field is cleared when no dyn_relocs are needed. Correct handling of ifunc dyn_relocs. Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for undefweak syms. Expand and correct comments. (size_global_entry_stubs): Ensure symbol is defined. (ppc64_elf_relocate_section): Match condition under which dyn_relocs are emitted to that in allocate_dynrelocs.
2016-08-19Automatic date update in version.inGDB Administrator1-1/+1
2016-08-18Automatic date update in version.inGDB Administrator1-1/+1
2016-08-17Automatic date update in version.inGDB Administrator1-1/+1
2016-08-16Automatic date update in version.inGDB Administrator1-1/+1
2016-08-15Automatic date update in version.inGDB Administrator1-1/+1
2016-08-14Automatic date update in version.inGDB Administrator1-1/+1
2016-08-13Automatic date update in version.inGDB Administrator1-1/+1
2016-08-13Correct .dynsym sh_infoAlan Modra3-9/+12
bfd/ * elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount. * elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount. (bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount. ld/ * testsuite/ld-tic6x/shlib-1.rd: Correct expected .dynsym sh_info. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
2016-08-12Automatic date update in version.inGDB Administrator1-1/+1
2016-08-11PowerPC64 ELFv1 undefined weak functionsAlan Modra2-20/+17
Undefined weak functions, like __gmon_start__, were not being made dynamic or emitting plt call code. While the behaviour of undefined weak symbols is not defined in the ELF standard, the intention on powerpc64 was to make it possible to link without a definition of such symbols and at run time behave the same as if a definition was found at link time in a shared library. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't exit with non_got_ref true in any case where we could have generated dynbss copies but decide not to do so.
2016-08-11Automatic date update in version.inGDB Administrator1-1/+1
2016-08-10MIPS/BFD: Actually produce short microMIPS LA25 stubsMaciej W. Rozycki2-0/+8
For the case where a function which requires an LA25 stub is at the beginning of a section we use a short sequence comprised of a LUI/ADDIU instruction pair only and prepended to the associated function rather than using a trailing jump to reach the function. This works by checking for the offset into section of the function symbol being 0. This is however never the case for microMIPS function symbols, which have the ISA bit set. Consequently the short LA25 sequence is never produced for microMIPS functions, like with the following example: $ cat la25a.s .abicalls .global f1 .ent f1 f1: .set noreorder .cpload $25 .set reorder .option pic0 jal f2 .option pic2 jr $31 .end f1 .global f2 .ent f2 f2: jr $31 .end f2 $ cat la25b.s .abicalls .option pic0 .global __start .ent __start __start: jal f1 jal f2 .end __start $ as -mmicromips -32 -EB -o la25a.o la25a.s $ as -mmicromips -32 -EB -o la25b.o la25b.s $ ld -melf32btsmip -o la25 la25a.o la25b.o $ objdump -d la25 la25: file format elf32-tradbigmips Disassembly of section .text: 004000d0 <.pic.f2>: 4000d0: 41b9 0040 lui t9,0x40 4000d4: d420 0083 j 400106 <f2> 4000d8: 3339 0107 addiu t9,t9,263 4000dc: 0000 0000 nop 004000e0 <.pic.f1>: 4000e0: 41b9 0040 lui t9,0x40 4000e4: d420 0078 j 4000f0 <f1> 4000e8: 3339 00f1 addiu t9,t9,241 4000ec: 0000 0000 nop 004000f0 <f1>: 4000f0: 41bc 0002 lui gp,0x2 4000f4: 339c 801f addiu gp,gp,-32737 4000f8: 033c e150 addu gp,gp,t9 4000fc: f420 0083 jal 400106 <f2> 400100: 0000 0000 nop 400104: 45bf jrc ra 00400106 <f2>: 400106: 45bf jrc ra ... 00400110 <__start>: 400110: f420 0070 jal 4000e0 <.pic.f1> 400114: 0000 0000 nop 400118: f420 0068 jal 4000d0 <.pic.f2> 40011c: 0000 0000 nop $ where `.pic.f1' could omit the trailing jump and the filler NOP and just fall through to `f1'. Correct the problem by masking out the ISA bit from microMIPS functions, which fixes the earlier example: $ objdump -d la25 la25: file format elf32-tradbigmips Disassembly of section .text: 004000d0 <.pic.f2>: 4000d0: 41b9 0040 lui t9,0x40 4000d4: d420 0083 j 400106 <f2> 4000d8: 3339 0107 addiu t9,t9,263 ... 004000e8 <.pic.f1>: 4000e8: 41b9 0040 lui t9,0x40 4000ec: 3339 00f1 addiu t9,t9,241 004000f0 <f1>: 4000f0: 41bc 0002 lui gp,0x2 4000f4: 339c 801f addiu gp,gp,-32737 4000f8: 033c e150 addu gp,gp,t9 4000fc: f420 0083 jal 400106 <f2> 400100: 0000 0000 nop 400104: 45bf jrc ra 00400106 <f2>: 400106: 45bf jrc ra ... 00400110 <__start>: 400110: f420 0074 jal 4000e8 <.pic.f1> 400114: 0000 0000 nop 400118: f420 0068 jal 4000d0 <.pic.f2> 40011c: 0000 0000 nop $ There is no need to do anything for MIPS16 functions, because if any LA25 stub has been generated for such a function, then it is only required for an associated call thunk only, which is regular MIPS code and the address of which, with the ISA bit clear, is returned by `mips_elf_get_la25_target'. This problem has been there since the beginning of microMIPS support: commit df58fc944dbc6d5efd8d3826241b64b6af22f447 Author: Richard Sandiford <rdsandiford@googlemail.com> Date: Sun Jul 24 14:20:15 2011 +0000 <https://sourceware.org/ml/binutils/2011-07/msg00198.html>, ("MIPS: microMIPS ASE support"). bfd/ * elfxx-mips.c (mips_elf_add_la25_stub): Clear the ISA bit of the stub address retrieved if associated with a microMIPS function.
2016-08-10MIPS/BFD: Add microMIPS annotation to LA25 stub symbolsMaciej W. Rozycki2-1/+9
Fix a problem with missing microMIPS symbol annotation with microMIPS LA25 stub symbols. The consequence of the issue is these symbols appear in the symbol table as regular MIPS symbols with the ISA bit set, as shown with the example below: $ cat la25a.s .abicalls .global f1 .ent f1 f1: .set noreorder .cpload $25 .set reorder .option pic0 jal f2 .option pic2 jr $31 .end f1 .global f2 .ent f2 f2: jr $31 .end f2 $ cat la25b.s .abicalls .option pic0 .global __start .ent __start __start: jal f1 jal f2 .end __start $ as -mmicromips -32 -EB -o la25a.o la25a.s $ as -mmicromips -32 -EB -o la25b.o la25b.s $ ld -melf32btsmip -o la25 la25a.o la25b.o $ readelf -s la25 Symbol table '.symtab' contains 18 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00400098 0 SECTION LOCAL DEFAULT 1 2: 004000b0 0 SECTION LOCAL DEFAULT 2 3: 004000d0 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00418110 0 NOTYPE LOCAL DEFAULT 3 _gp 7: 004000e1 16 FUNC LOCAL DEFAULT 3 .pic.f1 8: 004000d1 16 FUNC LOCAL DEFAULT 3 .pic.f2 9: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _fdata 10: 00400110 16 FUNC GLOBAL DEFAULT [MICROMIPS] 3 __start 11: 00400106 2 FUNC GLOBAL DEFAULT [MICROMIPS] 3 f2 12: 004000d0 0 NOTYPE GLOBAL DEFAULT 3 _ftext 13: 00410120 0 NOTYPE GLOBAL DEFAULT 3 __bss_start 14: 004000f0 22 FUNC GLOBAL DEFAULT [MICROMIPS] 3 f1 15: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _edata 16: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _end 17: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _fbss $ where microMIPS annotation is missing for `.pic.f1' and `.pic.f2' even though these stubs are associated with microMIPS functions `f1' and `f2' respectively. Add the missing annotation then, by copying it from the function symbol an LA25 stub is associated with, correcting the example above: $ readelf -s la25 Symbol table '.symtab' contains 18 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00400098 0 SECTION LOCAL DEFAULT 1 2: 004000b0 0 SECTION LOCAL DEFAULT 2 3: 004000d0 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00418110 0 NOTYPE LOCAL DEFAULT 3 _gp 7: 004000e0 16 FUNC LOCAL DEFAULT [MICROMIPS] 3 .pic.f1 8: 004000d0 16 FUNC LOCAL DEFAULT [MICROMIPS] 3 .pic.f2 9: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _fdata 10: 00400110 16 FUNC GLOBAL DEFAULT [MICROMIPS] 3 __start 11: 00400106 2 FUNC GLOBAL DEFAULT [MICROMIPS] 3 f2 12: 004000d0 0 NOTYPE GLOBAL DEFAULT 3 _ftext 13: 00410120 0 NOTYPE GLOBAL DEFAULT 3 __bss_start 14: 004000f0 22 FUNC GLOBAL DEFAULT [MICROMIPS] 3 f1 15: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _edata 16: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _end 17: 00410120 0 NOTYPE GLOBAL DEFAULT 3 _fbss $ This problem has been there since the beginning of microMIPS support: commit df58fc944dbc6d5efd8d3826241b64b6af22f447 Author: Richard Sandiford <rdsandiford@googlemail.com> Date: Sun Jul 24 14:20:15 2011 +0000 <https://sourceware.org/ml/binutils/2011-07/msg00198.html>, ("MIPS: microMIPS ASE support"). bfd/ * elfxx-mips.c (mips_elf_create_stub_symbol): For a microMIPS stub also add STO_MICROMIPS annotation.
2016-08-10MIPS/BFD: Set the ISA bit in microMIPS LA25 stub referencesMaciej W. Rozycki2-3/+12
Fix a linker regression introduced with commit 9d862524f6ae ("MIPS: Verify the ISA mode and alignment of branch and jump targets") causing a build failure in microMIPS glibc where the `zdump' tool fails to link: .../timezone/zdump.o: In function `yeartot': .../timezone/zdump.c:758:(.text+0x62): Jump to a non-instruction-aligned address .../timezone/zdump.c:758:(.text+0x76): Jump to a non-instruction-aligned address .../timezone/zdump.c:768:(.text+0x112): Jump to a non-instruction-aligned address .../timezone/zdump.c:774:(.text+0x1b8): Jump to a non-instruction-aligned address .../timezone/zdump.c:774:(.text+0x1cc): Jump to a non-instruction-aligned address collect2: error: ld returned 1 exit status make[2]: *** [.../timezone/zdump] Error 1 The cause of the failure is the stricter check introduced with the said change for jump and branch targets tripping on the address of microMIPS LA25 stubs. Despite being microMIPS code these stubs do not have the ISA bit set throughout the relocation calculation process, because they have their address set to the memory offset into the stub section they are placed in. The `mips_elf_la25_stub' structure does not carry ISA mode information, but there is no need to extend it, because the ISA mode can be inferred from the original symbol, which will have STO_MICROMIPS annotation, so use that instead to set the ISA bit appropriately. Also only LA25 stubs associated with microMIPS symbols need to have the ISA bit set, because other LA25 stubs are made with regular MIPS code, even if associated with a MIPS16 symbol (in which case they are needed by a call thunk only rather than the MIPS16 function proper). bfd/ * elfxx-mips.c (mips_elf_calculate_relocation): Set the ISA bit in microMIPS LA25 stub references.
2016-08-10Automatic date update in version.inGDB Administrator1-1/+1
2016-08-09Correct the calculation of the use_counts of merged .got entries.Jiaming Wei2-1/+6
* elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Fix thinko adjusting the use_count of merged .got entries.
2016-08-09Automatic date update in version.inGDB Administrator1-1/+1
2016-08-08Fix memory leaks in chew program.Nick Clifton2-4/+61
* doc/chew.c (delete_string): Only free the string buffer if it is there. Mark the buffer as NULL after freeing. (drop): Free the dropped string. (free_words): New function: Frees the memory allocated to the dictionary. (add_instrinsic): Duplicate the name string, so that it can be freed later on. (compile): Free unused words. (main): Free the dictionary and top level string buffers at the end.
2016-08-08Automatic date update in version.inGDB Administrator1-1/+1
2016-08-07Automatic date update in version.inGDB Administrator1-1/+1
2016-08-06Automatic date update in version.inGDB Administrator1-1/+1
2016-08-05Automatic date update in version.inGDB Administrator1-1/+1
2016-08-042016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>Thomas Preud'homme4-3/+111
bfd/ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter. * bfd-in2.h: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Declare new cmse_implib field. (bfd_elf32_arm_set_target_relocs): Add new parameter to initialize cmse_implib field in struct elf32_arm_link_hash_table. (elf32_arm_filter_cmse_symbols): New function. (elf32_arm_filter_implib_symbols): Likewise. (elf_backend_filter_implib_symbols): Define to elf32_arm_filter_implib_symbols. ld/ * emultempl/armelf.em (cmse_implib): Declare and define this new static variable. (arm_elf_create_output_section_statements): Add new cmse_implib parameter. (OPTION_CMSE_IMPLIB): Define macro. (PARSE_AND_LIST_LONGOPTS): Add entry for new --cmse-implib switch. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_CMSE_IMPLIB case. * ld.texinfo (--cmse-implib): Document new option. * testsuite/ld-arm/arm-elf.exp (Secure gateway import library generation): New test. (Secure gateway import library generation: errors): Likewise. * testsuite/ld-arm/cmse-implib.s: New file. * testsuite/ld-arm/cmse-implib-errors.out: Likewise. * testsuite/ld-arm/cmse-implib.rd: Likewise.
2016-08-042016-08-04 Thomas Preud'homme <thomas.preudhomme@arm.com>Thomas Preud'homme2-20/+392
bfd/ * elf32-arm.c (CMSE_PREFIX): Define macro. (elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence. (cmse_branch_thumb_only): Declare stub. (struct elf32_arm_link_hash_table): Define cmse_stub_sec field. (elf32_arm_get_plt_info): Add globals parameter. Use it to return FALSE if there is no PLT. (arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_gc_sweep_hook): Likewise. (elf32_arm_gc_mark_extra_sections): Mark sections holding ARMv8-M secure entry functions. (arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only. (arm_dedicated_stub_output_section_required): Change to a switch case and add a case for arm_stub_cmse_branch_thumb_only. (arm_dedicated_stub_output_section_required_alignment): Likewise. (arm_stub_dedicated_output_section_name): Likewise. (arm_stub_dedicated_input_section_ptr): Likewise and remove ATTRIBUTE_UNUSED for htab parameter. (arm_stub_required_alignment): Likewise. (arm_stub_sym_claimed): Likewise. (arm_dedicated_stub_section_padding): Likewise. (cmse_scan): New function. (elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets. Set stub_changed to TRUE if such veneers were created. (elf32_arm_swap_symbol_in): Add detection code for CMSE special symbols. include/ * arm.h (ARM_GET_SYM_CMSE_SPCL): Define macro. (ARM_SET_SYM_CMSE_SPCL): Likewise. ld/ * ld.texinfo (Placement of SG veneers): New concept entry. * testsuite/ld-arm/arm-elf.exp (Secure gateway veneers: no .gnu.sgstubs section): New test. (Secure gateway veneers: wrong entry functions): Likewise. (Secure gateway veneers (ARMv8-M Baseline)): Likewise. (Secure gateway veneers (ARMv8-M Mainline)): Likewise. * testsuite/ld-arm/cmse-veneers.s: New file. * testsuite/ld-arm/cmse-veneers.d: Likewise. * testsuite/ld-arm/cmse-veneers.rd: Likewise. * testsuite/ld-arm/cmse-veneers.sd: Likewise. * testsuite/ld-arm/cmse-veneers-no-gnu_sgstubs.out: Likewise. * testsuite/ld-arm/cmse-veneers-wrong-entryfct.out: Likewise.
2016-08-04Automatic date update in version.inGDB Administrator1-1/+1
2016-08-03Automatic date update in version.inGDB Administrator1-1/+1
2016-08-02PowerPC64 ld segfault with code in non-executable sectionsAlan Modra2-0/+7
PR ld/20428 * elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
2016-08-02Fix SH GOT allocation in the presence of linker garbage collection.Nick Clifton2-215/+6
PR ld/17739 ld * emulparams/shelf.sh (CHECK_RELOCS_AFTER_OPEN_INPUT): Define with valye 'yes'. * emulparams/shelf32.sh: Likewise. * emulparams/shelf32.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shelf_vxworks.sh: Likewise. * emulparams/shelf_vxworks.sh: Likewise. * emulparams/shlelf32_linux.sh: Likewise. * emulparams/shlelf32_linux.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. bfd * elf32-sh.c (sh_elf_gc_sweep_hook): Delete. (elf_backend_sweep_hook): Delete.
2016-08-02Automatic date update in version.inGDB Administrator1-1/+1
2016-08-01 Fix some PowerPC VLE BFD issues and add some PowerPC VLE instructions.Andrew Jenner2-2/+11
bfd/ * elf32-ppc.c (is_branch_reloc): Recognise VLE branch relocations. (ppc_elf_howto_raw): Fix dst_mask of R_PPC_VLE_REL15. (ppc_elf_vle_split16): Clear field before inserting. opcodes/ * ppc-opc.c (vle_opcodes): Alias 'e_cmpwi' to 'e_cmpi' and 'e_cmplwi' to 'e_cmpli' instead. (OPVUPRT, OPVUPRT_MASK): Define. (powerpc_opcodes): Add E200Z4 insns. (vle_opcodes): Add context save/restore insns. include/ * opcode/ppc.h (PPC_OPCODE_E200Z4): New define.
2016-08-01Update Swedish translation in bfd directory.Nick Clifton2-66/+70
2016-08-01Automatic date update in version.inGDB Administrator1-1/+1
2016-07-31Automatic date update in version.inGDB Administrator1-1/+1
2016-07-30Automatic date update in version.inGDB Administrator1-1/+1
2016-07-29Automatic date update in version.inGDB Administrator1-1/+1
2016-07-28Automatic date update in version.inGDB Administrator1-1/+1
2016-07-27Fix seg-fault when running garbage collection on coff binaries.Nick Clifton2-1/+14
PR ld/20401 * coffgen.c (fini_reloc_cookie_rels): Check for the extistence of the coff_section_data before using it.
2016-07-27Automatic date update in version.inGDB Administrator1-1/+1
2016-07-26MIPS/BFD: Handle branches in PLT compression selectionMaciej W. Rozycki2-3/+12
Complement: commit 1bbce132647e6d72aaa065cce5c1d5dd6585c2b2 Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Mon Jun 24 23:55:46 2013 +0000 <https://sourceware.org/ml/binutils/2013-06/msg00077.html>, ("MIPS: Compressed PLT/stubs support"), and also choose between regular and compressed PLT entries as appropriate for any branches referring. bfd/ * elfxx-mips.c (mips_elf_calculate_relocation): Handle branches in PLT compression selection. (_bfd_mips_elf_check_relocs): Likewise. ld/ * testsuite/ld-mips-elf/compressed-plt-1.s: Add branch support. * testsuite/ld-mips-elf/compressed-plt-1a.s: Likewise. * testsuite/ld-mips-elf/compressed-plt-1b.s: Likewise. * testsuite/ld-mips-elf/compressed-plt-1-o32-branch.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-branch.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-bronly.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-mips16-branch.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-bronly.rd: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.od: New test. * testsuite/ld-mips-elf/compressed-plt-1-o32-umips-branch.rd: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
2016-07-26Automatic date update in version.inGDB Administrator1-1/+1
2016-07-25Automatic date update in version.inGDB Administrator1-1/+1
2016-07-24Automatic date update in version.inGDB Administrator1-1/+1
2016-07-23Automatic date update in version.inGDB Administrator1-1/+1
2016-07-22Fix segfault in ARC linker when generating got entries for local symbols.Cupertino Miranda2-13/+17
bfd * arc-got.h (relocate_fix_got_relocs_for_got_info): Handle the case where there's no elf_link_hash_entry while processing GOT_NORMAL got entries. ld * testsuite/ld-arc/got-01.d: New file. * testsuite/ld-arc/got-01.s: New file.
2016-07-22Automatic date update in version.inGDB Administrator1-1/+1
2016-07-21Set BFD_VERSION to 2.27.51H.J. Lu3-11/+16
bfd/ * version.m4 (BFD_VERSION): Set to 2.27.51. * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gprof/ * configure: Regenerated. ld/ * configure: Regenerated. opcodes/ * configure: Regenerated.
2016-07-21Move ChangeLog entry for PR ld/20376H.J. Lu1-0/+6