aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2018-02-12Add support for reading msdos MZ executables.Zebediah Figura5-12/+105
See email thread starting here: https://www.sourceware.org/ml/binutils/2018-01/msg00001.html include * coff/msdos.h: New header. * coff/pe.h: Move common defines to msdos.h. * coff/powerpc.h: Likewise. bfd * i386msdos.c (msdos_mkobject); New function. (msdos_object_p): New function. (i386_msdos_vec): Use msdos_object_p as the check_format function. * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and IMAGE_NT_SIGNATURE. * peXXigen.c: Likewise. * coff-ia64.c: Likewise.
2018-02-12Fix compile time warning: bfd/elf32-arc.c:1537]: (warning) Redundant ↵Nick Clifton2-1/+1
assignment of 'rel->r_offset' to itself. * elf32-arc.c (elf_arc_relocate_section): Remove redundant assignment.
2018-02-12oops - actually remove the assignment this time: bfd/elf32-nds32.c:9693]: ↵Nick Clifton1-1/+0
(warning) Redundant assignment of 'irel->r_addend' to itself.
2018-02-12Fix compile time warning: bfd/elf32-nds32.c:9693]: (warning) Redundant ↵Nick Clifton1-0/+5
assignment of 'irel->r_addend' to itself. * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant assignment.
2018-02-12Automatic date update in version.inGDB Administrator1-1/+1
2018-02-11Automatic date update in version.inGDB Administrator1-1/+1
2018-02-10Fix commit date.Eric Botcazou1-1/+1
2018-02-10Fix GOT relocation overflow on SPARC.Eric Botcazou2-52/+88
There are 2 failures left in the linker testsuite on SPARC64/Linux and they are caused by 2 different issues leading to the same end effect: the overflow of the relocation section for the GOT, i.e. the linker generates too many dynamic relocations for the GOT wrt the size of the relocation section, leading to memory corruption and missing relocations in the final binary. The first issue was introduced by: https://sourceware.org/ml/binutils/2017-06/msg00368.html which makes the linker generate more R_SPARC_RELATIVE relocations for the GOT without adjusting the size of the relocation section. This is fixed by (1) preventively adjusting this size in allocate_dynrelocs and (2) generating R_SPARC_NONE if needed when R_SPARC_GOTDATA_OP is relaxed. The second issue is that we generate a GOT relocation for an undefined weak symbol with non-default visibility in a PIC binary without accounting for that in the size of the relocation section. Since the address of the symbol should resolve to 0 at run time, it is fixed by not generating the relocation at all, i.e. leaving the GOT entry zeroed. bfd/ * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions. (sparc_elf_append_rela): Assert that there is enough room in section. (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting. (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak. (allocate_dynrelocs): Remove outdated comments and reorder conditions. For a symbol subject to a GOT relocation, reserve a slot in the relocation section if the symbol isn't dynamic and we are in PIC mode. (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation. <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments. <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion. (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into resolved_to_zero. Do not generate a dynamic GOT relocation for an undefined weak symbol with non-default visibility. Remove superfluous 'else' and fix formatting.
2018-02-10Automatic date update in version.inGDB Administrator1-1/+1
2018-02-09x86: Add is_solaris to elf_x86_target_osH.J. Lu5-22/+54
Add is_solaris to elf_x86_target_os since Solaris is quite different. * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle is_solaris. (i386_elf32_sol2_vec): Don't declare. (elf_i386_link_setup_gnu_properties): Also handle is_solaris. Don't set need_global_offset_table. (elf_i386_solaris_arch_bed): New. (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for Solaris. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check target_os != is_nacl instead of target_os == is_normal. (x86_64_elf64_sol2_vec): Don't declare. (elf_x86_64_link_setup_gnu_properties): Check target_os != is_nacl instead of target_os == is_normal. Don't set need_global_offset_table. (elf_x86_64_solaris_arch_bed): New. (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for Solaris. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep _GLOBAL_OFFSET_TABLE_ for Solaris. (_bfd_x86_elf_link_setup_gnu_properties): Don't copy need_global_offset_table. * elfxx-x86.h (elf_x86_target_os): Add is_solaris. (elf_x86_link_hash_table): Remove need_global_offset_table. (elf_x86_init_table): Likewise.
2018-02-08x86: Set need_global_offset_table with info->output_bfd->xvecH.J. Lu3-14/+19
* elf32-i386.c (elf32_i386_copy_solaris_special_section_fields): Remove prototype. (i386_elf32_sol2_vec): Declared. (elf_i386_link_setup_gnu_properties): Set need_global_offset_table with info->output_bfd->xvec. * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields): Remove prototype. (x86_64_elf64_sol2_vec): Declared. (elf_x86_64_link_setup_gnu_properties): Set need_global_offset_table with info->output_bfd->xvec.
2018-02-09Automatic date update in version.inGDB Administrator1-1/+1
2018-02-08x86: Keep the unused _GLOBAL_OFFSET_TABLE_ for SolarisH.J. Lu5-1/+45
Solaris requires to keep _GLOBAL_OFFSET_TABLE_ even if it isn't used. This patch detects Solaris target and keeps _GLOBAL_OFFSET_TABLE_ for Solaris. * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields): New prototype. (elf_i386_link_setup_gnu_properties): Set need_global_offset_table for Solaris. * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields): New prototype. (elf_x86_64_link_setup_gnu_properties): Set need_global_offset_table for Solaris. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the unused _GLOBAL_OFFSET_TABLE_ for Solaris. (_bfd_x86_elf_link_setup_gnu_properties): Copy need_global_offset_table. * elfxx-x86.h (elf_x86_link_hash_table): Add need_global_offset_table. (elf_x86_init_table): Likewise.
2018-02-08RISC-V: Add comment for previous change.Jim Wilson2-0/+7
bfd/ * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous change.
2018-02-08Fix a seg-fault in the ELF note parser when a note with an excessively large ↵Nick Clifton2-0/+8
alignment is encountered. PR 22788 * elf.c (elf_parse_notes): Reject notes with excessuively large alignments.
2018-02-08Automatic date update in version.inGDB Administrator1-1/+1
2018-02-07Revert "PowerPC PLT speculative execution barriers"Alan Modra5-87/+26
This reverts most of commit 1be5d8d3bb. Left in place are addition of --no-plt-align to some ppc32 ld tests and the ld.texinfo --no-plt-thread-safe fix.
2018-02-06RISC-V: Eliminate spurious error w/ reloc truncated messageJim Wilson2-0/+6
bfd/ * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used callback to report an error.
2018-02-07Automatic date update in version.inGDB Administrator1-1/+1
2018-02-06Fix PR ld/22263 on SPARC.Eric Botcazou2-160/+140
This is -fpie -pie generating dynamic relocations in the text section, simply because no TLS transitions are applied in PIE mode. The meat of the patch is to turn calls to bfd_link_pic (info) in TLS-related code into !bfd_link_executable (info) and there are quite a lot of them... bfd/ * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic into call to !bfd_link_executable and tidy up. (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up. <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to !bfd_link_executable. <R_SPARC_TLS_IE_HI22>: Likewise. <GOT relocations>: Remove useless code, tidy and merge blocks. <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to !bfd_link_executable. <R_SPARC_WPLT30>: Tidy up. (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to !bfd_link_executable. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up. <R_SPARC_TLS_GD_HI22>: Merge into... <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to sparc_elf_tls_transition and remove redundant code. <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to !bfd_link_executable. <R_SPARC_TLS_LDO_HIX22>: Likewise. <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up. <R_SPARC_TLS_LDM_CALL>: Likewise. <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up. <R_SPARC_TLS_GD_ADD>: Likewise. <R_SPARC_TLS_LDM_ADD>: Likewise. <R_SPARC_TLS_LDO_ADD>: Likewise. <R_SPARC_TLS_IE_LD>: Likewise. ld/ * testsuite/ld-elf/tls.exp (AFLAGS_PIC): Define on SPARC. (pr22263-1): Pass AFLAGS_PIC to the assembler. * testsuite/ld-sparc/tlspie32.s: Add test for other 3 transitions. * testsuite/ld-sparc/tlspie32.dd: Adjust to above. * testsuite/ld-sparc/tlspie64.s: Add test for other 3 transitions. * testsuite/ld-sparc/tlspie64.dd: Adjust to above.
2018-02-06Improve the find_nearest_line function for the MIPS target so that it tries ↵Nick Clifton2-6/+29
harder to find a function name. PR 22789 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf functions failed to find the function name, try the generic elf find function instead.
2018-02-06Fix GCC 8's -Wstringop-overflow on bfd/coff-rs6000.cSergio Durigan Junior2-1/+6
GCC 8 will bring a new warning option which will detect possible overflow and truncation on string manipulation functions. For more details, see: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00471.html While compiling BFD with it, I can see one place on bfd/coff-rs6000.c where the warning is triggered. This: (void) strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG); will not include the trailing NUL on fhdr.magic, but that's fine because it's a magic number. The fix is trivial: just use memcpy instead. OK to push? 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com> * coff-rs6000.c (xcoff_write_archive_contents_old): Use 'memcpy' instead of 'strncpy' when writing the magic number.
2018-02-06Prevent attempts to call strncpy with a zero-length field by chacking the ↵Nick Clifton2-5/+24
size of debuglink sections. PR 22794 * opncls.c (bfd_get_debug_link_info_1): Check the size of the section before attempting to read it in. (bfd_get_alt_debug_link_info): Likewise.
2018-02-06Allow the find_abstract_instance_name() function in the BFD library to also ↵Paul Carroll2-10/+27
return file and line number information. The nm utility supports -l for using debug information to obtain file and line information for each symbol, if available. We have a tool that consumes this information and displays it. This identified a problem with the 'nm' utility. When a source is compiled with -O2, functions can be inlined. The compiler also produces an uninlined copy of the function, normally for linking to other object files. In the case of DWARF2 debug information, the compiler generates debug information to describe a function. If that function is inlined, the compiler then references that debug information from the inlined and uninlined copies of the routine through the use of the DW_AT_abstract_origin reference. When nm is used on such a file, it is not able to find file and line information because that information is present in the common debug information and not at each actual implementation of the function. The 'nm' utility only retrieves the name of the function from the abstract origin debug information and no more. What I am proposing is to modify the find_abstract_instance_name() function (which I renamed to find_abstract_instance() ) to return the name of the function as well as any file and line information. The routine is already parsing all of the debug information in the abstract instance, so it is easy to pick up the file and line information at that time. If, for some reason, the file and line information is not present, the routine behaves as before. For example, if I have a simple test case: int foo(int j) { if (j < 15) j += j << 2; else j += j << 6; return j; } int main (int argc,char **argv) { int i = argc; i += foo(i); return i; } If that test case is compiled with -O2 and then 'nm -l' reads that executable, it currently produces this symbol output (ignoring a lot of library symbols): 8048400 T foo 080482e0 T main /scratch/pcarroll/its254/test/mytest.c:12 If I modify 'nm' to return file and line information for abstract instances, it produces the following output: 08048400 T foo /scratch/pcarroll/its254/test/mytest.c:1 080482e0 T main /scratch/pcarroll/its254/test/mytest.c:12 -------------------------------------------------------------------------- bfd * bfd/dwarf2.c (find_abstract_name): Modified to return file and line information in addition to name, if they can be found.
2018-02-06Automatic date update in version.inGDB Administrator1-1/+1
2018-02-05[PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against ↵Renlin Li2-3/+19
absolution symbol or undefine symbol in shared object. The assumption that R_AARCH64_ABS16 and R_AARCH64_ABS32 relocation in LP64 abi will be used to generate an address does not hold for absolute symbol. In this case, it is a value fixed at static linking time. The condition to check the relocations is relax to allow absolute symbol and undefined symbol case. bfd/ 2018-02-05 Renlin Li <renlin.li@arm.com> PR ld/22764 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the check for writeable section as well. ld/ 2018-02-05 Renlin Li <renlin.li@arm.com> PR ld/22764 * testsuite/ld-aarch64/emit-relocs-258.s: Define symbol as an address. * testsuite/ld-aarch64/emit-relocs-259.s: Likewise. * testsuite/ld-aarch64/aarch64-elf.exp: Run new test. * testsuite/ld-aarch64/pr22764.s: New. * testsuite/ld-aarch64/pr22764.d: New.
2018-02-05x86: Remove the unused _GLOBAL_OFFSET_TABLE_H.J. Lu5-4/+49
Since _GLOBAL_OFFSET_TABLE_ may be referenced implicitly on x86, checking ref_regular_nonweak leaves the unused _GLOBAL_OFFSET_TABLE_ in output. This patch checks explicit GOT references instead. ld-i386/discarded1.s and ld-x86-64/discarded1.s are updated to avoid linker optimization which removes GOT references. bfd/ PR ld/22782 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve undefined weak symbol to 0. * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced if _GLOBAL_OFFSET_TABLE_ is referenced. * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check got_referenced instead of ref_regular_nonweak. Remove the unused _GLOBAL_OFFSET_TABLE_ from symbol table. * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced. ld/ PR ld/22782 * testsuite/ld-i386/discarded1.s: Replace mov with div. * testsuite/ld-x86-64/discarded1.s: Likewise. * testsuite/ld-i386/i386.exp: Run pr22782. * testsuite/ld-i386/load1-nacl.d: Updated for removing _GLOBAL_OFFSET_TABLE_ from output. * testsuite/ld-i386/load1.d: Likewise. * testsuite/ld-x86-64/load1a-nacl.d: Likewise. * testsuite/ld-x86-64/load1a.d: Likewise. * testsuite/ld-x86-64/load1b-nacl.d: Likewise. * testsuite/ld-x86-64/load1b.d: Likewise. * testsuite/ld-i386/pr22782.d: New file. * testsuite/ld-i386/pr22782.s: Likewise. * testsuite/ld-x86-64/pr22782.s: Likewise. * testsuite/ld-x86-64/pr22782a.d: Likewise. * testsuite/ld-x86-64/pr22782b.d: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr22782a and pr22782b.
2018-02-05RISC-V/BFD: Correct a missing initializer error with pre-4.7 GCCMaciej W. Rozycki2-1/+7
Correct a commit 9d06997adb88 ("RISC-V: Relax RISCV_PCREL_* to RISCV_GPREL_*") regression and remove a `-Wmissing-field-initializers' compilation error: cc1: warnings being treated as errors .../bfd/elfnn-riscv.c: In function '_bfd_riscv_relax_pc': .../bfd/elfnn-riscv.c:3117: error: missing initializer .../bfd/elfnn-riscv.c:3117: error: (near initialization for 'hi_reloc.hi_addend') make[4]: *** [elf64-riscv.lo] Error 1 which for versions of GCC before 4.7 prevents support for RISC-V targets from being built. See also GCC PR c/36750. bfd/ * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to initialize `hi_reloc'.
2018-02-05MIPS/BFD: Correctly report unsupported `.reginfo' section sizeMaciej W. Rozycki2-1/+16
Report an error when an unsupported `.reginfo' section size is found in `_bfd_mips_elf_section_processing', removing an assertion that triggers at elfxx-mips.c:7105 in GAS when assembling input like: .section .reginfo .word 0xdeadbeef and in `objcopy --rename-section' when renaming an incorrectly sized section to `.reginfo'. bfd/ * elfxx-mips.c (_bfd_mips_elf_section_processing): For SHT_MIPS_REGINFO sections don't assert the correct size and report an error instead. binutils/ * testsuite/binutils-all/mips/mips-reginfo.d: New test. * testsuite/binutils-all/mips/mips-reginfo-n32.d: New test. * testsuite/binutils-all/mips/mips-reginfo.s: New test source. * testsuite/binutils-all/mips/mips.exp: Run the new tests. gas/ * testsuite/gas/mips/reginfo-2.d: New test. * testsuite/gas/mips/reginfo-2-n32.d: New test. * testsuite/gas/mips/reginfo-2.l: New test stderr output. * testsuite/gas/mips/reginfo-2.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests.
2018-02-05ELF/BFD: Propagate the return status from backend section processingMaciej W. Rozycki2-1/+7
Fix the issue of any failure from `->elf_backend_section_processing' not being propagated by `_bfd_elf_write_object_contents'. The MIPS `_bfd_mips_elf_section_processing' handler can actually potentially fail, however the caller currently ignores that. bfd/ * elf.c (_bfd_elf_write_object_contents): Propagate a failure status from `->elf_backend_section_processing'.
2018-02-05Automatic date update in version.inGDB Administrator1-1/+1
2018-02-04Automatic date update in version.inGDB Administrator1-1/+1
2018-02-03Automatic date update in version.inGDB Administrator1-1/+1
2018-02-02RISC-V: Fix --wrap and relaxation conflict.Jim Wilson2-9/+49
bfd/ PR ld/22756 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info. If link_info->wrap_hash, check for a duplicate symbol and ignore. (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le): Pass new argument to riscv_relax_delete_bytes. (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove ATTRIBUTE_UNUSED from link_info parameter.
2018-02-02PowerPC64, don't relocate nopsAlan Modra2-4/+14
This fixes a "bug" in that nops emitted as part of code optimization were being relocated. As it happens the relocation value was always zero so the nop wasn't changed. Whew! I've also moved the use of "howto" later since I was caught out in some recent code changes with the howto not matching r_type. * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops emitted for toc sequence optimization. Set and use "howto" later.
2018-02-02Automatic date update in version.inGDB Administrator1-1/+1
2018-02-01Fix compile time warnings building the binutils with clang.Simon Marchi3-3/+10
bfdI would like to fix instances of the following warning, when building with clang with no special CFLAGS other than -g3 -O0. /home/emaisin/src/binutils-gdb/bfd/elflink.c:5425:45: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic] return (struct elf_link_hash_entry *) 0 - 1; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ Replacing those with "(struct elf_link_hash_entry *) -1" gets rid of the warning. I wanted to check that it didn't change the resulting code, so I tried to build this: $ cat test.c int *before() { return (int *) 0 - 1; } int *after() { return (int *) - 1; } $ gcc -c test.c -g $ objdump -d test.o test.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <before>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 c7 c0 fc ff ff ff mov $0xfffffffffffffffc,%rax b: 5d pop %rbp c: c3 retq 000000000000000d <after>: d: 55 push %rbp e: 48 89 e5 mov %rsp,%rbp 11: 48 c7 c0 ff ff ff ff mov $0xffffffffffffffff,%rax 18: 5d pop %rbp 19: c3 retq This shows that the previous code doesn't actually return -1 as the function documentation says, but the new one does, so it's kind of a bugfix. bfd * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer arithmetic on NULL pointer. * elflink.c (_bfd_elf_archive_symbol_lookup, elf_link_add_archive_symbols): Likewise. ld * ldexp.c (fold_name, exp_fold_tree_1): Avoid pointer arithmetic on NULL pointer.
2018-02-01Automatic date update in version.inGDB Administrator1-1/+1
2018-01-31bfd_elf_define_start_stop: Fix checkMichael Matz2-2/+8
We really need to check for a dynamic def, not only a ref. See added testcase. bfd/ * elflink.c (bfd_elf_define_start_stop): Fix check of def_dynamic. ld/ * testsuite/ld-elf/pr21964-5.c: New test. * testsuite/ld-elf/shared.exp: Run it.
2018-01-31Check if __start/__stop symbols are referenced by shared objectsH.J. Lu2-2/+8
Define __start/__stop symbols if they are referenced by shared objects, not if they are also defined in shared objects. bfd/ PR ld/21964 * elflink.c (bfd_elf_define_start_stop): Check if __start and __stop symbols are referenced by shared objects. ld/ PR ld/21964 * testsuite/ld-elf/pr21964-4.c: New file. * testsuite/ld-elf/shared.exp: Run pr21964-4 test on Linux.
2018-01-31Automatic date update in version.inGDB Administrator1-1/+1
2018-01-30PR22758, FAIL: Run pr22393-2Alan Modra2-24/+26
We can't map different disk pages into the same memory page; The last page mapped will simply overwrite any previous pages. The executable/non-executable new_segment test ignored this fact, leading to a ld.so segfault on hppa when .dynamic is overwritten with zeros. This patch moves existing tests for demand paging with lma on the same memory page, to a new test performed before any case where we want a new segment due to protection or loadable conflicts. PR 22758 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new segment when demand paged with lma on the same page. Test this before load/non-load, executable/non-executable, writable/non-writable tests and simplify. Delete bogus relro condition in writable/non-writable test. Delete outdated comment. Formatting.
2018-01-30Automatic date update in version.inGDB Administrator1-1/+1
2018-01-30Make __start/__stop symbols dynamic and add testcaseAlan Modra2-2/+12
bfd/ * elflink.c (bfd_elf_define_start_stop): Make __start and __stop symbols dynamic. ld/ * testsuite/ld-elf/pr21964-3a.c: New file. * testsuite/ld-elf/pr21964-3c.c: New file. * testsuite/ld-elf/shared.exp: Run new __start/__stop testcase.
2018-01-29PR22741, objcopy segfault on fuzzed COFF objectAlan Modra2-1/+8
PR 22741 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in range before converting to a symbol table pointer.
2018-01-29Automatic date update in version.inGDB Administrator1-1/+1
2018-01-28Automatic date update in version.inGDB Administrator1-1/+1
2018-01-27Updated Russian translation for the bfd sub-directoryNick Clifton2-1501/+993
2018-01-27Automatic date update in version.inGDB Administrator1-1/+1
2018-01-26Define __start/__stop symbols when there is only a dynamic defAlan Modra2-1/+6
This patch fixes a case where a user had a C-representable named section in both the executable and shared libraries, and of course wanted the size of the local section in the executable, not the dynamic section. It does mean that __start and __stop symbols don't behave exactly like PROVIDEd symbols, but I think that's a reasonable difference particularly since this is the way they used to behave. * elflink.c (bfd_elf_define_start_stop): Override symbols when they are defined dynamically.