aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2014-01-15Revert the last changeH.J. Lu3-10/+10
It has been fixed by commit 4199e3b8669d0a36448687850374fdc2ad7240b6 Author: Alan Modra <amodra@gmail.com> Date: Wed Jan 15 21:50:55 2014 +1030 non-PIC references to __ehdr_start in pie and shared Rather than hacking every backend to not discard dynamic relocations against an undefined hidden __ehdr_start, make it appear to be defined early. We want __ehdr_start hidden before size_dynamic_sections so that it isn't put in .dynsym, but we do need the dynamic relocations for a PIE or shared library with a non-PIC reference. Defining it early is wrong if we don't actually define the symbol later to its proper value. (In some cases we want to leave the symbol undefined, for example, when the ELF header isn't loaded, and we don't have this infomation available in before_allocation.) * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last change. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2014-01-14Don't discard relocs against __ehdr_startH.J. Lu3-4/+17
__ehdr_start will be defined by assign_file_positions_for_non_load_sections later. PR ld/16428 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs against __ehdr_start. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2014-01-14Revert the last changeH.J. Lu3-14/+10
* elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last change. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2014-01-15daily updateAlan Modra1-1/+1
2014-01-14Don't update reloc count if there are any non pc-relative relocsH.J. Lu3-4/+21
PR ld/16428 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc count if there are any non pc-relative relocs. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2014-01-142014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>Christophe Lyon2-5/+12
Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org> bfd/ * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct offset while calculating relocation address. (elfNN_aarch64_create_small_pltn_entry): Likewise. (elfNN_aarch64_init_small_plt0_entry): Likewise.
2014-01-14daily updateAlan Modra1-1/+1
2014-01-132014-01-13 Ma Jiang <ma.jiang@zte.com.cn>Ma Jiang2-0/+12
PR ld/16202 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for R_ARM_ABS8 and R_ARM_ABS16.
2014-01-13missing changelog for last patchAlan Modra1-0/+9
2014-01-13Error on shared lib call to @local ifuncAlan Modra1-2/+19
On powerpc32, making ifuncs have non-default visibility in shared libraries or pies can result in runtime failures. The problem is that if gcc is told that a given function has non-default visibility, then calls to that function are assumed to be local (which is true) and thus need not go via a plt call stub (which is false for ifunc). If the caller has no other reason to set up the got pointer (r30), code won't be emitted to do so. However, a pic plt call stub makes use of r30 to load the plt entry. So a call to an ifunc, which always needs a plt entry, will fail. This patch makes ld emit an error for the problem case, and allows calls to non-default visibility ifuncs to work in normal executables. I also fix some cases where ifuncs fail when using the old bss-plt. * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc, error when shared and force a plt call otherwise. (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless plt_type == PLT_NEW. (ppc_elf_relocate_section): Add missing test to resolve ifuncs to the appropriate call stub.
2014-01-13daily updateAlan Modra1-1/+1
2014-01-12daily updateAlan Modra1-1/+1
2014-01-11daily updateAlan Modra1-1/+1
2014-01-10Don't adjust LOAD segment to match GNU_RELRO segmentAlan Modra2-37/+10
Instead, fix Jakub's original code setting up the PR_GNU_RELRO header from the PT_LOAD header. PR ld/14207 PR ld/16322 PR binutils/16323 bfd/ * elf.c (assign_file_positions_for_load_sections): Revert last change. (assign_file_positions_for_non_load_sections): When setting up PT_GNU_RELRO header, don't require a corresponding PT_LOAD header that completely covers the relro region. ld/ * ldlang.c (lang_size_sections): Remove unneeded RELRO base adjust. Tidy comments. * ld.texinfo (DATA_SEGMENT_RELRO_END): Correct description. ld/testsuite/ * ld-x86-64/pr14207.d: Adjust
2014-01-10daily updateAlan Modra1-1/+1
2014-01-09Use table jump macros in coff-rs6000 targets.Tristan Gingold2-171/+100
bfd/ 2014-01-09 Tristan Gingold <gingold@adacore.com> * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump table macros and add macros to initializa the structure.
2014-01-09daily updateAlan Modra1-1/+1
2014-01-08Adjust LOAD segment to generate GNU_RELRO segmentH.J. Lu2-5/+46
This patch fixes 2 GNU_RELRO segment bugs: 1. lang_size_sections didn't properly align base to the maximum alignment power of sections between DATA_SEGMENT_ALIGN and DATA_SEGMENT_RELRO_END. 2. ld failed to adjust LOAD segment to generate GNU_RELRO segment when LOAD segment doesn't fit GNU_RELRO segment. This is https://sourceware.org/bugzilla/show_bug.cgi?id=14207 We "fixed" ld by not generating GNU_RELRO segment. This patch adjusts LOAD segment to generate GNU_RELRO segment. It fixes PR ld/16322 and at the same time it also fixes PR binutils/16323 since now we can adjust LOAD segment if it is too small. bfd/ PR ld/14207 PR ld/16322 PR binutils/16323 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section size for PT_GNU_RELRO segment. (assign_file_positions_for_load_sections): If PT_LOAD segment doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz. ld/ PR ld/14207 PR ld/16322 PR binutils/16323 * ldlang.c (lang_size_sections): Properly align RELRO base. ld/testsuite/ PR ld/14207 PR ld/16322 PR binutils/16323 * ld-elf/pr16322.d: New file. * ld-elf/pr16322.s: Likewise. * ld-x86-64/pr14207.d: Expect PT_GNU_RELRO segment.
2014-01-08New Year - binutils ChangeLog rotationH.J. Lu2-3228/+3241
2014-01-08daily updateAlan Modra1-1/+1
2014-01-07remove VA_* from binutilsTom Tromey2-4/+9
This removes the last uses of the obsolete VA_* macros from binutils. All the binutils and bfd changes were tested by rebuilding. I didn't rebuild the gas change but I think it is obviously correct. 2014-01-07 Tom Tromey <tromey@redhat.com> * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility wrappers. 2014-01-07 Tom Tromey <tromey@redhat.com> * bucomm.c (fatal, non_fatal): Replace obsolete VA_* macros with stdarg macros. * dlltool.c (inform): Replace obsolete VA_* macros with stdarg macros. * dllwrap.c (inform, warn): Replace obsolete VA_* macros with stdarg macros. 2014-01-07 Tom Tromey <tromey@redhat.com> * config/tc-tic30.c (debug): Avoid old VA_* compatibility wrappers.
2014-01-07daily updateAlan Modra1-1/+1
2014-01-06daily updateAlan Modra1-1/+1
2014-01-05daily updateAlan Modra1-1/+1
2014-01-04daily updateAlan Modra1-1/+1
2014-01-03 PR binutils/16199Nick Clifton2-1/+10
* elf.c (vma_page_aligned_bias): Handle a maxpagesize value of zero.
2014-01-03daily updateAlan Modra1-1/+1
2014-01-02Update name in changelog entry.Nick Clifton1-1/+1
2014-01-02 PR binutils/14289Asmwarrior2-4/+8
* pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
2014-01-02 PR binutils/11983Nick Clifton8-25/+73
* archive.c (_bfd_get_elt_at_filepos): Store a copy of the filename in the bfd's filename field. * elfcode.h (bfd_from_remote_memory): Likewise. * ieee.c (ieee_object_p): Likewise. * mach-o.c (bfd_mach_o_fat_member_init): Likewise. * oasys.c (oasys_openr_next_archived_file): Likewise. * vms-lib.c (_bfd_vms_lib_get_module): Likewise. * opncls.c (bfd_fopen): Likewise. (bfd_openstreamr): Likewise. (bfd_openr_iovec): Likewise. (bfd_openw): Likewise. (bfd_create): Likewise. (_bfd_delete_bfd): Free filename.
2014-01-02daily updateAlan Modra1-1/+1
2014-01-01daily updateAlan Modra1-1/+1
2013-12-31daily updateAlan Modra1-1/+1
2013-12-30 * peXXigen.c (rsrc_process_section): Use ptrdiff_t as the type forIlya Tocar2-2/+7
pointer arithmetic.
2013-12-29daily updateAlan Modra1-1/+1
2013-12-28daily updateAlan Modra1-1/+1
2013-12-27daily updateAlan Modra1-1/+1
2013-12-26daily updateAlan Modra1-1/+1
2013-12-25daily updateAlan Modra1-1/+1
2013-12-24daily updateAlan Modra1-1/+1
2013-12-23daily updateAlan Modra1-1/+1
2013-12-22daily updateAlan Modra1-1/+1
2013-12-21daily updateAlan Modra1-1/+1
2013-12-21Don't segv on cie.initial_instructions[] overflow.Alan Modra2-6/+18
Don't attempt to merge CIEs with a larger number of insns than will fit in the buffer. * elf-eh-frame.c (cie_eq): Return false when initial_insn_length is too large. (cie_compute_hash): Don't exceed bounds of initial_instructions. (_bfd_elf_parse_eh_frame): Always set initial_insn_length, and save as much of insns to initial_instructions[] as will fit.
2013-12-20daily updateAlan Modra1-1/+1
2013-12-19Set SHF_INFO_LINK bit for SHT_REL/SHT_RELA sectionsH.J. Lu2-1/+12
It is a good pratice to set the SHF_INFO_LINK bit when the sh_info field represents a section header index. bfd/ PR binutils/16317 * elf.c (assign_section_numbers): Set the SHF_INFO_LINK bit for SHT_REL/SHT_RELA sections when setting the sh_info field. binutils/testsuite/ PR binutils/16317 * binutils-all/readelf.s: Updated. * binutils-all/readelf.s-64: Likewise. ld/testsuite/ PR binutils/16317 * ld-elf/linkinfo1.s: New file. * ld-elf/linkinfo1a.d: Likewise. * ld-elf/linkinfo1b.d: Likewise.
2013-12-19 * Fix indentation issue and reorganize last commit entryPierre Muller2-21/+26
so that it is shorter than 80. peXXigen.c (rsrc_cmp): Fix unused variable warning.
2013-12-19 * peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding ifPierre Muller2-75/+122
__CYGWIN__ or __MINGW32__ macro is defined. (rsrc_cmp): Fix Windows host version and version without wchar header. [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. Fix coding standard issues.
2013-12-19Set proper OS ABI magic for ELF/m68kAndreas Schwab2-0/+26
* elf32-m68k.c (elf_m68k_add_symbol_hook): New function. (elf_backend_add_symbol_hook): Define.
2013-12-19daily updateAlan Modra1-1/+1