aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
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
2013-12-18 * peXXigen.c (rsrc_print_section): Use ptrdiff_t as the type forNick Clifton2-1/+8
pointer arithmetic.
2013-12-18daily updateAlan Modra1-1/+1
2013-12-17Call _bfd_elf_post_process_headersH.J. Lu2-1/+6
* elf32-arm.c (elf32_arm_post_process_headers): Call _bfd_elf_post_process_headers.
2013-12-17Call _bfd_elf_post_process_headersH.J. Lu3-2/+11
* elf32-spu.c (spu_elf_post_process_headers): Call _bfd_elf_post_process_headers. * elfxx-mips.c (_bfd_mips_post_process_headers): Likewise.
2013-12-17Default elf_backend_post_process_headers to set OSABIH.J. Lu19-74/+41
* elf-bfd.h (_bfd_elf_set_osabi): Renamed to ... (_bfd_elf_post_process_headers): This. * elf.c (_bfd_elf_compute_section_file_positions): Always call elf_backend_post_process_headers. (_bfd_elf_set_osabi): Renamed to ... (_bfd_elf_post_process_headers): This. * elf32-hppa.c (elf_backend_post_process_headers): Removed. * elf32-i370.c (elf_backend_post_process_headers): Likewise. * elf32-msp430.c (elf_backend_post_process_headers): Likewise. * elf32-ppc.c (elf_backend_post_process_headers): Likewise. * elf32-sparc.c (elf_backend_post_process_headers): Likewise. * elf64-hppa.c (elf_backend_post_process_headers): Likewise. * elf64-ppc.c (elf_backend_post_process_headers): Likewise. * elf64-sparc.c (elf_backend_post_process_headers): Likewise. * elf64-x86-64.c (elf_backend_post_process_headers): Likewise. * (elf_backend_post_process_headers): Likewise. * (elf_backend_post_process_headers): Likewise. * elf32-i386.c (elf_backend_post_process_headers): Don't define as _bfd_elf_set_osabi. (elf_i386_fbsd_post_process_headers): Updated. * elf32-mips.c (elf_fbsd_post_process_headers): Removed. (elf_backend_post_process_headers): Likewise. * elf32-tic6x.c (elf32_tic6x_set_osabi): Removed. (elf_backend_post_process_headers): Likewise. * elf64-mips.c (elf_fbsd_post_process_headers): Removed. (elf_backend_post_process_headers): Likewise. * elfn32-mips.c (elf_fbsd_post_process_headers): Removed. (elf_backend_post_process_headers): Likewise. * elfnn-aarch64.c (elfNN_aarch64_post_process_headers): Updated. * elfxx-target.h (elf_backend_post_process_headers): Default to _bfd_elf_post_process_headers.
2013-12-17Use _bfd_elf_copy_private_bfd_dataH.J. Lu11-231/+34
PR binutils/16318 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Call _bfd_elf_copy_private_bfd_data. * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Removed. (elf32_bfinfdpic_copy_private_bfd_data): Likewise. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-frv.c (frv_elf_copy_private_bfd_data): Removed. (elf32_frvfdpic_copy_private_bfd_data): Likewise. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-lm32.c (lm32_elf_copy_private_bfd_data): Removed. (lm32_elf_fdpic_copy_private_bfd_data): Call _bfd_elf_copy_private_bfd_data. * elf32-mep.c (mep_elf_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-msp430.c (elf32_msp430_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-mt.c (mt_elf_copy_private_bfd_data): Removed. (bfd_elf32_bfd_copy_private_bfd_data): Don't define. * elf32-sh.c (sh_elf_set_private_flags): Removed. (sh_elf_copy_private_data): Call _bfd_elf_copy_private_bfd_data and sh_elf_set_mach_from_flags. * elfnn-aarch64.c (elfNN_aarch64_copy_private_bfd_data): Removed. (bfd_elfNN_bfd_copy_private_bfd_data): Don't define.
2013-12-17Rename index to indxH.J. Lu2-8/+12
* peXXigen.c (rsrc_process_section): Rename index to indx.
2013-12-17 * peXXigen.c: Include wchar.h if available.Nick Clifton5-81/+1236
Include safe-ctype.h. (HighBitSet, SetHighBit, WithoutHighBit): New macros. (pe_print_resource_entries): Rename to rsrc_print_resource_entries. Handle names that are not RVAs. (pe_print_resource_directory): Rename to rsrc_print_resource_directory. (pe_print_rsrc): Rename to rsrc_print_section. Corrupt computation of RVA bias. (rsrc_count_entries): New function. (rsrc_count_directory): New function. (rsrc_parse_entry): New function. (rsrc_parse_entries): New function. (rsrc_parse_directory): New function. (rsrc_write_string): New function. (rsrc_compute_rva): New function. (rsrc_write_leaf): New function. (rsrc_write_entry): New function. (rsrc_write_directory): New function. (u16_mbtouc): New function. (rsrc_cmp): New function. (rsrc_print_name): New function. (rsrc_resource_name): New function. (rsrc_merge_string_entries): New function. (rsrc_sort_entries): New function. (rsrc_attach_chain): New function. (rsrc_merge): New function. (rsrc_process_section): New function - merges the contents of a .rsrc section. (_bfd_XXi_final_link_postscript): Call rsrc_process_section. * configure.in (AC_CHECK_HEADERS): Add wchar.h * config.in: Regenerate. * configure: Regenerate.