head 1.17; access; symbols netbsd-11-0-RC4:1.15 netbsd-11-0-RC3:1.15 netbsd-11-0-RC2:1.15 binutils-2-46:1.1.1.14 netbsd-11-0-RC1:1.15 binutils-2-45:1.1.1.13 perseant-exfatfs-base-20250801:1.15 netbsd-11:1.15.0.2 netbsd-11-base:1.15 netbsd-10-1-RELEASE:1.13 perseant-exfatfs-base-20240630:1.15 binutils-2-42:1.1.1.12 perseant-exfatfs:1.14.0.2 perseant-exfatfs-base:1.14 netbsd-8-3-RELEASE:1.9 netbsd-9-4-RELEASE:1.11.2.1 netbsd-10-0-RELEASE:1.13 netbsd-10-0-RC6:1.13 netbsd-10-0-RC5:1.13 netbsd-10-0-RC4:1.13 netbsd-10-0-RC3:1.13 netbsd-10-0-RC2:1.13 netbsd-10-0-RC1:1.13 binutils-2-39:1.1.1.11 netbsd-10:1.13.0.6 netbsd-10-base:1.13 netbsd-9-3-RELEASE:1.11.2.1 cjep_sun2x-base1:1.13 cjep_sun2x:1.13.0.4 cjep_sun2x-base:1.13 cjep_staticlib_x-base1:1.13 netbsd-9-2-RELEASE:1.11.2.1 cjep_staticlib_x:1.13.0.2 cjep_staticlib_x-base:1.13 netbsd-9-1-RELEASE:1.11.2.1 phil-wifi-20200421:1.13 phil-wifi-20200411:1.13 is-mlppp:1.12.0.2 is-mlppp-base:1.12 phil-wifi-20200406:1.13 binutils-2-34:1.1.1.10 netbsd-8-2-RELEASE:1.9 netbsd-9-0-RELEASE:1.11.2.1 netbsd-9-0-RC2:1.11.2.1 netbsd-9-0-RC1:1.11.2.1 phil-wifi-20191119:1.12 netbsd-9:1.11.0.2 netbsd-9-base:1.11 phil-wifi-20190609:1.11 netbsd-8-1-RELEASE:1.9 netbsd-8-1-RC1:1.9 pgoyette-compat-merge-20190127:1.9.12.2 pgoyette-compat-20190127:1.11 pgoyette-compat-20190118:1.11 pgoyette-compat-1226:1.11 pgoyette-compat-1126:1.11 binutils-2-31-1:1.1.1.9 pgoyette-compat-1020:1.10 pgoyette-compat-0930:1.10 pgoyette-compat-0906:1.10 netbsd-7-2-RELEASE:1.5.4.1 pgoyette-compat-0728:1.10 netbsd-8-0-RELEASE:1.9 phil-wifi:1.10.0.2 phil-wifi-base:1.10 pgoyette-compat-0625:1.10 netbsd-8-0-RC2:1.9 pgoyette-compat-0521:1.10 pgoyette-compat-0502:1.10 pgoyette-compat-0422:1.10 netbsd-8-0-RC1:1.9 pgoyette-compat-0415:1.9 binutils-2-30:1.1.1.8 pgoyette-compat-0407:1.9 pgoyette-compat-0330:1.9 pgoyette-compat-0322:1.9 pgoyette-compat-0315:1.9 netbsd-7-1-2-RELEASE:1.5.4.1 pgoyette-compat:1.9.0.12 pgoyette-compat-base:1.9 netbsd-7-1-1-RELEASE:1.5.4.1 matt-nb8-mediatek:1.9.0.10 matt-nb8-mediatek-base:1.9 perseant-stdc-iso10646:1.9.0.8 perseant-stdc-iso10646-base:1.9 netbsd-8:1.9.0.6 netbsd-8-base:1.9 prg-localcount2-base3:1.9 prg-localcount2-base2:1.9 prg-localcount2-base1:1.9 prg-localcount2:1.9.0.4 prg-localcount2-base:1.9 pgoyette-localcount-20170426:1.9 bouyer-socketcan-base1:1.9 pgoyette-localcount-20170320:1.9 netbsd-7-1:1.5.4.1.0.6 netbsd-7-1-RELEASE:1.5.4.1 netbsd-7-1-RC2:1.5.4.1 netbsd-7-nhusb-base-20170116:1.5.4.1 bouyer-socketcan:1.9.0.2 bouyer-socketcan-base:1.9 pgoyette-localcount-20170107:1.9 netbsd-7-1-RC1:1.5.4.1 pgoyette-localcount-20161104:1.9 binutils-2-27:1.1.1.7 netbsd-7-0-2-RELEASE:1.5.4.1 localcount-20160914:1.8 netbsd-7-nhusb:1.5.4.1.0.4 netbsd-7-nhusb-base:1.5.4.1 pgoyette-localcount-20160806:1.8 binutils-2-26-1:1.1.1.6 pgoyette-localcount-20160726:1.7 pgoyette-localcount:1.7.0.2 pgoyette-localcount-base:1.7 netbsd-7-0-1-RELEASE:1.5.4.1 binutils-2-26:1.1.1.5 netbsd-7-0:1.5.4.1.0.2 netbsd-7-0-RELEASE:1.5.4.1 netbsd-7-0-RC3:1.5.4.1 netbsd-7-0-RC2:1.5.4.1 netbsd-7-0-RC1:1.5.4.1 netbsd-6-0-6-RELEASE:1.4 netbsd-6-1-5-RELEASE:1.4 netbsd-7:1.5.0.4 netbsd-7-base:1.5 yamt-pagecache-base9:1.5 yamt-pagecache-tag8:1.3.2.1 netbsd-6-1-4-RELEASE:1.4 netbsd-6-0-5-RELEASE:1.4 tls-earlyentropy:1.5.0.2 tls-earlyentropy-base:1.5 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.5 riastradh-drm2-base3:1.5 netbsd-6-1-3-RELEASE:1.4 netbsd-6-0-4-RELEASE:1.4 binutils-2-23-2:1.1.1.4 netbsd-6-1-2-RELEASE:1.4 netbsd-6-0-3-RELEASE:1.4 netbsd-6-1-1-RELEASE:1.4 riastradh-drm2-base2:1.4 riastradh-drm2-base1:1.4 riastradh-drm2:1.4.0.10 riastradh-drm2-base:1.4 netbsd-6-1:1.4.0.14 netbsd-6-0-2-RELEASE:1.4 netbsd-6-1-RELEASE:1.4 netbsd-6-1-RC4:1.4 netbsd-6-1-RC3:1.4 agc-symver:1.4.0.12 agc-symver-base:1.4 netbsd-6-1-RC2:1.4 netbsd-6-1-RC1:1.4 yamt-pagecache-base8:1.4 netbsd-6-0-1-RELEASE:1.4 yamt-pagecache-base7:1.4 matt-nb6-plus-nbase:1.4 yamt-pagecache-base6:1.4 netbsd-6-0:1.4.0.8 netbsd-6-0-RELEASE:1.4 netbsd-6-0-RC2:1.4 tls-maxphys:1.4.0.6 tls-maxphys-base:1.5 matt-nb6-plus:1.4.0.4 matt-nb6-plus-base:1.4 netbsd-6-0-RC1:1.4 yamt-pagecache-base5:1.4 yamt-pagecache-base4:1.4 netbsd-6:1.4.0.2 netbsd-6-base:1.4 yamt-pagecache-base3:1.3 yamt-pagecache-base2:1.3 yamt-pagecache:1.3.0.2 yamt-pagecache-base:1.3 binutils-2-21-1a:1.1.1.3 cherry-xenmp:1.2.0.4 cherry-xenmp-base:1.2 bouyer-quota2-nbase:1.2 bouyer-quota2:1.2.0.2 bouyer-quota2-base:1.2 matt-mips64-premerge-20101231:1.2 binutils-2-19-1-20090402:1.1.1.2 matt-premerge-20091211:1.2 binutils-2-19-1:1.1.1.1 FSF:1.1.1; locks; strict; comment @# @; 1.17 date 2026.02.11.20.14.45; author christos; state Exp; branches; next 1.16; commitid 2ZnkVhvajDjbVZtG; 1.16 date 2025.08.25.15.47.22; author christos; state Exp; branches; next 1.15; commitid 83YQOH8LeFn9V78G; 1.15 date 2024.06.30.16.10.15; author christos; state Exp; branches; next 1.14; commitid YLzDDRlomJFmz1gF; 1.14 date 2022.12.24.20.17.04; author christos; state Exp; branches 1.14.2.1; next 1.13; commitid y5TadmP38ddHKQ6E; 1.13 date 2020.04.03.23.48.45; author christos; state Exp; branches; next 1.12; commitid 23XN8arVUk87UZ2C; 1.12 date 2019.08.27.19.23.22; author rjs; state Exp; branches; next 1.11; commitid ggctJDNF7fYFvHAB; 1.11 date 2018.11.07.01.13.51; author christos; state Exp; branches 1.11.2.1; next 1.10; commitid fBTCYRhE5Q1XTWYA; 1.10 date 2018.04.15.20.06.01; author christos; state Exp; branches 1.10.2.1; next 1.9; commitid MpiHxWBBfLwGMzyA; 1.9 date 2016.10.26.18.42.52; author christos; state Exp; branches 1.9.12.1; next 1.8; commitid icdZ2D2VouhuyGrz; 1.8 date 2016.07.28.12.25.07; author christos; state Exp; branches; next 1.7; commitid JhXqiGfTANHkm5gz; 1.7 date 2016.01.29.14.42.43; author christos; state Exp; branches 1.7.2.1; next 1.6; commitid QJ5IMUNnZ6y2WPSy; 1.6 date 2014.08.11.20.53.16; author skrll; state Exp; branches; next 1.5; commitid F94XnUtraXg5cZLx; 1.5 date 2013.09.29.14.03.29; author christos; state Exp; branches 1.5.4.1; next 1.4; commitid M0UvZ6fnBgRH4l7x; 1.4 date 2011.12.12.07.40.56; author skrll; state Exp; branches 1.4.6.1; next 1.3; 1.3 date 2011.09.25.04.32.34; author christos; state Exp; branches 1.3.2.1; next 1.2; 1.2 date 2009.11.20.22.51.29; author skrll; state Exp; branches; next 1.1; 1.1 date 2009.08.18.10.16.42; author skrll; state Exp; branches 1.1.1.1; next ; 1.14.2.1 date 2024.07.01.00.59.52; author perseant; state Exp; branches; next ; commitid NkoYLLCQWWw9v4gF; 1.11.2.1 date 2019.09.06.19.40.31; author martin; state Exp; branches; next ; commitid i7n9QGYFonpOhZBB; 1.10.2.1 date 2019.06.10.21.52.08; author christos; state Exp; branches; next 1.10.2.2; commitid jtc8rnCzWiEEHGqB; 1.10.2.2 date 2020.04.13.07.56.42; author martin; state Exp; branches; next ; commitid X01YhRUPVUDaec4C; 1.9.12.1 date 2018.04.22.07.20.09; author pgoyette; state Exp; branches; next 1.9.12.2; commitid W6xykws0Zbl4kpzA; 1.9.12.2 date 2018.11.26.01.50.05; author pgoyette; state Exp; branches; next ; commitid Zj4q5SspGdKXto1B; 1.7.2.1 date 2016.08.06.00.18.42; author pgoyette; state Exp; branches; next 1.7.2.2; commitid da8LmcQp9HeG2bhz; 1.7.2.2 date 2016.11.04.14.42.48; author pgoyette; state Exp; branches; next ; commitid 2m1JRwYmpwPkOOsz; 1.5.4.1 date 2014.08.12.09.36.03; author martin; state Exp; branches; next ; commitid cHDGrqOFxinir3Mx; 1.4.6.1 date 2014.08.19.23.52.25; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.3.2.1 date 2012.04.17.00.04.16; author yamt; state Exp; branches; next 1.3.2.2; 1.3.2.2 date 2014.05.22.15.54.10; author yamt; state Exp; branches; next ; commitid LcfsdHQ4HK08ayBx; 1.1.1.1 date 2009.08.18.10.16.42; author skrll; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.12.06.14.24.11; author skrll; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.09.24.22.45.55; author christos; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2013.09.29.13.38.27; author christos; state Exp; branches; next 1.1.1.5; commitid TyuuzSx830x3Yk7x; 1.1.1.5 date 2016.01.29.12.44.12; author christos; state Exp; branches; next 1.1.1.6; commitid B0qHLT45wK2yhPSy; 1.1.1.6 date 2016.07.28.12.18.52; author christos; state Exp; branches; next 1.1.1.7; commitid RBe5VZNgBXTaj5gz; 1.1.1.7 date 2016.10.26.17.29.35; author christos; state Exp; branches; next 1.1.1.8; commitid su5ccdRz6qdh9Grz; 1.1.1.8 date 2018.04.14.22.18.35; author christos; state Exp; branches; next 1.1.1.9; commitid ShNerhdmcUZyxsyA; 1.1.1.9 date 2018.11.06.21.18.39; author christos; state Exp; branches; next 1.1.1.10; commitid 6Ndf2Zuj4yZRAVYA; 1.1.1.10 date 2020.04.03.23.40.20; author christos; state Exp; branches; next 1.1.1.11; commitid qJOWzDWs5P5cQZ2C; 1.1.1.11 date 2022.12.23.19.01.30; author christos; state Exp; branches; next 1.1.1.12; commitid AaAP7ITTx5JnmI6E; 1.1.1.12 date 2024.06.30.15.59.51; author christos; state Exp; branches; next 1.1.1.13; commitid Eqxmo2uubpM9w1gF; 1.1.1.13 date 2025.08.25.14.41.49; author christos; state Exp; branches; next 1.1.1.14; commitid aUBKFf4jmEzPv78G; 1.1.1.14 date 2026.02.11.19.49.18; author christos; state Exp; branches; next ; commitid vybCSY05tblOMZtG; desc @@ 1.17 log @Merge conflicts between 2.45 and 2.46, regen x86 @ text @2025-09-16 Rainer Orth * config.bfd : Remove. 2025-07-13 Nick Clifton * 2.45 Branch point. 2025-02-08 Alexandre Oliva * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Check for _GLOBAL_OFFSET_TABLE_ references early, then compare hashed symbols instead of strings. (_bfd_sparc_elf_relocate_section): Compare hashed symbols. 2025-01-23 Jose E. Marchesi * doc/local.mk (AM_MAKEINFOFLAGS): Prepend the build directory to the @@include search path. * Makefile.in: Regenerate. 2025-01-19 Nick Clifton * 2.44 Branch point. 2024-10-18 WANG Xuerui * elfnn-loongarch.c (ELF_MAXPAGESIZE): Bump to 64KiB. (ELF_MINPAGESIZE): Define as 4KiB. (ELF_COMMONPAGESIZE): Define as 16KiB. 2024-07-20 Nick Clifton * 2.43 branch point. 2024-01-15 Nick Clifton * 2.42 branch point. 2023-12-05 Nick Clifton PR 31106 * elfcode.h (elf_write_relocs): Do not convert a relocation against a zero-value absolute symbol into a relocation without a symbol if the symbol is being used for a complex relocation. 2023-11-21 Nick Clifton PR 31067 linker.c (_bfd_generic_link_add_one_symbol): When issuing a warning message, also display a message about the warning not being affected by garbage colleciton. 2023-11-15 Arsen Arsenović * aclocal.m4: Regenerate. * configure.ac (SHARED_LIBADD): Use LTLIBINTL rather than LIBINTL. * configure: Regenerate. * po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot temporary file, to suppress xgettext checking charset names. 2023-11-10 Simon Marchi * archures.c (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * bfd-in2.h (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * cpu-amdgcn.c (arch_info_struct): Add entries for bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102. 2023-11-10 Nick Clifton * elf.c (assign_file_positions_except_relocs): Turn warnings about executable segments into errors if so requested. * elflink.c (bfd_elf_size_dynamic_sections): Turn warnings about executable stacks into errors if so requested. 2023-10-30 Nick Clifton * bpf-reloc.def (R_BPF_64_NODLD32): Add entry. 2023-10-16 Nick Clifton PR 28910 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Do not set output flags if the input flags have not been set. 2023-10-09 Nick Clifton PR 30950 * elf32-i386.c (elf_i386_convert_load_reloc): Check for elf_x86_hash_table returning a NULL pointer. PR 30949 * elflink.c (elf_gc_mark_debug_section): Check for bfd_section_from_elf_index returning a NULL pointer. 2023-10-06 Nick Clifton PR 30940 * elf64-alpha.c (elf64_alpha_check_relocs): Correct error message. 2023-10-05 Nick Clifton PR 30904 * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to see if the gnuchains array has been successfully created. 2023-10-02 Nick Clifton * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use bfd_get_current_time when filing in the timestamp. 2023-09-29 Nick Clifton PR 30906 * elf.c (_bfd_elf_slurp_version_tables): Test that the verref section header has been initialised before using it. 2023-09-28 Nick Clifton PR 30886 * elf-bfd.h (struct elf_obj_tdata): Add dt_strsz field. * elf.c (_bfd_elf_get_dynamic_symbols): Add a NUL byte at the end of the string table. Initialise the dt_strsz field. (_bfd_elf_slurp_version_tables): Only free the contents if they were malloc'ed. Add checks before setting string pointers in the dt_strtab buffer. 2023-09-27 Nick Clifton PR 30885 * elfcode.h (elf_slurp_symbol_table): Compute the symcount for non dynamic symbols in the same way as _bfd_elf_get_symtab_upper_bound. 2023-09-13 Jacob Navia * elf.c (_bfd_elf_init_reloc_shdr): Don't segfault on alloc fail. 2023-09-13 Alan Modra * elf-strtab.c (_bfd_elf_strtab_init): In the event of memory allocation failure, make sure that the hash table is freed. 2023-08-30 Tom Tromey PR binutils/30703 * doc/webassembly.texi, doc/bfd.texi: Revert 8bb23cdb, adding parameters back to @@node. 2023-08-04 Nick Clifton PR 15545 * cache.c (bfd_cache_close_all): Extend description to note that all files will be closed, even those that are not cacheable. Add code to prevent a possible infinite loop. 2023-08-02 Tom Tromey * pei-x86_64.c (PEI_HEADERS): Do not define. * pei-loongarch64.c (PEI_HEADERS): Do not define. * pei-aarch64.c (PEI_HEADERS): Do not define. * pe-x86_64.c (PEI_HEADERS): Do not define. * pe-aarch64.c (PEI_HEADERS): Do not define. * libpei.h (_LIBPEI_H): Add include guard. * coff-x86_64.c (PEI_HEADERS): Do not check. * coff-loongarch64.c (PEI_HEADERS): Do not check. * coff-aarch64.c (PEI_HEADERS): Do not check. 2023-07-24 Johannes Schauer Marin Rodrigues * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): If inserting a timestamp, use the value held in the SOURCE_DATE_EPOCH environment variable, if it is defined. 2023-07-24 Jose E. Marchesi * reloc.c: New reloc BFD_RELOC_BPF_DISPCALL32. * elf64-bpf.c (bpf_reloc_type_lookup): Handle the new reloc. * libbfd.h (bfd_reloc_code_real_names): Regenerate. 2023-07-09 Fangrui Song PR 30592 * section.c: Define SEC_ELF_LARGE. * bfd-in2.h: Regenerate. * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections, elf_x86_64_copy_private_section_data): New. 2023-07-03 Nick Clifton * version.m4: Update version number to 2.41.50. * configure: Regenerate. * bfd/po/bfd.pot: Regenerate. 2023-07-03 Nick Clifton 2.41 Branch Point. 2023-06-19 Nick Clifton PR 30560 * elf64-x86-64.c (elf_x86_64_relocate_section): Add more checks for a valid relocation offset. 2023-06-07 Nick Clifton PR 30499 * elflink.c (elf_link_add_object_symbols): Add a message indicating that alignment and size discrepancies between the definition of common symbols and normal symbols are serious and should be investigated. 2023-05-31 Tristan Gingold PR 30444 * coffcode.h (coff_write_object_contents): Handle base64 encoding on PE. Also check for too large string table. * coffgen.c (extract_long_section_name): New function extracted from ... (make_a_section_from_file): ... here. Add support for base64 long section names. (decode_base64): New function. 2023-05-17 Luca Bacci PR 30421 * cofflink.c (_decoration_hash_newfunc): New function. (_bfd_coff_link_hash_table_init): Call it. * libcoff-in.h (struct coff_link_hash_table): Add decoration_hash field. (struct decoration_hash_entry): Declare. (_decoration_hash_newfunc): Prototype. * libcoff.h: Regenerate. 2023-05-16 Oleg Tolmatcev * libcoff-in.h (struct coff_tdata): Add section_by_index and section_by_target_index hash tables. * libcoff.h: Regenerate. * coffcode.h (htab_hash_section_index): New function. (htab_eq_section_index): New function. (htab_hash_section_target_index): New function. (htab_eq_section_target_index): New function. (coff_mkobject_hool): Create the hash tables. * peicode.h: Add the same new functions. (pe_mkobject_hook): Create the hash tables. * coff-x86_64.c (coff_amd64_rtype_to_howto): Use the new tables to speed up lookups. * coffgen.c (coff_section_from_bfd_index): Likewise. (_bfd_coff_close_and_cleanup): Delete the hash tables. 2023-05-10 Luca Bonissi PR 30422 * elf32-or1k.c (or1k_elf_relocate_section): Prescan for R_OR1K_GOT_AHI16 relocs as they may occur after R_OR1K_GOT16 relocs. 2023-05-05 Nick Clifton PR 30354 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): If any debug sections are marked then rerun the extra marking in order to pick up any dependencies. 2023-05-03 Oleg Tolmatcev * archive.c (_bfd_write_archive_contents): Use a larger buffer in order to improve efficiency. 2023-05-03 Oleg Tolmatcev * coffcode.h (coff_read_word_from_buffer): New function. * coffcode.h (COFF_CHECKSUM_BUFFER_SIZE): New constant. * coffcode.h (coff_compute_checksum): Improve speed by reducing the number of seeks and reads used. 2023-04-24 Nick Clifton * po/la.po: New Georgian translation. 2023-04-17 Nick Clifton PR 30142 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc section to be writeable. 2023-03-30 Nick Clifton PR 30285 * elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated. 2023-02-27 Felix Willgerodt * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for elf_external_linux_prpsinfo32_ugid32. 2023-02-23 Fangrui Song * elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params. (riscv_elfNN_set_options): New. (riscv_info_to_howto_rela): Check relax_gp. (_bfd_riscv_relax_section): Likewise. * elfxx-riscv.h (struct riscv_elf_params): New. (riscv_elf32_set_options): New. (riscv_elf64_set_options): New. 2023-02-23 Nick Clifton Alan Modra PR 30150 * dwarf2.c (comp_unit_contains_address): Renamed to ... (comp_unit_may_contain_address): this, and added code to return true if the CU's ranges have not yet been computed. (_bfd_dwarf2_find_nearest_line_with_alt): Use the renamed function, simplifying code in the process. 2023-02-21 Nick Clifton * opncls.c (bfd_fill_in_gnu_debuglink_section): Update description. 2023-02-17 Tom Tromey * doc/doc.str (FUNCTION): Call func. 2023-02-17 Tom Tromey * opncls.c: Hoist the SECTION comment. 2023-02-17 Tom Tromey * opncls.c (bfd_get_debug_link_info_1, separate_debug_file_exists) (separate_alt_debug_file_exists, find_separate_debug_file) (get_build_id, get_build_id_name, check_build_id_file): Don't use chew comments. 2023-02-17 Tom Tromey * doc/doc.str (SYNOPSIS): Use collapse_whitespace. * doc/chew.c (collapse_whitespace): New function. (main): Register collapse_whitespace. 2023-02-07 Tom Tromey * bfd.c, cache.c, compress.c, opncls.c: Remove RETURNS from documentation comments. * doc/doc.str, doc/proto.str (RETURNS): Remove. 2023-02-07 Tom Tromey * syms.c (bfd_decode_symclass, bfd_is_undefined_symclass) (bfd_symbol_info): Reorder documentation comment. * doc/doc.str (synopsis_seen): New variable. (SYNOPSIS): Set synopsis_seen. Emit @@deftypefn. (DESCRIPTION): Use synopsis_seen. * doc/chew.c (catstrif): New function. (main): Add catstrif intrinsic. (compile): Recognize "variable" command. 2023-02-07 Tom Tromey * doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC): Update. * doc/chew.c (internalmode): Remove. (add_intrinsic_variable): New function. (main): Add internalmode as intrinsic. (internal_mode): Remove global. (maybecatstr): Update. (free_words): Free variables. 2023-02-07 Tom Tromey * doc/chew.c (pcu) : Now intptr_t. (internal_mode, istack, isp): Likewise. (bang, atsign): Use intptr_t. 2023-02-07 Tom Tromey * doc/proto.str (SYNOPSIS): Don't use paramstuff. * doc/chew.c (paramstuff): Remove. (main): Don't add paramstuff intrinsic. 2023-02-07 Tom Tromey * doc/doc.str, doc/proto.str: Add copyright header. 2023-02-07 Tom Tromey * doc/webassembly.texi (File layout): Remove second argument from @@node. * doc/bfd.texi: Use single-argument @@node everywhere. 2023-02-07 Tom Tromey * Makefile.in: Rebuild. * doc/local.mk (%D%/chew.stamp): Don't use H_CFLAGS. 2023-01-24 Nick Clifton PR 29998 * cofflink.c (_bfd_coff_generic_relocate_section): Add an assertion that the output section is set for defined, global symbols. 2023-01-17 Xianmiao Qu * elf32-csky.c (elf32_csky_merge_attributes): Don't save and restore the ARCH attribute, it will actually clear the ARCH attribute. (csky_elf_merge_private_bfd_data): Store the machine flag correctly. 2023-01-13 Nick Clifton * po/ro.po: Updated Romainian translation. 2023-01-11 Nick Clifton PR 29988 * dwarf2.c (read_indexed_address): Fix check for an out of range offset. 2023-01-06 Nick Clifton * po/ru.po: Updated Russian translation. 2023-01-03 Himal PR 29947 * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows' nul device filename. 2023-01-03 Nick Clifton * po/fr.po: Updated French trabslation. * po/uk.po: Updated Ukrainian trabslation. 2022-12-31 Nick Clifton * 2.40 branch created. 2022-12-23 Nick Clifton PR 29936 * dwarf2.c (concat_filename): Fix check for a directory index off the end of the directory table. 2022-12-21 Nick Clifton * po/ro.po: Updated Romanian translation. 2022-12-06 Nick Clifton PR 29852 * elf32-arm.c (cmse_scan): Check for NULL entries in the sym_hashes array. (elf32_arm_gc_mark_extra_sections): Likewise. 2022-12-05 Nick Clifton PR 29848 * vms-alpha.c (parse_module): Fix potential out of bounds memory access. 2022-12-01 Nick Clifton PR 25202 * bfd.c (VerilogDataEndianness): New variable. (verilog_write_record): Use VerilogDataEndianness, if set, to choose the endianness of the output. (verilog_write_section): Adjust the address by the data width. 2022-11-21 Nick Clifton PR 29764 * cpu-arm.c (scan): Accept machine names prefixed with "arm:". * cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:". 2022-10-19 Nick Clifton PR 29699 * elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field of the section header is zero. 2022-09-09 Nick Clifton PR 29532 * elf.c (setup_group): Do not return false if there is no group information available. 2022-09-02 Aaron Merey * aout-target.h (MY_find_nearest_line_with_alt): New macro. * bfd-in2.h: Regenerate. * bfd.c (bfd_find_nearest_line_with_alt): New macro. * binary.c (binary_find_nearest_line_with_alt): New macro. * coff-rs6000.c (_bfd_xcoff_find_nearest_line_with_alt): New macro. (rs6000_xcoff64_vec): Add coff_find_nearest_line_with_alt. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Calls _bfd_dwarf2_find_nearest_line_with_alt. (_bfd_dwarf2_find_nearest_line_with_alt): New function. Implements the former _bfd_dwarf2_find_nearest_line. Adds parameter alt_filename. Attempt to open alt_filename and use it as the .dwz file if not NULL. * elf-bfd.h (_bfd_elf_find_nearest_line_with_alt): New declaration. * elf.c (_bfd_elf_find_nearest_line): Calls _bfd_elf_find_nearest_line_with_alt. (_bfd_elf_find_nearest_line_with_alt): New function. Implements the former _bfd_elf_find_nearest_line. Adds parameter alt_filename. * elf32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro. * elf64-mips.c (bfd_elf64_find_nearest_line_with_alt): New macro. * elfn32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro. * elfxx-mips.h (_bfd_mips_elf_find_nearest_line_with_alt): New macro. * elfxx-target.h (bfd_elfNN_find_nearest_line_with_alt): New macro. * i386mdos.c (msdos_find_nearest_line_with_alt): New macro. * ihex.c (ihex_find_nearest_line_with_alt): New macro. * libbfd-in.h (_bfd_nosymbols_find_nearest_line_with_alt): New declaration. (_bfd_dwarf2_find_nearest_line_with_alt): New declaration. * libbfd.h: Regenerate. * libcoff-in.h (coff_find_nearest_line_with_alt): New macro. * libcoff.h: Regenerate. * libecoff.h (_bfd_ecoff_find_nearest_line_with_alt): New macro. * mach-o.h (bfd_mach_o_find_nearest_line_with_alt): New macro. * mmo.c (mmo_find_nearest_line_with_alt): New macro. * pef.c (bfd_pef_find_nearest_line_with_alt): New macro. * plugin.c (bfd_plugin_find_nearest_line_with_alt): New macro. * ppcboot.c (ppcboot_find_nearest_line_with_alt): New macro. * som.h (som_find_nearest_line_with_alt): New macro. * srec.c (srec_find_nearest_line_with_alt): New macro. * syms.c (_bfd_nosymbols_find_nearest_line_with_alt): New function. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add symbol for NAME##_find_nearest_line_with_alt. (_bfd_find_nearest_line_with_alt): Add declaration. * tekhex.c (tekhex_find_nearest_line_with_alt): New macro. * verilog.c (verilog_find_nearest_line_with_alt): New macro. * vms-alpha.c (_bfd_vms_find_nearest_line_with_alt): New macro. * wasm-module.c (wasm_find_nearest_line_with_alt): New macro. * xsym.c (bfd_sym_find_nearest_line_with_alt): New macro. 2022-09-02 Frederic Cambus * config.bfd (arm-*-openbsd*): Restore target. 2022-08-30 Nick Clifton PR 29529 * dwarf2.c (struct line_info_table): Add new field: use_dir_and_file_0. (concat_filename): Use new field to help select the correct table slot. (read_formatted_entries): Do not skip entry 0. (decode_line_info): Set new field depending upon the version of DWARF being parsed. Initialise filename based upon the setting of the new field. 2022-08-22 Frederic Cambus * config.bfd (aarch64-*-openbsd*): Add target. 2022-08-03 Nick Clifton PR 29389 * bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag. * cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the closed bfd. (bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly reopened bfd. * opncls.c (bfd_set_filename): Refuse to change the name of a bfd that has been closed by bfd_cache_delete. Mark changed bfds as uncacheable. * bfd-in2.h: Regenerate. 2022-07-29 Nick Clifton PR 29424 * dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and DW_FORM_loclistx. 2022-07-26 Nick Clifton * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix indentation. 2022-07-08 Nick Clifton * 2.39 branch created. 2022-05-19 Yvan Roux PR 25713 * bfdio.c (_bfd_real_fopen): Delete ccs string. 2022-04-27 John Baldwin * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes. 2022-04-25 Nick Clifton PR 29072 * elflink.c (bfd_elf_size_dynamic_sections): Display a note to the user that the current ehaviour of creating an executable stack because of a missing .note.GNU-stack section is deprecated and will be changed in a future release. 2022-04-20 Clément Chigot * coff-rs6000.c (xcoff_reloc_type_noop): Add info argument. (xcoff_reloc_type_fail): Likewise. (xcoff_reloc_type_pos): Likewise. (xcoff_reloc_type_neg): Likewise. (xcoff_reloc_type_rel): Likewise. (xcoff_reloc_type_toc): Likewise. (xcoff_reloc_type_ba): Likewise. (xcoff_reloc_type_crel): Likewise. (xcoff_reloc_type_tls): Likewise. (xcoff_reloc_type_br): Add stub handler. (xcoff_ppc_relocate_section): Add info to xcoff_calculate_relocation. (xcoff_stub_indirect_call_code): New constant. (xcoff_stub_shared_call_code): Likewise. (bfd_xcoff_backend_data): Add stub code fields. (bfd_pmac_xcoff_backend_data): Likewise. * coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler. (xcoff64_ppc_relocate_section): Add info to xcoff64_calculate_relocation. (xcoff64_stub_indirect_call_code): New constant. (xcoff64_stub_shared_call_code): Likewise. (bfd_xcoff_backend_data): Add stub code fields. (bfd_xcoff_aix5_backend_data): Likewise. * libxcoff.h (struct xcoff_backend_data_rec): Add stub fields. (bfd_xcoff_stub_indirect_call_code): New define. (bfd_xcoff_stub_indirect_call_size): New define. (bfd_xcoff_stub_shared_call_code): New define. (bfd_xcoff_stub_shared_call_size): New define. (xcoff_reloc_function): Add info argument. (enum xcoff_stub_type): New enum. (struct xcoff_stub_hash_entry): New structure. * xcofflink.c (struct xcoff_link_hash_table): Add stub hash table and params fields. (xcoff_stub_hash_entry): New define. (xcoff_stub_hash_lookup): New define. (stub_hash_newfunc): New function. (_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash table. (_bfd_xcoff_bfd_link_hash_table_create): Create the new stub hash table. (xcoff_link_add_symbols): Save rawsize for XTY_SD. (bfd_xcoff_link_init): New function. (xcoff_stub_csect_name): New function. (xcoff_stub_get_csect_in_range): New function. (xcoff_stub_name): New function. (bfd_xcoff_get_stub_entry): New function. (bfd_xcoff_type_of_stub): New function. (xcoff_add_stub): New function. (xcoff_build_one_stub): New function. (bfd_xcoff_size_stubs): New function. (bfd_xcoff_build_stubs): New function. (xcoff_stub_create_relocations): New function. (xcoff_link_input_bfd): Adapt relocations to stub. (xcoff_write_global_symbol): Adapt to new TOC entries generated for stubs. (_bfd_xcoff_bfd_final_link): Handle stub file. * xcofflink.h (struct bfd_xcoff_link_params): New structure. 2022-04-20 Clément Chigot * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in ldinfo->strings instead of directly in the output_bfd. * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise. * xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count field. Add ldinfo field. (xcoff_mark_symbol): Adjust to new ldinfo field. (xcoff_mark): Likewise. (bfd_xcoff_link_count_reloc): Likewise. (xcoff_build_loader_section): Split into two functions: one that build the loader section (this function) and one that only size it... (xcoff_size_loader_section): ... (this function). (bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field. Move the part where the dynamic sections are build to ... (bfd_xcoff_build_dynamic_sections): ... this function. * xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype. 2022-04-13 Alexander von Gluck IV * config.bfd (x86-haiku): Add i386_pei_vec as a selectable format. 2022-04-08 Nick Clifton PR 29038 * coffgen.c (coff_find_nearest_line_with_names): Fix typo retrieving saved bias. 2022-04-07 Mark Harmstone * coff-i386.c (in_reloc_p): Add R_SECTION. (howto_table): Add R_SECTION. (coff_pe_i386_relocation_section): Add support for R_SECTION. (coff_i386_reloc_type_lookup): Add support for BFD_RELOC_16_SECCIDX. * coff-x86_64.c (in_reloc_p): Add R_SECTION. (howto_table): Add R_SECTION. (coff_pe_amd64_relocation_section): Add support for R_SECTION. (coff_amd64_reloc_type_lookup): Add support for BFD_RELOC_16_SECCIDX. * reloc.c: Add BFD_RELOC_16_SECIDX. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2022-04-01 John Baldwin * elf-bfd.h (elfcore_write_x86_segbases): New. * elf.c (elfcore_grok_freebsd_note): Add pseudosections for NT_FREEBSD_X86_SEGBASES register notes. (elfcore_write_x86_segbases): New. (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES register notes. 2022-04-01 John Baldwin * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz. 2022-03-22 Steiner H Gunderson * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is found, but no line number info, then return a result of 2. 2022-03-21 Steiner H Gunderson PR 28978 * dwarf2.c (scan_unit_for_symbols): When performing second pass, check to see if the function or variable being processed is the same as the previous one. 2022-03-18 Viorel Preoteasa PR 28924 * elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition. (THM2_MAX_FWD_BRANCH_OFFSET): Likewise. 2022-03-16 Simon Marchi * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add cpu-amdgcn.c. (BFD64_BACKENDS): Add elf64-amdgcn.lo. (BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c. * Makefile.in: Re-generate. * cpu-amdgcn.c: New. * elf64-amdgcn.c: New. * archures.c (bfd_architecture): Add bfd_arch_amdgcn and related mach defines. (bfd_amdgcn_arch): New. (bfd_archures_list): Add bfd_amdgcn_arch. * bfd-in2.h: Re-generate. * config.bfd: Handle amdgcn* target. * configure.ac: Handle amdgcn_elf64_le_vec. * configure: Re-generate. * elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA. * targets.c (amdgcn_elf64_le_vec): New. (_bfd_target_vector): Add amdgcn_elf64_le_vec. 2022-03-01 Torbjörn Svensson Fred Eisele PR 25713 * bfdio.c (_bfd_real_fopen): Fix typo. 2022-03-01 Nick Clifton PR 28848 * elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have TAG_FP_arch set then reset the TAG_ABI_HardFP_use. 2022-02-28 Torbjörn Svensson Fred Eisele PR 25713 * bfdio.c (_bfd_real_fopen): Fix handling of paths longer than 260 characters on Windows hosts. 2022-02-28 Nick Clifton PR 28886 * config.bfd: Update error message for obsolete configurations. 2022-02-17 Nick Clifton * po/sr.po: Updated Serbian translation. 2022-02-16 Fangrui Song Nick Clifton PR ld/28841 * bfd-in2.h (struct bfd_section): Add type. (discarded_section): Add field. * elf.c (elf_fake_sections): Handle bfd_section::type. * section.c (BFD_FAKE_SECTION): Add field. * mri.c (mri_draw_tree): Update function call. 2022-02-11 Michael Forney * bfd.c (bfd_set_gp_value): Remove return with expression in void function. 2022-02-09 Nick Clifton * config.bfd: Move pending obsolesence targets into the definitely obsolete list. 2022-02-02 Nick Clifton PR 28834 * dwarf2.c (read_section): Change the heuristic that checks for overlarge dwarf debug info sections. 2022-02-02 Stafford Horne PR 28735 * elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define. (or1k_elf_relocate_section): Use new howto instead of trying to mask out relocation bits. 2022-01-24 Roland McGrath * doc/local.mk (%D%/bfdver.texi): Add mkdir command. 2022-01-24 Nick Clifton * po/fr.po: Updated French translation. * po/ro.po: Updated Romanian translation. * po/uk.po: Updated Ukranian translation. 2022-01-22 Nick Clifton * version.m4: Change to 2.38.50. * configure: Regenerate. * po/bfd.pot: Regenerate. 2022-01-22 Nick Clifton * 2.38 release branch created. 2022-01-17 Nick Clifton * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * po/bfd.pot: Regenerate. 2021-12-15 Nikita Popov PR 28687 * dwarf1.c (parse_die): Fix undefined behaviour in range tests. 2021-11-17 Nick Clifton PR 28452 * elf.c (assign_file_positions_for_non_load_sections): Replace assertion with a warning message. 2021-10-19 Nick Clifton * linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL name before checking to see if the symbol is __gnu_lto_slim. * archive.c (_bfd_compute_and_write_armap): Likewise. 2021-09-27 Nick Alcock * configure: Regenerate. 2021-09-15 Andrew Burgess * archures.c (bfd_arch_list): Use 'char *' instead of 'char **' when calculating space for a string list. 2021-09-014 Cupertino Miranda Claudiu Zissulescu * arc-got.h (arc_static_sym_data): New structure. (get_static_sym_data): New function. (relocate_fix_got_relocs_for_got_info): Move the computation fo symbol value and section to above introduced function, and use this new function. 2021-09-07 Luis Machado Revert: [AArch64] MTE corefile support 2021-05-21 Luis Machado * elf.c (elfcore_make_memtag_note_section): New function. (elfcore_grok_note): Handle NT_MEMTAG note types. 2021-09-07 Nick Clifton PR 28305 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range reloc. PR 28303 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of range relocs. 2021-08-10 Nick Clifton * po/sr.po: Updated Serbian translation. 2021-07-18 Nick Clifton * config.bfd: Move pending obsoletion targets to obsolete list. 2021-07-16 Giulio Benetti * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry in switch case R_OR1K_INSN_REL_26 where we need to check for !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL(). 2021-07-14 Clément Chigot * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name. * coff-rs6000.c (xcoff_dwsect_names): Update. * coffcode.h (sec_to_styp_flags): Likewise. (coff_new_section_hook): Likewise. 2021-07-10 Alan Modra * dwarf2.c (read_address): Remove accidental commit. (read_ranges): Compare offset rather than pointers. 2021-07-08 Nick Clifton * po/pt.po: Updated Portuguese translation. 2021-07-07 Nick Clifton * elfcode.h (elf_swap_symbol_out): Revert accidental change that removed an abort if the shndx pointer is NULL. 2021-07-07 Rainer Orth * sysdep.h [!ENABLE_NLS]: Prevent inclusion of on Solaris. 2021-07-07 Rainer Orth * configure.ac: Check for strnlen declaration. * configure, config.in: Regenerate. 2021-07-07 Nick Clifton PR 28051 * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in order to fix problems when translating. * cofflink.c (_bfd_coff_write_global_sym): Likewise. * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub): Likewise. * po/bfd.pot: Regenerate. 2021-07-06 Michael Matz PR ld/28021 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any versioning. 2021-07-06 Alan Modra PR 28055 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED. 2021-07-05 Alan Modra PR 28055 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put and bfd_put_32 calls. Correct section limit checks. 2021-07-03 Nick Clifton * version.m4: Update version number. * configure: Regenerate. * po/opcodes.pot: Regenerate. 2021-07-03 Nick Clifton * 2.37 release branch created. 2021-07-02 Nick Clifton PR 28046 * dwarf2.c (read_ranges): Check that range_ptr does not exceed range_end. 2021-06-30 YunQiang Su PR mips/28009 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr, _bfd_mips_elf_fake_sections): Mark LTO debug info as SHT_MIPS_DWARF. 2021-06-29 Nick Clifton * config.bfd (obsolete configurations): Add netbsdpe. 2021-06-22 Nelson Chu * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store the original relocation type, in case the type is converted to R_RISCV_HI20. (riscv_pcrel_lo_reloc): Removed unused name field. (riscv_pcrel_relocs): Added comments. (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd. (riscv_record_pcrel_hi_reloc): Updated. (riscv_record_pcrel_lo_reloc): Likewise. (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original type of auipc, to make sure the %pcrel_lo without any addends. Otherwise, report dangerous relocation error. (riscv_elf_relocate_section): Updated above functions are changed. For R_RISCV_GOT_HI20, report dangerous relocation error when addend isn't zero. 2021-06-19 H.J. Lu PR ld/27998 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF relocation against IFUNC symbols. (_bfd_x86_elf_adjust_dynamic_symbol): Likewise. 2021-06-19 H.J. Lu * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in PDE. 2021-06-18 H.J. Lu * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI, GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI. (elf_merge_gnu_properties): Likewise. 2021-06-11 Alan Modra PR 27952 * elf-bfd.h (struct elf_obj_tdata): Add is_pie. * elflink.c (elf_link_add_object_symbols): Set is_pie. 2021-06-09 Nick Clifton PR 27666 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec vectors to Sparc Solaris2 targets. 2021-06-08 Michael Matz * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag. (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out. 2021-06-07 Jan Beulich * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant. 2021-06-02 Alan Modra * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if subsection length is too small to cover tag and length field. 2021-05-31 Nelson Chu Lifang Xia PR 27566 * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer to monitor the data segment phase. (bfd_elfNN_riscv_set_data_segment_info): New function called by after_allocation, to set the data_segment_phase from expld.dataseg. (_bfd_riscv_relax_section): Don't relax when data_segment_phase is exp_seg_relro_adjust (0x4). * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern. (bfd_elf64_riscv_set_data_segment_info): Likewise 2021-05-28 H.J. Lu PR ld/27905 * elf32-i386.c: Don't include "libiberty.h". (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9. (elf_i386_rtype_to_howto): Revert commit 50c95a739c9. (elf_i386_info_to_howto_rel): Likewise. (elf_i386_tls_transition): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits a7664973b24 and 50c95a739c9. (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise. * elfxx-x86.h (elf_x86_obj_tdata): Likewise. (elf_x86_has_code16): Likewise. 2021-05-26 H.J. Lu PR ld/27905 * elf32-i386.c: Include "libiberty.h". (elf_howto_table): Add 16-bit R_386_PC16 entry. (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit R_386_PC16 if input has 16-bit mode instructions. (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto call. (elf_i386_tls_transition): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit R_X86_64_PC16 entry. (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input has 16-bit mode instructions. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set elf_x86_has_code16 if relocatable input is marked with GNU_PROPERTY_X86_FEATURE_2_CODE16. * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16. (elf_x86_has_code16): New. 2021-05-26 Nelson Chu * elfxx-riscv.h (check_unknown_prefixed_ext): New bool. * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the prefixed extension name if check_unknown_prefixed_ext is false. * elfnn-riscv.c (riscv_merge_arch_attr_info): Set check_unknown_prefixed_ext to false for linker. 2021-05-25 Nick Clifton * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field. (elf32_arm_num_entries): New macro. (elf32_arm_allocate_local_sym_info): Initialise the new field. Allocate arrays individually so that buffer overruns can be detected by memory checkers. (elf32_arm_create_local_iplt): Check num_entries. (elf32_arm_get_plt_info): Likewise. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. 2021-05-25 Nick Clifton * elf32-arm.c: Fix formatting. 2021-05-25 Alan Modra * elf-attrs.c (elf_attr_strdup): New function. (_bfd_elf_attr_strdup): Use it here. (elf_add_obj_attr_string): New function, extracted from.. (bfd_elf_add_obj_attr_string): ..here. (elf_add_obj_attr_int_string): New function, extracted from.. (bfd_elf_add_obj_attr_int_string): ..here. (_bfd_elf_parse_attributes): Don't allocate an extra byte for a string terminator. Instead ensure parsing doesn't go past end of sub-section. Use size_t variables for lengths. 2021-05-22 Alan Modra * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter. Replace data pointer with pointer to pointer. Increment pointer over bytes read. * libbfd-in.h (_bfd_safe_read_leb128): Update prototype. * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be careful not to increment data pointer past end. Remove now redundant pr17512 check. * wasm-module.c (READ_LEB128): Adjust to suit changes to _bfd_safe_read_leb128. * dwarf2.c (read_n_bytes): New inline function, old one renamed to.. (read_blk): ..this. Allocate and return block. Increment bfd_byte** arg. (read_3_bytes): New function. (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes), (read_8_bytes, read_string, read_indirect_string), (read_indirect_line_string, read_alt_indirect_string): Take a byte_byte** arg which is incremented over bytes read. Remove any bytes_read return. Rewrite limit checks to compare lengths rather than pointers. (read_abbrevs, read_attribute_value, read_formatted_entries), (decode_line_info, find_abstract_instance, read_ranges), (read_rnglists, scan_unit_for_symbols, parse_comp_unit), (stash_comp_unit): Adjust to suit. Rewrite limit checks to compare lengths rather than pointers. * libbfd.h: Regenerate. 2021-05-21 Luis Machado * elf.c (elfcore_make_memtag_note_section): New function. (elfcore_grok_note): Handle NT_MEMTAG note types. 2021-05-20 Andrew Burgess * section.c (bfd_get_section_by_name): Return NULL if name is NULL. (bfd_get_section_by_name_if): Likewise. * dwarf2.c (read_section): Remove unneeded NULL check. (find_debug_info): Likewise. 2021-05-19 Nick Clifton * plugin.c (bfd_plugin_open_input): Inform the user if the limit on the number of open files is reached. If possible, try to increase this limit before failing. 2021-05-14 Nelson Chu * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values of %pcrel_hi, before and after adding the addend. Make sure the value won't be changed, otherwise, report dangerous error. 2021-05-13 Nelson Chu * elfxx-riscv.c (check_implicit_always): The check_func, always add the implicit subset without checking. (check_implicit_for_i): The check_func for i, only add zicsr and zifencei when the version of i less than 2.1. (struct riscv_implicit_subset): Record the subsets and their corresponding implicit subsets. (riscv_implicit_subsets): Table records all implicit informations. (riscv_parse_add_implicit_subsets): Updated and add implicit subsets according to riscv_implicit_subsets. Remove the redundant codes. 2021-05-13 Alan Modra PR 27858 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid reloc howto. 2021-05-12 Luis Machado * elf-bfd.h (elfcore_write_aarch_mte): New prototype. * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New functions. (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL. (elfcore_write_register_note): Handle MTE notes. 2021-05-11 Alan Modra PR 27844 * pdp11.c (aout_get_external_symbols): Clear first four bytes of strings array, not just the first byte. * aoutx.h (aout_get_external_symbols): Likewise. 2021-05-10 H.J. Lu PR binutils/27839 * simple.c (bfd_simple_get_relocated_section_contents): Remove strayed fprintf. 2021-05-10 Nick Clifton PR 27839 * simple.c (simple_dummy_add_to_set): New function. (simple_dummy_constructor): New function. (simple_dummy_multiple_common): New function. (bfd_simple_get_relocated_section_contents): Zero out the callbacks structure, and then set the add_to_set, constructor and multiple_common fields. 2021-05-10 Dimitar Dimitrov * elf32-pru.c (elf_backend_can_gc_sections): Define as 1. 2021-05-08 Mike Frysinger * doc/Makefile.am (html-local, bfd/index.html): New targets. * doc/Makefile.in: Regenerate. 2021-05-08 Mike Frysinger * doc/Makefile.am (AM_MAKEINFOFLAGS): Define. * doc/Makefile.in: Regenerate. 2021-05-07 Clément Chigot * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF sections. * coffgen.c (coff_pointerize_aux): Handle C_DWARF. (coff_print_symbol): Likewise. * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update. 2021-05-07 Jan Beulich * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields to zero. 2021-05-07 Alan Modra * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2021-05-06 Stafford Horne PR 27746 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT, OR1K_ADD, OR1K_ORI): New macros to help with plt creation. (elf_or1k_link_hash_table): New field plt_count. (elf_or1k_link_hash_entry): New field plt_index. (elf_or1k_plt_entry_size): New function. (or1k_write_plt_entry): Update to support variable size PLTs. (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry API. (or1k_elf_finish_dynamic_symbol): Update to write large PLTs when needed. (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for PLT size. 2021-05-06 Stafford Horne PR 21464 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16 overflow check if we have R_OR1K_GOT_AHI16 followed by R_OR1K_GOT16. 2021-05-06 Stafford Horne PR 21464 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation. * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise. (or1k_final_link_relocate, or1k_elf_relocate_section, or1k_elf_check_relocs): Likewise. * libbfd.h (bfd_reloc_code_real_names): Likewise. * reloc.c: Likewise. 2021-05-06 Stafford Horne PR 27624 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change condition used to cleanup plt entries to cleanup forced local entries. 2021-05-05 H.J. Lu PR ld/27825 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT" to local symbols. 2021-05-05 Alan Modra * vms-lib.c (vms_traverse_index): Account for vms_kbn size when sanity checking keylen. 2021-05-04 Nick Clifton * libbfd.c (bfd_malloc): Provide some documenation. Treat a size of 0 as 1. (bfd_realloc): Likewise. (bfd_zmalloc): Likewise. (bfd_realloc_or_free): Provide some documentation. Treat a size of 0 as a request to free. * libbfd-in.h (bfd_realloc): Remove prototype. (bfd_realloc_or_free): Remove prototype. (bfd_zmalloc): Remove prototype. * libbfd.h: Regenerate. 2021-05-03 Jan Beulich * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to complain_overflow_dont. * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit relocs to complain_overflow_dont. 2021-05-03 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak symbols when -z dynamic-undefined-weak or when there are no dynamic relocs in read-only sections and -z nodynamic-undefined-weak is not given. * elf64-ppc.c (allocate_dynrelocs): Likewise. 2021-05-03 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for weak undefined symols that only appear on PLT relocs. * elf64-ppc.c (allocate_dynrelocs): Likewise. 2021-05-03 Alan Modra PR 27755 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop. 2021-05-03 Alan Modra * elf32-csky.c (is_mapping_symbol_name): New function. (csky_elf_is_target_special_symbol): Likewise. (csky_elf_maybe_function_sym): Likewise. (bfd_elf32_bfd_is_target_special_symbol): Define. (elf_backend_maybe_function_sym): Define. 2021-04-30 Nick Clifton PR 27801 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to read 32-bit value. 2021-04-30 Nick Clifton PR 27799 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes that are too small. 2021-04-30 Nick Clifton PR 27797 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has been realloc'ed to size 0. 2021-04-30 Nick Clifton PR 27795 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name lengths. 2021-04-29 Nick Clifton PR 27793 * som.c (som_slurp_symbol_table): Assign symbols without any scope to the undefined section. (som_decode_symclass): Check for a missing symbol section. * syms.c (bfd_decode_symclass): Likewise. 2021-04-29 Nick Clifton PR 27792 * som.c (som_slurp_string_table): Place a terminating NUL byte at the end of the table. (som_slurp_symbol_table): Check for an over-large offset into the string string table. 2021-04-28 Nick Clifton * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin symbols as potential function symbols. * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise. 2021-04-26 Mike Frysinger * elf-bfd.h: Include stdlib.h. 2021-04-26 Jan Beulich * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to complain_overflow_signed. * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16 to complain_overflow_signed. 2021-04-23 Eric Botcazou * elf.c (special_sections_p): Add .persistent.bss. 2021-04-23 Jan Beulich * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero size field. * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL has zero size field. 2021-04-22 Clément Chigot * hash.c (struct bfd_strtab_hash): Remove xcoff field. Add length_field_size field. (_bfd_stringtab_init): Change prototype. Adapt to new length_field_size. (_bfd_xcoff_stringtab_init): Likewise. (_bfd_stringtab_add): Likewise. (_bfd_stringtab_emit): Likewise. * libbfd-in.h (_bfd_xcoff_stringtab_init): Change prototype. * libbfd.h: Regenerate. * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Call _bfd_xcoff_stringtab_init with isxcoff64 value. 2021-04-22 Clément Chigot * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for unsupported storage class or auxialiry entries. Improve and adapt to new aux structures. Add C_DWARF support. (_bfd_xcoff_swap_aux_out): Likewise. * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise. (_bfd_xcoff64_swap_aux_out): Likewise. 2021-04-21 Eli Zaretskii PR 27760 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP, IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags. Decode the contents of the DllCharacteristics field. 2021-04-21 Nick Clifton PR 27759 * srec.c (srec_read_section): Replace assertions with error returns. 2021-04-20 Clément Chigot PR binutils/21700 * reloc.c (BFD_RELOC_PPC_NEG): New relocation. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler. (xcoff_reloc_type_neg): Correctly substract addend. * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32 howto. (xcoff64_rtype2howto): Add handler for R_NEG_32. (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler. * xcofflink.c (xcoff_need_ldrel_p): Check output section for R_POS-like relocations. New argument added. (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument. (xcoff_link_input_bfd): Likewise. 2021-04-16 Alan Modra PR 27567 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags. (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT, ignore alignment checks when return is false. Formatting. 2021-04-15 Nelson Chu PR27584 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to omit local and empty symbols since they usually generated to mark the auipc instructions. 2021-04-15 Lifang Xia * elf32-csky.c (csky_elf_howto_table) : Set special_function to bfd_elf_generic_reloc. : Likewise. : Likewise. : Likewise. : Likewise. 2021-04-14 H.J. Lu PR binutils/27708 * elf.c (assign_file_positions_for_non_load_sections): Set p_memsz to p_filesz for the loadable PT_NOTE segment. 2021-04-14 Frederic Cambus * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS. 2021-04-14 Alan Modra PR 27631 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf when hh might be NULL, test for NULL first. 2021-04-14 Alan Modra PR 27630 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when hash might be NULL, cast instead. 2021-04-13 Clément Chigot * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier. 2021-04-13 Nelson Chu * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning when the version of input or output is RISCV_UNKNOWN_VERSION, since the extension is added implicitly. * elfxx-riscv.c: Updated the obsolete comments. (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h. * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added. 2021-04-12 Alan Modra * elf-bfd.h (ENABLE_CHECKING): Define. (elf_link_hash_lookup): Abort if wrong type of hash table. * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. 2021-04-12 Alan Modra * elf-bfd.h (is_elf_hash_table): Convert macro to inline function. (elf_link_hash_lookup, elf_link_hash_traverse): Likewise. (elf_hash_table, elf_hash_table_id): Likewise. * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant is_elf_hash_table check. * elf32-csky.c (elf32_csky_setup_section_lists): Likewise. * elf32-hppa.c (clobber_millicode_symbols): Correct param types. * elf64-alpha.c (elf64_alpha_output_extsym): Likewise. * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise. (elfNN_ia64_global_dyn_sym_thunk: Likewise. * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise. (elf64_ia64_global_dyn_sym_thunk): Likewise. (elf64_vms_link_add_object_symbols): Pass base type of hash table to is_elf_hash_table. * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise. (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise. (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise. (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise. (bfd_elf_final_link): Likewise. * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise. * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup. 2021-04-12 Alan Modra * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry* from elf_backend_archive_symbol_lookup. (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*. * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check we have a ppc_hash_table before accessing ppc_link_hash_entry fields. * elflink.c (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*. (elf_link_add_archive_symbols): Adjust to suit. 2021-04-12 Nelson Chu * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of i-ext when expanding g-ext. 2021-04-12 Nelson Chu * elfxx-riscv.c (riscv_ext_dont_care_version): Removed. (riscv_parse_add_subset): Always add the implicit extensions, even if their versions are RISCV_UNKNOWN_VERSION. (riscv_parse_std_ext): Delay to add i-ext as the implicit extension in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the implicit extension after it has been expanded. (riscv_parse_add_implicit_subsets): Updated. 2021-04-12 Nelson Chu * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward. (riscv_std_s_ext_strtab): Likewise. (riscv_std_h_ext_strtab): Likewise. (riscv_std_zxm_ext_strtab): Added for the zxm prefix. (enum riscv_prefix_ext_class): Moved forward and renamed from riscv_isa_ext_class. Reorder them according to the parsing order, since the enum values are used to check the orders in the riscv_compare_subsets. (struct riscv_parse_prefix_config): Moved forward and renamed from riscv_parse_config_t. Also removed the ext_valid_p field, the related functions are replaced by riscv_valid_prefixed_ext. (parse_config): Moved forward and updated. The more letters of the prefix string, the more forward it must be defined. Otherwise, we will get the wrong mapping when using strncmp in riscv_get_prefix_class. (riscv_get_prefix_class): Moved forward. Support to parse the multi-letter prefix, like zxm. (riscv_known_prefixed_ext): New function, check if the prefixed extension is supported according to the right riscv_std_*_ext_strtab. (riscv_valid_prefixed_ext): New function, used to replace the riscv_ext_*_valid_p functions. (riscv_init_ext_order): Do not set the values for prefix keywords since they may have multiple letters for now. (riscv_compare_subsets): Set the order values of prefix keywords to negative numbers according to the riscv_prefix_ext_class. (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we have parsed the prefixed extensions. (riscv_parse_prefixed_ext): Updated and removed the parameter config. Report error when the prefix is unknown. (riscv_parse_subset): Do not parse the prefixed extensions according to the orders in the parse_config. Remove the confused message and let riscv_parse_prefixed_ext to report the details. * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c. (riscv_get_prefix_class): Removed to static. 2021-04-08 Mike Frysinger * configure.ac (ACX_BUGURL): Use https://. * configure.com (COPY_TEXT): Likewise. * configure: Regenerate. 2021-04-05 Alan Modra * configure.ac: Don't check for long long or long double type. Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h, strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check for strtoull, free, malloc, realloc, getenv, strstr, snprintf, vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS. (AC_ISC_POSIX): Don't invoke. (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise. * sysdep.h: Remove many HAVE_*_H checks and fallback declarations. Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder header order as per automake AC_INCLUDES_DEFAULT. * bfd-in.h: Include inttypes.h unconditionally. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and long double are available. (bfd_scan_vma): Assume long long and strtoull are available. * elflink.c: Include limits.h unconditionally. * elfnn-riscv.c: Likewise. * wasm-module.c: Likewise. * hpux-core.c: Include dirent.h unconditionally. * trad-core.c: Likewise. * hosts/x86-64linux.h: Include stdlib.h unconditionally. * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks. * elf32-m68hc1x.c: Don't include alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * bfd-in2.h: Regenerate. * config.in: Regenerate. * configure: Regenerate. 2021-04-01 Tamar Christina PR ld/26659 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow. 2021-04-01 Martin Liska * ecoff.c (strneq): Remove strneq and use startswith. (_bfd_ecoff_slurp_armap): Likewise. 2021-04-01 Martin Liska * elf-bfd.h (bfd_section_is_ctf): Use startswith function. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. (elf_get_reloc_section): Likewise. * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_section_flags): Likewise. * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise. (nds32_elf_relocate_section): Likewise. (nds32_elf_action_discarded): Likewise. (nds32_elf_check_relocs): Likewise. (nds32_elf_section_flags): Likewise. * elf32-or1k.c (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise. * elf32-rx.c (rx_table_find): Likewise. (rx_table_map): Likewise. * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise. (spu_elf_find_overlays): Likewise. (needs_ovl_stub): Likewise. (allocate_spuear_stubs): Likewise. (build_spuear_stubs): Likewise. (mark_overlay_section): Likewise. (spu_elf_auto_overlay): Likewise. (spu_elf_output_symbol_hook): Likewise. * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise. * elf32-xtensa.c (xtensa_property_section_name): Likewise. * elf64-ppc.c (ppc64_elf_section_flags): Likewise. (ppc64_elf_relocate_section): Likewise. * elflink.c (resolve_section): Likewise. (UNARY_OP): Likewise. (BINARY_OP_HEAD): Likewise. (elf_link_input_bfd): Likewise. * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise. * elfxx-riscv.c (riscv_parse_subset): Likewise. * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise. * opncls.c (get_build_id): Likewise. 2021-03-31 Alan Modra PR 27671 * bfd-in.h: Don't poison FALSE or TRUE. * bfd-in2.h: Regenerate. 2021-03-31 Alan Modra * sysdep.h: POISON_BFD_BOOLEAN: Define. * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c, * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c, * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c, * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c, * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c, * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c, * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c, * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c, * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c, * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c, * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c, * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c, * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c, * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c, * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c, * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c, * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c, * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c, * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c, * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c, * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c, * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c, * elf-nacl.h, * elf-properties.c, * elf-s390-common.c, * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h, * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h, * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h, * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h, * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c, * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h, * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c, * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c, * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c, * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c, * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h, * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c, * xsym.h: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. 2021-03-31 Alan Modra * bfd-in.h: Include stdbool.h. (bfd_boolean): Define as bool * bfd-in2.h: Regenerate. 2021-03-31 Alan Modra * .gitignore: Delete bfd_stdint.h entry. * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h. (BUILD_HFILES, LOCAL_H_DEPS): Likewise. * bfd-in.h: Include stdint.h in place of bfd_stdint.h. * configure.ac: Don't invoke GCC_HEADER_STDINT. * configure.com: Don't create bfd_stdint.h. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * bfd-in2.h: Regenerate. * config.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate. 2021-03-31 Alan Modra * bfd-in.h: Include string.h. (LITMEMCPY, LITSTRCPY): Delete. * bfd-in2.h: Regenerate. 2021-03-30 Alan Modra * elflink.c (elf_link_add_object_symbols): Don't set h->indx unless is_elf_hash_table. 2021-03-29 Alan Modra * aoutx.h (aout_link_write_symbols): Don't cast boolean expression to bfd_boolean. * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans against FALSE. * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE. (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE". (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise. (is_reloc_for_PLT, is_reloc_for_TLS): Likewise. * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise. * elf32-nds32.c (insert_nds32_elf_blank): Likewise. * elf32-rx.c (rx_set_section_contents): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise. * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise. * mach-o.c (bfd_mach_o_read_command): Likewise. * targets.c (bfd_get_target_info): Likewise. 2021-03-29 Alan Modra * coff-z80.c (z80_is_local_label_name): Return bfd_boolean. * elf32-z80.c (z80_is_local_label_name): Likewise. * elf32-spu.c (spu_elf_modify_headers): Likewise. * elf32-nds32.h (struct elf_nds32_link_hash_table ): Change type to int. * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test for error return from vms_write_data_block. 2021-03-29 Alan Modra * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int. * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise. (elf64_ia64_local_dyn_sym_thunk): Likewise. * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise. * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs), (elfNN_aarch64_finish_local_dynamic_symbol): Likewise. * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise. (elfNN_ia64_local_dyn_sym_thunk): Likewise. * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise. (riscv_pcrel_reloc_eq): Likewise. (riscv_elf_finish_local_dynamic_symbol): Likewise. * elfxx-sparc.c (allocate_local_dynrelocs): Likewise. (finish_local_dynamic_symbol): Likewise. * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise. * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise. (mips_elf_count_got_symbols): Change return type to bfd_boolean. 2021-03-29 Alan Modra * elflink.c (elf_link_output_symstrtab): Make flinfo parameter a void pointer. (bfd_elf_final_link): Delete out_sym_func typedef and don't cast elf_link_output_symstrtab when calling output_arch_syms and output_arch_local_syms. * elf-bfd.h (struct elf_backend_data ): Change return type of func arg to match elf_link_output_symstrtab. * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct return type. * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type. (nds32_elf_output_arch_syms): Correct func return type. 2021-03-29 Alan Modra * elf-m10200.c (mn10200_elf_relocate_section): Return int. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arc.c (elf_arc_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-csky.c (csky_elf_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-ft32.c (ft32_elf_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-metag.c (elf_metag_relocate_section): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-nds32.c (nds32_elf_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise. * elf32-or1k.c (or1k_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-pru.c (pru_elf32_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. (_bfd_score_elf_relocate_section): Likewise. * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-visium.c (visium_elf_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf32-z80.c (z80_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-bpf.c (bpf_elf_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise. 2021-03-26 Keith Seitz * elfcore.h (_bfd_elf_core_find_build_id): Seek file offset of program headers after calling elf_read_notes. 2021-03-23 Jan Beulich * dwarf2.c (read_indexed_string): Rename index to idx. 2021-03-22 Martin Liska * bfd-in.h (startswith): Add startswith function. (CONST_STRNEQ): Remove. * bfd-in2.h (startswith): Regenerate with make headers. * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith. (_bfd_slurp_extended_name_table): Likewise. * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise. * bfd.c (bfd_get_sign_extend_vma): Likewise. (bfd_convert_section_size): Likewise. (bfd_convert_section_contents): Likewise. * coff-stgo32.c (go32exe_create_stub): Likewise. (go32exe_check_format): Likewise. * coffcode.h (styp_to_sec_flags): Likewise. (GNU_DEBUGALTLINK): Likewise. * coffgen.c (_bfd_coff_section_already_linked): Likewise. (coff_gc_sweep): Likewise. (bfd_coff_gc_sections): Likewise. * cofflink.c (coff_link_add_symbols): Likewise. (process_embedded_commands): Likewise. * compress.c (bfd_is_section_compressed_with_header): Likewise. (bfd_init_section_decompress_status): Likewise. * dwarf2.c (find_debug_info): Likewise. (place_sections): Likewise. * ecoff.c (_bfd_ecoff_slurp_armap): Likewise. * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. (assign_section_numbers): Likewise. (elfcore_grok_win32pstatus): Likewise. * elf32-arm.c (cmse_scan): Likewise. (elf32_arm_gc_mark_extra_sections): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (is_arm_elf_unwind_section_name): Likewise. * elf32-bfin.c (bfin_size_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise. * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise. * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise. (elf32_tic6x_size_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise. (xtensa_is_insntable_section): Likewise. (xtensa_is_littable_section): Likewise. (xtensa_is_proptable_section): Likewise. (xtensa_property_section_name): Likewise. (xtensa_callback_required_dependence): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ia64-vms.c (is_unwind_section_name): Likewise. (get_reloc_section): Likewise. (elf64_ia64_size_dynamic_sections): Likewise. (elf64_ia64_object_p): Likewise. * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elflink.c (elf_link_add_object_symbols): Likewise. (_bfd_elf_gc_mark_extra_sections): Likewise. (bfd_elf_parse_eh_frame_entries): Likewise. (_bfd_elf_section_already_linked): Likewise. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise. * elfnn-ia64.c (is_unwind_section_name): Likewise. (elfNN_ia64_size_dynamic_sections): Likewise. (elfNN_ia64_object_p): Likewise. * elfxx-mips.c (FN_STUB_P): Likewise. (CALL_STUB_P): Likewise. (CALL_FP_STUB_P): Likewise. (_bfd_mips_elf_section_from_shdr): Likewise. (_bfd_mips_elf_fake_sections): Likewise. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_final_write_processing): Likewise. (_bfd_mips_elf_final_link): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise. * elfxx-x86.c (elf_i386_is_reloc_section): Likewise. (elf_x86_64_is_reloc_section): Likewise. * hpux-core.c (thread_section_p): Likewise. * libcoff.h (bfd_pei_p): Likewise. * linker.c (REAL): Likewise. (unwrap_hash_lookup): Likewise. (_bfd_generic_link_add_one_symbol): Likewise. * mmo.c (mmo_internal_write_section): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * pef.c (bfd_pef_print_symbol): Likewise. * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise. * som.c (som_slurp_symbol_table): Likewise. (som_slurp_armap): Likewise. * wasm-module.c (wasm_compute_custom_section_file_position): Likewise. 2021-03-22 Jan Beulich * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing language translation wrapping to _bfd_error_handler() invocations. 2021-03-21 Alan Modra * bfd-in.h (startswith): New inline. (CONST_STRNEQ): Use startswith. * bfd-in2.h: Regenerate. 2021-03-20 Alan Modra PR 27590 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE test for .gnu.debuglto*. 2021-03-18 H.J. Lu PR ld/27590 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gnu.debuglto_.debug_ section as debugging section unless it is marked with SHF_EXCLUDE. * elflink.c (elf_create_symbuf): Revert commit 994b2513281. (bfd_elf_match_symbols_in_sections): Ignore section symbols when matching non-debugging sections or linkonce section with comdat section. 2021-03-18 H.J. Lu PR ld/27587 * dwarf2.c (read_attribute_value): Check version >= 3 for DW_FORM_ref_addr. 2021-03-16 Nick Clifton * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer overrun by using sizeof of the destination x_fname field as the limit for a memcpy. 2021-03-16 Kuan-Lin Chen * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc. 2021-03-12 Clément Chigot * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE, BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD, BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE, BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M, BFD_RELOC_PPC64_TLS_ML): New relocations. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * coff-rs6000.c (xcoff_calculate_relocation): Call xcoff_reloc_type_tls for TLS relocations. (xcoff_howto_table): Implement TLS relocations. (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations. (xcoff_reloc_type_tls): New function. * coff64-rs6000.c (xcoff_calculate_relocation): Likewise. (xcoff_howto_table): Likewise. (_bfd_xcoff_reloc_type_lookup): Likewise. * coffcode.h (sec_to_styp_flags): Handle TLS sections. (styp_to_sec_flags): Likewise. (coff_compute_section_file_positions): Avoid file offset optimisation for .data when the previous section is .tdata. (coff_write_object_contents): Handle TLS sections. * coffswap.h (coff_swap_aouthdr_out): Add support for new fields in aouthdr. * libxcoff.h (xcoff_reloc_type_tls): Add prototype. * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL. (xcoff_need_ldrel_p): Add cases for TLS relocations. (xcoff_create_ldrel): Add l_symndx for TLS sections. 2021-03-12 Clément Chigot * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO): New relocations. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * coff-rs6000.c (xcoff_calculate_relocation): Call xcoff_reloc_type_toc for R_TOCU and R_TOCL. (xcoff_howto_table): Remove src_mask for TOC relocations. Add R_TOCU and R_TOCL howtos. (_bfd_xcoff_reloc_type_lookup): Add cases for BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO. (xcoff_reloc_type_toc): Compute the whole offset. Implement R_TOCU and R_TOCL. * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise. (xcoff64_howto_table): Likewise. (xcoff64_reloc_type_lookup): Likewise. 2021-03-12 Clément Chigot * coff-rs6000.c (xcoff_calculate_relocation): Correct and add new relocations. (xcoff_howto_table): Likewise. (xcoff_rtype2howto): Increase r_type maximum value. (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead of create a new one from scratch. Enable only some relocations to have a changing r_size. * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise. (xcoff64_howto_table): Likewise. (xcoff64_rtype2howto): Likewise. (xcoff64_ppc_relocate_section): Likewise. * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value. 2021-03-12 Clément Chigot * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move. 2021-03-12 Clément Chigot * coff64-rs6000.c (xcoff64_write_object_contents): Remove. * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620 support for o_cputype field. Avoid creating an empty a.out header for XCOFF64. 2021-03-12 Clément Chigot * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add missing smclass. 2021-03-11 Nelson Chu * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean restart_relax, used to check if we need to run the whole relaxations from relax pass 0 to 2 again. (riscv_elf_link_hash_table_create): Init restart_relax to FALSE. (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set. (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code. (bfd_elfNN_riscv_restart_relax_sections): New function. Called by after_allocation to check if we need to run the whole relaxations again. (_bfd_riscv_relax_section): We will only enter into the relax pass 3 when the restart_relax is FALSE; At last set restart_relax to TRUE if again is TRUE, too. * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration. (bfd_elf64_riscv_restart_relax_sections): Likewise. 2021-03-10 Jan Beulich * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol offset. 2021-03-10 Alan Modra Jan Beulich * elf.c (bfd_elf_generic_reloc): Make references between debug sections use section relative values. 2021-03-09 Jan Beulich * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA. 2021-03-05 H.J. Lu PR ld/27425 PR ld/27432 * bfd.c (_bfd_get_link_info): New function. * elf-bfd.h (output_elf_obj_tdata): Add link_info. (elf_link_info): New. * libbfd-in.h (_bfd_get_link_info): New prototype. * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for R_AMD64_IMAGEBASE when generating x86-64 ELF executable. * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h". (pex64_link_add_symbols): New function. (coff_bfd_link_add_symbols): New macro. * libbfd.h: Regenerated. 2021-03-05 Craig Blackmore Andrew Burgess * elf-bfd.h (elfcore_write_riscv_csr): Declare. * elf.c (elfcore_grok_riscv_csr): New function. (elfcore_grok_note): Handle NT_RISCV_CSR. (elfcore_write_riscv_csr): New function. (elfcore_write_register_note): Handle '.reg-riscv-csr'. 2021-03-05 Craig Blackmore Andrew Burgess * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define. (PRPSINFO_PR_PSARGS_LENGTH): Define. (riscv_write_core_note): New function. (riscv_elf_grok_psinfo): Make use of two new length defines. (elf_backend_write_core_note): Define. 2021-03-05 Craig Blackmore Andrew Burgess * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function. * elf.c (elfcore_grok_gdb_tdesc): New function. (elfcore_grok_note): Handle NT_GDB_TDESC. (elfcore_write_gdb_tdesc): New function. (elfcore_write_register_note): Handle NT_GDB_TDESC. 2021-03-05 Nick Clifton PR 27521 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms. (read_indexed_string): Placeholder function. (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx* forms. 2021-03-05 Alan Modra * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and 2020-09-16 changes. * coff-x86_64.c (coff_amd64_reloc): Do more or less the same adjustments here instead. Separate pc-relative adjustments from symbol related adjustments. Tidy comments and formatting. 2021-03-04 Jan Beulich * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in final PE images. 2021-03-04 Alan Modra * rs6000-core.c (rs6000coff_core_p): Correct prototype. 2021-03-03 Alan Modra PR 27500 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop processing not when start/stop symbol section is unmarked but on first time a start/stop symbol is processed. 2021-03-03 Alan Modra * reloc.c: Include x86_64.h rather than internal.h. 2021-03-02 Nick Clifton PR 27484 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate function and variable tags and a second time to resolve their attributes. 2021-03-02 Nick Alcock * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount. 2021-03-02 Alan Modra PR 27451 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized linker defined start/stop symbols when start_stop_gc. 2021-03-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got indirect to pc-relative or toc-relative for undefined symbols. 2021-03-01 Alan Modra Fangrui Song * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker defined start/stop symbols when start_stop_gc. (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise. (bfd_elf_define_start_stop): Don't modify ldscript_def syms. * linker.c (bfd_generic_define_start_stop): Likewise. 2021-02-25 Alan Modra PR 27441 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak. * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and use when deciding an as-needed library should be loaded instead of using the binding of the library definition. 2021-02-24 Alan Modra PR 27459 * coff-stgo32.c (go32exe_check_format): Sanity check size of header to avoid a buffer overflow. 2021-02-22 Alan Modra * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16. * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise. 2021-02-19 Nelson Chu PR 27158 * elfnn-riscv.c (perform_relocation): Updated encoding macros. (_bfd_riscv_relax_call): Likewise. (_bfd_riscv_relax_lui): Likewise. * elfxx-riscv.c (howto_table): Likewise. 2021-02-18 Nelson Chu * Makefile.am: Added cpu-riscv.h. * Makefile.in: Regenerated. * po/SRC-POTFILES.in: Regenerated. * cpu-riscv.h: Added to support spec versions controlling. Also added extern arrays and functions for cpu-riscv.c. (enum riscv_spec_class): Define all spec classes here uniformly. (struct riscv_spec): Added for all specs. (RISCV_GET_SPEC_CLASS): Added to reduce repeated code. (RISCV_GET_SPEC_NAME): Likewise. (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class. (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class. (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name. * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec. (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS. (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME. (riscv_priv_specs): Moved below. (riscv_get_priv_spec_class_from_numbers): Likewise, updated. (riscv_isa_specs): Moved from include/opcode/riscv.h. * elfnn-riscv.c: Included cpu-riscv.h. (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec. * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h. (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h. * elfxx-riscv.h: Removed extern functions to cpu-riscv.h. 2021-02-17 Alan Modra * wasm-module.c: Guard include of limits.h. (CHAR_BIT): Provide backup define. (wasm_read_leb128): Use CHAR_BIT to size "result" in bits. Correct signed overflow checking. 2021-02-17 Nelson Chu PR 27200 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay copying the elf flags from input BFD to output BFD, until we have checked if the input BFD has no code section or not. Also fix the problem that we only check the first section rather than the entire sections for input BFD. 2021-02-16 Alan Modra * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift. (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise. 2021-02-15 Jan Beulich * doc/Makefile.am: Replace "cp -p" by "$(LN_S)". * doc/Makefile.in: Re-generate. 2021-02-15 Alan Modra * elf32-nds32.c (nds32_get_section_contents): Replace bfd_malloc_and_get_section with bfd_get_full_section_contents. (nds32_elf_relax_delete_blanks): Init contents. (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise. 2021-02-15 Alan Modra * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use bfd_get_full_section_contents. 2021-02-14 Alan Modra * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply all fixes to bfd_generic_get_relocated_section_contents since this function was split out. 2021-02-11 Alan Modra * config.bfd: Remove ia64 from obsolete list. 2021-02-11 Alan Modra PR ld/22269 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234. 2021-02-11 Alan Modra PR 27294 * elf32-avr.c (avr_elf32_load_records_from_section): Use bfd_malloc_and_get_section. Use bfd_byte* vars and remove then unnecessary casts. 2021-02-11 Alan Modra PR 27291 * section.c (bfd_get_section_contents): Avoid possible overflow when range checking offset and count. (bfd_set_section_contents): Likewise. 2021-02-03 Nick Alcock * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in favour of LIBINTL. * configure: Regenerated. 2021-02-09 Alan Modra * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed. * configure.ac: Delete symbian entries. * elf-bfd.h (enum elf_target_os): Delete is_symbian. * elf32-arm.c: Remove symbian support. Formatting. * targets.c: Delete symbian entries. * configure: Regenerate. 2021-02-04 H.J. Lu PR ld/19609 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more info when failed to convert GOTPCREL relocation. 2021-02-04 Nelson Chu * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*. 2021-02-04 Alan Modra PR 27311 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed libraries for IR references on pass over libraries after LTO recompilation. 2021-02-03 Alan Modra PR 27311 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes. (elf_link_add_object_symbols): Here too. Don't pull in as-needed libraries when H is an indirect symbol after calling _bfd_elf_add_default_symbol. 2021-02-03 Alan Modra PR 27311 * elflink.c (_bfd_elf_add_default_symbol): Clear override when undecorated symbol will have a different version. 2021-02-02 Alan Modra PR 27311 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter. Use when handling default versioned symbol. Rename existing override variable to nondef_override and use for non-default versioned symbol. (elf_link_add_object_symbols): Adjust call to suit. Don't pull in as-needed libraries when override is set. 2021-02-01 Emery Hemingway * config.bfd: Add *-*-genode* as a target for AArch64 and x86. 2021-02-01 Egor Vishnyakov PR 27254 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of offset for the R_RL78_RH_SADDR relocation. 2021-01-29 Alan Modra PR 27271 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault on symbols defined in absolute or other special sections. 2021-01-28 Alan Modra PR 27259 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to prevent endless looping of linked-to sections. 2020-12-17 Mihails Strasuns * bfd-elf.h (elfcore_write_file_note): New function. * elf.c (elfcore_write_file_note): New function. 2021-01-26 Alan Modra * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0]. 2021-01-24 H.J. Lu PR binutils/27231 * dwarf2.c (read_rnglists): Ignore empty range when parsing line number tables. 2021-01-23 H.J. Lu PR binutils/27231 * dwarf2.c (read_rnglists): Advance rngs_ptr after _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair. 2021-01-20 Alan Modra * elf32-ppc.c: Delete outdated comment. (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define. * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define. 2021-01-20 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume section symbols are present. 2021-01-19 Alan Modra * elf64-ppc.c (elf_hash_entry): New inline function. Use throughout to replace casts. (branch_reloc_hash_match): Remove const from params. (use_local_plt): New function. (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub), (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section): Use use_local_plt. * elf32-ppc.c (use_local_plt): New function. (allocate_dynrelocs, ppc_elf_relocate_section), (write_global_sym_plt): Use use_local_plt. 2021-01-17 H.J. Lu PR ld/27193 * elflink.c (elf_create_symbuf): Also ignore section symbols. 2021-01-16 H.J. Lu PR ld/23169 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't check pointer_equality_needed. 2021-01-15 H.J. Lu * elf-linker-x86.h (elf_linker_x86_params): Add report_relative_reloc. * elf32-i386.c (elf_i386_relocate_section): Call _bfd_x86_elf_link_report_relative_reloc to report relative relocations for -z report-relative-reloc. (elf_i386_finish_dynamic_symbol): Likewse. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse. (elf_x86_64_finish_dynamic_symbol): Likewse. * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New function. * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New prototype. 2021-01-16 Alan Modra * compress.c (decompress_contents): Tidy inflateEnd result test. 2021-01-16 Alan Modra PR 26002 * elflink.c (elf_link_output_extsym): Use version 1 in .gnu.version for undefined unversioned symbols. 2021-01-15 Nelson Chu * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that caused the by previous commit accidentally. 2021-01-15 Nelson Chu * elfnn-riscv.c: Indent, labels and GNU coding standards tidy, also aligned the code. 2021-01-15 Nelson Chu * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages. 2021-01-15 Nelson Chu * elfnn-riscv.c: Comments tidy and improvement. * elfxx-riscv.c: Likewise. * elfxx-riscv.h: Likewise. 2021-01-14 H.J. Lu PR ld/26688 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC section for R_BFIN_FUNCDESC. 2021-01-14 Nick Clifton * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0. 2021-01-13 Alan Modra * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. 2021-01-13 Alan Modra PR 27160 * section.c (struct bfd_section): Remove pattern field. (BFD_FAKE_SECTION): Adjust to suit. * bfd-in2.h: Regenerate. * elflink.c (compare_link_order, elf_fixup_link_order): Delete. (bfd_elf_final_link): Don't call elf_fixup_link_order. 2021-01-12 H.J. Lu PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. 2021-01-12 H.J. Lu PR ld/27171 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and R_AMD64_DIR32 relocations for PE/x86-64 inputs. 2021-01-11 H.J. Lu PR ld/27173 * configure: Regenerated. 2021-01-11 Nick Clifton * po/fr.po: Updated French translation. * po/pt.po: Updated Portuguese translation. * po/sr.po: Updated Serbian translation. * po/uk.po: Updated Ukranian translation. 2021-01-09 H.J. Lu * configure: Regenerated. 2021-01-09 H.J. Lu PR ld/27166 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle -z lam-u48 and -z lam-u57. 2021-01-09 Nick Clifton * version.m4: Change to 2.36.50. * configure: Regenerate. * po/bfd.pot: Regenerate. 2021-01-09 Nick Clifton * 2.36 release branch crated. 2021-01-08 H.J. Lu * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set LAM_U57 when setting LAM_U48. 2021-01-08 H.J. Lu PR ld/26256 PR ld/27160 * elflink.c (elf_fixup_link_order): Verify that fixing up SHF_LINK_ORDER doesn't increase the output section size. 2021-01-09 Alan Modra * configure: Regenerate. 2021-01-07 Samuel Thibault * configure: Regenerate. 2021-01-07 H.J. Lu PR 27109 * aix386-core.c (core_aix386_vec): Initialize keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS. * aout-target.h (MY (vec)): Likewise. * binary.c (binary_vec): Likewise. * cisco-core.c (core_cisco_be_vec): Likewise. (core_cisco_le_vec): Likewise. * coff-alpha.c (alpha_ecoff_le_vec): Likewise. * coff-i386.c (TARGET_SYM): Likewise. (TARGET_SYM_BIG): Likewise. * coff-ia64.c (TARGET_SYM): Likewise. * coff-mips.c (mips_ecoff_le_vec): Likewise. (mips_ecoff_be_vec): Likewise. (mips_ecoff_bele_vec): Likewise. * coff-rs6000.c (rs6000_xcoff_vec): Likewise. (powerpc_xcoff_vec): Likewise. * coff-sh.c (sh_coff_small_vec): Likewise. (sh_coff_small_le_vec): Likewise. * coff-tic30.c (tic30_coff_vec): Likewise. * coff-tic54x.c (tic54x_coff0_vec): Likewise. (tic54x_coff0_beh_vec): Likewise. (tic54x_coff1_vec): Likewise. (tic54x_coff1_beh_vec): Likewise. (tic54x_coff2_vec): Likewise. (tic54x_coff2_beh_vec): Likewise. * coff-x86_64.c (TARGET_SYM): Likewise. (TARGET_SYM_BIG): Likewise. * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise. (rs6000_xcoff64_aix_vec): Likewise. * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise. (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise. (CREATE_LITTLE_COFF_TARGET_VEC): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Likewise. (TARGET_LITTLE_SYM): Likewise. * hppabsd-core.c (core_hppabsd_vec): Likewise. * hpux-core.c (core_hpux_vec): Likewise. * i386msdos.c (i386_msdos_vec): Likewise. * ihex.c (ihex_vec): Likewise. * irix-core.c (core_irix_vec): Likewise. * mach-o-target.c (TARGET_NAME): Likewise. * mmo.c (mmix_mmo_vec): Likewise. * netbsd-core.c (core_netbsd_vec): Likewise. * osf-core.c (core_osf_vec): Likewise. * pdp11.c (MY (vec)): Likewise. * pef.c (pef_vec): Likewise. (pef_xlib_vec): Likewise. * plugin.c (plugin_vec): Likewise. * ppcboot.c (powerpc_boot_vec): Likewise. * ptrace-core.c (core_ptrace_vec): Likewise. * sco5-core.c (core_sco5_vec): Likewise. * som.c (hppa_som_vec): Likewise. * srec.c (srec_vec): Likewise. (symbolsrec_vec): Likewise. * tekhex.c (tekhex_vec): Likewise. * trad-core.c (core_trad_vec): Likewise. * verilog.c (verilog_vec): Likewise. * vms-alpha.c (alpha_vms_vec): Likewise. * vms-lib.c (alpha_vms_lib_txt_vec): Likewise. * wasm-module.c (wasm_vec): Likewise. * xsym.c (sym_vec): Likewise. * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED isn't set. (elf_map_symbols): Don't include ignored section symbols. * elfcode.h (elf_slurp_symbol_table): Also set BSF_SECTION_SYM_USED on STT_SECTION symbols. * elflink.c (bfd_elf_final_link): Generated section symbols only when emitting relocations or reqired. * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New. * syms.c (BSF_SECTION_SYM_USED): New. * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New. (bfd_target): Add keep_unused_section_symbols. (bfd_keep_unused_section_symbols): New. * bfd-in2.h: Regenerated. 2021-01-07 Nick Clifton PR 25713 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to absolute paths and check to see if they are longer than MAX_PATH. 2021-01-07 Philipp Tomsich * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause. 2021-01-07 Claire Xenia Wolf Jim Wilson Andrew Waterman Maxim Blinov Kito Cheng Nelson Chu * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc. 2021-01-06 H.J. Lu * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect. (bfinfdpic_check_relocs): Likewise. 2021-01-06 Alan Modra * elf32-score.c (s3_bfd_score_info_to_howto): Report an error on unknown r_type. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. 2021-01-06 Alan Modra * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec. (sparc64-*-solaris2*): Add sparc_elf64_vec and sparc_elf32_vec. 2021-01-06 Marcus Comstedt * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec. * configure.ac: Handle riscv_elf[32|64]_be_vec. * configure: Regenerate. * elfnn-riscv.c: Include and define CHAR_BIT for riscv_is_insn_reloc. (riscv_get_insn): RISC-V instructions are always little endian, but bfd_get may be used for big-endian, so add new riscv_get_insn to handle the insturctions. (riscv_put_insn): Likewsie. (riscv_is_insn_reloc): Check if we are relocaing an instruction. (perform_relocation): Call riscv_is_insn_reloc to decide if we should use riscv_[get|put]_insn or bfd_[get|put]. (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32 or bfd_[get|put]l16 for code. (riscv_elf_relocate_section): Likewise. (riscv_elf_finish_dynamic_symbol): Likewise. (riscv_elf_finish_dynamic_sections): Likewise. (_bfd_riscv_relax_call): Likewise. (_bfd_riscv_relax_lui): Likewise. (_bfd_riscv_relax_align): Likewise. (_bfd_riscv_relax_pc): Likewise. (riscv_elf_object_p): Handled for big endian. (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined. * targets.c: Add riscv_elf[32|64]_be_vec. (_bfd_target_vector): Likewise. 2021-01-05 Alan Modra * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export for relocatable executable. 2021-01-05 Alan Modra * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check. 2021-01-05 Nelson Chu * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde, make sure gp symbol is output as a dynamic symbol. 2021-01-04 H.J. Lu PR ld/26256 * elflink.c (compare_link_order): Place unordered sections before ordered sections. (elf_fixup_link_order): Add a link info argument. Allow mixed ordered and unordered input sections for non-relocatable link. Sort the consecutive bfd_indirect_link_order sections with the same pattern. Change the offsets of the bfd_indirect_link_order sections only. (bfd_elf_final_link): Pass info to elf_fixup_link_order. * section.c (bfd_section): Add pattern. (BFD_FAKE_SECTION): Initialize pattern to NULL. * bfd-in2.h: Regenerated. 2021-01-04 Alexander Fedotov * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value of private flags with 0x. * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise. 2021-01-04 Alan Modra PR 26822 * elflink.c (elf_link_input_bfd): Use the file base name in linker generated STT_FILE symbols. 2021-01-04 Nelson Chu * elfxx-riscv.c (riscv_compare_subsets): Removed static. * elfxx-riscv.h: Add declaration. * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use riscv_compare_subsets to check the orders. (riscv_skip_prefix): Removed. (riscv_prefix_cmp): Removed. 2021-01-04 Alan Modra PR 26741 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after calculating subset version length. 2021-01-01 Nicolas Boulenguez * xcofflink.c: Correct spelling in comments. 2021-01-01 Alan Modra Update year range in copyright notice of all files. For older changes see ChangeLog-2020 Copyright (C) 2021-2026 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Local Variables: mode: change-log left-margin: 8 fill-column: 74 version-control: never End: @ 1.16 log @merge conflicts @ text @d1 4 d2998 1 a2998 1 Copyright (C) 2021-2025 Free Software Foundation, Inc. @ 1.15 log @Merge conflicts between 2.39 and 2.42 @ text @d1 28 a28 1 2024-01-15 Nick Clifton d30 1 a30 3 * version.m4: Change to 2.41.90. * configure: Regenerate. * po/bfd.pot: Regenerate. d2994 1 a2994 1 Copyright (C) 2021-2024 Free Software Foundation, Inc. @ 1.14 log @Merge conflicts between 2.34 and 2.39, and regen for x86_64 @ text @d1 1 a1 1 2022-08-05 Nick Clifton d3 1 a3 4 2.39 Release. * development.sh (experimental): Set to false. (development): Set to false. * version.m4: Set to 2.39. d5 544 d556 5 d2969 1 a2969 1 Copyright (C) 2021-2022 Free Software Foundation, Inc. @ 1.14.2.1 log @Sync with HEAD. @ text @d1 1 a1 1 2024-01-15 Nick Clifton d3 4 a6 1 * version.m4: Change to 2.41.90. a7 544 * po/bfd.pot: Regenerate. 2024-01-15 Nick Clifton * 2.42 branch point. 2023-12-05 Nick Clifton PR 31106 * elfcode.h (elf_write_relocs): Do not convert a relocation against a zero-value absolute symbol into a relocation without a symbol if the symbol is being used for a complex relocation. 2023-11-21 Nick Clifton PR 31067 linker.c (_bfd_generic_link_add_one_symbol): When issuing a warning message, also display a message about the warning not being affected by garbage colleciton. 2023-11-15 Arsen Arsenović * aclocal.m4: Regenerate. * configure.ac (SHARED_LIBADD): Use LTLIBINTL rather than LIBINTL. * configure: Regenerate. * po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot temporary file, to suppress xgettext checking charset names. 2023-11-10 Simon Marchi * archures.c (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * bfd-in2.h (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * cpu-amdgcn.c (arch_info_struct): Add entries for bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102. 2023-11-10 Nick Clifton * elf.c (assign_file_positions_except_relocs): Turn warnings about executable segments into errors if so requested. * elflink.c (bfd_elf_size_dynamic_sections): Turn warnings about executable stacks into errors if so requested. 2023-10-30 Nick Clifton * bpf-reloc.def (R_BPF_64_NODLD32): Add entry. 2023-10-16 Nick Clifton PR 28910 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Do not set output flags if the input flags have not been set. 2023-10-09 Nick Clifton PR 30950 * elf32-i386.c (elf_i386_convert_load_reloc): Check for elf_x86_hash_table returning a NULL pointer. PR 30949 * elflink.c (elf_gc_mark_debug_section): Check for bfd_section_from_elf_index returning a NULL pointer. 2023-10-06 Nick Clifton PR 30940 * elf64-alpha.c (elf64_alpha_check_relocs): Correct error message. 2023-10-05 Nick Clifton PR 30904 * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to see if the gnuchains array has been successfully created. 2023-10-02 Nick Clifton * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use bfd_get_current_time when filing in the timestamp. 2023-09-29 Nick Clifton PR 30906 * elf.c (_bfd_elf_slurp_version_tables): Test that the verref section header has been initialised before using it. 2023-09-28 Nick Clifton PR 30886 * elf-bfd.h (struct elf_obj_tdata): Add dt_strsz field. * elf.c (_bfd_elf_get_dynamic_symbols): Add a NUL byte at the end of the string table. Initialise the dt_strsz field. (_bfd_elf_slurp_version_tables): Only free the contents if they were malloc'ed. Add checks before setting string pointers in the dt_strtab buffer. 2023-09-27 Nick Clifton PR 30885 * elfcode.h (elf_slurp_symbol_table): Compute the symcount for non dynamic symbols in the same way as _bfd_elf_get_symtab_upper_bound. 2023-09-13 Jacob Navia * elf.c (_bfd_elf_init_reloc_shdr): Don't segfault on alloc fail. 2023-09-13 Alan Modra * elf-strtab.c (_bfd_elf_strtab_init): In the event of memory allocation failure, make sure that the hash table is freed. 2023-08-30 Tom Tromey PR binutils/30703 * doc/webassembly.texi, doc/bfd.texi: Revert 8bb23cdb, adding parameters back to @@node. 2023-08-04 Nick Clifton PR 15545 * cache.c (bfd_cache_close_all): Extend description to note that all files will be closed, even those that are not cacheable. Add code to prevent a possible infinite loop. 2023-08-02 Tom Tromey * pei-x86_64.c (PEI_HEADERS): Do not define. * pei-loongarch64.c (PEI_HEADERS): Do not define. * pei-aarch64.c (PEI_HEADERS): Do not define. * pe-x86_64.c (PEI_HEADERS): Do not define. * pe-aarch64.c (PEI_HEADERS): Do not define. * libpei.h (_LIBPEI_H): Add include guard. * coff-x86_64.c (PEI_HEADERS): Do not check. * coff-loongarch64.c (PEI_HEADERS): Do not check. * coff-aarch64.c (PEI_HEADERS): Do not check. 2023-07-24 Johannes Schauer Marin Rodrigues * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): If inserting a timestamp, use the value held in the SOURCE_DATE_EPOCH environment variable, if it is defined. 2023-07-24 Jose E. Marchesi * reloc.c: New reloc BFD_RELOC_BPF_DISPCALL32. * elf64-bpf.c (bpf_reloc_type_lookup): Handle the new reloc. * libbfd.h (bfd_reloc_code_real_names): Regenerate. 2023-07-09 Fangrui Song PR 30592 * section.c: Define SEC_ELF_LARGE. * bfd-in2.h: Regenerate. * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections, elf_x86_64_copy_private_section_data): New. 2023-07-03 Nick Clifton * version.m4: Update version number to 2.41.50. * configure: Regenerate. * bfd/po/bfd.pot: Regenerate. 2023-07-03 Nick Clifton 2.41 Branch Point. 2023-06-19 Nick Clifton PR 30560 * elf64-x86-64.c (elf_x86_64_relocate_section): Add more checks for a valid relocation offset. 2023-06-07 Nick Clifton PR 30499 * elflink.c (elf_link_add_object_symbols): Add a message indicating that alignment and size discrepancies between the definition of common symbols and normal symbols are serious and should be investigated. 2023-05-31 Tristan Gingold PR 30444 * coffcode.h (coff_write_object_contents): Handle base64 encoding on PE. Also check for too large string table. * coffgen.c (extract_long_section_name): New function extracted from ... (make_a_section_from_file): ... here. Add support for base64 long section names. (decode_base64): New function. 2023-05-17 Luca Bacci PR 30421 * cofflink.c (_decoration_hash_newfunc): New function. (_bfd_coff_link_hash_table_init): Call it. * libcoff-in.h (struct coff_link_hash_table): Add decoration_hash field. (struct decoration_hash_entry): Declare. (_decoration_hash_newfunc): Prototype. * libcoff.h: Regenerate. 2023-05-16 Oleg Tolmatcev * libcoff-in.h (struct coff_tdata): Add section_by_index and section_by_target_index hash tables. * libcoff.h: Regenerate. * coffcode.h (htab_hash_section_index): New function. (htab_eq_section_index): New function. (htab_hash_section_target_index): New function. (htab_eq_section_target_index): New function. (coff_mkobject_hool): Create the hash tables. * peicode.h: Add the same new functions. (pe_mkobject_hook): Create the hash tables. * coff-x86_64.c (coff_amd64_rtype_to_howto): Use the new tables to speed up lookups. * coffgen.c (coff_section_from_bfd_index): Likewise. (_bfd_coff_close_and_cleanup): Delete the hash tables. 2023-05-10 Luca Bonissi PR 30422 * elf32-or1k.c (or1k_elf_relocate_section): Prescan for R_OR1K_GOT_AHI16 relocs as they may occur after R_OR1K_GOT16 relocs. 2023-05-05 Nick Clifton PR 30354 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): If any debug sections are marked then rerun the extra marking in order to pick up any dependencies. 2023-05-03 Oleg Tolmatcev * archive.c (_bfd_write_archive_contents): Use a larger buffer in order to improve efficiency. 2023-05-03 Oleg Tolmatcev * coffcode.h (coff_read_word_from_buffer): New function. * coffcode.h (COFF_CHECKSUM_BUFFER_SIZE): New constant. * coffcode.h (coff_compute_checksum): Improve speed by reducing the number of seeks and reads used. 2023-04-24 Nick Clifton * po/la.po: New Georgian translation. 2023-04-17 Nick Clifton PR 30142 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc section to be writeable. 2023-03-30 Nick Clifton PR 30285 * elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated. 2023-02-27 Felix Willgerodt * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for elf_external_linux_prpsinfo32_ugid32. 2023-02-23 Fangrui Song * elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params. (riscv_elfNN_set_options): New. (riscv_info_to_howto_rela): Check relax_gp. (_bfd_riscv_relax_section): Likewise. * elfxx-riscv.h (struct riscv_elf_params): New. (riscv_elf32_set_options): New. (riscv_elf64_set_options): New. 2023-02-23 Nick Clifton Alan Modra PR 30150 * dwarf2.c (comp_unit_contains_address): Renamed to ... (comp_unit_may_contain_address): this, and added code to return true if the CU's ranges have not yet been computed. (_bfd_dwarf2_find_nearest_line_with_alt): Use the renamed function, simplifying code in the process. 2023-02-21 Nick Clifton * opncls.c (bfd_fill_in_gnu_debuglink_section): Update description. 2023-02-17 Tom Tromey * doc/doc.str (FUNCTION): Call func. 2023-02-17 Tom Tromey * opncls.c: Hoist the SECTION comment. 2023-02-17 Tom Tromey * opncls.c (bfd_get_debug_link_info_1, separate_debug_file_exists) (separate_alt_debug_file_exists, find_separate_debug_file) (get_build_id, get_build_id_name, check_build_id_file): Don't use chew comments. 2023-02-17 Tom Tromey * doc/doc.str (SYNOPSIS): Use collapse_whitespace. * doc/chew.c (collapse_whitespace): New function. (main): Register collapse_whitespace. 2023-02-07 Tom Tromey * bfd.c, cache.c, compress.c, opncls.c: Remove RETURNS from documentation comments. * doc/doc.str, doc/proto.str (RETURNS): Remove. 2023-02-07 Tom Tromey * syms.c (bfd_decode_symclass, bfd_is_undefined_symclass) (bfd_symbol_info): Reorder documentation comment. * doc/doc.str (synopsis_seen): New variable. (SYNOPSIS): Set synopsis_seen. Emit @@deftypefn. (DESCRIPTION): Use synopsis_seen. * doc/chew.c (catstrif): New function. (main): Add catstrif intrinsic. (compile): Recognize "variable" command. 2023-02-07 Tom Tromey * doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC): Update. * doc/chew.c (internalmode): Remove. (add_intrinsic_variable): New function. (main): Add internalmode as intrinsic. (internal_mode): Remove global. (maybecatstr): Update. (free_words): Free variables. 2023-02-07 Tom Tromey * doc/chew.c (pcu) : Now intptr_t. (internal_mode, istack, isp): Likewise. (bang, atsign): Use intptr_t. 2023-02-07 Tom Tromey * doc/proto.str (SYNOPSIS): Don't use paramstuff. * doc/chew.c (paramstuff): Remove. (main): Don't add paramstuff intrinsic. 2023-02-07 Tom Tromey * doc/doc.str, doc/proto.str: Add copyright header. 2023-02-07 Tom Tromey * doc/webassembly.texi (File layout): Remove second argument from @@node. * doc/bfd.texi: Use single-argument @@node everywhere. 2023-02-07 Tom Tromey * Makefile.in: Rebuild. * doc/local.mk (%D%/chew.stamp): Don't use H_CFLAGS. 2023-01-24 Nick Clifton PR 29998 * cofflink.c (_bfd_coff_generic_relocate_section): Add an assertion that the output section is set for defined, global symbols. 2023-01-17 Xianmiao Qu * elf32-csky.c (elf32_csky_merge_attributes): Don't save and restore the ARCH attribute, it will actually clear the ARCH attribute. (csky_elf_merge_private_bfd_data): Store the machine flag correctly. 2023-01-13 Nick Clifton * po/ro.po: Updated Romainian translation. 2023-01-11 Nick Clifton PR 29988 * dwarf2.c (read_indexed_address): Fix check for an out of range offset. 2023-01-06 Nick Clifton * po/ru.po: Updated Russian translation. 2023-01-03 Himal PR 29947 * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows' nul device filename. 2023-01-03 Nick Clifton * po/fr.po: Updated French trabslation. * po/uk.po: Updated Ukrainian trabslation. 2022-12-31 Nick Clifton * 2.40 branch created. 2022-12-23 Nick Clifton PR 29936 * dwarf2.c (concat_filename): Fix check for a directory index off the end of the directory table. 2022-12-21 Nick Clifton * po/ro.po: Updated Romanian translation. 2022-12-06 Nick Clifton PR 29852 * elf32-arm.c (cmse_scan): Check for NULL entries in the sym_hashes array. (elf32_arm_gc_mark_extra_sections): Likewise. 2022-12-05 Nick Clifton PR 29848 * vms-alpha.c (parse_module): Fix potential out of bounds memory access. 2022-12-01 Nick Clifton PR 25202 * bfd.c (VerilogDataEndianness): New variable. (verilog_write_record): Use VerilogDataEndianness, if set, to choose the endianness of the output. (verilog_write_section): Adjust the address by the data width. 2022-11-21 Nick Clifton PR 29764 * cpu-arm.c (scan): Accept machine names prefixed with "arm:". * cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:". 2022-10-19 Nick Clifton PR 29699 * elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field of the section header is zero. 2022-09-09 Nick Clifton PR 29532 * elf.c (setup_group): Do not return false if there is no group information available. 2022-09-02 Aaron Merey * aout-target.h (MY_find_nearest_line_with_alt): New macro. * bfd-in2.h: Regenerate. * bfd.c (bfd_find_nearest_line_with_alt): New macro. * binary.c (binary_find_nearest_line_with_alt): New macro. * coff-rs6000.c (_bfd_xcoff_find_nearest_line_with_alt): New macro. (rs6000_xcoff64_vec): Add coff_find_nearest_line_with_alt. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Calls _bfd_dwarf2_find_nearest_line_with_alt. (_bfd_dwarf2_find_nearest_line_with_alt): New function. Implements the former _bfd_dwarf2_find_nearest_line. Adds parameter alt_filename. Attempt to open alt_filename and use it as the .dwz file if not NULL. * elf-bfd.h (_bfd_elf_find_nearest_line_with_alt): New declaration. * elf.c (_bfd_elf_find_nearest_line): Calls _bfd_elf_find_nearest_line_with_alt. (_bfd_elf_find_nearest_line_with_alt): New function. Implements the former _bfd_elf_find_nearest_line. Adds parameter alt_filename. * elf32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro. * elf64-mips.c (bfd_elf64_find_nearest_line_with_alt): New macro. * elfn32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro. * elfxx-mips.h (_bfd_mips_elf_find_nearest_line_with_alt): New macro. * elfxx-target.h (bfd_elfNN_find_nearest_line_with_alt): New macro. * i386mdos.c (msdos_find_nearest_line_with_alt): New macro. * ihex.c (ihex_find_nearest_line_with_alt): New macro. * libbfd-in.h (_bfd_nosymbols_find_nearest_line_with_alt): New declaration. (_bfd_dwarf2_find_nearest_line_with_alt): New declaration. * libbfd.h: Regenerate. * libcoff-in.h (coff_find_nearest_line_with_alt): New macro. * libcoff.h: Regenerate. * libecoff.h (_bfd_ecoff_find_nearest_line_with_alt): New macro. * mach-o.h (bfd_mach_o_find_nearest_line_with_alt): New macro. * mmo.c (mmo_find_nearest_line_with_alt): New macro. * pef.c (bfd_pef_find_nearest_line_with_alt): New macro. * plugin.c (bfd_plugin_find_nearest_line_with_alt): New macro. * ppcboot.c (ppcboot_find_nearest_line_with_alt): New macro. * som.h (som_find_nearest_line_with_alt): New macro. * srec.c (srec_find_nearest_line_with_alt): New macro. * syms.c (_bfd_nosymbols_find_nearest_line_with_alt): New function. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add symbol for NAME##_find_nearest_line_with_alt. (_bfd_find_nearest_line_with_alt): Add declaration. * tekhex.c (tekhex_find_nearest_line_with_alt): New macro. * verilog.c (verilog_find_nearest_line_with_alt): New macro. * vms-alpha.c (_bfd_vms_find_nearest_line_with_alt): New macro. * wasm-module.c (wasm_find_nearest_line_with_alt): New macro. * xsym.c (bfd_sym_find_nearest_line_with_alt): New macro. 2022-09-02 Frederic Cambus * config.bfd (arm-*-openbsd*): Restore target. 2022-08-30 Nick Clifton PR 29529 * dwarf2.c (struct line_info_table): Add new field: use_dir_and_file_0. (concat_filename): Use new field to help select the correct table slot. (read_formatted_entries): Do not skip entry 0. (decode_line_info): Set new field depending upon the version of DWARF being parsed. Initialise filename based upon the setting of the new field. 2022-08-22 Frederic Cambus * config.bfd (aarch64-*-openbsd*): Add target. 2022-08-03 Nick Clifton PR 29389 * bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag. * cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the closed bfd. (bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly reopened bfd. * opncls.c (bfd_set_filename): Refuse to change the name of a bfd that has been closed by bfd_cache_delete. Mark changed bfds as uncacheable. * bfd-in2.h: Regenerate. a14 5 2022-07-26 Nick Clifton * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix indentation. d2423 1 a2423 1 Copyright (C) 2021-2024 Free Software Foundation, Inc. @ 1.13 log @Merge conflicts @ text @d1 1 a1 1 2020-02-01 Nick Clifton d3 211 a213 1 Binutils 2.34 release. d215 2 a216 1 2020-01-29 Alan Modra d218 1 a218 5 Apply from master 2020-01-27 H.J. Lu Alan Modra PR ld/25458 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases. d220 1 a220 4 2020-01-23 Alan Modra PR 25444 * elf.c (assign_file_positions_for_load_sections): Avoid divide by zero when p_align is zero. d222 2 a223 3 2020-01-22 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under which __tls_get_addr calls will be eliminated. d225 35 a259 1 2020-01-23 Nick Clifton d262 21 d284 2 a285 1 2020-01-20 Nick Clifton d287 11 a297 3 * po/pt.po: Updates Portuguese translation. * po/ru.po: Updated Russian translation. * po/uk.po: Updated Ukranian translation. d299 1 a299 1 2020-01-18 Nick Clifton a300 1 * version.m4 (BFD_VERSION): Set to 2.33.90. d302 87 d391 425 a815 1 2020-01-18 Nick Clifton d817 1 a817 1 Binutils 2.34 branch created. d819 3 a821 1 2020-01-17 Christian Biesinger d823 1 a823 4 * coff-arm.c: Fix spelling error (seperate). * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling error (seperate). * sysdep.h (strnlen): Fix spelling error (seperate). d825 3 a827 1 2020-01-15 Lars Brinkhoff d829 1 a829 2 PR 20694 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192. d831 3 a833 1 2020-01-15 Alan Modra d835 1 a835 6 PR 25384 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment. (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies of function symbols unless dot symbols are present. Do warn whenever one is created, regardles of whether a PLT entry is also emitted for the function symbol. d837 3 a839 1 2020-01-14 Alan Modra d841 1 a841 2 * som.c (som_bfd_count_ar_symbols): Error when file position of symbols on chains is not strictly increasing. d843 5 a847 1 2020-01-14 Alan Modra d849 1 a849 5 * vms.h (VMS_DEBUG): Define as 0. * vms-alpha.c (image_write): Move debug output after bounds check. Tidy bounds check. (_bfd_vms_slurp_eihd): Warning fix. (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings. d851 5 a855 1 2020-01-13 Alan Modra d857 1 a857 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even for "ignored" records. d859 5 a863 1 2020-01-13 Alan Modra d865 1 a865 9 * wasm-module.c (wasm_scan_name_function_section): Formatting. Delete asect name check. Move asect NULL check to wasm_object_p. Correct bounds check of sizes against end. Replace uses of bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use just one bfd_release. (wasm_scan): Don't use malloc/strdup for section names, bfd_alloc instead. Simplify code prefixing section name. Formatting. Don't attempt to free memory here.. (wasm_object_p): ..do so here. d867 1 a867 1 2020-01-10 Szabolcs Nagy d869 74 a942 4 PR ld/22269 * elf32-arm.c (elf32_arm_final_link_relocate): Use UNDEFWEAK_NO_DYNAMIC_RELOC. (allocate_dynrelocs_for_symbol): Likewise. d944 1 a944 1 2020-01-10 Tamar Christina d946 4 a949 2 PR 25210 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass. d951 1 a951 1 2020-01-10 Alan Modra d953 4 a956 1 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type. d958 1 a958 1 2020-01-09 Nick Clifton d960 7 a966 3 PR 25221 * bfd.c (bfd_convert_section_contents): Check for a compress header size that is larger than the actual section size. d968 1 a968 1 2020-01-08 Alan Modra d970 3 a972 3 PR 25351 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms after removing sections. d974 1 a974 1 2020-01-06 Jim Wilson d976 2 a977 7 PR 25205 * elfnn-riscv.c (riscv_elf_relocate_section) : Add check for !bfd_link_pic (info). : Move next to R_RISCV_CALL. : Add comment. (_bfd_riscv_relax_section): For plt.offset check, add check for bfd_link_pic (info). Add comment. d979 1 a979 1 2020-01-06 Alan Modra d981 3 a983 3 * format.c (bfd_check_format_matches): Ignore bfd_error on target match failures. Don't init to bfd_error_wrong_format before calling _bfd_check_format. d985 1 a985 1 2020-01-06 Alan Modra d987 3 a989 3 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail status rather than exiting on stack overflow or underflow. (_bfd_vms_slurp_etir): Adjust to suit. d991 1 a991 1 2020-01-06 Alan Modra d993 1 a993 1 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index. d995 1 a995 1 2020-01-06 Alan Modra d997 6 a1002 15 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of command. Check name offset is within command. (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib), (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints), (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab), (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid), (bfd_mach_o_read_linkedit, bfd_mach_o_read_str), (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min), (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version), (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main), (bfd_mach_o_read_note, bfd_mach_o_read_build_version), (bfd_mach_o_read_segment): Similarly. (bfd_mach_o_read_thread): Properly bound check thread struct. Don't repeat checks on second loop. (bfd_mach_o_read_command): Fail on invalid command length. d1004 1 a1004 1 2020-01-04 Alan Modra d1006 5 a1010 5 * format.c (bfd_check_format_matches): Add preserve_match. Save initial bfd state in "preserve", matched bfd state in "preserve_match". Save just the first match. Release bfd_alloc memory. Restore and finish preserved state as appropriate on all function exit paths. d1012 1 a1012 1 2020-01-04 Alan Modra d1014 84 a1097 1 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc. d1099 1 a1099 1 2020-01-04 Alan Modra d1101 3 a1103 2 * coffgen.c (coff_real_object_p): Free malloc'd memory on target match too. d1105 1 a1105 1 2020-01-03 Nick Clifton d1107 29 a1135 4 PR 25307 (bfd_pef_parse_function_stubs): Correct the test that ensures that there is enough data remaining in the code buffer before attempting to read a function stub. d1137 1 a1137 1 2020-01-03 Nick Clifton d1139 2 a1140 13 PR 25308 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the return value from bfd_malloc. * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise. (elf32_arm_filter_cmse_symbols): Likewise. (elf32_arm_write_section): Likewise. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. (bfd_mach_o_follow_dsym): Likewise. * pef.c (bfd_pef_print_loader_section): Likewise. (bfd_pef_scan_start_address): Likewise. (bfd_pef_parse_function_stubs): Likewise. (bfd_pef_parse_symbols): Likewise. d1142 1 a1142 1 2020-01-03 Sergei Trofimovich d1144 40 a1183 3 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail on binary inputs ld/PR25316. (is_ia64_elf): new helper to filter on ia64 objects. d1185 1 a1185 1 2020-01-03 Jan Beulich d1187 3 a1189 3 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore in parameter names. (bfd_mach_o_scan): Insert underscore in two variable names. d1191 1 a1191 1 2020-01-02 Sergey Belyashov d1193 103 a1295 3 * Makefile.am: Add z80-elf target support. * configure.ac: Likewise. * targets.c: Likewise. d1297 3 d1301 341 a1641 9 * config.bfd: Add z80-elf target support and new arches: ez80 and z180. * elf32-z80.c: New file. * archures.c: Add new z80 architectures: eZ80 and Z180. * coffcode.h: Likewise. * cpu-z80.c: Likewise. * coff-z80.c: Add new relocations for Z80 target and local label check. * reloc.c: Add new relocs. d1644 768 d2413 1 a2413 1 2020-01-02 Tamar Christina d2415 1 a2415 3 PR 25210 PR 24753 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class. d2417 1 a2417 1 2020-01-01 Alan Modra d2421 1 a2421 1 For older changes see ChangeLog-2019 d2423 1 a2423 1 Copyright (C) 2020 Free Software Foundation, Inc. @ 1.12 log @Fix to PR port-arm/54159. From: Pullup -9 @ text @d1 1 a1 1 2019-08-22 Alan Modra d3 1 a3 13 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL, instead recognize CMSE_PREFIX in symbol name. (elf32_arm_gc_mark_extra_sections): Likewise. (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL. (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL. 2018-07-18 Nick Clifton 2.31.1 Release point. * version.m4: Set to 2.31.1 * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. d5 1 a5 1 2018-07-14 Nick Clifton d7 5 a11 4 * version.m4: Update to 2.31.0. * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. d13 4 a16 1 2018-07-14 Nick Clifton d18 3 a20 5 2.31 Release point. * version.m4: Update to 2.31. * development.sh: Set to false. * configure: Regenerate. * po/bfd.pot: Regenerate. d22 1 a22 1 2018-07-03 Alan Modra d24 1 a24 41 PR 17550 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols in discarded sections. 2018-07-11 Max Filippov * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate space for dynamic relocation for undefined weak symbol. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE relocation for undefined weak symbols. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation section for relocations against undefined weak symbols. 2018-07-10 Maciej W. Rozycki * elflink.c (bfd_elf_final_link): Rename `remove' local variable to `remove_section'. 2018-07-09 H.J. Lu PR ld/23388 * configure.ac: Use changequote for "i[3-7]86-*-linux-*". * configure: Regenerated. 2018-07-09 H.J. Lu PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. 2018-07-06 Alan Modra * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. 2018-07-05 Jim Wilson d26 1 a26 33 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*. (riscv64*-*-*): Likewise. (riscv-*-*): Add as an alias for riscv32*-*-*. 2018-07-05 Alan Modra * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error on mismatch. Remove "warning: " from messages. Track last bfd used to set tags. (ppc_elf_merge_obj_attributes): Likewise. Handle status from _bfd_elf_ppc_merge_fp_attributes. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status from _bfd_elf_ppc_merge_fp_attributes. 2018-07-03 Alan Modra * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes sections. 2018-07-03 Alan Modra * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define. * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding incompatible attribute. (ppc_elf_merge_obj_attributes): Likewise. Return _bfd_elf_merge_object_attributes result. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return _bfd_elf_merge_object_attributes result. 2018-07-05 Nick Clifton d28 1 a29 14 2018-07-04 H.J. Lu * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h. * Makefile.in: Regenerated. 2018-07-04 H.J. Lu PR ld/23324 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the R_X86_64_converted_reloc_bit bit. 2018-06-26 Nick Clifton d32 1 a32 6 2018-06-25 Nick Clifton * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check for malloc returning NULL. (_bfd_aarch64_erratum_843419_fixup): Check for _bfd_aarch64_erratum_835769_stub_name returning NULL. d34 1 a34 3 2018-06-24 Nick Clifton * version.m4 (BFD_VERSION): Update to 2.30.90. d38 1 a38 458 2018-06-24 Nick Clifton 2.31 branch created. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding) (_bfd_mips_elf_cant_unwind_opcode): Correct formatting. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_post_process_headers): Keep EI_ABIVERSION setting together. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT) (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64) (MIPS_LIBC_ABI_MAX): New enumeration constants. (_bfd_mips_post_process_headers): Use them in place of magic numbers. 2018-06-21 Jim Wilson * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment. Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset. 2018-06-21 Alan Modra * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign". * doc/Makefile.in: Regenerate. 2018-06-20 Renlin Li * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. 2018-06-20 Nick Clifton PR 23316 * opncls.c (get_build_id): Check for a negative or excessive data size in the build-id note. 2018-06-20 Nick Clifton PR 23299 * mach-o.c (cputype): New function. (cpusubtype): New function. (bfd_mach_o_bfd_print_private_data): New function. Dispalys the values in the MACH-O file header. (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and cpusubtype fields from the input bfd's mach-o header to the output bfd. * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Redefine to bfd_mach_o_bfd_print_private_data. * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype. 2018-06-19 Maciej W. Rozycki PR ld/22966 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the `.got.plt' entry referred is in range. (mips_finish_exec_plt): Correct the range check for `.got.plt' start. Replace the assertion used for that with a proper error message. 2018-06-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix formatting. 2018-06-19 Simon Marchi * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. (INCLUDES): Rename to ... (AM_CPPFLAGS): ... this. * configure.ac: Remove AC_PREREQ. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add info-in-builddir no-texinfo.tex. (info_TEXINFOS): Rename bfd.texinfo to bfd.texi. * doc/bfd.texinfo: Rename to ... * doc/bfd.texi: ... this. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. 2018-06-18 Mephi PR 23297 * mach-o-x86-64.c (x86_64_howto_table): Add entry for BFD_RELOC_MACH_O_X86_64_RELOC_TLV. (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc. (bfd_mach_o_x86_64_swap_reloc_out): Likewise. * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-06-14 Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add GINV extension. 2018-06-14 H.J. Lu PR binutils/23267 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first symbol version is base version. 2018-06-14 Alan Modra * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs". * elflink.c (_bfd_elf_init_2_index_sections): Comment fix. (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs". (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when "dynamic_relocs" is not set. * elfxx-mips.c (count_section_dynsyms): Likewise. 2018-06-14 Alan Modra PR 23282 * bfdio.c (bfd_seek): Optimize away seeks to current position. 2018-06-13 Scott Egerton Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add CRC. 2018-06-08 H.J. Lu PR ld/23161 * elfxx-x86.c (elf_x86_hide_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to hide hidden __bss_start, _end and _edata in shared libraries. 2018-06-07 Alan Modra * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs. 2018-06-05 Alan Modra * bfd.c (struct bfd): Update comment on "where" usage. * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec", "iostream", and "where" from containing archive file. Return error on NULL iovec. (bfd_bread): Similarly, and return error attempted out of bounds archive element access. (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and "where" from containing archive file. (bfd_seek): Likewise. Return error on NULL iovec. Don't attempt to optimize away seeks. Don't paper over errors by calling bfd_tell. (bfd_get_mtime): Call bfd_stat rather than iovec->bstat. (bfd_get_size): Likewise. (bfd_mmap): Operate on and use iovec of containing archive file. Return error on NULL iovec. * cache.c (bfd_cache_lookup_worker): Abort if working on archive element bfd. (cache_bread_1): Delete bfd parameter, add FILE* parameter. Don't ignore zero byte reads. (cache_bread): Look up FILE* in cache here. Error on NULL lookup. (cache_bwrite): Rename "where" to "from". (cache_bmmap): Don't handle archive elements. * coffcode.h (coff_slurp_line_table): Exit early on zero lineno count. * bfd-in2.h: Regenerate. 2018-06-05 Alan Modra PR 23254 * plugin.c (bfd_plugin_open_input): Allow for possibility of nested archives. Open file again for plugin. (try_claim): Don't save and restore file position. Close file if not claimed. * sysdep.h (O_BINARY): Define. 2018-06-04 Max Filippov * elf32-xtensa.c (xtensa_read_table_entries): Make global. (compute_fill_extra_space): Drop declaration. Rename function to xtensa_compute_fill_extra_space. (compute_ebb_actions, remove_dead_literal): Update references to compute_fill_extra_space. 2018-06-04 Volodymyr Arbatov * elf32-xtensa.c (elf32xtensa_separate_props): New global variable. (xtensa_add_names): New function. (xtensa_property_section_name): Add new parameter separate_sections, use it to choose property section name. (xtensa_get_separate_property_section): New function. (xtensa_get_property_section): Invoke xtensa_get_separate_property_section to get individual property section if it exists, common property section otherwise. (xtensa_make_property_section): Pass elf32xtensa_separate_props to xtensa_property_section_name. 2018-06-04 H.J. Lu PR binutils/23146 * bfd-in.h: Include "diagnostics.h". * bfd-in2.h: Regenerated. * elf32-arm.c (elf32_arm_nabi_write_core_note): Use DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and DIAGNOSTIC_POP to silence GCC 8.1 warnings with -Wstringop-truncation. * elf32-ppc.c (ppc_elf_write_core_note): Likewse. * elf32-s390.c (elf_s390_write_core_note): Likewse. * elf64-ppc.c (ppc64_elf_write_core_note): Likewse. * elf64-s390.c (elf_s390_write_core_note): Likewse. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse. 2018-06-03 Jim Wilson PR ld/23244 * elfnn-riscv.c (riscv_elf_relocate_section) : Check for and handle an undefined weak with no PLT. PR ld/22756 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check to code that ignores duplicate symbols. 2018-06-01 H.J. Lu * version.m4: Bump version to 2.30.52 * configure: Regenerated. 2018-06-01 Alan Modra * bfd.c (_bfd_error_handler): Arrange for this function to be declared in bfd-in2.h. * libbfd-in.h (_bfd_error_handler): Don't declare. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-30 Amaan Cheval * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems* This is needed to generate UEFI application image files from ELFs. 2018-05-28 H.J. Lu * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_i386_lazy_ibt_plt): Likewise. (elf_i386_nacl_plt): Likewise. * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ... (elf_x86_64_tlsdesc_plt_entry): This. (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_x86_64_lazy_bnd_plt): Likewise. (elf_x86_64_lazy_ibt_plt): Likewise. (elf_x32_lazy_ibt_plt): Likewise. (elf_x86_64_nacl_plt): Likewise. (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end to update TLSDESC entry. * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments. Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end. (elf_x86_non_lazy_plt_layout): Update comments. (elf_x86_plt_layout): Likewise. 2018-05-28 H.J. Lu PR ld/23238 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-s390.c (elf_backend_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf64-s390.c (elf_backend_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC handling. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elflink.c (elf_link_add_object_symbols): Set elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols. 2018-05-26 H.J. Lu PR ld/23194 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New. * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function. Extracted from _bfd_elf_link_assign_sym_version. (_bfd_elf_link_hide_sym_by_version): New function. (_bfd_elf_link_assign_sym_version): Use _bfd_elf_link_hide_versioned_symbol. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call _bfd_elf_link_hide_sym_by_version instead of bfd_hide_sym_by_version. Don't check unversioned symbol. 2018-05-25 Alan Modra * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-05-25 Alan Modra * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS. * configure: Regenerate. 2018-05-23 H.J. Lu * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING to data. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec is NULL. (elf32_hppa_size_stubs): Only create stubs for load, alloc, code sections. (final_link_relocate): Revert last change. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (final_link_relocate): Don't look for plt call stubs in non-alloc sections. 2018-05-21 H.J. Lu PR ld/23201 * aout-target.h (MY_bfd_link_hide_symbol): New. * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise. * binary.c (binary_bfd_link_hide_symbol): Likewise. * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise. * coffcode.h (coff_bfd_link_hide_symbol): Likewise. * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise. * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise. * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise. * ihex.c (ihex_bfd_link_hide_symbol): Likewise. * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise. * linker.c (_bfd_generic_link_hide_symbol): Likewise. (bfd_link_hide_symbol): Likewise. * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise. * mmo.c (mmo_bfd_link_hide_symbol): Likewise. * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise. * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise. * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise. * som.c (som_bfd_link_hide_symbol): Likewise. * srec.c (srec_bfd_link_hide_symbol): Likewise. * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise. * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise. (alpha_vms_bfd_link_hide_symbol): Likewise. * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise. * coff64-rs6000.c (rs6000_xcoff64_vec): Add _bfd_generic_link_hide_symbol. (rs6000_xcoff64_aix_vec): Likewise. * elflink.c (bfd_elf_record_link_assignment): Don't make forced local symbol dynamic. (_bfd_elf_link_hide_symbol): New function. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't check root.ldscript_def. * targets.c (bfd_target): Add _bfd_link_hide_symbol. (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. 2018-05-21 H.J. Lu PR binutils/23199 * elf.c (setup_group): Mark section in a section group with SHF_GROUP. 2018-05-18 H.J. Lu PR ld/23194 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 if a symbol is versioned and there is a version script. 2018-05-18 Kito Cheng * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle EF_RISCV_RVE. 2018-05-18 Jim Wilson * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_relocate_section): Don't generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_finish_dynamic_symbol): Likewise. 2018-05-18 John Darrington * Makefile.am: Add s12z files. * Makefile.in: Regenerate. * archures.c: Add bfd_s12z_arch. * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24. * bfd-in2.h: Regenerate. * config.bfd: Add s12z target. * configure.ac: Add s12z target. * configure: Regenerate. * cpu-s12z.c: New file. * elf32-s12z.c: New file. * libbfd.c (bfd_putb24): New function. (bfd_putl24): New function. * libbfd.h: Regenerate. * reloc.c: Add s12z relocations. (bfd_get_reloc_size): Handle size 5 relocs. * targets.c: Add s12z_elf32_vec. 2018-05-18 H.J. Lu PR ld/23189 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X like R_386_GOT32. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 for linker defined symbols. 2018-05-18 Alan Modra PR 23199 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries don't point at other SHT_GROUP sections. Set shdr corresponding to invalid entry, to NULL rather than section 0. Identify SHT_GROUP section index when reporting an error. Cope with NULL shdr pointer. 2018-05-18 Alan Modra * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout. * configure.ac (HAVE_HIDDEN): Check compiler support for hidden visibility. * libbfd.h: Regenerate. * configure: Regenerate. * config.in: Regenerate. 2018-05-18 Alan Modra d40 1 a40 6 * libbfd-in.h: Add include guard. * libcoff-in.h: Likewise. * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif. * doc/Makefile.in: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. d42 1 a42 1 2018-05-16 Maciej W. Rozycki d44 4 a47 1 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'. d49 1 a49 1 2018-05-16 Alan Modra d51 2 a52 16 PR 22458 * format.c (struct bfd_preserve): Add section_id. (bfd_preserve_save, bfd_preserve_restore): Save and restore _bfd_section_id. (bfd_reinit): Set _bfd_section_id. (bfd_check_format_matches): Put all matches of any priority into matching_vector. Save initial section id and start each attempted match at that section id. * libbfd-in.h (_bfd_section_id): Declare. * section.c (_bfd_section_id): Rename from section_id and make global. Adjust uses. (bfd_get_next_section_id): Delete. * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of bfd_get_section_id with _bfd_section_id. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. d54 1 a54 1 2018-05-15 Christophe Guillon d56 6 a61 2 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields of the aux structure are initialised. d63 1 a63 1 2018-05-15 Francois H. Theron d65 2 a66 1 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef. d68 1 a68 1 2018-05-15 Nick Clifton d70 5 a74 3 * po/pt.po: New Portuguese translation. * configure.ac (ALL_LINGUAS): Add pt. * configure: Regenerate. d76 1 a76 1 2018-05-14 H.J. Lu d78 2 a79 118 PR ld/23169 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue an error on IFUNC pointer defined in PDE. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call _bfd_x86_elf_link_fixup_ifunc_symbol. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New function. * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New. 2018-05-14 H.J. Lu PR ld/23162 * elfxx-x86.c (elf_x86_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start, _end and _edata locally defined within executables. 2018-05-12 Alan Modra PR 20659 * elf.c (rewrite_elf_program_header): Use segment_mark only for PT_LOAD headers. Delete first_matching_lma and first_suggested_lma. Instead make matching_lma and suggested_lma pointers to the sections. Align section vma and lma calculated from segment. Don't clear includes_phdrs or includes_filehdr based on p_paddr test. Try to handle alignment padding before first section by adjusting new segment lma down. Adjust PT_PHDR map p_paddr. 2018-05-09 Dimitar Dimitrov * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation conformant to TI ABI. (pru_elf32_relax_section): Likewise. (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend. (pru_elf32_pmem_relocate): Trap - should not get here. (pru_elf32_relocate_section): Add support for REL relocations. (elf_info_to_howto_rel): Enable REL. (elf_backend_may_use_rel_p): Likewise. (elf_backend_may_use_rela_p): Likewise. (elf_backend_default_use_rela_p): Likewise. 2018-05-09 Alan Modra PR 23148 * peXXigen.c (pe_print_edata): Correct minimum size. 2018-05-09 Alan Modra PR 23147 * peXXigen.c (pe_print_idata): Bound check hint_addr. 2018-05-08 Nick Clifton PR 22809 * elf.c (bfd_elf_get_str_section): Check for an excessively large string section. * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the attribute section is larger than the size of the file. 2018-05-07 Alan Modra * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than strncmp when checking for ".bf" special symbol. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags section name a char array, remove sentinal known_sections entry, and adjust loop over known_sections to suit. Use memcmp rather than strncmp. 2018-05-04 Alan Modra * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32), (struct elf_external_linux_prpsinfo32_ugid16), (struct elf_external_linux_prpsinfo64_ugid32), (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas. Move comment to.. * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor directives. * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING to data. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic pragmas. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid false positive gcc-8 warning. * cofflink.c (_bfd_coff_link_input_bfd): Likewise. 2018-05-04 Tulio Magno Quites Machado Filho * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order of arguments when warning about different long double types. 2018-05-03 Simon Atanasyan * elf32-mips.c: (elf32_mips_fixup_symbol): New function. (elf_backend_fixup_symbol): New macro. * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp handling. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. 2018-04-30 Francois H. Theron * Makefile.am: Added NFP files to build. * archures.c: Added bfd_arch_nfp * config.bfd: Added NFP support. * configure.ac: Added NFP support. * cpu-nfp.c: New, for NFP support. * elf-bfd.h: Added elf_section_info() * elf64-nfp.c: New, for NFP support. * po/SRC-POTFILES.in: Added NFP source files. * targets.c: Added nfp_elf64_vec * bfd-in2.h: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. d81 1 a81 1 2018-04-27 Alan Modra d83 9 a91 2 * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d93 1 a93 1 2018-04-27 Alan Modra d95 3 a97 52 PR 23123 PR 22374 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt relocs for ifuncs. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes. 2018-04-26 Pedro Alves * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider ifunc and non-ifunc symbols duplicates. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New. (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. (elf32_arm_output_arch_local_syms): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle _GLOBAL_OFFSET_TABLE_ in FDPIC mode. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (DEFAULT_STACK_SIZE): New. (elf32_arm_always_size_sections): Create stack segment. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC) (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New relocations. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations. (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC. (struct elf32_arm_link_hash_table): Update comment. (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations. (IS_ARM_TLS_RELOC): Likewise. (elf32_arm_check_relocs): Likewise. a98 96 (elf32_arm_size_dynamic_sections): Update comment. * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC, BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_plt_entry): New. (elf32_arm_create_dynamic_sections): Handle FDPIC. (elf32_arm_allocate_plt_entry): Likewise. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (struct fdpic_local): New. (elf_arm_obj_tdata): Add local_fdpic_cnts field. (elf32_arm_local_fdpic_cnts): New. (struct fdpic_global): New. (elf32_arm_link_hash_entry): Add fdpic_cnts field. (elf32_arm_link_hash_table): Add srofixup field. (arm_elf_add_rofixup): New. (arm_elf_fill_funcdesc): New. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts. (elf32_arm_allocate_local_sym_info): Likewise. (create_got_section): Create .rofixup section. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts. (bfd_elf32_arm_set_target_params): Handle FDPIC. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. (elf32_arm_fdpic_omit_section_dynsym): New. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC) (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC) (BFD_RELOC_ARM_FUNCDESC_VALUE): New. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE. (elf32_arm_howto_from_type): Take new members of elf32_arm_howto_table_2 into account. (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_print_private_bfd_data): Support EF_ARM_PIC and ELFOSABI_ARM_FDPIC. (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC. (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. Accept arm*-*-uclinuxfdpiceabi. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. 2018-04-25 Alan Modra * elf-linux-core.h: Disable gcc-8 string truncation warning. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-25 Alan Modra * Makefile.am: Remove arm-aout and arm-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-arm.c: Delete. * armnetbsd.c: Delete. * riscix.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d100 1 a100 1 2018-04-24 Nick Clifton d102 2 a103 3 PR 23113 * elf.c (ignore_section_sym): Check for the output_section pointer being NULL before dereferencing it. d105 1 a105 3 PR 23110 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for a negative PE_DEBUG_DATA size before iterating over the debug data. d107 1 a107 1 2018-04-23 Alan Modra d109 1 a109 2 * elf-linux-core.h: Revert last change. * elf.c: Likewise. d111 3 a113 1 2018-04-23 Nick Clifton d115 1 a115 3 PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. d117 3 a119 229 2018-04-23 Alan Modra * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable gcc-8 string truncation warning. (swap_linux_prpsinfo32_ugid16_out): Likewise. (swap_linux_prpsinfo64_ugid32_out): Likewise. (swap_linux_prpsinfo64_ugid16_out): Likewise. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-20 Alan Modra PR 22978 * elf32-hppa.c (got_relocs_needed): Add extra param to special case both dtprel and tprel relocs. (allocate_dynrelocs): Adjust conditions for got relocs. (elf32_hppa_relocate_section): Likewise for local sym got relocs. Emit dynamic relocs on TLS GOT entries for shared libraries, not when pic. Omit dynamic reloc on dtprel entry when local, and on tprel entry when local and executable. 2018-04-19 Alan Modra PR 22537 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1. (hppa_type_of_stub): Don't return a long branch stub for symbols other than those defined statically. 2018-04-19 Alan Modra * Makefile.am: Revert 2018-04-18 coff-mips changes. * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec to selvecs for mips targets change 2018-04-18. * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec and mips_ecoff_bele_vec. * targets.c: Likewise. * coff-mips.c: Resurrect. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-18 Alan Modra * Makefile.am: Remove mips aout and coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-mips.c: Delete * mipsbsd.c: Delete * pe-mips.c: Delete * pei-mips.c: Delete * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 H.J. Lu * elf32-i386.c (elf32_bed): Define before including "elf32-target.h". * elf64-x86-64.c (elf64_bed): Define before including "elf64-target.h". (elf32_bed): Define before including "elf32-target.h". 2018-04-17 H.J. Lu PR ld/23055 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a normal input file with compatible relocation. 2018-04-18 Alan Modra * Makefile.am: Remove support for assorted i386 aout and coff targets. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * targets.c: Likewise. * freebsd.h: Delete. * i386dynix.c: Delete. * i386freebsd.c: Delete. * i386linux.c: Delete. * i386mach3.c: Delete. * i386netbsd.c: Delete. * i386os9k.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 Andrew Sadek Microblaze Target: PIC data text relative * bfd/reloc.c (2 new BFD relocations): BFD_RELOC_MICROBLAZE_64_TEXTPCREL & BFD_RELOC_MICROBLAZE_64_TEXTPCREL * bfd/bfd-in2.h: Regenerate * bfd/libbfd.h: Regenerate * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3 new relocs and handle them in both relocate and relax functions. (microblaze_elf_reloc_type_lookup): add mapping between for new bfd relocs. (microblaze_elf_relocate_section): Handle new relocs in case of elf relocation. (microblaze_elf_relax_section): Handle new relocs for elf relaxation. 2018-04-17 Nick Clifton PR 23055 * aoutx.h (find_nearest_line): Check that the symbol name exists and is long enough, before attempting to see if it is for a .o file. * hash.c (bfd_hash_hash): Add an assertion that the string is not NULL. * linker.c (bfd_link_hash_lookup): Fail if the table or string are NULL. (_bfd_generic_link_add_archive_symbols): Fail if an archive entry has no name. PR 23065 * dwarf2.c (concat_filename): Check for a NULL table pointer. 2018-04-16 Nick Clifton PR 23061 * coffgen.c (coff_pointerize_aux): Check for an out of range fixup. 2018-04-16 Alan Modra * Makefile.am: Remove arm-epoc-pe support. * coff-arm.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * epoc-pe-arm.c: Delete. * epoc-pei-arm.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sparc-aout and sparc-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-sparcle.c: Delete. * aoutf1.h: Delete. * cf-sparclynx.c: Delete. * coff-sparc.c: Delete. * demo64.c: Delete. * sparclinux.c: Delete. * sparclynx.c: Delete. * sparcnetbsd.c: Delete. * sunos.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m68k-aout and m68k-coff support. * aoutf1.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bfd-in.h: Likewise. * bfd.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * configure.host: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * freebsd.h: Likewise. * gen-aout.c: Likewise. * hpux-core.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * riscix.c: Likewise. * targets.c: Likewise. * aout0.c: Delete. * coff-apollo.c: Delete. * coff-aux.c: Delete. * coff-m68k.c: Delete. * coff-svm68k.c: Delete. * coff-u68k.c: Delete. * hosts/delta68.h: Delete. * hosts/hp300bsd.h: Delete. * hosts/m68kaux.h: Delete. * hosts/news.h: Delete. * hp300bsd.c: Delete. * hp300hpux.c: Delete. * liboasys.h: Delete. * m68k4knetbsd.c: Delete. * m68klinux.c: Delete. * m68knetbsd.c: Delete. * oasys.c: Delete. * versados.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh5 and sh64 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-sh.c: Likewise. * elf32-sh-relocs.h: Likewise. * elf32-sh.c: Likewise. * targets.c: Likewise. * elf32-sh64-com.c: Delete. * elf32-sh64.c: Delete. * elf32-sh64.h: Delete. * elf64-sh64.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d121 1 a121 1 2018-04-16 Alan Modra d123 7 a129 8 * Makefile.am: Remove sh-symbianelf support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * elf32-sh-symbian.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d131 1 a131 1 2018-04-16 Alan Modra d133 3 a135 8 * Makefile.am: Remove vax-bsd and vax-ultrix support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * vaxbsd.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d137 1 a137 1 2018-04-16 Alan Modra d139 3 a141 12 * Makefile.am: Remove w65 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-w65.c: Delete. * cpu-w65.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d143 1 a143 1 2018-04-16 Alan Modra d145 1 a145 12 * Makefile.am: Remove we32k support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-we32k.c: Delete. * cpu-we32k.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d147 1 a147 1 2018-04-16 Alan Modra d149 15 a163 23 * Makefile.am: Remove m88k support. * aoutx.h: Likewise. * archures.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-ns32k.c: Likewise. * elf32-nds32.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * reloc.c: Likewise. * targets.c: Likewise. * coff-m88k.c: Delete. * cpu-m88k.c: Delete. * elf32-m88k.c: Delete. * hosts/m88kmach3.h: Delete. * m88kmach3.c: Delete. * m88kopenbsd.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d165 1 a165 1 2018-04-16 Alan Modra d167 5 a171 11 * Makefile.am: Remove i370 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * cpu-i370.c: Delete. * elf32-i370.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d173 1 a173 1 2018-04-16 Alan Modra d175 1 a175 12 * Makefile.am: Remove h8500 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-h8500.c: Delete. * cpu-h8500.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d177 1 a177 1 2018-04-16 Alan Modra d179 2 a180 10 * Makefile.am: Remove h8300-coff support. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * reloc16.c: Likewise. * targets.c: Likewise. * coff-h8300.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d182 1 a182 1 2018-04-16 Alan Modra d184 4 a187 16 * Makefile.am: Remove IEEE 695 support. * archures.c: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * doc/bfdsumm.texi: Likewise. * section.c: Likewise. * targets.c: Likewise. * ieee.c: Delete. * libieee.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d189 1 a189 1 2018-04-16 Alan Modra d191 13 a203 1 * config.bfd: Remove tandem support. d205 1 a205 1 2018-04-16 Alan Modra d207 3 a209 9 * Makefile.am: Remove newsos3 support. * aoutx.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * newsos3.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d211 1 a211 1 2018-04-16 Alan Modra d213 3 a215 23 * Makefile.am: Remove netware support. * bfd-in.h: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * ecoff.c: Likewise. * targets.c: Likewise. * libnlm.h: Delete. * nlm-target.h: Delete. * nlm.c: Delete. * nlm32-alpha.c: Delete. * nlm32-i386.c: Delete. * nlm32-ppc.c: Delete. * nlm32-sparc.c: Delete. * nlm32.c: Delete. * nlm64.c: Delete. * nlmcode.h: Delete. * nlmswap.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. d217 1 a217 1 2018-04-16 Alan Modra d219 1 a219 2 * archures.c: Remove tahoe support. * config.bfd: Likewise. a220 50 * hosts/tahoe.h: Delete. * bfd-in2.h: Regenerate. * configure: Regenerate. 2018-04-14 Alan Modra * elf-bfd.h (struct elf_backend_data): Add relropagesize. * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and sanity test. (elfNN_bed): Init relropagesize. * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to select relropagesize. * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. (ELF_MINPAGESIZE): Don't define. * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. * bfd-in2.h: Regenerate. 2018-04-14 Alan Modra * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend on __QNXTARGET__ define. 2018-04-14 Alan Modra * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss* to obsolete list. 2018-04-11 Alan Modra * aout-adobe.c: Delete. * bout.c: Delete. * coff-i860.c: Delete. * coff-i960.c: Delete. * cpu-i860.c: Delete. * cpu-i960.c: Delete. * elf32-i860.c: Delete. * elf32-i960.c: Delete. * hosts/i860mach3.h: Delete. * Makefile.am: Remove i860, i960, bout, and adobe support. * archures.c: Remove i860 and i960 support. * coffcode.h: Likewise. * reloc.c: Likewise. * aoutx.h: Comment updates. * archive.c: Remove BOUT and i960 support. * bfd.c: Remove BOUT support. * coffswap.h: Remove i960 support. * config.bfd: Remove i860, i960 and adobe targets. * configure.ac: Remove adode, bout, i860, i960, icoff targets. a221 2 * ieee.c: Remove i960 support. * mach-o.c: Remove i860 support. a222 1 * bfd-in2.h: Regenerate. d224 4 a227 1016 * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer in the BFD symbol referred by the relocation. (mips_elf64_write_rela): Likewise. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an error for out-of-range `r_sym' values. 2018-04-09 Alan Modra * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field. (struct ppc_link_hash_table): Add can_convert_all_inline_plt. (ppc64_elf_check_relocs): Set has_pltcall. (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc64_elf_inline_plt): New function. (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals. * elf64-ppc.h (ppc64_elf_inline_plt): Declare. * elf32-ppc.c (has_pltcall): Define. (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt. (ppc_elf_check_relocs): Set has_pltcall. (ppc_elf_inline_plt): New function. (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc_elf_size_dynamic_sections): Likewise. * elf32-ppc.h (ppc_elf_inline_plt): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos. (is_plt_seq_reloc): New function. (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs. (ppc_elf_tls_optimize): Handle inline plt call sequence. (ppc_elf_relax_section): Handle PLTCALL reloc. (ppc_elf_relocate_section): Nop out inline plt call sequence when resolving locally. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE. (has_tls_get_addr_call): Correct comment. (is_branch_reloc): Add PLTCALL. (is_plt_seq_reloc): New function. (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt entry for R_PPC64_PLTCALL. (ppc64_elf_tls_optimize): Handle inline plt call sequence. (ppc_type_of_stub): Handle PLTCALL reloc. (toc_adjusting_stub_needed): Likewise. (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL reloc insn. Nop out inline plt call sequence when resolving locally. Handle __tls_get_addr inline plt call optimization. 2018-04-09 Alan Modra * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define. (struct ppc_stub_hash_entry): Add symtype field. (PLT_KEEP): Define. (struct ppc_link_hash_table): Add pltlocal and relpltlocal. (create_linkage_sections): Create pltlocal and relpltlocal. (ppc64_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal. Keep PLT entries for inline calls against locals. (ppc_build_one_stub): Use pltlocal as appropriate. (ppc_size_one_stub): Likewise. (ppc64_elf_size_stubs): Set symtype. (build_global_entry_stubs_and_plt): Init pltlocal and write relpltlocal for globals. (write_plt_relocs_for_local_syms): Likewise for local syms. (ppc64_elf_relocate_section): Support PLT for local syms. * elf32-ppc.c (PLT_KEEP): Define. (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal. (ppc_elf_create_glink): Create pltlocal and relpltlocal. (ppc_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. Adjust update_local_sym_info call. (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal. (ppc_elf_relocate_section): Support PLT16 relocs for local syms. (write_global_sym_plt): Init pltlocal and write relpltlocal. (ppc_finish_symbols): Likewise for locals. 2018-04-09 Alan Modra * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs for local symbols to.. (write_plt_relocs_for_local_syms): ..here. New function. (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for global symbols to.. (build_global_entry_stubs_and_plt): ..here. Rename from build_global_entry_stubs. (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt. Call write_plt_relocs_for_local_syms. * elf32-ppc.c (get_sym_h): New function. (ppc_elf_relax_section): Use get_sym_h. (ppc_elf_relocate_section): Move output of PLT relocs and glink stubs for local symbols to.. (ppc_finish_symbols): ..here. New function. (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for global syms to.. (write_global_sym_plt): ..here. New function. * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute. (ppc_finish_symbols): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs. (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS. (ppc64_elf_relocate_section): Likewise. Correct PLT16 resolution to plt entry relative to toc pointer. 2018-04-09 Alan Modra * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout file when other TLS flags are tested in a mask. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK. (ppc64_elf_relocate_section): Likewise. (ppc64_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD): Renumber. Update comment. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (ppc_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. 2018-04-06 H.J. Lu * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out R_X86_64_converted_reloc_bit. 2018-04-05 H.J. Lu PR gas/22318 * configure: Regenerated. 2018-04-05 Alan Modra * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto): Also return unsuccessfully for unimplemented relocations. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the `bfd_error_bad_value' error and call `_bfd_error_handler' on a howto lookup failure. (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call accordingly. (elf32_i860_info_to_howto_rela): Likewise. (elf32_i860_relocate_splitn): Likewise. (elf32_i860_relocate_pc16): Likewise. (elf32_i860_relocate_pc26): Likewise. (elf32_i860_relocate_section): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-visium.c (visium_info_to_howto_rela): Correct the range check for `visium_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range check for `iq2000_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-frv.c (frv_info_to_howto_rela): Correct the range check for `elf32_frv_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-mips.c (mips_elf32_rtype_to_howto): Also return unsuccessfully for placeholder howtos. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise. 2018-03-29 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to `_bfd_error_handler' and to set the `bfd_error_bad_value' error. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove ATTRIBUTE_UNUSED from `abfd'. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct `_bfd_error_handler' call formatting. 2018-03-28 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Call `mips_elf32_rtype_to_howto' directly rather than via `->elf_backend_mips_rtype_to_howto'. 2018-03-28 Renlin Li PR ld/22970 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. (elfNN_aarch64_final_link_relocate): Support new relocations. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new relocations. (_bfd_aarch64_elf_resolve_relocation): Support new relocations. 2018-03-28 Renlin Li PR ld/22970 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for TLSLE_LDST16_TPREL_LO12, TLSLE_LDST16_TPREL_LO12_NC, TLSLE_LDST32_TPREL_LO12, TLSLE_LDST32_TPREL_LO12_NC, TLSLE_LDST64_TPREL_LO12, TLSLE_LDST64_TPREL_LO12_NC, TLSLE_LDST8_TPREL_LO12, TLSLE_LDST8_TPREL_LO12_NC. * bfd-in2.h: Regenerated. * libbfd.h: Regenerated. 2018-03-28 Eric Botcazou PR ld/22972 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag has_old_style_got_reloc. (_bfd_sparc_elf_check_relocs) : Set it for old-style relocations. Fix a couple of long lines. (_bfd_sparc_elf_relocate_section) : Do not generate a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style GOT relocations. 2018-03-25 H.J. Lu PR ld/23000 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add ENDBR64 to the TLSDESC PLT entry. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting symbols. Use size_t counts. Delete redundant opd test. 2018-03-21 Alan Modra * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms. 2018-03-21 Alan Modra * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask field unsigned. (update_local_sym_info): Likewise for local_got_tls_masks. (ppc_elf_tls_optimize): Likewise for lgot_masks. 2018-03-21 Alan Modra * elf64-ppc.c (ppc_size_one_stub): Fix comment typo. (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we do in size_dynamic_sections. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1] without first checking array bounds. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. 2018-03-20 H.J. Lu PR ld/22983 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list. 2018-03-19 Nick Clifton * po/es.po: Updated Spanish translation. 2018-03-15 Max Filippov * elf32-xtensa.c (xlate_map_entry): Change types of address fields from 'unsigned' to 'bfd_vma'. (xlate_offset_with_removed_text): Use struct xlate_map_entry as the key argument to bsearch. Allow offsets past the end of a section, use the last map entry for translation of such offsets. 2018-03-15 Kuan-Lin Chen * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed. Not support the target feature. (nds32_elf_ex9_itb_base): Likewise. (nds32_elf_ex9_import_table): Likewise. (nds32_elf_ex9_finish): Likewise. (nds32_elf_ex9_reloc_jmp): Likewise. (nds32_elf_get_insn_with_reg): Likewise. (nds32_get_local_syms): Likewise. (nds32_elf_ex9_replace_instruction): Likewise. (nds32_elf_ifc_calc): Likewise. (nds32_elf_ifc_finish): Likewise. (nds32_elf_ifc_replace): Likewise. (nds32_elf_ifc_reloc): Likewise. 2018-03-14 Alan Modra * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having sfpr size added before defining alias symbols. (ppc64_elf_build_stubs): Add stub section padding before copying sfpr contents and defining save/restore alias symbols. 2018-03-14 H.J. Lu PR ld/20882 * elflink.c (elf_gc_mark_debug_section): Also check the local debug definition section. 2018-03-13 Nick Clifton PR 22113 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean function. Add an end address parameter. Check access of the data pointer to make sure that they do not extend beyond the end address. Return FALSE if any check fails. Add the end address pointer to the ui structure. (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind codes to make sure that they do not extend beyond the end address pointer. Print an error message and return immediately if any check fails. 2018-03-09 Nick Clifton * elf64-s390.c (elf_s390_relocate_section): Move check for relocations against non-allocated sections to before the code that handles ifunc relocations. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat relocs against IFUNC symbols in non-allocated sections as relocs against FUNC symbols. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. 2018-03-08 H.J. Lu PR ld/22929 * elf32-i386.c (elf_i386_relocate_section): Treat relocation against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as relocation against FUNC symbol. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. 2018-03-07 Renlin Li PR ld/20402 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute symbol, and don't emit relocation in specific case. 2018-03-07 Alan Modra * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error. (mips_elf64_slurp_one_reloc_table): Pass on error. 2018-03-03 James Cowgill Maciej W. Rozycki PR ld/21900 * elfxx-mips.c (mips_elf_calculate_relocation): Only return after calling `undefined_symbol' hook if this is an error condition. Assume the value of 0 for the symbol requested otherwise. 2018-03-02 Jim Wilson PR 22903 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch and nop instead of 4. (elfNN_arch64_build_stubs): Add nop after branch. Increase size by 8 instead of 4. 2018-03-01 Jim Wilson PR 22756 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use else if instead of if. 2018-03-01 Alan Modra * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test. 2018-02-28 Alan Modra PR 22887 * aoutx.h (swap_std_reloc_in): Correct r_index bound check. 2018-02-28 Nick Clifton PR 22895 PR 22893 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block pointer. Drop unused abfd parameter. Check the size of the block before initialising the data field. Return the end pointer if the size is invalid. (read_attribute_value): Adjust invocations of read_n_bytes. PR 22894 * dwarf1.c (parse_die): Check the length of form blocks before advancing the data pointer. 2018-02-28 Alan Modra PR 22887 * aoutx.h (translate_symbol_table): Print an error message and set bfd_error on finding an invalid name string offset. 2018-02-27 H.J. Lu * config.in: Regenerated. * configure: Likewise. * configure.ac: Add --enable-separate-code. (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default to 1 for Linux/x86 targets, * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if DEFAULT_LD_Z_SEPARATE_CODE is 1. 2018-02-27 Nick Clifton * aout-cris.c (swap_ext_reloc_out): Standadize error/warning message. * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise. * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise. * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (sh_elf64_info_to_howto): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. PR 22875 * elf-bfd.h (struct elf_backend_data): Change the return type of the elf_info_to_howto and elf_info_to_howto_rel function pointers to bfd_boolean. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed. * elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function. (elf32_h8_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. (riscv_elf_relocate_section): Likewise. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to bfd_boolean. Issue an error message, set an error value and return FALSE if the reloc is not recognized. (elf_hppa_info_to_howto_rel): Likewise. * elf-m10200.c (mn10200_info_to_howto): Likewise. * elf-m10300.c (mn10300_info_to_howto): Likewise. * elf.c (_bfd_elf_no_info_to_howto): Likewise. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-arm.c (elf32_arm_info_to_howto): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-bfin.c (bfin_info_to_howto): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise. * elf32-cris.c (elf_cr16c_info_to_howto_rel) (cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto) (elf32_dlx_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela) (frvfdpic_info_to_howto_rel): Likewise. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise. * elf32-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf32-h8300.c (elf32_h8_info_to_howto) (elf32_h8_info_to_howto_rel): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup) (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68k.c (rtype_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-pru.c (pru_elf32_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-s390.c (elf_s390_info_to_howto): Likewise. * elf32-score.c (s3_bfd_score_info_to_howto) (_bfd_score_info_to_howto): Likewise. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-tic6x.c (elf32_tic6x_info_to_howto) (elf32_tic6x_info_to_howto_rel): Likewise. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel) (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto) (elf32_wasm32_info_to_howto_rela): Likewise. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL. 2018-02-26 Jim Wilson Stephan Schreiber PR 15904 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl call, set changed_contents and changed_relocs. Likewise after successful ia64_elf_relax_br call. 2018-02-26 Alan Modra * elf.c (assign_file_positions_except_relocs): Don't segfault when actual number of phdrs is less than allocated. Delete outdated comment. Formatting. 2018-02-26 Alan Modra * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c, * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c, * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c, * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize error/warning messages. 2018-02-26 Alan Modra * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c, * syms.c: Standardize error/warning messages. 2018-02-26 Alan Modra * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c, * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c, * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c, * peXXigen.c, * peicode.h: Standardize error/warning messages. 2018-02-26 Alan Modra * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages. 2018-02-26 Alan Modra * elfxx-mips.c: Standardize error/warning messages. 2018-02-26 Alan Modra * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c, * elflink.c: Standardize error/warning messages. Replace use of linker callback einfo with _bfd_error_handler when possible. 2018-02-26 Alan Modra * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c, * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize unrecognized/unsupported reloc message. 2018-02-26 Alan Modra * elf32-ppc.c: Standardize error/warning messages. Use _bfd_error_handler rather than einfo when einfo features not used. * elf64-ppc.c: Likewise. 2018-02-23 Alan Modra PR 22881 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO segment if no matching LOAD segment. 2018-02-23 Kuan-Lin Chen * elf32-nds32.h: Define mask for ict_model. 2018-02-20 Jason Duerstock * elfnn-ia64.c (elf_backend_can_gc_sections): Enable. 2018-02-19 Maciej W. Rozycki Revert 2018-01-12 Vlad Ivanov * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. 2018-02-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and `.MIPS.abiflags' sections. (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo' section's end. 2018-02-19 Maciej W. Rozycki * section.c (SEC_FIXED_SIZE): New macro. * bfd-in2.h: Regenerate. 2018-02-19 Maciej W. Rozycki * section.c (SEC_HAS_GOT_REF): Remove macro. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler arguments. * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise. * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise. (_bfd_riscv_relax_pc): Likewise and fix typos. * libbfd-in.h (_bfd_error_handler): Add attribute printf. * libbfd.h: Regenerate. 2018-02-19 Alan Modra * dwarf2.c (read_section): Don't use 'll' format modifier. (find_abstract_instance): Likewise. * elfcore.h (elf_core_file_p): Likewise. 2018-02-19 Alan Modra * bfd-in.h: Include inttypes.h or if not available define PRId64, PRIu64 and PRIx64. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L modifier to print bfd_vma. * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c, * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64, and cast input to uint64_t, and similarly for Ld and Lu. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c, * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * reloc.c: Replace use of %R and %T in format strings passed to einfo and friends by %pR and %pT. 2018-02-19 Alan Modra * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. 2018-02-19 Alan Modra PR 22845 * elf.c (IS_TBSS): Define. (_bfd_elf_map_sections_to_segments): Use IS_TBSS. (assign_file_positions_for_non_load_sections): Revert last change. Properly calculate load segment limits to compare against relro limits. 2018-02-17 Alan Modra PR 22845 * elf.c (assign_file_positions_for_non_load_sections): Ignore degenerate zero size PT_LOAD segments when finding one overlapping the PT_GNU_RELRO segment. 2018-02-16 Alan Modra * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false. (_bfd_bool_bfd_true): Rename from bfd_true. (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr. (_bfd_int_bfd_0): Rename from bfd_0. (_bfd_uint_bfd_0): Rename from bfd_0u. (_bfd_long_bfd_0): Rename from bfd_0l. (_bfd_long_bfd_n1_error): Rename from _bfd_n1. (_bfd_void_bfd): Rename from bfd_void. (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false), (_bfd_bool_bfd_link_false_error), (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true), (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true), (_bfd_bool_bfd_asection_bfd_asection_true), (_bfd_bool_bfd_asymbol_bfd_asymbol_true), (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions. * archive.c (_bfd_noarchive_get_elt_at_index), (_bfd_noarchive_openr_next_archived_file), (_bfd_noarchive_construct_extended_name_table), (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname), (_bfd_noarchive_write_armap): New functions. * archures.c (_bfd_nowrite_set_arch_mach): New function. * coff-alpha.c (alpha_ecoff_swap_coff_aux_in), (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in), (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out), (alpha_ecoff_swap_coff_lineno_out), (alpha_ecoff_swap_coff_reloc_out): New functions. * coff-mips.c (mips_ecoff_swap_coff_aux_in), (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in), (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out), (mips_ecoff_swap_coff_lineno_out), (mips_ecoff_swap_coff_reloc_out): New functions. * coffcode.h (coff_set_alignment_hook): Replace define with new function. (symname_in_debug_hook): Likewise. * ecoff.c (_bfd_ecoff_set_alignment_hook): New function. * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0. * elf.c (assign_file_positions_except_relocs): Test elf_backend_allow_non_load_phdr for NULL. * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from _bfd_elf_link_omit_section_dynsym. Update uses. (_bfd_elf_omit_section_dynsym_all): New function. * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete. (_bfd_elf_omit_section_dynsym_default): Declare. (_bfd_elf_omit_section_dynsym_all): Declare. * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section), (_bfd_nolink_bfd_get_relocated_section_contents), (_bfd_nolink_bfd_lookup_section_flags), (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group), (_bfd_nolink_bfd_link_hash_table_create), (_bfd_nolink_bfd_link_just_syms), (_bfd_nolink_bfd_copy_link_hash_symbol_type), (_bfd_nolink_bfd_link_split_section), (_bfd_nolink_section_already_linked), (_bfd_nolink_bfd_define_common_symbol), (_bfd_nolink_bfd_define_start_stop): New functions. * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup), (_bfd_norelocs_bfd_reloc_name_lookup), (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions. * section.c (_bfd_nowrite_set_section_contents): New function. * syms.c (_bfd_nosymbols_canonicalize_symtab), (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info), (_bfd_nosymbols_get_symbol_version_string), (_bfd_nosymbols_bfd_is_local_label_name), (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line), (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info), (_bfd_nosymbols_bfd_make_debug_symbol), ( _bfd_nosymbols_read_minisymbols), ( _bfd_nosymbols_minisymbol_to_symbol), (_bfd_nodynamic_get_synthetic_symtab): New functions. * libbfd-in.h: Declare new functions. Update existing defines, removing casts. * aix386-core.c: Update to use new hooks. Formatting. * aout-adobe.c: Likewise. * aout-arm.c: Likewise. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * bout.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-i860.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic30.c: Likewise. * coff-tic54x.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. d229 4 a232 710 * elf-m10300.c: Likewise. * elf32-cr16.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32r.c: Likewise. * elf32-metag.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-target.h: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.h: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * libaout.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mipsbsd.c: Likewise. * mmo.c: Likewise. * netbsd-core.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * osf-core.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * pe-x86_64.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * sco5-core.c: Likewise. * som.c: Likewise. * sparclynx.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * trad-core.c: Likewise. * verilog.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * libbfd.h: Regenerate. 2018-02-15 Jim Wilson * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore symbols whose section address is zero. * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous when pcrel_lo reloc has an addend. Use reloc_dangerous callback for bfd_reloc_dangerous. Use einfo instead of warning callback for errors. Add %X%P to error messages. 2018-02-15 Eric Botcazou PR ld/22832 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup and assert that the result of the call is not NULL. 2018-02-14 Nick Clifton PR 22823 Revert previous delta. Add extra casts to avoid compile time warnings instead. * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra cast to avoid warning from gcc v8 compiler. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): Delete. (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete. (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Add extra cast to avoid warning from gcc v8 compiler. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. 2018-02-14 H.J. Lu PR ld/22842 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for R_X86_64_PC32 reloc against dynamic function in data section. Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc against dynamic function in data section. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as function address only if pcrel_plt is true. (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt. * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for PC-relative PLT. If PLT is PC-relative, don't generate dynamic PC-relative relocation against a function definition in data secton in PIE. Remove the obsolete comments. (elf_x86_link_hash_table): Add pcrel_plt. 2018-02-13 H.J. Lu * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll, instead of bfd_link_pic, for building shared library. 2018-02-13 H.J. Lu PR gas/22791 * elf64-x86-64.c (is_32bit_relative_branch): Removed. (elf_x86_64_relocate_section): Check PIC relocations in PIE. Remove is_32bit_relative_branch usage. Disallow PC32 reloc against protected function in shared object. 2018-02-13 Sergei Trofimovich PR 22828 * po/ru.po: Fix typo in Russian translation. 2018-02-13 Maciej W. Rozycki * wasm-module.c (wasm_scan_name_function_section): Rename `index' local variable to `idx'. 2018-02-13 Nick Clifton PR 22823 Fix compile time warnings generated by gcc version 8. * libbfd-in.h: Remove extraneous text from prototypes. Add prototypes for bfd_false_any, bfd_true_any, bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any, bfd_n1_any, bfd_void_any. (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy function. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): New function. Like bfd_false but accepts one or more arguments. (bfd_true_any): Likewise. (bfd_nullvoidptr_any): Likewise. (bfd_0_any): Likewise. (bfd_0u_any): Likewise. (bfd_0l_any): Likewise. (_bfd_n1_any): Likewise. (bfd_void_any): Likewise. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg based dummy function. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. * elf32-arc.c (get_replace_function): Assign replacement function to func pointer. * elf32-i370.c (i370_noop): Update prototype. 2018-02-13 Alan Modra PR 22836 * elf.c (_bfd_elf_fixup_group_sections): Account for removed relocation sections. If size reduces to just the flag word, remove that too and mark with SEC_EXCLUDE. * elflink.c (bfd_elf_final_link): Strip empty group sections. 2018-02-13 Alan Modra PR 22829 * elf.c (assign_file_positions_for_non_load_sections): Rewrite PT_GNU_RELRO setup. 2018-02-12 Zebediah Figura * 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-12 Nick Clifton * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant assignment. * elf32-arc.c (elf_arc_relocate_section): Likewise. 2018-02-09 Eric Botcazou * 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) : If relocation is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation. : Adjust comments. : 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-09 H.J. Lu * 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-08 H.J. Lu * 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-08 H.J. Lu * 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-08 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous change. 2018-02-08 Nick Clifton PR 22788 * elf.c (elf_parse_notes): Reject notes with excessuively large alignments. 2018-02-07 Alan Modra Revert 2018-01-17 Alan Modra * elf32-ppc.c: Remove speculation barrier support. * elf32-ppc.h: Likewise. * elf64-ppc.c: Likewise. * elf64-ppc.h: Likewise. 2018-02-06 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used callback to report an error. 2018-02-06 Eric Botcazou PR ld/22263 * 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. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Remove useless code, tidy and merge related blocks. : Turn call to bfd_link_pic into call to !bfd_link_executable. : 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. : Merge into... : ...this. Adjust 4th argument in call to sparc_elf_tls_transition and remove redundant code. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. : Likewise. : Likewise. 2018-02-06 Miloš Stojanović 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-06 Sergio Durigan Junior * coff-rs6000.c (xcoff_write_archive_contents_old): Use 'memcpy' instead of 'strncpy' when writing the magic number. 2018-02-06 Nick Clifton 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-06 Paul Carroll * bfd/dwarf2.c (find_abstract_name): Modified to return file and line information in addition to name, if they can be found. 2018-02-05 Renlin Li 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. 2018-02-05 H.J. Lu 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. 2018-02-05 Maciej W. Rozycki * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to initialize `hi_reloc'. 2018-02-05 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_section_processing): For SHT_MIPS_REGINFO sections don't assert the correct size and report an error instead. 2018-02-05 Maciej W. Rozycki * elf.c (_bfd_elf_write_object_contents): Propagate a failure status from `->elf_backend_section_processing'. 2018-02-02 Jim Wilson 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-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops emitted for toc sequence optimization. Set and use "howto" later. 2018-02-01 Simon Marchi * 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. 2018-01-31 Michael Matz * elflink.c (bfd_elf_define_start_stop): Fix check of def_dynamic. 2018-01-31 H.J. Lu PR ld/21964 * elflink.c (bfd_elf_define_start_stop): Check if __start and __stop symbols are referenced by shared objects. 2018-01-30 Alan Modra 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-30 Alan Modra * elflink.c (bfd_elf_define_start_stop): Make __start and __stop symbols dynamic. 2018-01-29 Alan Modra PR 22741 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in range before converting to a symbol table pointer. 2018-01-27 Nick Clifton * po/ru.po: Updated Russian translation. 2018-01-26 Alan Modra * elflink.c (bfd_elf_define_start_stop): Override symbols when they are defined dynamically. 2018-01-26 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when .branch_lt changes size. 2018-01-25 Alan Modra PR 22746 * elfcode.h (elf_object_p): Avoid integer overflow. 2018-01-25 Eric Botcazou PR ld/22727 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Do a mere lookup of the __tls_get_addr symbol instead of adding it. Revert 2017-10-19 H.J. Lu PR ld/22263 * elfxx-sparc.c (sparc_elf_tls_transition): Replace bfd_link_pic with !bfd_link_executable, !bfd_link_pic with bfd_link_executable for TLS check. (_bfd_sparc_elf_check_relocs): Likewise. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. 2018-01-24 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2018-01-24 Renlin Li * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. d236 1 a236 159 2018-01-23 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale `mips_elf32_section_processing' comment reference. 2018-01-20 H.J. Lu PR ld/22721 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the versioned __tls_get_addr symbol. 2018-01-19 Nick Clifton * po/fr.po: Updated French translation. 2018-01-18 Alan Modra * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink. * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align. (ppc64_elf_build_stubs): Likewise. 2018-01-17 Nick Clifton * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. 2018-01-17 Alan Modra * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. 2018-01-17 Alan Modra * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier. (CRSETEQ, BEQCTRM): Define. (is_nonpic_glink_stub): Don't check bctr. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (ppc_elf_relax_section): Size speculation barrier. (output_bctr): New function. (write_glink_stub): Use output_bctr. (ppc_elf_relocate_section): Use output_bctr for long branch stub. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Use output_bctr. * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps. * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define. (GLINK_PLTRESOLVE_SIZE): Size speculation barrier. (size_global_entry_stubs): Handle speculation barrier sizing. (plt_stub_size): Likewise. (output_bctr): New function. (build_plt_stub, build_tls_get_addr_stub): Output speculation barrier. (ppc_build_one_stub): Likewise for ppc_stub_plt_branch. (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch. (build_global_entry_stubs): Output speculation barrier. (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub. * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps. 2018-01-17 Alan Modra * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle __tls_get_addr_opt, and alignment sizing. (TLS_GET_ADDR_GLINK_SIZE): Delete. (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE. (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6, or 8 insns. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE. (ppc_elf_size_dynamic_sections): Likewise. Size branch table by PLT reloc count. (write_glink_stub): Handle __tls_get_addr_opt stub. Pad out to size given by GLINK_ENTRY_SIZE. (ppc_elf_relocate_section): Adjust write_glink_stub call. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Write PLTresolve without using insn array since so many need rewriting. * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align. * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without nops. Adjust all uses. (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE in glink_vma calculation. (struct ppc_link_hash_table): Add global_entry section pointer. (create_linkage_sections): Create separate section for global entry stubs. (PPC_LO, PPC_HI, PPC_HA): Move earlier. (size_global_entry_stubs): Handle sizing for aligned stubs. (ppc64_elf_size_dynamic_sections): Handle global_entry alloc, and don't stash end of glink branch table in rawsize. (ppc_build_one_stub): Rewrite stub size calculations. (build_global_entry_stubs): Use new section. (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops. Build lazy link stubs out to end of section. Build global entry stubs in new section. 2018-01-15 Nick Clifton * po/uk.po: Updated Ukranian translation. 2018-01-13 Nick Clifton * po/bfd.pot: Regenerated. 2018-01-13 Nick Clifton * version.m4: Bump version to 2.30.51 * configure: Regenerate. 2018-01-13 Nick Clifton 2.30 branch created. 2018-01-12 Jens Widell * elf.c (setup_group): Optimize search for group by remembering last found group and restarting search at that index. * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field. 2018-01-12 Gunther Nikl * aoutx.h (aout_link_check_ar_symbols): Remove default and handle bfd_link_common_skip_none in switch. 2018-01-12 Alan Modra PR ld/22649 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic references on forced local symbols. 2018-01-12 Vlad Ivanov * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. 2018-01-11 H.J. Lu PR ld/22393 * elf.c (_bfd_elf_map_sections_to_segments): When generating separate code and read-only data LOAD segments, create a new LOAD segment if the previous section contains text and the current section doesn't or vice versa. Don't put a writable section in a read-only segment if there is a RELRO segment. 2018-01-11 H.J. Lu PR ld/22649 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic references on forced local symbols. 2018-01-11 H.J. Lu PR ld/22677 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY, INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section. 2018-01-09 Kuan-Lin Chen PR 22662 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error. 2018-01-03 John Baldwin d238 3 a240 3 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and NT_FREEBSD_PROCSTAT_VMMAP. d242 1 a242 1 2018-01-03 Alan Modra d246 1 a246 1 For older changes see ChangeLog-2017 d248 1 a248 1 Copyright (C) 2018 Free Software Foundation, Inc. @ 1.11 log @merge conflicts @ text @d1 8 @ 1.11.2.1 log @Pull up following revision(s) (requested by rjs in ticket #182): external/gpl3/binutils/dist/include/ChangeLog: revision 1.2 external/gpl3/binutils/dist/bfd/elf32-arm.c: revision 1.15 external/gpl3/binutils/dist/include/elf/arm.h: revision 1.2 external/gpl3/binutils/dist/bfd/ChangeLog: revision 1.12 Fix to PR port-arm/54159. From: http://mail-index.netbsd.org/tech-toolchain/2019/08/26/msg003596.html Pullup -9 @ text @a0 8 2019-08-22 Alan Modra * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL, instead recognize CMSE_PREFIX in symbol name. (elf32_arm_gc_mark_extra_sections): Likewise. (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL. (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL. @ 1.10 log @- merge conflicts for 2.30 - bump libraries - regen for x86 @ text @d1 14 a14 1 2018-01-27 Nick Clifton d16 1 a16 1 This is the 2.30 release: d18 2 a19 1 * version.m4 (BFD_VERSION): Set to 2.30 d24 3053 d3083 5 d3091 5 d3113 23 a3135 1 2018-01-23 Nick Clifton d3137 4 a3140 2 * version.m4: Reset version number to 2.29.90. * configure: Regenerate. d3158 10 a3167 1 2018-01-18 Alan Modra d3193 1 a3193 5 2018-01-18 Alan Modra * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. 2018-01-18 Alan Modra d3230 1 a3230 1 2018-01-17 Nick Clifton d3232 1 a3232 2 * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. d3234 1 a3234 1 2018-01-15 Nick Clifton d3236 1 a3236 1 * po/uk.po: Updated Ukranian translation. d3240 1 a3240 1 * version.m4 (BFD_VERSION): Change to 2.30.0. a3241 1 * po/bfd.pot: Regenerate. d3290 1 a3290 1 2017-09-27 Kuan-Lin Chen @ 1.10.2.1 log @Sync with HEAD @ text @d1 1 a1 14 2018-07-18 Nick Clifton 2.31.1 Release point. * version.m4: Set to 2.31.1 * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. 2018-07-14 Nick Clifton * version.m4: Update to 2.31.0. * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. d3 1 a3 1 2018-07-14 Nick Clifton d5 1 a5 2 2.31 Release point. * version.m4: Update to 2.31. a9 3053 2018-07-03 Alan Modra PR 17550 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols in discarded sections. 2018-07-11 Max Filippov * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate space for dynamic relocation for undefined weak symbol. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE relocation for undefined weak symbols. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation section for relocations against undefined weak symbols. 2018-07-10 Maciej W. Rozycki * elflink.c (bfd_elf_final_link): Rename `remove' local variable to `remove_section'. 2018-07-09 H.J. Lu PR ld/23388 * configure.ac: Use changequote for "i[3-7]86-*-linux-*". * configure: Regenerated. 2018-07-09 H.J. Lu PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. 2018-07-06 Alan Modra * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. 2018-07-05 Jim Wilson * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*. (riscv64*-*-*): Likewise. (riscv-*-*): Add as an alias for riscv32*-*-*. 2018-07-05 Alan Modra * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error on mismatch. Remove "warning: " from messages. Track last bfd used to set tags. (ppc_elf_merge_obj_attributes): Likewise. Handle status from _bfd_elf_ppc_merge_fp_attributes. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status from _bfd_elf_ppc_merge_fp_attributes. 2018-07-03 Alan Modra * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes sections. 2018-07-03 Alan Modra * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define. * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding incompatible attribute. (ppc_elf_merge_obj_attributes): Likewise. Return _bfd_elf_merge_object_attributes result. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return _bfd_elf_merge_object_attributes result. 2018-07-05 Nick Clifton * po/ru.po: Updated Russian translation. 2018-07-04 H.J. Lu * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h. * Makefile.in: Regenerated. 2018-07-04 H.J. Lu PR ld/23324 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the R_X86_64_converted_reloc_bit bit. 2018-06-26 Nick Clifton * po/uk.po: Updated Ukranian translation. 2018-06-25 Nick Clifton * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check for malloc returning NULL. (_bfd_aarch64_erratum_843419_fixup): Check for _bfd_aarch64_erratum_835769_stub_name returning NULL. 2018-06-24 Nick Clifton * version.m4 (BFD_VERSION): Update to 2.30.90. * configure: Regenerate. * po/bfd.pot: Regenerate. 2018-06-24 Nick Clifton 2.31 branch created. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding) (_bfd_mips_elf_cant_unwind_opcode): Correct formatting. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_post_process_headers): Keep EI_ABIVERSION setting together. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT) (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64) (MIPS_LIBC_ABI_MAX): New enumeration constants. (_bfd_mips_post_process_headers): Use them in place of magic numbers. 2018-06-21 Jim Wilson * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment. Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset. 2018-06-21 Alan Modra * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign". * doc/Makefile.in: Regenerate. 2018-06-20 Renlin Li * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. 2018-06-20 Nick Clifton PR 23316 * opncls.c (get_build_id): Check for a negative or excessive data size in the build-id note. 2018-06-20 Nick Clifton PR 23299 * mach-o.c (cputype): New function. (cpusubtype): New function. (bfd_mach_o_bfd_print_private_data): New function. Dispalys the values in the MACH-O file header. (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and cpusubtype fields from the input bfd's mach-o header to the output bfd. * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Redefine to bfd_mach_o_bfd_print_private_data. * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype. 2018-06-19 Maciej W. Rozycki PR ld/22966 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the `.got.plt' entry referred is in range. (mips_finish_exec_plt): Correct the range check for `.got.plt' start. Replace the assertion used for that with a proper error message. 2018-06-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix formatting. 2018-06-19 Simon Marchi * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. (INCLUDES): Rename to ... (AM_CPPFLAGS): ... this. * configure.ac: Remove AC_PREREQ. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add info-in-builddir no-texinfo.tex. (info_TEXINFOS): Rename bfd.texinfo to bfd.texi. * doc/bfd.texinfo: Rename to ... * doc/bfd.texi: ... this. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. 2018-06-18 Mephi PR 23297 * mach-o-x86-64.c (x86_64_howto_table): Add entry for BFD_RELOC_MACH_O_X86_64_RELOC_TLV. (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc. (bfd_mach_o_x86_64_swap_reloc_out): Likewise. * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-06-14 Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add GINV extension. 2018-06-14 H.J. Lu PR binutils/23267 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first symbol version is base version. 2018-06-14 Alan Modra * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs". * elflink.c (_bfd_elf_init_2_index_sections): Comment fix. (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs". (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when "dynamic_relocs" is not set. * elfxx-mips.c (count_section_dynsyms): Likewise. 2018-06-14 Alan Modra PR 23282 * bfdio.c (bfd_seek): Optimize away seeks to current position. 2018-06-13 Scott Egerton Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add CRC. 2018-06-08 H.J. Lu PR ld/23161 * elfxx-x86.c (elf_x86_hide_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to hide hidden __bss_start, _end and _edata in shared libraries. 2018-06-07 Alan Modra * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs. 2018-06-05 Alan Modra * bfd.c (struct bfd): Update comment on "where" usage. * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec", "iostream", and "where" from containing archive file. Return error on NULL iovec. (bfd_bread): Similarly, and return error attempted out of bounds archive element access. (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and "where" from containing archive file. (bfd_seek): Likewise. Return error on NULL iovec. Don't attempt to optimize away seeks. Don't paper over errors by calling bfd_tell. (bfd_get_mtime): Call bfd_stat rather than iovec->bstat. (bfd_get_size): Likewise. (bfd_mmap): Operate on and use iovec of containing archive file. Return error on NULL iovec. * cache.c (bfd_cache_lookup_worker): Abort if working on archive element bfd. (cache_bread_1): Delete bfd parameter, add FILE* parameter. Don't ignore zero byte reads. (cache_bread): Look up FILE* in cache here. Error on NULL lookup. (cache_bwrite): Rename "where" to "from". (cache_bmmap): Don't handle archive elements. * coffcode.h (coff_slurp_line_table): Exit early on zero lineno count. * bfd-in2.h: Regenerate. 2018-06-05 Alan Modra PR 23254 * plugin.c (bfd_plugin_open_input): Allow for possibility of nested archives. Open file again for plugin. (try_claim): Don't save and restore file position. Close file if not claimed. * sysdep.h (O_BINARY): Define. 2018-06-04 Max Filippov * elf32-xtensa.c (xtensa_read_table_entries): Make global. (compute_fill_extra_space): Drop declaration. Rename function to xtensa_compute_fill_extra_space. (compute_ebb_actions, remove_dead_literal): Update references to compute_fill_extra_space. 2018-06-04 Volodymyr Arbatov * elf32-xtensa.c (elf32xtensa_separate_props): New global variable. (xtensa_add_names): New function. (xtensa_property_section_name): Add new parameter separate_sections, use it to choose property section name. (xtensa_get_separate_property_section): New function. (xtensa_get_property_section): Invoke xtensa_get_separate_property_section to get individual property section if it exists, common property section otherwise. (xtensa_make_property_section): Pass elf32xtensa_separate_props to xtensa_property_section_name. 2018-06-04 H.J. Lu PR binutils/23146 * bfd-in.h: Include "diagnostics.h". * bfd-in2.h: Regenerated. * elf32-arm.c (elf32_arm_nabi_write_core_note): Use DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and DIAGNOSTIC_POP to silence GCC 8.1 warnings with -Wstringop-truncation. * elf32-ppc.c (ppc_elf_write_core_note): Likewse. * elf32-s390.c (elf_s390_write_core_note): Likewse. * elf64-ppc.c (ppc64_elf_write_core_note): Likewse. * elf64-s390.c (elf_s390_write_core_note): Likewse. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse. 2018-06-03 Jim Wilson PR ld/23244 * elfnn-riscv.c (riscv_elf_relocate_section) : Check for and handle an undefined weak with no PLT. PR ld/22756 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check to code that ignores duplicate symbols. 2018-06-01 H.J. Lu * version.m4: Bump version to 2.30.52 * configure: Regenerated. 2018-06-01 Alan Modra * bfd.c (_bfd_error_handler): Arrange for this function to be declared in bfd-in2.h. * libbfd-in.h (_bfd_error_handler): Don't declare. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-30 Amaan Cheval * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems* This is needed to generate UEFI application image files from ELFs. 2018-05-28 H.J. Lu * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_i386_lazy_ibt_plt): Likewise. (elf_i386_nacl_plt): Likewise. * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ... (elf_x86_64_tlsdesc_plt_entry): This. (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_x86_64_lazy_bnd_plt): Likewise. (elf_x86_64_lazy_ibt_plt): Likewise. (elf_x32_lazy_ibt_plt): Likewise. (elf_x86_64_nacl_plt): Likewise. (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end to update TLSDESC entry. * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments. Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end. (elf_x86_non_lazy_plt_layout): Update comments. (elf_x86_plt_layout): Likewise. 2018-05-28 H.J. Lu PR ld/23238 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-s390.c (elf_backend_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf64-s390.c (elf_backend_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC handling. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elflink.c (elf_link_add_object_symbols): Set elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols. 2018-05-26 H.J. Lu PR ld/23194 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New. * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function. Extracted from _bfd_elf_link_assign_sym_version. (_bfd_elf_link_hide_sym_by_version): New function. (_bfd_elf_link_assign_sym_version): Use _bfd_elf_link_hide_versioned_symbol. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call _bfd_elf_link_hide_sym_by_version instead of bfd_hide_sym_by_version. Don't check unversioned symbol. 2018-05-25 Alan Modra * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-05-25 Alan Modra * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS. * configure: Regenerate. 2018-05-23 H.J. Lu * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING to data. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec is NULL. (elf32_hppa_size_stubs): Only create stubs for load, alloc, code sections. (final_link_relocate): Revert last change. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (final_link_relocate): Don't look for plt call stubs in non-alloc sections. 2018-05-21 H.J. Lu PR ld/23201 * aout-target.h (MY_bfd_link_hide_symbol): New. * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise. * binary.c (binary_bfd_link_hide_symbol): Likewise. * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise. * coffcode.h (coff_bfd_link_hide_symbol): Likewise. * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise. * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise. * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise. * ihex.c (ihex_bfd_link_hide_symbol): Likewise. * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise. * linker.c (_bfd_generic_link_hide_symbol): Likewise. (bfd_link_hide_symbol): Likewise. * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise. * mmo.c (mmo_bfd_link_hide_symbol): Likewise. * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise. * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise. * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise. * som.c (som_bfd_link_hide_symbol): Likewise. * srec.c (srec_bfd_link_hide_symbol): Likewise. * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise. * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise. (alpha_vms_bfd_link_hide_symbol): Likewise. * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise. * coff64-rs6000.c (rs6000_xcoff64_vec): Add _bfd_generic_link_hide_symbol. (rs6000_xcoff64_aix_vec): Likewise. * elflink.c (bfd_elf_record_link_assignment): Don't make forced local symbol dynamic. (_bfd_elf_link_hide_symbol): New function. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't check root.ldscript_def. * targets.c (bfd_target): Add _bfd_link_hide_symbol. (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. 2018-05-21 H.J. Lu PR binutils/23199 * elf.c (setup_group): Mark section in a section group with SHF_GROUP. 2018-05-18 H.J. Lu PR ld/23194 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 if a symbol is versioned and there is a version script. 2018-05-18 Kito Cheng * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle EF_RISCV_RVE. 2018-05-18 Jim Wilson * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_relocate_section): Don't generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_finish_dynamic_symbol): Likewise. 2018-05-18 John Darrington * Makefile.am: Add s12z files. * Makefile.in: Regenerate. * archures.c: Add bfd_s12z_arch. * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24. * bfd-in2.h: Regenerate. * config.bfd: Add s12z target. * configure.ac: Add s12z target. * configure: Regenerate. * cpu-s12z.c: New file. * elf32-s12z.c: New file. * libbfd.c (bfd_putb24): New function. (bfd_putl24): New function. * libbfd.h: Regenerate. * reloc.c: Add s12z relocations. (bfd_get_reloc_size): Handle size 5 relocs. * targets.c: Add s12z_elf32_vec. 2018-05-18 H.J. Lu PR ld/23189 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X like R_386_GOT32. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 for linker defined symbols. 2018-05-18 Alan Modra PR 23199 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries don't point at other SHT_GROUP sections. Set shdr corresponding to invalid entry, to NULL rather than section 0. Identify SHT_GROUP section index when reporting an error. Cope with NULL shdr pointer. 2018-05-18 Alan Modra * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout. * configure.ac (HAVE_HIDDEN): Check compiler support for hidden visibility. * libbfd.h: Regenerate. * configure: Regenerate. * config.in: Regenerate. 2018-05-18 Alan Modra * libbfd-in.h: Add include guard. * libcoff-in.h: Likewise. * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif. * doc/Makefile.in: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. 2018-05-16 Maciej W. Rozycki * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'. 2018-05-16 Alan Modra PR 22458 * format.c (struct bfd_preserve): Add section_id. (bfd_preserve_save, bfd_preserve_restore): Save and restore _bfd_section_id. (bfd_reinit): Set _bfd_section_id. (bfd_check_format_matches): Put all matches of any priority into matching_vector. Save initial section id and start each attempted match at that section id. * libbfd-in.h (_bfd_section_id): Declare. * section.c (_bfd_section_id): Rename from section_id and make global. Adjust uses. (bfd_get_next_section_id): Delete. * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of bfd_get_section_id with _bfd_section_id. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-15 Christophe Guillon * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields of the aux structure are initialised. 2018-05-15 Francois H. Theron * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef. 2018-05-15 Nick Clifton * po/pt.po: New Portuguese translation. * configure.ac (ALL_LINGUAS): Add pt. * configure: Regenerate. 2018-05-14 H.J. Lu PR ld/23169 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue an error on IFUNC pointer defined in PDE. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call _bfd_x86_elf_link_fixup_ifunc_symbol. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New function. * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New. 2018-05-14 H.J. Lu PR ld/23162 * elfxx-x86.c (elf_x86_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start, _end and _edata locally defined within executables. 2018-05-12 Alan Modra PR 20659 * elf.c (rewrite_elf_program_header): Use segment_mark only for PT_LOAD headers. Delete first_matching_lma and first_suggested_lma. Instead make matching_lma and suggested_lma pointers to the sections. Align section vma and lma calculated from segment. Don't clear includes_phdrs or includes_filehdr based on p_paddr test. Try to handle alignment padding before first section by adjusting new segment lma down. Adjust PT_PHDR map p_paddr. 2018-05-09 Dimitar Dimitrov * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation conformant to TI ABI. (pru_elf32_relax_section): Likewise. (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend. (pru_elf32_pmem_relocate): Trap - should not get here. (pru_elf32_relocate_section): Add support for REL relocations. (elf_info_to_howto_rel): Enable REL. (elf_backend_may_use_rel_p): Likewise. (elf_backend_may_use_rela_p): Likewise. (elf_backend_default_use_rela_p): Likewise. 2018-05-09 Alan Modra PR 23148 * peXXigen.c (pe_print_edata): Correct minimum size. 2018-05-09 Alan Modra PR 23147 * peXXigen.c (pe_print_idata): Bound check hint_addr. 2018-05-08 Nick Clifton PR 22809 * elf.c (bfd_elf_get_str_section): Check for an excessively large string section. * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the attribute section is larger than the size of the file. 2018-05-07 Alan Modra * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than strncmp when checking for ".bf" special symbol. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags section name a char array, remove sentinal known_sections entry, and adjust loop over known_sections to suit. Use memcmp rather than strncmp. 2018-05-04 Alan Modra * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32), (struct elf_external_linux_prpsinfo32_ugid16), (struct elf_external_linux_prpsinfo64_ugid32), (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas. Move comment to.. * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor directives. * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING to data. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic pragmas. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid false positive gcc-8 warning. * cofflink.c (_bfd_coff_link_input_bfd): Likewise. 2018-05-04 Tulio Magno Quites Machado Filho * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order of arguments when warning about different long double types. 2018-05-03 Simon Atanasyan * elf32-mips.c: (elf32_mips_fixup_symbol): New function. (elf_backend_fixup_symbol): New macro. * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp handling. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. 2018-04-30 Francois H. Theron * Makefile.am: Added NFP files to build. * archures.c: Added bfd_arch_nfp * config.bfd: Added NFP support. * configure.ac: Added NFP support. * cpu-nfp.c: New, for NFP support. * elf-bfd.h: Added elf_section_info() * elf64-nfp.c: New, for NFP support. * po/SRC-POTFILES.in: Added NFP source files. * targets.c: Added nfp_elf64_vec * bfd-in2.h: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. 2018-04-27 Alan Modra * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-04-27 Alan Modra PR 23123 PR 22374 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt relocs for ifuncs. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes. 2018-04-26 Pedro Alves * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider ifunc and non-ifunc symbols duplicates. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New. (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. (elf32_arm_output_arch_local_syms): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle _GLOBAL_OFFSET_TABLE_ in FDPIC mode. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (DEFAULT_STACK_SIZE): New. (elf32_arm_always_size_sections): Create stack segment. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC) (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New relocations. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations. (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC. (struct elf32_arm_link_hash_table): Update comment. (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations. (IS_ARM_TLS_RELOC): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Update comment. * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC, BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_plt_entry): New. (elf32_arm_create_dynamic_sections): Handle FDPIC. (elf32_arm_allocate_plt_entry): Likewise. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (struct fdpic_local): New. (elf_arm_obj_tdata): Add local_fdpic_cnts field. (elf32_arm_local_fdpic_cnts): New. (struct fdpic_global): New. (elf32_arm_link_hash_entry): Add fdpic_cnts field. (elf32_arm_link_hash_table): Add srofixup field. (arm_elf_add_rofixup): New. (arm_elf_fill_funcdesc): New. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts. (elf32_arm_allocate_local_sym_info): Likewise. (create_got_section): Create .rofixup section. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts. (bfd_elf32_arm_set_target_params): Handle FDPIC. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. (elf32_arm_fdpic_omit_section_dynsym): New. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC) (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC) (BFD_RELOC_ARM_FUNCDESC_VALUE): New. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE. (elf32_arm_howto_from_type): Take new members of elf32_arm_howto_table_2 into account. (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_print_private_bfd_data): Support EF_ARM_PIC and ELFOSABI_ARM_FDPIC. (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC. (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. Accept arm*-*-uclinuxfdpiceabi. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. 2018-04-25 Alan Modra * elf-linux-core.h: Disable gcc-8 string truncation warning. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-25 Alan Modra * Makefile.am: Remove arm-aout and arm-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-arm.c: Delete. * armnetbsd.c: Delete. * riscix.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-24 Nick Clifton PR 23113 * elf.c (ignore_section_sym): Check for the output_section pointer being NULL before dereferencing it. PR 23110 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for a negative PE_DEBUG_DATA size before iterating over the debug data. 2018-04-23 Alan Modra * elf-linux-core.h: Revert last change. * elf.c: Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-23 Alan Modra * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable gcc-8 string truncation warning. (swap_linux_prpsinfo32_ugid16_out): Likewise. (swap_linux_prpsinfo64_ugid32_out): Likewise. (swap_linux_prpsinfo64_ugid16_out): Likewise. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-20 Alan Modra PR 22978 * elf32-hppa.c (got_relocs_needed): Add extra param to special case both dtprel and tprel relocs. (allocate_dynrelocs): Adjust conditions for got relocs. (elf32_hppa_relocate_section): Likewise for local sym got relocs. Emit dynamic relocs on TLS GOT entries for shared libraries, not when pic. Omit dynamic reloc on dtprel entry when local, and on tprel entry when local and executable. 2018-04-19 Alan Modra PR 22537 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1. (hppa_type_of_stub): Don't return a long branch stub for symbols other than those defined statically. 2018-04-19 Alan Modra * Makefile.am: Revert 2018-04-18 coff-mips changes. * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec to selvecs for mips targets change 2018-04-18. * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec and mips_ecoff_bele_vec. * targets.c: Likewise. * coff-mips.c: Resurrect. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-18 Alan Modra * Makefile.am: Remove mips aout and coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-mips.c: Delete * mipsbsd.c: Delete * pe-mips.c: Delete * pei-mips.c: Delete * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 H.J. Lu * elf32-i386.c (elf32_bed): Define before including "elf32-target.h". * elf64-x86-64.c (elf64_bed): Define before including "elf64-target.h". (elf32_bed): Define before including "elf32-target.h". 2018-04-17 H.J. Lu PR ld/23055 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a normal input file with compatible relocation. 2018-04-18 Alan Modra * Makefile.am: Remove support for assorted i386 aout and coff targets. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * targets.c: Likewise. * freebsd.h: Delete. * i386dynix.c: Delete. * i386freebsd.c: Delete. * i386linux.c: Delete. * i386mach3.c: Delete. * i386netbsd.c: Delete. * i386os9k.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 Andrew Sadek Microblaze Target: PIC data text relative * bfd/reloc.c (2 new BFD relocations): BFD_RELOC_MICROBLAZE_64_TEXTPCREL & BFD_RELOC_MICROBLAZE_64_TEXTPCREL * bfd/bfd-in2.h: Regenerate * bfd/libbfd.h: Regenerate * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3 new relocs and handle them in both relocate and relax functions. (microblaze_elf_reloc_type_lookup): add mapping between for new bfd relocs. (microblaze_elf_relocate_section): Handle new relocs in case of elf relocation. (microblaze_elf_relax_section): Handle new relocs for elf relaxation. 2018-04-17 Nick Clifton PR 23055 * aoutx.h (find_nearest_line): Check that the symbol name exists and is long enough, before attempting to see if it is for a .o file. * hash.c (bfd_hash_hash): Add an assertion that the string is not NULL. * linker.c (bfd_link_hash_lookup): Fail if the table or string are NULL. (_bfd_generic_link_add_archive_symbols): Fail if an archive entry has no name. PR 23065 * dwarf2.c (concat_filename): Check for a NULL table pointer. 2018-04-16 Nick Clifton PR 23061 * coffgen.c (coff_pointerize_aux): Check for an out of range fixup. 2018-04-16 Alan Modra * Makefile.am: Remove arm-epoc-pe support. * coff-arm.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * epoc-pe-arm.c: Delete. * epoc-pei-arm.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sparc-aout and sparc-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-sparcle.c: Delete. * aoutf1.h: Delete. * cf-sparclynx.c: Delete. * coff-sparc.c: Delete. * demo64.c: Delete. * sparclinux.c: Delete. * sparclynx.c: Delete. * sparcnetbsd.c: Delete. * sunos.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m68k-aout and m68k-coff support. * aoutf1.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bfd-in.h: Likewise. * bfd.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * configure.host: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * freebsd.h: Likewise. * gen-aout.c: Likewise. * hpux-core.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * riscix.c: Likewise. * targets.c: Likewise. * aout0.c: Delete. * coff-apollo.c: Delete. * coff-aux.c: Delete. * coff-m68k.c: Delete. * coff-svm68k.c: Delete. * coff-u68k.c: Delete. * hosts/delta68.h: Delete. * hosts/hp300bsd.h: Delete. * hosts/m68kaux.h: Delete. * hosts/news.h: Delete. * hp300bsd.c: Delete. * hp300hpux.c: Delete. * liboasys.h: Delete. * m68k4knetbsd.c: Delete. * m68klinux.c: Delete. * m68knetbsd.c: Delete. * oasys.c: Delete. * versados.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh5 and sh64 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-sh.c: Likewise. * elf32-sh-relocs.h: Likewise. * elf32-sh.c: Likewise. * targets.c: Likewise. * elf32-sh64-com.c: Delete. * elf32-sh64.c: Delete. * elf32-sh64.h: Delete. * elf64-sh64.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh-symbianelf support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * elf32-sh-symbian.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove vax-bsd and vax-ultrix support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * vaxbsd.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove w65 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-w65.c: Delete. * cpu-w65.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove we32k support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-we32k.c: Delete. * cpu-we32k.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m88k support. * aoutx.h: Likewise. * archures.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-ns32k.c: Likewise. * elf32-nds32.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * reloc.c: Likewise. * targets.c: Likewise. * coff-m88k.c: Delete. * cpu-m88k.c: Delete. * elf32-m88k.c: Delete. * hosts/m88kmach3.h: Delete. * m88kmach3.c: Delete. * m88kopenbsd.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove i370 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * cpu-i370.c: Delete. * elf32-i370.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove h8500 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-h8500.c: Delete. * cpu-h8500.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove h8300-coff support. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * reloc16.c: Likewise. * targets.c: Likewise. * coff-h8300.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove IEEE 695 support. * archures.c: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * doc/bfdsumm.texi: Likewise. * section.c: Likewise. * targets.c: Likewise. * ieee.c: Delete. * libieee.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * config.bfd: Remove tandem support. 2018-04-16 Alan Modra * Makefile.am: Remove newsos3 support. * aoutx.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * newsos3.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove netware support. * bfd-in.h: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * ecoff.c: Likewise. * targets.c: Likewise. * libnlm.h: Delete. * nlm-target.h: Delete. * nlm.c: Delete. * nlm32-alpha.c: Delete. * nlm32-i386.c: Delete. * nlm32-ppc.c: Delete. * nlm32-sparc.c: Delete. * nlm32.c: Delete. * nlm64.c: Delete. * nlmcode.h: Delete. * nlmswap.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * archures.c: Remove tahoe support. * config.bfd: Likewise. * configure.ac: Likewise. * hosts/tahoe.h: Delete. * bfd-in2.h: Regenerate. * configure: Regenerate. 2018-04-14 Alan Modra * elf-bfd.h (struct elf_backend_data): Add relropagesize. * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and sanity test. (elfNN_bed): Init relropagesize. * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to select relropagesize. * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. (ELF_MINPAGESIZE): Don't define. * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. * bfd-in2.h: Regenerate. 2018-04-14 Alan Modra * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend on __QNXTARGET__ define. 2018-04-14 Alan Modra * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss* to obsolete list. 2018-04-11 Alan Modra * aout-adobe.c: Delete. * bout.c: Delete. * coff-i860.c: Delete. * coff-i960.c: Delete. * cpu-i860.c: Delete. * cpu-i960.c: Delete. * elf32-i860.c: Delete. * elf32-i960.c: Delete. * hosts/i860mach3.h: Delete. * Makefile.am: Remove i860, i960, bout, and adobe support. * archures.c: Remove i860 and i960 support. * coffcode.h: Likewise. * reloc.c: Likewise. * aoutx.h: Comment updates. * archive.c: Remove BOUT and i960 support. * bfd.c: Remove BOUT support. * coffswap.h: Remove i960 support. * config.bfd: Remove i860, i960 and adobe targets. * configure.ac: Remove adode, bout, i860, i960, icoff targets. * targets.c: Likewise. * ieee.c: Remove i960 support. * mach-o.c: Remove i860 support. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer in the BFD symbol referred by the relocation. (mips_elf64_write_rela): Likewise. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an error for out-of-range `r_sym' values. 2018-04-09 Alan Modra * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field. (struct ppc_link_hash_table): Add can_convert_all_inline_plt. (ppc64_elf_check_relocs): Set has_pltcall. (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc64_elf_inline_plt): New function. (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals. * elf64-ppc.h (ppc64_elf_inline_plt): Declare. * elf32-ppc.c (has_pltcall): Define. (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt. (ppc_elf_check_relocs): Set has_pltcall. (ppc_elf_inline_plt): New function. (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc_elf_size_dynamic_sections): Likewise. * elf32-ppc.h (ppc_elf_inline_plt): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos. (is_plt_seq_reloc): New function. (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs. (ppc_elf_tls_optimize): Handle inline plt call sequence. (ppc_elf_relax_section): Handle PLTCALL reloc. (ppc_elf_relocate_section): Nop out inline plt call sequence when resolving locally. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE. (has_tls_get_addr_call): Correct comment. (is_branch_reloc): Add PLTCALL. (is_plt_seq_reloc): New function. (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt entry for R_PPC64_PLTCALL. (ppc64_elf_tls_optimize): Handle inline plt call sequence. (ppc_type_of_stub): Handle PLTCALL reloc. (toc_adjusting_stub_needed): Likewise. (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL reloc insn. Nop out inline plt call sequence when resolving locally. Handle __tls_get_addr inline plt call optimization. 2018-04-09 Alan Modra * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define. (struct ppc_stub_hash_entry): Add symtype field. (PLT_KEEP): Define. (struct ppc_link_hash_table): Add pltlocal and relpltlocal. (create_linkage_sections): Create pltlocal and relpltlocal. (ppc64_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal. Keep PLT entries for inline calls against locals. (ppc_build_one_stub): Use pltlocal as appropriate. (ppc_size_one_stub): Likewise. (ppc64_elf_size_stubs): Set symtype. (build_global_entry_stubs_and_plt): Init pltlocal and write relpltlocal for globals. (write_plt_relocs_for_local_syms): Likewise for local syms. (ppc64_elf_relocate_section): Support PLT for local syms. * elf32-ppc.c (PLT_KEEP): Define. (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal. (ppc_elf_create_glink): Create pltlocal and relpltlocal. (ppc_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. Adjust update_local_sym_info call. (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal. (ppc_elf_relocate_section): Support PLT16 relocs for local syms. (write_global_sym_plt): Init pltlocal and write relpltlocal. (ppc_finish_symbols): Likewise for locals. 2018-04-09 Alan Modra * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs for local symbols to.. (write_plt_relocs_for_local_syms): ..here. New function. (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for global symbols to.. (build_global_entry_stubs_and_plt): ..here. Rename from build_global_entry_stubs. (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt. Call write_plt_relocs_for_local_syms. * elf32-ppc.c (get_sym_h): New function. (ppc_elf_relax_section): Use get_sym_h. (ppc_elf_relocate_section): Move output of PLT relocs and glink stubs for local symbols to.. (ppc_finish_symbols): ..here. New function. (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for global syms to.. (write_global_sym_plt): ..here. New function. * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute. (ppc_finish_symbols): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs. (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS. (ppc64_elf_relocate_section): Likewise. Correct PLT16 resolution to plt entry relative to toc pointer. 2018-04-09 Alan Modra * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout file when other TLS flags are tested in a mask. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK. (ppc64_elf_relocate_section): Likewise. (ppc64_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD): Renumber. Update comment. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (ppc_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. 2018-04-06 H.J. Lu * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out R_X86_64_converted_reloc_bit. 2018-04-05 H.J. Lu PR gas/22318 * configure: Regenerated. 2018-04-05 Alan Modra * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto): Also return unsuccessfully for unimplemented relocations. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the `bfd_error_bad_value' error and call `_bfd_error_handler' on a howto lookup failure. (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call accordingly. (elf32_i860_info_to_howto_rela): Likewise. (elf32_i860_relocate_splitn): Likewise. (elf32_i860_relocate_pc16): Likewise. (elf32_i860_relocate_pc26): Likewise. (elf32_i860_relocate_section): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-visium.c (visium_info_to_howto_rela): Correct the range check for `visium_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range check for `iq2000_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-frv.c (frv_info_to_howto_rela): Correct the range check for `elf32_frv_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-mips.c (mips_elf32_rtype_to_howto): Also return unsuccessfully for placeholder howtos. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise. 2018-03-29 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to `_bfd_error_handler' and to set the `bfd_error_bad_value' error. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove ATTRIBUTE_UNUSED from `abfd'. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct `_bfd_error_handler' call formatting. 2018-03-28 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Call `mips_elf32_rtype_to_howto' directly rather than via `->elf_backend_mips_rtype_to_howto'. 2018-03-28 Renlin Li PR ld/22970 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. (elfNN_aarch64_final_link_relocate): Support new relocations. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new relocations. (_bfd_aarch64_elf_resolve_relocation): Support new relocations. 2018-03-28 Renlin Li PR ld/22970 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for TLSLE_LDST16_TPREL_LO12, TLSLE_LDST16_TPREL_LO12_NC, TLSLE_LDST32_TPREL_LO12, TLSLE_LDST32_TPREL_LO12_NC, TLSLE_LDST64_TPREL_LO12, TLSLE_LDST64_TPREL_LO12_NC, TLSLE_LDST8_TPREL_LO12, TLSLE_LDST8_TPREL_LO12_NC. * bfd-in2.h: Regenerated. * libbfd.h: Regenerated. 2018-03-28 Eric Botcazou PR ld/22972 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag has_old_style_got_reloc. (_bfd_sparc_elf_check_relocs) : Set it for old-style relocations. Fix a couple of long lines. (_bfd_sparc_elf_relocate_section) : Do not generate a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style GOT relocations. 2018-03-25 H.J. Lu PR ld/23000 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add ENDBR64 to the TLSDESC PLT entry. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting symbols. Use size_t counts. Delete redundant opd test. 2018-03-21 Alan Modra * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms. 2018-03-21 Alan Modra * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask field unsigned. (update_local_sym_info): Likewise for local_got_tls_masks. (ppc_elf_tls_optimize): Likewise for lgot_masks. 2018-03-21 Alan Modra * elf64-ppc.c (ppc_size_one_stub): Fix comment typo. (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we do in size_dynamic_sections. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1] without first checking array bounds. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. 2018-03-20 H.J. Lu PR ld/22983 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list. 2018-03-19 Nick Clifton * po/es.po: Updated Spanish translation. 2018-03-15 Max Filippov * elf32-xtensa.c (xlate_map_entry): Change types of address fields from 'unsigned' to 'bfd_vma'. (xlate_offset_with_removed_text): Use struct xlate_map_entry as the key argument to bsearch. Allow offsets past the end of a section, use the last map entry for translation of such offsets. 2018-03-15 Kuan-Lin Chen * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed. Not support the target feature. (nds32_elf_ex9_itb_base): Likewise. (nds32_elf_ex9_import_table): Likewise. (nds32_elf_ex9_finish): Likewise. (nds32_elf_ex9_reloc_jmp): Likewise. (nds32_elf_get_insn_with_reg): Likewise. (nds32_get_local_syms): Likewise. (nds32_elf_ex9_replace_instruction): Likewise. (nds32_elf_ifc_calc): Likewise. (nds32_elf_ifc_finish): Likewise. (nds32_elf_ifc_replace): Likewise. (nds32_elf_ifc_reloc): Likewise. 2018-03-14 Alan Modra * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having sfpr size added before defining alias symbols. (ppc64_elf_build_stubs): Add stub section padding before copying sfpr contents and defining save/restore alias symbols. 2018-03-14 H.J. Lu PR ld/20882 * elflink.c (elf_gc_mark_debug_section): Also check the local debug definition section. 2018-03-13 Nick Clifton PR 22113 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean function. Add an end address parameter. Check access of the data pointer to make sure that they do not extend beyond the end address. Return FALSE if any check fails. Add the end address pointer to the ui structure. (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind codes to make sure that they do not extend beyond the end address pointer. Print an error message and return immediately if any check fails. 2018-03-09 Nick Clifton * elf64-s390.c (elf_s390_relocate_section): Move check for relocations against non-allocated sections to before the code that handles ifunc relocations. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat relocs against IFUNC symbols in non-allocated sections as relocs against FUNC symbols. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. 2018-03-08 H.J. Lu PR ld/22929 * elf32-i386.c (elf_i386_relocate_section): Treat relocation against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as relocation against FUNC symbol. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. 2018-03-07 Renlin Li PR ld/20402 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute symbol, and don't emit relocation in specific case. 2018-03-07 Alan Modra * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error. (mips_elf64_slurp_one_reloc_table): Pass on error. 2018-03-03 James Cowgill Maciej W. Rozycki PR ld/21900 * elfxx-mips.c (mips_elf_calculate_relocation): Only return after calling `undefined_symbol' hook if this is an error condition. Assume the value of 0 for the symbol requested otherwise. 2018-03-02 Jim Wilson PR 22903 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch and nop instead of 4. (elfNN_arch64_build_stubs): Add nop after branch. Increase size by 8 instead of 4. 2018-03-01 Jim Wilson PR 22756 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use else if instead of if. 2018-03-01 Alan Modra * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test. 2018-02-28 Alan Modra PR 22887 * aoutx.h (swap_std_reloc_in): Correct r_index bound check. 2018-02-28 Nick Clifton PR 22895 PR 22893 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block pointer. Drop unused abfd parameter. Check the size of the block before initialising the data field. Return the end pointer if the size is invalid. (read_attribute_value): Adjust invocations of read_n_bytes. PR 22894 * dwarf1.c (parse_die): Check the length of form blocks before advancing the data pointer. 2018-02-28 Alan Modra PR 22887 * aoutx.h (translate_symbol_table): Print an error message and set bfd_error on finding an invalid name string offset. 2018-02-27 H.J. Lu * config.in: Regenerated. * configure: Likewise. * configure.ac: Add --enable-separate-code. (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default to 1 for Linux/x86 targets, * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if DEFAULT_LD_Z_SEPARATE_CODE is 1. 2018-02-27 Nick Clifton * aout-cris.c (swap_ext_reloc_out): Standadize error/warning message. * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise. * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise. * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (sh_elf64_info_to_howto): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. PR 22875 * elf-bfd.h (struct elf_backend_data): Change the return type of the elf_info_to_howto and elf_info_to_howto_rel function pointers to bfd_boolean. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed. * elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function. (elf32_h8_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. (riscv_elf_relocate_section): Likewise. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to bfd_boolean. Issue an error message, set an error value and return FALSE if the reloc is not recognized. (elf_hppa_info_to_howto_rel): Likewise. * elf-m10200.c (mn10200_info_to_howto): Likewise. * elf-m10300.c (mn10300_info_to_howto): Likewise. * elf.c (_bfd_elf_no_info_to_howto): Likewise. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-arm.c (elf32_arm_info_to_howto): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-bfin.c (bfin_info_to_howto): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise. * elf32-cris.c (elf_cr16c_info_to_howto_rel) (cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto) (elf32_dlx_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela) (frvfdpic_info_to_howto_rel): Likewise. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise. * elf32-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf32-h8300.c (elf32_h8_info_to_howto) (elf32_h8_info_to_howto_rel): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup) (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68k.c (rtype_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-pru.c (pru_elf32_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-s390.c (elf_s390_info_to_howto): Likewise. * elf32-score.c (s3_bfd_score_info_to_howto) (_bfd_score_info_to_howto): Likewise. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-tic6x.c (elf32_tic6x_info_to_howto) (elf32_tic6x_info_to_howto_rel): Likewise. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel) (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto) (elf32_wasm32_info_to_howto_rela): Likewise. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL. 2018-02-26 Jim Wilson Stephan Schreiber PR 15904 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl call, set changed_contents and changed_relocs. Likewise after successful ia64_elf_relax_br call. 2018-02-26 Alan Modra * elf.c (assign_file_positions_except_relocs): Don't segfault when actual number of phdrs is less than allocated. Delete outdated comment. Formatting. 2018-02-26 Alan Modra * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c, * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c, * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c, * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize error/warning messages. 2018-02-26 Alan Modra * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c, * syms.c: Standardize error/warning messages. 2018-02-26 Alan Modra * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c, * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c, * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c, * peXXigen.c, * peicode.h: Standardize error/warning messages. 2018-02-26 Alan Modra * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages. 2018-02-26 Alan Modra * elfxx-mips.c: Standardize error/warning messages. 2018-02-26 Alan Modra * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c, * elflink.c: Standardize error/warning messages. Replace use of linker callback einfo with _bfd_error_handler when possible. 2018-02-26 Alan Modra * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c, * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize unrecognized/unsupported reloc message. 2018-02-26 Alan Modra * elf32-ppc.c: Standardize error/warning messages. Use _bfd_error_handler rather than einfo when einfo features not used. * elf64-ppc.c: Likewise. 2018-02-23 Alan Modra PR 22881 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO segment if no matching LOAD segment. 2018-02-23 Kuan-Lin Chen * elf32-nds32.h: Define mask for ict_model. 2018-02-20 Jason Duerstock * elfnn-ia64.c (elf_backend_can_gc_sections): Enable. 2018-02-19 Maciej W. Rozycki Revert 2018-01-12 Vlad Ivanov * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. 2018-02-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and `.MIPS.abiflags' sections. (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo' section's end. 2018-02-19 Maciej W. Rozycki * section.c (SEC_FIXED_SIZE): New macro. * bfd-in2.h: Regenerate. 2018-02-19 Maciej W. Rozycki * section.c (SEC_HAS_GOT_REF): Remove macro. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler arguments. * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise. * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise. (_bfd_riscv_relax_pc): Likewise and fix typos. * libbfd-in.h (_bfd_error_handler): Add attribute printf. * libbfd.h: Regenerate. 2018-02-19 Alan Modra * dwarf2.c (read_section): Don't use 'll' format modifier. (find_abstract_instance): Likewise. * elfcore.h (elf_core_file_p): Likewise. 2018-02-19 Alan Modra * bfd-in.h: Include inttypes.h or if not available define PRId64, PRIu64 and PRIx64. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L modifier to print bfd_vma. * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c, * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64, and cast input to uint64_t, and similarly for Ld and Lu. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c, * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * reloc.c: Replace use of %R and %T in format strings passed to einfo and friends by %pR and %pT. 2018-02-19 Alan Modra * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. 2018-02-19 Alan Modra PR 22845 * elf.c (IS_TBSS): Define. (_bfd_elf_map_sections_to_segments): Use IS_TBSS. (assign_file_positions_for_non_load_sections): Revert last change. Properly calculate load segment limits to compare against relro limits. 2018-02-17 Alan Modra PR 22845 * elf.c (assign_file_positions_for_non_load_sections): Ignore degenerate zero size PT_LOAD segments when finding one overlapping the PT_GNU_RELRO segment. 2018-02-16 Alan Modra * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false. (_bfd_bool_bfd_true): Rename from bfd_true. (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr. (_bfd_int_bfd_0): Rename from bfd_0. (_bfd_uint_bfd_0): Rename from bfd_0u. (_bfd_long_bfd_0): Rename from bfd_0l. (_bfd_long_bfd_n1_error): Rename from _bfd_n1. (_bfd_void_bfd): Rename from bfd_void. (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false), (_bfd_bool_bfd_link_false_error), (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true), (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true), (_bfd_bool_bfd_asection_bfd_asection_true), (_bfd_bool_bfd_asymbol_bfd_asymbol_true), (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions. * archive.c (_bfd_noarchive_get_elt_at_index), (_bfd_noarchive_openr_next_archived_file), (_bfd_noarchive_construct_extended_name_table), (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname), (_bfd_noarchive_write_armap): New functions. * archures.c (_bfd_nowrite_set_arch_mach): New function. * coff-alpha.c (alpha_ecoff_swap_coff_aux_in), (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in), (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out), (alpha_ecoff_swap_coff_lineno_out), (alpha_ecoff_swap_coff_reloc_out): New functions. * coff-mips.c (mips_ecoff_swap_coff_aux_in), (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in), (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out), (mips_ecoff_swap_coff_lineno_out), (mips_ecoff_swap_coff_reloc_out): New functions. * coffcode.h (coff_set_alignment_hook): Replace define with new function. (symname_in_debug_hook): Likewise. * ecoff.c (_bfd_ecoff_set_alignment_hook): New function. * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0. * elf.c (assign_file_positions_except_relocs): Test elf_backend_allow_non_load_phdr for NULL. * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from _bfd_elf_link_omit_section_dynsym. Update uses. (_bfd_elf_omit_section_dynsym_all): New function. * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete. (_bfd_elf_omit_section_dynsym_default): Declare. (_bfd_elf_omit_section_dynsym_all): Declare. * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section), (_bfd_nolink_bfd_get_relocated_section_contents), (_bfd_nolink_bfd_lookup_section_flags), (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group), (_bfd_nolink_bfd_link_hash_table_create), (_bfd_nolink_bfd_link_just_syms), (_bfd_nolink_bfd_copy_link_hash_symbol_type), (_bfd_nolink_bfd_link_split_section), (_bfd_nolink_section_already_linked), (_bfd_nolink_bfd_define_common_symbol), (_bfd_nolink_bfd_define_start_stop): New functions. * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup), (_bfd_norelocs_bfd_reloc_name_lookup), (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions. * section.c (_bfd_nowrite_set_section_contents): New function. * syms.c (_bfd_nosymbols_canonicalize_symtab), (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info), (_bfd_nosymbols_get_symbol_version_string), (_bfd_nosymbols_bfd_is_local_label_name), (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line), (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info), (_bfd_nosymbols_bfd_make_debug_symbol), ( _bfd_nosymbols_read_minisymbols), ( _bfd_nosymbols_minisymbol_to_symbol), (_bfd_nodynamic_get_synthetic_symtab): New functions. * libbfd-in.h: Declare new functions. Update existing defines, removing casts. * aix386-core.c: Update to use new hooks. Formatting. * aout-adobe.c: Likewise. * aout-arm.c: Likewise. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * bout.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-i860.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic30.c: Likewise. * coff-tic54x.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * elf-m10300.c: Likewise. * elf32-cr16.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32r.c: Likewise. * elf32-metag.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-target.h: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.h: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * libaout.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mipsbsd.c: Likewise. * mmo.c: Likewise. * netbsd-core.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * osf-core.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * pe-x86_64.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * sco5-core.c: Likewise. * som.c: Likewise. * sparclynx.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * trad-core.c: Likewise. * verilog.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * libbfd.h: Regenerate. 2018-02-15 Jim Wilson * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore symbols whose section address is zero. * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous when pcrel_lo reloc has an addend. Use reloc_dangerous callback for bfd_reloc_dangerous. Use einfo instead of warning callback for errors. Add %X%P to error messages. 2018-02-15 Eric Botcazou PR ld/22832 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup and assert that the result of the call is not NULL. 2018-02-14 Nick Clifton PR 22823 Revert previous delta. Add extra casts to avoid compile time warnings instead. * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra cast to avoid warning from gcc v8 compiler. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): Delete. (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete. (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Add extra cast to avoid warning from gcc v8 compiler. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. 2018-02-14 H.J. Lu PR ld/22842 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for R_X86_64_PC32 reloc against dynamic function in data section. Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc against dynamic function in data section. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as function address only if pcrel_plt is true. (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt. * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for PC-relative PLT. If PLT is PC-relative, don't generate dynamic PC-relative relocation against a function definition in data secton in PIE. Remove the obsolete comments. (elf_x86_link_hash_table): Add pcrel_plt. 2018-02-13 H.J. Lu * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll, instead of bfd_link_pic, for building shared library. 2018-02-13 H.J. Lu PR gas/22791 * elf64-x86-64.c (is_32bit_relative_branch): Removed. (elf_x86_64_relocate_section): Check PIC relocations in PIE. Remove is_32bit_relative_branch usage. Disallow PC32 reloc against protected function in shared object. 2018-02-13 Sergei Trofimovich PR 22828 * po/ru.po: Fix typo in Russian translation. 2018-02-13 Maciej W. Rozycki * wasm-module.c (wasm_scan_name_function_section): Rename `index' local variable to `idx'. 2018-02-13 Nick Clifton PR 22823 Fix compile time warnings generated by gcc version 8. * libbfd-in.h: Remove extraneous text from prototypes. Add prototypes for bfd_false_any, bfd_true_any, bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any, bfd_n1_any, bfd_void_any. (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy function. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): New function. Like bfd_false but accepts one or more arguments. (bfd_true_any): Likewise. (bfd_nullvoidptr_any): Likewise. (bfd_0_any): Likewise. (bfd_0u_any): Likewise. (bfd_0l_any): Likewise. (_bfd_n1_any): Likewise. (bfd_void_any): Likewise. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg based dummy function. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. * elf32-arc.c (get_replace_function): Assign replacement function to func pointer. * elf32-i370.c (i370_noop): Update prototype. 2018-02-13 Alan Modra PR 22836 * elf.c (_bfd_elf_fixup_group_sections): Account for removed relocation sections. If size reduces to just the flag word, remove that too and mark with SEC_EXCLUDE. * elflink.c (bfd_elf_final_link): Strip empty group sections. 2018-02-13 Alan Modra PR 22829 * elf.c (assign_file_positions_for_non_load_sections): Rewrite PT_GNU_RELRO setup. 2018-02-12 Zebediah Figura * 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-12 Nick Clifton * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant assignment. * elf32-arc.c (elf_arc_relocate_section): Likewise. 2018-02-09 Eric Botcazou * 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) : If relocation is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation. : Adjust comments. : 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-09 H.J. Lu * 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-08 H.J. Lu * 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-08 H.J. Lu * 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-08 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous change. 2018-02-08 Nick Clifton PR 22788 * elf.c (elf_parse_notes): Reject notes with excessuively large alignments. 2018-02-07 Alan Modra Revert 2018-01-17 Alan Modra * elf32-ppc.c: Remove speculation barrier support. * elf32-ppc.h: Likewise. * elf64-ppc.c: Likewise. * elf64-ppc.h: Likewise. 2018-02-06 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used callback to report an error. 2018-02-06 Eric Botcazou PR ld/22263 * 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. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Remove useless code, tidy and merge related blocks. : Turn call to bfd_link_pic into call to !bfd_link_executable. : 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. : Merge into... : ...this. Adjust 4th argument in call to sparc_elf_tls_transition and remove redundant code. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. : Likewise. : Likewise. 2018-02-06 Miloš Stojanović 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-06 Sergio Durigan Junior * coff-rs6000.c (xcoff_write_archive_contents_old): Use 'memcpy' instead of 'strncpy' when writing the magic number. 2018-02-06 Nick Clifton 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-06 Paul Carroll * bfd/dwarf2.c (find_abstract_name): Modified to return file and line information in addition to name, if they can be found. 2018-02-05 Renlin Li 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. 2018-02-05 H.J. Lu 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. 2018-02-05 Maciej W. Rozycki * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to initialize `hi_reloc'. 2018-02-05 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_section_processing): For SHT_MIPS_REGINFO sections don't assert the correct size and report an error instead. 2018-02-05 Maciej W. Rozycki * elf.c (_bfd_elf_write_object_contents): Propagate a failure status from `->elf_backend_section_processing'. 2018-02-02 Jim Wilson 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-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops emitted for toc sequence optimization. Set and use "howto" later. 2018-02-01 Simon Marchi * 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. 2018-01-31 Michael Matz * elflink.c (bfd_elf_define_start_stop): Fix check of def_dynamic. 2018-01-31 H.J. Lu PR ld/21964 * elflink.c (bfd_elf_define_start_stop): Check if __start and __stop symbols are referenced by shared objects. 2018-01-30 Alan Modra 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-30 Alan Modra * elflink.c (bfd_elf_define_start_stop): Make __start and __stop symbols dynamic. 2018-01-29 Alan Modra PR 22741 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in range before converting to a symbol table pointer. a15 5 * elflink.c (bfd_elf_define_start_stop): Override symbols when they are defined dynamically. 2018-01-26 Alan Modra a18 5 2018-01-25 Alan Modra PR 22746 * elfcode.h (elf_object_p): Avoid integer overflow. d36 1 a36 1 2018-01-24 Renlin Li d38 2 a39 26 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2018-01-24 Renlin Li * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-01-23 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale `mips_elf32_section_processing' comment reference. d57 1 a57 10 2018-01-17 Nick Clifton * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. 2018-01-17 Alan Modra * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. 2018-01-17 Alan Modra d83 5 a87 1 2018-01-17 Alan Modra d124 5 d135 1 a135 5 * po/bfd.pot: Regenerated. 2018-01-13 Nick Clifton * version.m4: Bump version to 2.30.51 d137 1 d186 1 a186 1 2018-01-09 Kuan-Lin Chen @ 1.10.2.2 log @Mostly merge changes from HEAD upto 20200411 @ text @d1 1 a1 1 2020-02-01 Nick Clifton d3 46 a48 1 Binutils 2.34 release. d50 1 a50 1 2020-01-29 Alan Modra d52 3 a54 5 Apply from master 2020-01-27 H.J. Lu Alan Modra PR ld/25458 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases. d56 1 a56 4 2020-01-23 Alan Modra PR 25444 * elf.c (assign_file_positions_for_load_sections): Avoid divide by zero when p_align is zero. d58 7 a64 3 2020-01-22 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under which __tls_get_addr calls will be eliminated. d66 1 a66 1 2020-01-23 Nick Clifton d68 31 a98 1 * po/fr.po: Updated French translation. d100 1 a100 1 2020-01-20 Nick Clifton a101 1 * po/pt.po: Updates Portuguese translation. d103 14 d119 6 a124 1 2020-01-18 Nick Clifton d126 3 a128 1 * version.m4 (BFD_VERSION): Set to 2.33.90. d132 458 a589 1 2020-01-18 Nick Clifton d591 6 a596 1 Binutils 2.34 branch created. d598 1 a598 1 2020-01-17 Christian Biesinger d600 1 a600 4 * coff-arm.c: Fix spelling error (seperate). * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling error (seperate). * sysdep.h (strnlen): Fix spelling error (seperate). d602 1 a602 1 2020-01-15 Lars Brinkhoff d604 16 a619 2 PR 20694 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192. d621 1 a621 1 2020-01-15 Alan Modra d623 2 a624 6 PR 25384 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment. (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies of function symbols unless dot symbols are present. Do warn whenever one is created, regardles of whether a PLT entry is also emitted for the function symbol. d626 1 a626 1 2020-01-14 Alan Modra d628 1 a628 2 * som.c (som_bfd_count_ar_symbols): Error when file position of symbols on chains is not strictly increasing. d630 1 a630 1 2020-01-14 Alan Modra d632 3 a634 5 * vms.h (VMS_DEBUG): Define as 0. * vms-alpha.c (image_write): Move debug output after bounds check. Tidy bounds check. (_bfd_vms_slurp_eihd): Warning fix. (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings. d636 1 a636 1 2020-01-13 Alan Modra d638 118 a755 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even for "ignored" records. d757 1 a757 1 2020-01-13 Alan Modra d759 2 a760 9 * wasm-module.c (wasm_scan_name_function_section): Formatting. Delete asect name check. Move asect NULL check to wasm_object_p. Correct bounds check of sizes against end. Replace uses of bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use just one bfd_release. (wasm_scan): Don't use malloc/strdup for section names, bfd_alloc instead. Simplify code prefixing section name. Formatting. Don't attempt to free memory here.. (wasm_object_p): ..do so here. d762 1 a762 1 2020-01-10 Szabolcs Nagy d764 52 a815 3 PR ld/22269 * elf32-arm.c (elf32_arm_final_link_relocate): Use UNDEFWEAK_NO_DYNAMIC_RELOC. d817 96 d914 1 a914 1 2020-01-10 Tamar Christina d916 3 a918 2 PR 25210 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass. d920 3 a922 1 2020-01-10 Alan Modra d924 1 a924 1 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type. d926 2 a927 1 2020-01-09 Nick Clifton d929 1 a929 3 PR 25221 * bfd.c (bfd_convert_section_contents): Check for a compress header size that is larger than the actual section size. d931 3 a933 1 2020-01-08 Alan Modra d935 229 a1163 3 PR 25351 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms after removing sections. d1165 1 a1165 1 2020-01-06 Jim Wilson d1167 8 a1174 7 PR 25205 * elfnn-riscv.c (riscv_elf_relocate_section) : Add check for !bfd_link_pic (info). : Move next to R_RISCV_CALL. : Add comment. (_bfd_riscv_relax_section): For plt.offset check, add check for bfd_link_pic (info). Add comment. d1176 1 a1176 1 2020-01-06 Alan Modra d1178 8 a1185 3 * format.c (bfd_check_format_matches): Ignore bfd_error on target match failures. Don't init to bfd_error_wrong_format before calling _bfd_check_format. d1187 1 a1187 1 2020-01-06 Alan Modra d1189 12 a1200 3 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail status rather than exiting on stack overflow or underflow. (_bfd_vms_slurp_etir): Adjust to suit. d1202 1 a1202 1 2020-01-06 Alan Modra d1204 12 a1215 1 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index. d1217 1 a1217 1 2020-01-06 Alan Modra d1219 23 a1241 15 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of command. Check name offset is within command. (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib), (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints), (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab), (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid), (bfd_mach_o_read_linkedit, bfd_mach_o_read_str), (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min), (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version), (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main), (bfd_mach_o_read_note, bfd_mach_o_read_build_version), (bfd_mach_o_read_segment): Similarly. (bfd_mach_o_read_thread): Properly bound check thread struct. Don't repeat checks on second loop. (bfd_mach_o_read_command): Fail on invalid command length. d1243 1 a1243 1 2020-01-04 Alan Modra d1245 11 a1255 5 * format.c (bfd_check_format_matches): Add preserve_match. Save initial bfd state in "preserve", matched bfd state in "preserve_match". Save just the first match. Release bfd_alloc memory. Restore and finish preserved state as appropriate on all function exit paths. d1257 1 a1257 1 2020-01-04 Alan Modra d1259 12 a1270 1 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc. d1272 1 a1272 1 2020-01-04 Alan Modra d1274 10 a1283 2 * coffgen.c (coff_real_object_p): Free malloc'd memory on target match too. d1285 1 a1285 1 2020-01-03 Nick Clifton d1287 16 a1302 4 PR 25307 (bfd_pef_parse_function_stubs): Correct the test that ensures that there is enough data remaining in the code buffer before attempting to read a function stub. d1304 1 a1304 1 2020-01-03 Nick Clifton d1306 1 a1306 13 PR 25308 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the return value from bfd_malloc. * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise. (elf32_arm_filter_cmse_symbols): Likewise. (elf32_arm_write_section): Likewise. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. (bfd_mach_o_follow_dsym): Likewise. * pef.c (bfd_pef_print_loader_section): Likewise. (bfd_pef_scan_start_address): Likewise. (bfd_pef_parse_function_stubs): Likewise. (bfd_pef_parse_symbols): Likewise. d1308 1 a1308 1 2020-01-03 Sergei Trofimovich d1310 9 a1318 3 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail on binary inputs ld/PR25316. (is_ia64_elf): new helper to filter on ia64 objects. d1320 1 a1320 1 2020-01-03 Jan Beulich d1322 23 a1344 3 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore in parameter names. (bfd_mach_o_scan): Insert underscore in two variable names. d1346 1 a1346 1 2020-01-02 Sergey Belyashov d1348 2 a1349 1 * Makefile.am: Add z80-elf target support. d1351 50 d1402 2 d1405 1 d1407 1016 a2422 4 * config.bfd: Add z80-elf target support and new arches: ez80 and z180. * elf32-z80.c: New file. * archures.c: Add new z80 architectures: eZ80 and Z180. d2424 710 a3133 4 * cpu-z80.c: Likewise. * coff-z80.c: Add new relocations for Z80 target and local label check. * reloc.c: Add new relocs. d3137 159 a3295 1 2020-01-02 Tamar Christina d3297 3 a3299 3 PR 25210 PR 24753 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class. d3301 1 a3301 1 2020-01-01 Alan Modra d3305 1 a3305 1 For older changes see ChangeLog-2019 d3307 1 a3307 1 Copyright (C) 2020 Free Software Foundation, Inc. @ 1.9 log @merge conflicts, disable testsuite @ text @d1 1 a1 1 2016-08-03 Tristan Gingold d3 1 a3 11 * version.m4: Bump version to 2.27 * configure: Regenerate. 2016-08-03 Tristan Gingold * development.sh: Set development to false. 2016-08-02 Alan Modra PR ld/20428 * elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group. d5 2 a6 13 2016-07-27 Nick Clifton * Import this patch from the mainline: 2016-07-27 Ozkan Sezer Nick Clifton PR ld/20401 * coffgen.c (fini_reloc_cookie_rels): Check for the extistence of the coff_section_data before using it. 2016-07-01 Tristan Gingold * version.m4: Bump version to 2.26.90 d8 1 d10 1 a10 1 2016-07-01 Tristan Gingold d12 1 a12 2 * version.m4: Bump version to 2.27.51 * configure: Regenerate. d14 1 a14 1 2016-06-29 Nick Clifton d16 2 a17 489 * elfnn-aarch64.c (is_aarch64_mapping_symbol): New function. Returns TRUE for AArch64 mapping symbols. (elfNN_aarch64_backend_symbol_processing): New function. Marks mapping symbols as precious in object files so that they will not be stripped. (elf_backend_symbol_processing): Define. * elf32-arm.c (is_arm_mapping_symbol): New function. Returns TRUE for ARM mapping symbols. (elf32_arm_backend_symbol_processing): Make use of the new function. 2016-06-28 H.J. Lu PR ld/20306 * elflink.c (elf_link_check_versioned_symbol): Return false for unreferenced undefined symbol. 2016-06-28 Nick Clifton * elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc is needed. * elf32-arm.c (elf32_arm_backend_symbol_processing): New function. Marks mapping symbols in object files as precious, so that strip will not remove them. (elf_backend_symbol_processing): Define. 2016-06-28 James Clarke * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64. 2016-06-28 Maciej W. Rozycki * elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_PC16_S1. (mips16_reloc_map): Likewise. * elf64-mips.c (mips16_elf64_howto_table_rel): Likewise. (mips16_elf64_howto_table_rela): Likewise. (mips16_reloc_map): Likewise. * elfn32-mips.c (elf_mips16_howto_table_rel): Likewise. (elf_mips16_howto_table_rela): Likewise. (mips16_reloc_map): Likewise. * elfxx-mips.c (mips16_branch_reloc_p): New function. (mips16_reloc_p): Handle R_MIPS16_PC16_S1. (b_reloc_p): Likewise. (mips_elf_calculate_relocation): Likewise. (_bfd_mips_elf_check_relocs): Likewise. * reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2016-06-27 Alan Modra PR ld/19264 * elf64-ppc.c (STUB_SHRINK_ITER): Define. (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER if shrinking stubs. (ppc64_elf_size_stubs): Adjust to suit. 2016-06-27 Trevor Saunders * elf32-dlx.h: New file. * elf32-dlx.c: Adjust. 2016-06-25 Trevor Saunders * elf32-xtensa.c (xtensa_make_property_section): Remove prototype. 2016-06-24 John Baldwin * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV notes. 2016-06-24 John Baldwin * elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for FreeBSD. Remove case for NT_FREEBSD_THRMISC. (elfcore_grok_freebsd_psinfo): New function. (elfcore_grok_freebsd_prstatus): New function. (elfcore_grok_freebsd_note): New function. (elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD" notes. 2016-06-24 Joel Brobecker * elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather than its existance. 2016-06-24 Alan Modra * config.bfd: Delete mips vxworks patterns matched earlier. Combine mips*-*-none with mips*-*-elf*. 2016-06-21 Maciej W. Rozycki * elfxx-mips.c (mips_elf_perform_relocation): Call `info->callbacks->einfo' rather than `*_bfd_error_handler' and use the `%X%H' format for the cross-mode jump conversion error message. Remove the full stop from the end of the message. Continue processing rather than returning failure. 2016-06-21 Graham Markall * archures.c: Remove bfd_mach_arc_nps400. * bfd-in2.h: Likewise. * cpu-arc.c (arch_info_struct): Likewise. * elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing): Likewise. 2016-06-20 H.J. Lu PR ld/18250 PR ld/20267 * elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is defined. (elf_link_is_defined_archive_symbol): Call bfd_link_plugin_object_p on unknown plugin object and use the IR symbol table if the input is an IR object. * plugin.c (bfd_link_plugin_object_p): New function. * plugin.h (bfd_link_plugin_object_p): New prototype. 2016-06-20 H.J. Lu PR ld/20276 * elflink.c (elf_link_add_object_symbols): Don't check alignment on symbol from plugin dummy input. 2016-06-18 H.J. Lu * bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to bfd_plugin_unknown. * bfd-in2.h: Regenerated. * plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown with bfd_plugin_unknown. 2016-06-18 H.J. Lu PR ld/20253 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an bfd_boolean argument. * elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace "shared object" with "PIC object" in comments. (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Replace "shared object" with "PIC object" in comments. Avoid PLT if requested. Generate dynamic relocations for non-GOT references. Make room for the special first entry in PLT and allocate PLT entry only for PLT and PC-relative references. Store dynamic GOT relocations in .rel[a].iplt section for static executables. If PLT isn't used, always use GOT for symbol value. Don't allocate GOT entry if it isn't used. * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count only in the code section. Allocate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section. (elf_i386_adjust_dynamic_symbol): Increment PLT reference count only for PC-relative references. (elf_i386_allocate_dynrelocs): Pass TRUE to _bfd_elf_allocate_ifunc_dyn_relocs. (elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X relocations against STT_GNU_IFUNC symbols without PLT. Generate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section and store it in the proper REL section. Don't allow non-pointer relocation against STT_GNU_IFUNC symbol without PLT. (elf_i386_finish_dynamic_symbol): Generate dynamic R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against STT_GNU_IFUNC symbols without PLT. (elf_i386_finish_dynamic_sections): Don't handle local STT_GNU_IFUNC symbols here. (elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC symbols here. (elf_backend_output_arch_local_syms): New. * elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference count only in the code section. Allocate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section. (elf_x86_64_adjust_dynamic_symbol): Increment PLT reference count only for PC-relative references. (elf_x86_64_allocate_dynrelocs): Pass TRUE to _bfd_elf_allocate_ifunc_dyn_relocs. (elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL, R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols without PLT. Generate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section and store it in the proper RELA section. Don't allow non-pointer relocation against STT_GNU_IFUNC symbol without PLT. (elf_x86_64_finish_dynamic_symbol): Generate dynamic R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against STT_GNU_IFUNC symbols without PLT. (elf_x86_64_finish_dynamic_sections): Don't handle local STT_GNU_IFUNC symbols here. (elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC symbols here. (elf_backend_output_arch_local_syms): New. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs. 2016-06-17 Thomas Preud'homme Tony Wang * elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub sequence. (stub_long_branch_thumb2_only): Define stub. (arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only. (arm_stub_long_branch_thumb2_only): Likewise. (arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2 capable targets. 2016-06-17 Jose E. Marchesi * archures.c (bfd_mach_sparc_v8plusc): Define. (bfd_mach_sparc_v9c): Likewise. (bfd_mach_sparc_v8plusd): Likewise. (bfd_mach_sparc_v9d): Likewise. (bfd_mach_sparc_v8pluse): Likewise. (bfd_mach_sparc_v9e): Likewise. (bfd_mach_sparc_v8plusv): Likewise (bfd_mach_sparc_v9v): Likewise. (bfd_mach_sparc_v8plusm): Likewise. (bfd_mach_sparc_v9m): Likewise. (bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m. (bfd_mach_sparc_64bit_p): Likewise. * bfd-in2.h: Regenerate. * cpu-sparc.c (arch_info_struct): Add entries for bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}. * aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}. * elf32-sparc.c (elf32_sparc_final_write_processing): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise. 2016-06-16 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Don't check undefined symbols for relocations against IFUNC symbols. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. 2016-06-16 Marcin Kościelnicki * elf32-s390.c (elf_s390_finish_dynamic_sections): Include .rela.iplt in DT_PLTRELSZ. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise, for DT_PLTRELSZ and DT_RELASZ as well. 2016-06-16 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Skip relocations in non-loaded, non-alloced sections. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. 2016-06-15 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before allocating dynamic relocation. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. 2016-06-14 Senthil Kumar Selvaraj PR ld/20254 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc offsets until reloc_toaddr. 2016-06-14 H.J. Lu * elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE. Don't check symbol type for STN_UNDEF symbol index. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Check R_X86_64_IRELATIVE. Don't check symbol type for STN_UNDEF symbol index. 2016-06-14 Thomas Preud'homme * elf32-arm.c (using_thumb_only): Force review of arch check logic for new architecture. (using_thumb2): Try Tag_THUMB_ISA_use first and check for exact arch value then. Force review of arch check logic for new architecture. (arch_has_arm_nop): Update and fix arch check logic. Force review of that logic for new architecture. (arch_has_thumb2_nop): Remove. (elf32_arm_tls_relax): Use using_thumb2 instead of above function. (elf32_arm_final_link_relocate): Likewise but using thumb2. 2016-06-14 Alan Modra * bfd-in.h (bfd_my_archive): Delete. * bfd-in2.h: Regenerate. 2016-06-14 Alan Modra PR ld/20241 * archive.c (open_nested_file): Set my_archive. * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name for thin archives. * bfdio.c (bfd_tell): Don't adjust origin for thin archives. (bfd_seek): Likewise. * bfdwin.c (bfd_get_file_window): Likewise. * cache.c (cache_bmmap): Likewise. (bfd_cache_lookup_worker): Don't look in my_archive for thin archives. * mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for thin archives. * plugin.c (try_claim): Likewise. * xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of file within thin archive, not the archive. 2016-06-13 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. 2016-06-13 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. 2016-06-13 Maciej W. Rozycki * elf32-mips.c (elf_mips_gnu_pcrel32): Update comment. 2016-06-13 Cupertino Miranda * elf32-arc.c (elf_arc_relocate_section): Fixed condition. 2016-06-13 Cupertino Miranda * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed. 2016-06-13 Cupertino Miranda * elf32-arc.c (arc_local_data, arc_local_data): Removed. (SECTSTART): Changed. (elf_arc_relocate_section): Fixed mistake in PIE related condition. (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT. 2016-06-13 Cupertino Miranda * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to enable support for "-z combreloc" and DT_RELACOUNT. (elf_backend_reloc_type_class): Likewise 2016-06-11 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): When relocating R_386_GOT32, return error without a base register for PIC and subtract the .got.plt section address only with a base register. 2016-06-10 Alan Modra * elf-strtab.c (struct strtab_save): Use size_t for "size". (struct elf_strtab_hash): Likewise for "size" and "alloced". (_bfd_elf_strtab_init): Formatting. (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type. (_bfd_elf_strtab_addref): Take size_t idx param. (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise. (_bfd_elf_strtab_offset): Likewise. (_bfd_elf_strtab_clear_all_refs): Use size_t idx. (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars. (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly. (_bfd_elf_strtab_finalize): Similarly. * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes. (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise. (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise. * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size using bfd_size_type. (bfd_section_from_shdr): Delete amt. (_bfd_elf_init_reloc_shdr): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. (assign_section_numbers): Use size_t reloc_count. * elflink.c (struct elf_symbuf_head): Use size_t "count". (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars. (elf_link_is_defined_archive_symbol): Likewise. (elf_add_dt_needed_tag): Likewise. (elf_finalize_dynstr): Likewise. (elf_link_add_object_symbols): Likewise. (bfd_elf_size_dynamic_sections): Likewise. (elf_create_symbuf): Similarly. (bfd_elf_match_symbols_in_sections): Likewise. (elf_link_swap_symbols_out): Likewise. (elf_link_check_versioned_symbol): Likewise. (bfd_elf_gc_record_vtinherit): Likewise. (bfd_elf_gc_common_finalize_got_offsets): Likewise. 2016-06-08 Senthil Kumar Selvaraj PR ld/20221 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms and relocs only if shrinking occurred. 2016-06-08 H.J. Lu * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr. (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2. (elf_i386_check_tls_transition): Check indirect call and direct call with the addr32 prefix for general and local dynamic models. Set the tls_get_addr feild. (elf_i386_convert_load_reloc): Always use addr32 prefix for indirect ___tls_get_addr call via GOT. (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE transitions with indirect call and direct call with the addr32 prefix. 2016-06-07 Marcin Kościelnicki * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment. * elf64-s390.c (elf_s390x_plt_entry): Fix comment. (elf_s390_relocate_section): Fix comment. (elf_s390_finish_dynamic_sections): Fix initialization of fixed .got.plt entries. 2016-06-07 Ulrich Weigand * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt section offset when calculation the larl operand in the first PLT entry. 2016-06-07 Alan Modra * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry to match other 32-bit archs. * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function. (ppc_elf_object_p): Call it. (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix overlong line. (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here. * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch. * bfd-in.h (_bfd_elf_ppc_at_tls_transform, _bfd_elf_ppc_at_tprel_transform): Move to.. * elf-bfd.h: ..here. (_bfd_elf_ppc_set_arch): Declare. * bfd-in2.h: Regenerate. 2016-06-06 H.J. Lu * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr. (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2. (elf_x86_64_check_tls_transition): Check indirect call and direct call with the addr32 prefix for general and local dynamic models. Set the tls_get_addr feild. (elf_x86_64_convert_load_reloc): Always use addr32 prefix for indirect __tls_get_addr call via GOT. (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE transitions with indirect call and direct call with the addr32 prefix. 2016-06-04 Christian Groessler * coff-z8k.c (extra_case): Fix range check for R_JR relocation. 2016-06-02 Nick Clifton PR target/20088 * cpu-arm.c (processors): Add "arm_any" type to match any ARM architecture. (arch_info_struct): Likewise. (architectures): Likewise. 2016-06-02 Vineet Gupta * config.bfd: Replace -uclibc with *. 2016-06-02 H.J. Lu * elf64-x86-64.c: Replace data32 with data16 in comments. 2016-05-31 Alan Modra PR ld/20159 PR ld/16467 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change. (_bfd_elf_add_default_symbol): Don't indirect to/from defined symbol given a version by a script different to the version of the symbol being added. (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and _bfd_elf_strtab_restore. Don't fudge dynstr references. * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete. (struct strtab_save): New. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions. * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare. 2016-06-01 Trevor Saunders * elf32-hppa.h: Add extern "C". * elf32-nds32.h: Likewise. * elf32-tic6x.h: Likewise. d19 1 a19 1 2016-06-01 Nick Clifton d21 3 a23 5 * po/sr.po: New Serbian translation. * configure.ac (ALL_LINGUAS): Add sr. * configure: Regenerate. 2016-05-28 Maciej W. Rozycki d25 2 a26 945 * elfxx-mips.c (b_reloc_p): New function. (_bfd_mips_elf_relocate_section) : Handle branch relocations. 2016-05-28 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): : Drop the region bits of the reloc location from calculation, treat the addend as signed with local non-section symbols and enable overflow detection. 2016-05-28 Alan Modra * aoutx.h: Adjust linker callback calls throughout file, removing dead code. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i960.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. * coff64-rs6000.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * elf-bfd.h: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-ft32.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * simple.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. * elf32-rx.c: (get_symbol_value, get_gp, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. 2016-05-27 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation) : Include the addend in JALX's target alignment verification. 2016-05-27 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): Also use the section name if `bfd_elf_string_from_elf_section' returns an empty string. 2016-05-26 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Use the `%X%H' rather than `%C' format for message. Continue processing rather than returning failure. 2016-05-25 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Call `->einfo' rather than `->warning'. Call `bfd_set_error'. 2016-05-25 H.J. Lu PR binutils/14625 * archive.c (bfd_slurp_armap): Replace bfd_elf64_archive_slurp_armap with _bfd_archive_64_bit_slurp_armap. (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if BFD64 is defined and the archive is too big. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ... (_bfd_archive_64_bit_slurp_armap): This. (bfd_elf64_archive_write_armap): Renamed to ... (_bfd_archive_64_bit_write_armap): This. * configure.ac: Add --enable-64-bit-archive. (want_64_bit_archive): New. Set to true by default for 64-bit MIPS and s390 ELF targets. (USE_64_BIT_ARCHIVE): New AC_DEFINE. * config.in: Regenerated. * configure: Likewise. * elf64-mips.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elf64-s390.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and bfd_elfNN_archive_functions isn't defined. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype. (_bfd_archive_64_bit_write_armap): Likewise. (_bfd_archive_64_bit_slurp_extended_name_table): New macro. (_bfd_archive_64_bit_construct_extended_name_table): Likewise. (_bfd_archive_64_bit_truncate_arname): Likewise. (_bfd_archive_64_bit_read_ar_hdr): Likewise. (_bfd_archive_64_bit_write_ar_hdr): Likewise. (_bfd_archive_64_bit_openr_next_archived_file): Likewise. (_bfd_archive_64_bit_get_elt_at_index): Likewise. (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise. (_bfd_archive_64_bit_update_armap_timestamp): Likewise. * libbfd.h: Regenerated. * plugin.c (plugin_vec): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined. 2016-05-25 H.J. Lu PR ld/20103 * cofflink.c (coff_link_check_archive_element): Return TRUE if linker add_archive_element callback returns FALSE. * ecoff.c (ecoff_link_check_archive_element): Likewise. * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip archive element if linker add_archive_element callback returns FALSE. * elflink.c (elf_link_add_archive_symbols): Likewise. * pdp11.c (aout_link_check_ar_symbols): Likewise. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise. (xcoff_link_check_ar_symbols): Likewise. 2016-05-24 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Unify error reporting code. 2016-05-23 Jim Wilson * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL. * relocs.c: Add BFD_RELOC_AARCH64_NULL. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. 2016-05-23 Kuba Sejdak * config.bfd: Add entry for arm-phoenix. 2016-05-23 Thomas Preud'homme * elf32-arm.c (arm_dedicated_stub_section_padding): New function. (elf32_arm_size_stubs): Declare stub_type in a more outer scope and account for padding for stub section requiring one. (elf32_arm_build_stubs): Add comment to stress the importance of zeroing veneer section content. 2016-05-23 Thomas Preud'homme * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare bfd hook. * bfd-in2.h: Regenerate. * elf32-arm.c (arm_dedicated_stub_output_section_required): New function. (arm_dedicated_stub_output_section_required_alignment): Likewise. (arm_dedicated_stub_output_section_name): Likewise. (arm_dedicated_stub_input_section_ptr): Likewise. (elf32_arm_create_or_find_stub_sec): Add stub type parameter and function description comment. Add support for dedicated output stub section to given stub types. (elf32_arm_add_stub): Add a stub type parameter and pass it down to elf32_arm_create_or_find_stub_sec. (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub. (elf32_arm_size_stubs): Pass stub type when calling elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers. (bfd_elf32_arm_keep_private_stub_output_sections): New function. 2016-05-20 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32 when setting need_convert_load. 2016-05-20 Maciej W. Rozycki * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for microMIPS JALX. 2016-05-19 H.J. Lu PR ld/20117 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check R_386_GOT32X. (elf_i386_convert_load): Don't convert R_386_GOT32. 2016-05-20 Alan Modra PR gas/20118 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY, SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY. 2016-05-19 Cupertino Miranda * elf32-arc.c (arc_elf_final_write_processing): Changed. (debug_arc_reloc): Likewise. (elf_arc_relocate_section): Likewise. (elf_arc_check_relocs): Likewise. (elf_arc_adjust_dynamic_symbol): Likewise. (elf_arc_add_symbol_hook): Likewise. 2016-05-19 Maciej W. Rozycki * config.bfd: Remove `am34-*-linux*' support. 2016-05-19 Alan Modra * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic relocs before plt relocs. 2016-05-19 Alan Modra * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. 2016-05-18 Nick Clifton * po/sv.po: Updated Swedish translation. 2016-05-18 Alan Modra * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms for each BFD. Don't goto error_ret_free_local from outside loop. 2016-05-17 Maciej W. Rozycki * elf-s390-common.c (elf_s390_add_symbol_hook): Remove STB_GNU_UNIQUE handling. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise. * elf32-i386.c (elf_i386_add_symbol_hook): Remove function. (elf_backend_add_symbol_hook): Remove macro. * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols' for STB_GNU_UNIQUE symbols. 2016-05-16 Maciej W. Rozycki * elf32-v850.c (v850_elf_copy_notes): New function, factored out from... (v850_elf_copy_private_bfd_data): ... here. Call the new function and `_bfd_elf_copy_private_bfd_data'. 2016-05-13 H.J. Lu PR ld/20093 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert GOTPCREL relocation against large section. 2016-05-13 Alan Modra * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use linker dynamic sections in calculating size and address of dynamic tags rather than using output sections. Remove asserts. * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise. * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise. * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise. * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise. * elflink.c (bfd_elf_final_link): Likewise. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message. * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and don't set doit. Look up dynobj section. (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION invocation and dynamic tag vma calculation. Don't test boolean var == TRUE. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix DT_JMPREL calc. 2016-05-13 Alan Modra * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix octets_per_byte. Put dynamic .rela.plt last in link orders. Assign output_offset for reloc sections rather than writing sorted relocs from block corresponding to output_offset. 2016-05-12 Alan Modra * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last. 2016-05-11 Andrew Bennett * elfxx-mips.c (print_mips_ases): Add DSPR3. 2016-05-11 Alan Modra * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function. (elf32_hppa_check_relocs): Don't set dynobj. (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections. (elf32_hppa_build_stubs): Likewise. * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare. 2016-05-11 Alan Modra PR 20060 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local. * elf32-ppc.c (ppc_elf_tls_setup): Likewise. 2016-05-10 Jiong Wang * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant aarch64_tls_transition check. 2016-05-10 Thomas Preud'homme * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type enumerator. (arm_stub_sym_claimed): New function. (elf32_arm_create_stub): Use veneered symbol name and section if veneer needs to claim its symbol, and keep logic unchanged otherwise. (arm_stub_claim_sym): New function. (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim veneered symbol, otherwise create local symbol as before. 2016-05-10 Thomas Preud'homme * elf32-arm.c (elf32_arm_size_stubs): Use new macros ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get and set branch type of a symbol. (bfd_elf32_arm_process_before_allocation): Likewise. (elf32_arm_relocate_section): Likewise and fix identation along the way. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_finish_dynamic_symbol): Likewise. (elf32_arm_swap_symbol_in): Likewise. (elf32_arm_swap_symbol_out): Likewise. 2016-05-10 Thomas Preud'homme * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter. * bfd-in2.h: Regenerated. * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section parameter to add_stub_section callback. (elf32_arm_create_or_find_stub_sec): Get output section from link_sec and pass it down to add_stub_section. (elf32_arm_add_stub): Set section to stub_sec if NULL before using it for error message. (elf32_arm_size_stubs): Add output section parameter to add_stub_section function pointer parameter. 2016-05-10 Thomas Preud'homme * elf32-arm.c (elf32_arm_create_stub): New function. (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation. 2016-05-10 Thomas Preud'homme * elf32-arm.c (enum elf32_arm_stub_type): Delete arm_stub_a8_veneer_lwm enumerator. (arm_stub_a8_veneer_lwm): New unsigned constant to replace aforementioned enumerator. (struct elf32_arm_stub_hash_entry): Delete target_addend field and add source_value. (struct a8_erratum_fix): Delete addend field and add target_offset. (stub_hash_newfunc): Initialize source_value field amd remove initialization for target_addend. (arm_build_one_stub): Stop special casing Thumb relocations: promote the else to being always executed, moving the arm_stub_a8_veneer_b_cond specific code in it. Remove stub_entry->target_addend from points_to computation. (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset to target symbol from start of section rather than the offset from the stub address. (elf32_arm_size_stubs): Set stub_entry's source_value and target_value fields from struct a8_erratum_fix's offset and target_offset respectively. (make_branch_to_a8_stub): Rename target variable to loc. Compute veneered_insn_loc and loc using stub_entry's source_value. 2016-05-10 Thomas Preud'homme (elf32_arm_merge_eabi_attributes): Add merging logic for Tag_DSP_extension. 2016-05-10 Pip Cet PR ld/20059 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define as _bfd_generic_copy_link_hash_symbol_type when using generic hash table. 2016-05-09 Nick Clifton PR binutils/20063 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link field before accessing sections array. 2016-05-09 Christophe Monat PR ld/20030 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding. (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs to nb_words. (create_instruction_vldmia): Add is_dp to disambiguate SP/DP encoding. (create_instruction_vldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding, uses it to re-encode. 2016-05-09 Nick Clifton PR 19938 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental commit. 2016-05-09 Alan Modra * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check. 2016-05-06 H.J. Lu PR ld/17550 * elf-bfd.h (elf_link_hash_entry): Update comments for indx, documenting that indx == -3 if symbol is defined in a discarded section. * elflink.c (elf_link_add_object_symbols): Set indx to -3 if symbol is defined in a discarded section. (elf_link_output_extsym): Strip a global symbol defined in a discarded section. 2016-05-06 H.J. Lu * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel MCU. 2016-05-05 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Extract the GOT load conversion to ... (elf_i386_convert_load_reloc): This. New function. * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load conversion to ... (elf_x86_64_convert_load_reloc): This. New function. 2016-05-05 H.J. Lu * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd. Don't check if contents == NULL. (elf_i386_tls_transition): Add from_relocate_section. Check from_relocate_section instead of contents != NULL. Update elf_i386_check_tls_transition call. (elf_i386_check_relocs): Cache the section contents if keep_memory is FALSE. Pass FALSE as from_relocate_section to elf_i386_tls_transition. (elf_i386_relocate_section): Pass TRUE as from_relocate_section to elf_i386_tls_transition. (elf_backend_caches_rawsize): New. * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check if contents == NULL. (elf_x86_64_tls_transition): Add from_relocate_section. Check from_relocate_section instead of contents != NULL. (elf_x86_64_check_relocs): Cache the section contents if keep_memory is FALSE. Pass FALSE as from_relocate_section to elf_x86_64_tls_transition. (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section to elf_x86_64_tls_transition. (elf_backend_caches_rawsize): New. 2016-05-03 Maciej W. Rozycki PR 10549 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle STB_GNU_UNIQUE. 2016-05-03 Jiong Wang * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype. * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise. * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize no_apply_dynamic_relocs. (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though dynamic relocations generated. 2016-04-29 H.J. Lu * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp setting to ... (elf_i386_create_dynamic_sections): Here. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move interp setting to ... (elf_x86_64_create_dynamic_sections): Here. 2016-04-29 H.J. Lu * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC. (elf_i386_fixup_symbol): Pass has_got_reloc to UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_i386_allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (elf_i386_convert_load): Pass TRUE to UNDEFINED_WEAK_RESOLVED_TO_ZERO. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC. (elf_x86_64_fixup_symbol): Pass has_got_reloc to UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_finish_dynamic_symbol): Likewise. (elf_x86_64_convert_load): Pass TRUE to UNDEFINED_WEAK_RESOLVED_TO_ZERO. 2016-04-29 H.J. Lu * elf32-i386.c (check_relocs_failed): New. (elf_i386_check_relocs): Set check_relocs_failed on error. (elf_i386_relocate_section): Skip if check_relocs failed. 2016-04-29 H.J. Lu * elf64-x86-64.c (elf_x86_64_check_relocs): Set check_relocs_failed on error. 2016-04-29 Nick Clifton PR 19938 * elf-bfd.h (struct elf_backend_data): Rename elf_backend_set_special_section_info_and_link to elf_backend_copy_special_section_fields. * elfxx-target.h: Likewise. * elf.c (section_match): Ignore the SHF_INFO_LINK flag when comparing section flags. (copy_special_section_fields): New function. (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field. Perform two scans over special sections. The first one looks for a direct mapping between the output section and an input section. The second scan looks for a possible match based upon section characteristics. * elf32-arm.c (elf32_arm_copy_special_section_fields): New function. Handle setting the sh_link field of SHT_ARM_EXIDX sections. * elf32-i386.c (elf32_i386_set_special_info_link): Rename to elf32_i386_copy_solaris_special_section_fields. * elf32-sparc.c (elf32_sparc_set_special_section_info_link): Rename to elf32_sparc_copy_solaris_special_section_fields. * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to elf64_x86_64_copy_solaris_special_section_fields. 2016-04-28 Nick Clifton * po/zh_CN.po: Updated Chinese (simplified) translation. 2016-04-27 H.J. Lu PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. 2016-04-27 Alan Modra * elflink.c (_bfd_elf_is_start_stop): New function. (_bfd_elf_gc_mark_rsec): Use it. * elf-bfd.h (_bfd_elf_is_start_stop): Declare. 2016-04-26 Trevor Saunders * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *. * mmo.c (mmo_get_section_contents): Likewise. (mmo_set_section_contents): Likewise. 2016-04-26 H.J. Lu * elf-bfd.h (elf_link_hash_table): Update comments for dynsymcount. * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for the unused NULL entry at the head of dynamic symbol table. (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0 checks. 2016-04-21 H.J. Lu * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker created file from dynobj. 2016-04-21 H.J. Lu * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a normal input file if possible. 2016-04-21 Nick Clifton * aout-adobe.c: Use _bfd_generic_link_check_relocs. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * binary.c: Likewise. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-rs6000.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd-in.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mmo.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * som.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * xsym.c: Likewise. * elfxx-target.h: Use _bfd_elf_link_check_relocs. * linker.c (bfd_link_check_relocs): New function. (_bfd_generic_link_check_relocs): New function. * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of _bfd_link_check_relocs field. (struct bfd_target)L Add _bfd_link_check_relocs field. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2016-04-20 H.J. Lu * elf32-i386.c (elf_i386_gc_sweep_hook): Removed. (elf_backend_gc_sweep_hook): Likewise. * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise. (elf_backend_gc_sweep_hook): Likewise. 2016-04-20 H.J. Lu * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations in excluded sections 2016-04-20 H.J. Lu PR ld/19969 * elf64-x86-64.c (check_relocs_failed): New. (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. Support relocation agaist local symbol. Set check_relocs_failed. (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check R_X86_64_32 relocation overflow. (elf_x86_64_relocate_section): Skip if check_relocs failed. Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. 2016-04-20 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Call _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. 2016-04-20 H.J. Lu * elf-bfd.h (_bfd_elf_link_check_relocs): New. * elflink.c (_bfd_elf_link_check_relocs): New function. (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs if check_relocs_after_open_input is FALSE. 2016-04-20 Trevor Saunders * cache.c: Update old style function definitions. * elf32-m68k.c: Likewise. * elf64-mmix.c: Likewise. * stab-syms.c: Likewise. 2016-04-20 Trevor Saunders * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *. 2016-04-15 H.J. Lu * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * doc/Makefile.in: Likewise. 2016-04-14 Andrew Burgess * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-arc.c: Add 'opcode/arc.h' include. (struct arc_relocation_data): Add symbol_name. (arc_special_overflow_checks): New function. (arc_do_relocation): Use arc_special_overflow_checks, reindent as required, add an extra comment. (elf_arc_relocate_section): Setup symbol_name in reloc_data. 2016-04-14 Andrew Burgess * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all entries. (elf_arc_relocate_section): Update enum uses. (elf_arc_check_relocs): Likewise. (elf_arc_finish_dynamic_symbol): Likewise. 2016-04-14 H.J. Lu * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with "sh_link". 2016-04-14 Nick Clifton PR target/19938 * elf-bbfd.h (struct elf_backend_data): New field: elf_strtab_flags. New field: elf_backend_set_special_section_info_and_link * elfxx-target.h (elf_backend_strtab_flags): Define if not already defined. (elf_backend_set_special_section_info_and_link): Define if not already defined. (elfNN_bed): Use elf_backend_set_special_section_info_and_link and elf_backend_strtab_flags macros to initialise fields in structure. * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS being set even if SHF_MERGE is not set. (elf_fake_sections): Likewise. (section_match): New function. Matches two ELF sections based upon fixed characteristics. (find_link): New function. Locates a section in a BFD that matches a section in a different BFD. (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link fields of reserved sections. (bfd_elf_compute_section_file_positions): Set the flags for the .shstrtab section based upon the elf_strtab_flags field in the elf_backend_data structure. (swap_out_syms): Likewise for the .strtab section. * elflink.c (bfd_elf_final_link): Set the flags for the .strtab section based upon the elf_strtab_flags field in the elf_backend_data structure. * elf32-i386.c (elf32_i386_set_special_info_link): New function. (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris targets. (elf_backend_set_special_section_info_and_link): Define for Solaris targets. * elf32-sparc.c: Likewise. * elf64-x86-64.c: Likewise. 2016-04-11 H.J. Lu PR ld/19939 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer to bfd_boolean. * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc applies to read-only section. * elf32-i386.c (elf_i386_link_hash_table): Add readonly_dynrelocs_against_ifunc. (elf_i386_allocate_dynrelocs): Updated. (elf_i386_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations only if readonly_dynrelocs_against_ifunc is TRUE. * elf64-x86-64.c (elf_x86_64_link_hash_table): Add readonly_dynrelocs_against_ifunc. (elf_x86_64_allocate_dynrelocs): Updated. (elf_x86_64_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations only if readonly_dynrelocs_against_ifunc is TRUE. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): Updated. 2016-04-06 Thomas Preud'homme * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be a fall through from error_ret_free_internal. Free local_syms in error_ret_free_local if allocated from bfd_elf_get_elf_syms (). 2016-04-05 Cupertino Miranda * elf32-arc.c (plt_do_relocs_for_symbol): Changed. (relocate_plt_for_entry): Likewise. 2016-04-05 Cupertino Miranda * elf32-arc.c (elf_arc_check_relocs): Changed 2016-04-05 Cupertino Miranda * elf32-arc.c (name_for_global_symbol): Changed assert. (get_replace_function): Created.: (struct arc_relocation_data): Changed to signed types. (defines S, L, P, PDATA): Casted to signed type. (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise. (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed. (arc_do_relocation): Changed. 2016-04-05 Cupertino Miranda * elf32-arc.c (name_for_global_symbol): Added assert to check for symbol index. (elf_arc_relocate_section): Added and changed asserts, validating the synamic symbol index. (elf_arc_finish_dynamic_symbol): Do not fill the dynamic relocation if symbol has dynindx set to -1. 2016-04-05 Maciej W. Rozycki * elflink.c (elf_link_add_object_symbols): Always turn hidden and internal symbols which have a dynamic index into local ones. 2016-04-04 Nick Clifton PR 19872 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised version number if the version is zero. 2016-04-01 Alan Modra PR 19886 * elflink.c (on_needed_list): Recursively check needed status. (elf_link_add_object_symbols): Adjust. 2016-03-30 Senthil Kumar Selvaraj * elf32-avr.c (avr_elf32_load_records_from_section): Free internal_relocs only if they aren't cached. 2016-03-29 Nick Clifton PR 17334 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax assertion on the size of the got section to allow it to be bigger than the number of relocs. 2016-03-29 Toni Spets PR 19878 * coffcode.h (coff_write_object_contents): Revert accidental 2014-11-10 change. 2016-03-22 Alan Modra PR 19850 * dwarf2.c (read_attribute_value): Skip info_ptr check for DW_FORM_flag_present. 2016-03-22 Nick Clifton d28 7 a34 2 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an architecture name for backwards compatibility. d36 1 a36 2 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible unbounded stack use. d38 1 a38 2 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a sufficiently recent version of GCC. d41 1 a41 306 2016-03-22 Alan Modra PR 19851 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning. 2016-03-21 Andrew Burgess * archures.c (bfd_mach_arc_nps400): Define. * bfd-in2.h: Regenerate. * cpu-arc.c (arch_info_struct): New entry for nps400, renumber some existing entries to make space. * elf32-arc.c (arc_elf_object_p): Add nps400 case. (arc_elf_final_write_processing): Likewise. 2016-03-21 Andrew Burgess * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of EF_ARC_CPU_GENERIC. (arc_elf_final_write_processing): Don't bother setting cpu field in e_flags, this will have been set elsewhere. 2016-03-21 Andrew Burgess * elf32-arc.c (arc_elf_final_write_processing): Switch to using EF_ARC_MACH_MSK. 2016-03-21 Nick Clifton * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144 * configure: Regenerate. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of alloca with call to xmalloc. * elf32-nds32.c: Likewise. * elf64-hppa.c: Likewise. * elfxx-mips.c: Likewise. * pef.c: Likewise. * pei-x86_64.c: Likewise. * som.c: Likewise. * xsym.c: Likewise. 2016-03-15 H.J. Lu PR ld/19827 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol locally in PIE. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. 2016-03-15 H.J. Lu PR ld/19807 * elf64-x86-64.c (elf_x86_64_relocate_section): Check no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S relocation overflow check. 2016-03-14 H.J. Lu * bfd-in2.h: Regenerated. 2016-03-11 Dan Gissel PR 19713 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset uses bytes not octets. * elflink.c (resolve_section): Likewise. Add a bfd parameter. (eval_section): Pass the input_bfd to resolve_section. (bfd_elf_perform_complex_relocation): Convert byte offset to octets before read and writing values. (elf_link_input_bfd): Add byte to octet conversions. (elf_reloc_link_order): Likewise. (elf_fixup_link_order): Likewise. (bfd_elf_final_link): Likewise. * reloc.c (_bfd_final_link_relocate): Likewise. * syms.c (_bfd_stab_section_find_nearest_line): Likewise. 2016-03-10 Nick Clifton * config.bfd: Mark the i370 target as obsolete. 2016-03-09 Pedro Alves * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old gcc ABI)" to printable name. * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead of "v850-rh850" as printable name. 2016-03-09 Leon Winter PR ld/19623 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply relocations against absolute symbols. 2016-03-09 Alan Modra PR binutils/19775 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero length elements in the archive. 2016-03-08 H.J. Lu PR ld/19789 * elflink.c (elf_link_add_object_symbols): Create dynamic sections for -E/--dynamic-list only when not relocatable. 2016-03-08 H.J. Lu PR ld/19784 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count for locally defined local IFUNC symbols in shared object. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. 2016-03-08 H.J. Lu PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking together. 2016-03-08 Cupertino Miranda Andrew Burgess * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32. (arc_bfd_put_32): Becomes an alias for bfd_put_32. (arc_elf_howto_init): Added assert to validate relocations. (get_middle_endian_relocation): Delete. (middle_endian_convert): New function. (ME): Redefine, now does nothing. (IS_ME): New define. (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO' definition to call middle_endian_convert. Add a new local variable and make use of this throughout. Added call to arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations. 2016-03-07 Nick Clifton PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. 2016-03-07 Jiong Wang * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced. 2016-03-04 H.J. Lu PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. 2016-03-02 Alan Modra * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2016-02-29 Cupertino Miranda * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the relocation addend when sections get merged. 2016-02-29 Cupertino Miranda * elf32-arc.c (arc_elf_final_write_processing): Add condition to the flag change. (elf_arc_relocate_section): Fixes and conditions to support PIE. Assert for code sections dynamic relocs. 2016-02-26 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2. 2016-02-26 H.J. Lu PR ld/19609 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for load with locally bound symbols if PIC is false or there is no base register. Optimize branch to 0 if PIC is false. (elf_i386_relocate_section): Don't generate dynamic relocations against undefined weak symbols if PIC is false. * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization if we can't estimate relocation overflow with --no-relax. Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound symbols if PIC is false. Optimize branch to 0 if PIC is false. (elf_x86_64_relocate_section): Don't generate dynamic relocations against undefined weak symbols if PIC is false. 2016-02-26 H.J. Lu PR ld/19645 * bfd.c (bfd): Change flags to 20 bits. (BFD_CONVERT_ELF_COMMON): New. (BFD_USE_ELF_STT_COMMON): Likewise. (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise. * configure.ac: Remove --enable-elf-stt-common. * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for common symbol depending on BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for STT_COMMON. * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check STT_COMMON. (elf_link_convert_common_type): New function. (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for common symbol depending on BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx. * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON to object_flags. (TARGET_LITTLE_SYM): Likewise. * syms.c (BSF_KEEP_G): Renamed to ... (BSF_ELF_COMMON): This. * bfd-in2.h: Regenerated. * config.in: Likewise. * configure: Likewise. 2016-02-26 H.J. Lu PR ld/19636 PR ld/19704 PR ld/19719 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. (elf_i386_link_hash_entry): Add has_got_reloc and has_non_got_reloc. (elf_i386_link_hash_table): Add interp. (elf_i386_link_hash_newfunc): Initialize has_got_reloc and has_non_got_reloc. (elf_i386_copy_indirect_symbol): Copy has_got_reloc and has_non_got_reloc. (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc. (elf_i386_fixup_symbol): New function. (elf_i386_pie_finish_undefweak_symbol): Likewise. (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic relocations and discard relocations against resolved undefined weak symbols in executable. Don't make resolved undefined weak symbols in executable dynamic. Keep dynamic non-GOT/non-PLT relocation against undefined weak symbols in PIE. (elf_i386_size_dynamic_sections): Set interp to .interp section. (elf_i386_relocate_section): Don't generate dynamic relocations against resolved undefined weak symbols in PIE, except for R_386_PC32. (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols. Don't generate dynamic relocation against resolved undefined weak symbol in executable. (elf_i386_finish_dynamic_sections): Call elf_i386_pie_finish_undefweak_symbol on all symbols in PIE. (elf_backend_fixup_symbol): New. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. (elf_x86_64_link_hash_entry): Add has_got_reloc and has_non_got_reloc. (elf_x86_64_link_hash_table): Add interp. (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and has_non_got_reloc. (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and has_non_got_reloc. (elf_x86_64_check_relocs): Set has_got_reloc and has_non_got_reloc. (elf_x86_64_fixup_symbol): New function. (elf_x86_64_pie_finish_undefweak_symbol): Likewise. (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic relocations and discard relocations against resolved undefined weak symbols in executable. Don't make resolved undefined weak symbols in executable dynamic. (elf_x86_64_size_dynamic_sections): Set interp to .interp section. (elf_x86_64_relocate_section): Check relocation overflow for dynamic relocations against unresolved weak undefined symbols. Don't generate dynamic relocations against resolved weak undefined symbols in PIE. (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols. Don't generate dynamic relocation against resolved undefined weak symbol in executable. (elf_x86_64_finish_dynamic_sections): Call elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE. (elf_backend_fixup_symbol): New. 2016-02-26 Alan Modra * elf64-ppc.c (create_linkage_sections): Create sfpr when save_restore_funcs, rest of sections when not relocatable. (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. (sfpr_define): Define all symbols on emitted code. (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created when relocatable. Move sfpr_define loop earlier. 2016-02-24 H.J. Lu * elf64-x86-64.c (elf_x86_64_need_pic): New function. (elf_x86_64_relocate_section): Use it. Replace x86_64_elf_howto_table[r_type] with howto. 2016-02-24 H.J. Lu PR ld/19698 * elflink.c (bfd_elf_record_link_assignment): Set versioned if symbol version is unknown. 2016-02-24 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. d43 3 a45 1 2016-02-23 H.J. Lu d47 1 a47 3 * elflink.c (bfd_elf_record_link_assignment): Check for shared library, instead of PIC, and don't check PDE when making linker assigned symbol dynamic. d49 1 a49 1 2016-02-23 Faraz Shahbazker d51 1 a51 2 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment ABIVERSION for non-executable stack. d53 3 a55 1 2016-02-23 Rich Felker d57 1 a57 3 PR target/19516 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Always produce a RELATIVE reloc for a local symbol. d59 23 a81 1 2016-02-23 Hans-Peter Nilsson d83 1 a83 3 Fix test-case ld-elf/pr19617b * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't discard unused non-function symbols when --dynamic-list-data. d85 1 a85 1 2016-02-22 H.J. Lu d87 1 a87 2 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the dynsym section, even if it is empty, with dynamic sections. d89 34 a122 1 2016-02-22 H.J. Lu d124 1 a124 2 * syms.c: Remove BSF_COMMON from comments. * bfd-in2.h: Regenerated. d126 2 a127 1 2016-02-22 Jiong Wang d129 1 a129 3 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation for destination. Remove useless function parameters. (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub. d131 1 a131 1 2016-02-19 Nick Clifton d133 1 a133 266 PR ld/19629 * aoutx.h (aout_link_add_symbols): Check for out of range string table offsets. PR ld/19628 * reloc.c (bfd_generic_get_relocated_section_contents): Stop processing if we encounter a reloc without an associated symbol. 2016-02-18 H.J. Lu PR ld/19617 * elflink.c (elf_link_add_object_symbols): Always create dynamic sections for -E/--dynamic-list. 2016-02-17 H.J. Lu * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined to bfd_true. 2016-02-16 Joseph Myers * plugin.c (plugin_vec): Set match priority to 255. * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When matching against the plugin vector, take priority from there not from TEMP. 2016-02-15 Nick Clifton * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values for length and type fields. Use a signed value for the suffix_length field. 2016-02-10 H.J. Lu PR ld/19601 * elf32-i386.c (elf_i386_relocate_section): Mask off the least significant bit in GOT offset for R_386_GOT32X. 2016-02-10 Nick Clifton PR 19405 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed immediate values. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the number of messages about FDE encoding preventing .eh_frame_hdr generation. 2016-02-09 Nick Clifton * oasys.c (oasys_archive_p): Fix indentation. * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned constant for left shifting. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more helpful warning message to explain why certain AArch64 relocs might overflow. 2016-02-05 Simon Marchi * pe-mips.c (coff_mips_reloc): Fix formatting. 2016-02-05 Cupertino Miranda * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2 to bfd_mach_arc_arc600. 2016-02-04 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch for big-endian. 2016-02-02 H.J. Lu PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distances in the compressed_size field of the output section. 2016-02-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict ELFv2 entry optimization. 2016-02-02 H.J. Lu PR binutils/19547 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are no relocations in relocatable files. 2016-02-01 H.J. Lu PR ld/19553 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED doesn't match the symbol referenced by regular object. 2016-02-01 Nathaniel Smith * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both CODE and DATA. 2016-02-01 Alan Modra * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on an out of range reloc_index. * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise. 2016-02-01 Kamil Rytarowski * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo. (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c. * Makefile.in: Regenerated. 2016-02-01 Jan Kratochvil * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation. 2016-01-31 John David Anglin PR ld/19526 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output files. * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. 2016-01-30 H.J. Lu PR ld/19539 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation against STT_GNU_IFUNC symbol only with dynamic symbols. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. 2016-01-28 H.J. Lu PR binutils/19523 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to decompress debug sections. 2016-01-25 Maciej W. Rozycki * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to `dynindx'. 2016-01-25 Nick Clifton PR target/19435 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free dsym filename buffer. 2016-01-24 Maciej W. Rozycki * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation. 2016-01-24 Maciej W. Rozycki * elfxx-mips.c (BZ16_REG): Correct calculation. 2016-01-21 Nick Clifton * elf32-arc.c (ADD_RELA): Fix compile time warning errors by changing the type of _loc to be bfd_byte *. (elf_arc_finish_dynamic_symbol): Likewise. 2016-01-21 Nick Clifton PR ld/19455 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF class of the linker stub bfd. (elf32_arm_check_relocs): Skip check for pic format after processing a vxWorks R_ARM_ABS12 reloc. * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when reporting a class mismatch. 2016-01-21 Jiong Wang * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch veneer for sym_sec != input_sec. (elfNN_aarch64_size_stub): Support STT_SECTION symbol. (elfNN_aarch64_final_link_relocate): Take rela addend into account when calculation destination. 2016-01-21 Alan Modra * elf-linux-core.h (swap_linux_prpsinfo32_out): New function. (swap_linux_prpsinfo64_out): New function. (LINUX_PRPSINFO32_SWAP_FIELDS): Delete. (LINUX_PRPSINFO64_SWAP_FIELDS): Delete. * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset. (elfcore_write_linux_prpsinfo64): Likewise. * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function. (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete. (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset. 2016-01-21 Alan Modra * elf-linux-core.h: Rename from elf-linux-psinfo.h. * elf.c: Adjust #include. * elf32-ppc.c: Don't #include elf-linux-psinfo.h * Makefile.am (SOURCE_HFILES): Update. * Makefile.in: Regenerate. * po/SRC-PORFILES.in: Regenerate. 2016-01-21 Alan Modra * configure.ac: Move corefile selection later in file. Move tdefaults code immediately after other target vector code. * configure: Regenerate. 2016-01-20 Mickael Guene * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread section using '.text.noread' pattern. 2016-01-19 John Baldwin * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes. 2016-01-18 Miranda Cupertino Zissulescu Claudiu * arc-plt.def: New file. * arc-plt.h: Likewise. * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry, elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry, elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry, elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove. (name_for_global_symbol): Added. (ADD_RELA): Helper to create dynamic relocs. (new_got_entry_to_list): Create a new got entry in linked list. (symbol_has_entry_of_type): Search for specific type of entry in list. (is_reloc_for_GOT): return FALSE for any TLS related relocs. (is_reloc_for_TLS, arc_elf_set_private_flags) (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data) (arc_elf_merge_private_bfd_data): New functions. (debug_arc_reloc): Cleaned debug info printing. (PDATA reloc): Changed not to perform address alignment. (reverse_me): Added. Fix for ARC_32 relocs. (arc_do_relocation): Return bfd_reloc_of when no relocation should occur. (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets. Changed function to access an array of list of GOT entries instead of just an array of offsets. (elf_arc_relocate_section): Added support for PIC and TLS related relocations. (elf_arc_check_relocs): Likewise. (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol, (elf_arc_finish_dynamic_sections): Likewise (arc_create_dynamic_sections): Modified conditions to create dynamic sections. (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro. (plt_do_relocs_for_symbol, relocate_plt_for_symbol) (relocate_plt_for_entry): Changed to support new way to define PLT related code. (add_symbol_to_plt): Likewise. (arc_elf_link_hash_table_create): New function. 2016-01-18 Nick Clifton PR ld/19440 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external section number into internal section number. * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise. * coffswap.h (coff_swap_sym_in): Likewise. * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise. * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal section number field is big enough to hold the external value. 2016-01-17 Alan Modra d135 1 d137 1 d139 1 a139 8 2016-01-12 Yury Usishchev * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind when address in first unwind entry does not match start of section. 2016-01-08 Richard Sandiford Jiong Wang d141 1 a141 3 PR ld/19368 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to reloc_class_ifunc. d143 1 a143 1 2016-01-06 Andrew Burgess d145 3 a147 4 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to place 'R_' before the reloc name returned. (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before the relocation string. d149 1 a149 1 2016-01-04 Maciej W. Rozycki d151 2 a152 3 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function, factored out from... (_bfd_mips_elf_merge_private_bfd_data): ... here. d154 1 a154 1 2016-01-04 Maciej W. Rozycki d156 3 a158 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move attribute check after ELF file header flag check. d160 1 a160 1 2016-01-04 Maciej W. Rozycki d162 2 a163 2 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the return status from `_bfd_elf_merge_object_attributes'. d165 1 a165 1 2016-01-04 Maciej W. Rozycki d167 6 a172 3 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function, factored out from... (_bfd_mips_elf_merge_private_bfd_data): ... here. d174 1 a174 1 2016-01-04 Maciej W. Rozycki d176 3 a178 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the handling of input MIPS ABI flags together. d180 1 a180 1 2016-01-04 Maciej W. Rozycki d182 3 a184 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress attribute checks for null input. d186 1 a186 1 2016-01-04 Maciej W. Rozycki d188 2 a189 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local pointers to target data. d191 1 a191 1 2016-01-04 Maciej W. Rozycki d193 3 a195 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct an FP ABI warning. d197 1 a197 1 2016-01-01 Alan Modra d201 1 a201 1 For older changes see ChangeLog-2015 and doc/ChangeLog-0415 d203 1 a203 1 Copyright (C) 2016 Free Software Foundation, Inc. @ 1.9.12.1 log @Sync with HEAD @ text @d1 1 a1 1 2018-01-27 Nick Clifton d3 11 a13 1 This is the 2.30 release: d15 13 a27 2 * version.m4 (BFD_VERSION): Set to 2.30 * development.sh: Set to false. a28 1 * po/bfd.pot: Regenerate. d30 1 a30 1 2018-01-27 Nick Clifton d32 2 a33 1 * po/ru.po: Updated Russian translation. d35 1 a35 1 2018-01-26 Alan Modra d37 489 a525 2 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when .branch_lt changes size. d527 1 a527 1 2018-01-25 Eric Botcazou d529 5 a533 3 PR ld/22727 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Do a mere lookup of the __tls_get_addr symbol instead of adding it. d535 945 a1479 2 Revert 2017-10-19 H.J. Lu d1481 2 a1482 7 PR ld/22263 * elfxx-sparc.c (sparc_elf_tls_transition): Replace bfd_link_pic with !bfd_link_executable, !bfd_link_pic with bfd_link_executable for TLS check. (_bfd_sparc_elf_check_relocs): Likewise. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. d1484 2 a1485 1 2018-01-23 Nick Clifton d1487 2 a1488 1 * version.m4: Reset version number to 2.29.90. d1491 306 a1796 1 2018-01-20 H.J. Lu d1798 1 a1798 3 PR ld/22721 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the versioned __tls_get_addr symbol. d1800 3 a1802 1 2018-01-19 Nick Clifton d1804 1 a1804 1 * po/fr.po: Updated French translation. d1806 2 a1807 1 2018-01-18 Alan Modra d1809 1 a1809 3 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink. * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align. (ppc64_elf_build_stubs): Likewise. d1811 3 a1813 1 2018-01-18 Alan Modra d1815 1 a1815 23 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier. (CRSETEQ, BEQCTRM): Define. (is_nonpic_glink_stub): Don't check bctr. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (ppc_elf_relax_section): Size speculation barrier. (output_bctr): New function. (write_glink_stub): Use output_bctr. (ppc_elf_relocate_section): Use output_bctr for long branch stub. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Use output_bctr. * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps. * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define. (GLINK_PLTRESOLVE_SIZE): Size speculation barrier. (size_global_entry_stubs): Handle speculation barrier sizing. (plt_stub_size): Likewise. (output_bctr): New function. (build_plt_stub, build_tls_get_addr_stub): Output speculation barrier. (ppc_build_one_stub): Likewise for ppc_stub_plt_branch. (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch. (build_global_entry_stubs): Output speculation barrier. (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub. * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps. d1817 3 a1819 1 2018-01-18 Alan Modra d1821 1 a1821 1 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. d1823 2 a1824 1 2018-01-18 Alan Modra d1826 1 a1826 34 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle __tls_get_addr_opt, and alignment sizing. (TLS_GET_ADDR_GLINK_SIZE): Delete. (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE. (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6, or 8 insns. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE. (ppc_elf_size_dynamic_sections): Likewise. Size branch table by PLT reloc count. (write_glink_stub): Handle __tls_get_addr_opt stub. Pad out to size given by GLINK_ENTRY_SIZE. (ppc_elf_relocate_section): Adjust write_glink_stub call. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Write PLTresolve without using insn array since so many need rewriting. * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align. * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without nops. Adjust all uses. (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE in glink_vma calculation. (struct ppc_link_hash_table): Add global_entry section pointer. (create_linkage_sections): Create separate section for global entry stubs. (PPC_LO, PPC_HI, PPC_HA): Move earlier. (size_global_entry_stubs): Handle sizing for aligned stubs. (ppc64_elf_size_dynamic_sections): Handle global_entry alloc, and don't stash end of glink branch table in rawsize. (ppc_build_one_stub): Rewrite stub size calculations. (build_global_entry_stubs): Use new section. (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops. Build lazy link stubs out to end of section. Build global entry stubs in new section. d1828 2 a1829 1 2018-01-17 Nick Clifton d1831 1 a1831 2 * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. d1833 3 a1835 1 2018-01-15 Nick Clifton d1837 1 a1837 1 * po/uk.po: Updated Ukranian translation. d1839 266 a2104 1 2018-01-13 Nick Clifton a2105 1 * version.m4 (BFD_VERSION): Change to 2.30.0. a2106 1 * po/bfd.pot: Regenerate. d2108 8 a2115 1 2018-01-13 Nick Clifton d2117 3 a2119 1 2.30 branch created. d2121 1 a2121 1 2018-01-12 Jens Widell d2123 4 a2126 3 * elf.c (setup_group): Optimize search for group by remembering last found group and restarting search at that index. * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field. d2128 1 a2128 1 2018-01-12 Gunther Nikl d2130 3 a2132 2 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle bfd_link_common_skip_none in switch. d2134 1 a2134 1 2018-01-12 Alan Modra d2136 2 a2137 3 PR ld/22649 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic references on forced local symbols. d2139 1 a2139 1 2018-01-12 Vlad Ivanov d2141 2 a2142 2 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. d2144 1 a2144 1 2018-01-11 H.J. Lu d2146 3 a2148 6 PR ld/22393 * elf.c (_bfd_elf_map_sections_to_segments): When generating separate code and read-only data LOAD segments, create a new LOAD segment if the previous section contains text and the current section doesn't or vice versa. Don't put a writable section in a read-only segment if there is a RELRO segment. d2150 1 a2150 1 2018-01-11 H.J. Lu d2152 2 a2153 3 PR ld/22649 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic references on forced local symbols. d2155 1 a2155 1 2018-01-11 H.J. Lu d2157 2 a2158 3 PR ld/22677 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY, INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section. d2160 1 a2160 1 2017-09-27 Kuan-Lin Chen d2162 2 a2163 2 PR 22662 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error. d2165 1 a2165 1 2018-01-03 John Baldwin d2167 2 a2168 3 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and NT_FREEBSD_PROCSTAT_VMMAP. d2170 1 a2170 1 2018-01-03 Alan Modra d2174 1 a2174 1 For older changes see ChangeLog-2017 d2176 1 a2176 1 Copyright (C) 2018 Free Software Foundation, Inc. @ 1.9.12.2 log @Sync with HEAD, resolve a couple of conflicts @ text @d1 1 a1 14 2018-07-18 Nick Clifton 2.31.1 Release point. * version.m4: Set to 2.31.1 * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. 2018-07-14 Nick Clifton * version.m4: Update to 2.31.0. * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. d3 1 a3 1 2018-07-14 Nick Clifton d5 1 a5 2 2.31 Release point. * version.m4: Update to 2.31. a9 3053 2018-07-03 Alan Modra PR 17550 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols in discarded sections. 2018-07-11 Max Filippov * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate space for dynamic relocation for undefined weak symbol. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE relocation for undefined weak symbols. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation section for relocations against undefined weak symbols. 2018-07-10 Maciej W. Rozycki * elflink.c (bfd_elf_final_link): Rename `remove' local variable to `remove_section'. 2018-07-09 H.J. Lu PR ld/23388 * configure.ac: Use changequote for "i[3-7]86-*-linux-*". * configure: Regenerated. 2018-07-09 H.J. Lu PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. 2018-07-06 Alan Modra * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. 2018-07-05 Jim Wilson * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*. (riscv64*-*-*): Likewise. (riscv-*-*): Add as an alias for riscv32*-*-*. 2018-07-05 Alan Modra * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error on mismatch. Remove "warning: " from messages. Track last bfd used to set tags. (ppc_elf_merge_obj_attributes): Likewise. Handle status from _bfd_elf_ppc_merge_fp_attributes. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status from _bfd_elf_ppc_merge_fp_attributes. 2018-07-03 Alan Modra * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes sections. 2018-07-03 Alan Modra * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define. * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding incompatible attribute. (ppc_elf_merge_obj_attributes): Likewise. Return _bfd_elf_merge_object_attributes result. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return _bfd_elf_merge_object_attributes result. 2018-07-05 Nick Clifton * po/ru.po: Updated Russian translation. 2018-07-04 H.J. Lu * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h. * Makefile.in: Regenerated. 2018-07-04 H.J. Lu PR ld/23324 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the R_X86_64_converted_reloc_bit bit. 2018-06-26 Nick Clifton * po/uk.po: Updated Ukranian translation. 2018-06-25 Nick Clifton * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check for malloc returning NULL. (_bfd_aarch64_erratum_843419_fixup): Check for _bfd_aarch64_erratum_835769_stub_name returning NULL. 2018-06-24 Nick Clifton * version.m4 (BFD_VERSION): Update to 2.30.90. * configure: Regenerate. * po/bfd.pot: Regenerate. 2018-06-24 Nick Clifton 2.31 branch created. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding) (_bfd_mips_elf_cant_unwind_opcode): Correct formatting. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_post_process_headers): Keep EI_ABIVERSION setting together. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT) (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64) (MIPS_LIBC_ABI_MAX): New enumeration constants. (_bfd_mips_post_process_headers): Use them in place of magic numbers. 2018-06-21 Jim Wilson * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment. Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset. 2018-06-21 Alan Modra * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign". * doc/Makefile.in: Regenerate. 2018-06-20 Renlin Li * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. 2018-06-20 Nick Clifton PR 23316 * opncls.c (get_build_id): Check for a negative or excessive data size in the build-id note. 2018-06-20 Nick Clifton PR 23299 * mach-o.c (cputype): New function. (cpusubtype): New function. (bfd_mach_o_bfd_print_private_data): New function. Dispalys the values in the MACH-O file header. (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and cpusubtype fields from the input bfd's mach-o header to the output bfd. * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Redefine to bfd_mach_o_bfd_print_private_data. * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype. 2018-06-19 Maciej W. Rozycki PR ld/22966 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the `.got.plt' entry referred is in range. (mips_finish_exec_plt): Correct the range check for `.got.plt' start. Replace the assertion used for that with a proper error message. 2018-06-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix formatting. 2018-06-19 Simon Marchi * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. (INCLUDES): Rename to ... (AM_CPPFLAGS): ... this. * configure.ac: Remove AC_PREREQ. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add info-in-builddir no-texinfo.tex. (info_TEXINFOS): Rename bfd.texinfo to bfd.texi. * doc/bfd.texinfo: Rename to ... * doc/bfd.texi: ... this. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. 2018-06-18 Mephi PR 23297 * mach-o-x86-64.c (x86_64_howto_table): Add entry for BFD_RELOC_MACH_O_X86_64_RELOC_TLV. (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc. (bfd_mach_o_x86_64_swap_reloc_out): Likewise. * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-06-14 Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add GINV extension. 2018-06-14 H.J. Lu PR binutils/23267 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first symbol version is base version. 2018-06-14 Alan Modra * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs". * elflink.c (_bfd_elf_init_2_index_sections): Comment fix. (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs". (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when "dynamic_relocs" is not set. * elfxx-mips.c (count_section_dynsyms): Likewise. 2018-06-14 Alan Modra PR 23282 * bfdio.c (bfd_seek): Optimize away seeks to current position. 2018-06-13 Scott Egerton Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add CRC. 2018-06-08 H.J. Lu PR ld/23161 * elfxx-x86.c (elf_x86_hide_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to hide hidden __bss_start, _end and _edata in shared libraries. 2018-06-07 Alan Modra * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs. 2018-06-05 Alan Modra * bfd.c (struct bfd): Update comment on "where" usage. * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec", "iostream", and "where" from containing archive file. Return error on NULL iovec. (bfd_bread): Similarly, and return error attempted out of bounds archive element access. (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and "where" from containing archive file. (bfd_seek): Likewise. Return error on NULL iovec. Don't attempt to optimize away seeks. Don't paper over errors by calling bfd_tell. (bfd_get_mtime): Call bfd_stat rather than iovec->bstat. (bfd_get_size): Likewise. (bfd_mmap): Operate on and use iovec of containing archive file. Return error on NULL iovec. * cache.c (bfd_cache_lookup_worker): Abort if working on archive element bfd. (cache_bread_1): Delete bfd parameter, add FILE* parameter. Don't ignore zero byte reads. (cache_bread): Look up FILE* in cache here. Error on NULL lookup. (cache_bwrite): Rename "where" to "from". (cache_bmmap): Don't handle archive elements. * coffcode.h (coff_slurp_line_table): Exit early on zero lineno count. * bfd-in2.h: Regenerate. 2018-06-05 Alan Modra PR 23254 * plugin.c (bfd_plugin_open_input): Allow for possibility of nested archives. Open file again for plugin. (try_claim): Don't save and restore file position. Close file if not claimed. * sysdep.h (O_BINARY): Define. 2018-06-04 Max Filippov * elf32-xtensa.c (xtensa_read_table_entries): Make global. (compute_fill_extra_space): Drop declaration. Rename function to xtensa_compute_fill_extra_space. (compute_ebb_actions, remove_dead_literal): Update references to compute_fill_extra_space. 2018-06-04 Volodymyr Arbatov * elf32-xtensa.c (elf32xtensa_separate_props): New global variable. (xtensa_add_names): New function. (xtensa_property_section_name): Add new parameter separate_sections, use it to choose property section name. (xtensa_get_separate_property_section): New function. (xtensa_get_property_section): Invoke xtensa_get_separate_property_section to get individual property section if it exists, common property section otherwise. (xtensa_make_property_section): Pass elf32xtensa_separate_props to xtensa_property_section_name. 2018-06-04 H.J. Lu PR binutils/23146 * bfd-in.h: Include "diagnostics.h". * bfd-in2.h: Regenerated. * elf32-arm.c (elf32_arm_nabi_write_core_note): Use DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and DIAGNOSTIC_POP to silence GCC 8.1 warnings with -Wstringop-truncation. * elf32-ppc.c (ppc_elf_write_core_note): Likewse. * elf32-s390.c (elf_s390_write_core_note): Likewse. * elf64-ppc.c (ppc64_elf_write_core_note): Likewse. * elf64-s390.c (elf_s390_write_core_note): Likewse. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse. 2018-06-03 Jim Wilson PR ld/23244 * elfnn-riscv.c (riscv_elf_relocate_section) : Check for and handle an undefined weak with no PLT. PR ld/22756 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check to code that ignores duplicate symbols. 2018-06-01 H.J. Lu * version.m4: Bump version to 2.30.52 * configure: Regenerated. 2018-06-01 Alan Modra * bfd.c (_bfd_error_handler): Arrange for this function to be declared in bfd-in2.h. * libbfd-in.h (_bfd_error_handler): Don't declare. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-30 Amaan Cheval * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems* This is needed to generate UEFI application image files from ELFs. 2018-05-28 H.J. Lu * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_i386_lazy_ibt_plt): Likewise. (elf_i386_nacl_plt): Likewise. * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ... (elf_x86_64_tlsdesc_plt_entry): This. (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_x86_64_lazy_bnd_plt): Likewise. (elf_x86_64_lazy_ibt_plt): Likewise. (elf_x32_lazy_ibt_plt): Likewise. (elf_x86_64_nacl_plt): Likewise. (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end to update TLSDESC entry. * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments. Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end. (elf_x86_non_lazy_plt_layout): Update comments. (elf_x86_plt_layout): Likewise. 2018-05-28 H.J. Lu PR ld/23238 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-s390.c (elf_backend_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf64-s390.c (elf_backend_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC handling. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elflink.c (elf_link_add_object_symbols): Set elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols. 2018-05-26 H.J. Lu PR ld/23194 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New. * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function. Extracted from _bfd_elf_link_assign_sym_version. (_bfd_elf_link_hide_sym_by_version): New function. (_bfd_elf_link_assign_sym_version): Use _bfd_elf_link_hide_versioned_symbol. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call _bfd_elf_link_hide_sym_by_version instead of bfd_hide_sym_by_version. Don't check unversioned symbol. 2018-05-25 Alan Modra * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-05-25 Alan Modra * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS. * configure: Regenerate. 2018-05-23 H.J. Lu * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING to data. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec is NULL. (elf32_hppa_size_stubs): Only create stubs for load, alloc, code sections. (final_link_relocate): Revert last change. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (final_link_relocate): Don't look for plt call stubs in non-alloc sections. 2018-05-21 H.J. Lu PR ld/23201 * aout-target.h (MY_bfd_link_hide_symbol): New. * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise. * binary.c (binary_bfd_link_hide_symbol): Likewise. * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise. * coffcode.h (coff_bfd_link_hide_symbol): Likewise. * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise. * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise. * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise. * ihex.c (ihex_bfd_link_hide_symbol): Likewise. * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise. * linker.c (_bfd_generic_link_hide_symbol): Likewise. (bfd_link_hide_symbol): Likewise. * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise. * mmo.c (mmo_bfd_link_hide_symbol): Likewise. * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise. * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise. * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise. * som.c (som_bfd_link_hide_symbol): Likewise. * srec.c (srec_bfd_link_hide_symbol): Likewise. * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise. * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise. (alpha_vms_bfd_link_hide_symbol): Likewise. * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise. * coff64-rs6000.c (rs6000_xcoff64_vec): Add _bfd_generic_link_hide_symbol. (rs6000_xcoff64_aix_vec): Likewise. * elflink.c (bfd_elf_record_link_assignment): Don't make forced local symbol dynamic. (_bfd_elf_link_hide_symbol): New function. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't check root.ldscript_def. * targets.c (bfd_target): Add _bfd_link_hide_symbol. (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. 2018-05-21 H.J. Lu PR binutils/23199 * elf.c (setup_group): Mark section in a section group with SHF_GROUP. 2018-05-18 H.J. Lu PR ld/23194 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 if a symbol is versioned and there is a version script. 2018-05-18 Kito Cheng * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle EF_RISCV_RVE. 2018-05-18 Jim Wilson * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_relocate_section): Don't generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_finish_dynamic_symbol): Likewise. 2018-05-18 John Darrington * Makefile.am: Add s12z files. * Makefile.in: Regenerate. * archures.c: Add bfd_s12z_arch. * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24. * bfd-in2.h: Regenerate. * config.bfd: Add s12z target. * configure.ac: Add s12z target. * configure: Regenerate. * cpu-s12z.c: New file. * elf32-s12z.c: New file. * libbfd.c (bfd_putb24): New function. (bfd_putl24): New function. * libbfd.h: Regenerate. * reloc.c: Add s12z relocations. (bfd_get_reloc_size): Handle size 5 relocs. * targets.c: Add s12z_elf32_vec. 2018-05-18 H.J. Lu PR ld/23189 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X like R_386_GOT32. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 for linker defined symbols. 2018-05-18 Alan Modra PR 23199 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries don't point at other SHT_GROUP sections. Set shdr corresponding to invalid entry, to NULL rather than section 0. Identify SHT_GROUP section index when reporting an error. Cope with NULL shdr pointer. 2018-05-18 Alan Modra * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout. * configure.ac (HAVE_HIDDEN): Check compiler support for hidden visibility. * libbfd.h: Regenerate. * configure: Regenerate. * config.in: Regenerate. 2018-05-18 Alan Modra * libbfd-in.h: Add include guard. * libcoff-in.h: Likewise. * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif. * doc/Makefile.in: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. 2018-05-16 Maciej W. Rozycki * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'. 2018-05-16 Alan Modra PR 22458 * format.c (struct bfd_preserve): Add section_id. (bfd_preserve_save, bfd_preserve_restore): Save and restore _bfd_section_id. (bfd_reinit): Set _bfd_section_id. (bfd_check_format_matches): Put all matches of any priority into matching_vector. Save initial section id and start each attempted match at that section id. * libbfd-in.h (_bfd_section_id): Declare. * section.c (_bfd_section_id): Rename from section_id and make global. Adjust uses. (bfd_get_next_section_id): Delete. * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of bfd_get_section_id with _bfd_section_id. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-15 Christophe Guillon * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields of the aux structure are initialised. 2018-05-15 Francois H. Theron * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef. 2018-05-15 Nick Clifton * po/pt.po: New Portuguese translation. * configure.ac (ALL_LINGUAS): Add pt. * configure: Regenerate. 2018-05-14 H.J. Lu PR ld/23169 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue an error on IFUNC pointer defined in PDE. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call _bfd_x86_elf_link_fixup_ifunc_symbol. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New function. * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New. 2018-05-14 H.J. Lu PR ld/23162 * elfxx-x86.c (elf_x86_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start, _end and _edata locally defined within executables. 2018-05-12 Alan Modra PR 20659 * elf.c (rewrite_elf_program_header): Use segment_mark only for PT_LOAD headers. Delete first_matching_lma and first_suggested_lma. Instead make matching_lma and suggested_lma pointers to the sections. Align section vma and lma calculated from segment. Don't clear includes_phdrs or includes_filehdr based on p_paddr test. Try to handle alignment padding before first section by adjusting new segment lma down. Adjust PT_PHDR map p_paddr. 2018-05-09 Dimitar Dimitrov * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation conformant to TI ABI. (pru_elf32_relax_section): Likewise. (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend. (pru_elf32_pmem_relocate): Trap - should not get here. (pru_elf32_relocate_section): Add support for REL relocations. (elf_info_to_howto_rel): Enable REL. (elf_backend_may_use_rel_p): Likewise. (elf_backend_may_use_rela_p): Likewise. (elf_backend_default_use_rela_p): Likewise. 2018-05-09 Alan Modra PR 23148 * peXXigen.c (pe_print_edata): Correct minimum size. 2018-05-09 Alan Modra PR 23147 * peXXigen.c (pe_print_idata): Bound check hint_addr. 2018-05-08 Nick Clifton PR 22809 * elf.c (bfd_elf_get_str_section): Check for an excessively large string section. * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the attribute section is larger than the size of the file. 2018-05-07 Alan Modra * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than strncmp when checking for ".bf" special symbol. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags section name a char array, remove sentinal known_sections entry, and adjust loop over known_sections to suit. Use memcmp rather than strncmp. 2018-05-04 Alan Modra * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32), (struct elf_external_linux_prpsinfo32_ugid16), (struct elf_external_linux_prpsinfo64_ugid32), (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas. Move comment to.. * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor directives. * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING to data. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic pragmas. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid false positive gcc-8 warning. * cofflink.c (_bfd_coff_link_input_bfd): Likewise. 2018-05-04 Tulio Magno Quites Machado Filho * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order of arguments when warning about different long double types. 2018-05-03 Simon Atanasyan * elf32-mips.c: (elf32_mips_fixup_symbol): New function. (elf_backend_fixup_symbol): New macro. * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp handling. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. 2018-04-30 Francois H. Theron * Makefile.am: Added NFP files to build. * archures.c: Added bfd_arch_nfp * config.bfd: Added NFP support. * configure.ac: Added NFP support. * cpu-nfp.c: New, for NFP support. * elf-bfd.h: Added elf_section_info() * elf64-nfp.c: New, for NFP support. * po/SRC-POTFILES.in: Added NFP source files. * targets.c: Added nfp_elf64_vec * bfd-in2.h: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. 2018-04-27 Alan Modra * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-04-27 Alan Modra PR 23123 PR 22374 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt relocs for ifuncs. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes. 2018-04-26 Pedro Alves * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider ifunc and non-ifunc symbols duplicates. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New. (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. (elf32_arm_output_arch_local_syms): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle _GLOBAL_OFFSET_TABLE_ in FDPIC mode. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (DEFAULT_STACK_SIZE): New. (elf32_arm_always_size_sections): Create stack segment. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC) (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New relocations. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations. (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC. (struct elf32_arm_link_hash_table): Update comment. (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations. (IS_ARM_TLS_RELOC): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Update comment. * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC, BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_plt_entry): New. (elf32_arm_create_dynamic_sections): Handle FDPIC. (elf32_arm_allocate_plt_entry): Likewise. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (struct fdpic_local): New. (elf_arm_obj_tdata): Add local_fdpic_cnts field. (elf32_arm_local_fdpic_cnts): New. (struct fdpic_global): New. (elf32_arm_link_hash_entry): Add fdpic_cnts field. (elf32_arm_link_hash_table): Add srofixup field. (arm_elf_add_rofixup): New. (arm_elf_fill_funcdesc): New. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts. (elf32_arm_allocate_local_sym_info): Likewise. (create_got_section): Create .rofixup section. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts. (bfd_elf32_arm_set_target_params): Handle FDPIC. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. (elf32_arm_fdpic_omit_section_dynsym): New. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC) (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC) (BFD_RELOC_ARM_FUNCDESC_VALUE): New. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE. (elf32_arm_howto_from_type): Take new members of elf32_arm_howto_table_2 into account. (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_print_private_bfd_data): Support EF_ARM_PIC and ELFOSABI_ARM_FDPIC. (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC. (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. Accept arm*-*-uclinuxfdpiceabi. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. 2018-04-25 Alan Modra * elf-linux-core.h: Disable gcc-8 string truncation warning. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-25 Alan Modra * Makefile.am: Remove arm-aout and arm-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-arm.c: Delete. * armnetbsd.c: Delete. * riscix.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-24 Nick Clifton PR 23113 * elf.c (ignore_section_sym): Check for the output_section pointer being NULL before dereferencing it. PR 23110 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for a negative PE_DEBUG_DATA size before iterating over the debug data. 2018-04-23 Alan Modra * elf-linux-core.h: Revert last change. * elf.c: Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-23 Alan Modra * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable gcc-8 string truncation warning. (swap_linux_prpsinfo32_ugid16_out): Likewise. (swap_linux_prpsinfo64_ugid32_out): Likewise. (swap_linux_prpsinfo64_ugid16_out): Likewise. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-20 Alan Modra PR 22978 * elf32-hppa.c (got_relocs_needed): Add extra param to special case both dtprel and tprel relocs. (allocate_dynrelocs): Adjust conditions for got relocs. (elf32_hppa_relocate_section): Likewise for local sym got relocs. Emit dynamic relocs on TLS GOT entries for shared libraries, not when pic. Omit dynamic reloc on dtprel entry when local, and on tprel entry when local and executable. 2018-04-19 Alan Modra PR 22537 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1. (hppa_type_of_stub): Don't return a long branch stub for symbols other than those defined statically. 2018-04-19 Alan Modra * Makefile.am: Revert 2018-04-18 coff-mips changes. * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec to selvecs for mips targets change 2018-04-18. * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec and mips_ecoff_bele_vec. * targets.c: Likewise. * coff-mips.c: Resurrect. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-18 Alan Modra * Makefile.am: Remove mips aout and coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-mips.c: Delete * mipsbsd.c: Delete * pe-mips.c: Delete * pei-mips.c: Delete * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 H.J. Lu * elf32-i386.c (elf32_bed): Define before including "elf32-target.h". * elf64-x86-64.c (elf64_bed): Define before including "elf64-target.h". (elf32_bed): Define before including "elf32-target.h". 2018-04-17 H.J. Lu PR ld/23055 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a normal input file with compatible relocation. 2018-04-18 Alan Modra * Makefile.am: Remove support for assorted i386 aout and coff targets. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * targets.c: Likewise. * freebsd.h: Delete. * i386dynix.c: Delete. * i386freebsd.c: Delete. * i386linux.c: Delete. * i386mach3.c: Delete. * i386netbsd.c: Delete. * i386os9k.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 Andrew Sadek Microblaze Target: PIC data text relative * bfd/reloc.c (2 new BFD relocations): BFD_RELOC_MICROBLAZE_64_TEXTPCREL & BFD_RELOC_MICROBLAZE_64_TEXTPCREL * bfd/bfd-in2.h: Regenerate * bfd/libbfd.h: Regenerate * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3 new relocs and handle them in both relocate and relax functions. (microblaze_elf_reloc_type_lookup): add mapping between for new bfd relocs. (microblaze_elf_relocate_section): Handle new relocs in case of elf relocation. (microblaze_elf_relax_section): Handle new relocs for elf relaxation. 2018-04-17 Nick Clifton PR 23055 * aoutx.h (find_nearest_line): Check that the symbol name exists and is long enough, before attempting to see if it is for a .o file. * hash.c (bfd_hash_hash): Add an assertion that the string is not NULL. * linker.c (bfd_link_hash_lookup): Fail if the table or string are NULL. (_bfd_generic_link_add_archive_symbols): Fail if an archive entry has no name. PR 23065 * dwarf2.c (concat_filename): Check for a NULL table pointer. 2018-04-16 Nick Clifton PR 23061 * coffgen.c (coff_pointerize_aux): Check for an out of range fixup. 2018-04-16 Alan Modra * Makefile.am: Remove arm-epoc-pe support. * coff-arm.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * epoc-pe-arm.c: Delete. * epoc-pei-arm.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sparc-aout and sparc-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-sparcle.c: Delete. * aoutf1.h: Delete. * cf-sparclynx.c: Delete. * coff-sparc.c: Delete. * demo64.c: Delete. * sparclinux.c: Delete. * sparclynx.c: Delete. * sparcnetbsd.c: Delete. * sunos.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m68k-aout and m68k-coff support. * aoutf1.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bfd-in.h: Likewise. * bfd.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * configure.host: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * freebsd.h: Likewise. * gen-aout.c: Likewise. * hpux-core.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * riscix.c: Likewise. * targets.c: Likewise. * aout0.c: Delete. * coff-apollo.c: Delete. * coff-aux.c: Delete. * coff-m68k.c: Delete. * coff-svm68k.c: Delete. * coff-u68k.c: Delete. * hosts/delta68.h: Delete. * hosts/hp300bsd.h: Delete. * hosts/m68kaux.h: Delete. * hosts/news.h: Delete. * hp300bsd.c: Delete. * hp300hpux.c: Delete. * liboasys.h: Delete. * m68k4knetbsd.c: Delete. * m68klinux.c: Delete. * m68knetbsd.c: Delete. * oasys.c: Delete. * versados.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh5 and sh64 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-sh.c: Likewise. * elf32-sh-relocs.h: Likewise. * elf32-sh.c: Likewise. * targets.c: Likewise. * elf32-sh64-com.c: Delete. * elf32-sh64.c: Delete. * elf32-sh64.h: Delete. * elf64-sh64.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh-symbianelf support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * elf32-sh-symbian.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove vax-bsd and vax-ultrix support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * vaxbsd.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove w65 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-w65.c: Delete. * cpu-w65.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove we32k support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-we32k.c: Delete. * cpu-we32k.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m88k support. * aoutx.h: Likewise. * archures.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-ns32k.c: Likewise. * elf32-nds32.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * reloc.c: Likewise. * targets.c: Likewise. * coff-m88k.c: Delete. * cpu-m88k.c: Delete. * elf32-m88k.c: Delete. * hosts/m88kmach3.h: Delete. * m88kmach3.c: Delete. * m88kopenbsd.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove i370 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * cpu-i370.c: Delete. * elf32-i370.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove h8500 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-h8500.c: Delete. * cpu-h8500.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove h8300-coff support. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * reloc16.c: Likewise. * targets.c: Likewise. * coff-h8300.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove IEEE 695 support. * archures.c: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * doc/bfdsumm.texi: Likewise. * section.c: Likewise. * targets.c: Likewise. * ieee.c: Delete. * libieee.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * config.bfd: Remove tandem support. 2018-04-16 Alan Modra * Makefile.am: Remove newsos3 support. * aoutx.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * newsos3.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove netware support. * bfd-in.h: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * ecoff.c: Likewise. * targets.c: Likewise. * libnlm.h: Delete. * nlm-target.h: Delete. * nlm.c: Delete. * nlm32-alpha.c: Delete. * nlm32-i386.c: Delete. * nlm32-ppc.c: Delete. * nlm32-sparc.c: Delete. * nlm32.c: Delete. * nlm64.c: Delete. * nlmcode.h: Delete. * nlmswap.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * archures.c: Remove tahoe support. * config.bfd: Likewise. * configure.ac: Likewise. * hosts/tahoe.h: Delete. * bfd-in2.h: Regenerate. * configure: Regenerate. 2018-04-14 Alan Modra * elf-bfd.h (struct elf_backend_data): Add relropagesize. * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and sanity test. (elfNN_bed): Init relropagesize. * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to select relropagesize. * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. (ELF_MINPAGESIZE): Don't define. * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. * bfd-in2.h: Regenerate. 2018-04-14 Alan Modra * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend on __QNXTARGET__ define. 2018-04-14 Alan Modra * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss* to obsolete list. 2018-04-11 Alan Modra * aout-adobe.c: Delete. * bout.c: Delete. * coff-i860.c: Delete. * coff-i960.c: Delete. * cpu-i860.c: Delete. * cpu-i960.c: Delete. * elf32-i860.c: Delete. * elf32-i960.c: Delete. * hosts/i860mach3.h: Delete. * Makefile.am: Remove i860, i960, bout, and adobe support. * archures.c: Remove i860 and i960 support. * coffcode.h: Likewise. * reloc.c: Likewise. * aoutx.h: Comment updates. * archive.c: Remove BOUT and i960 support. * bfd.c: Remove BOUT support. * coffswap.h: Remove i960 support. * config.bfd: Remove i860, i960 and adobe targets. * configure.ac: Remove adode, bout, i860, i960, icoff targets. * targets.c: Likewise. * ieee.c: Remove i960 support. * mach-o.c: Remove i860 support. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer in the BFD symbol referred by the relocation. (mips_elf64_write_rela): Likewise. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an error for out-of-range `r_sym' values. 2018-04-09 Alan Modra * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field. (struct ppc_link_hash_table): Add can_convert_all_inline_plt. (ppc64_elf_check_relocs): Set has_pltcall. (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc64_elf_inline_plt): New function. (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals. * elf64-ppc.h (ppc64_elf_inline_plt): Declare. * elf32-ppc.c (has_pltcall): Define. (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt. (ppc_elf_check_relocs): Set has_pltcall. (ppc_elf_inline_plt): New function. (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc_elf_size_dynamic_sections): Likewise. * elf32-ppc.h (ppc_elf_inline_plt): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos. (is_plt_seq_reloc): New function. (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs. (ppc_elf_tls_optimize): Handle inline plt call sequence. (ppc_elf_relax_section): Handle PLTCALL reloc. (ppc_elf_relocate_section): Nop out inline plt call sequence when resolving locally. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE. (has_tls_get_addr_call): Correct comment. (is_branch_reloc): Add PLTCALL. (is_plt_seq_reloc): New function. (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt entry for R_PPC64_PLTCALL. (ppc64_elf_tls_optimize): Handle inline plt call sequence. (ppc_type_of_stub): Handle PLTCALL reloc. (toc_adjusting_stub_needed): Likewise. (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL reloc insn. Nop out inline plt call sequence when resolving locally. Handle __tls_get_addr inline plt call optimization. 2018-04-09 Alan Modra * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define. (struct ppc_stub_hash_entry): Add symtype field. (PLT_KEEP): Define. (struct ppc_link_hash_table): Add pltlocal and relpltlocal. (create_linkage_sections): Create pltlocal and relpltlocal. (ppc64_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal. Keep PLT entries for inline calls against locals. (ppc_build_one_stub): Use pltlocal as appropriate. (ppc_size_one_stub): Likewise. (ppc64_elf_size_stubs): Set symtype. (build_global_entry_stubs_and_plt): Init pltlocal and write relpltlocal for globals. (write_plt_relocs_for_local_syms): Likewise for local syms. (ppc64_elf_relocate_section): Support PLT for local syms. * elf32-ppc.c (PLT_KEEP): Define. (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal. (ppc_elf_create_glink): Create pltlocal and relpltlocal. (ppc_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. Adjust update_local_sym_info call. (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal. (ppc_elf_relocate_section): Support PLT16 relocs for local syms. (write_global_sym_plt): Init pltlocal and write relpltlocal. (ppc_finish_symbols): Likewise for locals. 2018-04-09 Alan Modra * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs for local symbols to.. (write_plt_relocs_for_local_syms): ..here. New function. (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for global symbols to.. (build_global_entry_stubs_and_plt): ..here. Rename from build_global_entry_stubs. (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt. Call write_plt_relocs_for_local_syms. * elf32-ppc.c (get_sym_h): New function. (ppc_elf_relax_section): Use get_sym_h. (ppc_elf_relocate_section): Move output of PLT relocs and glink stubs for local symbols to.. (ppc_finish_symbols): ..here. New function. (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for global syms to.. (write_global_sym_plt): ..here. New function. * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute. (ppc_finish_symbols): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs. (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS. (ppc64_elf_relocate_section): Likewise. Correct PLT16 resolution to plt entry relative to toc pointer. 2018-04-09 Alan Modra * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout file when other TLS flags are tested in a mask. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK. (ppc64_elf_relocate_section): Likewise. (ppc64_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD): Renumber. Update comment. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (ppc_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. 2018-04-06 H.J. Lu * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out R_X86_64_converted_reloc_bit. 2018-04-05 H.J. Lu PR gas/22318 * configure: Regenerated. 2018-04-05 Alan Modra * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto): Also return unsuccessfully for unimplemented relocations. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the `bfd_error_bad_value' error and call `_bfd_error_handler' on a howto lookup failure. (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call accordingly. (elf32_i860_info_to_howto_rela): Likewise. (elf32_i860_relocate_splitn): Likewise. (elf32_i860_relocate_pc16): Likewise. (elf32_i860_relocate_pc26): Likewise. (elf32_i860_relocate_section): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-visium.c (visium_info_to_howto_rela): Correct the range check for `visium_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range check for `iq2000_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-frv.c (frv_info_to_howto_rela): Correct the range check for `elf32_frv_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-mips.c (mips_elf32_rtype_to_howto): Also return unsuccessfully for placeholder howtos. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise. 2018-03-29 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to `_bfd_error_handler' and to set the `bfd_error_bad_value' error. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove ATTRIBUTE_UNUSED from `abfd'. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct `_bfd_error_handler' call formatting. 2018-03-28 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Call `mips_elf32_rtype_to_howto' directly rather than via `->elf_backend_mips_rtype_to_howto'. 2018-03-28 Renlin Li PR ld/22970 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. (elfNN_aarch64_final_link_relocate): Support new relocations. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new relocations. (_bfd_aarch64_elf_resolve_relocation): Support new relocations. 2018-03-28 Renlin Li PR ld/22970 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for TLSLE_LDST16_TPREL_LO12, TLSLE_LDST16_TPREL_LO12_NC, TLSLE_LDST32_TPREL_LO12, TLSLE_LDST32_TPREL_LO12_NC, TLSLE_LDST64_TPREL_LO12, TLSLE_LDST64_TPREL_LO12_NC, TLSLE_LDST8_TPREL_LO12, TLSLE_LDST8_TPREL_LO12_NC. * bfd-in2.h: Regenerated. * libbfd.h: Regenerated. 2018-03-28 Eric Botcazou PR ld/22972 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag has_old_style_got_reloc. (_bfd_sparc_elf_check_relocs) : Set it for old-style relocations. Fix a couple of long lines. (_bfd_sparc_elf_relocate_section) : Do not generate a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style GOT relocations. 2018-03-25 H.J. Lu PR ld/23000 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add ENDBR64 to the TLSDESC PLT entry. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting symbols. Use size_t counts. Delete redundant opd test. 2018-03-21 Alan Modra * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms. 2018-03-21 Alan Modra * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask field unsigned. (update_local_sym_info): Likewise for local_got_tls_masks. (ppc_elf_tls_optimize): Likewise for lgot_masks. 2018-03-21 Alan Modra * elf64-ppc.c (ppc_size_one_stub): Fix comment typo. (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we do in size_dynamic_sections. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1] without first checking array bounds. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. 2018-03-20 H.J. Lu PR ld/22983 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list. 2018-03-19 Nick Clifton * po/es.po: Updated Spanish translation. 2018-03-15 Max Filippov * elf32-xtensa.c (xlate_map_entry): Change types of address fields from 'unsigned' to 'bfd_vma'. (xlate_offset_with_removed_text): Use struct xlate_map_entry as the key argument to bsearch. Allow offsets past the end of a section, use the last map entry for translation of such offsets. 2018-03-15 Kuan-Lin Chen * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed. Not support the target feature. (nds32_elf_ex9_itb_base): Likewise. (nds32_elf_ex9_import_table): Likewise. (nds32_elf_ex9_finish): Likewise. (nds32_elf_ex9_reloc_jmp): Likewise. (nds32_elf_get_insn_with_reg): Likewise. (nds32_get_local_syms): Likewise. (nds32_elf_ex9_replace_instruction): Likewise. (nds32_elf_ifc_calc): Likewise. (nds32_elf_ifc_finish): Likewise. (nds32_elf_ifc_replace): Likewise. (nds32_elf_ifc_reloc): Likewise. 2018-03-14 Alan Modra * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having sfpr size added before defining alias symbols. (ppc64_elf_build_stubs): Add stub section padding before copying sfpr contents and defining save/restore alias symbols. 2018-03-14 H.J. Lu PR ld/20882 * elflink.c (elf_gc_mark_debug_section): Also check the local debug definition section. 2018-03-13 Nick Clifton PR 22113 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean function. Add an end address parameter. Check access of the data pointer to make sure that they do not extend beyond the end address. Return FALSE if any check fails. Add the end address pointer to the ui structure. (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind codes to make sure that they do not extend beyond the end address pointer. Print an error message and return immediately if any check fails. 2018-03-09 Nick Clifton * elf64-s390.c (elf_s390_relocate_section): Move check for relocations against non-allocated sections to before the code that handles ifunc relocations. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat relocs against IFUNC symbols in non-allocated sections as relocs against FUNC symbols. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. 2018-03-08 H.J. Lu PR ld/22929 * elf32-i386.c (elf_i386_relocate_section): Treat relocation against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as relocation against FUNC symbol. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. 2018-03-07 Renlin Li PR ld/20402 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute symbol, and don't emit relocation in specific case. 2018-03-07 Alan Modra * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error. (mips_elf64_slurp_one_reloc_table): Pass on error. 2018-03-03 James Cowgill Maciej W. Rozycki PR ld/21900 * elfxx-mips.c (mips_elf_calculate_relocation): Only return after calling `undefined_symbol' hook if this is an error condition. Assume the value of 0 for the symbol requested otherwise. 2018-03-02 Jim Wilson PR 22903 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch and nop instead of 4. (elfNN_arch64_build_stubs): Add nop after branch. Increase size by 8 instead of 4. 2018-03-01 Jim Wilson PR 22756 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use else if instead of if. 2018-03-01 Alan Modra * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test. 2018-02-28 Alan Modra PR 22887 * aoutx.h (swap_std_reloc_in): Correct r_index bound check. 2018-02-28 Nick Clifton PR 22895 PR 22893 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block pointer. Drop unused abfd parameter. Check the size of the block before initialising the data field. Return the end pointer if the size is invalid. (read_attribute_value): Adjust invocations of read_n_bytes. PR 22894 * dwarf1.c (parse_die): Check the length of form blocks before advancing the data pointer. 2018-02-28 Alan Modra PR 22887 * aoutx.h (translate_symbol_table): Print an error message and set bfd_error on finding an invalid name string offset. 2018-02-27 H.J. Lu * config.in: Regenerated. * configure: Likewise. * configure.ac: Add --enable-separate-code. (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default to 1 for Linux/x86 targets, * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if DEFAULT_LD_Z_SEPARATE_CODE is 1. 2018-02-27 Nick Clifton * aout-cris.c (swap_ext_reloc_out): Standadize error/warning message. * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise. * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise. * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (sh_elf64_info_to_howto): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. PR 22875 * elf-bfd.h (struct elf_backend_data): Change the return type of the elf_info_to_howto and elf_info_to_howto_rel function pointers to bfd_boolean. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed. * elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function. (elf32_h8_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. (riscv_elf_relocate_section): Likewise. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to bfd_boolean. Issue an error message, set an error value and return FALSE if the reloc is not recognized. (elf_hppa_info_to_howto_rel): Likewise. * elf-m10200.c (mn10200_info_to_howto): Likewise. * elf-m10300.c (mn10300_info_to_howto): Likewise. * elf.c (_bfd_elf_no_info_to_howto): Likewise. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-arm.c (elf32_arm_info_to_howto): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-bfin.c (bfin_info_to_howto): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise. * elf32-cris.c (elf_cr16c_info_to_howto_rel) (cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto) (elf32_dlx_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela) (frvfdpic_info_to_howto_rel): Likewise. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise. * elf32-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf32-h8300.c (elf32_h8_info_to_howto) (elf32_h8_info_to_howto_rel): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup) (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68k.c (rtype_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-pru.c (pru_elf32_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-s390.c (elf_s390_info_to_howto): Likewise. * elf32-score.c (s3_bfd_score_info_to_howto) (_bfd_score_info_to_howto): Likewise. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-tic6x.c (elf32_tic6x_info_to_howto) (elf32_tic6x_info_to_howto_rel): Likewise. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel) (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto) (elf32_wasm32_info_to_howto_rela): Likewise. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL. 2018-02-26 Jim Wilson Stephan Schreiber PR 15904 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl call, set changed_contents and changed_relocs. Likewise after successful ia64_elf_relax_br call. 2018-02-26 Alan Modra * elf.c (assign_file_positions_except_relocs): Don't segfault when actual number of phdrs is less than allocated. Delete outdated comment. Formatting. 2018-02-26 Alan Modra * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c, * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c, * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c, * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize error/warning messages. 2018-02-26 Alan Modra * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c, * syms.c: Standardize error/warning messages. 2018-02-26 Alan Modra * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c, * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c, * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c, * peXXigen.c, * peicode.h: Standardize error/warning messages. 2018-02-26 Alan Modra * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages. 2018-02-26 Alan Modra * elfxx-mips.c: Standardize error/warning messages. 2018-02-26 Alan Modra * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c, * elflink.c: Standardize error/warning messages. Replace use of linker callback einfo with _bfd_error_handler when possible. 2018-02-26 Alan Modra * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c, * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize unrecognized/unsupported reloc message. 2018-02-26 Alan Modra * elf32-ppc.c: Standardize error/warning messages. Use _bfd_error_handler rather than einfo when einfo features not used. * elf64-ppc.c: Likewise. 2018-02-23 Alan Modra PR 22881 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO segment if no matching LOAD segment. 2018-02-23 Kuan-Lin Chen * elf32-nds32.h: Define mask for ict_model. 2018-02-20 Jason Duerstock * elfnn-ia64.c (elf_backend_can_gc_sections): Enable. 2018-02-19 Maciej W. Rozycki Revert 2018-01-12 Vlad Ivanov * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. 2018-02-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and `.MIPS.abiflags' sections. (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo' section's end. 2018-02-19 Maciej W. Rozycki * section.c (SEC_FIXED_SIZE): New macro. * bfd-in2.h: Regenerate. 2018-02-19 Maciej W. Rozycki * section.c (SEC_HAS_GOT_REF): Remove macro. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler arguments. * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise. * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise. (_bfd_riscv_relax_pc): Likewise and fix typos. * libbfd-in.h (_bfd_error_handler): Add attribute printf. * libbfd.h: Regenerate. 2018-02-19 Alan Modra * dwarf2.c (read_section): Don't use 'll' format modifier. (find_abstract_instance): Likewise. * elfcore.h (elf_core_file_p): Likewise. 2018-02-19 Alan Modra * bfd-in.h: Include inttypes.h or if not available define PRId64, PRIu64 and PRIx64. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L modifier to print bfd_vma. * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c, * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64, and cast input to uint64_t, and similarly for Ld and Lu. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c, * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * reloc.c: Replace use of %R and %T in format strings passed to einfo and friends by %pR and %pT. 2018-02-19 Alan Modra * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. 2018-02-19 Alan Modra PR 22845 * elf.c (IS_TBSS): Define. (_bfd_elf_map_sections_to_segments): Use IS_TBSS. (assign_file_positions_for_non_load_sections): Revert last change. Properly calculate load segment limits to compare against relro limits. 2018-02-17 Alan Modra PR 22845 * elf.c (assign_file_positions_for_non_load_sections): Ignore degenerate zero size PT_LOAD segments when finding one overlapping the PT_GNU_RELRO segment. 2018-02-16 Alan Modra * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false. (_bfd_bool_bfd_true): Rename from bfd_true. (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr. (_bfd_int_bfd_0): Rename from bfd_0. (_bfd_uint_bfd_0): Rename from bfd_0u. (_bfd_long_bfd_0): Rename from bfd_0l. (_bfd_long_bfd_n1_error): Rename from _bfd_n1. (_bfd_void_bfd): Rename from bfd_void. (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false), (_bfd_bool_bfd_link_false_error), (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true), (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true), (_bfd_bool_bfd_asection_bfd_asection_true), (_bfd_bool_bfd_asymbol_bfd_asymbol_true), (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions. * archive.c (_bfd_noarchive_get_elt_at_index), (_bfd_noarchive_openr_next_archived_file), (_bfd_noarchive_construct_extended_name_table), (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname), (_bfd_noarchive_write_armap): New functions. * archures.c (_bfd_nowrite_set_arch_mach): New function. * coff-alpha.c (alpha_ecoff_swap_coff_aux_in), (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in), (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out), (alpha_ecoff_swap_coff_lineno_out), (alpha_ecoff_swap_coff_reloc_out): New functions. * coff-mips.c (mips_ecoff_swap_coff_aux_in), (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in), (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out), (mips_ecoff_swap_coff_lineno_out), (mips_ecoff_swap_coff_reloc_out): New functions. * coffcode.h (coff_set_alignment_hook): Replace define with new function. (symname_in_debug_hook): Likewise. * ecoff.c (_bfd_ecoff_set_alignment_hook): New function. * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0. * elf.c (assign_file_positions_except_relocs): Test elf_backend_allow_non_load_phdr for NULL. * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from _bfd_elf_link_omit_section_dynsym. Update uses. (_bfd_elf_omit_section_dynsym_all): New function. * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete. (_bfd_elf_omit_section_dynsym_default): Declare. (_bfd_elf_omit_section_dynsym_all): Declare. * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section), (_bfd_nolink_bfd_get_relocated_section_contents), (_bfd_nolink_bfd_lookup_section_flags), (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group), (_bfd_nolink_bfd_link_hash_table_create), (_bfd_nolink_bfd_link_just_syms), (_bfd_nolink_bfd_copy_link_hash_symbol_type), (_bfd_nolink_bfd_link_split_section), (_bfd_nolink_section_already_linked), (_bfd_nolink_bfd_define_common_symbol), (_bfd_nolink_bfd_define_start_stop): New functions. * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup), (_bfd_norelocs_bfd_reloc_name_lookup), (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions. * section.c (_bfd_nowrite_set_section_contents): New function. * syms.c (_bfd_nosymbols_canonicalize_symtab), (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info), (_bfd_nosymbols_get_symbol_version_string), (_bfd_nosymbols_bfd_is_local_label_name), (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line), (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info), (_bfd_nosymbols_bfd_make_debug_symbol), ( _bfd_nosymbols_read_minisymbols), ( _bfd_nosymbols_minisymbol_to_symbol), (_bfd_nodynamic_get_synthetic_symtab): New functions. * libbfd-in.h: Declare new functions. Update existing defines, removing casts. * aix386-core.c: Update to use new hooks. Formatting. * aout-adobe.c: Likewise. * aout-arm.c: Likewise. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * bout.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-i860.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic30.c: Likewise. * coff-tic54x.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * elf-m10300.c: Likewise. * elf32-cr16.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32r.c: Likewise. * elf32-metag.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-target.h: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.h: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * libaout.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mipsbsd.c: Likewise. * mmo.c: Likewise. * netbsd-core.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * osf-core.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * pe-x86_64.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * sco5-core.c: Likewise. * som.c: Likewise. * sparclynx.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * trad-core.c: Likewise. * verilog.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * libbfd.h: Regenerate. 2018-02-15 Jim Wilson * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore symbols whose section address is zero. * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous when pcrel_lo reloc has an addend. Use reloc_dangerous callback for bfd_reloc_dangerous. Use einfo instead of warning callback for errors. Add %X%P to error messages. 2018-02-15 Eric Botcazou PR ld/22832 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup and assert that the result of the call is not NULL. 2018-02-14 Nick Clifton PR 22823 Revert previous delta. Add extra casts to avoid compile time warnings instead. * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra cast to avoid warning from gcc v8 compiler. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): Delete. (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete. (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Add extra cast to avoid warning from gcc v8 compiler. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. 2018-02-14 H.J. Lu PR ld/22842 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for R_X86_64_PC32 reloc against dynamic function in data section. Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc against dynamic function in data section. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as function address only if pcrel_plt is true. (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt. * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for PC-relative PLT. If PLT is PC-relative, don't generate dynamic PC-relative relocation against a function definition in data secton in PIE. Remove the obsolete comments. (elf_x86_link_hash_table): Add pcrel_plt. 2018-02-13 H.J. Lu * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll, instead of bfd_link_pic, for building shared library. 2018-02-13 H.J. Lu PR gas/22791 * elf64-x86-64.c (is_32bit_relative_branch): Removed. (elf_x86_64_relocate_section): Check PIC relocations in PIE. Remove is_32bit_relative_branch usage. Disallow PC32 reloc against protected function in shared object. 2018-02-13 Sergei Trofimovich PR 22828 * po/ru.po: Fix typo in Russian translation. 2018-02-13 Maciej W. Rozycki * wasm-module.c (wasm_scan_name_function_section): Rename `index' local variable to `idx'. 2018-02-13 Nick Clifton PR 22823 Fix compile time warnings generated by gcc version 8. * libbfd-in.h: Remove extraneous text from prototypes. Add prototypes for bfd_false_any, bfd_true_any, bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any, bfd_n1_any, bfd_void_any. (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy function. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): New function. Like bfd_false but accepts one or more arguments. (bfd_true_any): Likewise. (bfd_nullvoidptr_any): Likewise. (bfd_0_any): Likewise. (bfd_0u_any): Likewise. (bfd_0l_any): Likewise. (_bfd_n1_any): Likewise. (bfd_void_any): Likewise. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg based dummy function. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. * elf32-arc.c (get_replace_function): Assign replacement function to func pointer. * elf32-i370.c (i370_noop): Update prototype. 2018-02-13 Alan Modra PR 22836 * elf.c (_bfd_elf_fixup_group_sections): Account for removed relocation sections. If size reduces to just the flag word, remove that too and mark with SEC_EXCLUDE. * elflink.c (bfd_elf_final_link): Strip empty group sections. 2018-02-13 Alan Modra PR 22829 * elf.c (assign_file_positions_for_non_load_sections): Rewrite PT_GNU_RELRO setup. 2018-02-12 Zebediah Figura * 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-12 Nick Clifton * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant assignment. * elf32-arc.c (elf_arc_relocate_section): Likewise. 2018-02-09 Eric Botcazou * 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) : If relocation is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation. : Adjust comments. : 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-09 H.J. Lu * 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-08 H.J. Lu * 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-08 H.J. Lu * 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-08 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous change. 2018-02-08 Nick Clifton PR 22788 * elf.c (elf_parse_notes): Reject notes with excessuively large alignments. 2018-02-07 Alan Modra Revert 2018-01-17 Alan Modra * elf32-ppc.c: Remove speculation barrier support. * elf32-ppc.h: Likewise. * elf64-ppc.c: Likewise. * elf64-ppc.h: Likewise. 2018-02-06 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used callback to report an error. 2018-02-06 Eric Botcazou PR ld/22263 * 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. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Remove useless code, tidy and merge related blocks. : Turn call to bfd_link_pic into call to !bfd_link_executable. : 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. : Merge into... : ...this. Adjust 4th argument in call to sparc_elf_tls_transition and remove redundant code. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. : Likewise. : Likewise. 2018-02-06 Miloš Stojanović 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-06 Sergio Durigan Junior * coff-rs6000.c (xcoff_write_archive_contents_old): Use 'memcpy' instead of 'strncpy' when writing the magic number. 2018-02-06 Nick Clifton 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-06 Paul Carroll * bfd/dwarf2.c (find_abstract_name): Modified to return file and line information in addition to name, if they can be found. 2018-02-05 Renlin Li 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. 2018-02-05 H.J. Lu 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. 2018-02-05 Maciej W. Rozycki * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to initialize `hi_reloc'. 2018-02-05 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_section_processing): For SHT_MIPS_REGINFO sections don't assert the correct size and report an error instead. 2018-02-05 Maciej W. Rozycki * elf.c (_bfd_elf_write_object_contents): Propagate a failure status from `->elf_backend_section_processing'. 2018-02-02 Jim Wilson 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-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops emitted for toc sequence optimization. Set and use "howto" later. 2018-02-01 Simon Marchi * 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. 2018-01-31 Michael Matz * elflink.c (bfd_elf_define_start_stop): Fix check of def_dynamic. 2018-01-31 H.J. Lu PR ld/21964 * elflink.c (bfd_elf_define_start_stop): Check if __start and __stop symbols are referenced by shared objects. 2018-01-30 Alan Modra 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-30 Alan Modra * elflink.c (bfd_elf_define_start_stop): Make __start and __stop symbols dynamic. 2018-01-29 Alan Modra PR 22741 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in range before converting to a symbol table pointer. a15 5 * elflink.c (bfd_elf_define_start_stop): Override symbols when they are defined dynamically. 2018-01-26 Alan Modra a18 5 2018-01-25 Alan Modra PR 22746 * elfcode.h (elf_object_p): Avoid integer overflow. d36 1 a36 1 2018-01-24 Renlin Li d38 2 a39 26 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2018-01-24 Renlin Li * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-01-23 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale `mips_elf32_section_processing' comment reference. d57 1 a57 10 2018-01-17 Nick Clifton * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. 2018-01-17 Alan Modra * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. 2018-01-17 Alan Modra d83 5 a87 1 2018-01-17 Alan Modra d124 5 d135 1 a135 5 * po/bfd.pot: Regenerated. 2018-01-13 Nick Clifton * version.m4: Bump version to 2.30.51 d137 1 d186 1 a186 1 2018-01-09 Kuan-Lin Chen @ 1.8 log @merge conflicts @ text @d1 1 a1 1 2016-06-29 Tristan Gingold d3 1 a3 1 * version.m4: Bump version to 2.26.1 d6 1 a6 1 2016-06-29 Tristan Gingold d10 1 a10 1 2016-06-28 Alan Modra d12 2 a13 4 Apply from master 2016-05-19 Alan Modra * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. d15 1 a15 1 2016-06-28 Alan Modra d17 3 a19 215 PR ld/19264 * elf64-ppc.c (STUB_SHRINK_ITER): Define. (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER if shrinking stubs. (ppc64_elf_size_stubs): Adjust to suit. 2016-06-14 Senthil Kumar Selvaraj Backport from master 2016-06-14 Senthil Kumar Selvaraj PR ld/20254 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc offsets until reloc_toaddr. 2016-06-14 H.J. Lu Backport from master 2016-06-13 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. 2016-06-13 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. 2016-06-14 H.J. Lu Backport from master 2016-06-11 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): When relocating R_386_GOT32, return error without a base register for PIC and subtract the .got.plt section address only with a base register. 2016-06-13 Senthil Kumar Selvaraj Backport from master 2016-06-08 Senthil Kumar Selvaraj PR ld/20221 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms and relocs only if shrinking occurred. 2016-06-09 Alan Modra PR ld/20159 PR ld/16467 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change. (_bfd_elf_add_default_symbol): Don't indirect to/from defined symbol given a version by a script different to the version of the symbol being added. (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and _bfd_elf_strtab_restore. Don't fudge dynstr references. * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete. (struct strtab_save): New. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions. * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare. 2016-05-20 H.J. Lu Backport from master 2016-05-20 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32 when setting need_convert_load. 2016-05-19 H.J. Lu PR ld/20117 * elf32-i386.c (elf_i386_convert_load): Don't convert R_386_GOT32. 2016-05-18 Christophe Monat Backport from master 2016-05-09 Christophe Monat PR ld/20030 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding. (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs to nb_words. (create_instruction_vldmia): Add is_dp to disambiguate SP/DP encoding. (create_instruction_vldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding, uses it to re-encode. 2016-05-15 H.J. Lu Backport from master 2016-05-13 H.J. Lu PR ld/20093 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert GOTPCREL relocation against large section. * elflink.c (bfd_elf_final_link): Likewise. 2016-05-11 Alan Modra PR 20060 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local. * elf32-ppc.c (ppc_elf_tls_setup): Likewise. 2016-04-30 H.J. Lu Backport from master 2016-04-27 H.J. Lu PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. 2016-03-29 Toni Spets PR 19878 * coffcode.h (coff_write_object_contents): Revert accidental 2014-11-10 change. 2016-03-17 H.J. Lu Backport from master 2016-03-15 H.J. Lu PR ld/19827 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol locally in PIE. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. 2016-03-15 H.J. Lu Backport from master 2016-01-30 H.J. Lu PR ld/19539 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation against STT_GNU_IFUNC symbol only with dynamic symbols. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. 2016-03-15 Nick Clifton Backport from master: 2016-03-09 Leon Winter PR ld/19623 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply relocations against absolute symbols. 2016-03-14 H.J. Lu Backport from master 2016-01-28 H.J. Lu PR binutils/19523 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to decompress debug sections. 2016-03-09 H.J. Lu PR ld/19579 Backport from master 2016-03-08 H.J. Lu * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking together. 2016-03-04 H.J. Lu * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. 2016-03-09 Nick Clifton Alan Modra PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise. 2016-03-01 H.J. Lu PR ld/19752 Backport from master 2015-12-18 H.J. Lu * coff-x86_64.c (coff_amd64_reloc): Fix formatting. 2015-12-18 Nick Clifton * coff-i386.c (coff_i386_reloc): Fix formatting. 2016-02-26 H.J. Lu Backport from master 2016-02-24 H.J. Lu PR ld/19698 * elflink.c (bfd_elf_record_link_assignment): Set versioned if symbol version is unknown. 2016-02-26 H.J. Lu Backport from master 2016-02-01 H.J. Lu d21 3 a23 24 PR ld/19553 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED doesn't match the symbol referenced by regular object. 2016-02-26 H.J. Lu Backport from master 2016-02-24 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. 2016-02-26 Alan Modra * elf64-ppc.c (create_linkage_sections): Create sfpr when save_restore_funcs, rest of sections when not relocatable. (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. (sfpr_define): Define all symbols on emitted code. (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created when relocatable. Move sfpr_define loop earlier. 2016-02-25 Jiong Wang d25 1 a25 2 Backport from master 2016-01-21 Jiong Wang d27 1 a27 34 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch veneer for sym_sec != input_sec. (elfNN_aarch64_size_stub): Support STT_SECTION symbol. (elfNN_aarch64_final_link_relocate): Take rela addend into account when calculation destination. 2016-02-10 H.J. Lu Backport from master 2016-02-10 H.J. Lu PR ld/19601 * elf32-i386.c (elf_i386_relocate_section): Mask off the least significant bit in GOT offset for R_386_GOT32X. 2016-02-02 H.J. Lu Backport from master 2016-02-02 H.J. Lu PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distances in the compressed_size field of the output section. 2016-02-01 John David Anglin PR ld/19526 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output files. * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. 2016-01-25 Tristan Gingold * version.m4: Bump version to 2.26.0 d30 1 a30 1 2016-01-25 Tristan Gingold d32 1 a32 1 * version.m4: Bump version to 2.26 d35 1 a35 1 2016-01-14 Alan Modra d37 50 a86 61 PR ld/19421 PR ld/4317 * elflink.c (elf_link_input_bfd): Revert 2015-02-19 changes. (elf_link_output_extsym): Likewise. 2016-01-11 Jiong Wang Apply from master 2016-01-08 Richard Sandiford Jiong Wang PR ld/19368 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to reloc_class_ifunc. 2016-01-06 Maciej W. Rozycki Apply from master. 2016-01-04 Maciej W. Rozycki * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the return status from `_bfd_elf_merge_object_attributes'. 2015-12-11 Andreas Krebbel Apply from master. 2015-11-19 Andreas Krebbel PR ld/19263 * elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check. * elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling over from the 32 bit code. (elf_s390_relocate_section): Likewise. 2015-12-10 Alan Modra Apply from master. 2015-12-07 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc plt call. Wrap long lines. (ppc_elf_relocate_section): Wrap long lines. * elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc plt calls. Move __tls_get_addr checks later. Don't create plt for addr14/addr24 relocs. (ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes. (ppc64_elf_relocate_section): Correct local ifunc handling for PLT64, PLT32 and PLT16 relocs. 2015-12-07 Alan Modra PR 19323 * elfcode.h (elf_object_p): Check for ridiculous e_shnum and e_phnum values. 2015-12-07 Alan Modra * reloc.c (BFD_RELOC_PPC64_ENTRY): New. * elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add entry for R_PPC64_ENTRY. (LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY. (ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY. Use new insn defines. a87 1 * bfd-in2.h: Regenerate. d89 1 a89 38 2015-12-02 Alan Modra PR binutils/19315 * dwarf2.c (_bfd_elf_find_function): Return symbol matched. (_bfd_dwarf2_find_nearest_line): Check symbol returned above against dwarf range. * elf-bfd.h (_bfd_elf_find_function): Update prototype. 2015-12-02 Alan Modra * elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL symbol section or output section. (ppc64_elf_edit_toc): Similarly for ld -R objects. (ppc64_elf_size_stubs): Likewise. 2015-11-20 Stefan Teleman PR ld/19260 * cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit Solaris as the result is unreliable. 2015-11-18 Alan Modra PR 19256 * archive.c (bfd_generic_openr_next_archived_file): Don't allow backward file movement via "negative" sizes. * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise. 2015-12-04 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0. (elf_i386_relocate_section): Skip R_386_GOT32X optimization if addend isn't 0. 2015-12-01 H.J. Lu PR ld/19319 * elf32-i386.c (elf_i386_convert_load): Check h->def_regular instead of bfd_link_hash_new. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip relocation overflow for bfd_link_hash_undefined and bfd_link_hash_new if h->def_regular is set. d91 5 a95 1 2015-11-13 Tristan Gingold d97 1 a97 2 * version.m4: Bump version to 2.25.90 * configure: Regenerate. d99 2 a100 1 2015-11-13 Tristan Gingold d102 1 a102 2 * version.m4: Bump version to 2.26.51 * configure: Regenerate. d104 1 a104 2 2015-11-11 Alan Modra Peter Bergner d106 1 a106 14 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA. (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA. (ppc_elf_addr16_ha_reloc): Likewise. (ppc_elf_check_relocs): Likewise. (ppc_elf_relocate_section): Likewise. (is_insn_dq_form): Handle lxv and stxv instructions. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA. (ppc64_elf_ha_reloc): Likewise. (ppc64_elf_check_relocs): Likewise. (ppc64_elf_relocate_section): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New. d108 2 a109 1 2015-11-10 H.J. Lu d111 1 a111 3 * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT and VTENTRY relocations when deleting relocations. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d113 7 a119 1 2015-11-10 H.J. Lu d121 1 a121 3 * elf32-i386.c (elf_i386_relocate_section): Properly move kept relocations when deleting relocations. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d123 2 a124 1 2015-11-09 H.J. Lu d126 1 a126 5 * elf32-i386.c (elf_i386_relocate_section): Use read and write pointers to reloc array, rather than memmove when deleting a reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust reloc counts at end of loop. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d128 2 a129 1 2015-11-10 Alan Modra d131 1 a131 5 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write pointers to reloc array, rather than memmove when deleting a reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust reloc counts at end of loop. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. d133 5 a137 1 2015-11-09 Dominik Vogt d139 1 a139 6 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left shift of negative value. * libbfd.c (safe_read_leb128): Likewise. * dwarf2.c (place_sections): Likewise. * bfd-in.h (align_power): Likewise. * bfd-in2.h (align_power): Likewise. d141 5 a145 1 2015-10-30 Nick Clifton d147 1 a147 1 * po/zh_CN.po: Updated (simplified) Chinese translation. d149 15 a163 16 2015-10-29 Catherine Moore * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output section to bfd_abs_section_ptr if the stub is discarded. 2015-10-29 Ed Schouten * config.bfd (targ_defvec): Add support for CloudABI on aarch64. For this target we have to make sure we use ELFOSABI_CLOUDABI instead of ELFOSABI_NONE. * configure.ac (tb): Likewise. * elfnn-aarch64.c: Likewise. * targets.c (_bfd_target_vector): Likewise. * configure: Regenerate. 2015-10-29 Pedro Alves d165 1 a165 1 * libhppa.h (bfd_hppa_insn2fmt): Add cast. d167 2 a168 131 2015-10-28 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Fix a typo in comment. 2015-10-28 Nick Clifton * elf32-arm.c (create_instruction_branch_absolute): Replace pointer parameters with a simple integer parameter. (stm32l4xx_create_replacing_stub_ldmia): Update calls to create_instruction_branch_absolute. (stm32l4xx_create_replacing_stub_ldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): Likewise. (elf32_arm_write_section): Use pointer type for veneer addresses. 2015-10-28 Cupertino Miranda * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry. * elf32-arc.c (arc_elf_howto_ini): Update formula. (get_middle_endian_relocation): New function. (PDATA): Define. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. 2015-10-28 Alan Modra PR ld/19162 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over linker input bfds.. * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param. (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call. * tekhex.c (first_phase): Likewise. * elflink.c (bfd_elf_gc_sections): Likewise. * bfd-in2.h: Regenerate. 2015-10-27 Laurent Alfonsi Christophe Monat * bfd-in2.h: Regenerate. * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how STM32L4XX instruction scanning should be done. (bfd_elf32_arm_set_stm32l4xx_fix) (bfd_elf32_arm_stm32l4xx_erratum_scan) (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes. (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument to prototype. * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME) (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros. (elf32_stm32l4xx_erratum_type): New enum. (elf32_stm32l4xx_erratum_list): New struct. List of veneers or jumps to veneers. (_arm_elf_section_data): Add stm32l4xx_erratumcount, stm32l4xx_erratumlist. (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size, stm32l4xx_fix and num_stm32l4xx_fixes fields. (ctz): New function. (popcount): New function. (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix. (put_thumb2_insn): New function. (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for LDM instructions. (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for VLDM instructions. (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum glue section. (record_stm32l4xx_erratum_veneer) : New function. Create a single veneer, and its associated symbols. (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue. (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of erratum workaround required. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find out where veneers and branches to veneers have been placed in virtual memory after layout. (is_thumb2_ldmia): New function. (is_thumb2_ldmdb): Likewise. (is_thumb2_vldm ): Likewise. (stm32l4xx_need_create_replacing_stub): New function. Decide if a veneer must be emitted. (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an input BFD for potential erratum-triggering insns. Record results. (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in global hash table. (elf32_arm_size_dynamic_sections): Collect glue information. (create_instruction_branch_absolute): New function. (create_instruction_ldmia): Likewise. (create_instruction_ldmdb): Likewise. (create_instruction_mov): Likewise. (create_instruction_sub): Likewise. (create_instruction_vldmia): Likewise. (create_instruction_vldmdb): Likewise. (create_instruction_udf_w): Likewise. (create_instruction_udf): Likewise. (push_thumb2_insn32): Likewise. (push_thumb2_insn16): Likewise. (stm32l4xx_fill_stub_udf): Likewise. (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the replacing stub for ldmia instructions. (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb. (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm. (stm32l4xx_create_replacing_stub): New function. Dispatches the stub emission to the appropriate functions. (elf32_arm_write_section): Output veneers, and branches to veneers. 2015-10-27 Sangamesh Mallayya sangamesh.swamy@@in.ibm.com> * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running aix for core file support. * configure: Regenerate. * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb. Added BFD64 check if we are using old core file format for 32-bit gdb. Set sizeof CORE_COMMONSZ appropriately in case of either new or old core file format. (read_hdr): Added BFD64 check for 64-bit support. (rs6000coff_core_p): Likewise. (rs6000coff_core_file_matches_executable_p): Likewise. (rs6000coff_core_file_failing_command): Likewise. (rs6000coff_core_file_failing_signal): Likewise. Add support for debugging core files generated by binaries in Large Memory model. (rs6000coff_core_p): If Large Memory Model is used, then the .data segment should start from BDATAORG which has been defined in the system header files. 2015-10-26 H.J. Lu PR ld/19175 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new instead of calling bfd_link_get_defined_symbol. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip relocation overflow for bfd_link_hash_new. * linker.c (bfd_link_get_defined_symbol): Removed. d170 2 d173 1 a173 1 2015-10-26 H.J. Lu d175 91 a265 8 PR ld/19171 * elf32-i386.c (elf_i386_convert_load): Call bfd_link_get_defined_symbol to check if a symbol is defined. * elf64-x86-64.c (elf_x86_64_convert_load): Call bfd_link_get_defined_symbol to get defined symbol section and value. * linker.c (bfd_link_get_defined_symbol): New function. * bfd-in2.h: Regenerated. d267 1 a267 1 2015-10-23 Alan Modra d269 3 a271 67 PR ld/11133 PR ld/19161 PR ld/19167 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_* and __stop_* symbol refs. (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_* and __stop_* symbol refs here.. (_bfd_elf_gc_mark_reloc): ..and here. * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update _bfd_elf_gc_mark_rsec call. 2015-10-23 Alan Modra PR ld/11133 PR ld/19161 * elflink.c (elf_gc_sweep): Revert last patch. (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here. 2015-10-22 H.J. Lu PR ld/19161 * elflink.c (elf_gc_sweep): Always keep sections marked with SEC_KEEP. 2015-10-22 Hans-Peter Nilsson * mmo.c (struct mmo_data_struct): New members symbol_consistency_override_calculated and ignore_symbol_consistency. (mmo_section_has_contents, mmo_ignore_symbol_consistency): New functions. (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to report an error for unexpected value of Main. (mmo_write_symbols_and_terminator): Similar. 2015-10-22 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and check call_nop_as_suffix for 1-byte NOP padding to pad call. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. 2015-10-22 H.J. Lu * elf64-x86-64.c: Include opcode/i386.h. (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. (R_X86_64_standard): Replace R_X86_64_PLT32_BND with R_X86_64_REX_GOTPCRELX. (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and BFD_RELOC_X86_64_REX_GOTPCRELX. (need_convert_mov_to_lea): Renamed to ... (need_convert_load): This. (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with need_convert_load. (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. (elf_x86_64_size_dynamic_sections): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_convert_mov_to_lea): Renamed to ... (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea with need_convert_load. Support R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX transformations. * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New. (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. d273 1 a273 1 2015-10-22 H.J. Lu d275 4 a278 17 * elf32-i386.c: Include opcode/i386.h. (elf_howto_table): Add R_386_GOT32X. (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X. (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X. (need_convert_mov_to_lea): Renamed to ... (need_convert_load): This. (elf_i386_check_relocs): Handle R_386_GOT32X. Replace need_convert_mov_to_lea with need_convert_load. (elf_i386_gc_sweep_hook): Handle R_386_GOT32X. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_convert_mov_to_lea): Renamed to ... (elf_i386_convert_load): This. Replace need_convert_mov_to_lea with need_convert_load. Support R_386_GOT32X transformations. * reloc.c (BFD_RELOC_386_GOT32X): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. d280 1 a280 1 2015-10-22 Andreas Krebbel d282 3 a284 8 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker only when linking an executable. (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT slot. * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker only when linking an executable. (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT slot. d286 1 a286 1 2015-10-22 Andreas Krebbel d288 3 a290 3 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT reference counters for local IFUNC calls. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. d292 1 a292 1 2015-10-22 Andreas Krebbel d294 3 a296 6 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT slot allocating code for GOTOFF relocs on ifunc symbols. (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs on ifunc symbols. (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt slot. d298 1 a298 1 2015-10-22 Andreas Krebbel d300 40 a339 4 PR ld/18841 * elf32-s390.c (elf_s390_reloc_type_class): Return reloc_class_ifunc for ifunc symbols. * elf64-s390.c (elf_s390_reloc_type_class): Likewise. d341 1 a341 1 2015-10-22 Andreas Krebbel d343 5 a347 3 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call elf_s390_finish_ifunc_symbol only for actually defined symbols. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. d349 1 a349 1 2015-10-22 Andreas Krebbel d351 2 a352 4 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove `head' parameter. * elf32-s390.c (allocate_dynrelocs): Don't use last parameter. * elf64-s390.c (allocate_dynrelocs): Don't use last parameter. d354 1 a354 1 2015-10-20 Hans-Peter Nilsson d356 1 a356 2 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value of Main in error message. d358 1 a358 1 2015-10-18 Doug Evans d360 1 a360 1 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo". d362 1 a362 1 2015-10-17 Alan Modra d364 1 a364 2 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve eh_frame FDE for ELFv1. d366 1 a366 1 2015-10-16 H.J. Lu d368 5 a372 3 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol is defined. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. d374 1 a374 1 2015-10-16 H.J. Lu d376 3 a378 3 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check def_regular. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. d380 1 a380 1 2015-10-15 H.J. Lu d382 4 a385 1 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments d387 1 a387 1 2015-10-15 Alan Modra d389 33 a421 3 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion that input and output .note.renesas sections are same size. Instead, only copy input to output if they are. d423 1 a423 1 2015-10-15 Riku Voipio d425 3 a427 4 PR ld/19123 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the offset for bfd_seek. * elfcode.h (elf_object_p): Likewise. d429 1 a429 1 2015-10-14 Rich Felker d431 18 a448 3 PR ld/19091 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit DT_PLTGOT for FDPIC output. d450 1 a450 1 2015-10-13 Alan Modra d452 3 a454 140 * elf.c (_bfd_elf_map_sections_to_segments): Don't set PT_GNU_RELRO p_flags. (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO flags to PF_R here. 2015-10-12 H.J. Lu PR ld/19073 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned definition after the default version. 2015-10-12 Andreas Krebbel PR ld/19083 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got refcount for relocs not really requiring a got slot. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise. 2015-10-11 John David Anglin * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in .data.rel.ro.local. 2015-10-07 Cupertino Miranda * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. 2015-10-06 H.J. Lu * bfd.c (bfd_update_compression_header): Clear the ch_reserved field in 64-bit output. (bfd_convert_section_contents): Likewise. 2015-10-05 H.J. Lu PR ld/18914 * elflink.c (elf_link_add_object_symbols): Don't re-export a symbol if it isn't undefined. 2015-10-04 H.J. Lu * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec, i386_pei_vec and x86_64_pei_vec for Solaris2/x86. 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC, TLSDESC_OFF_G1. (aarch64_tls_transition_without_check): Add relaxation support. (aarch64_reloc_got_type): Add support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_tls_relax): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for BFD_RELOC_AARCH64_TLSDESC_OFF_G1. 2015-10-02 Renlin Li * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC): Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1. (aarch64_tls_transition_without_check): Likewise (elfNN_aarch64_tls_relax): Likwise. 2015-10-02 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation. 2015-10-02 Renlin Li * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make TLSIE_MOVW_GOTTPREL_G1 check overflow. (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1 and TLSIE_MOVW_GOTTPREL_G0_NC. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC. * libbfd.h: Regenerate. * bfd-in2.h: Likewise 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSGD_MOVW_G1. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. 2015-10-02 Renlin Li d456 1 a456 17 * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry MOVW_GOTOFF_G0_NC. * libbfd.h: Regnerate. * bfd-in2.h: Regenerate. 2015-10-02 Renlin Li d458 12 a469 14 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise (elfNN_aarch64_final_link_relocate): Likewise 2015-010-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for MOVW_GOTOFF_G1. * libbfd.h: Regenerate. d472 1 a472 1 2015-10-02 Renlin Li d474 10 a483 7 * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise (elfNN_aarch64_final_link_relocate): Calculate offset within GOT. d485 1 a485 1 2015-10-02 Renlin Li d487 1 a487 2 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to switch statement. d489 1 a489 1 2015-10-01 H.J. Lu d491 5 a495 4 PR ld/19031 * elf64-x86-64.c (elf_x86_64_check_relocs): Set pointer_equality_needed for R_X86_64_PC32 reloc in non-code sections. d497 1 a497 1 2015-10-01 Renlin Li d499 1 a499 2 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove. (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once. d501 1 a501 1 2015-10-01 Kaz Kojima d503 1 a503 2 * config.bfd (targ_selvecs): Remove sh_elf32_vec and sh_elf32_le_vec from sh*-*-linux cases. d505 1 a505 1 2015-10-01 Alan Modra d507 13 a519 2 PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Revert last change. d521 1 a521 1 2015-09-30 H.J. Lu d523 3 a525 4 PR ld/19031 * elf32-i386.c (elf_i386_check_relocs): Set pointer_equality_needed for R_386_PC32 reloc in non-code sections. d527 1 a527 1 2015-09-30 H.J. Lu d529 3 a531 190 PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that have the compatible ELF machine code with the output bfd. 2015-09-30 Alan Modra PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that will be handled by elf_link_input_bfd. Rename abfd param to obfd. 2015-09-30 Rich Felker * config.bfd (targ_selvecs): Add fdpic and misc targets for sh*-*-linux*. 2015-09-29 Andrew Stubbs H.J. Lu PR binutils/19020 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter. * bfd-in2.h: Regenerated. 2015-08-11 Peter Zotov PR ld/18759 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE. (R_OR1K_16_PCREL): Likewise. (R_OR1K_8_PCREL): Likewise. 2015-09-23 Nick Clifton * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in order to avoid problems with left shifting negative values. (abs32code): Likewise. * mach-o.c (FILE_ALIGN): Likewise. * coff-rs6000.c (xcoff_debug_sections): Delete unused static array. * elf32-visium.c (visium_reloc_map): Likewise. * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless calls to abs function. * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise. * elf32-score.c (score_elf_final_link_relocate): Likewise. * elf32-score7.c (score_elf_final_link_relocate): Likewise. * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead of shifting to create a negative mask. * elf32-msp430.c (elf_backend_special_sections): Define. * elfxx-mips.c (got_ofst_reloc_p): Delete unused function. (got_hi16_reloc_p): Delete unused function. * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of partition name. 2015-09-23 Nick Clifton PR binutils/15835 * elf-bfd.h (struct elf_section_list): New structure. (struct elf_obj_tdata): Replace symtab_shndx_hdr with symtab_shndx_list. Delete symtab_shndx_section. (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list. * elf.c (bfd_elf_get_syms): If symtab index sections are present, scan them for the section that matches the provided symbol table. (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections. (assign_section_numbers): Use the first symtab index table in the list. (_bfd_elf_compute_section_file_positions): Replace use of symtab_shndx_hdr with use of symtab_shndx_list. (find_section_in_list): New function. (assign_file_postions_except_relocs): Use new function. (_bfd_elf_copy_private_symbol_data): Likewise. (swap_out_syms): Handle multiple symbol table index sections. * elf32-m32c.c (m32c_elf_relax_section): Replace use of symtab_shndx_hdr with use of symtab_shndx_list. * elf32-rl78.c (rl78_elf_relax_section): Likewise. * elf32-rx.c (rx_relax_section): Likewise. * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise. * elflink.c (bfd_elf_final_link): Likewise. 2015-09-21 H.J. Lu * bfd.c (bfd_update_compression_header): Use bfd_put_32 on ch_type. (bfd_check_compression_header): Use bfd_get_32 on ch_type. (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32 on ch_type. 2015-09-20 Rich Felker * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create .interp when info->nointerp. (bfd_elf_size_dynamic_sections): Adjust assert. * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp when info->nointerp. * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise. * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise. * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise. * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise. * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise. * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise. 2015-09-18 Doug Evans * targets.c (enum bfd_flavour): Add comment. (bfd_flavour_name): New function. * bfd-in2.h: Regenerate. 2015-09-18 Alan Modra * elf64-ppc.h (struct ppc64_elf_params ): Rename from no_tls_get_addr_opt. * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt. (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at default of -1. 2015-09-17 Alan Modra PR 18867 * elflink.c (elf_link_adjust_relocs): Correct start of insertion sort main loop. 2015-09-16 Alan Modra PR 18867 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to insert a run. Return status in case of malloc failure. Adjust callers. 2015-09-15 Max Filippov * elf32-xtensa.c (elf_xtensa_be_plt_entry) (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for windowed ABI. (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix up instructions according to ABI. 2015-09-14 Rich Felker * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag instead of clearing it on cross-section relocations. (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default. 2015-09-12 Helge Deller PR ld/18514 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry size to 0. 2015-09-09 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically. 2015-09-09 Jiong Wang * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three TLS local dynamic traditional relocations types. (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to local executable relaxation. 2015-09-03 H.J. Lu * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove convert_mov_to_lea. 2015-09-02 H.J. Lu d533 1 a533 169 * elf32-i386.c (R_386_irelative): Renamed to ... (R_386_ext2): This. (R_386_vt_offset): Updated. (elf_i386_rtype_to_howto): Likewise. (elf_i386_relocate_section): Likewise. 2015-09-01 H.J. Lu PR ld/18900 * elf32-i386.c (elf_i386_link_hash_entry): Add func_pointer_refcount. (elf_i386_link_hash_newfunc): Clear func_pointer_refcount. (elf_i386_get_local_sym_hash): Likewise. (elf_i386_copy_indirect_symbol): Also copy func_pointer_refcount. (elf_i386_check_relocs): Increment func_pointer_refcount. (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount. (elf_i386_allocate_dynrelocs): Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. Keep dynanamic relocations for run-time function pointer initialization. (elf_i386_relocate_section): Copy dynamic function pointer relocations. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add func_pointer_refcount. (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount. (elf_x86_64_get_local_sym_hash): Likewise. (elf_x86_64_copy_indirect_symbol): Also copy func_pointer_refcount. (elf_x86_64_check_relocs): Increment func_pointer_refcount. (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount. (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. Keep dynanamic relocations for run-time function pointer initialization. (elf_x86_64_relocate_section): Copy dynamic function pointer relocations. 2015-09-01 Alan Modra * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value if .opd section has been edited. 2015-09-01 Alan Modra PR 18878 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout. (enum ppc_stub_type): Add ppc_stub_save_res. (struct map_stub): Add "next" and "needs_save_res". (struct ppc_link_hash_entry): Add "save_res" flag. (struct ppc_link_hash_table): Add "group". (sfpr_define): Add stub_sec param. Define symbol in stub_sec if stub_sec is non-null. Set "save_res". (save_res_funcs): Make file scope, rename from funcs. Adjust uses. (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms. (ppc_build_one_stub): Handle ppc_stub_save_res. (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding stub for linker defined save_res sym. (group_sections): Init new fields of struct map_stub. (ppc64_elf_size_stubs): Reserve space for save/restore func copy. (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit alias syms too. (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res. 2015-08-31 Alan Modra * elf64-ppc.c (get_r2off): Return -1 on error. (ppc_build_one_stub): Adjust for get_r2off change. Don't emit addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero. (ppc_size_one_stub): Corresponding size changes for r2off stubs. Add condition in test for -R objects. 2015-08-31 Alan Modra * section.c (section_id): Make file scope. (bfd_get_next_section_id): New function. * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl. (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add group. Update all uses. (struct ppc_link_hash_table): Delete top_id, top_index, and input_list. Add sec_info_arr_size. Rename stub_group to sec_info, and make group info indirect. Update stub_group refs throughout file. (ppc_add_stub): Don't look for stub_sec on link_sec stub_group entry. (ppc_build_one_stub): Delete FIXME. (ppc64_elf_setup_section_lists): Size htab->sec_info for all sections, not just input sections. Don't create htab->input_list. (ppc64_elf_next_input_section): Update to use sec_info union as list pointer. (PREV_SEC): Delete. (group_sections): Pass "info" param rather than "htab". Iterate over output sections rather than input_list. Use sec_info union as list pointers. Alloc atruct map_stub, and return fail status. * bfd-in2.h: Regenerate. 2015-08-31 Alan Modra * elflink.c (elf_sort_symbol): Use correctly sized type for calculating signed section->id difference. (elf_link_add_object_symbols): Likewise. * pef.c (bfd_pef_scan_start_address): Warning fix. * vms-alpha.c (vms_new_section_hook): Likewise. 2015-08-31 Alan Modra * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix. (find_relocs_at_address_addr): Make "reloc_type" an enum. (nds32_elf_relax_delete_blanks): Warning fix. (nds32_elf_relax_loadstore): Correct loop bound. 2015-08-31 Alan Modra * section.c (struct bfd_section): Make "id" and "index" unsigned. * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit. * elf.c (elf_map_symbols): Likewise. * elf64-ppc.c (sym_exists_at): Make "id" param unsigned. (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned. (ppc64_elf_setup_section_lists): Ditto for local vars. * elf32-arm.c: Similarly to elf64-ppc.c. * elf32-avr.c: Likewise. * elf32-hppa.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-metag.c: Likewise. * elf32-nios2.c: Likewise. * elfnn-aarch64.c: Likewise. * simple.c (struct saved_offsets): Make "section_count" unsigned. * bfd-in2.h: Regenerate. 2015-08-27 Alan Modra PR 18867 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function. (elf_backend_sort_relocs_p): Define. 2015-08-26 Alan Modra PR 18867 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete. (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete. (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset): New functions. (elf_link_adjust_relocs): Use an insertion sort to sort relocs. 2015-08-26 Matthew Fortune PR ld/18401 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an ISA value to a bfd machine number. (bfd_mips_isa_ext): Update the ISA level and revision if necessary. Use mips_mach_extends_p to decide if the ISA extension needs to be set. (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to be inferred from the ABI setting. Set the ISA level from the maximum of the incoming and outgoing ISA levels. 2015-08-25 Nick Clifton PR binutils/18854 * elf.c (bfd_section_from_shdr): Replace assertions with warnings about multiple symbol tables. 2015-08-25 Renlin Li * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of ILP64. * bfd-in2.h: Regenerate. 2015-08-22 Alan Modra d535 3 a537 2 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename. Don't copy fields not set by _bfd_elf_swap_verdef_in. d539 1 a539 1 2015-08-19 Jiong Wang d541 4 a544 26 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC. (elfNN_aarch64_final_link_relocate): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-19 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d546 1 a546 25 2015-08-19 Jiong Wang PR ld/18276 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2. (elfNN_aarch64_final_link_relocate): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-19 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d548 2 a549 61 2015-08-19 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-19 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC. 2015-08-19 Alan Modra * elf-s390-common.c: Simplify expressions using bfd_linke_executable, bfd_link_pie and bfd_link_pic. * elf32-arm.c: Likewise. * elf32-bfin.c: Likewise. * elf32-frv.c: Likewise. * elf32-m68k.c: Likewise. * elf32-nios2.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf64-alpha.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elflink.c: Likewise. 2015-08-18 Jiong Wang * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. 2015-08-18 H.J. Lu PR ld/18841 * elf-bfd.h (elf_link_hash_table): Add dynsym. * elf32-i386.c (elf_i386_reloc_type_class): Return reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym. (bfd_elf_size_dynsym_hash_dynstr): Use dynsym. (elf_final_link_info): Remove dynsym_sec. (elf_link_output_extsym): Replace dynsym_sec with dynsym. (bfd_elf_final_link): Remove reference to dynsym_sec. Replace dynsym_sec with dynsym. 2015-08-18 H.J. Lu * aoutx.h: Replace shared, executable, relocatable and pie fields with bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie. d553 2 a554 1 * coff-i386.c: Likewise. a555 1 * coff-m68k.c: Likewise. d562 3 a564 1 * coff-x86_64.c: Likewise. a565 1 * coffgen.c: Likewise. a567 1 * ecofflink.c: Likewise. a568 2 * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. d571 1 a571 3 * elf-s390-common.c: Likewise. * elf-vxworks.c: Likewise. * elf.c: Likewise. a579 1 * elf32-dlx.c: Likewise. a593 1 * elf32-m68hc11.c: Likewise. a595 1 * elf32-mcore.c: Likewise. a605 2 * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. a608 1 * elf32-sh-symbian.c: Likewise. a616 1 * elf32-xc16x.c: Likewise. a632 1 * i386linux.c: Likewise. a633 1 * m68klinux.c: Likewise. a635 1 * peXXigen.c: Likewise. d638 94 a731 46 * sparclinux.c: Likewise. * sunos.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. 2015-08-18 Alan Modra PR 18667 * Makefile.am: Use $(SED) in place of sed throughout. * Makefile.in: Regenerate. 2015-08-18 Alan Modra * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC. if already defined, and set linker_def. (ppc64_elf_set_toc): Use .TOC. value if defined other than by the backend. 2015-08-14 Alan Modra PR ld/18759 * elf32-or1k.c: Revert 2015-08-11 change. 2015-08-13 H.J. Lu PR ld/18801 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise. 2015-08-12 Simon Dardis * elfxx-mips.c (STUB_MOVE): Change to use 'or' only. (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry, mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry): Update to use 'or' instead of 'addu/daddu'. (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE. (move_insns_32): Reorder table. 2015-08-11 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC relocations in debug sections. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. 2015-08-11 Jiong Wang d733 1 a733 2 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14. d735 23 a757 32 2015-08-11 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New. (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC. 2015-08-11 Jiong Wang * elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". Loose the check for symbol from ABS section. (elfNN_aarch64_size_stubs): Pass sym_sec. 2015-08-11 Jiong Wang PR ld/18668 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for calls go through plt stub. (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26, JUMP26 relocation to support inserting veneer for call to plt stub. 2015-08-11 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-11 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry. d759 1 a759 5 * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. 2015-08-11 Jiong Wang d761 1 a761 9 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. d763 1 a763 1 2015-08-11 Jiong Wang d765 1 a765 5 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC. d767 5 a771 1 2015-08-11 Jiong Wang d773 1 a773 9 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. d775 2 a776 3 2015-08-11 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry. d778 14 a791 3 * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. d793 1 a793 1 2015-08-11 H.J. Lu d795 2 a796 4 PR ld/18808 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC relocations in debug sections. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d798 1 a798 1 2015-08-11 Peter Zotov d800 2 a801 4 PR ld/18759 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE. (R_OR1K_16_PCREL): Likewise. (R_OR1K_8_PCREL): Likewise. d803 1 a803 1 2015-08-11 Nick Clifton d805 4 a808 3 PR binutils/18747 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting opcode count. d810 1 a810 6 PR binutils/18758 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section group information. * peicode.h (pe_ILF_make_a_section): Ensure alignment of the used_by_bfd pointer. (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer. d812 3 a814 1 2015-08-11 H.J. Lu d816 1 a816 1 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo. d818 6 a823 1 2015-08-10 H.J. Lu d825 1 a825 13 * elf-bfd.h (elf_symbol_version): New enum. (elf_link_hash_entry): Replace hidden with versioned. * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol version if the symbol is unversioned. Initialize versioned. (_bfd_elf_add_default_symbol): Don't look for symbol version if the symbol is unversioned or hidden. Initialize versioned. (elf_collect_hash_codes): Don't look for symbol version if the symbol is unversioned. (elf_collect_gnu_hash_codes): Likewise. (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise. (_bfd_elf_link_hash_copy_indirect): Check versioned instead of hidden. (elf_link_output_extsym): Likewise. d827 1 a827 1 2015-08-07 H.J. Lu d829 1 a829 7 PR binutils/18785 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the sh_link and sh_info fields in stripped section headers, we also check if the sh_type, sh_flags, sh_addralign and sh_entsize fields of the output section match the output. Since --only-keep-debug turns all non-debug sections into SHT_NOBITS sections, the output SHT_NOBITS type matches any input type. d831 2 a832 1 2015-08-07 H.J. Lu d834 1 a834 19 PR ld/18720 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate if the new symbol matches the existing one. The new hidden versioned symbol matches the existing symbol if they have the same symbol version. Update the existing symbol only if they match. (_bfd_elf_add_default_symbol): Update call to _bfd_elf_merge_symbol. (_bfd_elf_link_assign_sym_version): Don't set the hidden field here. (elf_link_add_object_symbols): Override a definition only if the new symbol matches the existing one. (_bfd_elf_link_hash_copy_indirect): Don't copy any references to the hidden versioned symbol. (elf_link_output_extsym): Bind a symbol locally when linking executable if it is locally defined, hidden versioned, not referenced by shared library and not exported. Turn on VERSYM_HIDDEN only if the hidden versioned symbol is defined locally. d836 2 a837 1 2015-08-05 Nick Clifton d839 1 a839 3 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and sh_info fields of sections whose type has been changed to SHT_NOBITS. d841 1 a841 2 2015-08-04 Yuriy M. Kaminskiy" Tyler Hicks d843 1 a843 8 PR binutils/18750 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message and stack overflow when char is signed and \200-\376 was in place of hex digit; also fixes \377 was handled as EOF instead of "incorrect character". (ihex_read_section): Changed for consistency. (ihex_bad_byte): Prevent (now impossible to trigger) stack overflow and incorrect escape sequence handling. * srec.c (srec_bad_byte): Likewise. d845 2 a846 1 2015-08-03 Hans-Peter Nilsson d848 25 a872 5 * elf32-cris.c (cris_elf_relocate_section) (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs) (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not just link_info->symbolic, to check if a symbol should be bound symbolically. d874 1 a874 1 2015-07-30 H.J. Lu d876 3 a878 5 PR ld/18735 * elflink.c (_bfd_elf_add_default_symbol): Add the default symbol if not performing a relocatable link. (elf_link_add_object_symbols): Adjust the default symbol if not performing a relocatable link. d880 1 a880 1 2015-07-29 H.J. Lu d882 40 a921 5 * elflink.c (elf_link_add_object_symbols): Remove !info->relocatable check for info->executable. Add !info->relocatable check for !info->executable. (elf_link_output_extsym): Remove !info->relocatable check for info->executable. d923 1 a923 1 2015-07-29 Hans-Peter Nilsson d925 1 a925 2 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type assignment loop for bfd plugin objects. d927 1 a927 1 2015-07-28 Alan Modra d929 1 a929 3 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new segment for loaded sections after nonloaded sections if the sections are on the same page. d931 1 a931 1 2015-07-28 Iain Buclaw d933 5 a937 2 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS. * config.in, configure: Regenerate. d939 1 a939 1 2015-07-27 H.J. Lu d941 3 a943 1 * configure: Regenerated. d945 1 a945 1 2015-07-27 Nick Clifton d947 2 a948 3 * elf32-msp430.c (uses_large_model): New function. (msp430_elf_eh_frame_address_size): New function. (elf_backend_eh_frame_address_size): Define. d950 1 a950 1 2015-07-27 Szabolcs Nagy d952 21 a972 2 PR ld/18705 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define. d974 1 a974 1 2015-07-27 Szabolcs Nagy d976 57 a1032 2 PR ld/18705 * elf32-arm.c (elf_backend_extern_protected_data): Define. d1034 1 a1034 1 2015-07-25 H.J. Lu d1036 9 a1044 4 PR ld/18718 * elflink.c (elf_link_output_extsym): Check symbol version section check only if not linking executable, the symbol is referenced by shared library or not locally defined. d1046 1 a1046 1 2015-07-25 Thomas Preud'homme d1048 3 a1050 11 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. * elf32-hppa.c (elf32_hppa_check_relocs, elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section, elf32_hppa_finish_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section, nios2_elf32_check_relocs, allocate_dynrelocs): Likewise. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_relocate_section): Likewise. d1052 1 a1052 1 2015-07-24 Alan Modra d1054 1 a1054 3 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela prefix for reloc section corresponding to rela section associated with renamed debug section. d1056 1 a1056 1 2015-07-24 Alan Modra d1058 91 a1148 2 * section.c (bfd_get_section_by_name_if): Iterate over entire hash chain. d1150 1 a1150 1 2015-07-23 Joseph Myers d1152 3 a1154 3 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections) : Add target address to host address difference, not to host pointer. d1156 1 a1156 1 2015-07-22 Alan Modra d1158 2 a1159 2 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead, return -1 if symbol referenced is not defined. Tidy. d1161 1 a1161 1 2015-07-20 Alan Modra d1163 22 a1184 1 * po/SRC-POTFILES.in: Regenerate. d1186 1 a1186 1 2015-07-17 Jiong Wang d1188 1 a1188 2 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically. (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically. d1190 1 a1190 1 2015-07-16 Jiong Wang d1192 3 a1194 11 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADR_PREL21. (aarch64_reloc_got_type): Ditto. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_relocate_section): Ditto. (elfNN_aarch64_gc_sweep_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. (_bfd_aarch64_elf_resolve_relocation): Ditto. 2015-07-16 Jiong Wang d1196 1 a1196 5 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADR_PREL21. d1198 3 a1200 1 2015-07-10 H.J. Lu d1202 1 a1202 4 PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. d1204 3 a1206 1 2015-07-09 Catherine Moore d1208 1 a1208 42 * elflink.c (bfd_elf_size_dynamic_sections): Call to _bfd_elf_maybe_strip_eh_frame_hdr should be before bed->elf_backend_size_dynamic_sections. 2015-07-08 Pitchumani Sivanupandi * elf32-avr.c: Add 32 bit PC relative relocation for AVR target. 2015-07-05 Richard Sandiford * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value plus addend rather than the original st_value when looking up entries in opd->adjust. 2015-07-03 Kai Tietz Nick Clifton PR ld/11539 * coffcode.h (coff_bfd_gc_sections): Define default to bfd_coff_gc_sections function. (coff_gc_mark_hook_fn): New type. * coffgen.c (init_reloc_cookie): Copy and adjust coff related code about gc-sections from elflink.c to here. (fini_reloc_cookie): Likewise. (init_reloc_cookie_rels): Likewise. (fini_reloc_cookie_rels): Likewise. (init_reloc_cookie_for_section): Likewise. (fini_reloc_cookie_for_section): Likewise. (_bfd_coff_gc_mark_hook): Likewise. (_bfd_coff_gc_mark_rsec): Likewise. (_bfd_coff_gc_mark_reloc): Likewise. (_bfd_coff_gc_mark): Likewise. (_bfd_coff_gc_mark_extra_sections): Likewise. (coff_gc_sweep_symbol_info): Likewise. (coff_gc_sweep_symbol): Likewise. (gc_sweep_hook_fn): Likewise. (coff_gc_sweep): Likewise. (bfd_coff_gc_sections): Likewise. (_bfd_coff_gc_keep): Likewise. * libcoff-in.h (coff_reloc_cookie): New struct. (bfd_coff_gc_sections): New prototype. * libcoff.h: Regenerate. d1210 6 a1215 2 2015-07-01 Sandra Loosemore Cesar Philippidis d1217 1 a1217 31 * bfd-in2.h: Regenerated. * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to... (elf_nios2_r1_howto_table_rel): This. (elf_nios2_r2_howto_table_rel): New. (BFD_IS_R2): New. (lookup_howto): Add ABFD parameter. Adjust to look up in either the R1 or R2 relocation table, as determined by ABFD. (nios2_reloc_map): Add R2 relocations. (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to return an R1 or R2 relocation. (nios2_elf32_info_to_howto): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte boundary. (nios2_elf32_relocate_section): Adjust call to lookup_howto. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_NIOS2_R2_S12): New. (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_2): New. (BFD_RELOC_NIOS2_R2_T2I4): New. (BFD_RELOC_NIOS2_R2_T2I4_1): New. (BFD_RELOC_NIOS2_R2_T2I4_2): New. (BFD_RELOC_NIOS2_R2_X1I7_2): New. (BFD_RELOC_NIOS2_R2_X2L5): New. (BFD_RELOC_NIOS2_R2_F1I5_2): New. (BFD_RELOC_NIOS2_R2_L5I4X1): New. (BFD_RELOC_NIOS2_R2_T1X1I6): New. (BFD_RELOC_NIOS2_R2_T1X1I6_2): New. d1219 2 a1220 2 2015-07-01 Sandra Loosemore Cesar Philippidis d1222 1 a1222 141 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New. * bfd-in2.h: Regenerated. * cpu-nios2.c (nios2_compatible): New. (N): Use nios2_compatible instead of bfd_default_compatible. (NIOS2R1_NEXT, NIOS2R2_NEXT): Define. (arch_info_struct): New. (bfd_nios2_arch): Chain to NIOS2R1_NEXT. * elf32-nios2.c (is_nios2_elf): New. (nios2_elf32_merge_private_bfd_data): New. (nios2_elf32_object_p): New. (bfd_elf32_bfd_merge_private_bfd_data): Define. (elf_backend_object_p): Define. 2015-07-01 H.J. Lu * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor. 2015-06-30 Nick Clifton PR binutils/18570 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag. (write_obj_attribute): Likewise. (elf_new_obj_attr): Likewise. (bfd_elf_get_obj_attr_int): Likewise. (bfd_elf_add_obj_attr_int): Likewise. (bfd_elf_add_obj_attr_string): Likewise. (bfd_elf_add_obj_attr_int_string): Likewise. (gnu_obj_attrs_arg_type): Likewise. (_bfd_elf_obj_attrs_arg_type): Likewise. (_bfd_elf_parse_attributes): Likewise. (_bfd_elf_merge_unknown_attribute_list): Likewise. * elf-bfd.h (struct obj_attribute_list): Likewise. Update prototypes. 2015-06-28 H.J. Lu * bfd-in.h (compressed_debug_section_type): Remove COMPRESS_DEBUG_ZLIB. * bfd-in2.h : Regenerated. 2015-06-26 Matthew Fortune * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable instead of !shared to indicate an application vs shared library. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL. (_bfd_mips_elf_get_target_dtag): Likewise. 2015-06-25 DJ Delorie * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix REL loads to match RELA stores. 2015-06-25 H.J. Lu * elf.c (_bfd_elf_compute_section_file_positions): Don't initialize sh_size for .shstrtab here. 2015-06-25 H.J. Lu PR gas/18451 * elf-bfd.h (elf_sym_strtab): New. (elf_link_hash_table): Add strtabcount, strtabsize and strtab. (_bfd_elf_stringtab_init): Removed. * elf.c (_bfd_elf_stringtab_init): Removed. (_bfd_elf_compute_section_file_positions): Replace bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/ _bfd_stringtab_size with elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/ _bfd_elf_strtab_size. Use _bfd_elf_strtab_add, _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get st_name. (swap_out_syms): Likewise. * elflink.c (elf_final_link_info): Replace bfd_strtab_hash with elf_strtab_hash. Remove symbuf, symbuf_count, symbuf_size and shndxbuf_size. (elf_link_flush_output_syms): Removed. (elf_link_output_sym): Renamed to ... (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add with _bfd_elf_strtab_add. Don't flush symbols to the file nor swap out symbols. (elf_link_swap_symbols_out): New. (elf_link_output_extsym): Replace elf_link_output_sym with elf_link_output_symstrtab. (elf_link_input_bfd): Likewise. (elf_final_link_free): Replace _bfd_stringtab_free with _bfd_elf_strtab_free. Remove symbuf. (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with _bfd_elf_strtab_init. Don't set symbuf, symbuf_count, symbuf_size nor shndxbuf_size. Initialize strtabsize and strtab. Initialize symshndxbuf to -1 when number of sections >= 64K. Replace elf_link_output_sym/elf_link_output_sym with elf_link_output_symstrtab/elf_link_output_symstrtab. Don't call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize and elf_link_swap_symbols_out. Replace _bfd_stringtab_size and _bfd_stringtab_emit with _bfd_elf_strtab_size and _bfd_elf_strtab_emit. 2015-06-24 H.J. Lu * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older GCC warning. 2015-06-24 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate space for the first .plt entry. (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if there are PLT relocations. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always allocate space for the first .plt entry. (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if there are PLT relocations. 2015-06-24 H.J. Lu PR ld/18591 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation overflow. 2015-06-23 Jiong Wang * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function. (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check relocations against read-only sections. 2015-06-18 Nick Clifton PR 18481 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL. 2015-06-15 Jon Turney * bfd.c: Change struct bfd_build_id to use bfd_size_type. * bfd-in2.h : Regenerate. 2015-06-16 Alan Modra d1224 2 a1225 2 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of dynamic relocs. d1227 1 a1227 1 2015-06-10 Jon Turney d1229 34 a1262 2 * elf-bfd.h : Remove struct elf_build_id. * bfd.c : Add struct bfd_build_id. d1264 1 a1264 6 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id. * libpei.h: Add protoype and macros for bfd_XXi_slurp_codeview_record. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public * peicode.h (pe_bfd_read_buildid): Add. (pe_bfd_object_p): Use pe_bfd_read_buildid(). d1266 1 a1266 1 2015-06-15 Renlin Li d1268 4 a1271 5 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTOFF_LO15. d1273 1 a1273 1 2015-06-15 Alan Modra d1275 2 a1276 3 * cofflink.c (_bfd_coff_generic_relocate_section): Revert 2014-03-26 change. Call _bfd_clear_contents for relocs against local and global symbols defined in discarded input sections. d1278 1 a1278 1 2015-06-05 Nick Clifton d1280 8 a1287 3 * elf32-msp430.c (rl78_sym_diff_handler): New function. (msp430_howto_table): Use the new function for the SYM_DIFF reloc. (msp430x_howto_table): Likewise. d1289 1 a1289 1 2015-06-05 Alan Modra d1291 3 a1293 3 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text relocs with insns moved by --ppc476-workaround. Correct output of REL16 relocs. d1295 1 a1295 1 2015-06-01 Jiong Wang d1297 4 a1300 6 * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. d1302 1 a1302 1 2015-06-01 Jiong Wang d1304 4 a1307 5 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. d1309 1 a1309 1 2015-06-01 Jiong Wang d1311 1 a1311 4 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12. d1313 1 a1313 1 2015-06-01 Jiong Wang d1315 3 a1317 6 * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. d1319 1 a1319 1 2015-06-01 Jiong Wang d1321 1 a1321 1 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry. d1324 55 a1378 2 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. d1380 1 a1380 3 2015-05-28 Catherine Moore Bernd Schmidt Paul Brook d1382 84 a1465 118 * bfd-in2.h: Regenerated. * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define. (COMPACT_EH_CANT_UNWIND_OPCODE): Define. (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from eh_frame_hdr_info. (compact_eh_frame_hdr_info): Declare. (eh_frame_hdr_info): Redeclare with union for dwarf-specific fields and compact-eh fields. (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding. (bfd_elf_section_data): Add eh_frame_entry_field. (elf_section_eh_frame_entry): Define. (bfd_elf_parse_eh_frame_entries): Declare. (_bfd_elf_parse_eh_frame_entry): Declare. (_bfd_elf_end_eh_frame_parsing): Declare. (_bfd_elf_write_section_eh_frame_entry): Declare. (_bfd_elf_eh_frame_entry_present): Declare. (_bfd_elf_section_for_symbol): Declare. * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function. (bfd_elf_record_eh_frame_entry): New function. (_bfd_elf_parse_eh_frame_entry): New function. (_bfd_elf_parse_eh_frame): Update hdr_info field references. (cmp_eh_frame_hdr): New function. (add_eh_frame_hdr_terminator): New function. (_bfd_elf_end_eh_frame_parsing): New function. (find_merged_cie): Update hdr_info field references. (_bfd_elf_discard_section_eh_frame): Likewise. (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support. (_bfd_elf_eh_frame_entry_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support. (_bfd_elf_write_section_eh_frame_entry): New function. (_bfd_elf_write_section_eh_frame): Update hdr_info field references. (_bfd_elf_fixup_eh_frame_hdr): New function. (write_compact_eh_frame_hdr): New function. (write_dwarf_eh_frame_hdr): New function. (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support. * elflink.c (_bfd_elf_section_for_symbol): New function. (elf_section_ignore_discarded_relocs): Add Compact EH support. (elf_link_input_bfd): Likewise. (bfd_elf_final_link): Likewise. (_bfd_elf_gc_mark): Likewise. (bfd_elf_parse_eh_frame_entries): New function. (bfd_elf_gc_sections): Add Compact EH support. (bfd_elf_discard_info): Likewise. * elfxx-mips.c: Include dwarf2.h. (_bfd_mips_elf_compact_eh_encoding): New function. (_bfd_mips_elf_cant_unwind_opcode): New function. * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare. (_bfd_mips_elf_cant_unwind_opcode): Declare. (elf_backend_compact_eh_encoding): Define. (elf_backend_cant_unwind_opcode): Define. * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default. (elf_backend_cant_unwind_opcode): Provide default. (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and elf_backend_cant_unwind_opcode. * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition. 2015-05-27 H.J. Lu PR binutils/18458 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_i386_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. 2015-05-26 H.J. Lu PR binutils/18437 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations in .rel.plt/.rela.plt. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. 2015-05-19 Jiong Wang * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort relocation case labels alphabetically. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_tls_relax): Ditto. (elfNN_aarch64_relocate_section): Ditto. (elfNN_aarch64_gc_sweep_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. (_bfd_aarch64_elf_resolve_relocation): Ditto. 2015-05-18 Jiong Wang * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite comments. 2015-05-16 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section for now binding. (elf_i386_allocate_dynrelocs): Use .plt.got section for now binding. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got section for now binding. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now binding. 2015-05-14 H.J. Lu * bfd.c (bfd_update_compression_header): Also write the zlib header if the SHF_COMPRESSED bit cleared.. (bfd_check_compression_header): Return the uncompressed size. * compress.c (decompress_contents): Don't skip the zlib header. (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB, which doesn't have the zlib header. (bfd_init_section_decompress_status): Likewise. (bfd_get_full_section_contents): Updated. (bfd_is_section_compressed): Likewise. (bfd_is_section_compressed_with_header): Return the uncompressed size. * elf.c (_bfd_elf_make_section_from_shdr): Updated. * bfd-in2.h: Regenerated. d1467 1 a1467 1 2015-05-14 Jiong Wang d1469 3 a1471 2 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow check restrictions. d1473 1 a1473 1 2015-05-14 Max Filippov d1475 3 a1477 2 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference as GOT reference when plt.refcount is not positive. d1479 1 a1479 1 2015-05-12 H.J. Lu d1481 2 a1482 3 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space for the first .plt entry only if needed. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. d1484 2 a1485 1 2015-05-11 H.J. Lu d1487 3 a1489 19 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo. (ALL_MACHINES_CFILES): Likewise. * archures.c (bfd_mach_iamcu): New. (bfd_mach_i386_iamcu): Likewise. (bfd_mach_i386_iamcu_intel_syntax): Likewise. (bfd_iamcu_arch): Likewise. (bfd_archures_list): Add &bfd_iamcu_arch. * config.bfd (targ_selvecs): Add iamcu_elf32_vec to i386_elf32_vec. (targ_archs): Add bfd_iamcu_arch if needed. * configure.ac: Support iamcu_elf32_vec. * cpu-iamcu.c: New file. * elf32-i386.c (elf32_iamcu_elf_object_p): New function. Add support for iamcu_elf32_vec and elf32_iamcu_bed. * targets.c (iamcu_elf32_vec): New. (_bfd_target_vector): Add iamcu_elf32_vec. * Makefile.in: Regenerated. * bfd-in2.h: Likewise. * configure: Likewise. d1491 1 a1491 1 2015-05-11 H.J. Lu d1493 2 a1494 1 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU. d1496 1 a1496 1 2015-05-10 H.J. Lu d1498 6 a1503 3 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd and output_bfd with abfd. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. d1505 1 a1505 1 2015-05-06 Toni Spets d1507 4 a1510 3 PR ld/18372 * peXXigen.c (rsrc_process_section): Skip discarded resource sections. d1512 1 a1512 1 2015-05-01 H.J. Lu d1514 2 a1515 1 * config.bfd: Support i[3-7]86-*-elf*. d1517 1 a1517 1 2015-04-30 H.J. Lu d1519 11 a1529 2 * elf32-i386.c (elf_backend_post_process_headers): Undef for Solaris 2. d1531 1 a1531 1 2015-04-30 Nick Clifton d1533 6 a1538 4 PR 18317 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of mep_reloc. (mep_reloc): Delete unused function. d1540 1 a1540 1 2015-04-29 Nick Clifton d1542 4 a1545 3 PR 17099 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG relocs. d1547 1 a1547 1 2015-04-27 Andreas Krebbel d1549 1 a1549 4 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call elf_s390_merge_obj_attributes. * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function. d1551 1 a1551 1 2015-04-24 Jiong Wang d1553 14 a1566 5 PR ld/18270 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for GOT_NORMAL for both sgot/srelgot section. (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address and generate necessary runtime relocation for GOT entry. d1568 1 a1568 1 2015-04-24 H.J. Lu d1570 1 a1570 2 PR binutils/18209 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input. d1572 1 a1572 1 2015-04-24 Jiong Wang d1574 4 a1577 2 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject PC-relative relocation for external symbol. d1579 1 a1579 1 2015-04-24 Nick Clifton d1581 3 a1583 3 PR 18313 * compress.c (decompress_contents): Zero initialse the z_stream structure. d1585 1 a1585 1 2015-04-24 Nick Clifton d1587 3 a1589 3 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler local labels to include local labels with a numeric suffix and fake symbols. d1591 1 a1591 1 2015-04-24 H.J. Lu d1593 3 a1595 3 PR binutils/18316 * section.c (SEC_MEP_VLIW): New. * bfd-in2.h: Regenerated. d1597 1 a1597 1 2015-04-23 H.J. Lu d1599 4 a1602 26 PR ld/18277 * compress.c (bfd_compress_section_contents): Remove the write_compress argument. (bfd_init_section_compress_status): Updated. (bfd_compress_section): Likewise. * elf.c (_bfd_elf_set_reloc_sh_name): New. (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name to (unsigned int) -1 if delay_st_name_p is TRUE. Use _bfd_elf_set_reloc_sh_name. (elf_fake_sections): Don't rename DWARF debug section for linker output if it will be compressed. Instead, set delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr. (assign_section_numbers): Call _bfd_elf_strtab_addref only if sh_name != (unsigned int) -1. Don't finalize nor assign shstrtab section here. Delay setting output section names to _bfd_elf_write_object_contents. (_bfd_elf_compute_section_file_positions): Update comments on sh_offset for shstrtab section. (assign_file_positions_for_non_load_sections): Set sh_offset to -1 for shstrtab section. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name when compressing DWARF debug sections. Place shstrtab section after DWARF debug sections have been compressed. (_bfd_elf_write_object_contents): Setting sh_name for output sections. d1604 1 a1604 1 2015-04-23 H.J. Lu d1606 3 a1608 12 PR binutils/18209 * bfd.c (bfd): Add is_linker_input. * elf.c (convert_debug_to_zdebug): New. (convert_zdebug_to_debug): Likewise. (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME. (_bfd_elf_init_reloc_shdr): Pass a pointer to section name instead of a pointer to section. (elf_fake_sections): Rename the section name if SEC_ELF_RENAME is set. * section.c (SEC_ELF_RENAME): New. * bfd-in2.h: Regenerated. d1610 2 a1611 1 2015-04-23 Alan Modra d1613 11 a1623 59 * elf64-ppc.c (TOC_BASE_ALIGN): Define. (ppc64_elf_next_toc_section): Align multi-got toc base. (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol. 2015-04-22 H.J. Lu PR ld/18289 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref. (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0. (elf_i386_create_dynamic_sections): Always allow copy relocs for building executables. (elf_i386_copy_indirect_symbol): Also copy gotoff_ref. (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF. (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for PIE and R_386_GOTOFF. (elf_i386_relocate_section): Allow R_386_GOTOFF in executable. 2015-04-20 H.J. Lu * elf.c (assign_section_numbers): Always set up sh_name. 2015-04-20 H.J. Lu * elf.c (assign_file_positions_for_non_load_sections): Iterate sections by pointer. (_bfd_elf_assign_file_positions_for_non_load): Likewise. 2015-04-14 H.J. Lu * bfd-in.h (compressed_debug_section_type): New. * compress.c (bfd_compress_section_contents): Add an argument for linker write compression and always generate .zdebug_* section when linking. (bfd_init_section_compress_status): Pass FALSE to bfd_compress_section_contents. (bfd_compress_section): New function. * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS on DWARF debug sections if COMPRESS_DEBUG is set and rename section if COMPRESS_DEBUG_GABI_ZLIB isn't set. (assign_file_positions_for_non_load_sections): Set sh_offset to -1 if SEC_ELF_COMPRESS is set. (assign_file_positions_except_relocs): Likwise. (_bfd_elf_assign_file_positions_for_relocs): Renamed to ... (_bfd_elf_assign_file_positions_for_non_load): This. Change return time to bfd_boolean. Compress the section if SEC_ELF_COMPRESS is set. (_bfd_elf_write_object_contents): Updated. (_bfd_elf_set_section_contents): Write section contents to the buffer if SEC_ELF_COMPRESS is set. * merge.c: Include "elf-bfd.h". (sec_merge_emit): Add arguments for contents and offset. Write to contents with offset if contents isn't NULL. (_bfd_write_merged_section): Write section contents to the buffer if SEC_ELF_COMPRESS is set. Pass contents and output_offset to sec_merge_emit. * elflink.c (bfd_elf_final_link): Allocate the buffer for output section contents if SEC_ELF_COMPRESS is set. * section.c (SEC_ELF_COMPRESS): New. * bfd-in2.h: Regenerated. d1625 1 a1625 1 2015-04-15 Alan Modra d1627 3 a1629 1 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix. d1631 1 a1631 1 2015-04-14 Nick Clifton d1633 2 a1634 30 * elf32-rl78.c (RL78_OP_REL): New macro. (rl78_elf_howto_table): Use it for complex relocs. (get_symbol_value): Handle the cases when the info or status arguments are NULL. (get_romstart): Cache the status returned by get_symbol_value. (get_ramstart): Likewise. (RL78_STACK_PUSH): Generate an error message if the stack overflows. (RL78_STACK_POP): Likewise for underflows. (rl78_compute_complex_reloc): New function. Contains the basic processing code for all RL78 complex relocs. (rl78_special_reloc): New function. Provides special reloc handling for complex relocs. (rl78_elf_relocate_section): Use rl78_compute_complex_reloc. (rl78_offset_for_reloc): Likewise. 2015-04-14 H.J. Lu PR ld/pr17709 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check info->extern_protected_data when warning copy relocs against protected symbols. (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data when checking protected non-function symbols. 2015-04-13 John Baldwin * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on FreeBSD. (elfcore_write_xstatereg): Use correct note name on FreeBSD. d1636 1 a1636 1 2015-04-13 H.J. Lu d1638 3 a1640 13 PR ld/18250 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE if the object has been claimed by plugin. 2015-04-11 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against protected data symbol when building shared library. * elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_GOTOFF64 against undefined symbol and replace SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking R_X86_64_GOTOFF64 against protected data symbol when building d1643 1 a1643 1 2015-04-10 H.J. Lu d1645 2 a1646 6 PR ld/pr17709 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF against protected data symbol when building shared library. * elf64-x86-64.c (elf_x86_64_relocate_section): Also check R_X86_64_GOTOFF64 against protected data symbol when building shared library. d1648 1 a1648 1 2015-04-10 H.J. Lu d1650 2 a1651 47 PR ld/pr15228 PR ld/pr17709 * elf-bfd.h (elf_backend_data): Add extern_protected_data. * elf32-i386.c (elf_backend_extern_protected_data): New. Defined to 1. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on copy relocs against protected symbols if extern_protected_data is true. (_bfd_elf_symbol_refs_local_p): Don't return true on protected non-function symbols if extern_protected_data is true. * elfxx-target.h (elf_backend_extern_protected_data): New. Default to 0. (elfNN_bed): Initialize extern_protected_data with elf_backend_extern_protected_data. 2015-04-10 H.J. Lu * compress.c (bfd_compress_section_contents): Replace bfd_malloc and free with bfd_alloc and bfd_release on compressed buffer. Release buffer if compressed section isn't smaller. 2015-04-10 Alan Modra PR ld/18222 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error on adding a protected visibility variable to .dynbss. 2015-04-10 Alan Modra Revert 2015-03-05 H.J. Lu PR ld/pr15228 PR ld/pr17709 * elf-bfd.h (elf_backend_data): Delete extern_protected_data. * elf32-i386.c (elf_backend_extern_protected_data): Delete. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove extern_protected_data test. (_bfd_elf_symbol_refs_local_p): Likewise. * elfxx-target.h (elf_backend_extern_protected_data): Delete. (elfNN_bed): Delete elf_backend_extern_protected_data init. 2015-04-09 H.J. Lu * compress.c (bfd_compress_section_contents): Update comments. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. d1653 1 a1653 1 2015-04-09 H.J. Lu d1655 4 a1658 3 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to object_flags. (TARGET_LITTLE_SYM): Likewise. d1660 1 a1660 1 2015-04-09 Max Filippov d1662 2 a1663 113 * elf32-xtensa.c (splay-tree.h): include header. (text_action_struct): drop next pointer. (text_action_list_struct): drop head pointer, add count and tree fields. (find_fill_action): instead of linear search in text_action_list search in the tree. (text_action_compare, action_first, action_next): new functions. (text_action_add, text_action_add_literal): instead of linear search and insertion insert new node into the tree. (removed_by_actions): pass additional parameter: action_list, use it to traverse the tree. (offset_with_removed_text): pass additional action_list parameter to removed_by_actions. (map_action_fn_context): new typedef. (map_action_fn_context_struct): new structure. (map_action_fn): new function. (map_removal_by_action): use splay_tree_foreach to build map. (find_insn_action): replace linear search in text_action_list with series of splay_tree_lookups. (print_action, print_action_list_fn): new functions. (print_action_list): use splay_tree_foreach. (init_xtensa_relax_info): drop action_list.head initialization. Initialize the tree. (compute_text_actions): use non-zero action_list_count instead of non-NULL action list. (xlate_map_context): new typedef. (xlate_map_context_struct): new structure. (xlate_map_fn): new function. (build_xlate_map): use splay_tree_foreach to build map. (action_remove_bytes_fn): new function. (relax_section): use zero action_list_count instead of NULL action list. Use splay_tree_foreach to count final section size. Drop unused variable 'removed'. 2015-04-09 Max Filippov * elf32-xtensa.c (removed_literal_map_entry): new typedef. (removed_literal_map_entry_struct): new structure. (removed_literal_list_struct): add new fields: n_map and map. (map_removed_literal, removed_literal_compare): new functions. (find_removed_literal): build index array for literals ordered by VMA, use binary search to find removed literal. 2015-04-09 Max Filippov * elf32-xtensa.c (removal_by_action_entry_struct, removal_by_action_map_struct): new structures. (removal_by_action_entry, removal_by_action_map): new typedefs. (text_action_list_struct): add new field: map. (map_removal_by_action, removed_by_actions_map, offset_with_removed_text_map): new functions. (relax_section): replace offset_with_removed_text with offset_with_removed_text_map. (translate_reloc, relax_property_section, relax_section_symbols): replace removed_by_actions with removed_by_actions_map. 2015-04-09 Max Filippov * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry, reloc_range): new typedef. (reloc_range_list_struct, reloc_range_list_entry_struct, reloc_range_struct): new structures. (reloc_range_compare, build_reloc_ranges, reloc_range_list_append, reloc_range_list_remove, reloc_range_list_update_range, free_reloc_range_list): new functions. (compute_text_actions): precompute relocation opcodes before the loop. Add relevant_relocs variable, initialize it before the loop, pass it to the check_section_ebb_pcrels_fit. (check_section_ebb_pcrels_fit): add new parameter: relevant_relocs. Update address range in the relevant_relocs if it's non-NULL and iterate only over relevant relocations. 2015-04-09 Nick Clifton * elf32-rx.c (describe_flags): Report the settings of the string insn using bits. (rx_elf_merge_private_bfd_data): Handle merging of the string insn using bits. 2015-04-08 H.J. Lu * compress.c (bfd_compress_section_contents): Work around a GCC uninitialized warning bug fixed in GCC 4.7. 2015-04-08 H.J. Lu * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI bit. * bfd.c (bfd::flags): Increase size to 18 bits. (BFD_COMPRESS_GABI): New. (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise. (bfd_update_compression_header): New fuction. (bfd_check_compression_header): Likewise. (bfd_get_compression_header_size): Likewise. (bfd_is_section_compressed_with_header): Likewise. * compress.c (MAX_COMPRESSION_HEADER_SIZE): New. (bfd_compress_section_contents): Return the uncompressed size if the full section contents is compressed successfully. Support converting from/to .zdebug* sections. (bfd_get_full_section_contents): Call bfd_get_compression_header_size to get compression header size. (bfd_is_section_compressed): Renamed to ... (bfd_is_section_compressed_with_header): This. Add a pointer argument to return compression header size. (bfd_is_section_compressed): Use it. (bfd_init_section_decompress_status): Call bfd_get_compression_header_size to get compression header size. Return FALSE if uncompressed section size is 0. * elf.c (_bfd_elf_make_section_from_shdr): Support converting from/to .zdebug* sections. * bfd-in2.h: Regenerated. d1665 1 a1665 1 2015-04-07 Alan Modra d1667 12 a1678 2 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being mapped to output .got section. d1680 1 a1680 1 2015-04-07 Alan Modra d1682 24 a1705 55 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha and has_addr16_lo. Make has_sda_refs a bitfield. (ppc_elf_check_relocs): Set new flags. (ppc_elf_link_hash_table_create): Update default_params. (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases where we won't be making .dynbss entries or editing code. Set params->pic_fixup when we'll edit code for protected var access. (allocate_dynrelocs): Allocate got entry for edited code and discard dyn_relocs. (struct ppc_elf_relax_info): Add picfixup_size. (ppc_elf_relax_section): Rename struct one_fixup to struct one_branch_fixup. Rename fixups to branch_fixups. Size space for pic fixups. (ppc_elf_relocate_section): Edit non-PIC accessing protected visibility variables to PIC. Don't emit dyn_relocs for code we've edited. * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup. 2015-04-07 Nick Clifton * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated local labels as local. 2015-04-06 H.J. Lu * compress.c (get_uncompressed_size): Removed. (bfd_compress_section_contents): Use bfd_putb64 to write uncompressed section size. (bfd_init_section_decompress_status): Replace get_uncompressed_size with bfd_getb64. 2015-04-04 H.J. Lu * elf.c (_bfd_elf_init_private_section_data): Also preserve the SHF_COMPRESSED bit if not decompress. 2015-04-04 H.J. Lu * compress.c (get_uncompressed_size): New. Extracted from ... (bfd_init_section_decompress_status): This. Use it. 2015-04-02 Andrew Turner * config.bfd: Add aarch64-*-freebsd* target triple. 2015-04-02 H.J. Lu * configure: Regenerated. 2015-04-01 Tejas Belagod Marcus Shawcroft Jiong Wang * bfd-in.h (bfd_elf64_aarch64_set_options) (bfd_elf32_aarch64_set_options): Add parameter. a1706 89 * elfnn-aarch64.c (aarch64_erratum_843419_stub) (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p) (_bfd_aarch64_erratum_843419_stub_name) (_bfd_aarch64_erratum_843419_fixup) (_bfd_aarch64_erratum_843419_scan) (_bfd_aarch64_erratum_843419_branch_to_stub) (_bfd_aarch64_erratum_843419_p): Define. (enum elf_aarch64_stub_type): Define aarch64_stub_erratum_843419_veneer. (struct elf_aarch64_stub_hash_entry): Define adrp_offset. (struct elf_aarch64_link_hash_table): Define fix_erratum_843419 and fix_erratum_843419_adr. (stub_hash_newfunc): Initialize adrp_offset; (_bfd_aarch64_add_stub_entry_after): Define. (aarch64_map_one_stub, aarch64_build_one_stub) (aarch64_size_one_stub): Handle aarch64_stub_erratum_843419_veneer. (_bfd_aarch64_resize_stubs): Round stub section size. (elfNN_aarch64_size_stubs): Add scan for 843419. (bfd_elfNN_aarch64_set_options): Add parameter. Initialize fix_erratum_843419 and fix_erratum_843419_adr. (struct erratum_835769_branch_to_stub_data): Add info. (elfNN_aarch64_write_section): Initialise info. Handle 843419. (elfNN_aarch64_size_dynamic_sections): Handle 843419. * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm) (_bfd_aarch64_sign_extend): Define. (reencode_adr_imm): Remove static. Rename to: (_bfd_aarch64_reencode_adr_imm): Define. (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm. * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP) (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend) (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm): Define. 2015-04-01 H.J. Lu * configure: Regenerated. 2015-03-31 Ed Schouten * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec for x86_64-*-cloudabi*. * configure.ac: Handle x86_64_elf64_cloudabi_vec. * configure: Regenerated. * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*. (TARGET_LITTLE_NAME): Likewise. (ELF_OSABI): Likewise. (elf64_bed): Likewise. * targets.c (x86_64_elf64_cloudabi_vec): New. (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec. 2015-03-31 H.J. Lu * configure.ac: Revert the AM_ZLIB change. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. 2015-03-30 H.J. Lu PR ld/18169 * elf-bfd.h (elf_backend_data): Add get_reloc_section. (_bfd_elf_get_reloc_section): New. * elf.c (_bfd_elf_get_reloc_section): Likewise. (assign_section_numbers): Call get_reloc_section to look up the section the relocs apply. * elfxx-target.h (elf_backend_get_reloc_section): Likewise. (elfNN_bed): Initialize get_reloc_section with elf_backend_get_reloc_section. 2015-03-29 H.J. Lu * Makefile.am (ZLIB): New. (ZLIBINC): Likewise. (AM_CFLAGS): Add $(ZLIBINC). (libbfd_la_LIBADD): Add $(ZLIB). * compress.c: Don't check HAVE_ZLIB_H to include . (decompress_contents): Don't check HAVE_ZLIB_H. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * configure.ac (AM_ZLIB): Removed. (zlibdir): New. AC_SUBST. (zlibinc): Likewise. Add --with-system-zlib. * Makefile.in: Regenerated. * acinclude.m4: Likewise. a1708 1 * doc/Makefile.in: Likewise. d1710 1 a1710 1 2015-03-27 Alan Modra d1712 58 a1769 5 PR ld/15228 PR ld/18167 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set protected_def when symbol section is read-only. Adjust all calls. * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment. d1771 1 a1771 1 2015-03-26 Tejas Belagod d1773 6 a1778 2 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic _bfd_final_link_relocate with aarch64_relocate. d1780 1 a1780 1 2015-03-26 H.J. Lu d1782 3 a1784 3 PR ld/18160 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible. (bfd_elf_gc_sections): Likewise. d1786 1 a1786 1 2015-03-25 Marcus Shawcroft d1788 3 a1790 5 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section size for initial branch. (elfNN_aarch64_build_stubs): Write initial branch. _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write mapping symbol on initial branch. d1792 1 a1792 1 2015-03-25 Marcus Shawcroft d1794 3 a1796 2 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan): Update erratum count. d1798 1 a1798 1 2015-03-25 Senthil Kumar Selvaraj d1800 3 a1802 2 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on first matching debug section. d1804 1 a1804 1 2015-03-24 H.J. Lu d1806 2 a1807 6 PR gas/18087 * compress.c (bfd_compress_section_contents): Don't write the zlib header and set contents as well as compress_status if compression didn't make the section smaller. (bfd_init_section_compress_status): Don't check compression size here. d1809 1 a1809 1 2015-03-24 Nick Clifton d1811 3 a1813 3 PR binutils/17512 * coffgen.c (coff_get_normalized_symtab): Fix test for out of range auxillary sections. d1815 1 a1815 1 2015-03-24 Marcus Shawcroft d1817 3 a1819 3 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor code into: (_bfd_aarch64_get_stub_for_link_section): Define. d1821 1 a1821 1 2015-03-24 Marcus Shawcroft d1823 2 a1824 2 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust update of section_group[].stub_sec. d1826 1 a1826 1 2015-03-24 Marcus Shawcroft d1828 2 a1829 10 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove. (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments. Delete fixes, fix_table_size and associated code. Call _bfd_aarch64_add_stub_entry_in_group. Rename to... (bfd_aarch64_erratum_835769_scan): Define. (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes, erratum_835769_fix_table_size, i and associated code. Relocate call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size correction. Delete construction of stub entry from erratum_835769_fixes array. d1831 1 a1831 1 2015-03-24 Marcus Shawcroft d1833 3 a1835 2 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use _bfd_aarch64_add_stub_entry_in_group. d1837 1 a1837 1 2015-03-24 Alan Modra d1839 3 a1841 6 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to stubs, even those for undefined weak symbols. Otherwise, don't report relocation overflow on branches to undefined strong symbols. Fix memory leak. * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation overflow on branches to undefined strong symbols. d1843 3 a1845 1 2015-03-23 Keith Seitz d1847 1 a1847 2 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add missing ';'. d1849 3 a1851 1 2015-03-23 Marcus Shawcroft d1853 1 a1853 3 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name construction into... (_bfd_aarch64_erratum_835769_stub_name): Define. d1855 2 a1856 1 2015-03-23 Marcus Shawcroft d1858 1 a1858 3 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out stub resize code into... (bfd_aarch64_resize_stubs): Define. d1860 4 a1863 1 2015-03-23 Marcus Shawcroft d1865 1 a1865 3 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub creation code into... (bfd_aarch64_create_stub_section): Define. d1867 3 a1869 1 2015-03-23 Marcus Shawcroft d1871 1 a1871 7 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename from elf_aarch64_create_or_find_stub_sec. (_bfd_aarch64_add_stub_entry_in_group): Rename from elfNN_aarch64_add_stub. Call _bfd_aarch64_create_or_find_stub_sec. (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call _bfd_aarch64_add_stub_entry_in_group. d1873 3 a1875 1 2015-03-23 Marcus Shawcroft d1877 1 a1877 3 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse sense of boolean return. (elfNN_aarch64_size_stubs): Adjust for above. d1879 6 a1884 1 2015-03-23 Marcus Shawcroft d1886 1 a1886 3 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec): Remove unused parameter. (elfNN_aarch64_size_stubs): Adjust for above. d1888 3 a1890 1 2015-03-23 Marcus Shawcroft d1892 3 a1894 1 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx. d1896 1 a1896 1 2015-03-23 Marcus Shawcroft d1898 1 a1898 3 * elfnn-aarch64.c (aarch64_erratum_835769_fixes) (num_aarch64_erratum_835769_fixes): Remove. (elfNN_aarch64_size_stubs): Remove assignments to above. d1900 1 a1900 1 2015-03-23 Marcus Shawcroft d1902 2 a1903 3 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn to rt2. (aarch64_erratum_seqeunce): Rename rtn to rt2. d1905 1 a1905 1 2015-03-23 Marcus Shawcroft d1907 2 a1908 1 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout. d1910 1 a1910 1 2015-03-19 Nick Clifton d1912 3 a1914 6 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of the RL78 core based upon the flags. (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14 flags. (rl78_elf_print_private_bfd_data): Use rl78_cpu_name. (elf32_rl78_machine): Always return bfd_mach_rl78. d1916 1 a1916 1 2015-03-19 Nick Clifton d1918 2 a1919 3 PR 18078 * compress.c (bfd_compress_section_contents): Do not define this function if it is not used. d1921 1 a1921 1 2015-03-18 H.J. Lu d1923 3 a1925 2 * compress.c (bfd_compress_section_contents): Make it static. * bfd-in2.h: Regenerated. d1927 1 a1927 1 2015-03-18 Eric Youngdale d1929 4 a1932 3 PR ld/16598 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs suitable for the AMD64. d1934 1 a1934 2 2015-03-18 Jon Turney Nick Clifton d1936 2 a1937 25 PR binutils/18087 * coffgen.c (make_a_section_from_file): Only prepend a z to a debug section's name if the section was actually compressed. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. * compress.c (bfd_init_section_compress_status): Do not compress the section if doing so would make it bigger. In such cases leave the section alone and return COMPRESS_SECTION_NONE. 2015-03-17 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0 on nothing to do, before malloc of returned symbol array. 2015-03-16 Nick Clifton * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not stored in the elf_section_data structure then load them as necessary. 2015-03-14 Andreas Krebbel * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort relocs against code sections. * elf32-s390.c: Define elf_backend_sort_relocs_p. * elf64-s390.c: Likewise. d1939 1 a1939 1 2015-03-11 Alan Modra d1941 3 a1943 2 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in reverse order. Account for larger size of __tls_get_addr_opt stub. d1945 1 a1945 1 2015-03-10 Yuri Gribov d1947 3 a1949 46 PR ld/16572 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for ELF_ARM_HASENTRY. (elf32_arm_print_private_bfd_data): Likewise. 2015-03-06 Nick Clifton PR binutils/17765 * elflink.c (put_value): Like previous delta, but for the 32-bit case. 2015-03-05 Nick Clifton PR binutils/17765 * elflink.c (put_value): Avoid using an undefined shift operation. 2015-03-05 H.J. Lu PR ld/pr15228 PR ld/pr17709 * elf-bfd.h (elf_backend_data): Add extern_protected_data. * elf32-i386.c (elf_backend_extern_protected_data): New. Defined to 1. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on copy relocs against protected symbols if extern_protected_data is true. (_bfd_elf_symbol_refs_local_p): Don't return true on protected non-function symbols if extern_protected_data is true. * elfxx-target.h (elf_backend_extern_protected_data): New. Default to 0. (elfNN_bed): Initialize extern_protected_data with elf_backend_extern_protected_data. 2015-03-05 Nick Clifton PR binutils/18025 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2 lookup fails, check for an address bias in the dwarf info, and if one exists, retry the lookup with the biased value. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function. Determines if a bias exists bewteen the addresses of functions based on DWARF information vs symbol table information. * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype. * libbfd.h: Regenerate. d1951 1 a1951 1 2015-03-04 Marcus Shawcroft d1953 1 a1953 3 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm) (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19) (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove. d1955 1 a1955 1 2015-03-04 Marcus Shawcroft d1957 4 a1960 3 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort. (aarch64_size_one_stub): Likewise. (aarch64_map_one_stub): Likewise. d1962 1 a1962 1 2015-03-04 Andreas Arnez d1964 4 a1967 6 * cpu-s390.c (N): New macro. (bfd_s390_31_arch): New. Define only if default target word size is 64 bits. Otherwise define... (bfd_390_64_arch): ...this. Make static. (bfd_s390_arch): Define according to the default target word size. Let the 'next' field point to the alternate arch. d1969 1 a1969 1 2015-03-04 Richard Sandiford d1971 3 a1973 4 PR gas/17843 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC to be used with MOVK rather than MOVZ. d1975 1 a1975 1 2015-03-03 DJ Delorie d1977 2 a1978 2 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if there's a symbol. d1980 1 a1980 1 2015-02-28 Alan Modra d1982 3 a1984 2 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if not PLT_NEW. d1986 1 a1986 1 2015-02-27 H.J. Lu d1988 1 a1988 8 * elf32-i386.c (need_convert_mov_to_lea): New. (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed. (elf_i386_convert_mov_to_lea): Return TRUE if need_convert_mov_to_lea is unset. * elf64-x86-64.c (need_convert_mov_to_lea): New. (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed. (elf_x86_64_convert_mov_to_lea): Return TRUE if need_convert_mov_to_lea is unset. d1990 1 a1990 1 2015-02-27 Nick Clifton d1992 1 a1992 4 PR binutils/17910 * coffgen.c (_bfd_coff_internal_syment_name): Only check for string length overflow when the string table length is actually set. d1994 1 a1994 1 2015-02-27 Marcus Shawcroft d1996 3 a1998 2 * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d2000 1 a2000 1 2015-02-26 Marcus Shawcroft d2002 7 a2008 160 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix TLSDESC_LD_PREL19 field width and masks. (aarch64_tls_transition_without_check) (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate) (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section) (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSDESC_LD_PREL19. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-02-26 Marcus Shawcroft * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE tests. (aarch64_tls_transition_without_check) (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate) (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section) (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define. 2015-02-26 Marcus Shawcroft * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC) (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check) (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate) (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section) (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSGD_ADR_PREL21. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define. 2015-02-26 Marcus Shawcroft * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width. (aarch64_tls_transition_without_check, aarch64_reloc_got_type) (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax) (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook) (elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-02-26 Marcus Shawcroft * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width. 2015-02-26 Marcus Shawcroft * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2) (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC) (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field width. 2015-02-26 Marcus Shawcroft * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit field width. 2015-02-26 Nick Clifton PR binutils/17512 * coffcode.h (coff_compute_section_file_positions): Report negative page sizes. * elf.c (elf_fake_sections): Handle excessive alignmment powers. (assign_file_positions_for_non_load_sections): Replace assertion with an error message. (rewrite_elf_program_header): Handle excessive segment alignments. * mach-o.c (bfd_mach_o_read_section_32): Likewise. (bfd_mach_o_read_section_64): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to print a bfd name, not %A. 2015-02-26 Alan Modra * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build thread-safe stubs for iplt. (build_tls_get_addr_stub): Restore r2 immediately after call. 2015-02-26 Terry Guo * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we merge Tag_ABI_HardFP_use. 2015-02-26 Alan Modra * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc. Use text relocs rather than giving an error on trying to use .dynbss for protected shared lib vars. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. 2015-02-25 Andrew Burgess * elf32-avr.c (struct elf_avr_section_data): New structure. (struct avr_relax_info): New structure. (elf_avr_new_section_hook): New function. (struct elf_avr_section_data): Add relax_info. (get_avr_relax_info): New function. (init_avr_relax_info): New function. (elf32_avr_relax_delete_bytes): Find next property record before deleting bytes. When deleting don't move bytes beyond the next property record. (avr_elf32_assign_records_to_section): New function. (avr_property_record_compare): New function. (avr_load_all_property_sections): New function. (elf32_avr_relax_section): Load property data. After relaxing the section, move any .align directives that have enough deleted bytes before them. (bfd_elf32_new_section_hook): Define. 2015-02-25 Andrew Burgess * elf32-avr.h (struct avr_property_header): New strucure. (avr_elf32_load_property_records): Declare. (avr_elf32_property_record_name): Declare. * elf32-avr.c: Add bfd_stdint.h include. (retrieve_local_syms): New function. (get_elf_r_symndx_section): New function. (get_elf_r_symndx_offset): New function. (internal_reloc_compare): New function. (struct avr_find_section_data): New structure. (avr_is_section_for_address): New function. (avr_find_section_for_address): New function. (avr_elf32_load_records_from_section): New function. (avr_elf32_load_property_records): New function. (avr_elf32_property_record_name): New function. 2015-02-25 Andrew Burgess * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define. (AVR_PROPERTY_RECORDS_VERSION): Define. (AVR_PROPERTY_SECTION_HEADER_SIZE): Define. (struct avr_property_record): New structure. 2015-02-24 Nick Clifton * elf32-v850.c (v850_set_note): New function. Creates a Renesas style note entry. (v850_elf_make_note_section): New function. Creates a note section. (v850_elf_create_sections): New function. Create a note section if one is not already present. (v850_elf_set_note): New function. Adds a note to a bfd. (v850_elf_copy_private_bfd_data): New function. Copies V850 notes. (v850_elf_merge_notes): New function. Merges V850 notes. (print_v850_note): New function. Displays a V850 note. (v850_elf_print_notes): New function. Displays all notes attached to a bfd. (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes. (v850_elf_print_private_bfd_data): Call v850_elf_print_notes. (v850_elf_fake_sections): Set the type of the V850 note section. * bfd-in.h (v850_elf_create_sections): Add prototype. (v850_elf_set_note): Add prototype. * bfd-in2.h: Regenerate. d2010 1 a2010 1 2015-02-24 Nick Clifton d2012 5 a2016 7 * configure.ac (AC_CHECK_HEADERS): Add wctype.h. * configure: Regenerate. * config.in: Regenerate. * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined. (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined. (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H is defined. d2018 1 a2018 1 2015-02-24 Nick Clifton d2020 18 a2037 2 * pdp11.c (set_section_contents): Pad the .text and .data sections to their aligned sizes. d2039 1 a2039 1 2015-02-23 Yoshinori Sato d2041 2 a2042 2 * config.bfd: Add h8300-*-linux. * configure.ac: Add h8300_elf32_linux_vec. a2043 4 * elf32-h8300.c: Likewise. * targets.c(_bfd_target_vector): Likewise. 2015-02-23 Nick Clifton d2045 1 a2045 2 PR 17914 * cpu-w65.c: Correct typos in license notice. d2047 2 a2048 84 PR 17940 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug symbols at end of sections. Adjust function sizes. 2015-02-20 Andreas Arnez * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype. (elfcore_write_s390_vxrs_high): Likewise. * elf.c (elfcore_grok_s390_vxrs_low): New function. (elfcore_grok_s390_vxrs_high): New function. (elfcore_grok_note): Call them. (elfcore_write_s390_vxrs_low): New function. (elfcore_write_s390_vxrs_high): New function. (elfcore_write_register_note): Call them. 2015-02-19 Branko Drevensek PR 17995 * verilog.c (verilog_write_record): Correct buffer size. 2015-02-19 Alan Modra * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier. 2015-02-19 Alan Modra PR ld/4317 * elflink.c (elf_link_input_bfd): Drop undefined local syms. (elf_link_output_extsym): Drop local and global undefined syms. Tidy. Expand comment. 2015-02-17 Alan Modra PR ld/17975 * elflink.c (struct elf_outext_info): Remove need_second_pass and second_pass. (elf_link_output_extsym): Delete code handling second forced local pass. Move code emitting NULL STT_FILE symbol later, so that it can be omitted if forced local is stripped. Don't emit the NULL STT_FILE if no file symbols have been output. (bfd_elf_final_link): Remove second forced local pass. * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms. (ppc_elf_size_dynamic_sections): Likewise. * elf64-ppc.c (ppc_build_one_stub): Likewise. (build_global_entry_stubs): Likewise. (ppc64_elf_build_stubs): Likewise. 2015-02-16 H.J. Lu PR ld/17975 * elflink.c (elf_link_output_extsym): Only check filesym_count when outputting a NULL FILE symbol. Set second_pass_sym to h->forced_local && !h->root.linker_def. 2015-02-15 H.J. Lu * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def on _TLS_MODULE_BASE_. * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise. 2015-02-15 Alan Modra * dwarf2.c (read_rangelist): Correct buffer overflow check Whitespace throughout file. 2015-02-14 Alan Modra PR ld/17973 * bfd.c (struct bfd): Add lto_output. * linker.c (_bfd_handle_already_linked): Explicitly test for objects added by the lto plugin. * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and no_export flags from archive. * archive.c (open_nested_file): New function, setting lto_output and no_export, extracted from.. (find_nested_archive): ..here. Flip params. Rename from _bfd_find_nested_archive. (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file. (_bfd_look_for_bfd_in_cache): Copy no_export. * elflink.c (elf_link_add_object_symbols): Remove now unnecessary my_archive->no_export test. (elf_link_input_bfd): Drop existing lto_output STT_FILE syms. Don't use the file name when adding lto_output STT_FILE sym. * bfd-in2.h: Regenerate. d2050 1 a2050 1 2015-02-13 Alan Modra d2052 1 a2052 45 PR binutils/17512 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove now redundant assert. 2015-02-12 Nick Clifton PR binutils/17512 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes) (read_4_bytes, read_8_bytes, read_n_bytes, read_string) (read_indirect_string, read_alt_indirect_string) (read_alt_indirect_ref, read_address, read_abbrevs) (read_attribute_value, read_attribute, decode_line_info) (find_abstract_instance_name, read_rangelist) (scan_unit_for_symbols, parse_comp_unit) (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass end pointers to reading functions and check for offsets taking pointers out of range. Replace calls to read_*_leb128 with calls to safe_read_leb128. (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge offset. * syms.c (_bfd_stab_section_find_nearest_line): Add checks for computed file_name address being before the start of the string table. 2015-02-11 H.J. Lu PR ld/17878 * bfd.c (bfd_plugin_format): New. (bfd): Add plugin_format and plugin_dummy_bfd. * plugin.c (try_load_plugin): Take a pointer to bfd_boolean argument to return TRUE if any plugin is found. Set plugin_format. (has_plugin): New. (bfd_plugin_target_p): New. (bfd_plugin_specified_p): Likewise. (bfd_plugin_target_p): Likewise. (register_ld_plugin_object_p): Likewise. (bfd_plugin_set_plugin): Set has_plugin. (load_plugin): Cache try_load_plugin result. (bfd_plugin_object_p): Try ld_plugin_object_p first. Check plugin_format. * plugin.h (bfd_plugin_target_p): New. (bfd_plugin_specified_p): Likewise. (register_ld_plugin_object_p): Likewise. * bfd-in2.h: Regenerated. d2054 49 a2102 1 2015-02-11 Pedro Alves d2104 1 a2104 4 * libbfd-in.h [__cplusplus]: Open extern "C" scope. * libcoff-in.h [__cplusplus]: Open extern "C" scope. * libbfd.h: Regenerate. * libcoff.h: Regenerate. a2105 175 * elf-bfd.h [__cplusplus]: Wrap in extern "C". * mach-o.h [__cplusplus]: Wrap in extern "C". * som.h [__cplusplus]: Wrap in extern "C". 2015-02-10 Nick Clifton PR binutils/17512 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to hold the flag bits. * peXXigen.c (pe_print_reloc): Use unsigned types to hold the size and number of relocs. (pe_print_debugdata): Use a 32-bit aligned buffer to store the codeview record. * versados.c (process_otr): Check the esdid value before using it to access the EDATA. 2015-02-09 Ed Maste * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing uninitialized and unused variable. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. 2015-02-09 Alan Modra * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL tls_sec. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec. 2015-02-09 Alan Modra * elflink.c: Whitespace, formatting fixes. (elf_link_input_bfd): Clarify comment. (elf_link_output_extsym): Exclude symbols in linker created sections when testing for plugin symbols. 2015-02-07 H.J. Lu PR ld/17935 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a warning for relocation in readonly section for -z text. (elf_i386_size_dynamic_sections): Likewise. * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise. (elf_x86_64_size_dynamic_sections): Likewise. 2015-02-06 H.J. Lu PR ld/12365 PR ld/14272 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change. (elf_link_input_bfd): Mark the plugin symbol undefined if it is referenced from a non-IR file. 2015-02-06 Nick Clifton PR binutils/17512 * peXXigen.c (rsrc_print_resource_entries): Add range check for addresses that wrap around the address space. (rsrc_parse_entry): Likewise. 2015-02-03 H.J. Lu PR ld/12365 PR ld/14272 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol undefined if it is referenced from a non-IR file. 2015-02-03 Nick Clifton PR binutils/17512 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays. (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol index or an out of range fdr index. * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise. * elf32-cris.c (cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-v850.c (v850_elf_perform_relocation): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays. (bfd_mach_o_canonicalize_one_reloc): Fix check on out of range symbol indicies. (bfd_mach_o_canonicalize_relocs): Check for out of range alloc. (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. (bfd_mach_o_build_dysymtab): Likewise. (bfd_mach_o_write_symtab_content): Set the string table size to zero upon error. (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the read fails. * peXXigen.c (pe_print_edata): Check for numeric overflow in edt fields. * tekhex.c (first_phase): Check for src pointer reaching end of buffer. 2015-02-03 Will Newton * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Set st_value to zero for undefined symbols if the reference is weak or pointer_equality_needed is FALSE. * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve comment discussing why we clear st_value for some symbols. 2015-02-02 Kuan-Lin Chen * elf32-nds32.c (nds32_get_section_contents): Add one more argument. (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7. 2015-01-29 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD optimization. Tidy mask for GOT_TLSGD optimization. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct location of nop zapping high insn too. 2015-01-28 Alan Modra * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc". * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols in .toc indicate xlc compiled code that might require a rw .toc. 2015-01-28 James Bowman * Makefile.am: Add FT32 files. * archures.c (enum bfd_architecture): Add bfd_arch_ft32. (bfd_mach_ft32): Define. (bfd_ft32_arch): Declare. (bfd_archures_list): Add bfd_ft32_arch. * config.bfd: Handle FT32. * configure.ac: Likewise. * cpu-ft32.c: New file. * elf32-ft32.c: New file. * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17, BFD_RELOC_FT32_18): Define. * targets.c (_bfd_target_vector): Add ft32_elf32_vec. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * Makefile.in: Regenerate. a2106 1 * po/SRC-POTFILES.in: Regenerate. d2108 1 a2108 1 2015-01-27 Nick Clifton d2110 3 a2112 108 PR binutils/17512 * pdp11.c (aout_get_external_symbols): Return false if there are no symbols. * dwarf2.c (concat_filename): Check for an empty directory table. (scan_unit_for_symbols): Check for reading off the end of the unit. (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a non-string form. * elf64-ppc.c (opd_entry_value): Fail if there are no relocs available. 2015-01-26 Kuan-Lin Chen * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting. 2015-01-22 DJ Delorie * elf32-m32c.c (m32c_apply_reloc_24): New. (m32c_elf_howto_table): Use it for R_M32C_24. (m32c_elf_relocate_section): Handle R_M32C_24 specially. 2015-01-22 Nick Clifton PR binutils/17512 * coffcode.h (handle_COMDAT): When searching for the section symbol, make sure that there is space left in the symbol table. * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks. 2015-01-21 Nick Clifton PR binutils/17512 * coffcode.h (coff_set_arch_mach_hook): Check return value from bfd_malloc. (coff_slurp_line_table): Return FALSE if the line number information was corrupt. (coff_slurp_symbol_table): Return FALSE if the symbol information was corrupt. * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always initialise the fields of the dyld_info structure. (bfd_mach_o_build_exec_seg_command): Replace assertion with an error message and a return value. (bfd_mach_o_layout_commands): Change the function to boolean. Return FALSE if the function fails. (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands fails. (bfd_mach_o_read_command): Fail if an unrecognised command is encountered. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the read fails. (slurp_symtab): Check the return from bfd_malloc. (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy encountered an error. (_bfd_XXi_final_link_postscript): Fail if a section could not be copied. * peicode.h (pe_bfd_object_p): Fail if the header could not be swapped in. * tekhex.c (first_phase): Fail if the section is too big. * versados.c (struct esdid): Add content_size field. (process_otr): Use and check the new field. (versados_get_section_contents): Check that the section exists and that the requested data is available. 2015-01-20 Chung-Lin Tang * elf32-nios2.c (elf_backend_default_execstack): Define as 0. 2015-01-20 Alan Modra PR ld/17615 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop ELF_COMMON_DEF syms. 2015-01-19 Alan Modra PR ld/17615 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for linker script assignments too. * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms. (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly. 2015-01-19 Alan Modra * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration to allow return of first howto. * elf32-fr30.c (fr30_reloc_type_lookup): Likewise. * elf32-m32c.c (m32c_reloc_type_lookup): Likewise. * elf32-moxie.c (moxie_reloc_type_lookup): Likewise. * elf32-or1k.c (or1k_reloc_type_lookup): Likewise. * elf32-rl78.c (rl78_reloc_type_lookup): Likewise. * elf32-rx.c (rx_reloc_type_lookup): Likewise. * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise. * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE. * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE. (spu_elf_reloc_type_lookup): Adjust to suit. 2015-01-19 Alan Modra * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from.. (bfd_get_section_limit): ..here. * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check. (bfd_install_relocation, _bfd_final_link_relocate): Add same check here. * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check. * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated bfd_reloc_outofrange check. * bfd-in2.h: Regenerate. d2114 2 a2115 171 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok on zero size relocs. * ecoff.c (ecoff_reloc_link_order): Likewise. * elf32-nds32.c (nds32_relocate_contents): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs. (_bfd_clear_contents): Likewise. * elfxx-mips.c (mips_elf_obtain_contents): Likewise. (mips_elf_perform_relocation): Likewise. * aoutx.h (aout_link_reloc_link_order): Allow for NULL return from malloc on zero size alloc. * cofflink.c (_bfd_coff_reloc_link_order): Likewise. * elflink.c (elf_reloc_link_order): Likewise. * linker.c (_bfd_generic_reloc_link_order): Likewise. * pdp11.c (aout_link_reloc_link_order): Likewise. * xcofflink.c (xcoff_reloc_link_order): Likewise. * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3, bitsize 0, and complain_overflow_dont. * coff-sparc.c (coff_sparc_howto_table): Likewise. * elf-hppa.h (elf_hppa_howto_table): Likewise. * elf-m10200.c (elf_mn10200_howto_table): Likewise. * elf-m10300.c (elf_mn10300_howto_table): Likewise. * elf32-arc.c (elf_arc_howto_table): Likewise. * elf32-arm.c (elf32_arm_howto_table_1): Likewise. * elf32-avr.c (elf_avr_howto_table): Likewise. * elf32-bfin.c (bfin_howto_table): Likewise. * elf32-cr16.c (cr16_elf_howto_table): Likewise. * elf32-cris.c (cris_elf_howto_table): Likewise. * elf32-crx.c (crx_elf_howto_table): Likewise. * elf32-d10v.c (elf_d10v_howto_table): Likewise. * elf32-d30v.c (elf_d30v_howto_table): Likewise. * elf32-dlx.c (dlx_elf_howto_table): Likewise. * elf32-epiphany.c (epiphany_elf_howto_table): Likewise. * elf32-fr30.c (fr30_elf_howto_table): Likewise. * elf32-frv.c (elf32_frv_howto_table): Likewise. * elf32-h8300.c (h8_elf_howto_table): Likewise. * elf32-i370.c (i370_elf_howto_raw): Likewise. * elf32-i386.c (elf_howto_table): Likewise. * elf32-i860.c (elf32_i860_howto_table): Likewise. * elf32-i960.c (elf32_i960_relocate): Likewise. * elf32-ip2k.c (ip2k_elf_howto_table): Likewise. * elf32-iq2000.c (iq2000_elf_howto_table): Likewise. * elf32-lm32.c (lm32_elf_howto_table): Likewise. * elf32-m32c.c (m32c_elf_howto_table): Likewise. * elf32-m32r.c (m32r_elf_howto_table): Likewise. * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise. * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise. * elf32-m68k.c (howto_table): Likewise. * elf32-mcore.c (mcore_elf_howto_raw): Likewise. * elf32-mep.c (mep_elf_howto_table): Likewise. * elf32-metag.c (elf_metag_howto_table): Likewise. * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise. * elf32-mips.c (elf_mips_howto_table_rel): Likewise. * elf32-moxie.c (moxie_elf_howto_table): Likewise. * elf32-msp430.c (elf_msp430_howto_table): Likewise. * elf32-mt.c (mt_elf_howto_table): Likewise. * elf32-nds32.c (nds32_elf_howto_table): Likewise. * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise. * elf32-or1k.c (or1k_elf_howto_table): Likewise. * elf32-pj.c (pj_elf_howto_table): Likewise. * elf32-ppc.c (ppc_elf_howto_raw): Likewise. * elf32-rl78.c (rl78_elf_howto_table): Likewise. * elf32-rx.c (rx_elf_howto_table): Likewise. * elf32-s390.c (elf_howto_table): Likewise. * elf32-score.c (elf32_score_howto_table): Likewise. * elf32-score7.c (elf32_score_howto_table): Likewise. * elf32-sh-relocs.h (R_SH_NONE): Likewise. * elf32-spu.c (elf_howto_table): Likewise. * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise. * elf32-tilepro.c (tilepro_elf_howto_table): Likewise. * elf32-v850.c (v850_elf_howto_table): Likewise. * elf32-vax.c (howto_table): Likewise. * elf32-visium.c (visium_elf_howto_table): Likewise. * elf32-xc16x.c (xc16x_elf_howto_table): Likewise. * elf32-xgate.c (elf_xgate_howto_table): Likewise. * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise. * elf32-xtensa.c (elf_howto_table): Likewise. * elf64-alpha.c (elf64_alpha_howto_table): Likewise. * elf64-mips.c (mips_elf64_howto_table_rel): Likewise. * elf64-mmix.c (elf_mmix_howto_table): Likewise. * elf64-ppc.c (ppc64_elf_howto_raw): Likewise. * elf64-s390.c (elf_howto_table): Likewise. * elf64-sh64.c (sh_elf64_howto_table): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Likewise. * elfn32-mips.c (elf_mips_howto_table_rel): Likewise. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. (elfNN_aarch64_howto_none): Likewise. * elfxx-ia64.c (ia64_howto_table): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise. * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise. * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise. 2015-01-15 H.J. Lu PR ld/17847 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain about -fPIC if the symbol is undefined when building executable. 2015-01-15 Nick Clifton PR binutils/17512 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an error message. Never return an invalid howto pointer. * elf32-cr16.c (cr16_info_to_howto): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. * elfn32-mips.c (sh_elf_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. (sh_elf_reloc): Check that the reloc is in range. * reloc.c (bfd_perform_relocation): Check that the section is big enough for the entire reloc. (bfd_generic_get_relocated_section_contents): Report unexpected return values from perform_reloc. 2015-01-15 Nick Clifton * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled relocs. Include PC-relative adjustment for R_MSP430X_ABS16 relaxation. 2015-01-15 Alan Modra * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for any output section matching a linker created dynobj section. 2015-01-15 Alan Modra PR 17842 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set. (bfd_elf_final_link): Always create a symbol table when emit_relocs. Don't assign symtab file position unless symbols will be output. Merge blocks with condition in common. Don't call elf_backend_output_arch_local_syms or elf_backend_output_arch_syms unless other symbols are output. Move assignment of symtab_shndx file position. Localize variable. 2015-01-14 Jiong Wang * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when trying to defer them to runtime. 2015-01-13 Thomas Preud'homme * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. 2015-01-13 Jiong Wang * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check for TLSLE_MOVW_TPREL_G2. 2015-01-13 Jiong Wang PR ld/17415 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the bit mask. d2117 3 a2119 1 2015-01-12 Terry Guo d2121 1 a2121 3 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New function. (_bfd_elf_gc_mark_extra_sections): Use it. d2123 4 a2126 1 2015-01-11 H.J. Lu d2128 1 a2128 4 PR ld/17827 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE, only discard space for pc-relative relocs symbols which turn out to need copy relocs. d2130 3 a2132 1 2015-01-09 Nick Clifton d2134 1 a2134 4 * tekhex.c (getvalue): Fix thinko in test for correct extraction of value. (getsym): Return false if there was not enough data to extract the symbol. d2136 2 a2137 1 2015-01-09 Anthony Green d2139 1 a2139 1 * elf32-moxie.c (ELF_MACHINE_ALT1): Define. d2141 2 a2142 15 2015-01-08 Nick Clifton * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of 16-bit absolute BR instructions to 10-bit pc-relative JMP instructions. 2015-01-08 Nick Clifton PR binutils/17512 * coffcode.h (coff_slurp_symbol_table): Return false if we failed to load the line table. * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum maxpagesize of 1. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the Data Directory Size is too large. d2144 1 a2144 1 2015-01-06 H.J. Lu d2146 3 a2148 3 PR binutils/17512 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. d2150 1 a2150 1 2015-01-06 Nick Clifton d2152 2 a2153 3 PR binutils/17512 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the string table. d2155 1 a2155 5 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1. (bfd_perform_relocation): Include the size of the reloc in the test for an out of range relocation. (bfd_generic_get_relocated_section_contents): Remove reloc range test. d2157 2 a2158 6 * coff-i860.c (CALC_ADDEND): Always set an addend value. * tekhex.c (getvalue): Add an end pointer parameter. Use it to avoid reading off the end of the buffer. (getsym): Likewise. (first_phase): Likewise. (pass_over): Pass an end pointer to the invoked function. d2160 1 a2160 1 2015-01-05 H.J. Lu d2162 2 a2163 4 PR binutils/17512 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt input. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. d2165 1 a2165 1 2015-01-05 Nick Clifton d2167 2 a2168 9 PR binutils/17512 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized is at least big enough for the header to be read. * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs. * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks. (bfd_mach_o_read_command): Prevetn duplicate error messages about unrecognized commands. * syms.c (_bfd_stab_section_find_nearest_line): Add range checks when indexing into the string table. d2170 1 a2170 1 2015-01-01 Alan Modra d2174 1 a2174 1 For older changes see ChangeLog-2014 d2176 1 a2176 1 Copyright (C) 2015 Free Software Foundation, Inc. @ 1.7 log @merge conflicts, regen for x86. @ text @d1 298 d420 1 a420 1 Peter Bergner d480 2 a481 2 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output section to bfd_abs_section_ptr if the stub is discarded. d533 1 a533 1 Christophe Monat d1526 1 a1526 1 * bfd/aoutx.h: Replace shared, executable, relocatable and pie d1529 106 a1634 106 * bfd/bout.c: Likewise. * bfd/coff-alpha.c: Likewise. * bfd/coff-arm.c: Likewise. * bfd/coff-i386.c: Likewise. * bfd/coff-i960.c: Likewise. * bfd/coff-m68k.c: Likewise. * bfd/coff-mcore.c: Likewise. * bfd/coff-mips.c: Likewise. * bfd/coff-ppc.c: Likewise. * bfd/coff-rs6000.c: Likewise. * bfd/coff-sh.c: Likewise. * bfd/coff-tic80.c: Likewise. * bfd/coff-x86_64.c: Likewise. * bfd/coff64-rs6000.c: Likewise. * bfd/coffgen.c: Likewise. * bfd/cofflink.c: Likewise. * bfd/ecoff.c: Likewise. * bfd/ecofflink.c: Likewise. * bfd/elf-bfd.h: Likewise. * bfd/elf-eh-frame.c: Likewise. * bfd/elf-ifunc.c: Likewise. * bfd/elf-m10200.c: Likewise. * bfd/elf-m10300.c: Likewise. * bfd/elf-s390-common.c: Likewise. * bfd/elf-vxworks.c: Likewise. * bfd/elf.c: Likewise. * bfd/elf32-arm.c: Likewise. * bfd/elf32-avr.c: Likewise. * bfd/elf32-bfin.c: Likewise. * bfd/elf32-cr16.c: Likewise. * bfd/elf32-cr16c.c: Likewise. * bfd/elf32-cris.c: Likewise. * bfd/elf32-crx.c: Likewise. * bfd/elf32-d10v.c: Likewise. * bfd/elf32-dlx.c: Likewise. * bfd/elf32-epiphany.c: Likewise. * bfd/elf32-fr30.c: Likewise. * bfd/elf32-frv.c: Likewise. * bfd/elf32-ft32.c: Likewise. * bfd/elf32-h8300.c: Likewise. * bfd/elf32-hppa.c: Likewise. * bfd/elf32-i370.c: Likewise. * bfd/elf32-i386.c: Likewise. * bfd/elf32-i860.c: Likewise. * bfd/elf32-ip2k.c: Likewise. * bfd/elf32-iq2000.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-m32c.c: Likewise. * bfd/elf32-m32r.c: Likewise. * bfd/elf32-m68hc11.c: Likewise. * bfd/elf32-m68hc1x.c: Likewise. * bfd/elf32-m68k.c: Likewise. * bfd/elf32-mcore.c: Likewise. * bfd/elf32-mep.c: Likewise. * bfd/elf32-metag.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-moxie.c: Likewise. * bfd/elf32-msp430.c: Likewise. * bfd/elf32-mt.c: Likewise. * bfd/elf32-nds32.c: Likewise. * bfd/elf32-nios2.c: Likewise. * bfd/elf32-or1k.c: Likewise. * bfd/elf32-ppc.c: Likewise. * bfd/elf32-rl78.c: Likewise. * bfd/elf32-rx.c: Likewise. * bfd/elf32-s390.c: Likewise. * bfd/elf32-score.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-sh-symbian.c: Likewise. * bfd/elf32-sh.c: Likewise. * bfd/elf32-sh64.c: Likewise. * bfd/elf32-spu.c: Likewise. * bfd/elf32-tic6x.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elf32-v850.c: Likewise. * bfd/elf32-vax.c: Likewise. * bfd/elf32-visium.c: Likewise. * bfd/elf32-xc16x.c: Likewise. * bfd/elf32-xstormy16.c: Likewise. * bfd/elf32-xtensa.c: Likewise. * bfd/elf64-alpha.c: Likewise. * bfd/elf64-hppa.c: Likewise. * bfd/elf64-ia64-vms.c: Likewise. * bfd/elf64-mmix.c: Likewise. * bfd/elf64-ppc.c: Likewise. * bfd/elf64-s390.c: Likewise. * bfd/elf64-sh64.c: Likewise. * bfd/elf64-x86-64.c: Likewise. * bfd/elflink.c: Likewise. * bfd/elfnn-aarch64.c: Likewise. * bfd/elfnn-ia64.c: Likewise. * bfd/elfxx-mips.c: Likewise. * bfd/elfxx-sparc.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/i386linux.c: Likewise. * bfd/linker.c: Likewise. * bfd/m68klinux.c: Likewise. * bfd/pdp11.c: Likewise. * bfd/pe-mips.c: Likewise. * bfd/peXXigen.c: Likewise. * bfd/reloc.c: Likewise. * bfd/reloc16.c: Likewise. * bfd/sparclinux.c: Likewise. * bfd/sunos.c: Likewise. * bfd/vms-alpha.c: Likewise. * bfd/xcofflink.c: Likewise. d1688 1 a1688 1 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". d1989 4 a1992 4 PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. a2304 1 bfd/ d3213 1 a3213 1 * bfd/bfd-in2.h: Regenerated. d3362 2 a3363 2 * bfd/bfd-in2.h: Regenerate. * bfd/libbfd.h: Regenerate. d3834 1 a3834 1 comment discussing why we clear st_value for some symbols. @ 1.7.2.1 log @Sync with HEAD @ text @a0 298 2016-06-29 Tristan Gingold * version.m4: Bump version to 2.26.1 * configure: Regenerate. 2016-06-29 Tristan Gingold * development.sh: Set development to false. 2016-06-28 Alan Modra Apply from master 2016-05-19 Alan Modra * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. 2016-06-28 Alan Modra PR ld/19264 * elf64-ppc.c (STUB_SHRINK_ITER): Define. (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER if shrinking stubs. (ppc64_elf_size_stubs): Adjust to suit. 2016-06-14 Senthil Kumar Selvaraj Backport from master 2016-06-14 Senthil Kumar Selvaraj PR ld/20254 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc offsets until reloc_toaddr. 2016-06-14 H.J. Lu Backport from master 2016-06-13 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. 2016-06-13 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. 2016-06-14 H.J. Lu Backport from master 2016-06-11 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): When relocating R_386_GOT32, return error without a base register for PIC and subtract the .got.plt section address only with a base register. 2016-06-13 Senthil Kumar Selvaraj Backport from master 2016-06-08 Senthil Kumar Selvaraj PR ld/20221 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms and relocs only if shrinking occurred. 2016-06-09 Alan Modra PR ld/20159 PR ld/16467 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change. (_bfd_elf_add_default_symbol): Don't indirect to/from defined symbol given a version by a script different to the version of the symbol being added. (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and _bfd_elf_strtab_restore. Don't fudge dynstr references. * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete. (struct strtab_save): New. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions. * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare. 2016-05-20 H.J. Lu Backport from master 2016-05-20 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32 when setting need_convert_load. 2016-05-19 H.J. Lu PR ld/20117 * elf32-i386.c (elf_i386_convert_load): Don't convert R_386_GOT32. 2016-05-18 Christophe Monat Backport from master 2016-05-09 Christophe Monat PR ld/20030 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding. (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs to nb_words. (create_instruction_vldmia): Add is_dp to disambiguate SP/DP encoding. (create_instruction_vldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding, uses it to re-encode. 2016-05-15 H.J. Lu Backport from master 2016-05-13 H.J. Lu PR ld/20093 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert GOTPCREL relocation against large section. * elflink.c (bfd_elf_final_link): Likewise. 2016-05-11 Alan Modra PR 20060 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local. * elf32-ppc.c (ppc_elf_tls_setup): Likewise. 2016-04-30 H.J. Lu Backport from master 2016-04-27 H.J. Lu PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. 2016-03-29 Toni Spets PR 19878 * coffcode.h (coff_write_object_contents): Revert accidental 2014-11-10 change. 2016-03-17 H.J. Lu Backport from master 2016-03-15 H.J. Lu PR ld/19827 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol locally in PIE. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. 2016-03-15 H.J. Lu Backport from master 2016-01-30 H.J. Lu PR ld/19539 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation against STT_GNU_IFUNC symbol only with dynamic symbols. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. 2016-03-15 Nick Clifton Backport from master: 2016-03-09 Leon Winter PR ld/19623 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply relocations against absolute symbols. 2016-03-14 H.J. Lu Backport from master 2016-01-28 H.J. Lu PR binutils/19523 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to decompress debug sections. 2016-03-09 H.J. Lu PR ld/19579 Backport from master 2016-03-08 H.J. Lu * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking together. 2016-03-04 H.J. Lu * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. 2016-03-09 Nick Clifton Alan Modra PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise. 2016-03-01 H.J. Lu PR ld/19752 Backport from master 2015-12-18 H.J. Lu * coff-x86_64.c (coff_amd64_reloc): Fix formatting. 2015-12-18 Nick Clifton * coff-i386.c (coff_i386_reloc): Fix formatting. 2016-02-26 H.J. Lu Backport from master 2016-02-24 H.J. Lu PR ld/19698 * elflink.c (bfd_elf_record_link_assignment): Set versioned if symbol version is unknown. 2016-02-26 H.J. Lu Backport from master 2016-02-01 H.J. Lu PR ld/19553 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED doesn't match the symbol referenced by regular object. 2016-02-26 H.J. Lu Backport from master 2016-02-24 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. 2016-02-26 Alan Modra * elf64-ppc.c (create_linkage_sections): Create sfpr when save_restore_funcs, rest of sections when not relocatable. (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. (sfpr_define): Define all symbols on emitted code. (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created when relocatable. Move sfpr_define loop earlier. 2016-02-25 Jiong Wang Backport from master 2016-01-21 Jiong Wang * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch veneer for sym_sec != input_sec. (elfNN_aarch64_size_stub): Support STT_SECTION symbol. (elfNN_aarch64_final_link_relocate): Take rela addend into account when calculation destination. 2016-02-10 H.J. Lu Backport from master 2016-02-10 H.J. Lu PR ld/19601 * elf32-i386.c (elf_i386_relocate_section): Mask off the least significant bit in GOT offset for R_386_GOT32X. 2016-02-02 H.J. Lu Backport from master 2016-02-02 H.J. Lu PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distances in the compressed_size field of the output section. 2016-02-01 John David Anglin PR ld/19526 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output files. * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. 2016-01-25 Tristan Gingold * version.m4: Bump version to 2.26.0 * configure: Regenerate. d122 1 a122 1 Peter Bergner d182 2 a183 2 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output section to bfd_abs_section_ptr if the stub is discarded. d235 1 a235 1 Christophe Monat d1228 1 a1228 1 * aoutx.h: Replace shared, executable, relocatable and pie d1231 106 a1336 106 * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-m68k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-bfd.h: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elf-s390-common.c: Likewise. * elf-vxworks.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-dlx.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-ft32.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * i386linux.c: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. d1390 1 a1390 1 * elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". d1691 4 a1694 4 PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. d2007 1 d2916 1 a2916 1 * bfd-in2.h: Regenerated. d3065 2 a3066 2 * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d3537 1 a3537 1 comment discussing why we clear st_value for some symbols. @ 1.7.2.2 log @Sync with HEAD @ text @d1 1 a1 1 2016-08-03 Tristan Gingold d3 1 a3 1 * version.m4: Bump version to 2.27 d6 1 a6 1 2016-08-03 Tristan Gingold d10 1 a10 1 2016-08-02 Alan Modra d12 238 a249 2 PR ld/20428 * elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group. d251 66 a316 1 2016-07-27 Nick Clifton d318 92 a409 3 * Import this patch from the mainline: 2016-07-27 Ozkan Sezer Nick Clifton d411 2 a412 3 PR ld/20401 * coffgen.c (fini_reloc_cookie_rels): Check for the extistence of the coff_section_data before using it. d414 1 a414 1 2016-07-01 Tristan Gingold d416 1 a416 1 * version.m4: Bump version to 2.26.90 d419 56 a474 1 2016-07-01 Tristan Gingold d476 15 a490 1 * version.m4: Bump version to 2.27.51 d493 29 a521 1 2016-06-29 Nick Clifton d523 7 a529 49 * elfnn-aarch64.c (is_aarch64_mapping_symbol): New function. Returns TRUE for AArch64 mapping symbols. (elfNN_aarch64_backend_symbol_processing): New function. Marks mapping symbols as precious in object files so that they will not be stripped. (elf_backend_symbol_processing): Define. * elf32-arm.c (is_arm_mapping_symbol): New function. Returns TRUE for ARM mapping symbols. (elf32_arm_backend_symbol_processing): Make use of the new function. 2016-06-28 H.J. Lu PR ld/20306 * elflink.c (elf_link_check_versioned_symbol): Return false for unreferenced undefined symbol. 2016-06-28 Nick Clifton * elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc is needed. * elf32-arm.c (elf32_arm_backend_symbol_processing): New function. Marks mapping symbols in object files as precious, so that strip will not remove them. (elf_backend_symbol_processing): Define. 2016-06-28 James Clarke * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64. 2016-06-28 Maciej W. Rozycki * elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_PC16_S1. (mips16_reloc_map): Likewise. * elf64-mips.c (mips16_elf64_howto_table_rel): Likewise. (mips16_elf64_howto_table_rela): Likewise. (mips16_reloc_map): Likewise. * elfn32-mips.c (elf_mips16_howto_table_rel): Likewise. (elf_mips16_howto_table_rela): Likewise. (mips16_reloc_map): Likewise. * elfxx-mips.c (mips16_branch_reloc_p): New function. (mips16_reloc_p): Handle R_MIPS16_PC16_S1. (b_reloc_p): Likewise. (mips_elf_calculate_relocation): Likewise. (_bfd_mips_elf_check_relocs): Likewise. * reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation. a530 1 * libbfd.h: Regenerate. d532 320 a851 1 2016-06-27 Alan Modra d853 9 a861 5 PR ld/19264 * elf64-ppc.c (STUB_SHRINK_ITER): Define. (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER if shrinking stubs. (ppc64_elf_size_stubs): Adjust to suit. d863 1 a863 1 2016-06-27 Trevor Saunders d865 3 a867 2 * elf32-dlx.h: New file. * elf32-dlx.c: Adjust. d869 1 a869 1 2016-06-25 Trevor Saunders d871 3 a873 1 * elf32-xtensa.c (xtensa_make_property_section): Remove prototype. d875 1 a875 1 2016-06-24 John Baldwin d877 2 a878 2 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV notes. d880 1 a880 1 2016-06-24 John Baldwin d882 12 a893 7 * elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for FreeBSD. Remove case for NT_FREEBSD_THRMISC. (elfcore_grok_freebsd_psinfo): New function. (elfcore_grok_freebsd_prstatus): New function. (elfcore_grok_freebsd_note): New function. (elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD" notes. d895 1 a895 1 2016-06-24 Joel Brobecker d897 2 a898 2 * elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather than its existance. d900 1 a900 1 2016-06-24 Alan Modra d902 4 a905 2 * config.bfd: Delete mips vxworks patterns matched earlier. Combine mips*-*-none with mips*-*-elf*. d907 1 a907 1 2016-06-21 Maciej W. Rozycki d909 2 a910 5 * elfxx-mips.c (mips_elf_perform_relocation): Call `info->callbacks->einfo' rather than `*_bfd_error_handler' and use the `%X%H' format for the cross-mode jump conversion error message. Remove the full stop from the end of the message. Continue processing rather than returning failure. d912 1 a912 1 2016-06-21 Graham Markall d914 3 a916 1 * archures.c: Remove bfd_mach_arc_nps400. d918 106 a1023 3 * cpu-arc.c (arch_info_struct): Likewise. * elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing): Likewise. d1025 1 a1025 1 2016-06-20 H.J. Lu d1027 2 a1028 15 PR ld/18250 PR ld/20267 * elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is defined. (elf_link_is_defined_archive_symbol): Call bfd_link_plugin_object_p on unknown plugin object and use the IR symbol table if the input is an IR object. * plugin.c (bfd_link_plugin_object_p): New function. * plugin.h (bfd_link_plugin_object_p): New prototype. 2016-06-20 H.J. Lu PR ld/20276 * elflink.c (elf_link_add_object_symbols): Don't check alignment on symbol from plugin dummy input. d1030 1 a1030 1 2016-06-18 H.J. Lu d1032 2 a1033 5 * bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to bfd_plugin_unknown. * bfd-in2.h: Regenerated. * plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown with bfd_plugin_unknown. d1035 1 a1035 1 2016-06-18 H.J. Lu d1037 2 a1038 91 PR ld/20253 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an bfd_boolean argument. * elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace "shared object" with "PIC object" in comments. (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Replace "shared object" with "PIC object" in comments. Avoid PLT if requested. Generate dynamic relocations for non-GOT references. Make room for the special first entry in PLT and allocate PLT entry only for PLT and PC-relative references. Store dynamic GOT relocations in .rel[a].iplt section for static executables. If PLT isn't used, always use GOT for symbol value. Don't allocate GOT entry if it isn't used. * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count only in the code section. Allocate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section. (elf_i386_adjust_dynamic_symbol): Increment PLT reference count only for PC-relative references. (elf_i386_allocate_dynrelocs): Pass TRUE to _bfd_elf_allocate_ifunc_dyn_relocs. (elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X relocations against STT_GNU_IFUNC symbols without PLT. Generate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section and store it in the proper REL section. Don't allow non-pointer relocation against STT_GNU_IFUNC symbol without PLT. (elf_i386_finish_dynamic_symbol): Generate dynamic R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against STT_GNU_IFUNC symbols without PLT. (elf_i386_finish_dynamic_sections): Don't handle local STT_GNU_IFUNC symbols here. (elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC symbols here. (elf_backend_output_arch_local_syms): New. * elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference count only in the code section. Allocate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section. (elf_x86_64_adjust_dynamic_symbol): Increment PLT reference count only for PC-relative references. (elf_x86_64_allocate_dynrelocs): Pass TRUE to _bfd_elf_allocate_ifunc_dyn_relocs. (elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL, R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols without PLT. Generate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section and store it in the proper RELA section. Don't allow non-pointer relocation against STT_GNU_IFUNC symbol without PLT. (elf_x86_64_finish_dynamic_symbol): Generate dynamic R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against STT_GNU_IFUNC symbols without PLT. (elf_x86_64_finish_dynamic_sections): Don't handle local STT_GNU_IFUNC symbols here. (elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC symbols here. (elf_backend_output_arch_local_syms): New. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs. 2016-06-17 Thomas Preud'homme Tony Wang * elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub sequence. (stub_long_branch_thumb2_only): Define stub. (arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only. (arm_stub_long_branch_thumb2_only): Likewise. (arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2 capable targets. 2016-06-17 Jose E. Marchesi * archures.c (bfd_mach_sparc_v8plusc): Define. (bfd_mach_sparc_v9c): Likewise. (bfd_mach_sparc_v8plusd): Likewise. (bfd_mach_sparc_v9d): Likewise. (bfd_mach_sparc_v8pluse): Likewise. (bfd_mach_sparc_v9e): Likewise. (bfd_mach_sparc_v8plusv): Likewise (bfd_mach_sparc_v9v): Likewise. (bfd_mach_sparc_v8plusm): Likewise. (bfd_mach_sparc_v9m): Likewise. (bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m. (bfd_mach_sparc_64bit_p): Likewise. * bfd-in2.h: Regenerate. * cpu-sparc.c (arch_info_struct): Add entries for bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}. * aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}. * elf32-sparc.c (elf32_sparc_final_write_processing): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise. d1040 1 a1040 1 2016-06-16 H.J. Lu d1042 4 a1045 3 * elf32-i386.c (elf_i386_check_relocs): Don't check undefined symbols for relocations against IFUNC symbols. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d1047 1 a1047 1 2016-06-16 Marcin Kościelnicki d1049 3 a1051 4 * elf32-s390.c (elf_s390_finish_dynamic_sections): Include .rela.iplt in DT_PLTRELSZ. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise, for DT_PLTRELSZ and DT_RELASZ as well. d1053 1 a1053 1 2016-06-16 H.J. Lu d1055 3 a1057 3 * elf32-i386.c (elf_i386_check_relocs): Skip relocations in non-loaded, non-alloced sections. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d1059 1 a1059 1 2016-06-15 H.J. Lu d1061 2 a1062 3 * elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before allocating dynamic relocation. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d1064 2 a1065 1 2016-06-14 Senthil Kumar Selvaraj d1067 3 a1069 3 PR ld/20254 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc offsets until reloc_toaddr. d1071 1 a1071 1 2016-06-14 H.J. Lu d1073 51 a1123 40 * elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE. Don't check symbol type for STN_UNDEF symbol index. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Check R_X86_64_IRELATIVE. Don't check symbol type for STN_UNDEF symbol index. 2016-06-14 Thomas Preud'homme * elf32-arm.c (using_thumb_only): Force review of arch check logic for new architecture. (using_thumb2): Try Tag_THUMB_ISA_use first and check for exact arch value then. Force review of arch check logic for new architecture. (arch_has_arm_nop): Update and fix arch check logic. Force review of that logic for new architecture. (arch_has_thumb2_nop): Remove. (elf32_arm_tls_relax): Use using_thumb2 instead of above function. (elf32_arm_final_link_relocate): Likewise but using thumb2. 2016-06-14 Alan Modra * bfd-in.h (bfd_my_archive): Delete. * bfd-in2.h: Regenerate. 2016-06-14 Alan Modra PR ld/20241 * archive.c (open_nested_file): Set my_archive. * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name for thin archives. * bfdio.c (bfd_tell): Don't adjust origin for thin archives. (bfd_seek): Likewise. * bfdwin.c (bfd_get_file_window): Likewise. * cache.c (cache_bmmap): Likewise. (bfd_cache_lookup_worker): Don't look in my_archive for thin archives. * mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for thin archives. * plugin.c (try_claim): Likewise. * xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of file within thin archive, not the archive. d1125 1 a1125 1 2016-06-13 H.J. Lu d1127 47 a1173 5 PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. d1175 1 a1175 1 2016-06-13 H.J. Lu d1177 3 a1179 2 * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. d1181 1 a1181 1 2016-06-13 Maciej W. Rozycki d1183 5 a1187 1 * elf32-mips.c (elf_mips_gnu_pcrel32): Update comment. d1189 1 a1189 1 2016-06-13 Cupertino Miranda d1191 3 a1193 1 * elf32-arc.c (elf_arc_relocate_section): Fixed condition. d1195 1 a1195 1 2016-06-13 Cupertino Miranda d1197 4 a1200 1 * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed. d1202 1 a1202 1 2016-06-13 Cupertino Miranda d1204 5 a1208 5 * elf32-arc.c (arc_local_data, arc_local_data): Removed. (SECTSTART): Changed. (elf_arc_relocate_section): Fixed mistake in PIE related condition. (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT. d1210 1 a1210 1 2016-06-13 Cupertino Miranda d1212 3 a1214 3 * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to enable support for "-z combreloc" and DT_RELACOUNT. (elf_backend_reloc_type_class): Likewise d1216 1 a1216 1 2016-06-11 H.J. Lu d1218 3 a1220 4 PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): When relocating R_386_GOT32, return error without a base register for PIC and subtract the .got.plt section address only with a base register. d1222 1 a1222 1 2016-06-10 Alan Modra d1224 1 a1224 33 * elf-strtab.c (struct strtab_save): Use size_t for "size". (struct elf_strtab_hash): Likewise for "size" and "alloced". (_bfd_elf_strtab_init): Formatting. (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type. (_bfd_elf_strtab_addref): Take size_t idx param. (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise. (_bfd_elf_strtab_offset): Likewise. (_bfd_elf_strtab_clear_all_refs): Use size_t idx. (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars. (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly. (_bfd_elf_strtab_finalize): Similarly. * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes. (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise. (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise. * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size using bfd_size_type. (bfd_section_from_shdr): Delete amt. (_bfd_elf_init_reloc_shdr): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. (assign_section_numbers): Use size_t reloc_count. * elflink.c (struct elf_symbuf_head): Use size_t "count". (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars. (elf_link_is_defined_archive_symbol): Likewise. (elf_add_dt_needed_tag): Likewise. (elf_finalize_dynstr): Likewise. (elf_link_add_object_symbols): Likewise. (bfd_elf_size_dynamic_sections): Likewise. (elf_create_symbuf): Similarly. (bfd_elf_match_symbols_in_sections): Likewise. (elf_link_swap_symbols_out): Likewise. (elf_link_check_versioned_symbol): Likewise. (bfd_elf_gc_record_vtinherit): Likewise. (bfd_elf_gc_common_finalize_got_offsets): Likewise. d1226 1 a1226 1 2016-06-08 Senthil Kumar Selvaraj d1228 4 a1231 3 PR ld/20221 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms and relocs only if shrinking occurred. d1233 1 a1233 1 2016-06-08 H.J. Lu d1235 2 a1236 18 * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr. (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2. (elf_i386_check_tls_transition): Check indirect call and direct call with the addr32 prefix for general and local dynamic models. Set the tls_get_addr feild. (elf_i386_convert_load_reloc): Always use addr32 prefix for indirect ___tls_get_addr call via GOT. (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE transitions with indirect call and direct call with the addr32 prefix. 2016-06-07 Marcin Kościelnicki * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment. * elf64-s390.c (elf_s390x_plt_entry): Fix comment. (elf_s390_relocate_section): Fix comment. (elf_s390_finish_dynamic_sections): Fix initialization of fixed .got.plt entries. d1238 1 a1238 1 2016-06-07 Ulrich Weigand d1240 5 a1244 3 * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt section offset when calculation the larl operand in the first PLT entry. d1246 1 a1246 1 2016-06-07 Alan Modra d1248 86 a1333 12 * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry to match other 32-bit archs. * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function. (ppc_elf_object_p): Call it. (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix overlong line. (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here. * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch. * bfd-in.h (_bfd_elf_ppc_at_tls_transform, _bfd_elf_ppc_at_tprel_transform): Move to.. * elf-bfd.h: ..here. (_bfd_elf_ppc_set_arch): Declare. d1336 1 a1336 1 2016-06-06 H.J. Lu d1338 5 a1342 10 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr. (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2. (elf_x86_64_check_tls_transition): Check indirect call and direct call with the addr32 prefix for general and local dynamic models. Set the tls_get_addr feild. (elf_x86_64_convert_load_reloc): Always use addr32 prefix for indirect __tls_get_addr call via GOT. (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE transitions with indirect call and direct call with the addr32 prefix. d1344 1 a1344 1 2016-06-04 Christian Groessler d1346 22 a1367 1 * coff-z8k.c (extra_case): Fix range check for R_JR relocation. d1369 1 a1369 1 2016-06-02 Nick Clifton d1371 30 a1400 5 PR target/20088 * cpu-arm.c (processors): Add "arm_any" type to match any ARM architecture. (arch_info_struct): Likewise. (architectures): Likewise. d1402 1 a1402 1 2016-06-02 Vineet Gupta d1404 3 a1406 1 * config.bfd: Replace -uclibc with *. d1408 1 a1408 1 2016-06-02 H.J. Lu d1410 2 a1411 1 * elf64-x86-64.c: Replace data32 with data16 in comments. d1413 1 a1413 1 2016-05-31 Alan Modra d1415 26 a1440 13 PR ld/20159 PR ld/16467 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change. (_bfd_elf_add_default_symbol): Don't indirect to/from defined symbol given a version by a script different to the version of the symbol being added. (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and _bfd_elf_strtab_restore. Don't fudge dynstr references. * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete. (struct strtab_save): New. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions. * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare. d1442 1 a1442 1 2016-06-01 Trevor Saunders d1444 23 a1466 3 * elf32-hppa.h: Add extern "C". * elf32-nds32.h: Likewise. * elf32-tic6x.h: Likewise. d1468 1 a1468 1 2016-06-01 Nick Clifton d1470 7 a1476 3 * po/sr.po: New Serbian translation. * configure.ac (ALL_LINGUAS): Add sr. * configure: Regenerate. d1478 1 a1478 1 2016-05-28 Maciej W. Rozycki d1480 5 a1484 3 * elfxx-mips.c (b_reloc_p): New function. (_bfd_mips_elf_relocate_section) : Handle branch relocations. d1486 1 a1486 1 2016-05-28 Maciej W. Rozycki d1488 14 a1501 4 * elfxx-mips.c (mips_elf_calculate_relocation): : Drop the region bits of the reloc location from calculation, treat the addend as signed with local non-section symbols and enable overflow detection. d1503 1 a1503 1 2016-05-28 Alan Modra d1505 24 a1528 2 * aoutx.h: Adjust linker callback calls throughout file, removing dead code. d1532 1 a1532 2 * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. d1534 1 d1541 1 a1541 3 * coff-w65.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. d1543 1 d1546 1 d1548 2 d1552 3 a1554 1 * elf32-arc.c: Likewise. d1563 1 d1578 1 d1581 1 d1592 2 d1597 1 d1606 1 d1608 101 a1708 114 * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * simple.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. * elf32-rx.c: (get_symbol_value, get_gp, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. 2016-05-27 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation) : Include the addend in JALX's target alignment verification. 2016-05-27 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): Also use the section name if `bfd_elf_string_from_elf_section' returns an empty string. 2016-05-26 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Use the `%X%H' rather than `%C' format for message. Continue processing rather than returning failure. 2016-05-25 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Call `->einfo' rather than `->warning'. Call `bfd_set_error'. 2016-05-25 H.J. Lu PR binutils/14625 * archive.c (bfd_slurp_armap): Replace bfd_elf64_archive_slurp_armap with _bfd_archive_64_bit_slurp_armap. (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if BFD64 is defined and the archive is too big. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ... (_bfd_archive_64_bit_slurp_armap): This. (bfd_elf64_archive_write_armap): Renamed to ... (_bfd_archive_64_bit_write_armap): This. * configure.ac: Add --enable-64-bit-archive. (want_64_bit_archive): New. Set to true by default for 64-bit MIPS and s390 ELF targets. (USE_64_BIT_ARCHIVE): New AC_DEFINE. * config.in: Regenerated. * configure: Likewise. * elf64-mips.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elf64-s390.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and bfd_elfNN_archive_functions isn't defined. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype. (_bfd_archive_64_bit_write_armap): Likewise. (_bfd_archive_64_bit_slurp_extended_name_table): New macro. (_bfd_archive_64_bit_construct_extended_name_table): Likewise. (_bfd_archive_64_bit_truncate_arname): Likewise. (_bfd_archive_64_bit_read_ar_hdr): Likewise. (_bfd_archive_64_bit_write_ar_hdr): Likewise. (_bfd_archive_64_bit_openr_next_archived_file): Likewise. (_bfd_archive_64_bit_get_elt_at_index): Likewise. (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise. (_bfd_archive_64_bit_update_armap_timestamp): Likewise. * libbfd.h: Regenerated. * plugin.c (plugin_vec): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined. d1710 1 a1710 1 2016-05-25 H.J. Lu d1712 1 a1712 23 PR ld/20103 * cofflink.c (coff_link_check_archive_element): Return TRUE if linker add_archive_element callback returns FALSE. * ecoff.c (ecoff_link_check_archive_element): Likewise. * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip archive element if linker add_archive_element callback returns FALSE. * elflink.c (elf_link_add_archive_symbols): Likewise. * pdp11.c (aout_link_check_ar_symbols): Likewise. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise. (xcoff_link_check_ar_symbols): Likewise. 2016-05-24 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Unify error reporting code. 2016-05-23 Jim Wilson * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL. * relocs.c: Add BFD_RELOC_AARCH64_NULL. d1714 15 a1728 1 * libbfd.h: Likewise. d1730 1 a1730 1 2016-05-23 Kuba Sejdak d1732 5 a1736 1 * config.bfd: Add entry for arm-phoenix. d1738 1 a1738 1 2016-05-23 Thomas Preud'homme d1740 9 a1748 5 * elf32-arm.c (arm_dedicated_stub_section_padding): New function. (elf32_arm_size_stubs): Declare stub_type in a more outer scope and account for padding for stub section requiring one. (elf32_arm_build_stubs): Add comment to stress the importance of zeroing veneer section content. d1750 1 a1750 1 2016-05-23 Thomas Preud'homme d1752 1 a1752 2 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare bfd hook. d1754 5 a1758 14 * elf32-arm.c (arm_dedicated_stub_output_section_required): New function. (arm_dedicated_stub_output_section_required_alignment): Likewise. (arm_dedicated_stub_output_section_name): Likewise. (arm_dedicated_stub_input_section_ptr): Likewise. (elf32_arm_create_or_find_stub_sec): Add stub type parameter and function description comment. Add support for dedicated output stub section to given stub types. (elf32_arm_add_stub): Add a stub type parameter and pass it down to elf32_arm_create_or_find_stub_sec. (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub. (elf32_arm_size_stubs): Pass stub type when calling elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers. (bfd_elf32_arm_keep_private_stub_output_sections): New function. d1760 4 a1763 1 2016-05-20 H.J. Lu d1765 1 a1765 2 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32 when setting need_convert_load. d1767 4 a1770 1 2016-05-20 Maciej W. Rozycki d1772 1 a1772 2 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for microMIPS JALX. d1774 3 a1776 1 2016-05-19 H.J. Lu d1778 6 a1783 4 PR ld/20117 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check R_386_GOT32X. (elf_i386_convert_load): Don't convert R_386_GOT32. d1785 1 a1785 1 2016-05-20 Alan Modra d1787 1 a1787 3 PR gas/20118 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY, SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY. d1789 1 a1789 1 2016-05-19 Cupertino Miranda d1791 13 a1803 6 * elf32-arc.c (arc_elf_final_write_processing): Changed. (debug_arc_reloc): Likewise. (elf_arc_relocate_section): Likewise. (elf_arc_check_relocs): Likewise. (elf_arc_adjust_dynamic_symbol): Likewise. (elf_arc_add_symbol_hook): Likewise. d1805 1 a1805 1 2016-05-19 Maciej W. Rozycki d1807 7 a1813 1 * config.bfd: Remove `am34-*-linux*' support. d1815 1 a1815 1 2016-05-19 Alan Modra d1817 19 a1835 2 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic relocs before plt relocs. d1837 1 a1837 1 2016-05-19 Alan Modra d1839 3 a1841 2 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. d1843 2 a1844 1 2016-05-18 Nick Clifton d1846 8 a1853 1 * po/sv.po: Updated Swedish translation. d1855 1 a1855 1 2016-05-18 Alan Modra d1857 5 a1861 2 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms for each BFD. Don't goto error_ret_free_local from outside loop. d1863 1 a1863 25 2016-05-17 Maciej W. Rozycki * elf-s390-common.c (elf_s390_add_symbol_hook): Remove STB_GNU_UNIQUE handling. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise. * elf32-i386.c (elf_i386_add_symbol_hook): Remove function. (elf_backend_add_symbol_hook): Remove macro. * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols' for STB_GNU_UNIQUE symbols. 2016-05-16 Maciej W. Rozycki * elf32-v850.c (v850_elf_copy_notes): New function, factored out from... (v850_elf_copy_private_bfd_data): ... here. Call the new function and `_bfd_elf_copy_private_bfd_data'. d1865 5 a1869 1 2016-05-13 H.J. Lu d1871 1 a1871 3 PR ld/20093 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert GOTPCREL relocation against large section. d1873 5 a1877 1 2016-05-13 Alan Modra d1879 1 a1879 40 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use linker dynamic sections in calculating size and address of dynamic tags rather than using output sections. Remove asserts. * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise. * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise. * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise. * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise. * elflink.c (bfd_elf_final_link): Likewise. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message. * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and don't set doit. Look up dynobj section. (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION invocation and dynamic tag vma calculation. Don't test boolean var == TRUE. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix DT_JMPREL calc. 2016-05-13 Alan Modra * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix octets_per_byte. Put dynamic .rela.plt last in link orders. Assign output_offset for reloc sections rather than writing sorted relocs from block corresponding to output_offset. d1881 2 a1882 1 2016-05-12 Alan Modra d1884 1 a1884 1 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last. d1886 3 a1888 1 2016-05-11 Andrew Bennett d1890 1 a1890 1 * elfxx-mips.c (print_mips_ases): Add DSPR3. d1892 2 a1893 1 2016-05-11 Alan Modra d1895 1 a1895 5 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function. (elf32_hppa_check_relocs): Don't set dynobj. (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections. (elf32_hppa_build_stubs): Likewise. * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare. d1897 1 a1897 1 2016-05-11 Alan Modra d1899 1 a1899 3 PR 20060 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local. * elf32-ppc.c (ppc_elf_tls_setup): Likewise. d1901 3 a1903 1 2016-05-10 Jiong Wang d1905 1 a1905 2 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant aarch64_tls_transition check. d1907 2 a1908 1 2016-05-10 Thomas Preud'homme d1910 1 a1910 21 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type enumerator. (arm_stub_sym_claimed): New function. (elf32_arm_create_stub): Use veneered symbol name and section if veneer needs to claim its symbol, and keep logic unchanged otherwise. (arm_stub_claim_sym): New function. (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim veneered symbol, otherwise create local symbol as before. 2016-05-10 Thomas Preud'homme * elf32-arm.c (elf32_arm_size_stubs): Use new macros ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get and set branch type of a symbol. (bfd_elf32_arm_process_before_allocation): Likewise. (elf32_arm_relocate_section): Likewise and fix identation along the way. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_finish_dynamic_symbol): Likewise. (elf32_arm_swap_symbol_in): Likewise. (elf32_arm_swap_symbol_out): Likewise. d1912 2 a1913 1 2016-05-10 Thomas Preud'homme d1915 1 a1915 57 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter. * bfd-in2.h: Regenerated. * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section parameter to add_stub_section callback. (elf32_arm_create_or_find_stub_sec): Get output section from link_sec and pass it down to add_stub_section. (elf32_arm_add_stub): Set section to stub_sec if NULL before using it for error message. (elf32_arm_size_stubs): Add output section parameter to add_stub_section function pointer parameter. 2016-05-10 Thomas Preud'homme * elf32-arm.c (elf32_arm_create_stub): New function. (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation. 2016-05-10 Thomas Preud'homme * elf32-arm.c (enum elf32_arm_stub_type): Delete arm_stub_a8_veneer_lwm enumerator. (arm_stub_a8_veneer_lwm): New unsigned constant to replace aforementioned enumerator. (struct elf32_arm_stub_hash_entry): Delete target_addend field and add source_value. (struct a8_erratum_fix): Delete addend field and add target_offset. (stub_hash_newfunc): Initialize source_value field amd remove initialization for target_addend. (arm_build_one_stub): Stop special casing Thumb relocations: promote the else to being always executed, moving the arm_stub_a8_veneer_b_cond specific code in it. Remove stub_entry->target_addend from points_to computation. (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset to target symbol from start of section rather than the offset from the stub address. (elf32_arm_size_stubs): Set stub_entry's source_value and target_value fields from struct a8_erratum_fix's offset and target_offset respectively. (make_branch_to_a8_stub): Rename target variable to loc. Compute veneered_insn_loc and loc using stub_entry's source_value. 2016-05-10 Thomas Preud'homme (elf32_arm_merge_eabi_attributes): Add merging logic for Tag_DSP_extension. 2016-05-10 Pip Cet PR ld/20059 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define as _bfd_generic_copy_link_hash_symbol_type when using generic hash table. 2016-05-09 Nick Clifton PR binutils/20063 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link field before accessing sections array. d1917 4 a1920 1 2016-05-09 Christophe Monat d1922 1 a1922 9 PR ld/20030 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding. (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs to nb_words. (create_instruction_vldmia): Add is_dp to disambiguate SP/DP encoding. (create_instruction_vldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding, uses it to re-encode. d1924 11 a1934 1 2016-05-09 Nick Clifton d1936 1 a1936 3 PR 19938 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental commit. d1938 3 a1940 1 2016-05-09 Alan Modra d1942 1 a1942 1 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check. d1944 2 a1945 1 2016-05-06 H.J. Lu d1947 1 a1947 91 PR ld/17550 * elf-bfd.h (elf_link_hash_entry): Update comments for indx, documenting that indx == -3 if symbol is defined in a discarded section. * elflink.c (elf_link_add_object_symbols): Set indx to -3 if symbol is defined in a discarded section. (elf_link_output_extsym): Strip a global symbol defined in a discarded section. 2016-05-06 H.J. Lu * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel MCU. 2016-05-05 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Extract the GOT load conversion to ... (elf_i386_convert_load_reloc): This. New function. * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load conversion to ... (elf_x86_64_convert_load_reloc): This. New function. 2016-05-05 H.J. Lu * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd. Don't check if contents == NULL. (elf_i386_tls_transition): Add from_relocate_section. Check from_relocate_section instead of contents != NULL. Update elf_i386_check_tls_transition call. (elf_i386_check_relocs): Cache the section contents if keep_memory is FALSE. Pass FALSE as from_relocate_section to elf_i386_tls_transition. (elf_i386_relocate_section): Pass TRUE as from_relocate_section to elf_i386_tls_transition. (elf_backend_caches_rawsize): New. * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check if contents == NULL. (elf_x86_64_tls_transition): Add from_relocate_section. Check from_relocate_section instead of contents != NULL. (elf_x86_64_check_relocs): Cache the section contents if keep_memory is FALSE. Pass FALSE as from_relocate_section to elf_x86_64_tls_transition. (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section to elf_x86_64_tls_transition. (elf_backend_caches_rawsize): New. 2016-05-03 Maciej W. Rozycki PR 10549 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle STB_GNU_UNIQUE. 2016-05-03 Jiong Wang * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype. * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise. * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize no_apply_dynamic_relocs. (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though dynamic relocations generated. 2016-04-29 H.J. Lu * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp setting to ... (elf_i386_create_dynamic_sections): Here. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move interp setting to ... (elf_x86_64_create_dynamic_sections): Here. 2016-04-29 H.J. Lu * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC. (elf_i386_fixup_symbol): Pass has_got_reloc to UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_i386_allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (elf_i386_convert_load): Pass TRUE to UNDEFINED_WEAK_RESOLVED_TO_ZERO. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC. (elf_x86_64_fixup_symbol): Pass has_got_reloc to UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_finish_dynamic_symbol): Likewise. (elf_x86_64_convert_load): Pass TRUE to UNDEFINED_WEAK_RESOLVED_TO_ZERO. d1949 3 a1951 1 2016-04-29 H.J. Lu d1953 1 a1953 3 * elf32-i386.c (check_relocs_failed): New. (elf_i386_check_relocs): Set check_relocs_failed on error. (elf_i386_relocate_section): Skip if check_relocs failed. d1955 2 a1956 1 2016-04-29 H.J. Lu d1958 1 a1958 2 * elf64-x86-64.c (elf_x86_64_check_relocs): Set check_relocs_failed on error. d1960 1 a1960 1 2016-04-29 Nick Clifton d1962 1 a1962 22 PR 19938 * elf-bfd.h (struct elf_backend_data): Rename elf_backend_set_special_section_info_and_link to elf_backend_copy_special_section_fields. * elfxx-target.h: Likewise. * elf.c (section_match): Ignore the SHF_INFO_LINK flag when comparing section flags. (copy_special_section_fields): New function. (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field. Perform two scans over special sections. The first one looks for a direct mapping between the output section and an input section. The second scan looks for a possible match based upon section characteristics. * elf32-arm.c (elf32_arm_copy_special_section_fields): New function. Handle setting the sh_link field of SHT_ARM_EXIDX sections. * elf32-i386.c (elf32_i386_set_special_info_link): Rename to elf32_i386_copy_solaris_special_section_fields. * elf32-sparc.c (elf32_sparc_set_special_section_info_link): Rename to elf32_sparc_copy_solaris_special_section_fields. * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to elf64_x86_64_copy_solaris_special_section_fields. d1964 2 a1965 1 2016-04-28 Nick Clifton d1967 1 a1967 1 * po/zh_CN.po: Updated Chinese (simplified) translation. d1969 9 a1977 1 2016-04-27 H.J. Lu d1979 1 a1979 3 PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. d1981 5 a1985 1 2016-04-27 Alan Modra d1987 1 a1987 3 * elflink.c (_bfd_elf_is_start_stop): New function. (_bfd_elf_gc_mark_rsec): Use it. * elf-bfd.h (_bfd_elf_is_start_stop): Declare. d1989 4 a1992 1 2016-04-26 Trevor Saunders d1994 1 a1994 3 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *. * mmo.c (mmo_get_section_contents): Likewise. (mmo_set_section_contents): Likewise. d1996 42 a2037 1 2016-04-26 H.J. Lu d2039 2 a2040 6 * elf-bfd.h (elf_link_hash_table): Update comments for dynsymcount. * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for the unused NULL entry at the head of dynamic symbol table. (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0 checks. d2042 31 a2072 1 2016-04-21 H.J. Lu d2074 2 a2075 2 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker created file from dynobj. d2077 141 a2217 1 2016-04-21 H.J. Lu d2219 2 a2220 2 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a normal input file if possible. d2222 1 a2222 1 2016-04-21 Nick Clifton d2224 2 a2225 34 * aout-adobe.c: Use _bfd_generic_link_check_relocs. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * binary.c: Likewise. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-rs6000.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd-in.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mmo.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * som.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * xsym.c: Likewise. * elfxx-target.h: Use _bfd_elf_link_check_relocs. * linker.c (bfd_link_check_relocs): New function. (_bfd_generic_link_check_relocs): New function. * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of _bfd_link_check_relocs field. (struct bfd_target)L Add _bfd_link_check_relocs field. d2227 6 a2232 1 * libbfd.h: Regenerate. d2234 1 a2234 1 2016-04-20 H.J. Lu d2236 5 a2240 4 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed. (elf_backend_gc_sweep_hook): Likewise. * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise. (elf_backend_gc_sweep_hook): Likewise. d2242 1 a2242 1 2016-04-20 H.J. Lu d2244 3 a2246 2 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations in excluded sections d2248 1 a2248 1 2016-04-20 H.J. Lu d2250 3 a2252 8 PR ld/19969 * elf64-x86-64.c (check_relocs_failed): New. (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. Support relocation agaist local symbol. Set check_relocs_failed. (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check R_X86_64_32 relocation overflow. (elf_x86_64_relocate_section): Skip if check_relocs failed. Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. d2254 1 a2254 1 2016-04-20 H.J. Lu d2256 3 a2258 3 * elf32-i386.c (elf_i386_check_relocs): Call _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d2260 1 a2260 1 2016-04-20 H.J. Lu d2262 6 a2267 4 * elf-bfd.h (_bfd_elf_link_check_relocs): New. * elflink.c (_bfd_elf_link_check_relocs): New function. (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs if check_relocs_after_open_input is FALSE. d2269 1 a2269 1 2016-04-20 Trevor Saunders d2271 5 a2275 4 * cache.c: Update old style function definitions. * elf32-m68k.c: Likewise. * elf64-mmix.c: Likewise. * stab-syms.c: Likewise. d2277 1 a2277 1 2016-04-20 Trevor Saunders d2279 4 a2282 1 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *. d2284 1 a2284 1 2016-04-15 H.J. Lu d2286 6 a2291 3 * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * doc/Makefile.in: Likewise. d2293 1 a2293 1 2016-04-14 Andrew Burgess d2295 1 a2295 1 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry. d2298 179 a2476 55 * elf32-arc.c: Add 'opcode/arc.h' include. (struct arc_relocation_data): Add symbol_name. (arc_special_overflow_checks): New function. (arc_do_relocation): Use arc_special_overflow_checks, reindent as required, add an extra comment. (elf_arc_relocate_section): Setup symbol_name in reloc_data. 2016-04-14 Andrew Burgess * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all entries. (elf_arc_relocate_section): Update enum uses. (elf_arc_check_relocs): Likewise. (elf_arc_finish_dynamic_symbol): Likewise. 2016-04-14 H.J. Lu * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with "sh_link". 2016-04-14 Nick Clifton PR target/19938 * elf-bbfd.h (struct elf_backend_data): New field: elf_strtab_flags. New field: elf_backend_set_special_section_info_and_link * elfxx-target.h (elf_backend_strtab_flags): Define if not already defined. (elf_backend_set_special_section_info_and_link): Define if not already defined. (elfNN_bed): Use elf_backend_set_special_section_info_and_link and elf_backend_strtab_flags macros to initialise fields in structure. * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS being set even if SHF_MERGE is not set. (elf_fake_sections): Likewise. (section_match): New function. Matches two ELF sections based upon fixed characteristics. (find_link): New function. Locates a section in a BFD that matches a section in a different BFD. (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link fields of reserved sections. (bfd_elf_compute_section_file_positions): Set the flags for the .shstrtab section based upon the elf_strtab_flags field in the elf_backend_data structure. (swap_out_syms): Likewise for the .strtab section. * elflink.c (bfd_elf_final_link): Set the flags for the .strtab section based upon the elf_strtab_flags field in the elf_backend_data structure. * elf32-i386.c (elf32_i386_set_special_info_link): New function. (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris targets. (elf_backend_set_special_section_info_and_link): Define for Solaris targets. * elf32-sparc.c: Likewise. * elf64-x86-64.c: Likewise. d2478 1 a2478 1 2016-04-11 H.J. Lu d2480 1 a2480 84 PR ld/19939 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer to bfd_boolean. * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc applies to read-only section. * elf32-i386.c (elf_i386_link_hash_table): Add readonly_dynrelocs_against_ifunc. (elf_i386_allocate_dynrelocs): Updated. (elf_i386_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations only if readonly_dynrelocs_against_ifunc is TRUE. * elf64-x86-64.c (elf_x86_64_link_hash_table): Add readonly_dynrelocs_against_ifunc. (elf_x86_64_allocate_dynrelocs): Updated. (elf_x86_64_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations only if readonly_dynrelocs_against_ifunc is TRUE. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): Updated. 2016-04-06 Thomas Preud'homme * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be a fall through from error_ret_free_internal. Free local_syms in error_ret_free_local if allocated from bfd_elf_get_elf_syms (). 2016-04-05 Cupertino Miranda * elf32-arc.c (plt_do_relocs_for_symbol): Changed. (relocate_plt_for_entry): Likewise. 2016-04-05 Cupertino Miranda * elf32-arc.c (elf_arc_check_relocs): Changed 2016-04-05 Cupertino Miranda * elf32-arc.c (name_for_global_symbol): Changed assert. (get_replace_function): Created.: (struct arc_relocation_data): Changed to signed types. (defines S, L, P, PDATA): Casted to signed type. (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise. (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed. (arc_do_relocation): Changed. 2016-04-05 Cupertino Miranda * elf32-arc.c (name_for_global_symbol): Added assert to check for symbol index. (elf_arc_relocate_section): Added and changed asserts, validating the synamic symbol index. (elf_arc_finish_dynamic_symbol): Do not fill the dynamic relocation if symbol has dynindx set to -1. 2016-04-05 Maciej W. Rozycki * elflink.c (elf_link_add_object_symbols): Always turn hidden and internal symbols which have a dynamic index into local ones. 2016-04-04 Nick Clifton PR 19872 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised version number if the version is zero. 2016-04-01 Alan Modra PR 19886 * elflink.c (on_needed_list): Recursively check needed status. (elf_link_add_object_symbols): Adjust. 2016-03-30 Senthil Kumar Selvaraj * elf32-avr.c (avr_elf32_load_records_from_section): Free internal_relocs only if they aren't cached. 2016-03-29 Nick Clifton PR 17334 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax assertion on the size of the got section to allow it to be bigger than the number of relocs. d2482 1 a2482 1 2016-03-29 Toni Spets d2484 2 a2485 3 PR 19878 * coffcode.h (coff_write_object_contents): Revert accidental 2014-11-10 change. d2487 1 a2487 1 2016-03-22 Alan Modra d2489 4 a2492 3 PR 19850 * dwarf2.c (read_attribute_value): Skip info_ptr check for DW_FORM_flag_present. d2494 1 a2494 1 2016-03-22 Nick Clifton d2496 3 a2498 2 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an architecture name for backwards compatibility. d2500 1 a2500 2 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible unbounded stack use. d2502 4 a2505 3 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a sufficiently recent version of GCC. * configure: Regenerate. d2507 1 a2507 1 2016-03-22 Alan Modra d2509 5 a2513 2 PR 19851 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning. d2515 1 a2515 1 2016-03-21 Andrew Burgess d2517 2 a2518 6 * archures.c (bfd_mach_arc_nps400): Define. * bfd-in2.h: Regenerate. * cpu-arc.c (arch_info_struct): New entry for nps400, renumber some existing entries to make space. * elf32-arc.c (arc_elf_object_p): Add nps400 case. (arc_elf_final_write_processing): Likewise. d2520 1 a2520 1 2016-03-21 Andrew Burgess d2522 2 a2523 4 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of EF_ARC_CPU_GENERIC. (arc_elf_final_write_processing): Don't bother setting cpu field in e_flags, this will have been set elsewhere. d2525 1 a2525 1 2016-03-21 Andrew Burgess d2527 3 a2529 2 * elf32-arc.c (arc_elf_final_write_processing): Switch to using EF_ARC_MACH_MSK. d2531 1 a2531 1 2016-03-21 Nick Clifton d2533 3 a2535 11 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144 * configure: Regenerate. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of alloca with call to xmalloc. * elf32-nds32.c: Likewise. * elf64-hppa.c: Likewise. * elfxx-mips.c: Likewise. * pef.c: Likewise. * pei-x86_64.c: Likewise. * som.c: Likewise. * xsym.c: Likewise. d2537 1 a2537 1 2016-03-15 H.J. Lu d2539 3 a2541 6 PR ld/19827 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol locally in PIE. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. d2543 1 a2543 1 2016-03-15 H.J. Lu d2545 26 a2570 4 PR ld/19807 * elf64-x86-64.c (elf_x86_64_relocate_section): Check no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S relocation overflow check. d2572 1 a2572 1 2016-03-14 H.J. Lu d2574 11 d2587 1 a2587 1 2016-03-11 Dan Gissel d2589 59 a2647 14 PR 19713 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset uses bytes not octets. * elflink.c (resolve_section): Likewise. Add a bfd parameter. (eval_section): Pass the input_bfd to resolve_section. (bfd_elf_perform_complex_relocation): Convert byte offset to octets before read and writing values. (elf_link_input_bfd): Add byte to octet conversions. (elf_reloc_link_order): Likewise. (elf_fixup_link_order): Likewise. (bfd_elf_final_link): Likewise. * reloc.c (_bfd_final_link_relocate): Likewise. * syms.c (_bfd_stab_section_find_nearest_line): Likewise. d2649 1 a2649 1 2016-03-10 Nick Clifton d2651 1 a2651 1 * config.bfd: Mark the i370 target as obsolete. d2653 1 a2653 1 2016-03-09 Pedro Alves d2655 30 a2684 4 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old gcc ABI)" to printable name. * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead of "v850-rh850" as printable name. d2686 1 a2686 1 2016-03-09 Leon Winter d2688 3 a2690 3 PR ld/19623 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply relocations against absolute symbols. d2692 1 a2692 1 2016-03-09 Alan Modra d2694 8 a2701 3 PR binutils/19775 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero length elements in the archive. d2703 1 a2703 1 2016-03-08 H.J. Lu d2705 6 a2710 3 PR ld/19789 * elflink.c (elf_link_add_object_symbols): Create dynamic sections for -E/--dynamic-list only when not relocatable. d2712 1 a2712 1 2016-03-08 H.J. Lu d2714 47 a2760 4 PR ld/19784 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count for locally defined local IFUNC symbols in shared object. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d2762 1 a2762 1 2016-03-08 H.J. Lu d2764 3 a2766 3 PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking together. d2768 1 a2768 2 2016-03-08 Cupertino Miranda Andrew Burgess d2770 113 a2882 11 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32. (arc_bfd_put_32): Becomes an alias for bfd_put_32. (arc_elf_howto_init): Added assert to validate relocations. (get_middle_endian_relocation): Delete. (middle_endian_convert): New function. (ME): Redefine, now does nothing. (IS_ME): New define. (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO' definition to call middle_endian_convert. Add a new local variable and make use of this throughout. Added call to arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations. d2884 1 a2884 1 2016-03-07 Nick Clifton d2886 2 a2887 3 PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. d2889 1 a2889 1 2016-03-07 Jiong Wang d2891 17 a2907 2 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced. d2909 1 a2909 1 2016-03-04 H.J. Lu d2911 2 a2912 4 PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. d2914 1 a2914 1 2016-03-02 Alan Modra d2916 5 a2920 2 * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. d2922 1 a2922 1 2016-02-29 Cupertino Miranda d2924 2 a2925 2 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the relocation addend when sections get merged. d2927 1 a2927 1 2016-02-29 Cupertino Miranda d2929 2 a2930 4 * elf32-arc.c (arc_elf_final_write_processing): Add condition to the flag change. (elf_arc_relocate_section): Fixes and conditions to support PIE. Assert for code sections dynamic relocs. d2932 1 a2932 1 2016-02-26 Renlin Li d2934 1 a2934 2 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2. d2936 1 a2936 1 2016-02-26 H.J. Lu d2938 1 a2938 12 PR ld/19609 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for load with locally bound symbols if PIC is false or there is no base register. Optimize branch to 0 if PIC is false. (elf_i386_relocate_section): Don't generate dynamic relocations against undefined weak symbols if PIC is false. * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization if we can't estimate relocation overflow with --no-relax. Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound symbols if PIC is false. Optimize branch to 0 if PIC is false. (elf_x86_64_relocate_section): Don't generate dynamic relocations against undefined weak symbols if PIC is false. d2940 3 a2942 1 2016-02-26 H.J. Lu d2944 2 a2945 24 PR ld/19645 * bfd.c (bfd): Change flags to 20 bits. (BFD_CONVERT_ELF_COMMON): New. (BFD_USE_ELF_STT_COMMON): Likewise. (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise. * configure.ac: Remove --enable-elf-stt-common. * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for common symbol depending on BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for STT_COMMON. * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check STT_COMMON. (elf_link_convert_common_type): New function. (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for common symbol depending on BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx. * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON to object_flags. (TARGET_LITTLE_SYM): Likewise. * syms.c (BSF_KEEP_G): Renamed to ... (BSF_ELF_COMMON): This. d2947 89 d3038 1 d3040 1 a3040 1 2016-02-26 H.J. Lu d3042 5 a3046 58 PR ld/19636 PR ld/19704 PR ld/19719 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. (elf_i386_link_hash_entry): Add has_got_reloc and has_non_got_reloc. (elf_i386_link_hash_table): Add interp. (elf_i386_link_hash_newfunc): Initialize has_got_reloc and has_non_got_reloc. (elf_i386_copy_indirect_symbol): Copy has_got_reloc and has_non_got_reloc. (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc. (elf_i386_fixup_symbol): New function. (elf_i386_pie_finish_undefweak_symbol): Likewise. (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic relocations and discard relocations against resolved undefined weak symbols in executable. Don't make resolved undefined weak symbols in executable dynamic. Keep dynamic non-GOT/non-PLT relocation against undefined weak symbols in PIE. (elf_i386_size_dynamic_sections): Set interp to .interp section. (elf_i386_relocate_section): Don't generate dynamic relocations against resolved undefined weak symbols in PIE, except for R_386_PC32. (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols. Don't generate dynamic relocation against resolved undefined weak symbol in executable. (elf_i386_finish_dynamic_sections): Call elf_i386_pie_finish_undefweak_symbol on all symbols in PIE. (elf_backend_fixup_symbol): New. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. (elf_x86_64_link_hash_entry): Add has_got_reloc and has_non_got_reloc. (elf_x86_64_link_hash_table): Add interp. (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and has_non_got_reloc. (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and has_non_got_reloc. (elf_x86_64_check_relocs): Set has_got_reloc and has_non_got_reloc. (elf_x86_64_fixup_symbol): New function. (elf_x86_64_pie_finish_undefweak_symbol): Likewise. (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic relocations and discard relocations against resolved undefined weak symbols in executable. Don't make resolved undefined weak symbols in executable dynamic. (elf_x86_64_size_dynamic_sections): Set interp to .interp section. (elf_x86_64_relocate_section): Check relocation overflow for dynamic relocations against unresolved weak undefined symbols. Don't generate dynamic relocations against resolved weak undefined symbols in PIE. (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols. Don't generate dynamic relocation against resolved undefined weak symbol in executable. (elf_x86_64_finish_dynamic_sections): Call elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE. (elf_backend_fixup_symbol): New. d3048 1 a3048 1 2016-02-26 Alan Modra d3050 2 a3051 6 * elf64-ppc.c (create_linkage_sections): Create sfpr when save_restore_funcs, rest of sections when not relocatable. (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. (sfpr_define): Define all symbols on emitted code. (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created when relocatable. Move sfpr_define loop earlier. d3053 1 a3053 1 2016-02-24 H.J. Lu d3055 3 a3057 3 * elf64-x86-64.c (elf_x86_64_need_pic): New function. (elf_x86_64_relocate_section): Use it. Replace x86_64_elf_howto_table[r_type] with howto. d3059 1 a3059 1 2016-02-24 H.J. Lu d3061 5 a3065 3 PR ld/19698 * elflink.c (bfd_elf_record_link_assignment): Set versioned if symbol version is unknown. d3067 1 a3067 1 2016-02-24 H.J. Lu d3069 2 a3070 3 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. d3072 1 a3072 1 2016-02-23 H.J. Lu d3074 2 a3075 3 * elflink.c (bfd_elf_record_link_assignment): Check for shared library, instead of PIC, and don't check PDE when making linker assigned symbol dynamic. d3077 1 a3077 1 2016-02-23 Faraz Shahbazker d3079 6 a3084 2 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment ABIVERSION for non-executable stack. d3086 1 a3086 1 2016-02-23 Rich Felker d3088 3 a3090 3 PR target/19516 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Always produce a RELATIVE reloc for a local symbol. d3092 1 a3092 1 2016-02-23 Hans-Peter Nilsson d3094 3 a3096 3 Fix test-case ld-elf/pr19617b * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't discard unused non-function symbols when --dynamic-list-data. d3098 1 a3098 1 2016-02-22 H.J. Lu d3100 2 a3101 2 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the dynsym section, even if it is empty, with dynamic sections. d3103 1 a3103 1 2016-02-22 H.J. Lu d3105 10 a3114 2 * syms.c: Remove BSF_COMMON from comments. * bfd-in2.h: Regenerated. d3116 1 a3116 1 2016-02-22 Jiong Wang d3118 2 a3119 3 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation for destination. Remove useless function parameters. (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub. d3121 1 a3121 1 2016-02-19 Nick Clifton d3123 6 a3128 3 PR ld/19629 * aoutx.h (aout_link_add_symbols): Check for out of range string table offsets. d3130 1 a3130 3 PR ld/19628 * reloc.c (bfd_generic_get_relocated_section_contents): Stop processing if we encounter a reloc without an associated symbol. d3132 2 a3133 1 2016-02-18 H.J. Lu d3135 1 a3135 3 PR ld/19617 * elflink.c (elf_link_add_object_symbols): Always create dynamic sections for -E/--dynamic-list. d3137 3 a3139 1 2016-02-17 H.J. Lu d3141 1 a3141 2 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined to bfd_true. d3143 3 a3145 1 2016-02-16 Joseph Myers d3147 1 a3147 4 * plugin.c (plugin_vec): Set match priority to 255. * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When matching against the plugin vector, take priority from there not from TEMP. d3149 3 a3151 1 2016-02-15 Nick Clifton d3153 1 a3153 3 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values for length and type fields. Use a signed value for the suffix_length field. d3155 7 a3161 1 2016-02-10 H.J. Lu d3163 1 a3163 3 PR ld/19601 * elf32-i386.c (elf_i386_relocate_section): Mask off the least significant bit in GOT offset for R_386_GOT32X. d3165 3 a3167 1 2016-02-10 Nick Clifton d3169 1 a3169 6 PR 19405 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed immediate values. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the number of messages about FDE encoding preventing .eh_frame_hdr generation. d3171 3 a3173 1 2016-02-09 Nick Clifton d3175 1 a3175 3 * oasys.c (oasys_archive_p): Fix indentation. * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned constant for left shifting. d3177 1 a3177 3 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more helpful warning message to explain why certain AArch64 relocs might overflow. d3179 1 a3179 1 2016-02-05 Simon Marchi d3181 3 a3183 1 * pe-mips.c (coff_mips_reloc): Fix formatting. d3185 1 a3185 1 2016-02-05 Cupertino Miranda d3187 3 a3189 2 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2 to bfd_mach_arc_arc600. d3191 1 a3191 1 2016-02-04 Alan Modra d3193 1 a3193 2 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch for big-endian. d3195 1 a3195 1 2016-02-02 H.J. Lu d3197 6 a3202 3 PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distances in the compressed_size field of the output section. d3204 1 a3204 1 2016-02-02 Alan Modra d3206 3 a3208 2 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict ELFv2 entry optimization. d3210 1 a3210 1 2016-02-02 H.J. Lu d3212 2 a3213 3 PR binutils/19547 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are no relocations in relocatable files. d3215 1 a3215 1 2016-02-01 H.J. Lu d3217 3 a3219 4 PR ld/19553 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED doesn't match the symbol referenced by regular object. d3221 2 a3222 1 2016-02-01 Nathaniel Smith d3224 25 a3248 2 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both CODE and DATA. d3250 1 a3250 1 2016-02-01 Alan Modra d3252 2 a3253 3 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on an out of range reloc_index. * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise. d3255 1 a3255 1 2016-02-01 Kamil Rytarowski d3257 46 a3302 3 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo. (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c. * Makefile.in: Regenerated. d3304 1 a3304 1 2016-02-01 Jan Kratochvil d3306 3 a3308 1 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation. d3310 1 a3310 1 2016-01-31 John David Anglin d3312 3 a3314 4 PR ld/19526 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output files. * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. d3316 1 a3316 1 2016-01-30 H.J. Lu d3318 6 a3323 4 PR ld/19539 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation against STT_GNU_IFUNC symbol only with dynamic symbols. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. d3325 1 a3325 1 2016-01-28 H.J. Lu d3327 4 a3330 3 PR binutils/19523 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to decompress debug sections. d3332 1 a3332 1 2016-01-25 Maciej W. Rozycki d3334 2 a3335 2 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to `dynindx'. d3337 1 a3337 1 2016-01-25 Nick Clifton d3339 2 a3340 3 PR target/19435 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free dsym filename buffer. d3342 1 a3342 1 2016-01-24 Maciej W. Rozycki d3344 8 a3351 1 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation. d3353 1 a3353 1 2016-01-24 Maciej W. Rozycki d3355 4 a3358 1 * elfxx-mips.c (BZ16_REG): Correct calculation. d3360 1 a3360 1 2016-01-21 Nick Clifton d3362 2 a3363 3 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by changing the type of _loc to be bfd_byte *. (elf_arc_finish_dynamic_symbol): Likewise. d3365 1 a3365 1 2016-01-21 Nick Clifton d3367 160 a3526 7 PR ld/19455 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF class of the linker stub bfd. (elf32_arm_check_relocs): Skip check for pic format after processing a vxWorks R_ARM_ABS12 reloc. * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when reporting a class mismatch. d3528 1 a3528 1 2016-01-21 Jiong Wang d3530 7 a3536 5 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch veneer for sym_sec != input_sec. (elfNN_aarch64_size_stub): Support STT_SECTION symbol. (elfNN_aarch64_final_link_relocate): Take rela addend into account when calculation destination. d3538 1 a3538 1 2016-01-21 Alan Modra d3540 2 a3541 18 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function. (swap_linux_prpsinfo64_out): New function. (LINUX_PRPSINFO32_SWAP_FIELDS): Delete. (LINUX_PRPSINFO64_SWAP_FIELDS): Delete. * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset. (elfcore_write_linux_prpsinfo64): Likewise. * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function. (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete. (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset. 2016-01-21 Alan Modra * elf-linux-core.h: Rename from elf-linux-psinfo.h. * elf.c: Adjust #include. * elf32-ppc.c: Don't #include elf-linux-psinfo.h * Makefile.am (SOURCE_HFILES): Update. * Makefile.in: Regenerate. * po/SRC-PORFILES.in: Regenerate. d3543 1 a3543 1 2016-01-21 Alan Modra d3545 2 a3546 2 * configure.ac: Move corefile selection later in file. Move tdefaults code immediately after other target vector code. d3548 4 d3553 2 a3554 1 2016-01-20 Mickael Guene d3556 84 a3639 2 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread section using '.text.noread' pattern. d3641 1 a3641 1 2016-01-19 John Baldwin d3643 45 a3687 1 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes. d3689 1 a3689 49 2016-01-18 Miranda Cupertino Zissulescu Claudiu * arc-plt.def: New file. * arc-plt.h: Likewise. * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry, elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry, elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry, elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove. (name_for_global_symbol): Added. (ADD_RELA): Helper to create dynamic relocs. (new_got_entry_to_list): Create a new got entry in linked list. (symbol_has_entry_of_type): Search for specific type of entry in list. (is_reloc_for_GOT): return FALSE for any TLS related relocs. (is_reloc_for_TLS, arc_elf_set_private_flags) (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data) (arc_elf_merge_private_bfd_data): New functions. (debug_arc_reloc): Cleaned debug info printing. (PDATA reloc): Changed not to perform address alignment. (reverse_me): Added. Fix for ARC_32 relocs. (arc_do_relocation): Return bfd_reloc_of when no relocation should occur. (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets. Changed function to access an array of list of GOT entries instead of just an array of offsets. (elf_arc_relocate_section): Added support for PIC and TLS related relocations. (elf_arc_check_relocs): Likewise. (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol, (elf_arc_finish_dynamic_sections): Likewise (arc_create_dynamic_sections): Modified conditions to create dynamic sections. (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro. (plt_do_relocs_for_symbol, relocate_plt_for_symbol) (relocate_plt_for_entry): Changed to support new way to define PLT related code. (add_symbol_to_plt): Likewise. (arc_elf_link_hash_table_create): New function. 2016-01-18 Nick Clifton PR ld/19440 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external section number into internal section number. * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise. * coffswap.h (coff_swap_sym_in): Likewise. * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise. * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal section number field is big enough to hold the external value. d3691 4 a3694 1 2016-01-17 Alan Modra d3696 175 d3872 284 d4157 1 a4157 1 2016-01-12 Yury Usishchev d4159 3 a4161 3 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind when address in first unwind entry does not match start of section. d4163 1 a4163 2 2016-01-08 Richard Sandiford Jiong Wang d4165 4 a4168 3 PR ld/19368 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to reloc_class_ifunc. d4170 1 a4170 1 2016-01-06 Andrew Burgess d4172 4 a4175 4 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to place 'R_' before the reloc name returned. (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before the relocation string. d4177 1 a4177 1 2016-01-04 Maciej W. Rozycki d4179 1 a4179 3 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function, factored out from... (_bfd_mips_elf_merge_private_bfd_data): ... here. d4181 1 a4181 1 2016-01-04 Maciej W. Rozycki d4183 3 a4185 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move attribute check after ELF file header flag check. d4187 1 a4187 1 2016-01-04 Maciej W. Rozycki d4189 7 a4195 2 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the return status from `_bfd_elf_merge_object_attributes'. d4197 1 a4197 1 2016-01-04 Maciej W. Rozycki d4199 3 a4201 3 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function, factored out from... (_bfd_mips_elf_merge_private_bfd_data): ... here. d4203 1 a4203 1 2016-01-04 Maciej W. Rozycki d4205 3 a4207 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the handling of input MIPS ABI flags together. d4209 5 a4213 1 2016-01-04 Maciej W. Rozycki d4215 6 a4220 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress attribute checks for null input. d4222 1 a4222 1 2016-01-04 Maciej W. Rozycki d4224 4 a4227 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local pointers to target data. d4229 1 a4229 1 2016-01-04 Maciej W. Rozycki d4231 9 a4239 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct an FP ABI warning. d4241 1 a4241 1 2016-01-01 Alan Modra d4245 1 a4245 1 For older changes see ChangeLog-2015 and doc/ChangeLog-0415 d4247 1 a4247 1 Copyright (C) 2016 Free Software Foundation, Inc. @ 1.6 log @Apply change from upstream to fix PR/48709 - port-alpha/48709: static threaded programs crash. With this fix the new weak symbol's st_other is not merged in, i.e. NOPV is not copied from the libc __libc_thr_init. * elflink.c (_bfd_elf_merge_symbol): If merging a new weak symbol that will be skipped, we don't have a new definition. @ text @d1 1 a1 1 2013-12-14 Alan Modra d3 13 a15 2 * elflink.c (_bfd_elf_merge_symbol): If merging a new weak symbol that will be skipped, we don't have a new definition. d17 2 a18 1 2013-03-25 Tristan Gingold d20 3 a22 3 * configure.in: Bump version to 2.23.2 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d24 1 a24 1 2013-03-04 Alan Modra d26 4 a29 3 * elf32-ppc.c (ppc_elf_relocate_section ): Adjust non-zero addends when relocatable, rather than addends >= 32768. Always zero "addend" before applying relocation. d31 1 a31 1 2013-02-18 Alan Modra d33 2 a34 8 PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): Declare. (_bfd_elf_strtab_resize): Declare. * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): New function. (_bfd_elf_strtab_resize): Likewise. * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize. d36 35 a70 1 2013-02-11 Richard Sandiford d72 38 a109 2 * elfxx-mips.c (mips_elf_recreate_got): Remove free. (mips_elf_resolve_final_got_entries): Remove bogus comment. d111 1 a111 1 2013-02-10 Alan Modra d113 2 a114 2 PR ld/15113 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc. d116 1 a116 1 2013-02-08 Alan Modra d118 2 a119 4 PR binutils/15106 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache. * elf.c (elf_find_function): Revert last change. Use new tdata field rather than static vars for cache. d121 2 a122 1 2013-02-07 Roberto Agostino Vitillo d124 14 a137 2 PR binutils/15106 * elf.c (elf_find_function): Don't cache if symbols change. d139 1 a139 1 2013-02-07 Alan Modra d141 3 a143 3 PR binutils/14873 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to copy attributes from or to non-ELF. d145 1 a145 1 2013-02-01 Alan Modra d147 3 a149 2 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol clears def_regular. d151 1 a151 2 2013-01-31 Alan Modra David S. Miller d153 5 a157 6 PR ld/15056 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit references to __tls_get_addr. * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct vtinherit and vtentry reloc handling too. * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro. d159 1 a159 1 2013-01-31 Alan Modra d161 5 a165 1 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink. d167 1 a167 7 2013-01-28 Alan Modra * elf64-ppc.c: Use %T to print symbols names and remove redundant "relocation" in error messages throughout file. (ppc64_elf_relocate_section): Remove sibling call error message, replace with "call lacks nop". Specially report errors for branches to function entry points via OPD lookup and branches to stubs. Remove NULL symbol handling now done by %T. d169 6 a174 1 2013-01-22 Alan Modra d176 1 a176 4 Apply mainline patches 2013-01-15 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to plt-thread-safe. d178 1 a178 8 2013-01-14 Alan Modra PR binutils/14813 * bfdio.c (struct bfd_iovec ): Revert 2012-11-06. (memory_bclose): Likewise. Return 0 on success. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose, bfd_close): Likewise. * vms-lib.c (vms_lib_bclose): Likewise. * libbfd.h: Regenerate. d180 1 a180 64 2013-01-13 Alan Modra * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak. Add ref_dynamic_nonweak. * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete. (_bfd_elf_merge_symbol): Don't call above function. Move setting of ref_dynamic_nonweak and dynamic_def earlier. Don't clear dynamic_def. (elf_link_add_object_symbols): Delete redundant "override" test. Don't set dynamic_def here. (elf_link_output_extsym): Update. 2013-01-12 Alan Modra * elf-bfd.h (_bfd_elf_strtab_refcount): Declare. * elf-strtab.c (_bfd_elf_strtab_refcount): New function. * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount. 2013-01-12 Alan Modra PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare. (_bfd_elf_strtab_clear_all_refs): Define. * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function. (_bfd_elf_strtab_clear_all_refs): Delete. * elflink.c (elf_link_add_object_symbols): Clear out added strtab refs. Correct handling of warning common symbols. 2012-12-19 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Replace bfd_elf32_swap_reloc_out with elf_append_rel. (elf_i386_finish_dynamic_symbol): Likewise. * elflink.c (elf_append_rel): Call swap_reloc_out instead of swap_reloca_out. 2012-12-18 Alan Modra * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of the special MAP_* values. 2012-12-07 Alan Modra PR ld/14926 * elf.c (_bfd_elf_map_sections_to_segments): Include elf header size when determining phdr_in_segment. 2012-12-05 Alan Modra * elf64-ppc.c (build_plt_stub): Fix off by one error in branch to glink. 2012-11-21 H.J. Lu PR binutils/14493 * elf.c (copy_elf_program_header): When rewriting program header, set the output maxpagesize to the maximum alignment of input PT_LOAD segments. 2012-11-13 Joe Seymour * elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc. 2012-11-06 H.J. Lu PR binutils/14813 * bfdio.c (bfd_iovec): Change return type of bclose to bfd_boolean. (memory_bclose): Change return type to bfd_boolean. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose): Likewise. Return TRUE on success. * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE. * libbfd.h: Regenerated. d182 2 a183 41 2012-11-06 Alan Modra PR binutils/14567 * opncls.c (opncls_iovec): Forward declare. (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream to new bfd. 2012-11-06 Alan Modra * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP. 2012-11-05 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside loop. Really mark toc entry referring to another toc entry only if the first is used. 2012-10-29 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HA16A reloc howtos. 2012-10-26 Alan Modra PR gas/14758 * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS bfd_reloc values. Map to corresponding D-form relocs. (is_insn_ds_form, is_insn_qs_form): New functions. (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form fields using D-form reloc. 2012-10-21 Hans-Peter Nilsson * linker.c (_bfd_generic_link_output_symbols): Handle a no-longer-global symbol entered as a BFD_PLUGIN. 2012-10-08 Alan Modra PR binutils/14662 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as SEC_DEBUGGING. 2012-09-04 H.J. Lu PR binutils/14493 * elf.c (ignore_section_sym): Also ignore section symbols without a BFD section. d185 1 a185 1 2012-12-21 H.J. Lu d187 7 a193 3 * elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_standard instead of R_X86_64_max for unrecognized relocation. d195 1 a195 1 2012-12-21 H.J. Lu d197 1 a197 4 PR ld/14980 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly adjust h->plt.refcount. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. d199 1 a199 1 2012-12-20 H.J. Lu d201 2 a202 4 PR ld/14968 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check local IFUNC references. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. d204 1 a204 1 2012-12-20 H.J. Lu d206 7 a212 4 PR ld/14956 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local IFUNC calls. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. d214 1 a214 2 2012-12-17 Roland McGrath Alan Modra d216 6 a221 2 * elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are not ARM ELF. d223 1 a223 1 2012-12-09 H.J. Lu d225 8 a232 3 PR binutils/14933 * archive.c (bsd_write_armap): Properly check indicies bigger than 4Gb. d234 2 a235 1 2012-11-29 Roland McGrath d237 64 a300 1 * elf-nacl.c (segment_eligible_for_headers): Disallow writable segments. d302 1 a302 1 2012-11-26 Roland McGrath d304 27 a330 1 * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null. d332 1 a332 1 2012-11-21 Roland McGrath d334 8 a341 5 * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ... (segment_eligible_for_headers): ... this. Take new arguments MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's start address doesn't leave space for the headers. (nacl_modify_segment_map): Update caller. d343 1 a343 1 2012-11-19 Joey Ye d345 67 a411 6 * elf32-arm.c (elf32_arm_final_link_relocate, case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of the place being relocated. (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address of the place being relocated and truncate addend. (Pa): New macro. d413 1 a413 1 2012-11-14 Roland McGrath d415 19 a433 2 * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc instruction for data sandboxing. d435 8 a442 1 2012-11-13 Tristan Gingold d444 5 a448 2 * Makefile.am (RELEASE): Unset. * Makefile.in: Regenerate. d450 1 a450 1 2012-11-13 Tristan Gingold d452 6 a457 3 * configure.in: Bump version to 2.23.1 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d459 1 a459 1 2012-11-05 Andreas Krebbel d461 4 a464 4 PR target/14788 * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for local ifunc symbols. * elf64-s390.c (elf_s390_relocate_section): Likewise. d466 1 a466 1 2012-11-05 Alan Modra d468 3 a470 1 * configure.in: Apply 2012-09-10 change to config.in here. d472 1 a472 1 2012-10-29 Sean Keys d474 4 a477 2 * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for R_XGATE_16 d479 1 a479 1 2012-10-22 Tristan Gingold d481 2 a482 3 * configure.in: Bump version to 2.23.0 * Makefile.am (RELEASE): Unset. * configure, Makefile.in: Regenerate. d484 1 a484 1 2012-10-22 Tristan Gingold d486 1 a486 3 * configure.in: Bump version to 2.23 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d488 1 a488 1 2012-10-16 Sofiane Naci d490 2 a491 8 * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2, R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, R_AARCH64_TLSLE_ADD_TPREL_HI12. (elf64_aarch64_tlsdesc_howto_table): Fix shift value for R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1. (elf64_aarch64_final_link_relocate): Add signed_addend when resolving AARCH64_TLSLE_*_TPREL_* relocations. d493 1 a493 1 2012-09-20 Walter Lee d495 3 a497 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got relocations with value of hgot. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d499 1 a499 1 2012-09-18 H.J. Lu d501 3 a503 3 PR ld/14591 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. d505 1 a505 2 * elf32-sh-symbian.c (sh_symbian_relocate_section): Update _bfd_elf_merge_symbol call. d507 1 a507 7 * elflink.c (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol call. (elf_link_add_object_symbols): Don't update symbol type from a weak definition. Update symbol type from a common symbol when overriding a weak symbol. d509 1 a509 1 2012-09-17 Walter Lee d511 3 a513 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused got_base variable. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d515 1 a515 1 2012-09-17 Walter Lee d517 4 a520 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation of got relocations for when .got.plt section is merged with .got. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d522 1 a522 1 2012-09-13 Doug Kwan d524 3 a526 2 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted relocation for stub lookup. d528 1 a528 1 2012-09-10 Matthias Klose d530 4 a533 1 * config.in: Disable sanity check for kfreebsd. d535 1 a535 1 2012-09-07 Alan Modra d537 3 a539 3 PR ld/14464 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined by a linker script in .opd to corresponding input .opd section. d541 1 a541 1 2012-08-09 Maciej W. Rozycki d543 4 a546 12 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2): Remove macros, folding them into... (LA25_LUI_MICROMIPS): ... this new macro. (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into... (LA25_J_MICROMIPS): ... this new macro. (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise into... (LA25_ADDIU_MICROMIPS): ... this new macro. (bfd_put_micromips_32, bfd_get_micromips_32): New functions. (mips_elf_create_la25_stub): Use them. (check_br32_dslot, check_br32, check_relocated_bzc): Likewise. (_bfd_mips_elf_relax_section): Likewise. d548 1 a548 3 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is not minus one. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. d550 2 a551 1 2012-08-28 Maciej W. Rozycki d553 1 a553 3 * elflink.c (_bfd_elf_merge_symbol): Also override the version a dynamic symbol defaulted to if preempted with a hidden or internal definition. d555 9 a563 3 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up the options section in the output rather than input BFD to decide if to add a DT_MIPS_OPTIONS tag. d565 1 a565 1 2012-08-13 Maciej W. Rozycki d567 3 a569 2 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into #ifdef BFD64. d571 1 a571 1 2012-08-13 Maciej W. Rozycki d573 3 a575 2 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling of protected symbols. d577 1 a577 1 2012-08-06 Maciej W. Rozycki d579 2 a580 2 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym symbols special case. d582 1 a582 3 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask field initializers throughout. * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise. d584 12 a595 1 2012-08-03 Maciej W. Rozycki d597 1 a597 2 * elfxx-mips.c (mips_elf_perform_relocation): Update the cross-mode jump message. d599 2 a600 1 2012-09-04 Sergey A. Guriev d602 1 a602 5 * cpu-ia64-opc.c (ins_cnt6a): New function. (ext_cnt6a): Ditto. (ins_strd5b): Ditto. (ext_strd5b): Ditto. (elf64_ia64_operands): Add new operand types. d604 4 a607 1 2012-08-05 Maciej W. Rozycki d609 1 a609 2 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate PLT slots for local symbols. d611 2 a612 1 2012-08-28 Matthew Gretton-Dann d614 1 a614 6 Apply from mainline 2012-08-24 Matthew Gretton-Dann * elf32-arm.c (v8): New array. (tag_cpu_arch_combine): Add support for ARMv8 attributes. (elf32_arm_merge_eabi_attributes): Likewise. (VFP_VERSION_COUNT): New define. d616 33 a648 1 2012-08-17 Nick Clifton d650 1 a650 1 * po/vi.po: Updated Vietnamese translation. d652 18 a669 10 2012-08-16 Ian Bolton Laurent Desnogues Jim MacArthur Marcus Shawcroft Nigel Stephens Ramana Radhakrishnan Richard Earnshaw Sofiane Naci Tejas Belagod Yufeng Zhang d671 14 a684 26 * Makefile.am: Add AArch64 files. * Makefile.in: Regenerate. * archures.c (bfd_aarch64_arch): New declaration. (bfd_archures_list): Use bfd_archures_list. * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration. (bfd_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_set_options): New declaration. (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration. (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition. (bfd_is_aarch64_special_symbol_name): New declaration. (bfd_aarch64_merge_machines): New declaration. (bfd_aarch64_update_notes): New declaration. (int bfd_aarch64_get_mach_from_notes): New declaration. (elf64_aarch64_setup_section_lists): New declaration. (elf64_aarch64_next_input_section): New declaration. (elf64_aarch64_size_stubs): New declaration. (elf64_aarch64_build_stubs): New declaration. * config.bfd: Add AArch64. * configure.in: Add AArch64. * configure: Regenerate. * cpu-aarch64.c: New file. * elf-bfd.h: Add AArch64. d686 16 d703 28 a730 4 * elf64-aarch64.c: New file. * reloc.c: Add AArch64 relocations. * targets.c: Add AArch64. * po/SRC-POTFILES.in: Regenerate. d732 1 a732 1 2012-08-14 Nick Clifton d734 2 a735 1 * po/uk.po: Updated Ukranian translation. d737 1 a737 1 2012-08-09 Nick Clifton d739 2 a740 1 * po/vi.po: Updated Vietnamese translation. d742 1 a742 1 2012-08-07 Nick Clifton d744 4 a747 1 * po/uk.po: Updated Ukranian translation. d749 1 a749 1 2012-07-30 Nick Clifton d751 3 a753 6 * po/bfd.pot: Updated template. * po/es.po: Updated Spanish translation. * po/fi.po: Updated Finnish translation. * po/fr.po: Updated French translation. * po/ru.po: Updated Russian translation. * po/uk.po: Updated Ukranian translation. d755 1 a755 1 2012-07-27 Tristan Gingold d757 3 a759 2 * configure.in: Bump version to 2.22.90 * configure: Regenerate. d761 1 a761 1 2012-07-26 Teresa Johnson d763 2 a764 2 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr if it is non-NULL. d766 2 a767 2 2012-07-26 Meador Inge Nick Clifton d769 2 a770 46 PR ld/14397 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error if a required section is missing from the linker script. 2012-07-24 Jan Waclawek PR 13899 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call _bfd_elf_link_read_relocs with keep_memory as TRUE. 2012-07-24 Teresa Johnson * bfd.c (bfd_find_nearest_line_discriminator): New macro. * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator. * coff64-rs6000.c: Likewise. * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line_discriminator): Likewise. (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper that invokes _bfd_elf_find_nearest_line_discriminator with correct arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper that invokes _bfd_elf_find_line_discriminator with correct arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator argument. (_bfd_dwarf2_find_line): Likewise. (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. a771 5 * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_nearest_line_discriminator with _bfd_generic_find_nearest_line_discriminator. (bfd_target): Add _bfd_find_nearest_line_discriminator. d773 168 a940 1 2012-07-24 Sean Keys d942 5 a946 3 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code that enables the linker to offset addresses, when linking against symbols from the XGATE processor and vice versa. d948 1 a948 1 2012-07-23 Nick Clifton d950 29 a978 2 * cisco-core.c (cisco_core_file_failing_command): Make static. (cisco_core_file_failing_signal): Make static. d980 1 a980 1 2012-07-18 H.J. Lu d982 2 a983 1 * bfd-in2.h: Regenerated. d985 1 a985 1 2012-07-18 Nicolàs Alejandro Di Risio d987 50 a1036 2 PR binutils/14335 * section.c: Fix a typo in comments. d1038 1 a1038 1 2012-07-13 Andreas Krebbel d1040 24 a1063 84 * elf64-s390.c: Include elf-s390-common.c. (R_390_IRELATIVE): New reloc. (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE. (RELA_ENTRY_SIZE): New macro. (elf_s390_link_hash_entry): New fields ifunc_resolver_address and *ifunc_resolver_section. (struct plt_entry): New struct. (struct elf_s390_obj_tdata): New field local_plt. (elf_s390_local_plt): New macro. (struct elf_s390_link_hash_table): New field irelifunc. (ELF64): New macro. (link_hash_newfunc): Initialize new fields. (elf_s390_check_relocs): Handle IFUNC symbols. (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC symbols. (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for IFUNC symbols. (elf_s390_size_dynamic_sections): Handle IFUNC symbols. (elf_s390_relocate_section): Likewise. (elf_s390_finish_dynamic_symbol): Likewise. (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols. (elf_s390_finish_ifunc_symbol): New function. (elf_s390_gc_sweep_hook): Handle local plt entries. (elf_backend_add_symbol_hook): Define. * elf32-s390.c: See elf64-s390.c changes. * elf-s390-common.c: New file. * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field. * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for BFD_RELOC_390_IRELATIVE. * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation. 2012-07-13 Nick Clifton * aix386-core.c: Remove use of PTR and PARAMS macros. * archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. d1065 114 a1178 51 * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise. 2012-07-09 Alan Modra PR ld/14323 * elflink.c (elf_sort_symbol): Sort by size too. (elf_link_add_object_symbols ): Simplify binary search. Do not depend on ordering of symbol aliases. Match largest size. d1180 1 a1180 1 2012-07-03 H.J. Lu d1182 5 a1186 3 * elf.c (assign_section_numbers): Check if number of sections >= SHN_LORESERVE. * elfcode.h (elf_object_p): Likewise. d1188 1 a1188 1 2012-07-03 Nick Clifton d1190 3 a1192 78 * archive.c (bsd_write_armap): Catch attempts to create an archive with indicies bigger than 4Gb. (coff_write_armap): Likewise. 2012-07-03 H.J. Lu PR binutils/14319 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty debug section. 2012-07-03 H.J. Lu PR ld/3351 * elflink.c (_bfd_elf_update_dynamic_flags): New. (_bfd_elf_merge_symbol): Update both real and indirect symbol dynamic flags. (_bfd_elf_add_default_symbol): Make the real symbol dynamic if the indirect symbol is defined in a shared library. (elf_link_add_object_symbols): Likewise. If the indirect symbol has been forced local, don't make the real symbol dynamic. (elf_link_check_versioned_symbol): Check indirect symbol. (elf_link_output_extsym): Use real symbol definition when reporting indirect symbol error. Check version info for dynamic versioned symbol. 2012-07-03 Alan Modra PR ld/14207 * elf.c (assign_file_positions_for_load_sections): Remove assertions that only PT_LOAD headers include file header and section headers. (assign_file_positions_for_non_load_sections): Similarly don't assert PT_GNU_RELRO header does not include file and section headers. Compare first section vma rather than PT_LOAD p_vaddr against relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace abort with assertion. 2012-07-02 Alan Modra * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section "anyway" variant when creating .plt. (m32c_elf_relax_plt_section): Remove redundant test and unused param. (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling m32c_elf_relax_plt_section. * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant when creating .got and .got.plt. (_bfd_mips_elf_final_link): Likewise for .rtproc, and use bfd_get_linker_section. * sunos.c: Similarly throughout. 2012-07-01 Andreas Schwab * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error message. 2012-06-29 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE on unresolvable relocation. 2012-06-29 H.J. Lu * archive.c (_bfd_compute_and_write_armap): Simplify global symbol handling. 2012-06-29 Nick Clifton PR ld/14189 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount for locally bound symbols. 2012-06-29 Alan Modra * section.c (bfd_get_linker_section): New function. * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use the above throughout rather than bfd_get_section_by_name. Use bfd_make_section_anyway rather than bfd_make_section when creating them. a1193 2 * elf32-cr16.c: Likewise. * elf32-cris.c: Likewise. a1194 6 * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. d1196 1 a1196 1 * elf32-microblaze.c: Likewise. a1197 1 * elf32-rl78.c: Likewise. a1198 2 * elf32-score.c: Likewise. * elf32-score7.c: Likewise. a1199 5 * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-vax.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. a1200 2 * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. a1202 7 * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. a1203 7 * elf-vxworks.c: Likewise. * elf-m10300.c: Likewise. Also make use of htab plt, got and gotplt shortcuts. * bfd-in2.h: Regenerate. * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when calling create_rofixup_section. * elflink.c (bfd_elf_final_link): Simplify test for .dynstr. d1205 1 a1205 1 2012-06-29 Alan Modra d1207 130 a1336 7 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela section for bss type sections, except for .rela.bss. * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise. d1338 1 a1338 1 2012-06-28 Roland McGrath d1340 3 a1342 2 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for displacement calculation in nacl_p case. d1344 1 a1344 1 2012-06-28 Nick Clifton d1346 4 a1349 3 * po/uk.po: New Ukranian translation. * configure.in (ALL_LINGUAS): Add uk. * configure: Regenerate. d1351 1 a1351 1 2012-06-26 Alan Modra d1353 2 a1354 3 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input file has multiple .got/.toc sections and all don't fit in current toc group. d1356 1 a1356 1 2012-06-22 Roland McGrath d1358 4 a1361 3 * elf.c (assign_file_positions_for_non_load_sections): Define __ehdr_start symbol if it's referenced and there's a PT_LOAD segment that covers both the file and program headers. d1363 1 a1363 1 2012-06-22 Andreas Schwab d1365 6 a1370 2 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute. d1372 1 a1372 1 2012-06-22 Alan Modra d1374 3 a1376 2 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line save/restore functions when relocatable. Make "funcs" static. d1378 1 a1378 1 2012-06-18 Hans-Peter Nilsson d1380 2 a1381 2 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence of merged .got and .got.plt entries. d1383 1 a1383 1 2012-06-18 John Szakmeister d1385 2 a1386 1 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value. d1388 1 a1388 1 2012-06-17 Hans-Peter Nilsson d1390 3 a1392 3 * elf32-cris.c (cris_elf_relocate_section): : Handle references to thread common symbols. d1394 1 a1394 1 2012-06-13 Nick Clifton d1396 5 a1400 4 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function. (elf32_arm_object_p): If the machine number could not be deduced from the notes, call bfd_arm_get_mach_from_attributes to get the number from the attributes. d1402 1 a1402 1 2012-06-12 H.J. Lu d1404 7 a1410 3 PR bfd/14207 * elf.c (assign_file_positions_for_non_load_sections): Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment. d1412 1 a1412 1 2012-06-12 Alan Modra d1414 5 a1418 4 PR ld/14207 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type sections at end of PT_LOAD segment when searching for segment that contains end of relro extent. d1420 1 a1420 1 2012-06-11 H.J. Lu d1422 9 a1430 1 * elf.c (assign_file_positions_for_non_load_sections): Reindent. d1432 1 a1432 1 2012-06-11 H.J. Lu d1434 5 a1438 1 * elf.c (_bfd_elf_map_sections_to_segments): Reindent. d1440 1 a1440 1 2012-06-06 Alan Modra d1442 9 a1450 8 * elflink.c (elf_link_input_bfd): Provide a file symbol for each input file with local syms, if the input lacks such. (bfd_elf_final_link): Add a file symbol to mark end of locals for which we can associate with input files. (struct elf_final_link_info): Add filesym_count field. (struct elf_outext_info): Add need_second_pass and second_pass. (elf_link_output_extsym): Detect symbols defined in the output file, emit them on second pass over locals. d1452 1 a1452 1 2012-06-04 Jan Kratochvil d1454 1 a1454 2 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. d1456 3 a1458 6 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. d1460 1 a1460 1 2012-06-03 Alan Modra d1462 4 a1465 10 PR binutils/13897 * elf.c (elf_find_function): Cache last function sym info. (_bfd_elf_maybe_function_sym): Return function size, pass in section of interest. * elf-bfd.h (struct elf_backend_data ): Likewise. (_bfd_elf_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. (opd_entry_value): Add in_code_sec param. Revert caching code. Return -1 if in_code_sec and function found in wrong section. Update all calls. d1467 1 a1467 1 2012-06-01 Siddhesh Poyarekar d1469 131 a1599 9 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. d1601 1 a1601 1 2012-06-01 Alan Modra d1603 3 a1605 2 PR binutils/13897 * elf64-ppc.c (opd_entry_value): Rewrite cache code. d1607 1 a1607 1 2012-05-29 Tom Tromey d1609 2 a1610 2 * opncls.c (bfd_fopen): Always close fd on failure. (bfd_fdopenr): Likewise. d1612 1 a1612 1 2012-05-27 Alan Modra d1614 2 a1615 6 PR ld/14170 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in a dynamic library finds a new instance with non-default visibility in a regular object, correctly handle symbols already on the undefs list and undo dynamic symbol state when the new symbol is hidden or internal. d1617 1 a1617 1 2012-05-25 H.J. Lu d1619 4 a1622 3 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use dynamic_sec_flags to create PLT .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. d1624 1 a1624 1 2012-05-25 Alan Modra d1626 11 a1636 21 PR ld/13909 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here. * elf-bfd.h (_bfd_elf_eh_frame_present): Declare. * elflink.c (bfd_elf_size_dynamic_sections): Let the backend size dynamic sections before stripping eh_frame_hdr. (bfd_elf_gc_sections): Handle multiple .eh_frame sections. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame if no other .eh_frame sections exist. * elf64-ppc.c (ppc64_elf_size_stubs): Likewise. * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_i386_size_dynamic_sections): ..do it here instead. Don't specially keep sgotplt, iplt, tgotplt, sdynbss for symbols. (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_x86_64_size_dynamic_sections): ..do it here instead. (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. d1638 1 a1638 1 2012-05-24 Alan Modra d1640 3 a1642 4 PR ld/14158 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame size to output section alignment. (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover. d1644 1 a1644 1 2012-05-23 Alan Modra d1646 2 a1647 2 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle BFDs with multiple .eh_frame sections. d1649 1 a1649 1 2012-05-23 Alan Modra d1651 3 a1653 2 PR ld/13909 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs. d1655 1 a1655 1 2012-05-22 H.J. Lu d1657 2 a1658 4 PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the last change. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. d1660 1 a1660 1 2012-05-22 Alan Modra d1662 1 a1662 6 * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if first one is zero size or discarded. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of glink_eh_frame contents here.. (ppc_elf_finish_dynamic_sections): ..rather than here. Just set offset to .glink. d1664 1 a1664 1 2012-05-22 H.J. Lu d1666 2 a1667 4 PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT eh_frame section if there is an input .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. d1669 1 a1669 1 2012-05-22 H.J. Lu d1671 9 a1679 4 PR ld/14105 * elf32-i386.c (elf_i386_create_dynamic_sections): Always create PLT eh_frame section with SEC_LINKER_CREATED. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. d1681 1 a1681 1 2012-05-22 Alan Modra d1683 1 a1683 4 * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame sections attached to a BFD. * section.c (bfd_get_section_by_name): Rewrite description. (bfd_get_next_section_by_name): New function. d1685 3 d1689 1 a1689 1 2012-05-21 Andreas Schwab d1691 49 a1739 4 * elf32-m68k.c (elf_m68k_grok_prstatus): New function. (elf_m68k_grok_psinfo): New function. (elf_backend_grok_prstatus): Define. (elf_backend_grok_psinfo): Define. d1741 2 a1742 1 2012-05-19 Maciej W. Rozycki d1744 31 a1774 3 * elf64-mips.c (elf_backend_got_header_size): Correct definition. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF backend's GOT header size instead of hardcoding it. d1776 2 a1777 1 2012-05-19 Maciej W. Rozycki d1779 141 a1919 2 * elf32-vax.c (elf_vax_relocate_section) : Don't check if info->shared again. d1921 2 a1922 1 2012-05-19 Maciej W. Rozycki d1924 1 a1924 3 * elf32-vax.c (elf_vax_relocate_section) : Use section flags rather than its name as the check for text sections. d1926 9 a1934 1 2012-05-19 Maciej W. Rozycki d1936 7 a1942 2 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure the third reloc offset is the same as the first. d1944 1 a1944 1 2012-05-19 Alan Modra d1946 3 a1948 5 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete. (has_tls_reloc, has_tls_get_addr_call): Move back to.. * elf32-ppc.c: ..here. (ppc_elf_section_flags, elf_backend_section_flags): Delete. (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections. d1950 1 a1950 1 2012-05-18 H.J. Lu d1952 3 a1954 3 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. d1956 1 a1956 1 2012-05-18 Roland McGrath d1958 3 a1960 2 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as not to clobber the ar_fmag field stored in ARED->arch_header. d1962 1 a1962 1 2012-05-18 Pedro Alves d1964 6 a1969 1 * mach-o.h: Don't include sysdep.h. d1971 1 a1971 1 2012-05-18 Nick Clifton d1973 1 a1973 3 PR 14072 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before complaining about config.h not having been included. d1975 5 d1981 4 a1984 1 2012-05-18 Andreas Schwab d1986 8 a1993 2 * aclocal.m4: Regenerate. * Makefile.in: Regenerate. d1995 1 a1995 2 2012-05-17 Daniel Richard G. Nick Clifton d1997 5 a2001 96 PR 14072 * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * aclocal.m4: Regenerate. * bfd-in.h: Generate an error if included before config.h. * sysdep.h: Likewise. * bfd-in2.h: Regenerate. * compress.c: Remove #include "config.h". * plugin.c: Likewise. * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * xsymc.c: Likewise. 2012-05-17 Maciej W. Rozycki Alan Modra * elf.c (ignore_section_sym): Correct comment. Don't return true for absolute section. (elf_map_symbols): Move stray comment. Adjust for above change. Don't discard global section symbols. 2012-05-17 Alan Modra * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC, _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute. * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC absolute. 2012-05-17 Alan Modra * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns, is_ppc_vle): Move to.. * elf32-ppc.h: ..here, making is_ppc_vle a macro. 2012-05-16 Sergio Durigan Junior * bfd-in.h (bfd_get_section_name, bfd_get_section_vma, bfd_get_section_lma, bfd_get_section_alignment, bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros in order to use the `bfd' argument. * bfd-in2.h: Regenerate. * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd' as the first argument for `bfd_get_section_alignment'. * elf32-arm.c (create_ifunc_sections): Likewise, for `bfd_set_section_alignment'. * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for `bfd_get_section_name'. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relocate_section): Likewise. * elf64-mmix.c (mmix_final_link_relocate): Likewise, for `bfd_get_section_vma'. * elf64-ppc.c (create_linkage_sections): Likewise, for `bfd_set_section_alignment'. 2012-05-16 Georg-Johann Lay PR target/13503 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8. (avr_reloc_map): Likewise. 2012-05-16 Daniel Richard G. PR binutils/13558 * bfd/aout-cris.c: Include sysdep.h before bfd.h. * bfd/aout-ns32k.c: Likewise. * bfd/aout-sparcle.c: Likewise. * bfd/aout0.c: Likewise. * bfd/bfd-in2.h: Likewise. * bfd/coff-stgo32.c: Likewise. * bfd/cpu-lm32.c: Likewise. * bfd/cpu-microblaze.c: Likewise. * bfd/cpu-score.c: Likewise. * bfd/cpu-tilegx.c: Likewise. * bfd/cpu-tilepro.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/mach-o.h: Likewise. * bfd/nlm32-ppc.c: Likewise. * bfd/ns32knetbsd.c: Likewise. * bfd/pef.h: Likewise. * bfd/plugin.c: Likewise. * bfd/stab-syms.c: Likewise. * bfd/sunos.c: Likewise. * bfd/syms.c: Likewise. * bfd/xsym.h: Likewise. d2003 3 a2005 1 2012-05-16 Alan Modra d2007 119 a2125 3 * elflink.c: Rename flaginfo to flinfo throughout, except.. (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo. Formatting, style. Simplify flag match. d2127 1 a2127 1 2012-05-16 Alan Modra d2129 2 a2130 9 * dwarf2.c: Formatting. (arange_add): Pass in unit rather than bfd. Update callers. Ignore empty ranges. Don't ask for cleared memory. (parse_comp_unit): Only set unit->base_address if processing DW_TAG_compile_unit. (find_debug_info): Optimise section lookup. (place_sections): Use bfd_alloc for stash->adjusted_sections. (find_line): Match previously parsed comp unit addresses as we do for newly parsed comp units. d2132 1 a2132 1 2012-05-16 Alan Modra d2134 2 a2135 2 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf stops at end of ar_size field. d2137 1 a2137 1 2012-05-16 Alan Modra d2139 3 a2141 5 PR ld/13962 PR ld/7023 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is out of range. As a special case, fix sh_info for zero sh_size. Do the same for .symtab. d2143 1 a2143 2 2012-05-15 James Murray Stephane Carrez d2145 1 a2145 8 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. d2147 29 a2175 4 * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d2177 3 a2179 2 2012-05-14 James Lemke Catherine Moore d2181 1 a2181 17 * bfd.c (bfd_lookup_section_flags): Add section parm. * ecoff.c (bfd_debug_section): Remove flag_info initializer. * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info. (bfd_elf_lookup_section_flags): Add section parm. * elf32-ppc.c (is_ppc_vle): New function. (ppc_elf_modify_segment_map): New function. (elf_backend_modify_segment_map): Define. (has_vle_insns): New define. * elf32-ppc.h (ppc_elf_modify_segment_map): Declare. * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm. Move in logic to omit / include a section. * libbfd-in.h (bfd_link_info): Add section parm. (bfd_generic_lookup_section_flags): Likewise. * reloc.c (bfd_generic_lookup_section_flags): Likewise. * section.c (bfd_section): Move out section_flag_info. (BFD_FAKE_SECTION): Remove flag_info initializer. * targets.c (_bfd_lookup_section_flags): Add section parm. d2183 1 a2183 1 2012-05-14 Catherine Moore d2185 1 a2185 26 * archures.c (bfd_mach_ppc_vle): New. * bfd-in2.h: Regenerated. * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle. * elf32-ppc.c (split16_format_type): New enumeration. (ppc_elf_vle_split16): New function. (HOWTO): Add entries for R_PPC_VLE relocations. (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations. (ppc_elf_section_flags): New function. (ppc_elf_lookup_section_flags): New function. (ppc_elf_section_processing): New function. (ppc_elf_check_relocs): Handle PPC_VLE relocations. (ppc_elf_relocation_section): Likewise. (elf_backend_lookup_section_flags_hook): Define. (elf_backend_section_flags): Define. (elf_backend_section_processing): Define. * elf32-ppc.h (ppc_elf_section_processing): Declare. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15, BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A, BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A, BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A, BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21, BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A, BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A, BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations. d2187 2 a2188 1 2012-05-11 Georg-Johann Lay d2190 1 a2190 9 PR target/13503 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Add entries for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. d2192 4 a2195 1 2012-05-10 H.J. Lu d2197 1 a2197 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32 addend overflow check. d2199 3 a2201 1 2012-05-10 DJ Delorie d2203 1 a2203 1 * elf32-rx.c (rx_elf_object_p): Ignore empty segments. d2205 4 a2208 1 2012-05-10 H.J. Lu d2210 1 a2210 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed hex number in x32 addend overflow check. d2212 5 a2216 1 2012-05-10 H.J. Lu d2218 1 a2218 2 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle R_X86_64_RELATIVE64. d2220 2 a2221 1 2012-05-09 H.J. Lu d2223 1 a2223 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend overflow for R_X86_64_RELATIVE64. d2225 2 a2226 1 2012-05-08 Ben Cheng d2228 1 a2228 2 * elf.c: Preserve the original p_align and p_flags if they are valid. d2230 3 a2232 1 2012-05-07 Alan Modra d2234 1 a2234 2 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update RELOC_AGAINST_DISCARDED_SECTION invocation. d2236 3 a2238 1 2012-05-07 Hans-Peter Nilsson d2240 1 a2240 2 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use local variable i_ instead of assuming and using a variable i. d2242 3 a2244 1 2012-05-07 Maciej W. Rozycki d2246 1 a2246 134 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound relocations. * elfxx-mips.c (mips_reloc_against_discarded_section): New function. (_bfd_mips_elf_relocate_section): Call it, in place of RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Update arguments to RELOC_AGAINST_DISCARDED_SECTION. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. 2012-05-05 Alan Modra PR ld/14052 PR ld/13621 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change. 2012-05-05 Alan Modra * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section and bfd_ind_section with their _ptr variants, or use corresponding bfd_is_* macros. * aout-ns32k.c: Likewise. * aout-tic30.c: Likewise. * coff-arm.c: Likewise. * coff-tic54x.c: Likewise. * cpu-ns32k.c: Likewise. * elf-attrs.c: Likewise. * elfcode.h: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * versados.c: Likewise. * section.c: Likewise. (bfd_abs_section, bfd_ind_section, bfd_com_section, bfd_ind_section): Delete. (std_section): New array replacing above. (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr, bfd_ind_section_ptr, STD_SECTION): Update. (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts. * bfd-in2.h: Regenerate. 2012-05-03 Sean Keys * cpu-xgate.c: New file. Added XGATE support. * archures.c (bfd_architecture): Add XGATE architecture. (bfd_archures_list): Add reference to XGATE architecture info. * elf-bfd.h (prep_headers): Handle bfd_arch_xgate. * reloc.c: Add various XGATE relocation enums. * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector list. * Makefile.am: Add support for XGATE elf. * configure.in: Ditto. * config.bfd: Ditto. * Makefile.in: Regenerate. * configure: Ditto. * bfd-in2.h: Ditto. * libbfd.h: Ditto. Added files for XGATE relocations. * elf32-xgate.c: Created minimal relocation file. * elf32-xgate.h: Created minimal header file for elf32-xgate. 2012-05-03 Tristan Gingold * dwarf2.c (decode_line_info): Ignore DW_LNE_HP_source_file_correlation. 2012-05-01 Nick Clifton PR binutils/13121 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * elf32-arm.c: Likewise. * elf64-sparc.c: Likewise. * elflink.c: Likewise. * pdp11.c: Likewise. * rescoff.c: Likewise. d2248 26 a2273 1 2012-04-26 Mark Wielaard d2275 1 a2275 3 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc possibly being relative to DW_AT_low_pc. (parse_comp_unit): Likewise. d2277 12 a2288 1 2012-04-26 Andreas Schwab d2290 1 a2290 4 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references also when generating PIE. (elf_m68k_discard_copies): Mark undefined weak symbols referenced by relocations as dynamic. d2292 59 a2350 1 2012-04-26 Hans-Peter Nilsson d2352 1 a2352 8 Provide a way for programs to recognize BFD_ASSERT calls. * bfd.c (bfd_assert_handler_type): New API type. (bfd_set_assert_handler, bfd_get_assert_handler): New API functions. (_bfd_assert_handler): New variable. (_bfd_default_assert_handler): New function. (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler. * libbfd-in.h (_bfd_assert_handler): Declare. * libbfd.h, bfd-in2.h: Regenerate. d2354 1 a2354 1 2012-04-24 Hans-Peter Nilsson d2356 1 a2356 3 PR ld/13990 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local symbol, where PLT refcount is set to -1. d2358 228 a2585 1 2012-04-24 Alan Modra d2587 1 a2587 5 PR ld/13991 * elf-bfd.h (_bfd_elf_link_just_syms): Define as _bfd_generic_link_just_syms. * elflink.c (_bfd_elf_link_just_syms): Delete. * linker.c (_bfd_generic_link_just_syms): Set sec_info_type. d2589 2 a2590 26 * bfd-in.h (discarded_section): Renamed from elf_discarded_section. * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * reloc.c: Update all references. * bfd-in2.h: Regenerate. d2592 1 a2592 1 2012-04-20 Andreas Krebbel d2594 17 a2610 2 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. d2612 1 a2612 1 2012-04-19 Thomas Schwinge d2614 2 a2615 4 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for got_type. (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use it. d2617 1 a2617 1 2012-04-17 Kaz Kojima d2619 5 a2623 2 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic relocations when LE conversion happens on the IE tls symbol. d2625 1 a2625 1 2012-04-17 Roland McGrath d2627 2 a2628 2 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding so that 32-byte boundary is a proper instruction boundary. d2630 1 a2630 1 2012-04-17 Tristan Gingold d2632 2 a2633 2 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to member of an object archive.< d2635 1 a2635 1 2012-04-17 Tristan Gingold d2637 1 a2637 6 * vms-lib.c (MAX_EKEYLEN): Define. (MAX_KEYLEN): Fix value. (vms_write_index): Add comments and fix indentation. Adjust comparaison. Add assertions. Free kbn_blk. (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN. Compense MAX_KEYLEN adjustment. d2639 1 a2639 1 2012-04-16 Maciej W. Rozycki d2641 1 a2641 2 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs. (_bfd_mips_elf_check_relocs): Update accordingly. d2643 3 a2645 1 2012-04-13 Alan Modra d2647 36 a2682 3 PR ld/13947 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for reloc sections. d2684 1 a2684 1 2012-04-12 David S. Miller a2685 36 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32, BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function. (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10. (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs. (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. 2012-04-12 Roland McGrath * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry): New variables. (struct elf32_arm_link_hash_table): New member `nacl_p'. (elf32_arm_link_hash_table_create): Initialize it. (elf32_arm_nacl_link_hash_table_create): New function. (arm_movw_immediate, arm_movt_immediate): New functions. (elf32_arm_populate_plt_entry): Test HTAB->nacl_p. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_plt_map_1): Likewise. (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec): New backend vector stanza. (elf32_arm_nacl_modify_segment_map): New function. * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*. * targets.c: Support bfd_elf32_{big,little}_nacl_vec. * configure.in: Likewise. (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here. (bfd_elf32_littlearm_nacl_vec): Likewise. (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise. (bfd_elf32_bigarm_symbian_vec): Likewise. (bfd_elf32_littlearm_symbian_vec): Likewise. (bfd_elf32_bigarm_vxworks_vec): Likewise. (bfd_elf32_littlearm_vxworks_vec): Likewise. d2688 1 a2688 1 2012-04-12 Tristan Gingold d2690 10 a2699 15 * elflink.c (elf_link_output_extsym): Add a guard. (bfd_elf_final_link): Remove assertion. (bfd_elf_final_link): Add a guard. * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed. (elfNN_vms_section_from_shdr, elfNN_vms_object_p) (elfNN_vms_post_process_headers, elfNN_vms_section_processing) (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup): Remove. (elfNN-ia64-vms target): Move to ... * elf64-ia64-vms.c: New file. * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo. (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c. * configure: Regenerate. * Makefile.in: Regenerate. d2701 1 a2701 1 2012-04-11 Nick Clifton d2703 34 a2736 23 PR binutils/13897 * elf64-ppc.c (opd_entry_value): When dealing with sections without relocs, keep the last section loaded in order to avoid unnecessary reloads. 2012-04-09 Roland McGrath * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs. * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs. (nacl_modify_program_headers): Likewise. 2012-04-03 Roland McGrath * elf-nacl.c: New file. * elf-nacl.h: New file. * elf32-i386.c (elf_backend_modify_segment_map): Define for bfd_elf32_i386_nacl_vec. (elf_backend_modify_program_headers): Likewise. * elf64-x86-64.c (elf_backend_modify_segment_map): Define for bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec. (elf_backend_modify_program_headers): Likewise. * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here. (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here. d2738 117 a2854 10 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here. (bfd_elf32_x86_64_nacl_vec): Likewise. (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise. (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise. (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise. (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise. (bfd_elf32_i386_nacl_vec): Likewise. (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise. (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise. * configure: Regenerated. d2856 1 a2856 1 2012-03-31 Andreas Schwab d2858 7 a2864 2 * elf32-m68k.c (elf_m68k_relocate_section): Allow R_68K_TLS_LE{8,16,32} for PIE. d2866 1 a2866 1 2012-03-30 Andreas Krebbel d2868 3 a2870 3 * elf64-s390.c: Fix several comments regarding PLT entry description. * elf32-s390.c: Likewise. d2872 1 a2872 1 2012-03-30 Andreas Krebbel d2874 3 a2876 4 * elf64-s390.c: Use the section pointer shortcuts in elf_link_hash_table and remove them from the target specific variant. * elf32-s390.c: Likewise. d2878 1 a2878 1 2012-03-30 Andreas Krebbel d2880 1 a2880 10 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry): New definitions. (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove. (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32. (elf_s390_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry) (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry) (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions. (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*) (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove. d2882 1 a2882 1 2012-03-30 Andreas Krebbel d2884 3 a2886 3 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove. Rename all occurrences in the file to elf_dyn_relocs. * elf64-s390.c: Likewise. d2888 1 a2888 1 2012-03-30 Alan Modra d2890 3 a2892 2 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic libraries. d2894 1 a2894 1 2012-03-29 Alan Modra d2896 1 a2896 2 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete. * bfd-in2.h: Regenerate. d2898 1 a2898 1 2012-03-23 Alan Modra d2900 6 a2905 2 * elf.c (assign_file_positions_for_non_load_sections): Don't warn on empty alloc sections. d2907 1 a2907 1 2012-03-23 Alan Modra d2909 3 a2911 7 * linker.c (_bfd_nearby_section): New function, split out from.. (fix_syms): ..here. * bfd-in.h (_bfd_nearby_section): Declare. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't use text_index_section or data_index_section with ld -q or ld -r output relocs against stripped output sections. Instead use _bfd_nearby_section. d2913 1 a2913 1 2012-03-23 Alan Modra d2915 2 a2916 3 PR binutils/13894 * elf64-ppc.c (opd_entry_value): Read full symbol table when sym hashes unavailable. d2918 1 a2918 1 2012-03-21 Eliot Dresselhaus d2920 3 a2922 2 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE for non-C6X objects. d2924 2 a2925 1 2012-03-20 Kai Tietz d2927 12 a2938 11 PR ld/12742 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h. * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined. Add windows.h header include if HAVE_WINDOWS_H is defined. (dlerror): New static function if windows variant is used instead of dlfcn.h. (dlclose): Likewise. (dlopen): Likewise. (dlsym): Likewise. * configure: Regenerated. * config.in: Regenerated. d2940 1 a2940 1 2012-03-20 H.J. Lu d2942 3 a2944 17 PR ld/13880 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error for R_386_GOTOFF relocation against protected function if SYMBOLIC_BIND is true. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an error for R_X86_64_GOTOFF64 relocation against protected function when building executable or SYMBOLIC_BIND is true. 2012-03-16 Roland McGrath * config.bfd: Handle x86_64-*-nacl*. * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza. (bfd_elf32_x86_64_nacl_vec): Likewise. * targets.c: Support them. * configure.in: Likewise. * configure: Regenerated. d2946 1 a2946 1 2012-03-16 Matthew Gretton-Dann d2948 4 a2951 109 * elf32-arm.c (elf32_arm_attributes_accept_div): New function. (elf32_arm_attributes_forbid_div): Likewise. (elf32_arm_merge_eabi_attributes): Correct handling of Tag_DIV_use. 2012-03-15 Roland McGrath * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use elf_x86_64_backend_data parameters for plt_eh_frame. * elf64-x86-64.c (struct elf_x86_64_backend_data): New type. (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros. (elf_x86_64_arch_bed): New variable. (elf_backend_arch_data): New macro. (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_plt_sym_val): Likewise. (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data parameters for PLT details. (elf_x86_64_finish_dynamic_sections): Likewise. 2012-03-14 Roland McGrath * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up to the full size, padding out with nop instructions. 2012-03-12 Alan Modra * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn on zero size dynbss symbol. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise. 2012-03-10 Edmar Wienskoski * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. * bfd-in2.h: Regenerate. * cpu-powerpc.c (bfd_powerpc_archs): Add entries for bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. 2012-03-09 H.J. Lu PR ld/13817 * elf32-i386.c (elf_i386_relocate_section): Restore R_386_IRELATIVE. * elf64-x86-64.c (elf_x86_64_relocate_section): Restore R_X86_64_IRELATIVE. 2012-03-08 Tristan Gingold * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum keylen according to archive kind. Set nextvbn and nextrfa lhd fields. Add comments. 2012-03-07 Nick Clifton * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type field. (elf32_mn10300_link_hash_table): Add tls_ldm_got entry; (elf_mn10300_tdata): Define. (elf_mn10300_local_got_tls_type): Define. (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD, R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs. (mn10300_reloc_map): Likewise. (elf_mn10300_tls_transition): New function. (dtpoff, tpoff, mn10300_do_tls_transition): New functions. (mn10300_elf_check_relocs): Add TLS support. (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relocate_section): Likewise. (mn10300_elf_relax_section): Likewise. (elf32_mn10300_link_hash_newfunc): Initialise new field. (_bfd_mn10300_copy_indirect_symbol): New function. (elf32_mn10300_link_hash_table_create): Initialise new fields. (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support. (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise. (_bfd_mn10300_elf_reloc_type_class): Allocate an elf_mn10300_obj_tdata structure. (elf_backend_copy_indirect_symbol): Define. * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD, BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE, BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD, BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations. (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to alongside other MN10300 relocations. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d2953 1 a2953 1 2012-03-06 Jakub Jelinek d2955 2 a2956 2 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE set relocate to TRUE. d2958 1 a2958 1 2012-03-05 Rainer Orth d2960 45 a3004 134 PR ld/12152 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore overflows for R_SPARC_UA32 in .stab sections. 2012-03-01 Alan Modra * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning. 2012-02-27 Alan Modra * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd before calling elf specific function. (sh_elf_osec_readonly_p): Test for error return from above. 2012-02-27 Alan Modra * elf32-spu.c (build_stub): Fix malloc under-allocation. 2012-02-25 Walter Lee * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL, BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD, BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD. Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE. * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro relocations. (tilepro_reloc_map): Ditto. (tilepro_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilepro_tls_translate_to_le): New. (tilepro_tls_translate_to_ie): New. (tilepro_elf_tls_transition): New. (tilepro_elf_check_relocs): Handle new tls relocations. (tilepro_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilepro_elf_relocate_section): Ditto. (tilepro_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New (insn_mask_X1_no_dest_no_srca): New (insn_mask_Y0_no_dest_no_srca): New (insn_mask_Y1_no_dest_no_srca): New (srca_mask_X0): New (srca_mask_X1): New (insn_tls_le_move_X1): New (insn_tls_le_move_zero_X0X1): New (insn_tls_ie_lw_X1): New (insn_tls_ie_add_X0X1): New (insn_tls_ie_add_Y0Y1): New (insn_tls_gd_add_X0X1): New (insn_tls_gd_add_Y0Y1): New * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx relocations. (tilegx_reloc_map): Ditto. (tilegx_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilegx_elf_link_hash_table): New field disable_le_transition. (tilegx_tls_translate_to_le): New. (tilegx_tls_translate_to_ie): New. (tilegx_elf_tls_transition): New. (tilegx_elf_check_relocs): Handle new tls relocations. (tilegx_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilegx_elf_relocate_section): Ditto. (tilegx_copy_bits): New. (tilegx_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New. (insn_mask_X1_no_dest_no_srca): New. (insn_mask_Y0_no_dest_no_srca): New. (insn_mask_Y1_no_dest_no_srca): New. (insn_mask_X0_no_operand): New. (insn_mask_X1_no_operand): New. (insn_mask_Y0_no_operand): New. (insn_mask_Y1_no_operand): New. (insn_tls_ie_ld_X1): New. (insn_tls_ie_ld4s_X1): New. (insn_tls_ie_add_X0X1): New. (insn_tls_ie_add_Y0Y1): New. (insn_tls_ie_addx_X0X1): New. (insn_tls_ie_addx_Y0Y1): New. (insn_tls_gd_add_X0X1): New. (insn_tls_gd_add_Y0Y1): New. (insn_move_X0X1): New. (insn_move_Y0Y1): New. (insn_add_X0X1): New. (insn_add_Y0Y1): New. (insn_addx_X0X1): New. (insn_addx_Y0Y1): New. a3005 1 * bfd-in2.h: Regenerate. d3007 7 a3013 1 2012-02-25 Walter Lee d3015 3 a3017 36 * config.bfd (tilegx-*-*): rename little endian vector; add big endian vector. (tilegxbe-*-*): New case. * configure.in (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): New vector. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): New vector. * configure: Regenerate. * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * targets.c (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): Declare. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): Declare. (_bfd_target_vector): Add / rename above vectors. * arctures.c (bfd_architecture): Define bfd_mach_tilegx32. * bfd-in2.h: Regenerate. * cpu-tilegx.c (bfd_tilegx32_arch): define. (bfd_tilegx_arch): link to bfd_tilegx32_arch. 2012-02-24 Nick Clifton PR ld/13730 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an error message instead of aborting, when an outofrange reloc is encountered. d3019 1 a3019 1 2012-02-23 Iain Sandoe d3021 6 a3026 14 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New. (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc bit-fields when target and host differ in endian-ness. When PAIRs are non-scattered find the 'symbol' from the preceding reloc. Add FIXME re. reloc symbols on section boundaries. (bfd_mach_o_swap_out_non_scattered_reloc): New. (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc. 2012-02-17 Iain Sandoe * mach-o-i386.c (i386_howto_table): Add support for 16 bit sect-diffs. (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs. (bfd_mach_o_i386_swap_reloc_out): Likewise. d3028 1 a3028 1 2012-02-17 Tristan Gingold d3030 4 a3033 6 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF): * libbfd.h: Regenerated. * bfd-in2.h: Likewise. * mach-o-i386.c (i386_howto_table): Include local sectdiff. (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff. (bfd_mach_o_i386_swap_reloc_out): Likewise. d3035 1 a3035 1 2012-02-17 Andreas Krebbel d3037 2 a3038 2 * elf32-s390.c (elf_s390_relocate_section): Support basr in the GD->LE and LD->LE optimizations. d3040 1 a3040 1 2012-02-16 Alan Modra d3042 2 a3043 2 PR binutils/13355 * elf32-rx.c (elf32_rx_relax_section): Correct width check. d3045 1 a3045 1 2012-02-13 Richard Henderson d3047 8 a3054 3 PR ld/13621 * linker.c (fix_syms): Force symbols outside any section into bfd_abs_section_ptr. d3056 1 a3056 1 2012-02-13 Alan Modra d3058 4 a3061 4 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function. * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare. * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define. * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define. d3063 1 a3063 2 2012-02-11 Jan Kratochvil Nick Clifton d3065 2 a3066 2 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized memset. d3068 1 a3068 1 2012-02-10 Iain Sandoe d3070 9 a3078 2 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section vma additions in their logical, rather than physical order. d3080 1 a3080 1 2012-02-10 Iain Sandoe d3082 10 a3091 6 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section parameters. * mach-o-x86-64.c (text_section_names_xlat): New. (mach_o_x86_64_segsec_names_xlat): New. (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat. * mach-o-i386.c (text_section_names_xlat): Correct section parameters. d3093 1 a3093 1 2012-02-10 Tristan Gingold d3095 9 a3103 2 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator to avoid infinite loop. Add comments. d3105 1 a3105 1 2012-02-09 H.J. Lu d3107 6 a3112 8 PR ld/13675 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte nop instructions. (bfd_arch_i386_short_nop_fill): New. (bfd_arch_i386_long_nop_fill): Likewise. Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info initializers. Use bfd_arch_i386_long_nop_fill on 64bit bfd_arch_info initializers. d3114 2 a3115 4 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ... (bfd_arch_i386_short_nop_fill): This. Update bfd_arch_info initializers. * cpu-l1om.c: Likewise. d3117 1 a3117 1 2012-02-08 Alan Modra d3119 1 a3119 3 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too. (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear the correct h->u.weakdef. d3121 1 a3121 1 2012-02-07 Alan Modra d3123 4 a3126 6 * elf.c (elf_find_function): Don't use internal_elf_sym. (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type parameter with asymbol. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype. (struct elf_backend_data ): Likewise. d3128 1 a3128 1 2012-02-02 Vidya Praveen (vidya.praveen@@atmel.com) d3130 2 a3131 3 PR bfd/13410 * elf32-avr.c (elf32_avr_relax_section): Correct the condition that qualifies the candidates for relaxation. d3133 1 a3133 1 2012-02-02 Tristan Gingold d3135 12 a3146 1 * bfdio.c (real_fopen): Remove unused vms_modes variable. d3148 1 a3148 1 2012-02-02 Tristan Gingold d3150 3 a3152 2 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized variable warning. d3154 1 a3154 1 2012-02-02 Tristan Gingold d3156 2 a3157 1 * archive.c (bfd_slurp_armap): Fix thinko in cast. d3159 1 a3159 1 2012-01-31 H.J. Lu d3161 4 a3164 4 PR ld/13616 * archures.c (bfd_arch_info): Add fill. (bfd_default_arch_struct): Add bfd_arch_default_fill. (bfd_arch_default_fill): New. d3166 1 a3166 2 * configure.in: Set bfd version to 2.22.52. * configure: Regenerated. d3168 62 a3229 77 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info initializer. * cpu-arc.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-cris.c: Likewise. * cpu-crx.c: Likewise. * cpu-d10v.c: Likewise. * cpu-d30v.c: Likewise. * cpu-dlx.c: Likewise. * cpu-epiphany.c: Likewise. * cpu-fr30.c: Likewise. * cpu-frv.c: Likewise. * cpu-h8300.c: Likewise. * cpu-h8500.c: Likewise. * cpu-hppa.c: Likewise. * cpu-i370.c: Likewise. * cpu-i860.c: Likewise. * cpu-i960.c: Likewise. * cpu-ia64.c: Likewise. * cpu-ip2k.c: Likewise. * cpu-iq2000.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m10200.c: Likewise. * cpu-m10300.c: Likewise. * cpu-m32c.c: Likewise. * cpu-m32r.c: Likewise. * cpu-m68hc11.c: Likewise. * cpu-m68hc12.c: Likewise. * cpu-m68k.c: Likewise. * cpu-m88k.c: Likewise. * cpu-mcore.c: Likewise. * cpu-mep.c: Likewise. * cpu-microblaze.c: Likewise. * cpu-mips.c: Likewise. * cpu-mmix.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-mt.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-openrisc.c: Likewise. * cpu-or32.c: Likewise. * cpu-pdp11.c: Likewise. * cpu-pj.c: Likewise. * cpu-plugin.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rl78.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-rx.c: Likewise. * cpu-s390.c: Likewise. * cpu-score.c: Likewise. * cpu-sh.c: Likewise. * cpu-sparc.c: Likewise. * cpu-spu.c: Likewise. * cpu-tic30.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-tic54x.c: Likewise. * cpu-tic6x.c: Likewise. * cpu-tic80.c: Likewise. * cpu-tilegx.c: Likewise. * cpu-tilepro.c: Likewise. * cpu-v850.c: Likewise. * cpu-vax.c: Likewise. * cpu-w65.c: Likewise. * cpu-we32k.c: Likewise. * cpu-xc16x.c: Likewise. * cpu-xstormy16.c: Likewise. * cpu-xtensa.c: Likewise. * cpu-z80.c: Likewise. * cpu-z8k.c: Likewise. * cpu-i386.c: Include "libiberty.h". (bfd_arch_i386_fill): New. Add bfd_arch_i386_fill to bfd_arch_info initializer. d3231 1 a3231 2 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer. * cpu-l1om.c: Likewise. d3233 7 a3239 2 * linker.c (default_data_link_order): Call abfd->arch_info->fill if fill size is 0. d3241 1 a3241 1 * bfd-in2.h: Regenerated. d3243 2 a3244 1 2012-01-27 Michael Eager d3246 1 a3246 2 * elf32-microblaze.c (create_got_section): Reuse existing .rela.got section. d3248 5 a3252 1 2012-01-23 Alan Modra d3254 1 a3254 34 * elf-bfd.h: Formatting. (struct elf_backend_data): Add "maybe_function_sym". (_bfd_elf_maybe_function_sym): Declare. * elfxx-target.h (elf_backend_maybe_function_sym): Define. (elfNN_bed): Init new field. * elf.c (elf_find_function): Use maybe_function_sym. (_bfd_elf_maybe_function_sym): New function. * elf64-ppc.c (elf_backend_maybe_function_sym): Define. (ppc64_elf_maybe_function_sym): New function. 2012-01-20 Francois Gouget PR binutils/13534 * archive.c (_bfd_ar_sizepad): New function. Correctly install and pad the size field in an archive header. (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan function for the archive size field. (bfd_generic_openr_next_archived_file): Likewise. (do_slurp_coff_armap): Likewise. (_bfd_write_archive_contents): Likewise. (_bfd_bsd44_write_ar_hdr): Use the new function. (bfd_ar_hdr_from_filesystem): Likewise. (_bfd_write_archive_contents): Likewise. (bsd_write_armap): Likewise. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_write_armap): Likewise. * bfdio.c (bfd_bread): Use correct type for archive element sizes. * ar.c (open_inarch): Likewise. (extract_file): Likewise. * libbfd-in.h (struct areltdata): Use correct types for parsed_size and extra_size fields. Prototype _bfd_ar_sizepad function. * libbfd.h: Regenerate. d3256 2 a3257 1 2012-01-20 Ulrich Weigand d3259 84 a3342 5 * elf.c (elfcore_write_prpsinfo): Provide unconditionally. Return NULL if core file generation is unsupported. (elfcore_write_prstatus): Likewise. * elf32-arm.c (elf32_arm_nabi_write_core_note): New function. (elf_backend_write_core_note): Define. d3344 1 a3344 1 2012-01-19 Tristan Gingold d3346 45 a3390 2 * pef.c: Add a comment. * xsym.c: Likewise. d3392 1 a3392 1 2012-01-17 Alan Modra d3394 4 a3397 3 * elf32-ppc.c (ppc_elf_write_core_note ): Don't leave trailing garbage in the note. * elf64-ppc.c (ppc64_elf_write_core_note ): Likewise. d3399 21 a3419 1 2012-01-16 Daniel Green d3421 1 a3421 4 PR ld/13491 * coff-i386.c (coff_i386_rtype_to_howto ): Test h->root.type not h->type. * coff-x86_64.c (coff_amd64_rtype_to_howto ): Likewise. d3423 4 a3426 1 2012-01-13 Iain Sandoe d3428 1 a3428 2 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute indirect symbols. d3430 146 a3575 1 2012-01-13 Iain Sandoe d3577 1 a3577 2 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file position from here... to (bfd_mach_o_build_seg_command): Here. d3579 108 a3686 1 2012-01-12 Iain Sandoe d3688 171 a3858 4 * mach-o.c (bfd_mach_o_count_indirect_symbols): New. (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table. * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the file. (bfd_mach_o_section): Add indirect_syms field. d3860 1 a3860 1 2012-01-11 Iain Sandoe d3862 3 a3864 3 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of vmsize from filesize. Don't compute offsets or file sizes for zerofill sections. d3866 1 a3866 1 2012-01-11 Iain Sandoe d3868 4 a3871 2 * mach-o.c (bfd_mach_o_build_commands): Make the building of each command type independent. d3873 1 a3873 1 2012-01-11 Alan Modra d3875 4 a3878 23 * elf64-ppc.c: Define more insns used in plt call stubs. (ppc64_elf_brtaken_reloc): Assume isa version 2 or above. (ppc64_elf_relocate_section): Likewise. (enum ppc_stub_type): Add ppc_stub_plt_call_r2save. (struct ppc_link_hash_table): Increase size of stub_count array. Add plt_stub_align and plt_thread_safe. (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define. (plt_stub_size, plt_stub_pad): New functions. (build_plt_stub): Emit barriers for power7 thread safety. Don't emit needless save of r2. (build_tls_get_addr_stub): Adjust params. (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning plt stubs. Adjust build_*plt_stub calls. (ppc_size_one_stub): Similarly. (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align params. Choose default for plt_thread_safe based on existence of calls to thread creation functions. Modify plt_call to plt_call_r2save when no tocsave reloc found. Align tail of stub sections. (ppc64_elf_build_stubs): Align tail of stub sections. Adjust output of stub statistics. (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save. * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype. d3880 1 a3880 1 2012-01-10 H.J. Lu d3882 1 a3882 3 PR ld/13581 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P check on R_X86_64_PCXX. d3884 1 a3884 1 2012-01-10 Tristan Gingold d3886 3 a3888 2 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false warning. d3890 1 a3890 1 2012-01-10 Tristan Gingold d3892 7 a3898 6 * bfdio.c (bfd_tell): Handle nested archives. (bfd_seek): Ditto. * cache.c (bfd_cache_lookup_worker): Ditto. * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with nested archives. (bfd_generic_openr_next_archived_file): Likewise. d3900 1 a3900 1 2012-01-09 Iain Sandoe d3902 3 a3904 17 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement. (bfd_mach_o_write_symtab): Remove handling for indirect syms. (bfd_mach_o_primary_symbol_sort_key): Likewise. (bfd_mach_o_cf_symbols): Likewise. (bfd_mach_o_sort_symbol_table): Remove. (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling for indirect and dysymtab counts. Do the symbol sorting here. (bfd_mach_o_build_dysymtab_command): Count the symbol types here. Make the indirect symbols a TODO. (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols. (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with a non-zero value. (bfd_mach_o_read_symtab_symbol): Record the symbol index. (bfd_mach_o_read_symtab_symbol): Adjust recording of global status. * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries. (IS_MACHO_INDIRECT): Remove. (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New. d3906 1 a3906 1 2012-01-06 Nick Clifton d3908 3 a3910 3 PR binutils/13121 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. d3912 5 a3916 1 2012-01-06 Tristan Gingold d3918 6 a3923 1 * bfdio.c (bfd_bread): Use arelt_size macro. d3925 1 a3925 1 2012-01-06 Tristan Gingold d3927 4 a3930 1 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs. d3932 1 a3932 1 2012-01-05 Nick Clifton d3934 9 a3942 3 PR ld/12161 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if necessary. d3944 1 a3944 1 2012-01-05 Jan Kratochvil d3946 1 a3946 114 Fix zero registers core files when built by gcc-4.7. * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and size. Call elfcore_write_note for the local variables. Remove the final elfcore_write_note call. Add NOTREACHED comments. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function. (bfd_mach_o_generic_stat_arch_elt): Adjust. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_member_init): New function. (bfd_mach_o_openr_next_archived_file): Reindent. Adjust to call bfd_mach_o_fat_member_init. (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init. 2012-01-04 Tristan Gingold * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1, BFD_RELOC_MACH_O_X86_64_PCREL32_2, BFD_RELOC_MACH_O_X86_64_PCREL32_4, BFD_RELOC_MACH_O_X86_64_BRANCH32, BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, BFD_RELOC_MACH_O_X86_64_GOT. 2012-01-04 Tristan Gingold * mach-o.h (bfd_mach_o_fvmlib_command): New structure. (bfd_mach_o_load_command): Add fvmlib field. * mach-o.c (bfd_mach_o_read_fvmlib): New function. (bfd_mach_o_read_command): Handle fvmlib. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_convert_architecture): Reindent. Decode msubtype for ARM. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments. 2012-01-04 Tristan Gingold * mach-o.h: Reindent header. (bfd_mach_o_encryption_info_command): New structure. (bfd_mach_o_load_command): Add encryption_info field. * mach-o.c (bfd_mach_o_read_encryption_info): New function. (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO. (bfd_mach_o_read_command): Adjust error message. 2012-01-04 Shinichiro Hamaji * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part which reads DWARF2 and stores in stash from find_line. (find_line) Call _bfd_dwarf2_slurp_debug_info. * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration. * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate. * mach-o.c (dsym_subdir): The name of subdir where debug information may be stored. (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose type is UUID. (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is corresponding to the executable. (bfd_mach_o_find_dsym): New. Find a debug information BFD in the specified binary file. (bfd_mach_o_follow_dsym): New. Find a debug information BFD for the original BFD. (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O executables, dylibs, and bundles. (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file. * mach-o.h (dsym_bfd): The BFD of the dSYM file. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index for stabd symbols. (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs. (bfd_mach_o_cf_symbols): Likewise. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index as the value of an indirect symbol. Keep the string table index in non-indirect syms for reference. (bfd_mach_o_write_dysymtab): New. (bfd_mach_o_primary_symbol_sort_key): New. (bfd_mach_o_cf_symbols): New. (bfd_mach_o_sort_symbol_table): New. (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols. If we are emitting a dysymtab, process indirect symbols and count the number of each other kind. (bfd_mach_o_mangle_sections): New. (bfd_mach_o_write_contents): Split out some pre-requisite code into the command builder. Write dysymtab if the command is present. (bfd_mach_o_count_sections_for_seg): New. (bfd_mach_o_build_seg_command): New. (bfd_mach_o_build_dysymtab_command): New. (bfd_mach_o_build_commands): Reorganize to support the fact that some commands are optional and should not be emitted if there are no sections or symbols. (bfd_mach_o_set_section_contents): Amend comment. * mach-o.h: Amend and add to comments. (mach_o_data_struct): Add fields for dysymtab symbols counts and a pointer to the indirects, when present. (bfd_mach_o_should_emit_dysymtab): New macro. (IS_MACHO_INDIRECT): Likewise. d3948 1 a3948 1 For older changes see ChangeLog-2011 d3950 6 @ 1.5 log @resolve conflicts @ text @d1 5 @ 1.5.4.1 log @Pull up following revision(s) (requested by skrll in ticket #5): external/gpl3/binutils/dist/bfd/ChangeLog: revision 1.6 external/gpl3/binutils/dist/bfd/elflink.c: revision 1.8 Apply change from upstream to fix PR/48709 - port-alpha/48709: static threaded programs crash. With this fix the new weak symbol's st_other is not merged in, i.e. NOPV is not copied from the libc __libc_thr_init. * elflink.c (_bfd_elf_merge_symbol): If merging a new weak symbol that will be skipped, we don't have a new definition. @ text @a0 5 2013-12-14 Alan Modra * elflink.c (_bfd_elf_merge_symbol): If merging a new weak symbol that will be skipped, we don't have a new definition. @ 1.4 log @Revert last change to elf32-hppa.c and pull across the fix to my binutils PR 13476. tests/lib/libc/tls on hppa still passes with this change. @ text @d1 1 a1 1 2011-12-11 John Davis Anglin d3 1 a3 11 PR binutils/13476 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to R_PARISC_DPREL21L when not doing a shared link. Likewise convert R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L. 2011-06-27 Tristan Gingold * configure.in: Bump version to 2.21.1 d7 1 a7 1 2011-06-24 Alan Modra d9 3 a11 4 PR ld/12921 * elf.c (assign_file_positions_for_load_sections): Don't align sh_offset for all SHT_NOBITS sections here, just .tbss sections that don't get a PT_LOAD. d13 1 a13 1 2011-06-22 Alan Modra d15 8 a22 2 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for plugin symbols. Fix segfault on linker scrip defined syms. d24 1 a24 1 2011-05-29 Alan Modra d26 2 a27 31 Apply from mainline 2011-05-26 Alan Modra * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment. * elflink.c (_bfd_elf_symbol_refs_local_p): Expand local_protected comment. 2011-05-23 Alan Modra PR 12763 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for .tbss, and page align same for all SHT_NOBITS sections. 2011-05-23 Nick Clifton * elf-m10300.c (mn10300_elf_mkobject): New function. (bfd_elf32_mkobject): Define. 2011-05-21 Alan Modra PR 12763 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs from PT_TLS header. (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD segment if just for .tbss. (assign_file_positions_for_load_sections): Don't report "can't allocate in segment" errors for .tbss. (assign_file_positions_for_non_load_sections): Don't set p_filesz from SHT_NOBITS section filepos. 2011-05-17 Alan Modra PR ld/12760 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call. * elflink.c (elf_link_add_object_symbols): Likewise. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. d29 1 a29 2 2011-05-16 Alan Modra * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak. d31 2 a32 32 2011-05-12 Jan Kratochvil * config.in: Regenerated. * configure: Regenerated. * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition. 2011-05-10 Jan Kratochvil * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and 32bit psinfo. * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid. * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise. 2011-05-07 Dave Korn PR ld/12365 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about references to symbols defined in discarded sections. 2011-05-07 Dave Korn PR ld/12365 * coffgen.c (coff_write_symbol): Assume input section is its own output section if output_section member not set. (coff_write_alien_symbol): Likewise. 2011-05-07 Anders Kaseorg PR 12739 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast. * bfd-in2.h: Regenerate. d34 1 a34 2 2011-04-28 Tom Tromey * bfdio.c (memory_bstat): Pass correct size to memset. d36 4 a39 35 2011-04-20 Alan Modra * libbfd.c (bfd_log2): Do return rounded up value. * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2 call with expanded old round down version of the function. * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd. * elflink.c (elf_link_add_object_symbols): Delete redundant code. 2011-04-09 Kai Tietz * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary buffer and use rawsize for sorting. * coffcode.h (coff_compute_section_file_positions): Set rawsize before doing alignment. 2011-04-07 Cary Coutant * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification. 2011-03-03 Michael Snyder * aoutx.h (aout_final_link): Use sizeof int not sizeof int*. (aout_link_write_other_symbol): Missing break statement. 2011-02-14 Mike Frysinger * elflink.c (bfd_elf_size_dynamic_sections): Add bfd_get_symbol_leading_char to the start of newname. 2011-01-18 Pierre Muller Fix compilation for mingw64. * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate typecast to avoid warning. * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type usage. * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead of long for pointer to avoid warning. (elfNN_ia64_relax_brl): Idem. (elfNN_ia64_install_value): Idem. * vms-alpha.c (_bfd_vms_slurp_etir): Idem. d41 1 a41 1 2012-05-25 H.J. Lu d43 2 a44 2 Backport from mainline 2012-01-06 H.J. Lu d46 1 a46 82 PR ld/12366 PR ld/12371 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly handle symbols marked with regular reference, but not non-GOT reference when building shared library. * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle local and global STT_GNU_IFUNC symols when building shared library. * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise. 2011-05-23 DJ Delorie * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo the vma/lma swapping done in elf32_rx_modify_program_headers. 2011-05-15 Richard Sandiford * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and global GOT entries for GOT_PAGE relocations against global symbols. 2011-05-15 Richard Sandiford PR ld/12637 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count as the number of global entries when merging with the primary GOT. 2011-05-13 Alan Modra Apply 2011-04-17 Jan Kratochvil * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for SEC_LOAD. 2011-05-06 Richard Sandiford * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb branch to a PLT entry, redirect it to the PLT's Thumb entry point. 2011-05-04 Alan Modra PR ld/12727 * elf64-ppc.c (ppc_build_one_stub ): Clear was_undefined on dot-symbols. 2011-04-27 Alan Modra Backport from mainline 2011-04-24 Alan Modra PR ld/12365 PR ld/12696 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call. * linker.c (_bfd_link_hash_newfunc): Clear bitfields. (_bfd_generic_link_add_one_symbol): Update "notice" call. * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when it is a redef of an IR symbol in a real BFD. 2011-04-20 Alan Modra PR ld/12365 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols in their own common section. * elflink.c (elf_link_add_object_symbols): Likewise. * linker.c (generic_link_check_archive_element): Don't lose flags if common section is pre-existing. (_bfd_generic_link_add_one_symbol): Likewise. 2011-04-20 Alan Modra PR ld/12365 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call multiple_definition regardless of allow_multiple_definition. * simple.c (simple_dummy_multiple_definition): Update. * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition calls. 2011-04-18 Alan Modra PR ld/12365 PR ld/12672 * bfd.c (BFD_PLUGIN): Define. (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN. * bfd-in2.h: Regenerate. * elflink.c (elf_link_output_extsym): Strip undefined plugin syms. * opncls.c (bfd_make_readable): Don't lose original bfd flags. d48 3 a50 20 2011-04-11 Mark Wielaard PR 10549 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols. (has_gnu_symbols): Renamed from has_ifunc_symbols. * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name. * elf32-i386.c (elf_i386_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. 2011-02-25 Rafael Ávila de Espíndola * plugin.c (bfd_plugin_object_p): Correctly set the filesize and handle claim_file seeking. Only try to load the plugin once. 2010-12-12 H.J. Lu * elf.c (special_sections_g): Add ".gnu.lto_". 2011-04-20 Jan Kratochvil d52 1 a52 2 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of memmove elements. d54 2 a55 1 2011-03-26 John Marino d57 2 a58 3 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*. * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec. * configure: Regenerate. d60 6 a65 1 2011-03-24 Alan Modra d67 1 a67 55 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where old-style __tls_get_addr calls without marker relocs don't match their arg setup insn one for one. If such mismatches are found report the reloc and don't do any tls optimization. * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise. 2011-03-10 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset for LO_DS error message and correct multiple. 2011-03-10 Alan Modra * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define. (ppc64_elf_link_just_syms): New function. (opd_entry_value): Don't assume big-endian host. (get_r2off): New function. (ppc_build_one_stub, ppc_size_one_stub): Use it here. 2011-03-04 Alan Modra * archive.c (bsd_write_armap): Don't call stat in deterministic mode, and don't use st_mtime if stat returns error. 2011-02-28 Alan Modra PR 12513 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and stringsize. Properly sanity check symdef_count. Remove redundant bfd_release. 2011-02-01 Alan Modra Backport from mainline 2011-01-22 Richard Sandiford * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore common sections too. 2011-01-14 Alan Modra * bfd.c (bfd_perror): Flush stdout before and stderr after printing error. (_bfd_default_error_handler): Likewise. * elf.c (print_segment_map): Likewise. * libbfd.c (warn_deprecated): Likewise. * som.c (som_sizeof_headers): No need to do so here. * coff-i860.c: Replace use of printf for error messages with _bfd_error_handler. * coff-ppc.c: Likewise. * coff-sh.c: Likewise. * elf32-bfin.c: Likewise. * elf32-dlx.c: Likewise. * elf32-mep.c: Likewise. * elf32-v850.c: Likewise. * mach-o.c: Likewise. * pef.c: Likewise. d69 1 a69 44 2010-12-24 Alan Modra * compress.c (decompress_contents): Style. (bfd_get_full_section_contents): Do not decompress directly into caller buffer or directly return cached section contents. Check malloc return for compressed_buffer. 2010-12-13 Alan Modra * aoutx.h (aout_link_check_ar_symbols): Formatting. * cofflink.c (coff_link_check_ar_symbols): Likewise. * elflink.c (elf_link_add_archive_symbols): Likewise. * pdp11.c (aout_link_check_ar_symbols): Likewise. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols, xcoff_link_check_dynamic_ar_symbols): Likewise. * aoutx.h (aout_link_check_archive_element): Simplify code dealing with add_archive_element substitute BFD. * cofflink.c (coff_link_check_archive_element): Likewise. * ecoff.c (ecoff_link_check_archive_element): Likewise. (ecoff_link_add_archive_symbols): Likewise. * linker.c (generic_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_archive_element): Likewise. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise. * xcofflink.c (xcoff_link_check_archive_element): Likewise. * aoutx.h (aout_link_check_archive_element): Free symbols from old bfd if !keep_memory. * cofflink.c (coff_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_archive_element): Likewise. * xcofflink.c (xcoff_link_check_archive_element): Likewise. 2010-12-12 H.J. Lu * elflink.c (elf_link_add_archive_symbols): Remove subsbfd. 2010-12-06 Dmitry Gorbachev PR ld/12288 * plugin.c (message): Add putchar for the trailing `\n'. 2010-12-04 Alan Modra PR ld/12277 * elflink.c (elf_link_output_extsym): Set bfd_error on symbol and section errors. Allow better translation of error messages. 2010-11-24 Joel Brobecker * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo. (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c. * Makefile.in: Regenerate. d71 7 a77 29 2010-11-24 Alan Modra PR ld/12253 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct DW_EH_PE_datarel handling. Truncate .eh_frame_hdr address to ptr_size. 2010-11-08 Alan Modra * hash.c (bfd_hash_hash): Extract from.. (bfd_hash_lookup): ..here. (bfd_hash_rename): New function. * section.c (bfd_rename_section): New function. * bfd-in.h (bfd_hash_rename): Declare. * bfd-in2.h: Regenerate. * elf.c (_bfd_elf_make_section_from_shdr): Rename input sections when compressing or decompressing. Don't assert name match. * elf64-hppa.c (get_reloc_section): Don't assert name match. * elfxx-ia64.c (get_reloc_section): Likewise. 2010-11-05 Joseph Myers * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low, _bfd_elf_merge_unknown_attribute_list): Correct test for matching string attributes. 2011-02-01 Alan Modra * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value for toc pointer on any section having makes_toc_func_call set. (check_pasted_section): Ensure pasted .init/.fini fragments use the same toc if any has makes_toc_func_call set. d79 1 a79 1 2011-01-28 Joseph Myers d81 4 a84 2 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs field. d86 8 a93 1 2010-12-10 Alan Modra d95 64 a158 2 * config.bfd: Configure rs6000-*-aix* as for powerpc-*-aix*. Add aix5coff64_vec to powerpc ELF entries. d160 68 a227 1 2010-12-08 Tristan Gingold d229 2 a230 3 * configure.in: Bump version to 2.21.0 * Makefile.am (RELEASE): Unset. * configure, Makefile.in: Regenerate. d232 2 a233 1 2010-12-08 Tristan Gingold d235 1 a235 3 * configure.in: Bump version to 2.21 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d237 3 a239 1 2010-12-07 H.J. Lu d241 1 a241 3 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS and BFD_DECOMPRESS. (bfd_openr_next_archived_file): Revert the last change. d243 1 a243 1 2010-12-06 Mike Frysinger d245 1 a245 3 * Makefile.am (!INSTALL_LIBBFD/bfdinclude_HEADERS): Set to nothing. (PLUGINS/bfdinclude_HEADERS): Append plugin-api.h. * Makefile.in: Regenerated. d247 1 a247 1 2010-11-30 Joel Sherrill d249 1 a249 1 * config.bfd: Add sparc64-rtems. d251 5 a255 1 2010-11-25 Alan Modra d257 1 a257 5 * po/es.po: Update. * po/fi.po: Update. * po/fr.po: Update. * po/ja.po: Update. * po/zh_CN.po: Update. d259 6 a264 1 2010-11-17 Tristan Gingold d266 1 a266 2 * vms-lib.c (vms_write_index): Add comments. Partially revert previous patch. Free blocks later. d268 2 a269 1 2010-11-10 Richard Sandiford d271 1 a271 2 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove unused variables. d273 2 a274 1 2010-11-10 Nick Clifton d276 1 a276 2 * po/ja.po: Updated Japanese translation. * po/ru.po: Updated Russian translation. d278 3 a280 1 2010-11-08 Tristan Gingold d282 1 a282 2 * configure.in: Bump version to 2.20.90 * configure: Regenerate. d284 4 a287 1 2010-11-08 Nick Clifton d289 1 a289 1 * po/ja.po: Updated Japanese translation. d291 1 a291 1 2010-11-05 Tristan Gingold d293 1 a293 1 * po/bfd.pot: Regenerate d295 2 a296 1 2010-11-04 Maciej W. Rozycki d298 1 a298 4 PR ld/10144 * elfxx-mips.c (_bfd_mips_elf_check_relocs) [R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from SEC_DEBUGGING sections. d300 3 a302 1 2010-11-04 Tristan Gingold d304 1 a304 2 * vms-lib.c (vms_write_index): Fix thinko: reverse the loop. Use bfd_zmalloc instead of bfd_malloc. Fix comment. d306 3 a308 1 2010-11-04 Kai Tietz d310 1 a310 4 * coffcode.h (GNU_LINKONCE_WT): New. (sec_to_styp_flags): Add handling of new debug section. (styp_to_sec_flags): Likewise. d312 31 a342 1 2010-11-04 Tristan Gingold d344 1 a344 2 * makefile.vms (CFLAGS): Make badalias warnings informational. * vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer. d346 3 a348 1 2010-11-04 Joseph Myers d350 1 a350 14 * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low, _bfd_elf_merge_unknown_attribute_list): New. * elf-bfd.h (struct elf_backend_data): Add obj_attrs_handle_unknown. (_bfd_elf_merge_unknown_attribute_low, _bfd_elf_merge_unknown_attribute_list): Declare. * elf32-arm.c (elf32_arm_obj_attrs_handle_unknown): New. Split out from elf32_arm_merge_eabi_attributes. (elf32_arm_merge_eabi_attributes): Use _bfd_elf_merge_unknown_attribute_low and _bfd_elf_merge_unknown_attribute_list. (elf_backend_obj_attrs_handle_unknown): Define. * elfxx-target.h (elf_backend_obj_attrs_handle_unknown): Define. (elfNN_bed): Update initializer. d352 3 a354 1 2010-11-02 H.J. Lu d356 1 a356 2 * bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New. * bfd-in2.h: Regenerated. d358 2 a359 1 2010-11-02 Joseph Myers d361 1 a361 92 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for Tag_ABI_compatibility, treat odd tags as strings and even ones as integers. (elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment, elf32_tic6x_array_alignment_to_tag): New. (elf32_tic6x_merge_attributes): Handle more attributes. Set type for merged attributes. (elf_backend_obj_attrs_order): Define. 2010-10-29 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): Fix a typo. 2010-10-29 Pawel Sikora PR binutils/12075 * compress.c (bfd_compress_section_contents): Use uLong on compressed_size. 2010-10-29 Joseph Myers * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check Tag_ABI_compatibility not Tag_compatibility. (elf32_tic6x_merge_attributes): Update compatibility attribute name in comment. Return FALSE if merging common attributes fails. 2010-10-29 Nick Clifton PR bintils/6962 * coffcode.h (handle_COMDAT): Only check the base type when looking for a section symbol. 2010-10-29 H.J. Lu Cary Coutant * archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS and BFD_DECOMPRESS. * bfd.c (BFD_COMPRESS): New. (BFD_DECOMPRESS): Likewise. (BFD_FLAGS_SAVED): Likewise. (bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED. * compress.c (bfd_uncompress_section_contents): Removed. (get_uncompressed_size): New. (decompress_contents): Likewise. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_is_section_compressed): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * dwarf2.c (dwarf_debug_sections): New. (dwarf_debug_section_enum): Likewise. (read_section): Remove section_name and compressed_section_name. Add dwarf_debug_section_enum. Try compressed debug section. (read_indirect_string): Updated. (read_abbrevs): Likewise. (decode_line_info): Likewise. (read_debug_ranges): Likewise. (find_line): Updated. * ecoff.c (bfd_debug_section): Add compress_status and compressed_size. * elf.c (_bfd_elf_make_section_from_shdr): Call bfd_is_section_compressed to check if a DWARF debug section is compressed. Call bfd_init_section_compress_status or bfd_init_section_decompress_status if needed. * elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents with bfd_get_full_section_contents. * merge.c (_bfd_add_merge_section): Likewise. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * simple.c (bfd_simple_get_relocated_section_contents): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and BFD_DECOMPRESS. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (dwarf_debug_section): New. (dwarf_debug_sections): Likewise. * libbfd.c (_bfd_generic_get_section_contents): Issue an error when getting contents on compressed/decompressed section. * section.c (COMPRESS_SECTION_NONE): New. (COMPRESS_SECTION_DONE): Likewise. (DECOMPRESS_SECTION_SIZED): Likewise. (BFD_FAKE_SECTION): Add compress_status and compressed_size. (bfd_malloc_and_get_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. d363 1 a363 2 * bfd-in2.h: Regenerated. * libbfd.h: Likewise. d365 1 a365 2 2010-10-29 Bernd Schmidt Joseph Myers d367 3 a369 2 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Check for mismatch of DSBT attributes. d371 1 a371 1 2010-10-25 Daniel Jacobowitz d373 12 a384 8 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call _bfd_clear_contents. Pass it the input section. * libbfd-in.h (_bfd_clear_contents): Add input_section argument. * libbfd.h: Regenerate. * reloc.c (_bfd_clear_contents): Take input_section argument. Use non-zero for .debug_ranges. (bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents call. d386 2 a387 49 * elf32-arm.c (elf32_arm_relocate_section): Use RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. a388 5 * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. d390 1 a390 1 2010-10-25 Nathan Sidwell d392 3 a394 1 * elf32-tic6x.c: Add attribution. d396 3 a398 1 2010-10-25 Alan Modra d400 1 a400 2 * elf32-arm.c (find_stub_size_and_template): Avoid uninitialized var warning at -O3. d402 2 a403 1 2010-10-25 Alan Modra d405 1 a405 4 * opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal. * libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here. * libbfd.h: Regenerate * bfd-in2.h: Regenerate. d407 2 a408 1 2010-10-25 Alan Modra d410 1 a410 5 * opncls.c (_bfd_id_counter): Rename to bfd_id_counter. (bfd_reserved_id_counter, bfd_use_reserved_id): New vars. (_bfd_new_bfd): Use negative id when bfd_use_reserved_id. (bfd_create): Doc fix. * bfd-in2.h: Regenerate. d412 2 a413 1 2010-10-22 Rainer Orth d415 3 a417 2 * elfxx-sparc.c (tpoff): Define bed, static_tls_size. Consider static_tls_alignment. d419 1 a419 22 * elf32-sparc.c (TARGET_BIG_SYM): Redefine to bfd_elf32_sparc_sol2_vec. (TARGET_BIG_NAME): Redefine to elf32-sparc-sol2. (elf32_bed): Redefine to elf32_sparc_sol2_bed. (elf_backend_static_tls_alignment): Redefine to 8. Include elf32-target.h. (elf_backend_static_tls_alignment): Undef again for VxWorks. * elf64-sparc.c (TARGET_BIG_SYM): Redefine to bfd_elf64_sparc_sol2_vec. (TARGET_BIG_NAME): Redefine to elf64-sparc-sol2. (ELF_OSABI): Undef. (elf64_bed): Redefine to elf64_sparc_sol2_bed. (elf_backend_static_tls_alignment): Redefine to 16. Include elf64-target.h. * config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*. Set targ_defvec to bfd_elf32_sparc_sol2_vec. [BFD64] (sparc-*-solaris2*): Set targ_defvec to bfd_elf32_sparc_sol2_vec. Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in targ_selvecs. d421 2 a422 3 * configure.in: Handle bfd_elf32_sparc_sol2_vec, bfd_elf64_sparc_sol2_vec. * configure: Regenerate. d424 1 a424 72 * targets.c (bfd_elf32_sparc_sol2_vec): Declare. (bfd_elf64_sparc_sol2_vec): Declare. (_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec, bfd_elf64_sparc_sol2_vec. 2010-10-21 Joseph Myers * elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for attribute renaming. (elf_backend_obj_attrs_section): Change to ".c6xabi.attributes". 2010-10-21 Rainer Orth * elf-bfd.h (struct elf_backend_data): New member static_tls_alignment. * elfxx-target.h (elf_backend_static_tls_alignment): Provide default. (elfNN_bed): Initialize static_tls_alignment. * elflink.c (bfd_elf_final_link): Don't round end of TLS section if static TLS has special alignment requirements. * elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size. Consider static_tls_alignment. (elf_backend_static_tls_alignment): Redefine for Solaris 2. Undef again for VxWorks. * elf64-x86-64.c (elf64_x86_64_tpoff): Define bed, static_tls_size. Consider static_tls_alignment. (elf_backend_static_tls_alignment): Redefine for Solaris 2. Undef again for Intel L1OM. 2010-10-14 Dave Korn Apply LD plugin patch series (part 6/6). * aoutx.h (aout_link_check_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (aout_link_check_archive_element): Handle substitute bfd if it was set during add_archive_element callback in the above. * cofflink.c (coff_link_check_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (coff_link_check_archive_element): Handle substitute bfd if it was set during add_archive_element callback in the above. * ecoff.c (read_ext_syms_and_strs): New function holds symbol-reading code factored-out from ecoff_link_check_archive_element. (reread_ext_syms_and_strs): Clear old symbols and call it. (ecoff_link_check_archive_element): Use the above. Handle substitute BFD if one is set by add_archive_element callback. (ecoff_link_add_archive_symbols): Likewise allow bfd substitution. * elflink.c (elf_link_add_archive_symbols): Likewise. * linker.c (generic_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (aout_link_check_archive_element): Handle substitute bfd if it was set during add_archive_element callback in the above. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Handle substitute BFD if one is set by add_archive_element callback. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (xcoff_link_check_ar_symbols): Likewise. (xcoff_link_check_archive_element): Handle bfd substitution if it was set by callback in the above. 2010-10-11 Alan Modra * elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms. (elf32_frvfdpic_finish_dynamic_sections): Don't crash on __ROFIXUP_END__ defined in shared lib. 2010-10-11 Thomas Schwinge * elf32-arm.c (elf32_arm_final_link_relocate) (elf32_arm_relocate_section): Handle relocations against STN_UNDEF. d426 5 a430 1 2010-10-11 Dave Korn d432 1 a432 2 * elflink.c (_bfd_elf_link_output_relocs): Delete unused variable "output_rel_hdr". d434 2 a435 1 2010-10-09 John Tytgat d437 1 a437 2 * reloc.c (BFD_RELOC_ARM_HVC): Add. * libbfd.h: Regenerate. d439 6 a444 1 2010-10-08 Kai Tietz d446 1 a446 7 * pei-x86_64.c (find_next_xdata_or_end): Removed. (pex64_dump_xdata): Remove arguments stop, onaline, and pdata. New argument endx. Print term "none" instead of misleading "CFA". (sort_xdata_arr): New function. (pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs instead of searching quadratic. d448 1 a448 2 2010-10-08 Pierre Muller Alan Modra d450 10 a459 105 Fix build with -DDEBUG=7 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call to deleted function elf_symbol_flags. Add typecast to avoid warning. * elf32-rx.c (dump_symbol) : Rename to.. (rx_dump_symbol): ..this to avoid link errors. * elflink.c (elf_link_input_bfd): Add typecast to avoid warnings. (bfd_elf_perform_complex_relocation): Likewise. * elf32-xtensa.c (print_action_list): Likewise. 2010-10-06 Nathan Sidwell * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic, elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for ip/r12. (arm_type_of_stub): Remove superfluous braces. 2010-10-04 Bernd Schmidt * elf-bfd.h (struct bfd_elf_section_reloc_data): New structure. (struct bfd_elf_section_data): New members REL and RELA; delete members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX, REL_IDX2, REL_HASHES. (_bfd_elf_init_reloc_shdr): Adjust declaration. (_bfd_elf_single_rel_hdr): Declare. (RELOC_AGAINST_DISCARDED_SECTION): Use it. * elf.c (bfd_section_from_shdr): Adjusted to match changes in data structures. (_bfd_elf_init_reloc_shdr): New arg RELDATA. Remove arg REL_HDR. All callers changed. Allocate memory for the Elf_Internal_Shdr structure. (_bfd_elf_single_rel_hdr): New function. (struct fake_section_arg): New structure. (elf_fake_section): Expect to see a pointer to it in the third argument. If doing a relocatable link, allocate both REL and RELA sections as needed. (assign_section_numbers): Adjusted to match changes in data structures. (_bfd_elf_compute_section_file_positions): Call elf_fake_sections with a struct fake_section_args argument. * elfcode.h (elf_write_relocs): Adjusted to match changes in data structures. (elf_slurp_reloc_table): Likewise. * elflink.c (_bfd_elf_link_read_relocs): Likewise. (_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with RELDATA. Remove argument O. All callers changed. Remove code to discover the right rel_hdr and count. (_bfd_elf_link_output_relocs): Adjusted to match changes in data structures. (elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH; replace with RELDATA. All callers changed. (elf_link_input_bfd): Correctly generate rel_hash data when both REL and RELA sections are present. (elf_reloc_link_order): Adjusted to match changes in data structures. (bfd_elf_final_link): Simplify code to count relocs. Free the hashes array for both REL and RELA. (get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr * elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections): Delete. * elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections): Delete. (elf32_tic6x_rel_relocation_p): Adjusted to match changes in data structures. * elf32-microblaze.c (microblaze_elf_check_relocs): Use _bfd_elf_single_rel_hdr. * elf32-ppc.c (ppc_elf_relax_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (get_reloc_section): Likewise. * elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match changes in data structures. (mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr. * elf64-ppc.c (ppc64_elf_edit_opd): Likewise. (ppc64_elf_edit_toc): Likewise. (get_relocs): Adjusted to match changes in data structures. Allocate an Elf_Internal_Shdr structure if necessary. (ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr. * elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match changes in data structures. * elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr. * elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro. (mips_elf_rel_relocation_p): Adjusted to match changes in data structures. (_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather than MIPS_RELOC_RELOCA_P. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use _bfd_elf_single_rel_hdr. (_bfd_sparc_elf_relocate_section): Likewise. 2010-10-01 Thomas Schwinge * elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in SHN_UNDEF, SHN_ABS, SHN_COMMON. 2010-09-30 H.J. Lu PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise. * elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf. 2010-09-27 Ralf Wildenhues d461 23 d485 8 d494 1 a494 1 2010-09-24 Thomas Schwinge d496 1 a496 94 * elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c, elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c, elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h, elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to the zero symbol index. * elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index to STN_UNDEF, not SHN_UNDEF. 2010-09-23 Bernd Schmidt * elf32-tic6x.c (elf32_tic6x_fake_sections): New function. (elf_backend_fake_sections): Define. 2010-09-23 Matthew Gretton-Dann * bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value. 2010-09-23 Alan Modra * cpu-d10v.c: Make bits_per_address 18 for all arch_info entries. 2010-09-23 Alan Modra * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC difference between input and output section. 2010-09-22 Kai Tietz * coffcode.h (sec_to_styp_flags): Adjust debug sections to be conform to pe-coff specification and avoid marking them as excluded. (styp_to_sec_flags): Doing reverse mapping. * peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for setting IAT directory entry. 2010-09-20 Richard Henderson * elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc. 2010-09-19 Richard Sandiford * elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls. (mips_elf_link_hash_newfunc): Initialize it. (mips_elf_record_global_got_symbol): Add a for_call parameter. (mips_elf_count_got_symbols): Check SYMBOL_CALLS_LOCAL rather than SYMBOL_REFERENCES_LOCAL if the GOT entry is only used for calls. Try to remove .got entries in favour of .got.plt entries on VxWorks. (_bfd_mips_elf_check_relocs): Do not try to avoid allocating a global GOT entry for VxWorks calls. Update uses of mips_elf_record_global_got_symbol. (allocate_dynrelocs): Set got_only_for_calls to false if the GOT entry is used for dynamic relocations. 2010-09-19 Richard Sandiford * elfxx-mips.c (mips_got_entry): Adjust commentary. (mips_elf_create_local_got_entry): If given a symbol, check that it has been assigned to the local part of the GOT. (mips_elf_count_got_symbols): Take the bfd_link_info as argument instead of the master GOT. Put all locally-binding symbols in the local area. (mips_elf_make_got_per_bfd): Use global_got_area to decide whether a symbol lives in the local or global area. (mips_elf_local_relocation_p): Remove check_forced argument and retain only the !check_forced behavior. (mips_elf_calculate_relocation): Adjust call accordingly. Use global_got_area to decide whether an output relocation should be local or global. Explicitly decay R_MIPS_GOT_PAGE into R_MIPS_GOT_DISP where appropriate. Fix selection of local vs. global semantics for R_MIPS*_26. Remove redundant reevaluation of what is stored in was_local_p. (mips_elf_create_dynamic_relocation): Use global_got_area to decide whether the relocation should be against a global or local symbol. (mips_elf_lay_out_got): Update the GOT traversal after the above change to mips_elf_count_got_symbols. (mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p. (_bfd_mips_elf_relocate_section): Likewise. (_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide whether the symbol has a global got entry. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. 2010-09-19 Richard Sandiford * elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols to the global GOT on VxWorks. 2010-09-19 Richard Sandiford * elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks, exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning about HI/LO relocations in shared objects. d498 1 a498 1 2010-09-16 Alan Modra d500 1 a500 6 * elf32-spu.c (spu_elf_size_sections): Omit fixups for non-alloc sections. (spu_elf_create_sections): Mark .fixup with SEC_LINKER_CREATED and set dynobj. (spu_elf_finish_dynamic_sections): New function. (elf_backend_finish_dynamic_sections): Define. d502 1 a502 1 2010-09-16 Alan Modra d504 1 a504 2 * elf.c (bfd_elf_get_default_section_type): Don't test SEC_NEVER_LOAD. * elflink.c (elf_link_input_bfd): Likewise. d506 1 a506 1 2010-09-15 Kai Tietz d508 6 a513 7 * pei-x86_64.c (pex64_get_unwind_info): Reorgnized. (pex64_get_scope_entry): Removed. (find_next_xdata_or_end): New helper. (pex64_dump_xdata): Reworked. (pex64_bfd_print_pdata): Add checking for valid pdata sorting and values. Reworked output. d515 1 a515 1 2010-09-15 H.J. Lu d517 2 a518 2 PR binutils/12004 * plugin.c (bfd_plugin_object_p): Handle NULL iostream. d520 1 a520 1 2010-09-14 Kai Tietz d522 2 a523 3 * pe-x86_64.c (COFF_SECTION_ALIGNMENT_ENTRIES): Make .rdata, .data, and .text partial matched section names. * pei-x86_64.c: Likewise. d525 2 a526 2 * peXXigen.c (sort_x64_pdata): New helper. (_bfd_XXi_final_link_postscript): Do pdata sorting. d528 3 a530 1 2010-09-09 H.J. Lu d532 4 a535 3 PR ld/11998 * elf.c (assign_file_positions_for_load_sections): Don't warn zero LMA adjustment. d537 1 a537 1 2010-09-09 Bernd Schmidt d539 41 a579 2 * elflink.c (bfd_elf_final_link): Correct calculation of max_external_reloc_size. d581 1 a581 2 2010-09-07 Alan Modra Marcus Brinkmann d583 3 a585 4 * peXXigen.c: Whitespace. (pe_print_idata): Correct section limit calculations. Tidy array indexing. (_bfd_XX_print_ce_compressed_pdata): Don't leak memory. d587 1 a587 1 2010-09-02 Richard Henderson d589 2 a590 1 * config.bfd (x86_64-*-mingw*): Select 32-bit pei vectors too. d592 1 a592 1 2010-09-01 Pedro Alves d594 1 a594 2 * netbsd-core.c (netbsd_core_core_file_pid): Renamed to ... (netbsd_core_file_pid): ... this. d596 1 a596 1 2010-09-01 Tristan Gingold d598 2 a599 2 * coffcode.h (coff_slurp_line_table): Add a cast. (coff_slurp_reloc_table): Ditto. d601 1 a601 1 2010-08-30 Gunther Nikl d603 266 a868 1 * cisco-core.c (cisco_core_file_pid): Define. d870 1 a870 1 2010-08-30 Alan Modra d872 7 a878 5 PR binutils/11953 * elf.c (copy_elf_program_header): Calculate map->header_size from lowest_section, not first_section. Validate program header p_paddr against section lma. Find lowest_section in second loop over headers. d880 1 a880 1 2010-08-28 Alan Modra d882 2 a883 4 * elflink.c (_bfd_elf_dynamic_symbol_p): Rename param. Make common syms local. (_bfd_elf_symbol_refs_local_p): Expand comment. (elf_link_output_extsym): Fix style nit. d885 1 a885 1 2010-08-26 Nathan Sidwell d887 3 a889 2 * elf32-arm.c (elf32_arm_final_link): Process stub sections exactly once. d891 1 a891 1 2010-08-25 H.J. Lu d893 3 a895 3 PR ld/11939 * elflink.c (elf_link_add_object_symbols): Don't set unique_global for non-ELF hash link table. d897 1 a897 1 2010-08-25 H.J. Lu d899 3 a901 4 PR ld/11944 * elf-bfd.h (elf_backend_data): Add target_id. (bfd_elf_make_generic_object): Renamed to ... (bfd_elf_make_object): This. d903 1 a903 3 * elf.c (bfd_elf_make_generic_object): Removed. (bfd_elf_make_object): New. (bfd_elf_mkcorefile): Really treat it as an object file. d905 2 a906 25 * elf-m10300.c (ELF_TARGET_ID): New. * elf32-arm.c (ELF_TARGET_ID): Likewise. * elf32-bfin.c (ELF_TARGET_ID): Likewise. * elf32-cris.c (ELF_TARGET_ID): Likewise. * elf32-frv.c (ELF_TARGET_ID): Likewise. * elf32-i386.c (ELF_TARGET_ID): Likewise. * elf32-lm32.c (ELF_TARGET_ID): Likewise. * elf32-m32r.c (ELF_TARGET_ID): Likewise. * elf32-m68hc11.c (ELF_TARGET_ID): Likewise. * elf32-m68hc12.c (ELF_TARGET_ID): Likewise. * elf32-m68k.c (ELF_TARGET_ID): Likewise. * elf32-microblaze.c (ELF_TARGET_ID): Likewise. * elf32-ppc.c (ELF_TARGET_ID): Likewise. * elf32-s390.c (ELF_TARGET_ID): Likewise. * elf32-sh.c (ELF_TARGET_ID): Likewise. * elf32-sparc.c (ELF_TARGET_ID): Likewise. * elf32-spu.c (ELF_TARGET_ID): Likewise. * elf32-tic6x.c (ELF_TARGET_ID): Likewise. * elf32-xtensa.c (ELF_TARGET_ID): Likewise. * elf64-alpha.c (ELF_TARGET_ID): Likewise. * elf64-hppa.c (ELF_TARGET_ID): Likewise. * elf64-ppc.c (ELF_TARGET_ID): Likewise. * elf64-s390.c (ELF_TARGET_ID): Likewise. * elf64-x86-64.c (ELF_TARGET_ID): Likewise. * elfxx-ia64.c (ELF_TARGET_ID): Likewise. d908 1 a908 3 * elf32-hppa.c (elf32_hppa_mkobject): Removed. (bfd_elf32_mkobject): Likewise. (ELF_TARGET_ID): New. d910 2 a911 2 * elf32-mips.c (ELF_TARGET_ID): New. (bfd_elf32_mkobject): Removed. d913 1 a913 2 * elf64-mips.c (ELF_TARGET_ID): New. (bfd_elf64_mkobject): Removed. d915 2 a916 2 * elfn32-mips.c (ELF_TARGET_ID): New. (bfd_elf32_mkobject): Removed. d918 1 a918 2 * elfxx-mips.c (_bfd_mips_elf_mkobject): Removed. * elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise. d920 1 a920 4 * elfxx-target.h (bfd_elfNN_mkobject): Default to bfd_elf_make_object. (ELF_TARGET_ID): New. Default to GENERIC_ELF_DATA. (elfNN_bed): Initialize target_id. d922 1 a922 1 2010-08-25 Julian Brown d924 3 a926 4 * elf32-arm.c (arm_stub_required_alignment): New. (arm_build_one_stub): Use above to partition stubs. (make_branch_to_a8_stub): Use arm_stub_a8_veneer_lwm not arm_stub_a8_veneer_b_cond. d928 1 a928 1 2010-08-25 Alan Modra d930 4 a933 7 * aout-arm.c (MY(bfd_reloc_type_lookup)): Use bfd_arch_bits_per_address. * aout-ns32k.c (MY(bfd_reloc_type_lookup)): Likewise. * aoutx.h (NAME(aout,reloc_type_lookup)): Likewise. * coff-arm.c (coff_arm_reloc_type_lookup): Likewise. * elf-hppa.h (elf_hppa_reloc_final_type): Likewise. * reloc.c (bfd_default_reloc_type_lookup): Likewise. * riscix.c (riscix_reloc_type_lookup): Likewise. d935 1 a935 1 2010-08-25 Alan Modra d937 3 a939 4 * elf.c (_bfd_elf_map_sections_to_segments): Don't load program headers if any loaded section wraps the address space. Simplify ~(m-1) to -m. Use lma rather than vma when determining whether note sections are adjacent. d941 1 a941 1 2010-08-22 H.J. Lu d943 4 a946 3 PR ld/11933 * elflink.c (elf_link_add_object_symbols): Don't check relocation if input ELF object ID doesn't match output. d948 1 a948 1 2010-08-21 Ralf Wildenhues d950 1 a950 1 * configure: Regenerate. d952 1 a952 1 2010-08-20 H.J. Lu d954 1 a954 1 * merge.c (sec_merge_emit): Revert the last checkin. d956 1 a956 1 2010-08-20 Maciej W. Rozycki d958 8 a965 2 * elf32-sh.c (sh_elf_relocate_section): Handle non-ELF output BFD. d967 1 a967 1 2010-08-20 Maciej W. Rozycki d969 22 a990 2 * elf32-m68k.c (bfd_elf_m68k_set_target_options): Don't set GOT options unless an m68k hash table has been found. d992 1 a992 1 2010-08-20 Nick Clifton d994 28 a1021 2 * merge.c (sec_merge_emit): Do not zero pad sections that do not have an alignment. d1023 1 a1023 3 2010-08-18 Pedro Alves PR corefile/8210 d1025 81 a1106 1 * corefile.c (bfd_core_file_pid): New. d1108 1 a1108 2 * targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid. (struct bfd_target) <_core_file_pid>: New. d1110 4 a1113 2 * libbfd-in.h (_bfd_nocore_core_file_pid): Declare. * libbfd.c (_bfd_nocore_core_file_pid): New. d1115 1 a1115 79 * elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid): Declare. * elfcode.h (elf_core_file_pid): New define. * elfcore.h (elf_core_file_pid): New function. * elf.c (elfcore_make_pid): Rewrite. (elfcore_grok_prstatus): Only set core_pid if not set yet. (elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to getting the lwpid from prstat.pr_pid. * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. (elf64_x86_64_grok_psinfo): Extract the the main process's PID, and store it in elf_tdata's core_pid field. * elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. (elf_i386_grok_psinfo): Extract the the main process's PID, and store it in elf_tdata's core_pid field. * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * plugin.c (bfd_plugin_core_file_pid): New function. * aout-target.h (MY_core_file_pid): Define. * aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines. * coff-rs6000.c (coff_core_file_pid): New define. (rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE. * coff64-rs6000.c (coff_core_file_pid): New define. (rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE. (xcoff64_core_file_pid): New define. (aix5coff64_vec): Use BFD_JUMP_TABLE_CORE. * mach-o-target.c (bfd_mach_o_core_file_pid): New define. * aix386-core.c (aix386_core_file_pid): New define. * hppabsd-core.c (hppabsd_core_core_file_pid): New define. * hpux-core.c (hpux_core_core_file_pid): New define. * irix-core.c (irix_core_core_file_pid): New define. * lynx-core.c (lynx_core_file_pid): New define. * osf-core.c (osf_core_core_file_pid): New define. * ptrace-core.c (ptrace_unix_core_file_pid): New define. * sco5-core.c (sco5_core_file_pid): New define. * xcoff-target.h (coff_core_file_pid): New define. * netbsd-core.c (netbsd_core_core_file_pid): New define. 2010-08-13 H.J. Lu PR ld/11913 * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if .got.plt section is discarded. * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise. d1117 3 a1119 1 2010-08-13 Nathan Sidwell d1121 1 a1121 2 * elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B variant. d1123 2 a1124 1 2010-08-12 H.J. Lu d1126 1 a1126 4 PR binutils/11909 * Makefile.am (coff-tic4x.lo): New. Disable -Werror. (coff-tic54x.lo): Likewise. * Makefile.in: Regenerated. d1128 3 a1130 1 2010-08-12 Todd Veldhuizen d1132 1 a1132 3 PR ld/11843 * elflink.c (compute_bucket_count): Avoid futile long searches for the best bucket size. d1134 2 a1135 1 2010-08-09 Richard Henderson d1137 1 a1137 4 PR ld/11891 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing to tlshi/lo until pos0 and pos1 are adjacent. Use the destination register from the tldgd insn. d1139 5 a1143 1 2010-08-09 Catherine Moore d1145 1 a1145 2 * elfxx-mips.c (mips_elf_perform_relocation): Improve interlinking error message. d1147 3 a1149 1 2010-08-06 Alan Modra d1151 1 a1151 3 * elf64-ppc.c (ha_reloc_match): Allow matches to other than r2. (ppc64_elf_relocate_section): Nop out high part insn of large toc code sequence when the high part of offset is zero. d1153 2 a1154 1 2010-08-04 Tristan Gingold d1156 1 a1156 3 * vms-alpha.c (alpha_vms_build_fixups): Write the EICP. (alpha_vms_bfd_final_link): Explicitly forbid relocatable links. Clear the SEC_RELOC flag. d1158 1 a1158 1 2010-08-04 Tristan Gingold d1160 1 a1160 6 * vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable sections with relocs. (alpha_vms_add_fixup_lp): Set SEC_RELOC flag. (alpha_vms_add_fixup_ca): Ditto. (alpha_vms_add_fixup_qr): Ditto. Add comments. d1162 4 a1165 1 2010-08-04 Tristan Gingold d1167 1 a1167 2 * vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make CODE sections writable. d1169 2 a1170 1 2010-08-04 Tristan Gingold d1172 2 a1173 5 * vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ... (alpha_vms_add_fixup_lr): ... this for consistency. (alpha_vms_add_qw_fixup): Removed. Fix some comments. (vms_get_symbol_info): Adjust type for unknown sections. d1175 15 a1189 1 2010-08-04 Tristan Gingold d1191 2 a1192 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute section for any absolute section. Remove some debugging code. d1194 38 a1231 1 2010-08-03 DJ Delorie d1233 1 a1233 1 * elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes. d1235 84 a1318 1 2010-08-03 Tristan Gingold d1320 2 a1321 2 * vms-misc.c (vms_convert_to_var): Make it static. (_bfd_vms_convert_to_var_unix_filename): Make it public. d1323 17 a1339 1 2010-08-03 Tristan Gingold d1341 1 a1341 1 * makefile.vms (OBJS): Update list. d1343 38 a1380 1 2010-08-03 Tristan Gingold d1382 1 a1382 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS nor SEC_RELOC for empty sections. d1384 2 a1385 1 2010-08-03 Tristan Gingold d1387 1 a1387 2 * vms-alpha.c (evax_section_flags): Fix flags for absolute section. Remove useless parenthesis. d1389 1 a1389 1 2010-08-03 Tristan Gingold d1391 1 a1391 2 * vms-lib.c (vms_lib_bread_raw): Change type of BUF argument. (vms_lib_bread, vms_lib_bopen): Adjust. d1393 2 a1394 1 2010-08-02 Alan Modra d1396 1 a1396 3 PR 11866 * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to calculate off_adjust rather than first section vma. d1398 2 a1399 1 2010-07-30 H.J. Lu d1401 1 a1401 1 * elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info. d1403 2 a1404 1 2010-07-30 Anthony Green d1406 1 a1406 1 * config.bfd (targ_cpu): Add moxie-*-rtems support. d1408 2 a1409 1 2010-07-29 Alan Modra d1411 1 a1411 2 * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in .toc section, even when none are used in relocs. d1413 2 a1414 1 2010-07-27 Maciej W. Rozycki d1416 1 a1416 9 * elfxx-mips.h: Include "elf/mips.h". (gprel16_reloc_p): New static inline function. * elfxx-mips.c (_bfd_mips_elf_check_relocs) [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]: Use got16_reloc_p. (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use gprel16_reloc_p. * elf32-mips.c (mips_info_to_howto_rel): Likewise. * elfn32-mips.c (mips_info_to_howto_rel): Likewise. d1418 2 a1419 1 2010-07-27 Maciej W. Rozycki d1421 1 a1421 12 * elf64-mips.c (mips_elf64_howto_table_rela) [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace. [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise. [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. * elfn32-mips.c (elf_mips_howto_table_rela) [R_MIPS_TLS_DTPMOD32]: Likewise. [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise. [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. d1423 1 a1423 23 2010-07-23 Naveen.H.S Ina Pandit * archures.c (DESCRIPTION): Define bfd_mach_v850e2 and bfd_mach_v850e2v3. * reloc.c (bfd_architecture): Define bfd_mach_v850e2 and bfd_mach_v850e2v3. (BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL, BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23, BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS, BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1, BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET, BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET, BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT, BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL, BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY, BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT, BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF, BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE, BFD_RELOC_V850_DATA): New relocations for V850 target. * config.bfd: Match all v850 targets. * cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3. * elf32-v850.c (v850_elf_check_relocs): Check the newly added d1425 26 a1450 174 (v850_elf_perform_relocation ): Update the newly added relocations. (v850_elf_howto_t): Update the specifications of added relocations. (v850_elf_reloc_map): Update the relocation mappings. (v850_elf_final_link_relocate): Maps added relocation into the appropriate howto structure. (v850_elf_object_p): Add support for V850E2 and V850E2V3. (v850_elf_final_write_processing): Likewise. (v850_elf_merge_private_bfd_data): Likewise. (v850_elf_print_private_bfd_data): Likewise. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2010-07-23 Alan Modra * archive.c (_bfd_archive_bsd44_construct_extended_name_table): Correct format specifier. 2010-07-22 Alan Modra * ecoff.c: Don't include aout/ranlib.h. (_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs. (_bfd_ecoff_write_armap): Output ar_date and ar_size using _bfd_ar_spacepad. 2010-07-22 Alan Modra * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with relocs. 2010-07-20 Alan Modra * elf.c (assign_file_positions_for_load_sections): Check that zero size sections are allocated in segments too. (assign_file_positions_for_non_load_sections): Warn if zero size alloc sections are found here. (copy_elf_program_header): Don't drop zero size sections from segment map. (copy_private_bfd_data): Check for changes in zero size sections. 2010-07-17 Alan Modra * elf.c (_bfd_elf_map_sections_to_segments): Force new segment for sections with overlapping LMAs. (assign_file_positions_for_load_sections): Catch overlap for sections that wrap around the address space. Replace a warning that duplicates ld's --check-sections error with a warning that lma has been adjusted for overlapping sections. 2010-07-14 Cary Coutant PR ld/11817 * dwarf2.c (read_section): Revert patch for compressed debug sections. (find_line): Likewise. (read_and_uncompress_section): Remove. 2010-07-13 H.J. Lu PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise. 2010-07-13 H.J. Lu PR ld/11791 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support garbage collection against STT_GNU_IFUNC symbols. * elf32-i386.c (elf_i386_get_local_sym_hash): Don't set elf.plt.offset/elf.got.offset to -1. (elf_i386_tls_transition): Skip TLS transition for functions. (elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols. * elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set elf.plt.offset/elf.got.offset to -1. (elf64_x86_64_tls_transition): Skip TLS transition for functions. (elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols. 2010-07-12 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Re-indent. (elf_i386_relocate_section): Likewise. 2010-07-06 H.J. Lu * dwarf2.c (add_line_info): Initialize prev_line. 2010-07-06 Alan Modra * elf32-ppc.c (ppc_elf_relax_section): Insert branch around trampolines only for .init and .fini sections. 2010-07-05 Alan Modra * elf32-ppc.c: Formatting. (ppc_elf_finish_dynamic_sections): Don't make plt_entry var static. 2010-07-03 Cary Coutant * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED. * dwarf2.c (read_and_uncompress_section): New function. (read_section): Call it. (find_line): Likewise. 2010-07-01 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather than SYMBOL_REFERENCES_LOCAL. (ppc64_elf_relocate_section): Likewise. 2010-07-01 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs. 2010-06-29 Alan Modra * cpu-maxq.c: Delete file. * coff-maxq.c: Delete file. * Makefile.am: Remove references to maxq. * archures.c: Likewise. * coffcode.h: Likewise. * configure.in: Likewise. * targets.c: Likewise. * config.bfd: Move maxq from obsolete to removed. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2010-06-28 Alan Modra * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED to silence gcc warning. 2010-06-27 Alan Modra * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data. (group_sections): Likewise. 2010-06-27 Alan Modra * bout.c (aligncode): Delete set but unused variables. * coff-mcore.c (coff_mcore_relocate_section): Likewise. * coff-ppc.c (ppc_record_toc_entry): Likewise. (coff_ppc_relocate_section): Likewise. * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise. * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise. * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relax_section): Likewise. * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise. (record_vfp11_erratum_veneer): Likewise. (bfd_elf32_arm_vfp11_erratum_scan): Likewise. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs, arm_map_one_stub): Likewise. * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise. (elf32_avr_relax_section): Likewise. (avr_mark_stub_not_to_be_necessary): Likewise. * elf32-bfin.c (_bfin_create_got_section): Likewise. * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise. (elf32_cr16_relax_delete_bytes): Likewise. * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise. * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise. * elf32-h8300.c (elf32_h8_relax_section): Likewise. (elf32_h8_relax_delete_bytes): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-i370.c (i370_elf_check_relocs): Likewise. (elf_relocate_section): Likewise. * elf32-ip2k.c (adjust_all_relocations): Likewise. (ip2k_elf_relax_section): Likewise. d1452 2 a1453 9 (lm32_elf_check_relocs): Likewise. (lm32_elf_finish_dynamic_sections): Likewise. (lm32_elf_finish_dynamic_symbol): Likewise. * elf32-m32c.c (m32c_offset_for_reloc): Likewise. (m32c_elf_relax_delete_bytes): Likewise. * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise. (m32r_elf_finish_dynamic_sections): Likewise. (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise. * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise. d1455 9 a1463 6 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. (microblaze_elf_check_relocs): Likewise. (microblaze_elf_finish_dynamic_symbol): Likewise. * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise. * elf32-ppc.c (ppc_elf_tls_optimize): Likewise. d1465 4 a1468 8 (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise. (elf32_rx_relax_section): Likewise. * elf32-score.c (score_elf_got_offset_from_index): Likewise. (score_elf_final_link_relocate): Likewise. (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (score_elf_got_offset_from_index): Likewise. (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. d1470 4 a1473 4 * elf32-v850.c (v850_elf_check_relocs): Likewise. (find_remembered_hi16s_reloc): Likewise. * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise. (elf_vax_relocate_section): Likewise. d1475 13 a1487 95 * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise. (move_literal): Likewise. * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise. (elf64_hppa_check_relocs): Likewise. (elf64_hppa_finish_dynamic_symbol): Likewise. (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise. * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise. (elfNN_vms_section_from_shdr): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. * hp300hpux.c (slurp_symbol_table): Likewise. * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise. * mach-o.c (bfd_mach_o_write_thread): Likewise. * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise. * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise. * pdp11.c (pdp11_aout_link_input_section): Likewise. (aout_link_input_section, aout_link_input_bfd): Likewise. * pe-mips.c (mips_swap_reloc_out): Likewise. (coff_pe_mips_relocate_section): Likewise. * som.c (som_bfd_ar_write_symbol_stuff): Likewise. * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise. * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise. * coff-i860.c (i860_reloc_processing): Avoid set but unused warning. * coffcode.h (coff_compute_section_file_positions): Likewise. (coff_slurp_reloc_table): Likewise. * cpu-arm.c (arm_check_note): Likewise. * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-sh64.c (_bfd_sh_align_load_span): Likewise. * ieee.c (parse_expression): Likewise. (ieee_slurp_external_symbols, drop_int): Likewise. * peXXigen.c (pe_print_pdata): Likewise. * versados.c (process_esd): Likewise. 2010-06-25 Tristan Gingold * vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with its flags. Create an absolute section if needed. 2010-06-25 Tristan Gingold * vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of sections. Mark .vmsdebug section as SEC_DEBUGGING. Do not create dummy psect anymore. Adjust. (_bfd_vms_write_eeom): Adjust (use target_index instead of index) (_bfd_vms_write_etir): Ditto. (start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of section name. Adjust. 2010-06-25 Tristan Gingold * vms-alpha.c (alpha_vms_write_exec): Set linktime field. 2010-06-25 Alan Modra * elf64-ppc.c (toc_skip_enum): Define. (ppc64_elf_edit_toc): Use two low bits of skip array as markers. Optimize largetoc sequences. (adjust_toc_syms): Update for skip array change. (ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT. 2010-06-25 Alan Modra * elf64-ppc.c (is_static_defined): New function. (get_tls_mask, ppc_type_of_stub): Use it here. (ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input. (ppc64_elf_tls_setup): Typo fix. (adjust_toc_syms): Correctly handle symbols defined past the end of the toc. Move syms on removed entries to next entry rather than to start of toc. (ppc64_elf_edit_toc): Likewise. Ensure we only attempt to edit ppc64 input. Allocate one extra word in skip array. Honour info->keep_memory when reading relocs if we can. Adjust toc relocs after adjusting symbols. 2010-06-23 Nathan Sidwell * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun when scaning map. 2010-06-17 Tristan Gingold * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ... (BFD64_BACKENDS_CFILES): ... here. (BFD32_BACKENDS): Move vms-alpha.lo to ... (BFD64_BACKENDS): ... here. * Makefile.in: Regenerate. d1489 1 a1489 1 2010-06-15 Joseph Myers d1491 3 a1493 128 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2. * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type, elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes, elf32_tic6x_merge_private_bfd_data): New. (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section, elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor): Define. * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare. 2010-06-15 Joseph Myers * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define. (struct elf_backend_data): Update comment on obj_attrs_order. * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents, _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE instead of hardcoded 4. * elf32-arm.c (elf32_arm_obj_attrs_order): Use LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1 instead of hardcoded 4 and 5. (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE instead of hardcoded 4. 2010-06-14 Kevin Buettner * elf32-h8300.c (elf_symbol_leading_char): Define. 2010-06-11 Jan Kratochvil * vms-alpha.c (_bfd_vms_write_egsd): Make sname const. 2010-06-11 Tristan Gingold * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute sections to 0. 2010-06-11 Tristan Gingold * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW. 2010-06-11 Tristan Gingold * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const. Adjust cast. (_bfd_vms_output_dump): Make DATA argument const, adjust cast. * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust. * vms-alpha.c (evax_section_flags): Make it const. (vms_secflag_by_name): Remove unused ABFD argument. Make SECTION_FLAGS and NAME arguments const. Clarify comment. (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const. (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name. (_bfd_vms_write_egsd): Remove useless cast. 2010-06-10 Tristan Gingold * config.bfd: Remove #if/#endif so that som can be compiled on any host. * targets.c (_bfd_target_vector): Remove #if/#endif so that som can be used on any host. 2010-06-10 Tristan Gingold * som.c: Can now be compiled on any host. Include bfd headers instead of system one. (som_compute_checksum): Parameter is now a pointer to a som_external_header structure. Adjust. (struct section_to_type): Field section is now const. (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional definition. (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto. (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto. (som_swap_clock_in, som_swap_clock_out): New functions. (som_swap_header_in, som_swap_header_out): Likewise. (som_swap_space_dictionary_in): Likewise. (som_swap_space_dictionary_out): Likewise. (som_swap_subspace_dictionary_in): Likewise. (som_swap_subspace_dictionary_record_out): Likewise. (som_swap_aux_id_in, som_swap_aux_id_out): Likewise. (som_swap_string_auxhdr_out): Likewise. (som_swap_compilation_unit_out): Likewise. (som_swap_exec_auxhdr_in): Likewise. (som_swap_exec_auxhdr_out): Likewise. (som_swap_lst_header_in): Likewise. (som_object_setup): Adjust parameter type using bfd types. (setup_sections): Likewise. Ditto for object file types. Use intermediate variables for external representation and use the swap functions to convert. (som_object_p): Ditto. Remove #ifdef/#endif on always defined macros. (som_prep_headers): Likewise. (som_write_symbol_strings): Likewise. (som_begin_writing): Likewise. (som_finish_writing): Likewise. (som_build_and_write_symbol_table): Likewise. (bfd_section_from_som_symbol): Likewise. (som_slurp_symbol_table): Likewise. (som_bfd_print_private_bfd_data): Likewise. (bfd_som_attach_aux_hdr): Likewise. Clear the padding. (bfd_som_attach_compilation_unit): Likewise. (som_bfd_count_ar_symbols): Likewise. (som_bfd_fill_in_ar_symbols): Likewise. (som_slurp_armap): Likewise. (som_bfd_ar_write_symbol_stuff): Likewise. (som_write_armap): Likewise. Use _bfd_ar_spacepad instead of sprintf to write header fields. * som.h: Include bfd headers instead of system one. (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed. (struct somdata): Use bfd structures instead of system ones. (struct som_section_data_struct): Likewise. (struct som_subspace_dictionary_record): Removed (now in include/som/internal.h) 2010-06-10 Tristan Gingold * targets.c (bfd_target_list): Remove hp/ux compiler work-around as bfd requires an ANSI-C compiler. 2010-06-09 Tristan Gingold * bfdio.c (bfd_bread): Fix the code to prevent reading past the end of archive members. 2010-06-08 Tristan Gingold * som.c (som_bfd_free_cached_info): Do not free relocations as they were allocated with bfd_zalloc. 2010-06-08 Tristan Gingold d1495 1 a1495 2 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment for the first block. d1497 22 a1518 1 2010-06-08 Tristan Gingold d1520 1 a1520 5 * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function. * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare. * libbfd.h: Regenerate. * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS. (bfd_elfNN_mkarchive): Ditto. d1522 100 a1621 1 2010-06-02 Tristan Gingold d1623 1 a1623 1 * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant. d1625 2 a1626 1 2010-06-01 Ralf Wildenhues d1628 1 a1628 1 * configure: Regenerate. d1630 4 a1633 1 2010-06-01 Tristan Gingold d1635 1 a1635 28 * vms-alpha.c (struct vms_private_data_struct): Add transfer_address field. Remove unused dst_info field. (alpha_vms_write_exec): Use transfer_address. (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE. (alpha_vms_bfd_final_link): Set transfer_address. 2010-05-31 Tristan Gingold * vms-lib.c (credat_lo, credat_hi): New fields. (vms_read_block): Adjust comments. (vms_write_block): New function. (_bfd_vms_lib_archive_p): Decode majorid once. Replace some hard-coded values with constants. Set credat_lo and credat_hi. (_bfd_vms_lib_mkarchive): Add argument kind. Set ver, mhd_size and type according to kind. (_bfd_vms_lib_alpha_mkarchive): New function. (struct lib_index): Renamed from struct vms_index (lib_index_cmp): Renamed from vms_index_cmp. Adjusted. (get_idxlen): Type of idx argument adjusted. Add is_elfidx argument and handle it. (vms_write_index): Adjust argument idx. Handle elf indexes. (_bfd_vms_lib_build_map): Adjust type of arguments modules and res. (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and use it. Handle elf indexes. Set credat. * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ... (_bfd_vms_lib_alpha_mkarchive): ... this. * libbfd.h: Regenerated. * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming. d1637 2 a1638 1 2010-05-28 Sterling Augustine d1640 1 a1640 60 * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount of code to change the bits in the instructions to match the changes in the relocations. Declare dest_addr and sym_sec to help. 2010-05-28 Jan Kratochvil Workaround GCC PR middle-end/4210. * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2] and val[3]. 2010-05-27 Tristan Gingold * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces. (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros. (vms_time_to_time_t): Use them instead of local const. (vms_time_t_to_vms_time): New function. (vms_get_time): Likewise. (vms_raw_get_time): Likewise. * vms.h (vms_time_t_to_vms_time): New declaration. (vms_get_time): Likewise. (vms_raw_get_time): Likewise. 2010-05-26 Tristan Gingold * vms-alpha.c: Update comments. (alpha_vms_write_exec): Set lnkflags. Write the GST. (alpha_vms_link_output_symbol): New function. (alpha_vms_bfd_final_link): Generate the VMS symbol table. Set dst_section private field. (alpha_vms_bfd_final_link): Remove code that set dst_section. 2010-05-26 Tristan Gingold * bfdio.c: Declare and define _bfd_memory_iovec. (bfd_bread): Move code for BFD_IN_MEMORY... (bfd_bwrite): ... Ditto ... (bfd_tell): ... Ditto ... (bfd_flush): ... Ditto ... (bfd_stat): ... Ditto ... (bfd_seek): ... Ditto ... (bfd_get_size): ... Ditto ... (bfd_mmap): ... Ditto ... (memory_bread): ... to these new functions. (memory_bwrite): Ditto. (memory_btell): Ditto. (memory_bseek): Ditto. (memory_bflush): Ditto. (memory_bstat): Ditto. (memory_bmmap): Ditto. (memory_bclose): New function. * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY. * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto. * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case. (bfd_make_writable): Use _bfd_memory_iovec. * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec. * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use _bfd_memory_iovec. (alpha_ecoff_openr_next_archived_file): Use proxy_origin instead of origin. * libbfd.h: Regenerate. d1642 2 a1643 100 2010-05-25 Daniel Jacobowitz Joseph Myers Andrew Stubbs * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs. * configure.in: Handle FDPIC vectors. * elf32-sh-relocs.h: Add FDPIC and movi20 relocations. * elf32-sh.c (DEFAULT_STACK_SIZE): Define. (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of SYMBOL_REFERENCES_LOCAL for function descriptors. (fdpic_object_p): New. (sh_reloc_map): Add FDPIC and movi20 relocations. (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid range. (struct elf_sh_plt_info): Add got20 and short_plt. Update all definitions. (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define. (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New. (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define. (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le) (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts): New. (get_plt_info): Handle FDPIC. (MAX_SHORT_PLT): Define. (get_plt_index, get_plt_offset): Handle short_plt. (union gotref): New. (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to got_type and adjust all uses. Add GOT_FUNCDESC. (struct sh_elf_obj_tdata): Add local_funcdesc. Rename local_got_tls_type to local_got_type. (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All users changed. (sh_elf_local_funcdesc): Define. (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p, and srofixup. (sh_elf_link_hash_newfunc): Initialize new fields. (sh_elf_link_hash_table_create): Set fdpic_p. (sh_elf_omit_section_dynsym): New. (create_got_section): Create .got.funcdesc, .rela.got.funcdesc and .rofixup. (allocate_dynrelocs): Allocate local function descriptors and space for R_SH_FUNCDESC-related relocations, and for rofixups. Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which require function descriptors. (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize. (sh_elf_modify_program_headers): New. (sh_elf_size_dynamic_sections): Allocate function descriptors for local symbols. Allocate .got.funcdesc contents. Allocate rofixups. Handle local GOT entries of type GOT_FUNCDESC. Create fixups for local GOT entries. Ensure that FDPIC libraries always have a PLTGOT entry in the .dynamic section. (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc) (sh_elf_add_rofixup, sh_elf_osec_to_segment) (sh_elf_osec_readonly_p, install_movi20_field): New functions. (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC, R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup read-only section warnings. Handle undefined weak symbols. Generate fixups for R_SH_DIR32 and GOT entries. Check for cross-segment relocations and clear EF_SH_PIC. Handle 20-bit relocations. Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE. (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC. Handle 20-bit relocations. (sh_elf_copy_indirect_symbol): Copy function descriptor reference counts. (sh_elf_check_relocs): Handle new relocations. Make symbols dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups for R_SH_DIR32. (sh_elf_copy_private_data): Copy PT_GNU_STACK size. (sh_elf_merge_private_data): Copy initial flags. Do not clobber non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches. (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt, FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC. Use install_movi20_field. Rename srel to srelgot. Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE. (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup. Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT. Rename sgot to sgotplt. Assert that the right number of rofixups and dynamic relocations were allocated. (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New. (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym. (elf_backend_can_make_relative_eh_frame) (elf_backend_can_make_lsda_relative_eh_frame) (elf_backend_encode_eh_address): Define. (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM) (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed): Redefine for FDPIC vector. * reloc.c: Add SH FDPIC and movi20 relocations. * targets.c (_bfd_target_vector): Add FDPIC vectors. * configure, bfd-in2.h, libbfd.h: Regenerated. 2010-05-25 Jay Krell PR ld/11624 * archive.c (_bfd_calloc_wrapper): New function. (_bfd_add_bfd_to_archive_cache): Use it. d1645 1 a1645 2 * configure.in: Add alpha*-*-*vms* to list of natives. * configure: Regenerate. d1647 2 a1648 6 * vms-misc.c: Define globalref if necessary. (vms_convert_to_var_unix_filename): Rename to _bfd_vms_convert_to_var_unix_filename and export. * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename. * vms-alpha.c (vms_close_and_cleanup): Update invocation of vms_convert_to_var_unix_filename. d1650 1 a1650 1 2010-05-24 Tristan Gingold d1652 6 a1657 2 * vms-alpha.c (add_symbol_entry): New function extrated from ... (add_symbol): ... adjusted. d1659 1 a1659 1 2010-05-24 Tristan Gingold d1661 2 a1662 4 * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation. (alpha_vms_write_exec): Add a comment. (_bfd_vms_write_egsd): Ditto. (alpha_vms_convert_symbol): Remove a blank line. d1664 1 a1664 1 2010-05-21 Tristan Gingold d1666 3 a1668 2 * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section for the GST. d1670 1 a1670 1 2010-05-21 Tristan Gingold d1672 11 a1682 3 * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and SEC_LOAD if isect has data. (vms_get_symbol_info): Refine the condition for 'T' type. d1684 1 a1684 1 2010-05-18 Tristan Gingold d1686 23 a1708 23 * vms-alpha.c (_bfd_vms_write_emh): New function. (_bfd_vms_write_lmn): New function. (_bfd_vms_write_eeom): Moved. (hash_string): Likewise. (_bfd_vms_length_hash_symbol): Likewise. (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh and _bfd_vms_write_lmn, and call these functions. 2010-05-18 Tristan Gingold * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L. Add details in the messages. (evax_bfd_print_image): Change message. 2010-05-18 H.J. Lu PR gas/11600 * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE (elf_fake_sections): Likewise. * elf32-i370.c (i370_elf_section_from_shdr): Don't handle SHF_EXCLUDE here. * elf32-ppc.c (ppc_elf_fake_sections): Likewise. d1710 1 a1710 1 2010-05-17 Tristan Gingold d1712 13 a1724 21 * vms-alpha.c: Include esgps.h and eidc.h. (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records. (evax_bfd_print_egsd_flags): New function, extracted from ... (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags. Handles EGSD__C_SPSC and EGSD__C_IDC. 2010-05-14 Tristan Gingold * vms-alpha.c (alpha_vms_object_p): Accept header size of 0. (_bfd_vms_get_object_record): Handle align byte only in the foreign case. 2010-05-14 Tristan Gingold * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function. * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype. * libbfd.h: Regenerate. * configure.in (havevecs): Define HAVE_all_vecs when --enable-targets=all is set. Use AC_SUBST on it. (tdefaults): Do not add havevecs. (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo a1725 2 * Makefile.am (HAVEVECS): New variable. (INCLUDES): Add HAVEVECS. a1726 30 * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms target is selected. Add #ifdef/#endif around vms specific code. (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap, bfd_elfNN_archive_slurp_extended_name_table, bfd_elfNN_archive_construct_extended_name_table, bfd_elfNN_archive_truncate_arname, bfd_elfNN_archive_write_armap, bfd_elfNN_archive_read_ar_hdr, bfd_elfNN_archive_write_ar_hdr, bfd_elfNN_archive_openr_next_archived_file, bfd_elfNN_archive_get_elt_at_index, bfd_elfNN_archive_generic_stat_arch_elt, bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives. 2010-05-11 Jie Zhang * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge Tag_ABI_HardFP_use correctly. 2010-05-11 Alan Modra * coffcode.h (coff_write_object_contents): Enclose all occurrences of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE. 2010-05-07 Daniel Jacobowitz * elf32-arm.c (struct a8_erratum_reloc): Add hash member. Move sym_name to improve packing. (cortex_a8_erratum_scan): Check for PLT entries. (elf32_arm_size_stubs): Save the target symbol for a8 relocs. d1728 1 a1728 1 2010-05-07 Tristan Gingold d1730 33 a1762 90 * Makefile.in: Regenerate with automake 1.11.1. * aclocal.m4: Ditto. 2010-05-05 Nick Clifton * po/es.po: Updated Spanish translation. 2010-05-03 Tristan Gingold * vms-lib.c (vms_lib_bopen): Fix the size threshold to read selective_search flag. Add comments. * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section before output_has_begun is set. 2010-05-03 Tristan Gingold * vms-alpha.c: Add comments. (struct vms_private_data_struct): Remove image_autoextend field. (dst_check_allocation): Removed. (image_write): Remove call to dst_check_allocation. (vms_slurp_debug): Do not set image_autoextend. Adjust section size. (_bfd_vms_slurp_object_records): Remove useless new_type variable. (alpha_vms_write_exec): Use dst_section to get the dst section. Write the dmt section. (evax_bfd_print_image): Also print the dst size in hexa. Fix typo. (alpha_vms_read_sections_content): Do not set image_autoextend. (alpha_vms_bfd_final_link): Generate the dst. 2010-05-03 Tristan Gingold * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty next array. (vms_lib_dcx): Adjust for the above change. 2010-04-30 H.J. Lu PR ld/11542 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New. * elf32-i386.c (elf_i386_relocate_section): Use it. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. 2010-04-30 Tristan Gingold * vms-lib.c (vms_read_block): New function. (vms_traverse_index): Use vms_read_block. Handle long key names. 2010-04-30 Tristan Gingold * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms and syms removed. (struct carsym_mem): New structure. (vms_add_index): New function. (vms_add_indexes_from_list): New function. (vms_traverse_index): Parameter carsym changed to carsym_mem. Code adjusted to handle elfidx. (vms_lib_read_index): Adjusted for vms_traverse_index changes. Parameter NBREL is now a pointer. (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64 archives. (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata. (_bfd_vms_lib_find_symbol): Ditto. (vms_lib_bopen): Fix two typos: return FALSE in case of error, check MHD id. (_bfd_vms_lib_get_module): New function. (_bfd_vms_lib_get_elt_at_index): Rewritten using the above function. (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module. (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives. (vms_write_index): Adjust for structure renamed. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for changes of _bfd_vms_lib_find_symbol. 2010-04-28 Kai Tietz * config.bfd: Correct accidential reverted patch about vax*-*-*vms*. 2010-04-27 Kai Tietz * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent to USE_MINGW64_LEADING_UNDERSCORES. * pei-x86_64.c (TARGET_UNDERSCORE): Likewise. * config.bfd: Change underscoring default for x64 mingw to false. * coffcode.h (coff_write_relocs): Add check that dereferenced sym_ptr_ptr isn't NULL. * config.in (USE_MINGW64_LEADING_UNDERSCORES): New. a1763 4 * configure.in: Add option '--enable-leading-mingw64-underscores' and define config.in variable USE_MINGW64_LEADING_UNDERSCORES. 2010-04-27 Nick Clifton d1765 1 a1765 3 PR binutils/11512 * coffgen.c (coff_find_nearest_line): Incldue the section address of function name symbols in address comparisons. d1767 2 a1768 1 2010-04-27 Nick Clifton d1770 1 a1770 1 * po/fr.po: Updated French translation. d1772 3 a1774 1 2010-04-23 Alan Modra d1776 1 a1776 7 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT throughout file. (assign_file_positions_for_load_sections): Modify section in segment warning to ignore overlay vmas. * elf32-spu.c (spu_elf_object_p): Replace use of ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT. d1778 4 a1781 1 2010-04-22 Nick Clifton d1783 1 a1783 2 * po/bfd.pot: Updated by the Translation project. * po/vi.po: Updated Vietnamese translation. d1785 10 a1794 1 2010-04-22 Alan Modra d1796 1 a1796 2 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29 change. Tidy. Don't error on sections not allocated in segment. d1798 3 a1800 1 2010-04-15 Andrew Haley d1802 1 a1802 5 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag: merge_exidx_entries. * bfd-in2.h: Likewise. * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to control merging of exidx entries. d1804 2 a1805 1 2010-04-20 Joseph Myers d1807 1 a1807 10 * elf32-tic6x.h: New. * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA. * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata, elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel, elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject, elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p, bfd_elf32_mkobject, bfd_elf32_new_section_hook): New. (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup, elf32_tic6x_relocate_section): Handle REL relocations. (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel. d1809 2 a1810 1 2010-04-20 Jakub Jelinek d1812 1 a1812 2 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name. d1814 2 a1815 1 2010-04-19 Nick Clifton d1817 1 a1817 5 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused arhdrpos variable. * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused attribute to warned variable. Remove unused val, type and type2 variables. d1819 31 a1849 124 2010-04-16 Andreas Schwab * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking strict-aliasing rules. 2010-04-16 Tristan Gingold * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo. (_bfd_vms_get_object_record): Always assume there is a pad byte for alignment. * vms-lib.c: Add a few comments. 2010-04-15 Matthew Gretton-Dann * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to attributes in v2.08 of the ABI. 2010-04-15 Alan Modra * config.bfd (vax*-*-*vms*): Delete. 2010-04-14 Tristan Gingold * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo, vms-tir.lo, vms.lo and add vms-alpha.lo (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c, vms-tir.c, vms.c and add vms-alpha.c * Makefile.in: Regenerate. * configure.in (TDEFINES): Adjust file list for vms_alpha_vec. Remove vms_vax_vec. * configure: Regenerate. * targets.c (vms_vax_vec): Remove the declaration. (_bfd_target_vector): Remove vms_vax_vec. * vms-alpha.c: New file. * vms-gsd.c: Removed, rewritten in vms-alpha.c * vms-hdr.c: Ditto. * vms-tir.c: Ditto. * vms.c: Ditto. * vms-misc.c: Fix indentation and comments. Replace most of #if VMS_DEBUG/vms_debug with vms_debug2. (_bfd_vms_hash_newfunc): Moved to vms-alpha.c (hash_string): Ditto. (_bfd_vms_length_hash_symbol): Ditto. (maybe_adjust_record_pointer_for_object): Ditto. (_bfd_vms_get_object_record): Ditto. (vms_get_remaining_object_record): Ditto. (_bfd_vms_push): Ditto. (_bfd_vms_pop): Ditto. (_bfd_vms_get_header_values): Removed. (_bfd_vms_get_first_record): Removed. (vms_get_remaining_image_record): Removed. (new_symbol): Removed. (_bfd_vms_enter_symbol): Removed. (_bfd_vms_save_sized_string): Use memcpy instead of strncpy. (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd parameter with struct vms_rec_wr. (_bfd_vms_output_push): Removed and replaced by ... (_bfd_vms_output_begin_subrec): ... new function. (_bfd_vms_output_alignment): Replace bfd parameter with struct vms_rec_wr, and adjust. (_bfd_vms_output_check): Ditto (_bfd_vms_output_byte): Ditto. (_bfd_vms_output_short): Ditto. (_bfd_vms_output_long): Ditto. (_bfd_vms_output_quad): Ditto. (_bfd_vms_output_counted): Ditto. (_bfd_vms_output_dump): Ditto. (_bfd_vms_output_fill): Ditto. (_bfd_vms_output_pop): Removed and replaced by ... (_bfd_vms_output_end_subrec): ... new function. (_bfd_vms_output_flush): Removed. (_bfd_vms_output_align): New function. (_bfd_vms_output_end): Add recwr parameter. Adjust for this new parameter. (vms_convert_to_var): New function imported from vms.c (vms_convert_to_var_1): Ditto. (vms_convert_to_var_unix_filename): Ditto. (vms_get_module_name): Ditto. (get_vms_time_string): Ditto. (vms_time_to_time_t): Ditto. (vms_rawtime_to_time_t): Ditto. * vms.h: All macros for the VMS file format are now in include/vms. Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c have been removed. (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c (struct fileinfo, struct srecinfo, struct lineinfo): Ditto. (struct funcinfo, struct vms_private_data_struct): Ditto. (struct vms_section_data_struct): Ditto. (struct vms_rec_rd, stryct vms_rec_wr): New declarations. (vms_get_module_name, get_vms_time_string): New declarations. (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto. (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto. (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted. (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto. (_bfd_vms_output_end,_bfd_vms_output_check): Ditto. (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto. (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto. (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto. (_bfd_vms_output_fill): Ditto. (bfd_vms_set_section_flags): Ditto. 2010-04-14 Matthew Gretton-Dann * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early exit due to merging the same weak symbol to test that the symbols are actually weak. 2010-04-13 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location when optimizing high got_tlsgd/ld insns. 2010-04-10 H.J. Lu * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before define. (HAVE_PRSTATUS32_T): Likewise. 2010-04-10 H.J. Lu PR corefiles/11467 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h for x86_64-*-linux*. a1850 1 * configure: Likewise. d1852 1 a1852 1 * elf.c: Include CORE_HEADER if it is defined. d1854 17 a1870 22 2010-04-10 H.J. Lu Jan Kratochvil * hosts/x86-64linux.h: New. 2010-04-09 Nick Clifton * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count. * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused variables htab and hdr_info and mark info parameter as unused. * elf.c (prep_headers): Remove unused variable i_phdrp. (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp. * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned as unused. * peXXigen.c (pe_print_reloc): Remove unused variable datasize. * verilog.c (verilog_write_section): Remove unused variable address. 2010-04-07 Alan Modra * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above. * configure: Regenerate. d1872 1 a1872 1 2010-04-06 H.J. Lu d1874 52 a1925 2 PR ld/11434 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally. d1927 1 a1927 1 2010-04-06 Tristan Gingold d1929 1 a1929 44 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags. 2010-04-05 Jakub Jelinek * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4 provided that it has the expected address size and zero segment length. * dwarf2.c (struct line_head): Add maximum_ops_per_insn field. (struct line_info): Add op_index field, change end_sequence type to unsigned char. (new_line_sorts_after): For the same address compare op_index. (add_line_info): Add op_index argument, store it into the structure. (decode_line_info): Complain about unknown versions of .debug_line. Initialize maximum_ops_per_insn. Add op_index state register and track it. 2010-04-01 Nathan Sidwell * elf32-ppc.c (apuinfo_set): New static var. (ppc_elf_begin_write_processing): Set it here, always create an APUinfo section if there were any in the inputs. (ppc_elf_write_section): Check apuinfo_set. (ppc_elf_final_write_processing): Likewise. 2010-04-01 Tristan Gingold * vms.h: Include time.h. Add prototypes for vms_get_module_name, vms_time_to_time_t and vms_rawtime_to_time_t. * vms.c (vms_alpha_vec): Add archives support. * vms-misc.c: Include safe-ctype.h (vms_get_module_name): New function. (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto. * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the vms_get_module_name function. Use this function. * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector. * libbfd-in.h: Add prototype for _bfd_append_relative_path. Add prototypes for vms-lib.c * libbfd.h: Regenerate. * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add vms-lib.lo to vms_alpha_vec. * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*. * configure: Regenerate. * bfd.c: Add selective_search field. d1931 2 a1932 6 * archive.c (append_relative_path): Rename to _bfd_append_relative_path and make it public. (_bfd_get_elt_at_filepos): Adjust for above renaming. * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo (BFD32_BACKENDS_CFILES): Add vms-lib.c * Makefile.in: Regenerate. d1934 1 a1934 1 2010-04-01 Jakub Jelinek d1936 3 a1938 6 * dwarf2.c (read_attribute_value): Handle CU version 4 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc and DW_FORM_flag_present. For unknown form value return NULL. (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc like DW_FORM_block. (parse_comp_unit): Allow CU version 4. d1940 2 a1941 1 2010-04-01 Hans-Peter Nilsson d1943 1 a1943 3 * elf32-cris.c (cris_elf_relocate_section): Correct first argument to _bfd_elf_get_dynamic_reloc_section. (elf_cris_discard_excess_dso_dynamics): Ditto. d1945 3 a1947 1 2010-03-31 Kai Tietz d1949 1 a1949 2 * coff-i386.c (in_reloc_p): Check also for R_SECREL32. * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL. d1951 32 a1982 1 2010-03-31 Alan Modra d1984 1 a1984 2 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized TPREL16_HI and TPREL16_HA insns. d1986 2 a1987 1 2010-03-31 Hans-Peter Nilsson d1989 1 a1989 12 PR ld/11458 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid assert of empty pcrel_relocs_copied on the direct symbol. Instead of moving the list from the indirect symbol to the direct symbol, merge into any existing list. (cris_elf_check_relocs): Store the original section in the pcrel_relocs_copied list, not the relocation section. (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find the relocation section, for reducing its size. Change the BFD_ASSERT into a check for the section being read-only, and only emit warnings and TEXTREL marker when there's an entry for a read-only section. d1991 135 a2125 9 2010-03-29 Daniel Jacobowitz * elf32-arm.c (using_thumb_only): Handle v6-M. 2010-03-26 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw ): Not pc-relative. * bfd-in.h (elf_discarded_section): Clarify comment. * reloc.c (struct reloc_howto_struct ): Likewise. d2128 1 a2128 1 2010-03-26 Matt Rice d2130 9 a2138 21 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged as unique in the armap. 2010-03-26 Alan Modra PR ld/11375 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a possible stub on branches. 2010-03-25 Joseph Myers * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo. (ALL_MACHINES_CFILES): Add cpu-tic6x.c. (BFD32_BACKENDS): Add elf32-tic6x.lo. (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c. * Makefile.in: Regenerate. * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New. (bfd_archures_list): Update. * config.bfd (tic6x-*-elf): New. * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. d2140 16 a2155 80 * cpu-tic6x.c, elf32-tic6x.c: New. * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12, BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7, BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16, BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B, BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W, BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B, BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W, BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H, BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W, BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W, BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31, BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN, BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New. * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. (_bfd_target_vector): Update. * bfd-in2.h, libbfd.h: Regenerate. 2010-03-24 H.J. Lu * aout-target.h: Update copyright year. * aout-tic30.c: Likewise. * coff-alpha.c: Likewise. * coff-rs6000.c: Likewise. * coff64-rs6000.c: Likewise. * elf64-mips.c: Likewise. * ieee.c: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * oasys.c: Likewise. * targets.c: Likewise. 2010-03-24 H.J. Lu * libbfd-in.h: Update copyright year. 2010-03-21 H.J. Lu PR ld/11413 * elflink.c (_bfd_elf_add_default_symbol): Check !executable instead of shared. 2010-03-19 Jie Zhang * elf32-arm.c (struct section_list): Remove. (section_list): Remove typedef. (record_section_with_arm_elf_section_data): Remove. (find_arm_elf_section_entry): Remove. (get_arm_elf_section_data): Use is_arm_elf. (unrecord_section_with_arm_elf_section_data): Remove. (elf32_arm_new_section_hook): Don't call record_section_with_arm_elf_section_data. (elf32_arm_write_section): Set mapcount to -1 when the map has been used. Don't call unrecord_section_with_arm_elf_section_data. (unrecord_section_via_map_over_sections): Remove. (elf32_arm_close_and_cleanup): Remove. (elf32_arm_bfd_free_cached_info): Remove. (bfd_elf32_close_and_cleanup): Don't define. (bfd_elf32_bfd_free_cached_info): Don't define. 2010-03-18 H.J. Lu PR binutils/11396 * libcoff-in.h (pe_tdata): Add dont_strip_reloc. * libcoff.h: Regenerated. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG if dont_strip_reloc is set. (_bfd_XX_bfd_copy_private_bfd_data_common): Set dont_strip_reloc on output if there is no .reloc and IMAGE_FILE_RELOCS_STRIPPED isn't set in input. 2010-03-18 Wei Guozhi PR gas/11323 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to R_ARM_GOT_PREL. * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation. d2157 2 a2158 1 * libbfd.h: Regenerate. d2160 1 a2160 1 2010-03-17 H.J. Lu d2162 4 a2165 2 * reloc.c (BFD_RELOC_SPU_PIC18): Removed. (BFD_RELOC_SPU_STUB): Likewise. d2167 1 a2167 1 2010-03-17 Jie Zhang d2169 7 a2175 2 * elf.c (assign_file_positions_for_load_sections): Avoid overflow. d2177 1 a2177 1 2010-03-17 Alan Modra d2179 4 a2182 3 PR binutils/11382 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using proper type. d2184 1 a2184 1 2010-03-17 Alan Modra d2186 6 a2191 1 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix. d2193 1 a2193 1 2010-03-16 Alan Modra d2195 2 a2196 4 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt. (ppc64_elf_edit_toc): Set it here. (ha_reloc_match): New function. (ppc64_elf_relocate_section): Optimize bigtoc insn sequences. d2198 1 a2198 1 2010-03-15 Alan Modra d2200 2 a2201 2 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function. * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare. d2203 1 a2203 1 2010-03-14 Alan Modra d2205 3 a2207 11 PR ld/11378 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare. * elf64-ppc.c (call_check_done): Define. (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro. (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise. (ppc64_elf_finish_multitoc_partition): Remove unnecessary check. (toc_adjusting_stub_needed): Use call_check_done rather than toc_off. Simplify return logic. Iterate over all .init and .fini fragments by recursion. Set makes_toc_func_call here.. (ppc64_elf_next_input_section): ..rather than here. (check_pasted_section, ppc64_elf_check_init_fini): New functions. d2209 1 a2209 1 2010-03-13 Alan Modra d2211 4 a2214 4 PR ld/11375 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the function descriptor symbol if there is one, not just for plt stubs. (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls. d2216 2 a2217 1 2010-03-05 Rainer Orth d2219 2 a2220 3 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base version twice. Skip it when constructing def.vd_next. d2222 1 a2222 5 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to bfd_elf32_i386_sol2_vec. (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2. (elf32_bed): Redefine to elf32_i386_sol2_bed. (elf_backend_want_plt_sym): Redefine to 1. d2224 2 a2225 5 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to bfd_elf64_x86_64_sol2_vec. (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2. (elf64_bed): Redefine to elf64_x86_64_sol2_bed. (elf_backend_want_plt_sym): Redefine to 1. d2227 1 a2227 7 * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec. Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in targ64_selvecs. (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec. Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in targ_selvecs. d2229 6 a2234 3 * configure.in: Handle bfd_elf32_i386_sol2_vec, bfd_elf64_x86_64_sol2_vec. * configure: Regenerate. d2236 1 a2236 4 * targets.c (bfd_elf32_i386_sol2_vec): Declare. (bfd_elf64_x86_64_sol2_vec): Declare. (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec, bfd_elf64_x86_64_sol2_vec. d2238 2 a2239 1 2010-03-04 Daniel Jacobowitz d2241 1 a2241 2 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program sections. d2243 8 a2250 1 2010-03-04 Alan Modra d2252 4 a2255 46 PR 11302 * dwarf2.c (read_abbrevs): Return NULL on alloc failures. (read_attribute_value, decode_line_info): Likewise. (add_line_info, read_rangelist): Return FALSE on alloc failures. (arange_add, sort_line_sequences): Likewise. (find_abstract_instance_name): Handle failures from called funcs. (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise. (find_line): Realloc to a temp, and handle alloc fail. 2010-03-03 Daniel Jacobowitz * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add a mapping symbol to an empty section. 2010-03-02 Matthew Gretton-Dann * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the return value from the call to _bfd_elf_merge_object_attributes. 2010-03-02 Christophe Lyon Alan Modra * elf32-arm.c (a8_erratum_fix): Add st_type field to record the destination mode of the a8 stub. (elf32_arm_link_hash_table): Add top_id field. (elf32_arm_link_hash_table_create): Initialize top_id. (arm_type_of_stub): Update prototype, st_type can now be updated by this function. Actual destination address in case of PLT is computed here, to help factorizing code. (elf32_arm_stub_name): Update prototype, use stub_type additional parameter to build stub name. (elf32_arm_get_stub_entry): Update prototype, use stub_type additional parameter to build stub entry. (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of put_thumb_insn/put_arm_insn as BE8 encoding is now handled later. Call elf32_arm_final_link_relocate to process all in-stub relocations. (elf32_arm_setup_section_lists): Update top_id. (cortex_a8_erratum_scan): Record stub destination mode. (elf32_arm_size_stubs): Update call to arm_type_of_stub according to new prototype. (elf32_arm_final_link_relocate): Enable processing of in-stub REL32 relocations. Rely on arm_type_of_stub to detect if a stub is needed, enabling code factorization. (elf32_arm_final_link): Process stub sections. (elf32_arm_output_map_sym): Add entry to code/data map. d2257 1 a2257 1 2010-03-01 David S. Miller d2259 3 a2261 4 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and h->def_regular, set h->ref_regular. (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries and dynamic relocations if h->ref_regular. d2263 1 a2263 4 * elfxx-sparc.c (struct elf_reloc_map): Delete. (sparc_reloc_map): Delete. (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each relocation type in switch statements. d2265 6 a2270 1 2010-02-25 Alan Modra d2272 1 a2272 4 PR ld/11304 * elf.c (_bfd_elf_init_private_section_data): Rename need_group to final_link and invert. For final link allow some flags to differ. Don't specially allow flags to be all zero. d2274 3 a2276 1 2010-02-24 Alan Modra d2278 1 a2278 4 PR binutils/10858 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol table. d2280 1 a2280 1 2010-02-23 Andrew Zabolotny d2282 1 a2282 3 PR binutils/11297 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8. (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8. d2284 2 a2285 1 2010-02-22 Alan Modra d2287 1 a2287 4 * reloc.c (bfd_check_overflow): When forming addrmask, shift fieldmask left by rightshift. (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all overflow checks. d2289 1 a2289 1 2010-02-20 H.J. Lu d2291 1 a2291 2 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check STT_GNU_IFUNC on large common symbol. d2293 4 a2296 1 2010-02-18 H.J. Lu d2298 2 a2299 7 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set has_ifunc_symbols if the symbol comes from a shared library. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise. d2301 77 a2377 1 2010-02-19 Alan Modra d2379 2 a2380 6 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from.. (_bfd_elf_copy_private_header_data): ..here. * elflink.c (_bfd_elf_size_group_sections): New function. (bfd_elf_size_dynamic_sections): Call it. * elf-bfd.h (_bfd_elf_size_group_sections): Declare. (_bfd_elf_fixup_group_sections): Declare. d2382 2 a2383 1 2010-02-18 Matthew Gretton-Dann d2385 1 a2385 194 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for merging Tag_DIV_use, Tag_MPextension_use, and Tag_MPextension_use_legacy tags. 2010-02-18 Alan Modra * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15 commit. Don't write zeros for removed group members. (_bfd_elf_copy_private_header_data): Adjust size of group section when group members are removed by objcopy. 2010-02-15 Dave Korn PR binutils/11280 * configure.host (*-*-solaris2.11): Add host define to select valid default code page for windres/windmc on solaris. 2010-02-15 Nick Clifton * po/vi.po: Updated Vietnamese translation. 2010-02-12 Daniel Gutson * elf32-arm.c (elf32_arm_output_arch_local_syms): add missing mapping symbol to data only sections. 2010-02-11 David S. Miller * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global symbols. (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for these relocs on global symbols. (gdopoff): New. (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on local symbol references which are not STT_GNU_IFUNC. Handle relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively, and deal with negative vs. non-negative values properly. 2010-02-09 Tristan Gingold * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for non-external relocation. 2010-02-09 Alan Modra * elf64-ppc.c (merge_got_entries): Move earlier in file. (allocate_dynrelocs): Merge got entries here if not doing multi-toc. (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got. (ppc64_elf_layout_multitoc): Don't resize if we have already merged got entries. 2010-02-09 Michael Holzheu * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp, elfcore_write_s390_todpreg, elfcore_write_s390_ctrs, elfcore_write_s390_prefix): New. * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp, elfcore_write_s390_todpreg, elfcore_write_s390_ctrs, elfcore_write_s390_prefix): New. (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX. (elfcore_write_register_note): Handle .reg-s390-timer, .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs, .reg-s390-prefix section. 2010-02-09 Alan Modra * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect unsigned char. Update variables and code using them throughout file. (struct ppc_link_hash_entry): Likewise for tls_mask. * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents. * elf64-ppc.c (has_small_toc_reloc): Don't define. (makes_toc_func_call, call_check_in_progress): Shuffle flags. (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update code setting the flag. (ppc64_elf_next_toc_section): Group big-toc sections in 0x80008000 chunks. 2010-02-08 David S. Miller * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot, srelgot, splt, srelplt, and sgotplt members in favor of generic copies. * elfxx-sparc.c (create_got_section): Delete. (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic section creator does that work for us. Use ->elf.foo instead of ->foo where applicable. (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo where applicable. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. (sparc_vxworks_build_plt_entry): Likewise. (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. (sparc_finish_dyn): Likewise. (sparc_vxworks_finish_exec_plt): Likewise. (sparc_vxworks_finish_shared_plt): Likewise. (_bfd_sparc_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_* macros for visibilty and locality checks. (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. (_bfd_sparc_elf_finish_dynamic_symbol):Likewise. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set but never used local var 'dynobj'. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle nocopyreloc. * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New. (BFD_RELOC_SPARC_IRELATIVE): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table and loc_hash_memory. (_bfd_sparc_elf_link_hash_table_free): Declare. * elf32-sparc.c (elf32_sparc_add_symbol_hook): New. (elf_backend_add_symbol_hook, elf_backend_post_process_headers, bfd_elf32_bfd_link_hash_table_free): Define. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set has_ifunc_symbols if STT_GNU_IFUNC. (bfd_elf64_bfd_link_hash_table_free): Define. (elf_backend_post_process_headers): Define always. * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New. (sparc_reloc_map): Add entries for new IFUNC relocs. (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs. (_bfd_sparc_elf_info_to_howto_ptr): Likewise. (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq, elf_sparc_get_local_sym_hash): New. (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization from here... (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate local hash table. (_bfd_sparc_elf_link_hash_table_free): New. (create_ifunc_sections): New. (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols cons up a fake local hash table entry for it. Unconditionally add a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count dyn relocs for ifunc. (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc. (allocate_dynrelocs): Unconditionally emit a PLT entry when STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc. (allocate_local_dynrelocs): New function. (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table. Emit dynamic relocs to irelplt when not shared. Treat iplt like splt. (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand. (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt in iplt/irelplt. 2010-02-08 Richard Sandiford * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating max_contents_size, only consider sections whose contents must be swapped in. 2010-02-09 Alan Modra * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here.. (ppc64_elf_size_dynamic_sections): ..and here.. (merge_got_entries): ..rather than here. 2010-02-09 Alan Modra * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc. (has_small_toc_reloc): Define. (ppc64_elf_check_relocs): Set the above flags. (ppc64_elf_edit_opd): Delete obfd param. (ppc64_elf_tls_optimize): Likewise. (ppc64_elf_edit_toc): Likewise. (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param. * elf64-ppc.h: Update prototypes. 2010-02-08 Alan Modra * section.c (struct bfd_section): Delete has_tls_reloc, has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done. Add sec_flg0 thru sec_flg5. (BFD_FAKE_SECTION): Update for changed flags. * ecoff.c (bfd_debug_section): Likewise. * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define. * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define. (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update. * elf32-xtensa.c (reloc_done): Define. * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update. * bfd-in2.h: Regenerate. d2387 1 a2387 1 2010-02-08 Tristan Gingold d2389 2 a2390 2 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern for non-scattered relocations. d2392 1 a2392 1 2010-02-08 Nathan Sidwell d2394 33 a2426 183 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty apuinfo sections, only scan input sections once and reuse the buffer. 2010-02-08 Philipp Tomsich * archures.c (bfd_mach_ppc_titan): Define. * bfd-in2.h: Regenerate. * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry. 2010-02-08 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code. 2010-02-05 Sterling Augustine * elf.c (assign_file_positions_for_load_sections) Update lma of section if necessary. Fixes Bugzilla 11219. 2010-02-05 H.J. Lu * elf32-i386.c: Remove trailing white spaces. * elf64-x86-64.c: Likewise. 2010-02-03 Nick Clifton * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. 2010-02-03 Alan Modra * elf64-ppc.c (struct plt_entry): Move earlier in file. (struct got_entry): Likewise. Add is_indirect and got.ent fields. (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry. Update all uses. (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass. Remove no_multi_toc. (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect when allocating a new struct got_entry. (allocate_got): New function, extracted from.. (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd. (ppc64_elf_size_dynamic_sections): Track got relocs allocated in .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries. (ppc64_elf_setup_section_lists): Remove output_bfd param and no_multi_toc, add add_stub_section and layout_sections_again. Stash new params in htab. Extract some code to.. (ppc64_elf_start_multitoc_partition): ..here. New function. (ppc64_elf_next_toc_section): Check for linker script errors. Handle second pass toc scan. (merge_got_entries, merge_global_got, reallocate_got): New functions. (ppc64_elf_reinit_toc): Rename to.. (ppc64_elf_finish_multitoc_partition): ..this. (ppc64_elf_layout_multitoc): New function. (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and layout_sections_again params. (ppc64_elf_relocate_section): Handle indirect got entries. * elf64-ppc.h: Update prototypes. Declare new functions. 2010-02-02 H.J. Lu * elf-bfd.h (elfcore_write_xstatereg): New. * elf.c (elfcore_grok_xstatereg): New. (elfcore_write_xstatereg): Likewise. (elfcore_grok_note): Handle NT_X86_XSTATE. (elfcore_write_register_note): Handle .reg-xstate section. 2010-02-01 Tristan Gingold * som.c (som_write_ar_hdr): Define this macro. 2010-01-30 John David Anglin * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the linkage table pointer to use the global table pointer if not doing a shared link. 2010-01-29 Joel Brobecker * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal if it has already been set. 2010-01-27 Tristan Gingold * vms.h: Remove trailing spaces. (struct hdr_struct): Remove unused hdr_c_cpr field. (enum file_format_enum): Add comments. * vms.c (vms_bfd_print_private_bfd_data): New function that replaces the macro. Remove trailing spaces. * vms-misc.c: Improve comments. (_bfd_vms_get_object_record): Also handle files without pads. * vms-hdr.c (_bfd_vms_write_dbg): Fix format string. * vms-gsd.c (struct flagdescstruct): Make name field const. (gsyflagdesc): Fix typo. 2010-01-27 Alan Modra PR ld/11217 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec. (ppc64_elf_setup_section_lists): Init them. (ppc64_elf_next_toc_section): Don't partition multi-toc between .got and .toc on the same input file. (ppc64_elf_relocate_section): Correct GOT entry offset. 2010-01-26 Tristan Gingold * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr. (bfd_target): Add _bfd_write_ar_hdr_fn field. * archive.c (is_bsd44_extended_name): New macro. (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size. (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended name. (_bfd_archive_bsd44_construct_extended_name_table): New function. (_bfd_generic_write_ar_hdr): Ditto. (_bfd_bsd44_write_ar_hdr): Ditto. (_bfd_write_archive_contents): Call _bfd_write_ar_hdr. (bsd_write_armap): Adjust firstreal computation. * libbfd-in.h (struct areltdata): Add extra_size field. (_bfd_generic_write_ar_hdr): Add prototype. (_bfd_bsd44_write_ar_hdr): Ditto. (_bfd_write_ar_hdr): Define. (_bfd_noarchive_write_ar_hdr): Ditto. (_bfd_archive_bsd_write_ar_hdr): Ditto. (_bfd_archive_coff_write_ar_hdr): Ditto. (_bfd_archive_bsd44_slurp_armap): Ditto. (_bfd_archive_bsd44_slurp_extended_name_table): Ditto. (_bfd_archive_bsd44_construct_extended_name_table): New prototype. (_bfd_archive_bsd44_truncate_arname): Ditto. (_bfd_archive_bsd44_write_armap): Ditto. (_bfd_archive_bsd44_read_ar_hdr): Ditto. (_bfd_archive_bsd44_write_ar_hdr): Ditto. (_bfd_archive_bsd44_openr_next_archived_file): Ditto. (_bfd_archive_bsd44_get_elt_at_index): Ditto. (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto. (_bfd_archive_bsd44_update_armap_timestamp): Ditto. a2427 25 * oasys.c (oasys_write_ar_hdr): Define. * libecoff.h (_bfd_ecoff_write_ar_hdr): Define. * ieee.c (ieee_write_ar_hdr): Define. * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define. * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field. (bfd_pmac_xcoff_backend_data): Ditto. * coff64-rs6000.c (rs6000coff64_vec): Ditto. (bfd_xcoff_aix5_backend_data): Ditto. * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define. * aout-target.h (MY_write_ar_hdr): Define it if not defined. * aout-tic30.c (MY_write_ar_hdr): Ditto. * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive. (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr) (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table) (bfd_mach_o_construct_extended_name_table) (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap) (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt) (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr) (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table) (bfd_mach_o_construct_extended_name_table) (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap) (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt) (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c * bfd-in2.h: Regenerate. d2429 1 a2429 2 2010-01-26 Alan Modra H.J. Lu d2431 5 a2435 16 PR ld/11218 * elflink.c (elf_link_output_extsym): Do not ignore undefined symbols with ref_regular set when gc_sections is active. 2010-01-25 Alan Modra PR ld/11217 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences with relocations against undefined weak symbols. (ppc64_elf_relocate_section): Don't optimize calls to undefined weak functions if the symbol is dynamic. (ppc64_elf_relocate_section): Edit tprel tls sequences. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. (_bfd_elf_ppc_at_tprel_transform): New function. * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare. * bfd-in2.h: Regenerate. d2437 1 a2437 1 2010-01-23 Richard Sandiford d2439 2 a2440 90 * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1. (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE. * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and bitsize to 1. (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE. 2010-01-21 Nick Clifton * elflink.c (elf_link_add_object_symbols): Look up name of undefined symbol both before and after versioning has been applied. Do not bother with symbols that are weakly undefined. 2010-01-21 Andreas Krebbel * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function. (bfd_elf32_bfd_merge_private_bfd_data): New macro definition. 2010-01-19 Cary Coutant * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8. 2010-01-19 Daisuke Hatayama Alan Modra * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff. (elf_object_p): Read e_phnum extension. (elf_write_shdrs_and_ehdr): Write e_phnum extension. * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check that we can read last program header. 2010-01-19 Matthew Gretton-Dann * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of R_ARM_THM_CALL entry. (elf32_arm_final_link_relocate): Correct calculation of reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22, or R_ARM_THM_JUMP24 relocation. 2010-01-18 Alan Modra PR 11168 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C block past vars in COFF_IMAGE_WITH_PE block. Report error on more than 32k sections. 2010-01-15 Jan Kratochvil Fix compilation warning on gcc-3.4. * vms-tir.c (start_etir_record, sto_imm): Rename the prototype parameter index to sec_index according to the function definition. 2010-01-13 Chao-ying Fu * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B. It is true for all CPUs. (jal_reloc_p): New function. (mips_elf_calculate_relocation): Rename require_jalxp to cross_mode_jump_p. Update comment for CROSS_MODE_JUMP_P. Set up cross_mode_jump_p based on the mode change. (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p. Update comment for CROSS_MODE_JUMP_P. Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx. Use !cross_mode_jump_p to guard conversion. Convert "jr t9" to "b", if possible. (_bfd_mips_elf_relocate_section): Rename require_jalx to cross_mode_jump_p. Pass &cross_mode_jump_p to call mips_elf_calculate_relocation. Pass cross_mode_jump_p to call mips_elf_perform_relocation. 2010-01-13 Nick Clifton * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for "m32c" returns the m32c arch_info_struct and not the m16c arch_info_struct. (arch_info_struct): Use the new scan function. (bfd_m32c_arch): Likewise. 2010-01-13 Tristan Gingold * config.bfd: Remove duplicated target vector for i386-*-darwin. Appends new arch instead of overriding. Use mach_o_x86_64_vec for x86_64-*-darwin. * configure.in: Add mach_o_x86_64_vec. * configure: Regenerate. * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector. * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c * Makefile.in: Regenerate. * mach-o-x86-64.c: New file. d2442 1 a2442 1 2010-01-13 Tristan Gingold d2444 3 a2446 3 * reloc.c: Add MACH_O_X86_64 relocations. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d2448 1 a2448 1 2010-01-13 Tristan Gingold d2450 4 a2453 3 * archive.c (normalize): Use lbasename. (bfd_bsd_truncate_arname): Ditto. (bfd_gnu_truncate_arname): Ditto. d2455 1 a2455 1 2010-01-12 Tristan Gingold d2457 2 a2458 1 * makefile.vms (CFLAGS): Turns warnings into informational messages. d2460 1 a2460 1 2010-01-11 Tristan Gingold d2462 2 a2463 1 * mach-o.h: Add x86-64 relocation types. d2465 1 a2465 1 2010-01-11 Tristan Gingold d2467 4 a2470 10 * mach-o.h (bfd_mach_o_backend_data): Add arch field. (bfd_mach_o_set_arch_mach): New prototype. * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject. (bfd_mach_o_set_arch_mach): New function. (bfd_mach_o_gen_mkobject): New function. Set TARGET_ARCHITECTURE for the generic back-ends. * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define. Check that TARGET_ARCHITECTURE is defined. Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure. * mach-o-i386.c (TARGET_ARCHITECTURE): Define. d2472 1 a2472 1 2010-01-11 Tristan Gingold d2474 3 a2476 1 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap. d2478 1 a2478 1 2010-01-11 Nick Clifton d2480 2 a2481 2 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow handling of R_V850_HI16_S relocation. d2483 1 a2483 1 2010-01-11 Alan Modra d2485 200 a2684 74 PR 11103 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment. 2010-01-11 Alan Modra PR 6832 * dwarf2.c (struct comp_unit): Add sec_info_ptr. (find_abstract_instance_name): Use it. (parse_comp_unit): Set it. 2010-01-09 Ralf Wildenhues * Makefile.in: Regenerate. * configure: Regenerate. 2010-01-08 Tristan Gingold * archive.c: Remove bfd_special_undocumented_glue. 2010-01-08 Alan Modra PR ld/11133 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook. * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise. * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise. 2010-01-07 H.J. Lu PR ld/11138 * elflink.c (elf_link_check_versioned_symbol): Don't abort if a symbol referenced by DSO is is defined in a non-shared object and forced local. 2010-01-07 H.J. Lu PR ld/11133 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for undefined __start_XXX/__stop_XXX in all input files and set SEC_KEEP. 2010-01-07 H.J. Lu PR ld/11143 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section. 2010-01-04 Daniel Gutson * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC before including procfs.h. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. * configure.in: Added autoconf probe for the pr_fpreg member. * configure: Regenerated. * config.in: Regenerated. * elf.c: Define _STRUCTURE_PROC before including procfs.h. 2010-01-04 Joel Brobecker Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64). * dwarf2.c (concat_filename): Rename dirname with dir_name to void shadowing the dirname function. Rename subdirname with subdir_name to stay consistent with the new dir_name variable name. 2010-01-04 Edmar Wienskoski * archures.c: Add bfd_mach_ppc_e500mc64. * bfd-in2.h: Regenerate. * cpu-powerpc.c (bfd_powerpc_archs): Add entry for bfd_mach_ppc_e500mc64. 2010-01-01 Joel Brobecker Fix -Wshadow warnings (seen on ppc-aix) * xcofflink.c: Replace finfo by flinfo throughout. d2686 1 a2686 1 For older changes see ChangeLog-2009 @ 1.4.6.1 log @Rebase to HEAD as of a few days ago. @ text @d1 1 a1 1 2013-03-25 Tristan Gingold d3 11 a13 1 * configure.in: Bump version to 2.23.2 d17 1 a17 1 2013-03-04 Alan Modra d19 4 a22 3 * elf32-ppc.c (ppc_elf_relocate_section ): Adjust non-zero addends when relocatable, rather than addends >= 32768. Always zero "addend" before applying relocation. d24 1 a24 1 2013-02-18 Alan Modra d26 2 a27 8 PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): Declare. (_bfd_elf_strtab_resize): Declare. * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): New function. (_bfd_elf_strtab_resize): Likewise. * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize. d29 1 a29 1 2013-02-11 Richard Sandiford d31 31 a61 2 * elfxx-mips.c (mips_elf_recreate_got): Remove free. (mips_elf_resolve_final_got_entries): Remove bogus comment. d63 2 a64 1 2013-02-10 Alan Modra d66 32 a97 2 PR ld/15113 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc. d99 2 a100 1 2013-02-08 Alan Modra d102 35 a136 4 PR binutils/15106 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache. * elf.c (elf_find_function): Revert last change. Use new tdata field rather than static vars for cache. d138 1 a138 1 2013-02-07 Roberto Agostino Vitillo d140 2 a141 2 PR binutils/15106 * elf.c (elf_find_function): Don't cache if symbols change. d143 82 a224 1 2013-02-07 Alan Modra d226 20 a245 3 PR binutils/14873 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to copy attributes from or to non-ELF. d247 2 a248 1 2013-02-01 Alan Modra d250 1 a250 2 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol clears def_regular. d252 3 a254 2 2013-01-31 Alan Modra David S. Miller d256 1 a256 6 PR ld/15056 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit references to __tls_get_addr. * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct vtinherit and vtentry reloc handling too. * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro. d258 55 a312 1 2013-01-31 Alan Modra d314 44 a357 1 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink. d359 29 a387 7 2013-01-28 Alan Modra * elf64-ppc.c: Use %T to print symbols names and remove redundant "relocation" in error messages throughout file. (ppc64_elf_relocate_section): Remove sibling call error message, replace with "call lacks nop". Specially report errors for branches to function entry points via OPD lookup and branches to stubs. Remove NULL symbol handling now done by %T. d389 1 a389 1 2013-01-22 Alan Modra d391 2 a392 4 Apply mainline patches 2013-01-15 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to plt-thread-safe. d394 1 a394 8 2013-01-14 Alan Modra PR binutils/14813 * bfdio.c (struct bfd_iovec ): Revert 2012-11-06. (memory_bclose): Likewise. Return 0 on success. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose, bfd_close): Likewise. * vms-lib.c (vms_lib_bclose): Likewise. * libbfd.h: Regenerate. d396 2 a397 64 2013-01-13 Alan Modra * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak. Add ref_dynamic_nonweak. * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete. (_bfd_elf_merge_symbol): Don't call above function. Move setting of ref_dynamic_nonweak and dynamic_def earlier. Don't clear dynamic_def. (elf_link_add_object_symbols): Delete redundant "override" test. Don't set dynamic_def here. (elf_link_output_extsym): Update. 2013-01-12 Alan Modra * elf-bfd.h (_bfd_elf_strtab_refcount): Declare. * elf-strtab.c (_bfd_elf_strtab_refcount): New function. * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount. 2013-01-12 Alan Modra PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare. (_bfd_elf_strtab_clear_all_refs): Define. * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function. (_bfd_elf_strtab_clear_all_refs): Delete. * elflink.c (elf_link_add_object_symbols): Clear out added strtab refs. Correct handling of warning common symbols. 2012-12-19 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Replace bfd_elf32_swap_reloc_out with elf_append_rel. (elf_i386_finish_dynamic_symbol): Likewise. * elflink.c (elf_append_rel): Call swap_reloc_out instead of swap_reloca_out. 2012-12-18 Alan Modra * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of the special MAP_* values. 2012-12-07 Alan Modra PR ld/14926 * elf.c (_bfd_elf_map_sections_to_segments): Include elf header size when determining phdr_in_segment. 2012-12-05 Alan Modra * elf64-ppc.c (build_plt_stub): Fix off by one error in branch to glink. 2012-11-21 H.J. Lu PR binutils/14493 * elf.c (copy_elf_program_header): When rewriting program header, set the output maxpagesize to the maximum alignment of input PT_LOAD segments. 2012-11-13 Joe Seymour * elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc. 2012-11-06 H.J. Lu PR binutils/14813 * bfdio.c (bfd_iovec): Change return type of bclose to bfd_boolean. (memory_bclose): Change return type to bfd_boolean. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose): Likewise. Return TRUE on success. * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE. * libbfd.h: Regenerated. d399 1 a399 68 2012-11-06 Alan Modra PR binutils/14567 * opncls.c (opncls_iovec): Forward declare. (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream to new bfd. 2012-11-06 Alan Modra * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP. 2012-11-05 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside loop. Really mark toc entry referring to another toc entry only if the first is used. 2012-10-29 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HA16A reloc howtos. 2012-10-26 Alan Modra PR gas/14758 * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS bfd_reloc values. Map to corresponding D-form relocs. (is_insn_ds_form, is_insn_qs_form): New functions. (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form fields using D-form reloc. 2012-10-21 Hans-Peter Nilsson * linker.c (_bfd_generic_link_output_symbols): Handle a no-longer-global symbol entered as a BFD_PLUGIN. 2012-10-08 Alan Modra PR binutils/14662 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as SEC_DEBUGGING. 2012-09-04 H.J. Lu PR binutils/14493 * elf.c (ignore_section_sym): Also ignore section symbols without a BFD section. 2012-12-21 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_standard instead of R_X86_64_max for unrecognized relocation. 2012-12-21 H.J. Lu PR ld/14980 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly adjust h->plt.refcount. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. 2012-12-20 H.J. Lu PR ld/14968 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check local IFUNC references. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. 2012-12-20 H.J. Lu PR ld/14956 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local IFUNC calls. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. d401 3 a403 2 2012-12-17 Roland McGrath Alan Modra d405 1 a405 2 * elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are not ARM ELF. d407 3 a409 1 2012-12-09 H.J. Lu d411 1 a411 3 PR binutils/14933 * archive.c (bsd_write_armap): Properly check indicies bigger than 4Gb. d413 3 a415 1 2012-11-29 Roland McGrath d417 1 a417 1 * elf-nacl.c (segment_eligible_for_headers): Disallow writable segments. d419 3 a421 1 2012-11-26 Roland McGrath d423 1 a423 1 * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null. d425 1 a425 1 2012-11-21 Roland McGrath d427 1 a427 5 * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ... (segment_eligible_for_headers): ... this. Take new arguments MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's start address doesn't leave space for the headers. (nacl_modify_segment_map): Update caller. d429 5 a433 1 2012-11-19 Joey Ye d435 1 a435 6 * elf32-arm.c (elf32_arm_final_link_relocate, case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of the place being relocated. (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address of the place being relocated and truncate addend. (Pa): New macro. d437 2 a438 1 2012-11-14 Roland McGrath d440 1 a440 2 * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc instruction for data sandboxing. d442 2 a443 1 2012-11-13 Tristan Gingold d445 1 a445 2 * Makefile.am (RELEASE): Unset. * Makefile.in: Regenerate. d447 2 a448 1 2012-11-13 Tristan Gingold d450 1 a450 3 * configure.in: Bump version to 2.23.1 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d452 2 a453 1 2012-11-05 Andreas Krebbel d455 1 a455 4 PR target/14788 * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for local ifunc symbols. * elf64-s390.c (elf_s390_relocate_section): Likewise. d457 1 a457 1 2012-11-05 Alan Modra d459 1 a459 1 * configure.in: Apply 2012-09-10 change to config.in here. d461 1 a461 1 2012-10-29 Sean Keys d463 1 a463 2 * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for R_XGATE_16 d465 4 a468 1 2012-10-22 Tristan Gingold d470 1 a470 3 * configure.in: Bump version to 2.23.0 * Makefile.am (RELEASE): Unset. * configure, Makefile.in: Regenerate. d472 2 a473 1 2012-10-22 Tristan Gingold d475 1 a475 3 * configure.in: Bump version to 2.23 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d477 4 a480 1 2012-10-16 Sofiane Naci d482 1 a482 31 * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2, R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, R_AARCH64_TLSLE_ADD_TPREL_HI12. (elf64_aarch64_tlsdesc_howto_table): Fix shift value for R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1. (elf64_aarch64_final_link_relocate): Add signed_addend when resolving AARCH64_TLSLE_*_TPREL_* relocations. 2012-09-20 Walter Lee * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got relocations with value of hgot. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. 2012-09-18 H.J. Lu PR ld/14591 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. * elf32-sh-symbian.c (sh_symbian_relocate_section): Update _bfd_elf_merge_symbol call. * elflink.c (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol call. (elf_link_add_object_symbols): Don't update symbol type from a weak definition. Update symbol type from a common symbol when overriding a weak symbol. d484 2 a485 1 2012-09-17 Walter Lee d487 1 a487 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused got_base variable. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d489 14 a502 1 2012-09-17 Walter Lee d504 1 a504 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation of got relocations for when .got.plt section is merged with .got. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d506 2 a507 1 2012-09-13 Doug Kwan d509 1 a509 2 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted relocation for stub lookup. d511 92 a602 1 2012-09-10 Matthias Klose d604 2 a605 1 * config.in: Disable sanity check for kfreebsd. d607 2 a608 1 2012-09-07 Alan Modra d610 2 a611 3 PR ld/14464 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined by a linker script in .opd to corresponding input .opd section. d613 1 a613 1 2012-08-09 Maciej W. Rozycki d615 8 a622 12 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2): Remove macros, folding them into... (LA25_LUI_MICROMIPS): ... this new macro. (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into... (LA25_J_MICROMIPS): ... this new macro. (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise into... (LA25_ADDIU_MICROMIPS): ... this new macro. (bfd_put_micromips_32, bfd_get_micromips_32): New functions. (mips_elf_create_la25_stub): Use them. (check_br32_dslot, check_br32, check_relocated_bzc): Likewise. (_bfd_mips_elf_relax_section): Likewise. d624 49 a672 2 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is not minus one. d674 5 d680 1 a680 1 2012-08-28 Maciej W. Rozycki d682 1 a682 3 * elflink.c (_bfd_elf_merge_symbol): Also override the version a dynamic symbol defaulted to if preempted with a hidden or internal definition. d684 1 a684 3 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up the options section in the output rather than input BFD to decide if to add a DT_MIPS_OPTIONS tag. d686 2 a687 1 2012-08-13 Maciej W. Rozycki d689 1 a689 2 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into #ifdef BFD64. d691 4 a694 1 2012-08-13 Maciej W. Rozycki d696 1 a696 2 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling of protected symbols. d698 5 a702 1 2012-08-06 Maciej W. Rozycki d704 1 a704 2 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym symbols special case. d706 2 a707 3 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask field initializers throughout. * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise. d709 22 a730 1 2012-08-03 Maciej W. Rozycki d732 76 a807 2 * elfxx-mips.c (mips_elf_perform_relocation): Update the cross-mode jump message. d809 1 a809 1 2012-09-04 Sergey A. Guriev d811 2 a812 5 * cpu-ia64-opc.c (ins_cnt6a): New function. (ext_cnt6a): Ditto. (ins_strd5b): Ditto. (ext_strd5b): Ditto. (elf64_ia64_operands): Add new operand types. d814 1 a814 1 2012-08-05 Maciej W. Rozycki d816 2 a817 2 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate PLT slots for local symbols. d819 1 a819 1 2012-08-28 Matthew Gretton-Dann d821 106 a926 6 Apply from mainline 2012-08-24 Matthew Gretton-Dann * elf32-arm.c (v8): New array. (tag_cpu_arch_combine): Add support for ARMv8 attributes. (elf32_arm_merge_eabi_attributes): Likewise. (VFP_VERSION_COUNT): New define. d928 5 a932 1 2012-08-17 Nick Clifton d934 1 a934 1 * po/vi.po: Updated Vietnamese translation. d936 1 a936 10 2012-08-16 Ian Bolton Laurent Desnogues Jim MacArthur Marcus Shawcroft Nigel Stephens Ramana Radhakrishnan Richard Earnshaw Sofiane Naci Tejas Belagod Yufeng Zhang a937 23 * Makefile.am: Add AArch64 files. * Makefile.in: Regenerate. * archures.c (bfd_aarch64_arch): New declaration. (bfd_archures_list): Use bfd_archures_list. * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration. (bfd_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_set_options): New declaration. (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration. (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition. (bfd_is_aarch64_special_symbol_name): New declaration. (bfd_aarch64_merge_machines): New declaration. (bfd_aarch64_update_notes): New declaration. (int bfd_aarch64_get_mach_from_notes): New declaration. (elf64_aarch64_setup_section_lists): New declaration. (elf64_aarch64_next_input_section): New declaration. (elf64_aarch64_size_stubs): New declaration. (elf64_aarch64_build_stubs): New declaration. * config.bfd: Add AArch64. * configure.in: Add AArch64. a938 8 * cpu-aarch64.c: New file. * elf-bfd.h: Add AArch64. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf64-aarch64.c: New file. * reloc.c: Add AArch64 relocations. * targets.c: Add AArch64. * po/SRC-POTFILES.in: Regenerate. d940 162 a1101 1 2012-08-14 Nick Clifton d1103 1 a1103 1 * po/uk.po: Updated Ukranian translation. d1105 2 a1106 1 2012-08-09 Nick Clifton d1108 1 a1108 1 * po/vi.po: Updated Vietnamese translation. d1110 1 a1110 1 2012-08-07 Nick Clifton d1112 1 a1112 1 * po/uk.po: Updated Ukranian translation. d1114 5 a1118 1 2012-07-30 Nick Clifton d1120 1 a1120 6 * po/bfd.pot: Updated template. * po/es.po: Updated Spanish translation. * po/fi.po: Updated Finnish translation. * po/fr.po: Updated French translation. * po/ru.po: Updated Russian translation. * po/uk.po: Updated Ukranian translation. d1122 4 a1125 1 2012-07-27 Tristan Gingold d1127 1 a1127 2 * configure.in: Bump version to 2.22.90 * configure: Regenerate. d1129 2 a1130 1 2012-07-26 Teresa Johnson d1132 1 a1132 2 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr if it is non-NULL. d1134 3 a1136 2 2012-07-26 Meador Inge Nick Clifton d1138 1 a1138 3 PR ld/14397 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error if a required section is missing from the linker script. d1140 4 a1143 4 2012-07-24 Jan Waclawek PR 13899 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call _bfd_elf_link_read_relocs with keep_memory as TRUE. d1145 3 a1147 1 2012-07-24 Teresa Johnson d1149 25 a1173 41 * bfd.c (bfd_find_nearest_line_discriminator): New macro. * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator. * coff64-rs6000.c: Likewise. * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line_discriminator): Likewise. (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper that invokes _bfd_elf_find_nearest_line_discriminator with correct arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper that invokes _bfd_elf_find_line_discriminator with correct arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator argument. (_bfd_dwarf2_find_line): Likewise. (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_nearest_line_discriminator with _bfd_generic_find_nearest_line_discriminator. (bfd_target): Add _bfd_find_nearest_line_discriminator. d1175 3 a1177 1 2012-07-24 Sean Keys d1179 2 a1180 3 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code that enables the linker to offset addresses, when linking against symbols from the XGATE processor and vice versa. d1182 2 a1183 1 2012-07-23 Nick Clifton d1185 2 a1186 2 * cisco-core.c (cisco_core_file_failing_command): Make static. (cisco_core_file_failing_signal): Make static. d1188 2 a1189 1 2012-07-18 H.J. Lu d1191 4 a1194 1 * bfd-in2.h: Regenerated. d1196 1 a1196 1 2012-07-18 Nicolàs Alejandro Di Risio d1198 4 a1201 2 PR binutils/14335 * section.c: Fix a typo in comments. d1203 1 a1203 1 2012-07-13 Andreas Krebbel d1205 7 a1211 266 * elf64-s390.c: Include elf-s390-common.c. (R_390_IRELATIVE): New reloc. (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE. (RELA_ENTRY_SIZE): New macro. (elf_s390_link_hash_entry): New fields ifunc_resolver_address and *ifunc_resolver_section. (struct plt_entry): New struct. (struct elf_s390_obj_tdata): New field local_plt. (elf_s390_local_plt): New macro. (struct elf_s390_link_hash_table): New field irelifunc. (ELF64): New macro. (link_hash_newfunc): Initialize new fields. (elf_s390_check_relocs): Handle IFUNC symbols. (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC symbols. (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for IFUNC symbols. (elf_s390_size_dynamic_sections): Handle IFUNC symbols. (elf_s390_relocate_section): Likewise. (elf_s390_finish_dynamic_symbol): Likewise. (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols. (elf_s390_finish_ifunc_symbol): New function. (elf_s390_gc_sweep_hook): Handle local plt entries. (elf_backend_add_symbol_hook): Define. * elf32-s390.c: See elf64-s390.c changes. * elf-s390-common.c: New file. * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field. * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for BFD_RELOC_390_IRELATIVE. * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation. 2012-07-13 Nick Clifton * aix386-core.c: Remove use of PTR and PARAMS macros. * archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise. 2012-07-09 Alan Modra PR ld/14323 * elflink.c (elf_sort_symbol): Sort by size too. (elf_link_add_object_symbols ): Simplify binary search. Do not depend on ordering of symbol aliases. Match largest size. 2012-07-03 H.J. Lu * elf.c (assign_section_numbers): Check if number of sections >= SHN_LORESERVE. * elfcode.h (elf_object_p): Likewise. 2012-07-03 Nick Clifton * archive.c (bsd_write_armap): Catch attempts to create an archive with indicies bigger than 4Gb. (coff_write_armap): Likewise. 2012-07-03 H.J. Lu PR binutils/14319 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty debug section. 2012-07-03 H.J. Lu PR ld/3351 * elflink.c (_bfd_elf_update_dynamic_flags): New. (_bfd_elf_merge_symbol): Update both real and indirect symbol dynamic flags. (_bfd_elf_add_default_symbol): Make the real symbol dynamic if the indirect symbol is defined in a shared library. (elf_link_add_object_symbols): Likewise. If the indirect symbol has been forced local, don't make the real symbol dynamic. (elf_link_check_versioned_symbol): Check indirect symbol. (elf_link_output_extsym): Use real symbol definition when reporting indirect symbol error. Check version info for dynamic versioned symbol. 2012-07-03 Alan Modra PR ld/14207 * elf.c (assign_file_positions_for_load_sections): Remove assertions that only PT_LOAD headers include file header and section headers. (assign_file_positions_for_non_load_sections): Similarly don't assert PT_GNU_RELRO header does not include file and section headers. Compare first section vma rather than PT_LOAD p_vaddr against relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace abort with assertion. 2012-07-02 Alan Modra * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section "anyway" variant when creating .plt. (m32c_elf_relax_plt_section): Remove redundant test and unused param. (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling m32c_elf_relax_plt_section. * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant when creating .got and .got.plt. (_bfd_mips_elf_final_link): Likewise for .rtproc, and use bfd_get_linker_section. * sunos.c: Similarly throughout. 2012-07-01 Andreas Schwab * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error message. 2012-06-29 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE on unresolvable relocation. 2012-06-29 H.J. Lu * archive.c (_bfd_compute_and_write_armap): Simplify global symbol handling. 2012-06-29 Nick Clifton PR ld/14189 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount for locally bound symbols. 2012-06-29 Alan Modra * section.c (bfd_get_linker_section): New function. * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use the above throughout rather than bfd_get_section_by_name. Use bfd_make_section_anyway rather than bfd_make_section when creating them. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-vax.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elflink.c: Likewise. * elf-vxworks.c: Likewise. * elf-m10300.c: Likewise. Also make use of htab plt, got and gotplt shortcuts. * bfd-in2.h: Regenerate. * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when calling create_rofixup_section. * elflink.c (bfd_elf_final_link): Simplify test for .dynstr. d1213 1 a1213 1 2012-06-29 Alan Modra d1215 4 a1218 7 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela section for bss type sections, except for .rela.bss. * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise. d1220 1 a1220 1 2012-06-28 Roland McGrath d1222 3 a1224 2 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for displacement calculation in nacl_p case. d1226 1 a1226 1 2012-06-28 Nick Clifton a1227 2 * po/uk.po: New Ukranian translation. * configure.in (ALL_LINGUAS): Add uk. d1230 1 a1230 1 2012-06-26 Alan Modra d1232 1 a1232 3 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input file has multiple .got/.toc sections and all don't fit in current toc group. d1234 1 a1234 1 2012-06-22 Roland McGrath d1236 2 a1237 3 * elf.c (assign_file_positions_for_non_load_sections): Define __ehdr_start symbol if it's referenced and there's a PT_LOAD segment that covers both the file and program headers. d1239 1 a1239 1 2012-06-22 Andreas Schwab d1241 2 a1242 2 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute. d1244 1 a1244 1 2012-06-22 Alan Modra d1246 2 a1247 2 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line save/restore functions when relocatable. Make "funcs" static. d1249 1 a1249 1 2012-06-18 Hans-Peter Nilsson d1251 1 a1251 2 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence of merged .got and .got.plt entries. d1253 8 a1260 1 2012-06-18 John Szakmeister d1262 79 a1340 1 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value. d1342 1 a1342 1 2012-06-17 Hans-Peter Nilsson d1344 4 a1347 3 * elf32-cris.c (cris_elf_relocate_section): : Handle references to thread common symbols. d1349 4 a1352 1 2012-06-13 Nick Clifton d1354 1 a1354 4 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function. (elf32_arm_object_p): If the machine number could not be deduced from the notes, call bfd_arm_get_mach_from_attributes to get the number from the attributes. d1356 3 a1358 1 2012-06-12 H.J. Lu d1360 1 a1360 3 PR bfd/14207 * elf.c (assign_file_positions_for_non_load_sections): Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment. d1362 4 a1365 1 2012-06-12 Alan Modra d1367 1 a1367 4 PR ld/14207 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type sections at end of PT_LOAD segment when searching for segment that contains end of relro extent. d1369 2 a1370 1 2012-06-11 H.J. Lu d1372 1 a1372 1 * elf.c (assign_file_positions_for_non_load_sections): Reindent. d1374 3 a1376 1 2012-06-11 H.J. Lu d1378 1 a1378 1 * elf.c (_bfd_elf_map_sections_to_segments): Reindent. d1380 3 a1382 1 2012-06-06 Alan Modra d1384 1 a1384 8 * elflink.c (elf_link_input_bfd): Provide a file symbol for each input file with local syms, if the input lacks such. (bfd_elf_final_link): Add a file symbol to mark end of locals for which we can associate with input files. (struct elf_final_link_info): Add filesym_count field. (struct elf_outext_info): Add need_second_pass and second_pass. (elf_link_output_extsym): Detect symbols defined in the output file, emit them on second pass over locals. d1386 6 a1391 1 2012-06-04 Jan Kratochvil d1393 21 a1413 22 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. 2012-06-03 Alan Modra PR binutils/13897 * elf.c (elf_find_function): Cache last function sym info. (_bfd_elf_maybe_function_sym): Return function size, pass in section of interest. * elf-bfd.h (struct elf_backend_data ): Likewise. (_bfd_elf_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. (opd_entry_value): Add in_code_sec param. Revert caching code. Return -1 if in_code_sec and function found in wrong section. Update all calls. d1415 1 a1415 1 2012-06-01 Siddhesh Poyarekar d1417 2 a1418 28 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. 2012-06-01 Alan Modra PR binutils/13897 * elf64-ppc.c (opd_entry_value): Rewrite cache code. 2012-05-29 Tom Tromey * opncls.c (bfd_fopen): Always close fd on failure. (bfd_fdopenr): Likewise. 2012-05-27 Alan Modra PR ld/14170 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in a dynamic library finds a new instance with non-default visibility in a regular object, correctly handle symbols already on the undefs list and undo dynamic symbol state when the new symbol is hidden or internal. d1420 1 a1420 1 2012-05-25 H.J. Lu d1422 1 a1422 82 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use dynamic_sec_flags to create PLT .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-25 Alan Modra PR ld/13909 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here. * elf-bfd.h (_bfd_elf_eh_frame_present): Declare. * elflink.c (bfd_elf_size_dynamic_sections): Let the backend size dynamic sections before stripping eh_frame_hdr. (bfd_elf_gc_sections): Handle multiple .eh_frame sections. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame if no other .eh_frame sections exist. * elf64-ppc.c (ppc64_elf_size_stubs): Likewise. * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_i386_size_dynamic_sections): ..do it here instead. Don't specially keep sgotplt, iplt, tgotplt, sdynbss for symbols. (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_x86_64_size_dynamic_sections): ..do it here instead. (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. 2012-05-24 Alan Modra PR ld/14158 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame size to output section alignment. (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover. 2012-05-23 Alan Modra * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle BFDs with multiple .eh_frame sections. 2012-05-23 Alan Modra PR ld/13909 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs. 2012-05-22 H.J. Lu PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the last change. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 Alan Modra * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if first one is zero size or discarded. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of glink_eh_frame contents here.. (ppc_elf_finish_dynamic_sections): ..rather than here. Just set offset to .glink. 2012-05-22 H.J. Lu PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT eh_frame section if there is an input .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 H.J. Lu PR ld/14105 * elf32-i386.c (elf_i386_create_dynamic_sections): Always create PLT eh_frame section with SEC_LINKER_CREATED. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 Alan Modra * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame sections attached to a BFD. * section.c (bfd_get_section_by_name): Rewrite description. (bfd_get_next_section_by_name): New function. * bfd-in2.h: Regenerate. d1424 1 a1424 1 2012-05-21 Andreas Schwab d1426 2 a1427 4 * elf32-m68k.c (elf_m68k_grok_prstatus): New function. (elf_m68k_grok_psinfo): New function. (elf_backend_grok_prstatus): Define. (elf_backend_grok_psinfo): Define. d1429 1 a1429 1 2012-05-19 Maciej W. Rozycki d1431 2 a1432 3 * elf64-mips.c (elf_backend_got_header_size): Correct definition. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF backend's GOT header size instead of hardcoding it. d1434 1 a1434 1 2012-05-19 Maciej W. Rozycki d1436 2 a1437 2 * elf32-vax.c (elf_vax_relocate_section) : Don't check if info->shared again. d1439 1 a1439 1 2012-05-19 Maciej W. Rozycki d1441 3 a1443 3 * elf32-vax.c (elf_vax_relocate_section) : Use section flags rather than its name as the check for text sections. d1445 1 a1445 1 2012-05-19 Maciej W. Rozycki d1447 1 a1447 2 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure the third reloc offset is the same as the first. d1449 1 a1449 1 2012-05-19 Alan Modra d1451 1 a1451 5 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete. (has_tls_reloc, has_tls_get_addr_call): Move back to.. * elf32-ppc.c: ..here. (ppc_elf_section_flags, elf_backend_section_flags): Delete. (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections. d1453 1 a1453 1 2012-05-18 H.J. Lu d1455 2 a1456 3 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. d1458 1 a1458 1 2012-05-18 Roland McGrath d1460 9 a1468 2 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as not to clobber the ar_fmag field stored in ARED->arch_header. d1470 1 a1470 1 2012-05-18 Pedro Alves d1472 12 a1483 1 * mach-o.h: Don't include sysdep.h. d1485 2 a1486 1 2012-05-18 Nick Clifton d1488 33 a1520 3 PR 14072 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before complaining about config.h not having been included. d1523 18 a1540 1 2012-05-18 Andreas Schwab d1542 23 a1564 2 * aclocal.m4: Regenerate. * Makefile.in: Regenerate. d1566 1 a1566 2 2012-05-17 Daniel Richard G. Nick Clifton d1568 5 a1572 15 PR 14072 * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * aclocal.m4: Regenerate. * bfd-in.h: Generate an error if included before config.h. * sysdep.h: Likewise. * bfd-in2.h: Regenerate. * compress.c: Remove #include "config.h". * plugin.c: Likewise. * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * xsymc.c: Likewise. d1574 1 a1574 2 2012-05-17 Maciej W. Rozycki Alan Modra d1576 3 a1578 38 * elf.c (ignore_section_sym): Correct comment. Don't return true for absolute section. (elf_map_symbols): Move stray comment. Adjust for above change. Don't discard global section symbols. 2012-05-17 Alan Modra * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC, _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute. * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC absolute. 2012-05-17 Alan Modra * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns, is_ppc_vle): Move to.. * elf32-ppc.h: ..here, making is_ppc_vle a macro. 2012-05-16 Sergio Durigan Junior * bfd-in.h (bfd_get_section_name, bfd_get_section_vma, bfd_get_section_lma, bfd_get_section_alignment, bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros in order to use the `bfd' argument. * bfd-in2.h: Regenerate. * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd' as the first argument for `bfd_get_section_alignment'. * elf32-arm.c (create_ifunc_sections): Likewise, for `bfd_set_section_alignment'. * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for `bfd_get_section_name'. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relocate_section): Likewise. * elf64-mmix.c (mmix_final_link_relocate): Likewise, for `bfd_get_section_vma'. * elf64-ppc.c (create_linkage_sections): Likewise, for `bfd_set_section_alignment'. d1580 4 a1583 1 2012-05-16 Georg-Johann Lay d1585 4 a1588 84 PR target/13503 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8. (avr_reloc_map): Likewise. 2012-05-16 Daniel Richard G. PR binutils/13558 * bfd/aout-cris.c: Include sysdep.h before bfd.h. * bfd/aout-ns32k.c: Likewise. * bfd/aout-sparcle.c: Likewise. * bfd/aout0.c: Likewise. * bfd/bfd-in2.h: Likewise. * bfd/coff-stgo32.c: Likewise. * bfd/cpu-lm32.c: Likewise. * bfd/cpu-microblaze.c: Likewise. * bfd/cpu-score.c: Likewise. * bfd/cpu-tilegx.c: Likewise. * bfd/cpu-tilepro.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/mach-o.h: Likewise. * bfd/nlm32-ppc.c: Likewise. * bfd/ns32knetbsd.c: Likewise. * bfd/pef.h: Likewise. * bfd/plugin.c: Likewise. * bfd/stab-syms.c: Likewise. * bfd/sunos.c: Likewise. * bfd/syms.c: Likewise. * bfd/xsym.h: Likewise. 2012-05-16 Alan Modra * elflink.c: Rename flaginfo to flinfo throughout, except.. (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo. Formatting, style. Simplify flag match. 2012-05-16 Alan Modra * dwarf2.c: Formatting. (arange_add): Pass in unit rather than bfd. Update callers. Ignore empty ranges. Don't ask for cleared memory. (parse_comp_unit): Only set unit->base_address if processing DW_TAG_compile_unit. (find_debug_info): Optimise section lookup. (place_sections): Use bfd_alloc for stash->adjusted_sections. (find_line): Match previously parsed comp unit addresses as we do for newly parsed comp units. 2012-05-16 Alan Modra * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf stops at end of ar_size field. 2012-05-16 Alan Modra PR ld/13962 PR ld/7023 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is out of range. As a special case, fix sh_info for zero sh_size. Do the same for .symtab. 2012-05-15 James Murray Stephane Carrez * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d1590 1 a1590 2 2012-05-14 James Lemke Catherine Moore d1592 2 a1593 17 * bfd.c (bfd_lookup_section_flags): Add section parm. * ecoff.c (bfd_debug_section): Remove flag_info initializer. * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info. (bfd_elf_lookup_section_flags): Add section parm. * elf32-ppc.c (is_ppc_vle): New function. (ppc_elf_modify_segment_map): New function. (elf_backend_modify_segment_map): Define. (has_vle_insns): New define. * elf32-ppc.h (ppc_elf_modify_segment_map): Declare. * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm. Move in logic to omit / include a section. * libbfd-in.h (bfd_link_info): Add section parm. (bfd_generic_lookup_section_flags): Likewise. * reloc.c (bfd_generic_lookup_section_flags): Likewise. * section.c (bfd_section): Move out section_flag_info. (BFD_FAKE_SECTION): Remove flag_info initializer. * targets.c (_bfd_lookup_section_flags): Add section parm. d1595 1 a1595 1 2012-05-14 Catherine Moore d1597 1 a1597 38 * archures.c (bfd_mach_ppc_vle): New. * bfd-in2.h: Regenerated. * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle. * elf32-ppc.c (split16_format_type): New enumeration. (ppc_elf_vle_split16): New function. (HOWTO): Add entries for R_PPC_VLE relocations. (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations. (ppc_elf_section_flags): New function. (ppc_elf_lookup_section_flags): New function. (ppc_elf_section_processing): New function. (ppc_elf_check_relocs): Handle PPC_VLE relocations. (ppc_elf_relocation_section): Likewise. (elf_backend_lookup_section_flags_hook): Define. (elf_backend_section_flags): Define. (elf_backend_section_processing): Define. * elf32-ppc.h (ppc_elf_section_processing): Declare. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15, BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A, BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A, BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A, BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21, BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A, BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A, BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations. 2012-05-11 Georg-Johann Lay PR target/13503 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Add entries for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. d1599 1 a1599 1 2012-05-10 H.J. Lu d1601 2 a1602 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32 addend overflow check. d1604 1 a1604 1 2012-05-10 DJ Delorie d1606 2 a1607 1 * elf32-rx.c (rx_elf_object_p): Ignore empty segments. d1609 1 a1609 1 2012-05-10 H.J. Lu d1611 4 a1614 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed hex number in x32 addend overflow check. d1616 1 a1616 1 2012-05-10 H.J. Lu d1618 3 a1620 2 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle R_X86_64_RELATIVE64. d1622 1 a1622 1 2012-05-09 H.J. Lu d1624 1 a1624 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend overflow for R_X86_64_RELATIVE64. d1626 1 a1626 1 2012-05-08 Ben Cheng d1628 13 a1640 2 * elf.c: Preserve the original p_align and p_flags if they are valid. d1642 1 a1642 1 2012-05-07 Alan Modra d1644 2 a1645 2 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update RELOC_AGAINST_DISCARDED_SECTION invocation. d1647 1 a1647 1 2012-05-07 Hans-Peter Nilsson d1649 2 a1650 2 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use local variable i_ instead of assuming and using a variable i. d1652 1 a1652 1 2012-05-07 Maciej W. Rozycki d1654 29 a1682 28 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound relocations. * elfxx-mips.c (mips_reloc_against_discarded_section): New function. (_bfd_mips_elf_relocate_section): Call it, in place of RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Update arguments to RELOC_AGAINST_DISCARDED_SECTION. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. d1684 9 a1692 2 * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. d1694 6 a1699 9 * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. d1701 8 a1708 4 * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. d1710 4 a1713 4 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. d1715 245 a1959 13 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. d1961 1 a1961 1 2012-05-05 Alan Modra d1963 28 a1990 3 PR ld/14052 PR ld/13621 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change. d1992 1 a1992 1 2012-05-05 Alan Modra d1994 60 a2053 22 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section and bfd_ind_section with their _ptr variants, or use corresponding bfd_is_* macros. * aout-ns32k.c: Likewise. * aout-tic30.c: Likewise. * coff-arm.c: Likewise. * coff-tic54x.c: Likewise. * cpu-ns32k.c: Likewise. * elf-attrs.c: Likewise. * elfcode.h: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * versados.c: Likewise. * section.c: Likewise. (bfd_abs_section, bfd_ind_section, bfd_com_section, bfd_ind_section): Delete. (std_section): New array replacing above. (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr, bfd_ind_section_ptr, STD_SECTION): Update. (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts. * bfd-in2.h: Regenerate. d2055 100 a2154 1 2012-05-03 Sean Keys d2156 2 a2157 100 * cpu-xgate.c: New file. Added XGATE support. * archures.c (bfd_architecture): Add XGATE architecture. (bfd_archures_list): Add reference to XGATE architecture info. * elf-bfd.h (prep_headers): Handle bfd_arch_xgate. * reloc.c: Add various XGATE relocation enums. * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector list. * Makefile.am: Add support for XGATE elf. * configure.in: Ditto. * config.bfd: Ditto. * Makefile.in: Regenerate. * configure: Ditto. * bfd-in2.h: Ditto. * libbfd.h: Ditto. Added files for XGATE relocations. * elf32-xgate.c: Created minimal relocation file. * elf32-xgate.h: Created minimal header file for elf32-xgate. 2012-05-03 Tristan Gingold * dwarf2.c (decode_line_info): Ignore DW_LNE_HP_source_file_correlation. 2012-05-01 Nick Clifton PR binutils/13121 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * elf32-arm.c: Likewise. * elf64-sparc.c: Likewise. * elflink.c: Likewise. * pdp11.c: Likewise. * rescoff.c: Likewise. 2012-04-26 Mark Wielaard * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc possibly being relative to DW_AT_low_pc. (parse_comp_unit): Likewise. 2012-04-26 Andreas Schwab * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references also when generating PIE. (elf_m68k_discard_copies): Mark undefined weak symbols referenced by relocations as dynamic. 2012-04-26 Hans-Peter Nilsson Provide a way for programs to recognize BFD_ASSERT calls. * bfd.c (bfd_assert_handler_type): New API type. (bfd_set_assert_handler, bfd_get_assert_handler): New API functions. (_bfd_assert_handler): New variable. (_bfd_default_assert_handler): New function. (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler. * libbfd-in.h (_bfd_assert_handler): Declare. * libbfd.h, bfd-in2.h: Regenerate. 2012-04-24 Hans-Peter Nilsson PR ld/13990 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local symbol, where PLT refcount is set to -1. 2012-04-24 Alan Modra PR ld/13991 * elf-bfd.h (_bfd_elf_link_just_syms): Define as _bfd_generic_link_just_syms. * elflink.c (_bfd_elf_link_just_syms): Delete. * linker.c (_bfd_generic_link_just_syms): Set sec_info_type. * bfd-in.h (discarded_section): Renamed from elf_discarded_section. * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * reloc.c: Update all references. * bfd-in2.h: Regenerate. d2159 6 a2164 1 2012-04-20 Andreas Krebbel d2166 1 a2166 2 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. d2168 2 a2169 1 2012-04-19 Thomas Schwinge d2171 1 a2171 4 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for got_type. (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use it. d2173 4 a2176 1 2012-04-17 Kaz Kojima d2178 1 a2178 2 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic relocations when LE conversion happens on the IE tls symbol. d2180 2 a2181 1 2012-04-17 Roland McGrath d2183 1 a2183 2 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding so that 32-byte boundary is a proper instruction boundary. d2185 3 a2187 1 2012-04-17 Tristan Gingold d2189 1 a2189 2 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to member of an object archive.< d2191 7 a2197 1 2012-04-17 Tristan Gingold d2199 1 a2199 6 * vms-lib.c (MAX_EKEYLEN): Define. (MAX_KEYLEN): Fix value. (vms_write_index): Add comments and fix indentation. Adjust comparaison. Add assertions. Free kbn_blk. (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN. Compense MAX_KEYLEN adjustment. d2201 3 a2203 1 2012-04-16 Maciej W. Rozycki d2205 1 a2205 2 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs. (_bfd_mips_elf_check_relocs): Update accordingly. d2207 3 a2209 1 2012-04-13 Alan Modra d2211 3 a2213 3 PR ld/13947 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for reloc sections. d2215 1 a2215 1 2012-04-12 David S. Miller d2217 5 a2221 11 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32, BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function. (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10. (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs. (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. d2223 1 a2223 1 2012-04-12 Roland McGrath d2225 3 a2227 23 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry): New variables. (struct elf32_arm_link_hash_table): New member `nacl_p'. (elf32_arm_link_hash_table_create): Initialize it. (elf32_arm_nacl_link_hash_table_create): New function. (arm_movw_immediate, arm_movt_immediate): New functions. (elf32_arm_populate_plt_entry): Test HTAB->nacl_p. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_plt_map_1): Likewise. (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec): New backend vector stanza. (elf32_arm_nacl_modify_segment_map): New function. * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*. * targets.c: Support bfd_elf32_{big,little}_nacl_vec. * configure.in: Likewise. (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here. (bfd_elf32_littlearm_nacl_vec): Likewise. (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise. (bfd_elf32_bigarm_symbian_vec): Likewise. (bfd_elf32_littlearm_symbian_vec): Likewise. (bfd_elf32_bigarm_vxworks_vec): Likewise. (bfd_elf32_littlearm_vxworks_vec): Likewise. * configure: Regenerated. d2229 1 a2229 1 2012-04-12 Tristan Gingold d2231 7 a2237 13 * elflink.c (elf_link_output_extsym): Add a guard. (bfd_elf_final_link): Remove assertion. (bfd_elf_final_link): Add a guard. * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed. (elfNN_vms_section_from_shdr, elfNN_vms_object_p) (elfNN_vms_post_process_headers, elfNN_vms_section_processing) (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup): Remove. (elfNN-ia64-vms target): Move to ... * elf64-ia64-vms.c: New file. * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo. (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c. d2239 2 d2242 35 d2278 1 a2278 1 2012-04-11 Nick Clifton d2280 85 a2364 33 PR binutils/13897 * elf64-ppc.c (opd_entry_value): When dealing with sections without relocs, keep the last section loaded in order to avoid unnecessary reloads. 2012-04-09 Roland McGrath * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs. * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs. (nacl_modify_program_headers): Likewise. 2012-04-03 Roland McGrath * elf-nacl.c: New file. * elf-nacl.h: New file. * elf32-i386.c (elf_backend_modify_segment_map): Define for bfd_elf32_i386_nacl_vec. (elf_backend_modify_program_headers): Likewise. * elf64-x86-64.c (elf_backend_modify_segment_map): Define for bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec. (elf_backend_modify_program_headers): Likewise. * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here. (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here. * Makefile.in: Regenerated. * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here. (bfd_elf32_x86_64_nacl_vec): Likewise. (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise. (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise. (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise. (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise. (bfd_elf32_i386_nacl_vec): Likewise. (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise. (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise. d2366 4 d2371 3 a2373 1 2012-03-31 Andreas Schwab d2375 1 a2375 2 * elf32-m68k.c (elf_m68k_relocate_section): Allow R_68K_TLS_LE{8,16,32} for PIE. d2377 44 a2420 1 2012-03-30 Andreas Krebbel d2422 2 a2423 3 * elf64-s390.c: Fix several comments regarding PLT entry description. * elf32-s390.c: Likewise. d2425 1 a2425 1 2012-03-30 Andreas Krebbel d2427 141 a2567 4 * elf64-s390.c: Use the section pointer shortcuts in elf_link_hash_table and remove them from the target specific variant. * elf32-s390.c: Likewise. d2569 10 a2578 1 2012-03-30 Andreas Krebbel d2580 1 a2580 10 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry): New definitions. (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove. (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32. (elf_s390_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry) (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry) (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions. (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*) (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove. d2582 2 a2583 1 2012-03-30 Andreas Krebbel d2585 1 a2585 3 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove. Rename all occurrences in the file to elf_dyn_relocs. * elf64-s390.c: Likewise. d2587 2 a2588 1 2012-03-30 Alan Modra d2590 1 a2590 2 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic libraries. d2592 1 a2592 1 2012-03-29 Alan Modra d2594 42 a2635 1 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete. d2637 21 d2659 1 a2659 1 2012-03-23 Alan Modra d2661 2 a2662 2 * elf.c (assign_file_positions_for_non_load_sections): Don't warn on empty alloc sections. d2664 1 a2664 1 2012-03-23 Alan Modra d2666 2 a2667 32 * linker.c (_bfd_nearby_section): New function, split out from.. (fix_syms): ..here. * bfd-in.h (_bfd_nearby_section): Declare. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't use text_index_section or data_index_section with ld -q or ld -r output relocs against stripped output sections. Instead use _bfd_nearby_section. 2012-03-23 Alan Modra PR binutils/13894 * elf64-ppc.c (opd_entry_value): Read full symbol table when sym hashes unavailable. 2012-03-21 Eliot Dresselhaus * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE for non-C6X objects. 2012-03-20 Kai Tietz PR ld/12742 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h. * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined. Add windows.h header include if HAVE_WINDOWS_H is defined. (dlerror): New static function if windows variant is used instead of dlfcn.h. (dlclose): Likewise. (dlopen): Likewise. (dlsym): Likewise. * configure: Regenerated. * config.in: Regenerated. d2669 1 a2669 1 2012-03-20 H.J. Lu d2671 12 a2682 17 PR ld/13880 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error for R_386_GOTOFF relocation against protected function if SYMBOLIC_BIND is true. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an error for R_X86_64_GOTOFF64 relocation against protected function when building executable or SYMBOLIC_BIND is true. 2012-03-16 Roland McGrath * config.bfd: Handle x86_64-*-nacl*. * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza. (bfd_elf32_x86_64_nacl_vec): Likewise. * targets.c: Support them. * configure.in: Likewise. * configure: Regenerated. d2684 1 a2684 1 2012-03-16 Matthew Gretton-Dann d2686 1 a2686 52 * elf32-arm.c (elf32_arm_attributes_accept_div): New function. (elf32_arm_attributes_forbid_div): Likewise. (elf32_arm_merge_eabi_attributes): Correct handling of Tag_DIV_use. 2012-03-15 Roland McGrath * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use elf_x86_64_backend_data parameters for plt_eh_frame. * elf64-x86-64.c (struct elf_x86_64_backend_data): New type. (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros. (elf_x86_64_arch_bed): New variable. (elf_backend_arch_data): New macro. (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_plt_sym_val): Likewise. (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data parameters for PLT details. (elf_x86_64_finish_dynamic_sections): Likewise. 2012-03-14 Roland McGrath * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up to the full size, padding out with nop instructions. 2012-03-12 Alan Modra * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn on zero size dynbss symbol. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise. d2688 1 a2688 1 2012-03-10 Edmar Wienskoski d2690 3 a2692 1 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. a2693 2 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. d2695 1 a2695 1 2012-03-09 H.J. Lu d2697 2 a2698 3 PR ld/13817 * elf32-i386.c (elf_i386_relocate_section): Restore R_386_IRELATIVE. d2700 1 a2700 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore R_X86_64_IRELATIVE. d2702 3 a2704 1 2012-03-08 Tristan Gingold d2706 1 a2706 3 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum keylen according to archive kind. Set nextvbn and nextrfa lhd fields. Add comments. d2708 28 a2735 1 2012-03-07 Nick Clifton d2737 62 a2798 30 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type field. (elf32_mn10300_link_hash_table): Add tls_ldm_got entry; (elf_mn10300_tdata): Define. (elf_mn10300_local_got_tls_type): Define. (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD, R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs. (mn10300_reloc_map): Likewise. (elf_mn10300_tls_transition): New function. (dtpoff, tpoff, mn10300_do_tls_transition): New functions. (mn10300_elf_check_relocs): Add TLS support. (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relocate_section): Likewise. (mn10300_elf_relax_section): Likewise. (elf32_mn10300_link_hash_newfunc): Initialise new field. (_bfd_mn10300_copy_indirect_symbol): New function. (elf32_mn10300_link_hash_table_create): Initialise new fields. (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support. (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise. (_bfd_mn10300_elf_reloc_type_class): Allocate an elf_mn10300_obj_tdata structure. (elf_backend_copy_indirect_symbol): Define. * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD, BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE, BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD, BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations. (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to alongside other MN10300 relocations. d2802 45 a2846 1 2012-03-06 Jakub Jelinek d2848 1 a2848 2 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE set relocate to TRUE. d2850 4 a2853 1 2012-03-05 Rainer Orth d2855 78 a2932 70 PR ld/12152 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore overflows for R_SPARC_UA32 in .stab sections. 2012-03-01 Alan Modra * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning. 2012-02-27 Alan Modra * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd before calling elf specific function. (sh_elf_osec_readonly_p): Test for error return from above. 2012-02-27 Alan Modra * elf32-spu.c (build_stub): Fix malloc under-allocation. 2012-02-25 Walter Lee * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL, BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD, BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD. Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE. * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro d2934 11 a2944 65 (tilepro_reloc_map): Ditto. (tilepro_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilepro_tls_translate_to_le): New. (tilepro_tls_translate_to_ie): New. (tilepro_elf_tls_transition): New. (tilepro_elf_check_relocs): Handle new tls relocations. (tilepro_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilepro_elf_relocate_section): Ditto. (tilepro_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New (insn_mask_X1_no_dest_no_srca): New (insn_mask_Y0_no_dest_no_srca): New (insn_mask_Y1_no_dest_no_srca): New (srca_mask_X0): New (srca_mask_X1): New (insn_tls_le_move_X1): New (insn_tls_le_move_zero_X0X1): New (insn_tls_ie_lw_X1): New (insn_tls_ie_add_X0X1): New (insn_tls_ie_add_Y0Y1): New (insn_tls_gd_add_X0X1): New (insn_tls_gd_add_Y0Y1): New * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx relocations. (tilegx_reloc_map): Ditto. (tilegx_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilegx_elf_link_hash_table): New field disable_le_transition. (tilegx_tls_translate_to_le): New. (tilegx_tls_translate_to_ie): New. (tilegx_elf_tls_transition): New. (tilegx_elf_check_relocs): Handle new tls relocations. (tilegx_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilegx_elf_relocate_section): Ditto. (tilegx_copy_bits): New. (tilegx_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New. (insn_mask_X1_no_dest_no_srca): New. (insn_mask_Y0_no_dest_no_srca): New. (insn_mask_Y1_no_dest_no_srca): New. (insn_mask_X0_no_operand): New. (insn_mask_X1_no_operand): New. (insn_mask_Y0_no_operand): New. (insn_mask_Y1_no_operand): New. (insn_tls_ie_ld_X1): New. (insn_tls_ie_ld4s_X1): New. (insn_tls_ie_add_X0X1): New. (insn_tls_ie_add_Y0Y1): New. (insn_tls_ie_addx_X0X1): New. (insn_tls_ie_addx_Y0Y1): New. (insn_tls_gd_add_X0X1): New. (insn_tls_gd_add_Y0Y1): New. (insn_move_X0X1): New. (insn_move_Y0Y1): New. (insn_add_X0X1): New. (insn_add_Y0Y1): New. (insn_addx_X0X1): New. (insn_addx_Y0Y1): New. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. d2946 4 a2949 1 2012-02-25 Walter Lee d2951 4 a2954 29 * config.bfd (tilegx-*-*): rename little endian vector; add big endian vector. (tilegxbe-*-*): New case. * configure.in (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): New vector. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): New vector. * configure: Regenerate. * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * targets.c (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): Declare. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): Declare. (_bfd_target_vector): Add / rename above vectors. * arctures.c (bfd_architecture): Define bfd_mach_tilegx32. * bfd-in2.h: Regenerate. * cpu-tilegx.c (bfd_tilegx32_arch): define. (bfd_tilegx_arch): link to bfd_tilegx32_arch. d2956 1 a2956 1 2012-02-24 Nick Clifton d2958 4 a2961 4 PR ld/13730 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an error message instead of aborting, when an outofrange reloc is encountered. d2963 1 a2963 1 2012-02-23 Iain Sandoe d2965 4 a2968 7 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New. (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc bit-fields when target and host differ in endian-ness. When PAIRs are non-scattered find the 'symbol' from the preceding reloc. Add FIXME re. reloc symbols on section boundaries. (bfd_mach_o_swap_out_non_scattered_reloc): New. (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc. d2970 1 a2970 1 2012-02-17 Iain Sandoe d2972 3 a2974 4 * mach-o-i386.c (i386_howto_table): Add support for 16 bit sect-diffs. (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs. (bfd_mach_o_i386_swap_reloc_out): Likewise. d2976 1 a2976 1 2012-02-17 Tristan Gingold d2978 4 a2981 6 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF): * libbfd.h: Regenerated. * bfd-in2.h: Likewise. * mach-o-i386.c (i386_howto_table): Include local sectdiff. (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff. (bfd_mach_o_i386_swap_reloc_out): Likewise. d2983 1 a2983 1 2012-02-17 Andreas Krebbel d2985 2 a2986 2 * elf32-s390.c (elf_s390_relocate_section): Support basr in the GD->LE and LD->LE optimizations. d2988 1 a2988 1 2012-02-16 Alan Modra d2990 7 a2996 2 PR binutils/13355 * elf32-rx.c (elf32_rx_relax_section): Correct width check. d2998 1 a2998 1 2012-02-13 Richard Henderson d3000 6 a3005 3 PR ld/13621 * linker.c (fix_syms): Force symbols outside any section into bfd_abs_section_ptr. d3007 1 a3007 1 2012-02-13 Alan Modra d3009 3 a3011 4 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function. * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare. * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define. * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define. d3013 1 a3013 2 2012-02-11 Jan Kratochvil Nick Clifton d3015 4 a3018 2 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized memset. d3020 1 a3020 1 2012-02-10 Iain Sandoe d3022 3 a3024 2 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section vma additions in their logical, rather than physical order. d3026 1 a3026 1 2012-02-10 Iain Sandoe d3028 1 a3028 6 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section parameters. * mach-o-x86-64.c (text_section_names_xlat): New. (mach_o_x86_64_segsec_names_xlat): New. (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat. * mach-o-i386.c (text_section_names_xlat): Correct section parameters. d3030 1 a3030 1 2012-02-10 Tristan Gingold d3032 2 a3033 2 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator to avoid infinite loop. Add comments. d3035 1 a3035 1 2012-02-09 H.J. Lu d3037 80 a3116 8 PR ld/13675 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte nop instructions. (bfd_arch_i386_short_nop_fill): New. (bfd_arch_i386_long_nop_fill): Likewise. Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info initializers. Use bfd_arch_i386_long_nop_fill on 64bit bfd_arch_info initializers. d3118 2 a3119 4 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ... (bfd_arch_i386_short_nop_fill): This. Update bfd_arch_info initializers. * cpu-l1om.c: Likewise. d3121 2 a3122 1 2012-02-08 Alan Modra d3124 4 a3127 3 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too. (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear the correct h->u.weakdef. d3129 74 a3202 1 2012-02-07 Alan Modra d3204 1 a3204 6 * elf.c (elf_find_function): Don't use internal_elf_sym. (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type parameter with asymbol. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype. (struct elf_backend_data ): Likewise. d3206 2 a3207 1 2012-02-02 Vidya Praveen (vidya.praveen@@atmel.com) d3209 1 a3209 3 PR bfd/13410 * elf32-avr.c (elf32_avr_relax_section): Correct the condition that qualifies the candidates for relaxation. d3211 3 a3213 1 2012-02-02 Tristan Gingold d3215 1 a3215 1 * bfdio.c (real_fopen): Remove unused vms_modes variable. d3217 5 a3221 1 2012-02-02 Tristan Gingold d3223 1 a3223 2 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized variable warning. d3225 1 a3225 1 2012-02-02 Tristan Gingold d3227 2 a3228 1 * archive.c (bfd_slurp_armap): Fix thinko in cast. d3230 4 a3233 1 2012-01-31 H.J. Lu d3235 1 a3235 4 PR ld/13616 * archures.c (bfd_arch_info): Add fill. (bfd_default_arch_struct): Add bfd_arch_default_fill. (bfd_arch_default_fill): New. d3237 48 a3284 2 * configure.in: Set bfd version to 2.22.52. * configure: Regenerated. d3286 1 a3286 77 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info initializer. * cpu-arc.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-cris.c: Likewise. * cpu-crx.c: Likewise. * cpu-d10v.c: Likewise. * cpu-d30v.c: Likewise. * cpu-dlx.c: Likewise. * cpu-epiphany.c: Likewise. * cpu-fr30.c: Likewise. * cpu-frv.c: Likewise. * cpu-h8300.c: Likewise. * cpu-h8500.c: Likewise. * cpu-hppa.c: Likewise. * cpu-i370.c: Likewise. * cpu-i860.c: Likewise. * cpu-i960.c: Likewise. * cpu-ia64.c: Likewise. * cpu-ip2k.c: Likewise. * cpu-iq2000.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m10200.c: Likewise. * cpu-m10300.c: Likewise. * cpu-m32c.c: Likewise. * cpu-m32r.c: Likewise. * cpu-m68hc11.c: Likewise. * cpu-m68hc12.c: Likewise. * cpu-m68k.c: Likewise. * cpu-m88k.c: Likewise. * cpu-mcore.c: Likewise. * cpu-mep.c: Likewise. * cpu-microblaze.c: Likewise. * cpu-mips.c: Likewise. * cpu-mmix.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-mt.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-openrisc.c: Likewise. * cpu-or32.c: Likewise. * cpu-pdp11.c: Likewise. * cpu-pj.c: Likewise. * cpu-plugin.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rl78.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-rx.c: Likewise. * cpu-s390.c: Likewise. * cpu-score.c: Likewise. * cpu-sh.c: Likewise. * cpu-sparc.c: Likewise. * cpu-spu.c: Likewise. * cpu-tic30.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-tic54x.c: Likewise. * cpu-tic6x.c: Likewise. * cpu-tic80.c: Likewise. * cpu-tilegx.c: Likewise. * cpu-tilepro.c: Likewise. * cpu-v850.c: Likewise. * cpu-vax.c: Likewise. * cpu-w65.c: Likewise. * cpu-we32k.c: Likewise. * cpu-xc16x.c: Likewise. * cpu-xstormy16.c: Likewise. * cpu-xtensa.c: Likewise. * cpu-z80.c: Likewise. * cpu-z8k.c: Likewise. * cpu-i386.c: Include "libiberty.h". (bfd_arch_i386_fill): New. Add bfd_arch_i386_fill to bfd_arch_info initializer. d3288 132 a3419 2 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer. * cpu-l1om.c: Likewise. d3421 2 a3422 2 * linker.c (default_data_link_order): Call abfd->arch_info->fill if fill size is 0. d3424 16 a3439 1 * bfd-in2.h: Regenerated. d3441 1 a3441 1 2012-01-27 Michael Eager d3443 90 a3532 2 * elf32-microblaze.c (create_got_section): Reuse existing .rela.got section. d3534 1 a3534 1 2012-01-23 Alan Modra d3536 2 a3537 33 * elf-bfd.h: Formatting. (struct elf_backend_data): Add "maybe_function_sym". (_bfd_elf_maybe_function_sym): Declare. * elfxx-target.h (elf_backend_maybe_function_sym): Define. (elfNN_bed): Init new field. * elf.c (elf_find_function): Use maybe_function_sym. (_bfd_elf_maybe_function_sym): New function. * elf64-ppc.c (elf_backend_maybe_function_sym): Define. (ppc64_elf_maybe_function_sym): New function. 2012-01-20 Francois Gouget PR binutils/13534 * archive.c (_bfd_ar_sizepad): New function. Correctly install and pad the size field in an archive header. (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan function for the archive size field. (bfd_generic_openr_next_archived_file): Likewise. (do_slurp_coff_armap): Likewise. (_bfd_write_archive_contents): Likewise. (_bfd_bsd44_write_ar_hdr): Use the new function. (bfd_ar_hdr_from_filesystem): Likewise. (_bfd_write_archive_contents): Likewise. (bsd_write_armap): Likewise. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_write_armap): Likewise. * bfdio.c (bfd_bread): Use correct type for archive element sizes. * ar.c (open_inarch): Likewise. (extract_file): Likewise. * libbfd-in.h (struct areltdata): Use correct types for parsed_size and extra_size fields. Prototype _bfd_ar_sizepad function. d3540 9 a3548 1 2012-01-20 Ulrich Weigand d3550 1 a3550 5 * elf.c (elfcore_write_prpsinfo): Provide unconditionally. Return NULL if core file generation is unsupported. (elfcore_write_prstatus): Likewise. * elf32-arm.c (elf32_arm_nabi_write_core_note): New function. (elf_backend_write_core_note): Define. d3552 1 a3552 1 2012-01-19 Tristan Gingold d3554 1 a3554 2 * pef.c: Add a comment. * xsym.c: Likewise. d3556 10 a3565 1 2012-01-17 Alan Modra d3567 1 a3567 3 * elf32-ppc.c (ppc_elf_write_core_note ): Don't leave trailing garbage in the note. * elf64-ppc.c (ppc64_elf_write_core_note ): Likewise. d3569 1 a3569 1 2012-01-16 Daniel Green d3571 1 a3571 4 PR ld/13491 * coff-i386.c (coff_i386_rtype_to_howto ): Test h->root.type not h->type. * coff-x86_64.c (coff_amd64_rtype_to_howto ): Likewise. d3573 2 a3574 1 2012-01-13 Iain Sandoe d3576 16 a3591 2 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute indirect symbols. d3593 1 a3593 1 2012-01-13 Iain Sandoe d3595 1 a3595 2 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file position from here... to (bfd_mach_o_build_seg_command): Here. d3597 1 a3597 1 2012-01-12 Iain Sandoe d3599 4 a3602 4 * mach-o.c (bfd_mach_o_count_indirect_symbols): New. (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table. * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the file. (bfd_mach_o_section): Add indirect_syms field. d3604 1 a3604 1 2012-01-11 Iain Sandoe d3606 4 a3609 3 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of vmsize from filesize. Don't compute offsets or file sizes for zerofill sections. d3611 1 a3611 1 2012-01-11 Iain Sandoe d3613 4 a3616 2 * mach-o.c (bfd_mach_o_build_commands): Make the building of each command type independent. d3618 1 a3618 1 2012-01-11 Alan Modra d3620 32 a3651 200 * elf64-ppc.c: Define more insns used in plt call stubs. (ppc64_elf_brtaken_reloc): Assume isa version 2 or above. (ppc64_elf_relocate_section): Likewise. (enum ppc_stub_type): Add ppc_stub_plt_call_r2save. (struct ppc_link_hash_table): Increase size of stub_count array. Add plt_stub_align and plt_thread_safe. (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define. (plt_stub_size, plt_stub_pad): New functions. (build_plt_stub): Emit barriers for power7 thread safety. Don't emit needless save of r2. (build_tls_get_addr_stub): Adjust params. (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning plt stubs. Adjust build_*plt_stub calls. (ppc_size_one_stub): Similarly. (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align params. Choose default for plt_thread_safe based on existence of calls to thread creation functions. Modify plt_call to plt_call_r2save when no tocsave reloc found. Align tail of stub sections. (ppc64_elf_build_stubs): Align tail of stub sections. Adjust output of stub statistics. (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save. * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype. 2012-01-10 H.J. Lu PR ld/13581 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P check on R_X86_64_PCXX. 2012-01-10 Tristan Gingold * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false warning. 2012-01-10 Tristan Gingold * bfdio.c (bfd_tell): Handle nested archives. (bfd_seek): Ditto. * cache.c (bfd_cache_lookup_worker): Ditto. * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with nested archives. (bfd_generic_openr_next_archived_file): Likewise. 2012-01-09 Iain Sandoe * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement. (bfd_mach_o_write_symtab): Remove handling for indirect syms. (bfd_mach_o_primary_symbol_sort_key): Likewise. (bfd_mach_o_cf_symbols): Likewise. (bfd_mach_o_sort_symbol_table): Remove. (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling for indirect and dysymtab counts. Do the symbol sorting here. (bfd_mach_o_build_dysymtab_command): Count the symbol types here. Make the indirect symbols a TODO. (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols. (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with a non-zero value. (bfd_mach_o_read_symtab_symbol): Record the symbol index. (bfd_mach_o_read_symtab_symbol): Adjust recording of global status. * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries. (IS_MACHO_INDIRECT): Remove. (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New. 2012-01-06 Nick Clifton PR binutils/13121 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. 2012-01-06 Tristan Gingold * bfdio.c (bfd_bread): Use arelt_size macro. 2012-01-06 Tristan Gingold * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs. 2012-01-05 Nick Clifton PR ld/12161 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if necessary. 2012-01-05 Jan Kratochvil Fix zero registers core files when built by gcc-4.7. * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and size. Call elfcore_write_note for the local variables. Remove the final elfcore_write_note call. Add NOTREACHED comments. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function. (bfd_mach_o_generic_stat_arch_elt): Adjust. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_member_init): New function. (bfd_mach_o_openr_next_archived_file): Reindent. Adjust to call bfd_mach_o_fat_member_init. (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init. 2012-01-04 Tristan Gingold * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1, BFD_RELOC_MACH_O_X86_64_PCREL32_2, BFD_RELOC_MACH_O_X86_64_PCREL32_4, BFD_RELOC_MACH_O_X86_64_BRANCH32, BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, BFD_RELOC_MACH_O_X86_64_GOT. 2012-01-04 Tristan Gingold * mach-o.h (bfd_mach_o_fvmlib_command): New structure. (bfd_mach_o_load_command): Add fvmlib field. * mach-o.c (bfd_mach_o_read_fvmlib): New function. (bfd_mach_o_read_command): Handle fvmlib. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_convert_architecture): Reindent. Decode msubtype for ARM. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments. 2012-01-04 Tristan Gingold * mach-o.h: Reindent header. (bfd_mach_o_encryption_info_command): New structure. (bfd_mach_o_load_command): Add encryption_info field. * mach-o.c (bfd_mach_o_read_encryption_info): New function. (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO. (bfd_mach_o_read_command): Adjust error message. 2012-01-04 Shinichiro Hamaji * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part which reads DWARF2 and stores in stash from find_line. (find_line) Call _bfd_dwarf2_slurp_debug_info. * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration. * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate. * mach-o.c (dsym_subdir): The name of subdir where debug information may be stored. (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose type is UUID. (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is corresponding to the executable. (bfd_mach_o_find_dsym): New. Find a debug information BFD in the specified binary file. (bfd_mach_o_follow_dsym): New. Find a debug information BFD for the original BFD. (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O executables, dylibs, and bundles. (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file. * mach-o.h (dsym_bfd): The BFD of the dSYM file. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index for stabd symbols. (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs. (bfd_mach_o_cf_symbols): Likewise. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index as the value of an indirect symbol. Keep the string table index in non-indirect syms for reference. (bfd_mach_o_write_dysymtab): New. (bfd_mach_o_primary_symbol_sort_key): New. (bfd_mach_o_cf_symbols): New. (bfd_mach_o_sort_symbol_table): New. (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols. If we are emitting a dysymtab, process indirect symbols and count the number of each other kind. (bfd_mach_o_mangle_sections): New. (bfd_mach_o_write_contents): Split out some pre-requisite code into the command builder. Write dysymtab if the command is present. (bfd_mach_o_count_sections_for_seg): New. (bfd_mach_o_build_seg_command): New. (bfd_mach_o_build_dysymtab_command): New. (bfd_mach_o_build_commands): Reorganize to support the fact that some commands are optional and should not be emitted if there are no sections or symbols. (bfd_mach_o_set_section_contents): Amend comment. * mach-o.h: Amend and add to comments. (mach_o_data_struct): Add fields for dysymtab symbols counts and a pointer to the indirects, when present. (bfd_mach_o_should_emit_dysymtab): New macro. (IS_MACHO_INDIRECT): Likewise. d3653 1 a3653 1 For older changes see ChangeLog-2011 @ 1.3 log @Merge new binutils. Only x86_64 works now; the rest will need to run mknative again (at least). @ text @d1 10 @ 1.3.2.1 log @sync with head @ text @a0 10 2011-12-11 John Davis Anglin PR binutils/13476 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to R_PARISC_DPREL21L when not doing a shared link. Likewise convert R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L. @ 1.3.2.2 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d1 1 a1 1 2013-03-25 Tristan Gingold d3 11 a13 1 * configure.in: Bump version to 2.23.2 d17 1 a17 1 2013-03-04 Alan Modra d19 4 a22 3 * elf32-ppc.c (ppc_elf_relocate_section ): Adjust non-zero addends when relocatable, rather than addends >= 32768. Always zero "addend" before applying relocation. d24 1 a24 1 2013-02-18 Alan Modra d26 2 a27 8 PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): Declare. (_bfd_elf_strtab_resize): Declare. * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): New function. (_bfd_elf_strtab_resize): Likewise. * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize. d29 1 a29 1 2013-02-11 Richard Sandiford d31 31 a61 2 * elfxx-mips.c (mips_elf_recreate_got): Remove free. (mips_elf_resolve_final_got_entries): Remove bogus comment. d63 2 a64 1 2013-02-10 Alan Modra d66 32 a97 2 PR ld/15113 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc. d99 2 a100 1 2013-02-08 Alan Modra d102 35 a136 4 PR binutils/15106 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache. * elf.c (elf_find_function): Revert last change. Use new tdata field rather than static vars for cache. d138 1 a138 1 2013-02-07 Roberto Agostino Vitillo d140 2 a141 2 PR binutils/15106 * elf.c (elf_find_function): Don't cache if symbols change. d143 82 a224 1 2013-02-07 Alan Modra d226 20 a245 3 PR binutils/14873 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to copy attributes from or to non-ELF. d247 2 a248 1 2013-02-01 Alan Modra d250 1 a250 2 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol clears def_regular. d252 3 a254 2 2013-01-31 Alan Modra David S. Miller d256 1 a256 6 PR ld/15056 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit references to __tls_get_addr. * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct vtinherit and vtentry reloc handling too. * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro. d258 55 a312 1 2013-01-31 Alan Modra d314 44 a357 1 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink. d359 29 a387 7 2013-01-28 Alan Modra * elf64-ppc.c: Use %T to print symbols names and remove redundant "relocation" in error messages throughout file. (ppc64_elf_relocate_section): Remove sibling call error message, replace with "call lacks nop". Specially report errors for branches to function entry points via OPD lookup and branches to stubs. Remove NULL symbol handling now done by %T. d389 1 a389 1 2013-01-22 Alan Modra d391 2 a392 4 Apply mainline patches 2013-01-15 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to plt-thread-safe. d394 1 a394 8 2013-01-14 Alan Modra PR binutils/14813 * bfdio.c (struct bfd_iovec ): Revert 2012-11-06. (memory_bclose): Likewise. Return 0 on success. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose, bfd_close): Likewise. * vms-lib.c (vms_lib_bclose): Likewise. * libbfd.h: Regenerate. d396 2 a397 64 2013-01-13 Alan Modra * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak. Add ref_dynamic_nonweak. * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete. (_bfd_elf_merge_symbol): Don't call above function. Move setting of ref_dynamic_nonweak and dynamic_def earlier. Don't clear dynamic_def. (elf_link_add_object_symbols): Delete redundant "override" test. Don't set dynamic_def here. (elf_link_output_extsym): Update. 2013-01-12 Alan Modra * elf-bfd.h (_bfd_elf_strtab_refcount): Declare. * elf-strtab.c (_bfd_elf_strtab_refcount): New function. * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount. 2013-01-12 Alan Modra PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare. (_bfd_elf_strtab_clear_all_refs): Define. * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function. (_bfd_elf_strtab_clear_all_refs): Delete. * elflink.c (elf_link_add_object_symbols): Clear out added strtab refs. Correct handling of warning common symbols. 2012-12-19 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Replace bfd_elf32_swap_reloc_out with elf_append_rel. (elf_i386_finish_dynamic_symbol): Likewise. * elflink.c (elf_append_rel): Call swap_reloc_out instead of swap_reloca_out. 2012-12-18 Alan Modra * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of the special MAP_* values. 2012-12-07 Alan Modra PR ld/14926 * elf.c (_bfd_elf_map_sections_to_segments): Include elf header size when determining phdr_in_segment. 2012-12-05 Alan Modra * elf64-ppc.c (build_plt_stub): Fix off by one error in branch to glink. 2012-11-21 H.J. Lu PR binutils/14493 * elf.c (copy_elf_program_header): When rewriting program header, set the output maxpagesize to the maximum alignment of input PT_LOAD segments. 2012-11-13 Joe Seymour * elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc. 2012-11-06 H.J. Lu PR binutils/14813 * bfdio.c (bfd_iovec): Change return type of bclose to bfd_boolean. (memory_bclose): Change return type to bfd_boolean. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose): Likewise. Return TRUE on success. * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE. * libbfd.h: Regenerated. d399 1 a399 68 2012-11-06 Alan Modra PR binutils/14567 * opncls.c (opncls_iovec): Forward declare. (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream to new bfd. 2012-11-06 Alan Modra * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP. 2012-11-05 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside loop. Really mark toc entry referring to another toc entry only if the first is used. 2012-10-29 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HA16A reloc howtos. 2012-10-26 Alan Modra PR gas/14758 * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS bfd_reloc values. Map to corresponding D-form relocs. (is_insn_ds_form, is_insn_qs_form): New functions. (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form fields using D-form reloc. 2012-10-21 Hans-Peter Nilsson * linker.c (_bfd_generic_link_output_symbols): Handle a no-longer-global symbol entered as a BFD_PLUGIN. 2012-10-08 Alan Modra PR binutils/14662 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as SEC_DEBUGGING. 2012-09-04 H.J. Lu PR binutils/14493 * elf.c (ignore_section_sym): Also ignore section symbols without a BFD section. 2012-12-21 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_standard instead of R_X86_64_max for unrecognized relocation. 2012-12-21 H.J. Lu PR ld/14980 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly adjust h->plt.refcount. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. 2012-12-20 H.J. Lu PR ld/14968 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check local IFUNC references. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. 2012-12-20 H.J. Lu PR ld/14956 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local IFUNC calls. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. d401 3 a403 2 2012-12-17 Roland McGrath Alan Modra d405 1 a405 2 * elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are not ARM ELF. d407 3 a409 1 2012-12-09 H.J. Lu d411 1 a411 3 PR binutils/14933 * archive.c (bsd_write_armap): Properly check indicies bigger than 4Gb. d413 3 a415 1 2012-11-29 Roland McGrath d417 1 a417 1 * elf-nacl.c (segment_eligible_for_headers): Disallow writable segments. d419 3 a421 1 2012-11-26 Roland McGrath d423 1 a423 1 * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null. d425 1 a425 1 2012-11-21 Roland McGrath d427 1 a427 5 * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ... (segment_eligible_for_headers): ... this. Take new arguments MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's start address doesn't leave space for the headers. (nacl_modify_segment_map): Update caller. d429 5 a433 1 2012-11-19 Joey Ye d435 1 a435 6 * elf32-arm.c (elf32_arm_final_link_relocate, case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of the place being relocated. (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address of the place being relocated and truncate addend. (Pa): New macro. d437 2 a438 1 2012-11-14 Roland McGrath d440 1 a440 2 * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc instruction for data sandboxing. d442 2 a443 1 2012-11-13 Tristan Gingold d445 1 a445 2 * Makefile.am (RELEASE): Unset. * Makefile.in: Regenerate. d447 2 a448 1 2012-11-13 Tristan Gingold d450 1 a450 3 * configure.in: Bump version to 2.23.1 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d452 2 a453 1 2012-11-05 Andreas Krebbel d455 1 a455 4 PR target/14788 * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for local ifunc symbols. * elf64-s390.c (elf_s390_relocate_section): Likewise. d457 1 a457 1 2012-11-05 Alan Modra d459 1 a459 1 * configure.in: Apply 2012-09-10 change to config.in here. d461 1 a461 1 2012-10-29 Sean Keys d463 1 a463 2 * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for R_XGATE_16 d465 4 a468 1 2012-10-22 Tristan Gingold d470 1 a470 3 * configure.in: Bump version to 2.23.0 * Makefile.am (RELEASE): Unset. * configure, Makefile.in: Regenerate. d472 2 a473 1 2012-10-22 Tristan Gingold d475 1 a475 3 * configure.in: Bump version to 2.23 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d477 4 a480 1 2012-10-16 Sofiane Naci d482 1 a482 31 * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2, R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, R_AARCH64_TLSLE_ADD_TPREL_HI12. (elf64_aarch64_tlsdesc_howto_table): Fix shift value for R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1. (elf64_aarch64_final_link_relocate): Add signed_addend when resolving AARCH64_TLSLE_*_TPREL_* relocations. 2012-09-20 Walter Lee * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got relocations with value of hgot. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. 2012-09-18 H.J. Lu PR ld/14591 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. * elf32-sh-symbian.c (sh_symbian_relocate_section): Update _bfd_elf_merge_symbol call. * elflink.c (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol call. (elf_link_add_object_symbols): Don't update symbol type from a weak definition. Update symbol type from a common symbol when overriding a weak symbol. d484 2 a485 1 2012-09-17 Walter Lee d487 1 a487 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused got_base variable. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d489 14 a502 1 2012-09-17 Walter Lee d504 1 a504 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation of got relocations for when .got.plt section is merged with .got. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d506 2 a507 1 2012-09-13 Doug Kwan d509 1 a509 2 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted relocation for stub lookup. d511 92 a602 1 2012-09-10 Matthias Klose d604 2 a605 1 * config.in: Disable sanity check for kfreebsd. d607 2 a608 1 2012-09-07 Alan Modra d610 2 a611 3 PR ld/14464 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined by a linker script in .opd to corresponding input .opd section. d613 1 a613 1 2012-08-09 Maciej W. Rozycki d615 8 a622 12 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2): Remove macros, folding them into... (LA25_LUI_MICROMIPS): ... this new macro. (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into... (LA25_J_MICROMIPS): ... this new macro. (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise into... (LA25_ADDIU_MICROMIPS): ... this new macro. (bfd_put_micromips_32, bfd_get_micromips_32): New functions. (mips_elf_create_la25_stub): Use them. (check_br32_dslot, check_br32, check_relocated_bzc): Likewise. (_bfd_mips_elf_relax_section): Likewise. d624 49 a672 2 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is not minus one. d674 5 d680 1 a680 1 2012-08-28 Maciej W. Rozycki d682 1 a682 3 * elflink.c (_bfd_elf_merge_symbol): Also override the version a dynamic symbol defaulted to if preempted with a hidden or internal definition. d684 1 a684 3 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up the options section in the output rather than input BFD to decide if to add a DT_MIPS_OPTIONS tag. d686 2 a687 1 2012-08-13 Maciej W. Rozycki d689 1 a689 2 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into #ifdef BFD64. d691 4 a694 1 2012-08-13 Maciej W. Rozycki d696 1 a696 2 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling of protected symbols. d698 5 a702 1 2012-08-06 Maciej W. Rozycki d704 1 a704 2 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym symbols special case. d706 2 a707 3 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask field initializers throughout. * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise. d709 22 a730 1 2012-08-03 Maciej W. Rozycki d732 76 a807 2 * elfxx-mips.c (mips_elf_perform_relocation): Update the cross-mode jump message. d809 1 a809 1 2012-09-04 Sergey A. Guriev d811 2 a812 5 * cpu-ia64-opc.c (ins_cnt6a): New function. (ext_cnt6a): Ditto. (ins_strd5b): Ditto. (ext_strd5b): Ditto. (elf64_ia64_operands): Add new operand types. d814 1 a814 1 2012-08-05 Maciej W. Rozycki d816 2 a817 2 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate PLT slots for local symbols. d819 1 a819 1 2012-08-28 Matthew Gretton-Dann d821 106 a926 6 Apply from mainline 2012-08-24 Matthew Gretton-Dann * elf32-arm.c (v8): New array. (tag_cpu_arch_combine): Add support for ARMv8 attributes. (elf32_arm_merge_eabi_attributes): Likewise. (VFP_VERSION_COUNT): New define. d928 5 a932 1 2012-08-17 Nick Clifton d934 1 a934 1 * po/vi.po: Updated Vietnamese translation. d936 1 a936 10 2012-08-16 Ian Bolton Laurent Desnogues Jim MacArthur Marcus Shawcroft Nigel Stephens Ramana Radhakrishnan Richard Earnshaw Sofiane Naci Tejas Belagod Yufeng Zhang a937 23 * Makefile.am: Add AArch64 files. * Makefile.in: Regenerate. * archures.c (bfd_aarch64_arch): New declaration. (bfd_archures_list): Use bfd_archures_list. * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration. (bfd_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_set_options): New declaration. (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration. (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition. (bfd_is_aarch64_special_symbol_name): New declaration. (bfd_aarch64_merge_machines): New declaration. (bfd_aarch64_update_notes): New declaration. (int bfd_aarch64_get_mach_from_notes): New declaration. (elf64_aarch64_setup_section_lists): New declaration. (elf64_aarch64_next_input_section): New declaration. (elf64_aarch64_size_stubs): New declaration. (elf64_aarch64_build_stubs): New declaration. * config.bfd: Add AArch64. * configure.in: Add AArch64. a938 8 * cpu-aarch64.c: New file. * elf-bfd.h: Add AArch64. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf64-aarch64.c: New file. * reloc.c: Add AArch64 relocations. * targets.c: Add AArch64. * po/SRC-POTFILES.in: Regenerate. d940 162 a1101 1 2012-08-14 Nick Clifton d1103 1 a1103 1 * po/uk.po: Updated Ukranian translation. d1105 2 a1106 1 2012-08-09 Nick Clifton d1108 1 a1108 1 * po/vi.po: Updated Vietnamese translation. d1110 1 a1110 1 2012-08-07 Nick Clifton d1112 1 a1112 1 * po/uk.po: Updated Ukranian translation. d1114 5 a1118 1 2012-07-30 Nick Clifton d1120 1 a1120 6 * po/bfd.pot: Updated template. * po/es.po: Updated Spanish translation. * po/fi.po: Updated Finnish translation. * po/fr.po: Updated French translation. * po/ru.po: Updated Russian translation. * po/uk.po: Updated Ukranian translation. d1122 4 a1125 1 2012-07-27 Tristan Gingold d1127 1 a1127 2 * configure.in: Bump version to 2.22.90 * configure: Regenerate. d1129 2 a1130 1 2012-07-26 Teresa Johnson d1132 1 a1132 2 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr if it is non-NULL. d1134 3 a1136 2 2012-07-26 Meador Inge Nick Clifton d1138 1 a1138 3 PR ld/14397 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error if a required section is missing from the linker script. d1140 4 a1143 4 2012-07-24 Jan Waclawek PR 13899 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call _bfd_elf_link_read_relocs with keep_memory as TRUE. d1145 3 a1147 1 2012-07-24 Teresa Johnson d1149 25 a1173 41 * bfd.c (bfd_find_nearest_line_discriminator): New macro. * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator. * coff64-rs6000.c: Likewise. * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line_discriminator): Likewise. (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper that invokes _bfd_elf_find_nearest_line_discriminator with correct arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper that invokes _bfd_elf_find_line_discriminator with correct arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator argument. (_bfd_dwarf2_find_line): Likewise. (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_nearest_line_discriminator with _bfd_generic_find_nearest_line_discriminator. (bfd_target): Add _bfd_find_nearest_line_discriminator. d1175 3 a1177 1 2012-07-24 Sean Keys d1179 2 a1180 3 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code that enables the linker to offset addresses, when linking against symbols from the XGATE processor and vice versa. d1182 2 a1183 1 2012-07-23 Nick Clifton d1185 2 a1186 2 * cisco-core.c (cisco_core_file_failing_command): Make static. (cisco_core_file_failing_signal): Make static. d1188 2 a1189 1 2012-07-18 H.J. Lu d1191 4 a1194 1 * bfd-in2.h: Regenerated. d1196 1 a1196 1 2012-07-18 Nicolàs Alejandro Di Risio d1198 4 a1201 2 PR binutils/14335 * section.c: Fix a typo in comments. d1203 1 a1203 1 2012-07-13 Andreas Krebbel d1205 7 a1211 266 * elf64-s390.c: Include elf-s390-common.c. (R_390_IRELATIVE): New reloc. (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE. (RELA_ENTRY_SIZE): New macro. (elf_s390_link_hash_entry): New fields ifunc_resolver_address and *ifunc_resolver_section. (struct plt_entry): New struct. (struct elf_s390_obj_tdata): New field local_plt. (elf_s390_local_plt): New macro. (struct elf_s390_link_hash_table): New field irelifunc. (ELF64): New macro. (link_hash_newfunc): Initialize new fields. (elf_s390_check_relocs): Handle IFUNC symbols. (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC symbols. (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for IFUNC symbols. (elf_s390_size_dynamic_sections): Handle IFUNC symbols. (elf_s390_relocate_section): Likewise. (elf_s390_finish_dynamic_symbol): Likewise. (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols. (elf_s390_finish_ifunc_symbol): New function. (elf_s390_gc_sweep_hook): Handle local plt entries. (elf_backend_add_symbol_hook): Define. * elf32-s390.c: See elf64-s390.c changes. * elf-s390-common.c: New file. * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field. * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for BFD_RELOC_390_IRELATIVE. * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation. 2012-07-13 Nick Clifton * aix386-core.c: Remove use of PTR and PARAMS macros. * archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise. 2012-07-09 Alan Modra PR ld/14323 * elflink.c (elf_sort_symbol): Sort by size too. (elf_link_add_object_symbols ): Simplify binary search. Do not depend on ordering of symbol aliases. Match largest size. 2012-07-03 H.J. Lu * elf.c (assign_section_numbers): Check if number of sections >= SHN_LORESERVE. * elfcode.h (elf_object_p): Likewise. 2012-07-03 Nick Clifton * archive.c (bsd_write_armap): Catch attempts to create an archive with indicies bigger than 4Gb. (coff_write_armap): Likewise. 2012-07-03 H.J. Lu PR binutils/14319 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty debug section. 2012-07-03 H.J. Lu PR ld/3351 * elflink.c (_bfd_elf_update_dynamic_flags): New. (_bfd_elf_merge_symbol): Update both real and indirect symbol dynamic flags. (_bfd_elf_add_default_symbol): Make the real symbol dynamic if the indirect symbol is defined in a shared library. (elf_link_add_object_symbols): Likewise. If the indirect symbol has been forced local, don't make the real symbol dynamic. (elf_link_check_versioned_symbol): Check indirect symbol. (elf_link_output_extsym): Use real symbol definition when reporting indirect symbol error. Check version info for dynamic versioned symbol. 2012-07-03 Alan Modra PR ld/14207 * elf.c (assign_file_positions_for_load_sections): Remove assertions that only PT_LOAD headers include file header and section headers. (assign_file_positions_for_non_load_sections): Similarly don't assert PT_GNU_RELRO header does not include file and section headers. Compare first section vma rather than PT_LOAD p_vaddr against relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace abort with assertion. 2012-07-02 Alan Modra * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section "anyway" variant when creating .plt. (m32c_elf_relax_plt_section): Remove redundant test and unused param. (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling m32c_elf_relax_plt_section. * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant when creating .got and .got.plt. (_bfd_mips_elf_final_link): Likewise for .rtproc, and use bfd_get_linker_section. * sunos.c: Similarly throughout. 2012-07-01 Andreas Schwab * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error message. 2012-06-29 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE on unresolvable relocation. 2012-06-29 H.J. Lu * archive.c (_bfd_compute_and_write_armap): Simplify global symbol handling. 2012-06-29 Nick Clifton PR ld/14189 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount for locally bound symbols. 2012-06-29 Alan Modra * section.c (bfd_get_linker_section): New function. * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use the above throughout rather than bfd_get_section_by_name. Use bfd_make_section_anyway rather than bfd_make_section when creating them. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-vax.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elflink.c: Likewise. * elf-vxworks.c: Likewise. * elf-m10300.c: Likewise. Also make use of htab plt, got and gotplt shortcuts. * bfd-in2.h: Regenerate. * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when calling create_rofixup_section. * elflink.c (bfd_elf_final_link): Simplify test for .dynstr. d1213 1 a1213 1 2012-06-29 Alan Modra d1215 4 a1218 7 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela section for bss type sections, except for .rela.bss. * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise. d1220 1 a1220 1 2012-06-28 Roland McGrath d1222 3 a1224 2 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for displacement calculation in nacl_p case. d1226 1 a1226 1 2012-06-28 Nick Clifton a1227 2 * po/uk.po: New Ukranian translation. * configure.in (ALL_LINGUAS): Add uk. d1230 1 a1230 1 2012-06-26 Alan Modra d1232 1 a1232 3 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input file has multiple .got/.toc sections and all don't fit in current toc group. d1234 1 a1234 1 2012-06-22 Roland McGrath d1236 2 a1237 3 * elf.c (assign_file_positions_for_non_load_sections): Define __ehdr_start symbol if it's referenced and there's a PT_LOAD segment that covers both the file and program headers. d1239 1 a1239 1 2012-06-22 Andreas Schwab d1241 2 a1242 2 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute. d1244 1 a1244 1 2012-06-22 Alan Modra d1246 2 a1247 2 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line save/restore functions when relocatable. Make "funcs" static. d1249 1 a1249 1 2012-06-18 Hans-Peter Nilsson d1251 1 a1251 2 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence of merged .got and .got.plt entries. d1253 8 a1260 1 2012-06-18 John Szakmeister d1262 79 a1340 1 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value. d1342 1 a1342 1 2012-06-17 Hans-Peter Nilsson d1344 4 a1347 3 * elf32-cris.c (cris_elf_relocate_section): : Handle references to thread common symbols. d1349 4 a1352 1 2012-06-13 Nick Clifton d1354 1 a1354 4 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function. (elf32_arm_object_p): If the machine number could not be deduced from the notes, call bfd_arm_get_mach_from_attributes to get the number from the attributes. d1356 3 a1358 1 2012-06-12 H.J. Lu d1360 1 a1360 3 PR bfd/14207 * elf.c (assign_file_positions_for_non_load_sections): Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment. d1362 4 a1365 1 2012-06-12 Alan Modra d1367 1 a1367 4 PR ld/14207 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type sections at end of PT_LOAD segment when searching for segment that contains end of relro extent. d1369 2 a1370 1 2012-06-11 H.J. Lu d1372 1 a1372 1 * elf.c (assign_file_positions_for_non_load_sections): Reindent. d1374 3 a1376 1 2012-06-11 H.J. Lu d1378 1 a1378 1 * elf.c (_bfd_elf_map_sections_to_segments): Reindent. d1380 3 a1382 1 2012-06-06 Alan Modra d1384 1 a1384 8 * elflink.c (elf_link_input_bfd): Provide a file symbol for each input file with local syms, if the input lacks such. (bfd_elf_final_link): Add a file symbol to mark end of locals for which we can associate with input files. (struct elf_final_link_info): Add filesym_count field. (struct elf_outext_info): Add need_second_pass and second_pass. (elf_link_output_extsym): Detect symbols defined in the output file, emit them on second pass over locals. d1386 6 a1391 1 2012-06-04 Jan Kratochvil d1393 21 a1413 22 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. 2012-06-03 Alan Modra PR binutils/13897 * elf.c (elf_find_function): Cache last function sym info. (_bfd_elf_maybe_function_sym): Return function size, pass in section of interest. * elf-bfd.h (struct elf_backend_data ): Likewise. (_bfd_elf_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. (opd_entry_value): Add in_code_sec param. Revert caching code. Return -1 if in_code_sec and function found in wrong section. Update all calls. d1415 1 a1415 1 2012-06-01 Siddhesh Poyarekar d1417 2 a1418 28 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. 2012-06-01 Alan Modra PR binutils/13897 * elf64-ppc.c (opd_entry_value): Rewrite cache code. 2012-05-29 Tom Tromey * opncls.c (bfd_fopen): Always close fd on failure. (bfd_fdopenr): Likewise. 2012-05-27 Alan Modra PR ld/14170 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in a dynamic library finds a new instance with non-default visibility in a regular object, correctly handle symbols already on the undefs list and undo dynamic symbol state when the new symbol is hidden or internal. d1420 1 a1420 1 2012-05-25 H.J. Lu d1422 1 a1422 82 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use dynamic_sec_flags to create PLT .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-25 Alan Modra PR ld/13909 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here. * elf-bfd.h (_bfd_elf_eh_frame_present): Declare. * elflink.c (bfd_elf_size_dynamic_sections): Let the backend size dynamic sections before stripping eh_frame_hdr. (bfd_elf_gc_sections): Handle multiple .eh_frame sections. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame if no other .eh_frame sections exist. * elf64-ppc.c (ppc64_elf_size_stubs): Likewise. * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_i386_size_dynamic_sections): ..do it here instead. Don't specially keep sgotplt, iplt, tgotplt, sdynbss for symbols. (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_x86_64_size_dynamic_sections): ..do it here instead. (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. 2012-05-24 Alan Modra PR ld/14158 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame size to output section alignment. (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover. 2012-05-23 Alan Modra * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle BFDs with multiple .eh_frame sections. 2012-05-23 Alan Modra PR ld/13909 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs. 2012-05-22 H.J. Lu PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the last change. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 Alan Modra * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if first one is zero size or discarded. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of glink_eh_frame contents here.. (ppc_elf_finish_dynamic_sections): ..rather than here. Just set offset to .glink. 2012-05-22 H.J. Lu PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT eh_frame section if there is an input .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 H.J. Lu PR ld/14105 * elf32-i386.c (elf_i386_create_dynamic_sections): Always create PLT eh_frame section with SEC_LINKER_CREATED. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 Alan Modra * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame sections attached to a BFD. * section.c (bfd_get_section_by_name): Rewrite description. (bfd_get_next_section_by_name): New function. * bfd-in2.h: Regenerate. d1424 1 a1424 1 2012-05-21 Andreas Schwab d1426 2 a1427 4 * elf32-m68k.c (elf_m68k_grok_prstatus): New function. (elf_m68k_grok_psinfo): New function. (elf_backend_grok_prstatus): Define. (elf_backend_grok_psinfo): Define. d1429 1 a1429 1 2012-05-19 Maciej W. Rozycki d1431 2 a1432 3 * elf64-mips.c (elf_backend_got_header_size): Correct definition. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF backend's GOT header size instead of hardcoding it. d1434 1 a1434 1 2012-05-19 Maciej W. Rozycki d1436 2 a1437 2 * elf32-vax.c (elf_vax_relocate_section) : Don't check if info->shared again. d1439 1 a1439 1 2012-05-19 Maciej W. Rozycki d1441 3 a1443 3 * elf32-vax.c (elf_vax_relocate_section) : Use section flags rather than its name as the check for text sections. d1445 1 a1445 1 2012-05-19 Maciej W. Rozycki d1447 1 a1447 2 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure the third reloc offset is the same as the first. d1449 1 a1449 1 2012-05-19 Alan Modra d1451 1 a1451 5 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete. (has_tls_reloc, has_tls_get_addr_call): Move back to.. * elf32-ppc.c: ..here. (ppc_elf_section_flags, elf_backend_section_flags): Delete. (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections. d1453 1 a1453 1 2012-05-18 H.J. Lu d1455 2 a1456 3 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. d1458 1 a1458 1 2012-05-18 Roland McGrath d1460 9 a1468 2 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as not to clobber the ar_fmag field stored in ARED->arch_header. d1470 1 a1470 1 2012-05-18 Pedro Alves d1472 12 a1483 1 * mach-o.h: Don't include sysdep.h. d1485 2 a1486 1 2012-05-18 Nick Clifton d1488 33 a1520 3 PR 14072 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before complaining about config.h not having been included. d1523 18 a1540 1 2012-05-18 Andreas Schwab d1542 23 a1564 2 * aclocal.m4: Regenerate. * Makefile.in: Regenerate. d1566 1 a1566 2 2012-05-17 Daniel Richard G. Nick Clifton d1568 5 a1572 15 PR 14072 * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * aclocal.m4: Regenerate. * bfd-in.h: Generate an error if included before config.h. * sysdep.h: Likewise. * bfd-in2.h: Regenerate. * compress.c: Remove #include "config.h". * plugin.c: Likewise. * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * xsymc.c: Likewise. d1574 1 a1574 2 2012-05-17 Maciej W. Rozycki Alan Modra d1576 3 a1578 38 * elf.c (ignore_section_sym): Correct comment. Don't return true for absolute section. (elf_map_symbols): Move stray comment. Adjust for above change. Don't discard global section symbols. 2012-05-17 Alan Modra * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC, _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute. * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC absolute. 2012-05-17 Alan Modra * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns, is_ppc_vle): Move to.. * elf32-ppc.h: ..here, making is_ppc_vle a macro. 2012-05-16 Sergio Durigan Junior * bfd-in.h (bfd_get_section_name, bfd_get_section_vma, bfd_get_section_lma, bfd_get_section_alignment, bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros in order to use the `bfd' argument. * bfd-in2.h: Regenerate. * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd' as the first argument for `bfd_get_section_alignment'. * elf32-arm.c (create_ifunc_sections): Likewise, for `bfd_set_section_alignment'. * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for `bfd_get_section_name'. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relocate_section): Likewise. * elf64-mmix.c (mmix_final_link_relocate): Likewise, for `bfd_get_section_vma'. * elf64-ppc.c (create_linkage_sections): Likewise, for `bfd_set_section_alignment'. d1580 4 a1583 1 2012-05-16 Georg-Johann Lay d1585 4 a1588 84 PR target/13503 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8. (avr_reloc_map): Likewise. 2012-05-16 Daniel Richard G. PR binutils/13558 * bfd/aout-cris.c: Include sysdep.h before bfd.h. * bfd/aout-ns32k.c: Likewise. * bfd/aout-sparcle.c: Likewise. * bfd/aout0.c: Likewise. * bfd/bfd-in2.h: Likewise. * bfd/coff-stgo32.c: Likewise. * bfd/cpu-lm32.c: Likewise. * bfd/cpu-microblaze.c: Likewise. * bfd/cpu-score.c: Likewise. * bfd/cpu-tilegx.c: Likewise. * bfd/cpu-tilepro.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/mach-o.h: Likewise. * bfd/nlm32-ppc.c: Likewise. * bfd/ns32knetbsd.c: Likewise. * bfd/pef.h: Likewise. * bfd/plugin.c: Likewise. * bfd/stab-syms.c: Likewise. * bfd/sunos.c: Likewise. * bfd/syms.c: Likewise. * bfd/xsym.h: Likewise. 2012-05-16 Alan Modra * elflink.c: Rename flaginfo to flinfo throughout, except.. (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo. Formatting, style. Simplify flag match. 2012-05-16 Alan Modra * dwarf2.c: Formatting. (arange_add): Pass in unit rather than bfd. Update callers. Ignore empty ranges. Don't ask for cleared memory. (parse_comp_unit): Only set unit->base_address if processing DW_TAG_compile_unit. (find_debug_info): Optimise section lookup. (place_sections): Use bfd_alloc for stash->adjusted_sections. (find_line): Match previously parsed comp unit addresses as we do for newly parsed comp units. 2012-05-16 Alan Modra * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf stops at end of ar_size field. 2012-05-16 Alan Modra PR ld/13962 PR ld/7023 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is out of range. As a special case, fix sh_info for zero sh_size. Do the same for .symtab. 2012-05-15 James Murray Stephane Carrez * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d1590 1 a1590 2 2012-05-14 James Lemke Catherine Moore d1592 2 a1593 17 * bfd.c (bfd_lookup_section_flags): Add section parm. * ecoff.c (bfd_debug_section): Remove flag_info initializer. * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info. (bfd_elf_lookup_section_flags): Add section parm. * elf32-ppc.c (is_ppc_vle): New function. (ppc_elf_modify_segment_map): New function. (elf_backend_modify_segment_map): Define. (has_vle_insns): New define. * elf32-ppc.h (ppc_elf_modify_segment_map): Declare. * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm. Move in logic to omit / include a section. * libbfd-in.h (bfd_link_info): Add section parm. (bfd_generic_lookup_section_flags): Likewise. * reloc.c (bfd_generic_lookup_section_flags): Likewise. * section.c (bfd_section): Move out section_flag_info. (BFD_FAKE_SECTION): Remove flag_info initializer. * targets.c (_bfd_lookup_section_flags): Add section parm. d1595 1 a1595 1 2012-05-14 Catherine Moore d1597 1 a1597 38 * archures.c (bfd_mach_ppc_vle): New. * bfd-in2.h: Regenerated. * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle. * elf32-ppc.c (split16_format_type): New enumeration. (ppc_elf_vle_split16): New function. (HOWTO): Add entries for R_PPC_VLE relocations. (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations. (ppc_elf_section_flags): New function. (ppc_elf_lookup_section_flags): New function. (ppc_elf_section_processing): New function. (ppc_elf_check_relocs): Handle PPC_VLE relocations. (ppc_elf_relocation_section): Likewise. (elf_backend_lookup_section_flags_hook): Define. (elf_backend_section_flags): Define. (elf_backend_section_processing): Define. * elf32-ppc.h (ppc_elf_section_processing): Declare. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15, BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A, BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A, BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A, BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21, BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A, BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A, BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations. 2012-05-11 Georg-Johann Lay PR target/13503 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Add entries for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. d1599 1 a1599 1 2012-05-10 H.J. Lu d1601 2 a1602 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32 addend overflow check. d1604 1 a1604 1 2012-05-10 DJ Delorie d1606 2 a1607 1 * elf32-rx.c (rx_elf_object_p): Ignore empty segments. d1609 1 a1609 1 2012-05-10 H.J. Lu d1611 4 a1614 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed hex number in x32 addend overflow check. d1616 1 a1616 1 2012-05-10 H.J. Lu d1618 3 a1620 2 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle R_X86_64_RELATIVE64. d1622 1 a1622 1 2012-05-09 H.J. Lu d1624 1 a1624 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend overflow for R_X86_64_RELATIVE64. d1626 1 a1626 1 2012-05-08 Ben Cheng d1628 13 a1640 2 * elf.c: Preserve the original p_align and p_flags if they are valid. d1642 1 a1642 1 2012-05-07 Alan Modra d1644 2 a1645 2 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update RELOC_AGAINST_DISCARDED_SECTION invocation. d1647 1 a1647 1 2012-05-07 Hans-Peter Nilsson d1649 2 a1650 2 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use local variable i_ instead of assuming and using a variable i. d1652 1 a1652 1 2012-05-07 Maciej W. Rozycki d1654 29 a1682 28 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound relocations. * elfxx-mips.c (mips_reloc_against_discarded_section): New function. (_bfd_mips_elf_relocate_section): Call it, in place of RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Update arguments to RELOC_AGAINST_DISCARDED_SECTION. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. d1684 9 a1692 2 * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. d1694 6 a1699 9 * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. d1701 8 a1708 4 * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. d1710 4 a1713 4 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. d1715 245 a1959 13 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. d1961 1 a1961 1 2012-05-05 Alan Modra d1963 28 a1990 3 PR ld/14052 PR ld/13621 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change. d1992 1 a1992 1 2012-05-05 Alan Modra d1994 60 a2053 22 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section and bfd_ind_section with their _ptr variants, or use corresponding bfd_is_* macros. * aout-ns32k.c: Likewise. * aout-tic30.c: Likewise. * coff-arm.c: Likewise. * coff-tic54x.c: Likewise. * cpu-ns32k.c: Likewise. * elf-attrs.c: Likewise. * elfcode.h: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * versados.c: Likewise. * section.c: Likewise. (bfd_abs_section, bfd_ind_section, bfd_com_section, bfd_ind_section): Delete. (std_section): New array replacing above. (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr, bfd_ind_section_ptr, STD_SECTION): Update. (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts. * bfd-in2.h: Regenerate. d2055 100 a2154 1 2012-05-03 Sean Keys d2156 2 a2157 100 * cpu-xgate.c: New file. Added XGATE support. * archures.c (bfd_architecture): Add XGATE architecture. (bfd_archures_list): Add reference to XGATE architecture info. * elf-bfd.h (prep_headers): Handle bfd_arch_xgate. * reloc.c: Add various XGATE relocation enums. * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector list. * Makefile.am: Add support for XGATE elf. * configure.in: Ditto. * config.bfd: Ditto. * Makefile.in: Regenerate. * configure: Ditto. * bfd-in2.h: Ditto. * libbfd.h: Ditto. Added files for XGATE relocations. * elf32-xgate.c: Created minimal relocation file. * elf32-xgate.h: Created minimal header file for elf32-xgate. 2012-05-03 Tristan Gingold * dwarf2.c (decode_line_info): Ignore DW_LNE_HP_source_file_correlation. 2012-05-01 Nick Clifton PR binutils/13121 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * elf32-arm.c: Likewise. * elf64-sparc.c: Likewise. * elflink.c: Likewise. * pdp11.c: Likewise. * rescoff.c: Likewise. 2012-04-26 Mark Wielaard * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc possibly being relative to DW_AT_low_pc. (parse_comp_unit): Likewise. 2012-04-26 Andreas Schwab * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references also when generating PIE. (elf_m68k_discard_copies): Mark undefined weak symbols referenced by relocations as dynamic. 2012-04-26 Hans-Peter Nilsson Provide a way for programs to recognize BFD_ASSERT calls. * bfd.c (bfd_assert_handler_type): New API type. (bfd_set_assert_handler, bfd_get_assert_handler): New API functions. (_bfd_assert_handler): New variable. (_bfd_default_assert_handler): New function. (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler. * libbfd-in.h (_bfd_assert_handler): Declare. * libbfd.h, bfd-in2.h: Regenerate. 2012-04-24 Hans-Peter Nilsson PR ld/13990 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local symbol, where PLT refcount is set to -1. 2012-04-24 Alan Modra PR ld/13991 * elf-bfd.h (_bfd_elf_link_just_syms): Define as _bfd_generic_link_just_syms. * elflink.c (_bfd_elf_link_just_syms): Delete. * linker.c (_bfd_generic_link_just_syms): Set sec_info_type. * bfd-in.h (discarded_section): Renamed from elf_discarded_section. * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * reloc.c: Update all references. * bfd-in2.h: Regenerate. d2159 6 a2164 1 2012-04-20 Andreas Krebbel d2166 1 a2166 2 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. d2168 2 a2169 1 2012-04-19 Thomas Schwinge d2171 1 a2171 4 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for got_type. (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use it. d2173 4 a2176 1 2012-04-17 Kaz Kojima d2178 1 a2178 2 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic relocations when LE conversion happens on the IE tls symbol. d2180 2 a2181 1 2012-04-17 Roland McGrath d2183 1 a2183 2 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding so that 32-byte boundary is a proper instruction boundary. d2185 3 a2187 1 2012-04-17 Tristan Gingold d2189 1 a2189 2 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to member of an object archive.< d2191 7 a2197 1 2012-04-17 Tristan Gingold d2199 1 a2199 6 * vms-lib.c (MAX_EKEYLEN): Define. (MAX_KEYLEN): Fix value. (vms_write_index): Add comments and fix indentation. Adjust comparaison. Add assertions. Free kbn_blk. (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN. Compense MAX_KEYLEN adjustment. d2201 3 a2203 1 2012-04-16 Maciej W. Rozycki d2205 1 a2205 2 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs. (_bfd_mips_elf_check_relocs): Update accordingly. d2207 3 a2209 1 2012-04-13 Alan Modra d2211 3 a2213 3 PR ld/13947 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for reloc sections. d2215 1 a2215 1 2012-04-12 David S. Miller d2217 5 a2221 11 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32, BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function. (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10. (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs. (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. d2223 1 a2223 1 2012-04-12 Roland McGrath d2225 3 a2227 23 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry): New variables. (struct elf32_arm_link_hash_table): New member `nacl_p'. (elf32_arm_link_hash_table_create): Initialize it. (elf32_arm_nacl_link_hash_table_create): New function. (arm_movw_immediate, arm_movt_immediate): New functions. (elf32_arm_populate_plt_entry): Test HTAB->nacl_p. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_plt_map_1): Likewise. (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec): New backend vector stanza. (elf32_arm_nacl_modify_segment_map): New function. * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*. * targets.c: Support bfd_elf32_{big,little}_nacl_vec. * configure.in: Likewise. (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here. (bfd_elf32_littlearm_nacl_vec): Likewise. (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise. (bfd_elf32_bigarm_symbian_vec): Likewise. (bfd_elf32_littlearm_symbian_vec): Likewise. (bfd_elf32_bigarm_vxworks_vec): Likewise. (bfd_elf32_littlearm_vxworks_vec): Likewise. * configure: Regenerated. d2229 1 a2229 1 2012-04-12 Tristan Gingold d2231 7 a2237 13 * elflink.c (elf_link_output_extsym): Add a guard. (bfd_elf_final_link): Remove assertion. (bfd_elf_final_link): Add a guard. * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed. (elfNN_vms_section_from_shdr, elfNN_vms_object_p) (elfNN_vms_post_process_headers, elfNN_vms_section_processing) (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup): Remove. (elfNN-ia64-vms target): Move to ... * elf64-ia64-vms.c: New file. * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo. (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c. d2239 2 d2242 35 d2278 1 a2278 1 2012-04-11 Nick Clifton d2280 85 a2364 33 PR binutils/13897 * elf64-ppc.c (opd_entry_value): When dealing with sections without relocs, keep the last section loaded in order to avoid unnecessary reloads. 2012-04-09 Roland McGrath * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs. * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs. (nacl_modify_program_headers): Likewise. 2012-04-03 Roland McGrath * elf-nacl.c: New file. * elf-nacl.h: New file. * elf32-i386.c (elf_backend_modify_segment_map): Define for bfd_elf32_i386_nacl_vec. (elf_backend_modify_program_headers): Likewise. * elf64-x86-64.c (elf_backend_modify_segment_map): Define for bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec. (elf_backend_modify_program_headers): Likewise. * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here. (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here. * Makefile.in: Regenerated. * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here. (bfd_elf32_x86_64_nacl_vec): Likewise. (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise. (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise. (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise. (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise. (bfd_elf32_i386_nacl_vec): Likewise. (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise. (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise. d2366 4 d2371 3 a2373 1 2012-03-31 Andreas Schwab d2375 1 a2375 2 * elf32-m68k.c (elf_m68k_relocate_section): Allow R_68K_TLS_LE{8,16,32} for PIE. d2377 44 a2420 1 2012-03-30 Andreas Krebbel d2422 2 a2423 3 * elf64-s390.c: Fix several comments regarding PLT entry description. * elf32-s390.c: Likewise. d2425 1 a2425 1 2012-03-30 Andreas Krebbel d2427 141 a2567 4 * elf64-s390.c: Use the section pointer shortcuts in elf_link_hash_table and remove them from the target specific variant. * elf32-s390.c: Likewise. d2569 10 a2578 1 2012-03-30 Andreas Krebbel d2580 1 a2580 10 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry): New definitions. (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove. (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32. (elf_s390_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry) (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry) (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions. (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*) (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove. d2582 2 a2583 1 2012-03-30 Andreas Krebbel d2585 1 a2585 3 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove. Rename all occurrences in the file to elf_dyn_relocs. * elf64-s390.c: Likewise. d2587 2 a2588 1 2012-03-30 Alan Modra d2590 1 a2590 2 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic libraries. d2592 1 a2592 1 2012-03-29 Alan Modra d2594 42 a2635 1 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete. d2637 21 d2659 1 a2659 1 2012-03-23 Alan Modra d2661 2 a2662 2 * elf.c (assign_file_positions_for_non_load_sections): Don't warn on empty alloc sections. d2664 1 a2664 1 2012-03-23 Alan Modra d2666 2 a2667 32 * linker.c (_bfd_nearby_section): New function, split out from.. (fix_syms): ..here. * bfd-in.h (_bfd_nearby_section): Declare. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't use text_index_section or data_index_section with ld -q or ld -r output relocs against stripped output sections. Instead use _bfd_nearby_section. 2012-03-23 Alan Modra PR binutils/13894 * elf64-ppc.c (opd_entry_value): Read full symbol table when sym hashes unavailable. 2012-03-21 Eliot Dresselhaus * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE for non-C6X objects. 2012-03-20 Kai Tietz PR ld/12742 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h. * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined. Add windows.h header include if HAVE_WINDOWS_H is defined. (dlerror): New static function if windows variant is used instead of dlfcn.h. (dlclose): Likewise. (dlopen): Likewise. (dlsym): Likewise. * configure: Regenerated. * config.in: Regenerated. d2669 1 a2669 1 2012-03-20 H.J. Lu d2671 12 a2682 17 PR ld/13880 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error for R_386_GOTOFF relocation against protected function if SYMBOLIC_BIND is true. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an error for R_X86_64_GOTOFF64 relocation against protected function when building executable or SYMBOLIC_BIND is true. 2012-03-16 Roland McGrath * config.bfd: Handle x86_64-*-nacl*. * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza. (bfd_elf32_x86_64_nacl_vec): Likewise. * targets.c: Support them. * configure.in: Likewise. * configure: Regenerated. d2684 1 a2684 1 2012-03-16 Matthew Gretton-Dann d2686 1 a2686 52 * elf32-arm.c (elf32_arm_attributes_accept_div): New function. (elf32_arm_attributes_forbid_div): Likewise. (elf32_arm_merge_eabi_attributes): Correct handling of Tag_DIV_use. 2012-03-15 Roland McGrath * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use elf_x86_64_backend_data parameters for plt_eh_frame. * elf64-x86-64.c (struct elf_x86_64_backend_data): New type. (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros. (elf_x86_64_arch_bed): New variable. (elf_backend_arch_data): New macro. (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_plt_sym_val): Likewise. (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data parameters for PLT details. (elf_x86_64_finish_dynamic_sections): Likewise. 2012-03-14 Roland McGrath * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up to the full size, padding out with nop instructions. 2012-03-12 Alan Modra * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn on zero size dynbss symbol. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise. d2688 1 a2688 1 2012-03-10 Edmar Wienskoski d2690 3 a2692 1 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. a2693 2 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. d2695 1 a2695 1 2012-03-09 H.J. Lu d2697 2 a2698 3 PR ld/13817 * elf32-i386.c (elf_i386_relocate_section): Restore R_386_IRELATIVE. d2700 1 a2700 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore R_X86_64_IRELATIVE. d2702 3 a2704 1 2012-03-08 Tristan Gingold d2706 1 a2706 3 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum keylen according to archive kind. Set nextvbn and nextrfa lhd fields. Add comments. d2708 28 a2735 1 2012-03-07 Nick Clifton d2737 62 a2798 30 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type field. (elf32_mn10300_link_hash_table): Add tls_ldm_got entry; (elf_mn10300_tdata): Define. (elf_mn10300_local_got_tls_type): Define. (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD, R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs. (mn10300_reloc_map): Likewise. (elf_mn10300_tls_transition): New function. (dtpoff, tpoff, mn10300_do_tls_transition): New functions. (mn10300_elf_check_relocs): Add TLS support. (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relocate_section): Likewise. (mn10300_elf_relax_section): Likewise. (elf32_mn10300_link_hash_newfunc): Initialise new field. (_bfd_mn10300_copy_indirect_symbol): New function. (elf32_mn10300_link_hash_table_create): Initialise new fields. (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support. (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise. (_bfd_mn10300_elf_reloc_type_class): Allocate an elf_mn10300_obj_tdata structure. (elf_backend_copy_indirect_symbol): Define. * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD, BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE, BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD, BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations. (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to alongside other MN10300 relocations. d2802 45 a2846 1 2012-03-06 Jakub Jelinek d2848 1 a2848 2 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE set relocate to TRUE. d2850 4 a2853 1 2012-03-05 Rainer Orth d2855 78 a2932 70 PR ld/12152 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore overflows for R_SPARC_UA32 in .stab sections. 2012-03-01 Alan Modra * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning. 2012-02-27 Alan Modra * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd before calling elf specific function. (sh_elf_osec_readonly_p): Test for error return from above. 2012-02-27 Alan Modra * elf32-spu.c (build_stub): Fix malloc under-allocation. 2012-02-25 Walter Lee * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL, BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD, BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD. Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE. * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro d2934 11 a2944 65 (tilepro_reloc_map): Ditto. (tilepro_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilepro_tls_translate_to_le): New. (tilepro_tls_translate_to_ie): New. (tilepro_elf_tls_transition): New. (tilepro_elf_check_relocs): Handle new tls relocations. (tilepro_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilepro_elf_relocate_section): Ditto. (tilepro_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New (insn_mask_X1_no_dest_no_srca): New (insn_mask_Y0_no_dest_no_srca): New (insn_mask_Y1_no_dest_no_srca): New (srca_mask_X0): New (srca_mask_X1): New (insn_tls_le_move_X1): New (insn_tls_le_move_zero_X0X1): New (insn_tls_ie_lw_X1): New (insn_tls_ie_add_X0X1): New (insn_tls_ie_add_Y0Y1): New (insn_tls_gd_add_X0X1): New (insn_tls_gd_add_Y0Y1): New * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx relocations. (tilegx_reloc_map): Ditto. (tilegx_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilegx_elf_link_hash_table): New field disable_le_transition. (tilegx_tls_translate_to_le): New. (tilegx_tls_translate_to_ie): New. (tilegx_elf_tls_transition): New. (tilegx_elf_check_relocs): Handle new tls relocations. (tilegx_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilegx_elf_relocate_section): Ditto. (tilegx_copy_bits): New. (tilegx_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New. (insn_mask_X1_no_dest_no_srca): New. (insn_mask_Y0_no_dest_no_srca): New. (insn_mask_Y1_no_dest_no_srca): New. (insn_mask_X0_no_operand): New. (insn_mask_X1_no_operand): New. (insn_mask_Y0_no_operand): New. (insn_mask_Y1_no_operand): New. (insn_tls_ie_ld_X1): New. (insn_tls_ie_ld4s_X1): New. (insn_tls_ie_add_X0X1): New. (insn_tls_ie_add_Y0Y1): New. (insn_tls_ie_addx_X0X1): New. (insn_tls_ie_addx_Y0Y1): New. (insn_tls_gd_add_X0X1): New. (insn_tls_gd_add_Y0Y1): New. (insn_move_X0X1): New. (insn_move_Y0Y1): New. (insn_add_X0X1): New. (insn_add_Y0Y1): New. (insn_addx_X0X1): New. (insn_addx_Y0Y1): New. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. d2946 4 a2949 1 2012-02-25 Walter Lee d2951 4 a2954 29 * config.bfd (tilegx-*-*): rename little endian vector; add big endian vector. (tilegxbe-*-*): New case. * configure.in (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): New vector. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): New vector. * configure: Regenerate. * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * targets.c (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): Declare. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): Declare. (_bfd_target_vector): Add / rename above vectors. * arctures.c (bfd_architecture): Define bfd_mach_tilegx32. * bfd-in2.h: Regenerate. * cpu-tilegx.c (bfd_tilegx32_arch): define. (bfd_tilegx_arch): link to bfd_tilegx32_arch. d2956 1 a2956 1 2012-02-24 Nick Clifton d2958 4 a2961 4 PR ld/13730 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an error message instead of aborting, when an outofrange reloc is encountered. d2963 1 a2963 1 2012-02-23 Iain Sandoe d2965 4 a2968 7 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New. (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc bit-fields when target and host differ in endian-ness. When PAIRs are non-scattered find the 'symbol' from the preceding reloc. Add FIXME re. reloc symbols on section boundaries. (bfd_mach_o_swap_out_non_scattered_reloc): New. (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc. d2970 1 a2970 1 2012-02-17 Iain Sandoe d2972 3 a2974 4 * mach-o-i386.c (i386_howto_table): Add support for 16 bit sect-diffs. (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs. (bfd_mach_o_i386_swap_reloc_out): Likewise. d2976 1 a2976 1 2012-02-17 Tristan Gingold d2978 4 a2981 6 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF): * libbfd.h: Regenerated. * bfd-in2.h: Likewise. * mach-o-i386.c (i386_howto_table): Include local sectdiff. (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff. (bfd_mach_o_i386_swap_reloc_out): Likewise. d2983 1 a2983 1 2012-02-17 Andreas Krebbel d2985 2 a2986 2 * elf32-s390.c (elf_s390_relocate_section): Support basr in the GD->LE and LD->LE optimizations. d2988 1 a2988 1 2012-02-16 Alan Modra d2990 7 a2996 2 PR binutils/13355 * elf32-rx.c (elf32_rx_relax_section): Correct width check. d2998 1 a2998 1 2012-02-13 Richard Henderson d3000 6 a3005 3 PR ld/13621 * linker.c (fix_syms): Force symbols outside any section into bfd_abs_section_ptr. d3007 1 a3007 1 2012-02-13 Alan Modra d3009 3 a3011 4 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function. * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare. * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define. * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define. d3013 1 a3013 2 2012-02-11 Jan Kratochvil Nick Clifton d3015 4 a3018 2 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized memset. d3020 1 a3020 1 2012-02-10 Iain Sandoe d3022 3 a3024 2 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section vma additions in their logical, rather than physical order. d3026 1 a3026 1 2012-02-10 Iain Sandoe d3028 1 a3028 6 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section parameters. * mach-o-x86-64.c (text_section_names_xlat): New. (mach_o_x86_64_segsec_names_xlat): New. (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat. * mach-o-i386.c (text_section_names_xlat): Correct section parameters. d3030 1 a3030 1 2012-02-10 Tristan Gingold d3032 2 a3033 2 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator to avoid infinite loop. Add comments. d3035 1 a3035 1 2012-02-09 H.J. Lu d3037 80 a3116 8 PR ld/13675 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte nop instructions. (bfd_arch_i386_short_nop_fill): New. (bfd_arch_i386_long_nop_fill): Likewise. Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info initializers. Use bfd_arch_i386_long_nop_fill on 64bit bfd_arch_info initializers. d3118 2 a3119 4 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ... (bfd_arch_i386_short_nop_fill): This. Update bfd_arch_info initializers. * cpu-l1om.c: Likewise. d3121 2 a3122 1 2012-02-08 Alan Modra d3124 4 a3127 3 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too. (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear the correct h->u.weakdef. d3129 74 a3202 1 2012-02-07 Alan Modra d3204 1 a3204 6 * elf.c (elf_find_function): Don't use internal_elf_sym. (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type parameter with asymbol. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype. (struct elf_backend_data ): Likewise. d3206 2 a3207 1 2012-02-02 Vidya Praveen (vidya.praveen@@atmel.com) d3209 1 a3209 3 PR bfd/13410 * elf32-avr.c (elf32_avr_relax_section): Correct the condition that qualifies the candidates for relaxation. d3211 3 a3213 1 2012-02-02 Tristan Gingold d3215 1 a3215 1 * bfdio.c (real_fopen): Remove unused vms_modes variable. d3217 5 a3221 1 2012-02-02 Tristan Gingold d3223 1 a3223 2 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized variable warning. d3225 1 a3225 1 2012-02-02 Tristan Gingold d3227 2 a3228 1 * archive.c (bfd_slurp_armap): Fix thinko in cast. d3230 4 a3233 1 2012-01-31 H.J. Lu d3235 1 a3235 4 PR ld/13616 * archures.c (bfd_arch_info): Add fill. (bfd_default_arch_struct): Add bfd_arch_default_fill. (bfd_arch_default_fill): New. d3237 48 a3284 2 * configure.in: Set bfd version to 2.22.52. * configure: Regenerated. d3286 1 a3286 77 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info initializer. * cpu-arc.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-cris.c: Likewise. * cpu-crx.c: Likewise. * cpu-d10v.c: Likewise. * cpu-d30v.c: Likewise. * cpu-dlx.c: Likewise. * cpu-epiphany.c: Likewise. * cpu-fr30.c: Likewise. * cpu-frv.c: Likewise. * cpu-h8300.c: Likewise. * cpu-h8500.c: Likewise. * cpu-hppa.c: Likewise. * cpu-i370.c: Likewise. * cpu-i860.c: Likewise. * cpu-i960.c: Likewise. * cpu-ia64.c: Likewise. * cpu-ip2k.c: Likewise. * cpu-iq2000.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m10200.c: Likewise. * cpu-m10300.c: Likewise. * cpu-m32c.c: Likewise. * cpu-m32r.c: Likewise. * cpu-m68hc11.c: Likewise. * cpu-m68hc12.c: Likewise. * cpu-m68k.c: Likewise. * cpu-m88k.c: Likewise. * cpu-mcore.c: Likewise. * cpu-mep.c: Likewise. * cpu-microblaze.c: Likewise. * cpu-mips.c: Likewise. * cpu-mmix.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-mt.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-openrisc.c: Likewise. * cpu-or32.c: Likewise. * cpu-pdp11.c: Likewise. * cpu-pj.c: Likewise. * cpu-plugin.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rl78.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-rx.c: Likewise. * cpu-s390.c: Likewise. * cpu-score.c: Likewise. * cpu-sh.c: Likewise. * cpu-sparc.c: Likewise. * cpu-spu.c: Likewise. * cpu-tic30.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-tic54x.c: Likewise. * cpu-tic6x.c: Likewise. * cpu-tic80.c: Likewise. * cpu-tilegx.c: Likewise. * cpu-tilepro.c: Likewise. * cpu-v850.c: Likewise. * cpu-vax.c: Likewise. * cpu-w65.c: Likewise. * cpu-we32k.c: Likewise. * cpu-xc16x.c: Likewise. * cpu-xstormy16.c: Likewise. * cpu-xtensa.c: Likewise. * cpu-z80.c: Likewise. * cpu-z8k.c: Likewise. * cpu-i386.c: Include "libiberty.h". (bfd_arch_i386_fill): New. Add bfd_arch_i386_fill to bfd_arch_info initializer. d3288 132 a3419 2 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer. * cpu-l1om.c: Likewise. d3421 2 a3422 2 * linker.c (default_data_link_order): Call abfd->arch_info->fill if fill size is 0. d3424 16 a3439 1 * bfd-in2.h: Regenerated. d3441 1 a3441 1 2012-01-27 Michael Eager d3443 90 a3532 2 * elf32-microblaze.c (create_got_section): Reuse existing .rela.got section. d3534 1 a3534 1 2012-01-23 Alan Modra d3536 2 a3537 33 * elf-bfd.h: Formatting. (struct elf_backend_data): Add "maybe_function_sym". (_bfd_elf_maybe_function_sym): Declare. * elfxx-target.h (elf_backend_maybe_function_sym): Define. (elfNN_bed): Init new field. * elf.c (elf_find_function): Use maybe_function_sym. (_bfd_elf_maybe_function_sym): New function. * elf64-ppc.c (elf_backend_maybe_function_sym): Define. (ppc64_elf_maybe_function_sym): New function. 2012-01-20 Francois Gouget PR binutils/13534 * archive.c (_bfd_ar_sizepad): New function. Correctly install and pad the size field in an archive header. (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan function for the archive size field. (bfd_generic_openr_next_archived_file): Likewise. (do_slurp_coff_armap): Likewise. (_bfd_write_archive_contents): Likewise. (_bfd_bsd44_write_ar_hdr): Use the new function. (bfd_ar_hdr_from_filesystem): Likewise. (_bfd_write_archive_contents): Likewise. (bsd_write_armap): Likewise. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_write_armap): Likewise. * bfdio.c (bfd_bread): Use correct type for archive element sizes. * ar.c (open_inarch): Likewise. (extract_file): Likewise. * libbfd-in.h (struct areltdata): Use correct types for parsed_size and extra_size fields. Prototype _bfd_ar_sizepad function. d3540 9 a3548 1 2012-01-20 Ulrich Weigand d3550 1 a3550 5 * elf.c (elfcore_write_prpsinfo): Provide unconditionally. Return NULL if core file generation is unsupported. (elfcore_write_prstatus): Likewise. * elf32-arm.c (elf32_arm_nabi_write_core_note): New function. (elf_backend_write_core_note): Define. d3552 1 a3552 1 2012-01-19 Tristan Gingold d3554 1 a3554 2 * pef.c: Add a comment. * xsym.c: Likewise. d3556 10 a3565 1 2012-01-17 Alan Modra d3567 1 a3567 3 * elf32-ppc.c (ppc_elf_write_core_note ): Don't leave trailing garbage in the note. * elf64-ppc.c (ppc64_elf_write_core_note ): Likewise. d3569 1 a3569 1 2012-01-16 Daniel Green d3571 1 a3571 4 PR ld/13491 * coff-i386.c (coff_i386_rtype_to_howto ): Test h->root.type not h->type. * coff-x86_64.c (coff_amd64_rtype_to_howto ): Likewise. d3573 2 a3574 1 2012-01-13 Iain Sandoe d3576 16 a3591 2 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute indirect symbols. d3593 1 a3593 1 2012-01-13 Iain Sandoe d3595 1 a3595 2 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file position from here... to (bfd_mach_o_build_seg_command): Here. d3597 1 a3597 1 2012-01-12 Iain Sandoe d3599 4 a3602 4 * mach-o.c (bfd_mach_o_count_indirect_symbols): New. (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table. * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the file. (bfd_mach_o_section): Add indirect_syms field. d3604 1 a3604 1 2012-01-11 Iain Sandoe d3606 4 a3609 3 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of vmsize from filesize. Don't compute offsets or file sizes for zerofill sections. d3611 1 a3611 1 2012-01-11 Iain Sandoe d3613 4 a3616 2 * mach-o.c (bfd_mach_o_build_commands): Make the building of each command type independent. d3618 1 a3618 1 2012-01-11 Alan Modra d3620 32 a3651 200 * elf64-ppc.c: Define more insns used in plt call stubs. (ppc64_elf_brtaken_reloc): Assume isa version 2 or above. (ppc64_elf_relocate_section): Likewise. (enum ppc_stub_type): Add ppc_stub_plt_call_r2save. (struct ppc_link_hash_table): Increase size of stub_count array. Add plt_stub_align and plt_thread_safe. (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define. (plt_stub_size, plt_stub_pad): New functions. (build_plt_stub): Emit barriers for power7 thread safety. Don't emit needless save of r2. (build_tls_get_addr_stub): Adjust params. (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning plt stubs. Adjust build_*plt_stub calls. (ppc_size_one_stub): Similarly. (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align params. Choose default for plt_thread_safe based on existence of calls to thread creation functions. Modify plt_call to plt_call_r2save when no tocsave reloc found. Align tail of stub sections. (ppc64_elf_build_stubs): Align tail of stub sections. Adjust output of stub statistics. (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save. * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype. 2012-01-10 H.J. Lu PR ld/13581 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P check on R_X86_64_PCXX. 2012-01-10 Tristan Gingold * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false warning. 2012-01-10 Tristan Gingold * bfdio.c (bfd_tell): Handle nested archives. (bfd_seek): Ditto. * cache.c (bfd_cache_lookup_worker): Ditto. * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with nested archives. (bfd_generic_openr_next_archived_file): Likewise. 2012-01-09 Iain Sandoe * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement. (bfd_mach_o_write_symtab): Remove handling for indirect syms. (bfd_mach_o_primary_symbol_sort_key): Likewise. (bfd_mach_o_cf_symbols): Likewise. (bfd_mach_o_sort_symbol_table): Remove. (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling for indirect and dysymtab counts. Do the symbol sorting here. (bfd_mach_o_build_dysymtab_command): Count the symbol types here. Make the indirect symbols a TODO. (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols. (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with a non-zero value. (bfd_mach_o_read_symtab_symbol): Record the symbol index. (bfd_mach_o_read_symtab_symbol): Adjust recording of global status. * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries. (IS_MACHO_INDIRECT): Remove. (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New. 2012-01-06 Nick Clifton PR binutils/13121 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. 2012-01-06 Tristan Gingold * bfdio.c (bfd_bread): Use arelt_size macro. 2012-01-06 Tristan Gingold * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs. 2012-01-05 Nick Clifton PR ld/12161 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if necessary. 2012-01-05 Jan Kratochvil Fix zero registers core files when built by gcc-4.7. * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and size. Call elfcore_write_note for the local variables. Remove the final elfcore_write_note call. Add NOTREACHED comments. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function. (bfd_mach_o_generic_stat_arch_elt): Adjust. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_member_init): New function. (bfd_mach_o_openr_next_archived_file): Reindent. Adjust to call bfd_mach_o_fat_member_init. (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init. 2012-01-04 Tristan Gingold * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1, BFD_RELOC_MACH_O_X86_64_PCREL32_2, BFD_RELOC_MACH_O_X86_64_PCREL32_4, BFD_RELOC_MACH_O_X86_64_BRANCH32, BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, BFD_RELOC_MACH_O_X86_64_GOT. 2012-01-04 Tristan Gingold * mach-o.h (bfd_mach_o_fvmlib_command): New structure. (bfd_mach_o_load_command): Add fvmlib field. * mach-o.c (bfd_mach_o_read_fvmlib): New function. (bfd_mach_o_read_command): Handle fvmlib. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_convert_architecture): Reindent. Decode msubtype for ARM. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments. 2012-01-04 Tristan Gingold * mach-o.h: Reindent header. (bfd_mach_o_encryption_info_command): New structure. (bfd_mach_o_load_command): Add encryption_info field. * mach-o.c (bfd_mach_o_read_encryption_info): New function. (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO. (bfd_mach_o_read_command): Adjust error message. 2012-01-04 Shinichiro Hamaji * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part which reads DWARF2 and stores in stash from find_line. (find_line) Call _bfd_dwarf2_slurp_debug_info. * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration. * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate. * mach-o.c (dsym_subdir): The name of subdir where debug information may be stored. (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose type is UUID. (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is corresponding to the executable. (bfd_mach_o_find_dsym): New. Find a debug information BFD in the specified binary file. (bfd_mach_o_follow_dsym): New. Find a debug information BFD for the original BFD. (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O executables, dylibs, and bundles. (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file. * mach-o.h (dsym_bfd): The BFD of the dSYM file. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index for stabd symbols. (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs. (bfd_mach_o_cf_symbols): Likewise. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index as the value of an indirect symbol. Keep the string table index in non-indirect syms for reference. (bfd_mach_o_write_dysymtab): New. (bfd_mach_o_primary_symbol_sort_key): New. (bfd_mach_o_cf_symbols): New. (bfd_mach_o_sort_symbol_table): New. (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols. If we are emitting a dysymtab, process indirect symbols and count the number of each other kind. (bfd_mach_o_mangle_sections): New. (bfd_mach_o_write_contents): Split out some pre-requisite code into the command builder. Write dysymtab if the command is present. (bfd_mach_o_count_sections_for_seg): New. (bfd_mach_o_build_seg_command): New. (bfd_mach_o_build_dysymtab_command): New. (bfd_mach_o_build_commands): Reorganize to support the fact that some commands are optional and should not be emitted if there are no sections or symbols. (bfd_mach_o_set_section_contents): Amend comment. * mach-o.h: Amend and add to comments. (mach_o_data_struct): Add fields for dysymtab symbols counts and a pointer to the indirects, when present. (bfd_mach_o_should_emit_dysymtab): New macro. (IS_MACHO_INDIRECT): Likewise. d3653 1 a3653 1 For older changes see ChangeLog-2011 @ 1.2 log @Pull in fixes from binutils_2_19 branch. Bump version and re-run mknative to pick up. @ text @d1 1 a1 1 2009-03-02 Alan Modra d3 236 a238 29 2009-02-15 Alan Modra * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx, add toc.symndx and toc.add. (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here. Set up toc.add. (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all callers. (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd. (branch_reloc_hash_match): New function, extracted from.. (ppc64_elf_tls_optimize): ..here. (ppc64_elf_relocate_section): Properly set addends when optimizing tls sequences. Avoid unnecessary reading and writing of insns. Only redo reloc when symbol changed. Bypass symbol checks when using tlsld_got. * elf32-ppc.c (ppc_elf_tls_setup): Correct comment. (branch_reloc_hash_match): New function, extracted from.. (ppc_elf_tls_optimize): ..here. (ppc_elf_relocate_section): Avoid unnecessary reading of insns. Don't clear addend on zapped __tls_get_addr reloc. 2009-02-01 Jan Kratochvil * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove. (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs. 2009-01-26 Nathan Sidwell * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs describing the trampolines. (ppc_elf_relocate_section): Update relocs to describe the trampolines. d240 108 a347 4 2009-01-22 Alan Modra PR 6832 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until after comp_unit_find_line call. d349 29 a377 55 2009-01-14 Alan Modra PR 9735 * syms.c (_bfd_stab_section_find_nearest_line): Don't free saved filename, use bfd_alloc rather than bfd_malloc for it. 2009-01-11 Jan Kratochvil * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'. 2008-12-11 Alan Modra PR 7041 * elf64-ppc.c (func_desc_adjust): Correct logic making fake function descriptors. Similarly correct making function descriptors dynamic. 2008-11-14 Nathan Sidwell * elf.c (assign_file_positions_for_load_sections): Use header_size to avoid moving the load address of file headers. (assign_file_positions_for_load_sections): Set header_size for segments containing the file header. 2008-11-13 Hans-Peter Nilsson PR ld/7028 * elf.c (assign_file_positions_for_load_sections): Allocate phrds with bfd_zalloc2 instead of bfd_alloc2. For the amount, use the possibly-preset header-size, not the computed one. 2008-11-13 Alan Modra PR 7023 * elf.c (bfd_section_from_shdr ): Fail on invalid sh_info. 2008-11-11 Alan Modra PR 7012 * dwarf2.c (find_line): Don't keep stale pointers into realloc'd memory. Return on errors. Fix memory leak. (_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer. 2008-10-10 Nathan Froyd * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge Tag_GNU_Power_ABI_Struct_Return. 2008-10-03 Alan Modra * elf.c (bfd_elf_set_group_contents): Assign sh_info for ld -r when the signature symbol is global. * elflink.c (elf_link_input_bfd): Ensure group signature symbol is output when ld -r. Set group sh_info when local. * linker.c (default_indirect_link_order): Handle group sections specially. 2008-09-28 Alan Modra * elf.c (_bfd_elf_init_private_section_data): Tweak union copy. (bfd_section_from_shdr): Don't change SHT_GROUP section name. * elflink.c (section_signature): New function. (_bfd_elf_section_already_linked): Use it. 2009-02-15 Bjoern Haase d379 1 a379 2 PR 9841 * elf32-avr.c: Handle case where no local symbos exist correctly. d381 2 a382 1 2009-02-04 Eric B. Weddington d384 1 a384 1 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound. d386 2 a387 1 2009-02-03 Tristan Gingold d389 3 d393 1 a393 1 * Makefile.in: Regenerated. d395 1 a395 1 2009-02-02 Tristan Gingold d397 1 a397 1 * configure.in: Bump version to 2.19.1 d399 1 a399 1 * configure, Makefile.in: Regenerated. d401 1 a401 1 2009-01-14 Joseph Myers d403 3 a405 3 * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn branches to undefine weak symbols into branches to the next instruction if creating PLT entries for those symbols. d407 1 a407 1 2008-12-23 Nick Clifton d409 5 a413 2 * Import this patch from the mainline: 2008-11-10 Andreas Schwab d415 1 a415 3 PR 7011 * elf.c (assign_file_positions_for_non_load_sections): Handle PT_GNU_RELRO specially. d417 1 a417 1 2008-11-20 Alan Modra d419 5 a423 4 * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for TLS_LD even when symbol is used with other TLS reloc types. (ppc_elf_relocate_section): Bypass symbol checks when using tlsld_got. Leave addend zero on LD DTPMOD dynamic reloc. d425 1 a425 1 2008-11-17 Eric B. Weddington d427 2 a428 3 PR 7022 * elf32-avr.c (bfd_elf_avr_final_write_processing): Add missing break statements. d430 1 a430 1 2008-10-28 Tristan Gingold d432 2 a433 3 * configure.in: Bump version to 2.19.0 * Makefile.am (RELEASE): Unset. * configure, Makefile.in: Regenerated. d435 1 a435 1 2008-10-16 Tristan Gingold d437 2 a438 3 * configure.in: Bump version to 2.19 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerated. d440 1 a440 1 2008-10-09 Tristan Gingold d442 2 a443 2 * configure.in: Bump version to 2.18.93 * configure: Regenerated. d445 1 a445 1 2008-10-09 Alan Modra d447 1 a447 2 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't attempt to read plt relocs if no dynamic syms. d449 1 a449 1 2008-10-08 Alan Modra d451 1 a451 3 * elf.c (assign_file_positions_for_load_sections): When checking a segment for contents, don't assume that a non-TLS nobits section must only be followed by nobits sections. d453 1 a453 1 2008-10-02 Tristan Gingold d455 4 a458 2 * configure.in: Bump version to 2.18.92 * configure: Regenerated. d460 1 a460 1 2008-09-30 Alan Modra d462 2 a463 6 PR 6789 * elf.c (assign_file_positions_for_load_sections): Call _bfd_elf_map_sections_to_segments, not elf_modify_segment_map. (get_program_header_size): Protect against NULL info. (_bfd_elf_map_sections_to_segments): Likewise. * elf32-spu.c (spu_elf_additional_program_headers): Likewise. d465 1 a465 1 2008-09-29 Nick Clifton d467 4 a470 1 * po/vi.po: Updated Vietnamese translation. d472 1 a472 1 2008-09-19 Alan Modra d474 2 a475 2 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Handle vxworks _GLOBAL_OFFSET_TABLE_ in .got.plt section. Add BFD_ASSERTs. d477 1 a477 2 2008-09-17 H.J. Lu Daniel Jacobowitz d479 14 a492 14 PR ld/3191 * dwarf2.c (struct adjusted_section): Renamed from struct loadable_section. (struct dwarf2_debug): Adjust for renaming. Add version field. (read_attribute_value): Correctly handle DW_FORM_ref_addr for DWARF3. (find_abstract_instance_name): Pass a pointer to attribute instead of offset. For DW_FORM_ref_addr, get the entry at the offset from the .debug_info section. (scan_unit_for_symbols): Update. (parse_comp_unit): Allow DWARF3. Save the version. (unset_sections): Update for renaming. (place_sections): Likewise. Set new VMAs for DWARF sections also. d494 1 a494 1 2008-09-17 Bob Wilson d496 2 a497 1 * elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative refcount. d499 1 a499 1 2008-09-17 Tristan Gingold d501 64 a564 2 * configure.in: Bump version to 2.18.91 * configure: Regenerated. d566 27 a592 1 2008-09-17 Jan Kratochvil d594 2 a595 3 PR 6893 - Do not consider FDEs for discarded sections as invalid. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS. Consider FDEs with cleared relocations as valid and ignorable. d597 2 a598 1 2008-09-16 Alan Modra d600 2 a601 6 PR 6844 * elf32-ppc.c (SYM_VAL): Define. Use throughout to find symbol vma. (ppc_elf_relocate_section): Correct GOT offset calculation. (ppc_elf_finish_dynamic_symbol): Use PPC_HA and PPC_LO. (ppc_elf_finish_dynamic_sections): Likewise. Error if htab->elf.hgot symbol is not defined in htab->got section. d603 1 a603 1 2008-09-16 Alan Modra d605 64 a668 4 PR 6888 * elf32-ppc.c (ppc_elf_relocate_section): Handle NULL symbol section on R_PPC_TOC16, R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA, R_PPC_SECTOFF* relocs. d670 1 a670 1 2008-09-09 Tristan Gingold d672 1 a672 2 * configure.in: Bump version to 2.18.90 * configure: Regenerate. d674 1 a674 1 2008-09-09 Alan Modra d676 2 a677 3 * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * po/bfd.pot: Regenerate. d679 1 a679 1 2008-09-05 Daniel Jacobowitz d681 4 a684 1 * dwarf2.c: Change leading whitespace to tabs. d686 1 a686 1 2008-09-05 Tristan Gingold d688 4 a691 130 Add MacOSX 64 bits support. * mach-o.h (bfd_mach_o_ppc_thread_flavour): Add BFD_MACH_O_PPC_THREAD_STATE_64. (bfd_mach_o_i386_thread_flavour): Add BFD_MACH_O_x86_THREAD_STATE64, BFD_MACH_O_x86_FLOAT_STATE64, BFD_MACH_O_x86_EXCEPTION_STATE64, BFD_MACH_O_x86_THREAD_STATE, BFD_MACH_O_x86_FLOAT_STATE, BFD_MACH_O_x86_EXCEPTION_STATE. (bfd_mach_o_load_command_type): Add BFD_MACH_O_LC_SEGMENT_64, BFD_MACH_O_LC_ROUTINES_64, BFD_MACH_O_LC_UUID. (BFD_MACH_O_CPU_IS64BIT): Added. (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_POWERPC_64, BFD_MACH_O_CPU_TYPE_X86_64. (bfd_mach_o_header): Add version field. (bfd_mach_o_section) Add reserved3 field. (bfd_mach_o_segment_command): Add initprot and maxprot fields. * mach-o.c (N_TEXT, N_DATA, N_BSS): Added. (bfd_mach_o_version): New function. (bfd_mach_o_valid): Handle 64bits cpus. (bfd_mach_o_write_header): handler 64bits headers. (bfd_mach_o_scan_write_section_32, bfd_mach_o_scan_write_section_64): New functions (from bfd_mach_o_scan_write_section) to handle both flavors. (bfd_mach_o_scan_write_segment): Parameter wide added to support both flavors. (bfd_mach_o_write_contents): Support both flavors. (bfd_mach_o_read_header): Ditto. (bfd_mach_o_scan_read_section_32, bfd_mach_o_scan_read_section_64): New functions (from bfd_mach_o_scan_read_section) to support both flavors. (bfd_mach_o_scan_read_symtab_symbol): Support both flavors. (bfd_mach_o_scan_read_symtab): Ditto. (bfd_mach_o_scan_read_segment): Parameter wide added to support both flavors. (bfd_mach_o_scan_read_segment_32, bfd_mach_o_scan_read_segment_64): New functions to call bfd_mach_o_scan_read_segment. (bfd_mach_o_flatten_sections): Support both flavors. (bfd_mach_o_scan_start_address): Ditto. (bfd_mach_o_scan): Ditto. (bfd_mach_o_lookup_section): Ditto. 2008-08-27 John David Anglin * elf-hppa.h (elf_hppa_reloc_final_type): Handle R_PARISC_GPREL64, R_PARISC_SEGREL32 and R_PARISC_SEGREL64. * som.c (som_fixup_formats): Add R_DATA_GPREL fixup. (som_hppa_howto_table): Likewise. (hppa_som_gen_reloc_type): In case R_HPPA_GOTOFF, detect R_DATA_GPREL final type. (som_write_fixups): Handle R_DATA_GPREL. 2008-08-26 Nick Clifton * elf32-arm.c: Fix up comment describing Thumb to ARM interworking stub. 2008-08-25 Christophe Lyon * elf32-arm.c (arm_thumb_arm_v4t_short_branch_stub): Define. (elf32_arm_stub_type): Add arm_thumb_arm_v4t_stub_short_branch. (arm_type_of_stub): Handle armv4t short branches. Update prototype. (arm_stub_is_thumb): Handle arm_thumb_arm_v4t_stub_short_branch. (arm_build_one_stub): Likewise. (arm_size_one_stub): Likewise. (elf32_arm_size_stubs): Use new arm_type_of_stub prototype. (arm_map_one_stub): Handle arm_thumb_arm_v4t_stub_short_branch. 2008-08-24 Andreas Schwab * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Do proper extension when calculating difference of offsets. 2008-08-24 Alan Modra * configure.in: Update a number of obsolete autoconf macros. * aclocal.m4: Regenerate. 2008-08-23 Andreas Schwab * opncls.c (find_separate_debug_file): Use the canonical absolute name of the bfd object for finding the debug file in the global debugfile directory. 2008-08-22 Jakub Jelinek Fix PR ld/3290 regression for cross-files DW_FORM_ref_addr relocations. * elflink.c (elf_link_add_object_symbols): Make debug symbols local now only for non-RELOCATABLE targets. 2008-08-20 Bob Wilson * elf-bfd.h (elf_object_id): Add XTENSA_ELF_TDATA. * elf32-xtensa.c (elf_howto_table): Add TLS relocations. (elf_xtensa_reloc_type_lookup): Likewise. (TCB_SIZE): Define. (elf_xtensa_link_hash_entry): New. (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE, GOT_TLS_ANY): Define. (elf_xtensa_hash_entry): Define. (elf_xtensa_obj_tdata): New. (elf_xtensa_tdata): Define. (elf_xtensa_local_got_tls_type): Define. (elf_xtensa_local_tlsfunc_refcounts): Define. (is_xtensa_elf): Define. (elf_xtensa_mkobject): New. (elf_xtensa_link_hash_table): Add tlsbase field. (elf_xtensa_link_hash_newfunc): New. (elf_xtensa_link_hash_table_create): Use elf_xtensa_link_hash_newfunc. Create an entry for "_TLS_MODULE_BASE_" and save it in tlsbase field. (elf_xtensa_copy_indirect_symbol): New. (elf_xtensa_check_relocs): Rewrite to handle TLS relocations. (elf_xtensa_gc_sweep_hook): Likewise. (elf_xtensa_allocate_dynrelocs): Optimize away GOT entries for TLSDESC_FN relocations when an IE reference is seen. (elf_xtensa_allocate_local_got_size): Likewise. (elf_xtensa_always_size_sections): New. (dtpoff_base, tpoff): New. (elf_xtensa_do_reloc): Handle TLS relocations. (replace_tls_insn): New. (IS_XTENSA_TLS_RELOC): Define. (elf_xtensa_relocate_section): Handle TLS relocations. (get_indirect_call_dest_reg): New. (bfd_elf32_mkobject): Define. (elf_backend_always_size_sections): New. (elf_backend_copy_indirect_symbol): New. * reloc.c (BFD_RELOC_XTENSA_TLSDESC_FN, BFD_RELOC_XTENSA_TLSDESC_ARG) (BFD_RELOC_XTENSA_TLS_DTPOFF, BFD_RELOC_XTENSA_TLS_TPOFF) (BFD_RELOC_XTENSA_TLS_FUNC, BFD_RELOC_XTENSA_TLS_ARG) (BFD_RELOC_XTENSA_TLS_CALL): New. d693 114 d809 1 a809 1 2008-08-18 Richard Sandiford d811 99 a909 2 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Copy MIPS16 stub information. d911 1 a911 1 2008-08-17 Nick Clifton d913 2 a914 7 * elf32-arm.c: Tidy up the code. (bfd_elf32_arm_allocate_interworking_sections): Move common code into... (arm_allocate_glue_section_space): ... New function. (bfd_elf32_arm_add_glue_sections_to_bfd): Move common code into... (arm_make_glue_section): ... New function. d916 1 a916 2 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation where the sym_hashes are not available. d918 5 a922 1 2008-08-17 Alan Modra d924 1 a924 4 * bfd.c (struct _bfd): Correct outsymbols comment. * bfd-in2.h: Regenerate. * linker.c (bfd_generic_link_read_symbols): Renamed from.. (generic_link_read_symbols): ..this, and made global. d926 1 a926 1 2008-08-15 Alan Modra a927 5 PR 6526 * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. d930 13 a942 1 2008-08-14 Jaka Močnik d944 2 a945 1 * coffgen.c (coff_find_nearest_line): Correct cached line index. d947 1 a947 1 2008-08-12 Alan Modra d949 1 a949 7 * elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when !dynamic_sections_created. Don't make symbols with got references dynamic if !dynamic_sections_created. * elf64-ppc.c (allocate_dynrelocs): Likewise. Alloc dynamic relocs on undefined symbols. (ppc64_elf_relocate_section): Allow dynamic relocs on undefined symbols. d951 1 a951 1 2008-08-11 Alan Modra d953 1 a953 2 * elf64-ppc.c (toc_adjusting_stub_needed): Any call via the plt needs r2 valid, not just those to external syms. d955 1 a955 1 2008-08-09 Pedro Alves d957 2 a958 2 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat st_mtime to long before comparison. d960 1 a960 1 2008-08-08 Anatoly Sokolov d962 11 a972 165 * archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35, bfd_mach_avr51): New. * bfd-in2.h: Regenerate. * cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51 architectures. Change comments to match architecture comments in GCC. (compatible): Add test for new AVR architectures. * elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51. (elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31, E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51. 2008-08-08 Richard Sandiford Daniel Jacobowitz Catherine Moore Mark Shinwell Maxim Kuvyrkov * elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with... (elf_mips_copy_howto): ...this howto. Clear the size fields. (mips_vxworks_jump_slot_howto_rela): Replace with... (elf_mips_jump_slot_howto): ...this howto. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY and BFD_RELOC_MIPS_JUMP_SLOT. (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and "R_MIPS_JUMP_SLOT". (mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT. (elf_backend_plt_readonly): Define. (elf_backend_plt_sym_val): Define for non-VxWorks targets. (mips_vxworks_bfd_reloc_type_lookup): Delete. (mips_vxworks_bfd_reloc_name_lookup): Likewise. (mips_vxworks_rtype_to_howto): Likewise. (elf_backend_want_dynbss): Don't define for VxWorks. (elf_backend_plt_readonly): Likewise. (bfd_elf32_bfd_reloc_type_lookup): Likewise. (bfd_elf32_bfd_reloc_name_lookup): Likewise. (elf_backend_mips_rtype_to_howto): Likewise. (elf_backend_adjust_dynamic_symbol): Likewise. (elf_backend_got_symbol_offset): Don't define. * elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY and BFD_RELOC_MIPS_JUMP_SLOT. (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and "R_MIPS_JUMP_SLOT". (mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT. (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly) (elf_backend_plt_sym_val): Define. * elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New. (bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY and BFD_RELOC_MIPS_JUMP_SLOT. (bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and "R_MIPS_JUMP_SLOT". (mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT. (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly) (elf_backend_plt_sym_val): Define. * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete. (_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs) (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare. * elfxx-mips.c (mips_elf_la25_stub): New structure. (LA25_LUI, LA25_J, LA25_ADDIU): New macros. (mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs" and "has_nonpic_branches" fields. Remove "is_relocation_target" and "is_branch_target". (mips_elf_link_hash_table): Add blank lines. Add "use_plts_and_copy_relocs", "reserved_gotno", "strampoline", "la25_stubs" and "add_stub_section" fields. (mips_htab_traverse_info): New structure. (PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros. (MIPS_RESERVED_GOTNO): Delete. (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry) (mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables. (mips_elf_link_hash_newfunc): Update after the changes to mips_elf_link_hash_entry. (mips_elf_check_mips16_stubs): Replace the DATA parameter with an INFO parameter. Don't look through warnings symbols here; do it in mips_elf_check_symbols instead. (mips_elf_create_stub_symbol): New function. (mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions. (_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise. (mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise. (mips_elf_add_la25_stub, mips_elf_check_symbols): New functions. (mips_elf_gotplt_index): Check for VxWorks. (mips_elf_output_dynamic_relocation): Take the relocation index as an extra parameter. Do not increment reloc_count here. (mips_elf_initialize_tls_slots): Update the calls to mips_elf_output_dynamic_relocation accordingly. (mips_elf_multi_got): Use htab->reserved_gotno instead of MIPS_RESERVED_GOTNO. (mips_elf_create_got_section): Don't allocate reserved GOT entries here. Unconditionally create .got.plt, but don't set its alignment here. (mips_elf_relocation_needs_la25_stub): New function. (mips_elf_calculate_relocation): Redirect branches and jumps to a non-PIC stub if one exists. Check !h->has_static_relocs instead of !htab->is_vxworks when deciding whether to create dynamic relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64. (_bfd_mips_elf_create_dynamic_sections): Unconditionally call _bfd_elf_create_dynamic_sections. Unconditionally set up htab->splt and htab->sdynbss. Set htab->srelplt to ".rel.plt" if !htab->is_vxworks. Add non-VxWorks values of htab->plt_header_size and htab->plt_entry_size. (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for non-branch static relocations. Set has_nonpic_branches when an la25 stub might be required. Set can_make_dynamic_p to TRUE if R_MIPS_32, R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic, rather than duplicating the condition. Do not make them dynamic for read-only sections in non-PIC executable objects. Do not protect this code with dynobj == NULL || htab->sgot == NULL; handle each group of cases separately. Add a default case that sets has_static_relocs for non-GOT relocations that cannot be made dynamic. Don't set is_relocation_target and is_branch_target. Reject non-PIC static relocations in shared objects. (_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into... (_bfd_mips_elf_adjust_dynamic_symbol): ...here, using htab->use_plts_and_copy_relocs instead of htab->is_vxworks to select PLT and copy-reloc handling. Set the alignment of .plt and .got.plt when allocating the first entry. Generalize code to handle REL as well as RELA sections and 64-bit as well as 32-bit GOT entries. Complain if we find a static-only reloc against an externally-defined symbol and if we cannot create dynamic relocations for it. Allocate copy relocs using mips_elf_allocate_dynamic_relocations on non-VxWorks targets. Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs. Skip reserved .got.plt entries. (_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols instead of mips_elf_check_mips16_stubs to process each symbol. Do the traversal for relocatable objects too. (mips_elf_lay_out_got): Use htab->reserved_gotno instead of MIPS_RESERVED_GOTNO. (_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it is empty. Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling to non-VxWorks targets. Only add DT_REL{,A}, DT_REL{,A}SZ and DT_REL{,A}ENT if .rel.dyn is nonempty. Create a symbol for the PLT. Allocate a nop at the end of the PLT. Allocate DT_MIPS_PLTGOT. (mips_elf_create_la25_stub_info): New function. (_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries and copy relocs where necessary. Check pointer_equality_needed. (mips_finish_exec_plt): New function. (_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT to the beginning of htab->sgot. Use htab->reserved_gotno instead of MIPS_RESERVED_GOTNO. Assert htab->use_plts_and_copy_relocs instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL. Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets. Use mips_finish_exec_plt to create non-VxWorks PLT headers. Set DT_MIPS_PLTGOT. (_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs from the indirect symbol to the direct symbol. Also copy has_nonpic_branches for indirect symbols. (_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and DT_MIPS_RWPLT. (_bfd_mips_elf_link_hash_table_create): Initialize the new mips_elf_link_hash_table fields. (_bfd_mips_vxworks_link_hash_table_create): Set use_plts_and_copy_relocs to TRUE. Use TRUE rather than 1 when setting is_vxworks. (_bfd_mips_elf_use_plts_and_copy_relocs): New function. (_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for each la25_stub. (_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects as PIC. Generalize message about linking PIC and non-PIC. (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New functions. * reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT. * bfd-in2.h: Regenerated. d974 1 a974 1 2008-08-08 Alan Modra d976 38 a1013 62 * elf.c (bfd_elf_get_elf_syms): Don't leak memory on error. * elflink.c (_bfd_elf_link_read_relocs): bfd_release on error. (elf_link_add_object_symbols): Don't leak memory on error. (bfd_elf_size_dynsym_hash_dynstr): Likewise. (elf_fixup_link_order): Free sections. 2008-08-07 Richard Sandiford * elf-bfd.h (elf_backend_data): Add a "rela_plts_and_copies_p" field. * elfxx-target.h (elf_backend_rela_plts_and_copies_p): New macro. (elfNN_bed): Use it. * elf.c (_bfd_elf_get_synthetic_symtab): Use rela_plts_and_copies_p instead of default_use_rela_p to choose between ".rel.plt" and ".rela.plt". * elflink.c (_bfd_elf_create_dynamic_sections): Use rela_plts_and_copies_p instead of default_use_rela_p to choose between ".rel.plt" and ".rela.plt", and between ".rel.bss" and ".rela.bss". 2008-08-07 Richard Sandiford * elf-bfd.h (MIPS_ELF_TDATA): New elf_object_id. * elf32-mips.c (bfd_elf32_mkobject): Define. * elf64-mips.c (bfd_elf64_mkobject): Likewise. * elfn32-mips.c (bfd_elf32_mkobject): Likewise. * elfxx-mips.h (_bfd_mips_elf_mkobject): Declare. * elfxx-mips.c (is_mips_elf): New macro. (_bfd_mips_elf_mkobject): New function. (_bfd_mips_elf_final_link): Use is_mips_elf. (_bfd_mips_elf_merge_private_bfd_data): Likewise. 2008-08-07 Richard Sandiford * elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a global GOT entry when deferring allocation of dynamic relocations. (allocate_dynrelocs): When allocating deferred dynamic relocations, also do the deferred allocation of a GOT entry. 2008-08-07 Richard Sandiford * elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field. (mips_elf_got_section): Delete. (mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide how many reloc-only entries there are. (mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as well as g->global_gotno. (mips_elf_make_got_per_bfd): Initialize reloc_only_gotno. (mips_elf_multi_got): Likewise. Use gg->reloc_only_gotno rather than gg->assigned_gotno to store the number of reloc-only GOT entries. (mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter. Initialize reloc_only_gotno. (mips_elf_calculate_relocation): Check htab->got_info instead of dynobj when deciding whether to call mips_elf_adjust_gp, (_bfd_mips_elf_create_dynamic_sections): Adjust the call to mips_elf_create_got_section. (mips_elf_record_relocs): Likewise. Remove redundant "dynobj == NULL" code. Do not use mips_elf_create_got_section or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead. (_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead of mips_elf_got_section. a1014 22 (_bfd_mips_elf_finish_dynamic_sections): Likewise. Move the initial assignment of G to the block that uses it; it is used for an unrelated purpose later. 2008-08-07 Richard Sandiford * elfxx-mips.c (count_section_dynsyms): Move before the new first use. (mips_elf_sort_hash_table): Take the output bfd as a parameter. Remove the MAX_LOCAL parameter. Exit early if there are no dynamic symbols, if there is no dynobj, or if there is no GOT section. Use count_section_dynsyms instead of MAX_LOCAL. Assert == rather than <= when checking hsd.max_unref_got_dynindx. Also assert that g->global_gotno is right. (mips_elf_count_forced_local_got_symbols): Rename to... (mips_elf_count_got_symbols): ...and count global GOT entries too. Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol to GGA_NONE. (mips_elf_multi_got): Don't sort the symbol table. (mips_elf_lay_out_got): Likewise. Use mips_elf_count_got_symbols to count the number of global GOT entries. (_bfd_mips_elf_final_link): Unconditionally call mips_elf_sort_hash_table. d1016 34 a1049 1 2008-08-07 Richard Sandiford d1051 166 a1216 82 * elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros. (mips_elf_link_hash_entry): Add a "global_got_area" field. (mips_elf_link_hash_newfunc): Initialize it. (mips_elf_sort_hash_table_f): Use h->global_got_area instead of h->root.got.offset. Do not handle forced_local symbols specially. (mips_elf_record_global_got_symbol): Set h->global_got_area instead of h->root.got.offset. (mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE for indirect and warning symbols. (mips_elf_count_forced_local_got_symbols): Change the argument from a "elf_link_hash_entry" to "mips_elf_link_hash_entry". Use and set h->global_got_area instead of h->root.got.offset. Set it to GGA_NONE for all forced-local symbols. (mips_elf_set_global_got_offset): Set h->global_got_area instead of h->root.got.offset. Use g->global_got_area instead of a combination of dynindx, forced_local and tls_type. (mips_elf_multi_got): Remove disabled code. Pass GGA_* values to mips_elf_set_global_got_offset. (mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead of elf_link_hash_traverse. (_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's global_got_area to the direct symbol if the latter's value is higher. Set the indirect symbol's area to GGA_NONE. 2008-08-07 Richard Sandiford * elf32-mips.c (elf_backend_hide_symbol): Delete. * elfn32-mips.c (elf_backend_hide_symbol): Likewise. * elf64-mips.c (elf_backend_hide_symbol): Likewise. * elfxx-mips.h (elf_backend_hide_symbol): Likewise. * elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local" and add "needs_lazy_stub". (mips_elf_link_hash_newfunc): Update accordingly. (mips_elf_link_hash_table): Remove "computed_got_sizes" and add "lazy_stub_count". (_bfd_mips_elf_link_hash_table_create): Update accordingly. (mips_elf_output_extsym): Use hd->needs_lazy_stub to detect cases where a lazy stub is being used. (mips_elf_sort_hash_table_f): Use h->root.forced_local instead of h->forced_local. (mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol instead of _bfd_mips_elf_hide_symbol. Do not increment local_gotno here. (mips_elf_allocate_dynamic_relocations): Move before new first use. (mips_elf_check_recreate_got, mips_elf_recreate_got): New functions. (mips_elf_resolve_final_got_entries): Move earlier in file. Make at most two passes over the hash table. Use mips_elf_check_recreate_got to see if there are any indirect or warning entries and mips_elf_recreate_got to create a new GOT without them. Return a boolean success value. (mips_elf_count_forced_local_got_entries): New function. (mips_elf_make_got_per_bfd): Check h->root.forced_local instead of h->forced_local. (mips_elf_set_global_got_offset): Likewise. (mips_elf_set_no_stub): Replace with... (mips_elf_forbid_lazy_stubs): ...this new function. (mips_elf_resolve_final_got_entry): Delete. (mips_elf_multi_got): Fix formatting. Use mips_elf_forbid_lazy_stubs instead of mips_elf_set_no_stub. Move the code that sets global offsets and allocates dynamic relocations from the main _bfd_mips_elf_size_dynamic_sections loop to here. (_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in .MIPS.stubs here; just set hmips->needs_lazy_stub and increment htab->lazy_stub_count. (_bfd_mips_elf_always_size_sections): Move the stub-estimation code to mips_elf_estimate_stub_size and the GOT-sizing code to mips_elf_lay_out_got. Do not call these functions here. (mips_elf_estimate_stub_size): New function, split out from _bfd_mips_elf_always_size_sections. Call mips_elf_resolve_final_got_entries earlier. Count the number of forced-local entries. Do not add stub sizes to loadable_size; after this patch, the stub sizes are already included in the main estimate. Allocate dynamic relocations here rather than in the main _bfd_mips_elf_size_dynamic_sections loop. (mips_elf_estimate_stub_size): New function, split out from _bfd_mips_elf_always_size_sections. (mips_elf_allocate_lazy_stub): New function. (mips_elf_lay_out_lazy_stubs): Likewise. (_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size, mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs. Do not handle the allocation of sreldyn specially. (_bfd_mips_elf_hide_symbol): Delete. d1218 1 a1218 1 2008-08-07 Richard Sandiford d1220 1 a1220 2 * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning symbols. d1222 1 a1222 1 2008-08-06 Richard Sandiford d1224 1 a1224 144 * elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean fields to the end of the structure and make them single-bit bitfields. (mips_elf_link_hash_newfunc): Make the initialization statements follow the new field order. 2008-08-06 Richard Sandiford * elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field. (mips_elf_link_hash_table): Add "sgot" and "got_info" fields. (_bfd_mips_elf_link_hash_table_create): Initialize them. (mips_elf_got_section): Always apply the !maybe_excluded behavior. (mips_elf_got_info): Delete. (mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable. Adjust the call to mips_elf_got_section. (mips_elf_local_got_index): Don't call mips_elf_got_info. Update the call to mips_elf_create_local_got_entry. Use htab->got_info. (mips_elf_global_got_index): Don't call mips_elf_got_info; use htab->got_info and htab->sgot instead. (mips_elf_got_page): Don't call mips_elf_got_info. Update the call to mips_elf_create_local_got_entry. (mips_elf_got16_entry): Likewise. (mips_elf_got_offset_from_index): Replace with DYNOBJ parameter with an INFO parameter. Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead. (mips_elf_create_local_got_entry): Remove the GG and SGOT parameters. Use htab->sgot and htab->got_info. (mips_elf_sort_hash_table): Remove the DYNOBJ local variable. Don't call mips_elf_got_info; use htab->got_info instead. (mips_elf_record_global_got_symbol): Turn G from a paramter to a local variable and read it from htab->got_info. (mips_elf_record_local_got_symbol): Replace the G parameter with an INFO parameter. Make G a local variable and read it from htab->got_info instead. (mips_elf_record_got_page_entry): Likewise. (mips_elf_multi_got): Remove the G parameter and make it a local variable instead. Read it from htab->got_info. (mips_elf_create_got_section): Cache the GOT section in htab->sgot. Store the GOT information in htab->got_info. (mips_elf_calculate_relocation): Don't call mips_elf_got_section and mips_elf_got_info; use htab->sgot and htab->got_info instead. Adjust the calls to mips_elf_got_offset_from_index and mips_elf_adjust_gp. (_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables. Adjust the calls to mips_elf_record_local_got_symbol, mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry. Use htab->sgot. (_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable. Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead. Update the call to mips_elf_multi_got. (_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info; use htab->got_info instead. (_bfd_mips_elf_finish_dynamic_symbol): Update the call to mips_elf_got_section. Get the got_info from the hash table rather than the GOT section. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. (_bfd_mips_elf_finish_dynamic_sections): Likewise. (_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section; get the got_info from the hash table instead. Remove the GOT local variable. (_bfd_mips_elf_final_link): Likewise. Also remove the DYNOBJ local variable. 2008-08-06 Richard Sandiford * elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field. (_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs section. Don't check whether the section already exists. (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. (_bfd_mips_elf_finish_dynamic_sections): Likewise. (_bfd_mips_elf_size_dynamic_sections): Likewise. Don't add the dummy stub to an empty section. (_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field. 2008-08-06 Richard Sandiford * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare. * libbfd.h, bfd-in2.h: Regenerate. * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved R_MIPS16_GOT16 and R_MIPS16_CALL16 entries. (mips16_reloc_map): Add mappings. * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved R_MIPS16_GOT16 and R_MIPS16_CALL16 entries. (mips16_elf64_howto_table_rela): Likewise. (mips16_reloc_map): Add mappings. * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved R_MIPS16_GOT16 and R_MIPS16_CALL16 entries. (elf_mips16_howto_table_rela): Likewise. (mips16_reloc_map): Add mappings. * elfxx-mips.c (mips_elf_create_shadow_symbol): New function. (section_allows_mips16_refs_p): Likewise. (mips16_stub_symndx): Likewise. (mips_elf_check_mips16_stubs): Treat the data argument as a bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs and create a "shadow" symbol for the original MIPS16 definition. (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p) (lo16_reloc_p, mips16_call_reloc_p): New functions. (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize relocation checks. (_bfd_mips16_elf_reloc_shuffle): Likewise. (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16. (mips_elf_got16_entry): Add comment. (mips_elf_calculate_relocation): Use hi16_reloc_p, lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p to generalize relocation checks. Use section_allows_mips16_refs_p instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16, allowing the former to refer directly to a MIPS16 function if its stub is not needed. (mips16_stub_section_p): Delete. (_bfd_mips_elf_symbol_processing): Convert odd-valued function symbols into even MIPS16 symbols. (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize a relocation check. (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end" earlier in the function. Use mips16_stub_symndx to identify the target function. Avoid out-of-bounds accesses when the stub has no relocations; report an error instead. Use section_allows_mips16_refs_p instead of mips16_stub_section_p. Use mips16_call_reloc_p and got16_reloc_p to generalize relocation checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create dynamic relocations for absolute references to __gnu_local_gp. (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as the argument to mips_elf_check_mips16_stubs. Generalize comment. (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p to generalize relocation checks. (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function symbol has a non-MIPS16 stub, redirect the symbol to the stub. Fix an overly long line. Don't give dynamic symbols type STO_MIPS16. (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. 2008-08-06 Alan Modra * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend. (ppc_elf_relocate_section ): Don't bother here. 2008-08-05 Alan Modra Jaka Močnik * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first so that we don't inadvertently free it. Use bfd_alloc for sort arrays, and memcpy sorted line table. d1226 2 a1227 1 2008-08-04 Alan Modra d1229 1 a1229 2 * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible if --fixed-space request is too large. d1231 2 a1232 1 2008-08-04 Alan Modra d1234 1 a1234 3 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Set LC_ALL=C. * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. d1236 2 a1237 1 2008-08-02 Alan Modra d1239 1 a1239 3 * elf32-spu.c (mark_overlay_section): Move code calculating max_overlay_size to correct block. (spu_elf_auto_overlay): Don't use %x in einfo error message. d1241 1 a1241 2 2008-08-01 Alan Modra Jan Kratochvil a1242 57 * elfcore.h (elf_core_file_p): Ensure we have a backend match with the correct arch size before rejecting the generic fallback. * elfcode.h (elf_object_p): Likewise. Ensure arch size matches before accepting a target. 2008-08-01 Alan Modra PR 6774 * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to include file or program headers. 2008-07-30 Alan Modra * coff-ppc.c, coffgen.c, ecoff.c, ecofflink.c, elf.c, elf32-frv.c, elf32-iq2000.c, elf32-m32c.c, elf32-mep.c, elf32-mt.c, elf32-sh-symbian.c, elf64-hppa.c, mach-o.c, peXXigen.c, pef.c, ppcboot.c, vms-misc.c, xsym.c: Silence gcc warnings. 2008-07-28 Daniel Jacobowitz * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating relocations for undefined weak symbols with non-default visibility. (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for global symbols in shared libraries. (allocate_dynrelocs): New function. (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle possibly_dynamic_relocs here. (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs. 2008-07-28 Alexandre Oliva * elf32-i386.c (struct elf_i386_link_hash_table): Added field tls_module_base. (elf_i386_link_hash_table_create): Initialize it. (elf_i386_always_size_sections): Set it. (set_tls_module_base): New. (elf_i386_relocate_sections): Call it. * elf64-x86-64.c (struct elf64_x86_64_link_hash_table): Added field tls_module_base. (elf64_x86_64_link_hash_table_create): Initialize it. (elf64_x86_64_always_size_sections): Set it. (set_tls_module_base): New. (elf64_x86_64_relocate_sections): Call it. Reported by Cary Coutant 2008-07-28 Ineiev * elf32-arm.c (arm_map_one_stub): Declare variables at beginning of block. * elf32-avr.c (get_local_syms): Likewise. 2008-07-28 Alan Modra PR 6769 * bfd-in.h (BFD_VMA_FMT): Define. (printf_vma, sprintf_vma): Use the above. (_bfd_int64_low, _bfd_int64_high): Delete. d1244 125 d1370 3 a1372 1 2008-07-27 Alan Modra d1374 1 a1374 3 * elf.c (_bfd_elf_make_section_from_shdr): Ignore return from elf_parse_notes. Use bfd_malloc_and_get_section. (elf_parse_notes): Validate note namesz and descsz. d1376 6 a1381 1 2008-07-26 Michael Eager d1383 1 a1383 2 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility between single-float, double-float, and soft-float. d1385 2 a1386 1 2008-07-24 Daniel Jacobowitz d1388 1 a1388 1 * elf32-mips.c (elf_backend_write_section): Define. d1390 5 a1394 1 2008-07-24 Nick Clifton d1396 1 a1396 2 * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one error assigning sections to segments. d1398 2 a1399 1 2008-07-22 Nick Clifton d1401 1 a1401 2 * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in adjoining pages to be included in the same segment. d1403 1 a1403 1 2008-07-22 Simon Baldwin d1405 1 a1405 2 * elflink.c (elf_link_output_extsym): Set st_size to zero for symbols from dynamic libraries. d1407 2 a1408 1 2008-07-21 H.J. Lu d1410 1 a1410 3 PR ld/4424 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible to check if 2 inputs are compatible. d1412 1 a1412 1 2008-07-21 Sterling Augustine d1414 1 a1414 2 * elf.c (assign_file_positions_for_load_sections): Print vma in error message about overlapping section vmas. d1416 2 a1417 1 2008-07-21 H.J. Lu d1419 1 a1419 3 PR ld/6747 * elf32-frv.c (elf32_frv_relocate_section): Revert the change for PR ld/6446 checked in by accident on May 21, 2008. d1421 2 a1422 1 2008-07-21 Nick Clifton d1424 1 a1424 9 * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non COFF_WITH_PE based SH ports. * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype. * arm-wince-pe.c (bfd_pe_print_pdata): Use _bfd_pe_print_ce_compressed_pdata. (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move to... * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to _bfd_XX_print_ce_compressed_pdata. d1426 2 a1427 1 2008-07-21 Alan Modra d1429 1 a1429 2 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop unwanted zero terminators. d1431 3 a1433 1 2008-07-21 Alan Modra d1435 1 a1435 3 * elf32-spu.c (spu_elf_relocate_section): Expand RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for R_SPU_PPU32 and R_SPU_PPU64 relocations. d1437 1 a1437 1 2008-07-21 Luis Machado d1439 1 a1439 5 * elf-bfd.h: Declare elfcore_write_ppc_vsx. * elf.c (elfcore_grok_ppc_vsx): New function. (elfcore_write_ppc_vsx): New function (elfcore_grok_note): Handle VSX notes. (elfcore_write_register_note): Handle VSX notes. d1441 1 a1441 1 2008-07-18 Joseph Myers d1443 68 a1510 1 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter. a1511 71 * elf32-arm.c (struct elf_arm_obj_tdata): Add field no_wchar_size_warning. (bfd_elf32_arm_set_target_relocs): Add new parameter no_wchar_warn. (elf32_arm_merge_eabi_attributes): Give a warning, not an error, for conflicting wchar_t attributes. Do not warn if --no-wchar-size-warning. Make diagnostic text more specific. 2008-07-18 H.J. Lu PR ld/6748 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize new fields added for ARM long call support. 2008-07-18 Danny Backx * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to print compressed pdata structure as described on MSDN. This only applies to a limited set of architectures (ARM, SH4). (slurp_symtab, my_symbol_for_address): Define static helper functions for pe_print_compressed_pdata. * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field. (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define. * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on bfd_coff_backend_data, call the function if non-null. * pei-mcore.c: Add target dependent initialisation for bfd_coff_backend_data. * coff-sh.c: Likewise. * coff64-rs6000.c: Likewise. * coff-rs6000.c: Likewise. * libcoff-in.h: Likewise. * cf-i386lynx.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-arm.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i860.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-maxq.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-sparc.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * coff-we32k.c: Likewise. * coff-x86_64.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. * pe-mcore.c: Likewise. * pe-mips.c: Likewise. * pe-ppc.c: Likewise. * peXXigen.c: Likewise. * pei-ppc.c: Likewise. * libcoff.h: Regenerate. 2008-07-16 Bernd Schmidt * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section, bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook, ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE, struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code separate from non-FD-PIC. d1513 13 a1525 1 2008-07-14 DJ Delorie d1527 1 a1527 2 * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16 a1528 2 (mn10300_elf_relax_section): Correct jump offset check when target is in a different section. d1530 51 a1580 1 2008-07-15 Jie Zhang d1582 13 a1594 2 * elf32-bfin.c (elf32_bfin_special_sections[]): New. (elf_backend_special_sections): Define. d1596 15 a1610 54 2008-07-13 Craig Silverstein PR binutils/6743 * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory. (find_line): Use info_ptr_memory instead of sec_info_ptr. (_bfd_dwarf2_cleanup_debug_info): Likewise. 2008-07-12 Jie Zhang Revert 2008-07-12 Jie Zhang * elf.c (_bfd_elf_map_sections_to_segments): Don't put executable sections into the same segment with other read only sections if --sep-code. * elf32-bfin.c (elf32_bfin_code_in_l1): New variable. (elf32_bfin_data_in_l1): New variable. (elf32_bfin_final_write_processing): New. (elf32_bfin_special_sections[]): New. (elf_backend_final_write_processing): Define. (elf_backend_special_sections): Define. 2008-07-12 Jie Zhang * elf.c (_bfd_elf_map_sections_to_segments): Don't put executable sections into the same segment with other read only sections if --sep-code. * elf32-bfin.c (elf32_bfin_code_in_l1): New variable. (elf32_bfin_data_in_l1): New variable. (elf32_bfin_final_write_processing): New. (elf32_bfin_special_sections[]): New. (elf_backend_final_write_processing): Define. (elf_backend_special_sections): Define. 2008-07-11 Andreas Schwab * dwarf2.c (read_section): Take pointer to bfd_size_type instead of unsigned long as last parameter. (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size, dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of unsigned long. 2008-07-10 Richard Sandiford * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0 for all relocation types. Allow any type of relocation to refer to __gnu_local_gp. 2008-07-10 Richard Sandiford * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16. (mips_elf_calculate_relocation): Likewise. (_bfd_mips_elf_add_symbol_hook): Likewise. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. d1612 1 a1612 1 2008-07-10 Andreas Schwab d1614 1 a1614 2 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing paren. d1616 1 a1616 1 2008-07-09 Craig Silverstein d1618 8 a1625 3 * Makefile.am (BFD32_LIBS): Add compress.lo. (BFD32_LIBS_CFILES): Add compress.c. (BFD_H_FILES): Likewise. a1627 2 * config.in: Add HAVE_ZLIB_H * configure.in: Add test for libz and zlib.h d1629 9 a1637 47 * dwarf2.c (read_section): New function. (read_indirect_string): Call new function read_section. (read_abbrevs): Likewise. (decode_line_info): Likewise. (read_debug_ranges): Likewise. (find_line): Call new function read_section when just one .zdebug_info section is found, otherwise read and compress multiple sections. (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr. * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix. (special_sections_z): New struct. (special_sections): Refer to special_sections_z. * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize sections named .zdebug_*. (_bfd_mips_elf_fake_sections): Likewise. * compress.c: New file. (bfd_uncompress_section_contents): New function. 2008-07-07 Christophe Lyon * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in the presence of a PLT. 2008-07-07 Alan Modra * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char. 2008-07-02 Alan Modra * elf32-ppc.c (is_pic_glink_stub): New function. (ppc_elf_get_synthetic_symtab): Don't generate symbols when multiple shared/pie stubs per plt entry. 2008-06-30 Richard Sandiford * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by bed->s->int_rels_per_ext_rel. 2008-06-30 Richard Sandiford * syms.c (BSF_SYNTHETIC): New flag. * elf.c (_bfd_elf_get_synthetic_symtab): Set it. * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise. * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour for synthetic symbols. * bfd-in2.h: Regenerate. d1639 161 a1799 1 2008-06-30 Daniel Jacobowitz d1801 1 a1801 3 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Expand comments. (arm_map_one_stub): Use | 1 when setting the low bit. d1803 128 a1930 1 2008-06-29 Andreas Schwab d1932 2 a1933 2 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing addend on _GLOBAL_OFFSET_TABLE_. d1935 1 a1935 1 2008-06-24 Daniel Jacobowitz d1937 5 a1941 13 * elf32-arm.c (STUB_ENTRY_NAME): Define. (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n. (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of R_ARM_ABS32. (struct elf32_arm_stub_hash_entry): Add output_name. (arm_build_one_stub): Move offsets into the offset argument of _bfd_final_link_relocate. Correct offset for arm_thumb_arm_v4t_stub_long_branch. (elf32_arm_size_stubs): Set stub_entry->output_name. (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym. Update all callers. (elf32_arm_output_stub_sym): New. (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym. d1943 1 a1943 1 2008-06-20 Alan Modra d1945 1 a1945 2 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for non-branch insns. d1947 1 a1947 1 2008-06-20 Alan Modra d1949 1 a1949 4 * elf32-spu.c (build_stub): Allow wraparound on stub branches. (allocate_spuear_stubs, build_spuear_stubs): Return value from count_stub/build_stub. (spu_elf_build_stubs): Correct location of stub reloc error message. d1951 1 a1951 1 2008-06-18 M R Swami Reddy d1953 91 a2043 1 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD. d2045 100 a2144 1 2008-06-17 Ralf Wildenhues d2146 1 d2149 20 a2168 1 2008-06-17 Alan Modra d2170 34 a2203 168 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space. (spu_elf_check_vma): Add extra_stack_space param, copy to htab. (spu_elf_auto_overlay): Use it. (RECURSE_UNMARK): Define as 0. (unmark_overlay_section): Heed RECURSE_UNMARK. * elf32-spu.h (spu_elf_check_vma): Update prototype. 2008-06-12 DJ Delorie * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD. 2008-06-09 Paul Brook bfd/ * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared libraries. 2008-06-09 Christophe Lyon * elf32-arm.c (arm_stub_is_thumb): Define. (elf32_arm_final_link_relocate): Handle near mode switching stubs. 2008-06-07 Alan Modra * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp to stack calculation. 2008-06-06 Paul Brook bfd/ * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input. 2008-06-06 Alan Modra * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that file names be unique. Specify archive:path in overlay script. 2008-06-05 Alan Modra PR ld/6590 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets. 2008-06-04 Alan Modra * elf.c (ignore_section_sym): Don't test section sym value here. (elf_map_symbols): Instead check zero value here as was done prior to 2006-05-26 change. 2008-06-04 Nick Clifton PR ld/6019 * elf32-avr.c (elf32_avr_relax_section): Handle the case where there are no local symbols. 2008-06-04 Alan Modra * elf32-spu.c (get_sym_h): Don't attempt to read global syms. (process_stubs): Likewise. (discover_functions): Don't used cached symbols. (maybe_insert_function): Correct condition under which function array is realloc'd. (mark_functions_via_relocs): Delete unused variable. 2008-05-30 Frediano Ziglio Nick Clifton PR ld/6511 * elf64-hppa.c (allocate_global_data_opd): Default to using the dynamic symbol table for local function names in shared libraries. 2008-05-29 Jan Kratochvil * elf.c (assign_file_positions_for_load_sections): Adjust pre-section gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses. 2008-05-28 Alan Modra * elf32-spu.c (spu_elf_object_p): New function. (elf_backend_object_p): Define. (build_stub): Correct second word of 8 byte overlay stubs. (spu_elf_relocate_section): Formatting. 2008-05-24 Carlos Eduardo Seo * elf.c (elfcore_write_register_note): New function. * elf-bfd.h (elfcore_write_register_note): New prototype. 2008-05-22 Christophe Lyon * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols. (elf32_arm_stub_add_mapping_symbol): Remove. (elf32_arm_add_stub): Don't generate mapping symbols. Change prototype. (elf32_arm_size_stubs): Use new elf32_arm_add_stub prototype. Don't generate thumb to arm glue for calls. (arm_map_one_stub): Define. (elf32_arm_output_arch_local_syms): Generate mapping symbols for long calls stubs. 2008-05-21 Nick Clifton * elf32-arm.c (group_sections): Reformat comments. PR ld/6446 * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by default (for FDPIC). Clear it if any inter-segment relocations are found. * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return from elf_link_hash_lookup. 2008-05-21 Maxim Kuvyrkov Add multi-GOT support for m68k. * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key, glist): New fields. (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry, struct elf_m68k_got, struct elf_m68k_bfd2got_entry, struct elf_m68k_multi_got): New data structures. (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p, allow_multigot_p, multi_got_): New fields. (elf_m68k_multi_got): New macro. (elf_m68k_link_hash_newfunc): Initialize new fields of struct elf_m68k_link_hash_entry. (elf_m68k_link_hash_table_create): Initialize new fields of struct elf_m68k_link_hash_table. (elf_m68k_link_hash_table_free): New static function implementing hook. (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New static functions for struct elf_m68k_got. (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash, elf_m68k_got_entry_eq): New static functions for struct elf_m68k_got_entry. (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT, ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros. (enum elf_m68k_get_entry_howto): New enum. (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type, elf_m68k_remove_got_entry_type): New static functions for struct elf_m68k_got_entry. (elf_m68k_add_entry_to_got): New static function. (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq, elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static functions for struct elf_m68k_bfd2got_entry. (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1, elf_m68k_can_merge_gots): New traversal. (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1, elf_m68k_merge_gots): Ditto. (struct elf_m68k_finalize_got_offsets_arg, elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto. (struct elf_m68k_partition_multi_got_arg, elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1, elf_m68k_partition_multi_got): Ditto. (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static functions. (elf_m68k_copy_indirect_symbol): New static function implementing a hook. (elf_m68k_check_relocs): Update to add entries to multi-GOT. (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT. (elf_m68k_always_size_sections): Assign BFDs to GOTs. (elf_m68k_relocate_section): Update to properly handle GOT relocations. (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries of a global symbol. (bfd_elf_m68k_set_target_options): New function. (bfd_elf32_bfd_link_hash_table_free): Define hook. (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link to skip generic calculation of GOT offsets. (elf_backend_copy_indirect_symbol): Define hook. * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function. * bfd-in2.h: Regenerate. d2205 1 a2205 1 2008-05-21 André Johansen d2207 5 a2211 62 PR 868 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated for filenames in function tables and variable tables. 2008-05-19 Alan Modra PR 2995, PR 6473 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to vma when all p_paddr fields are zero and there is more than one PT_LOAD header. 2008-05-15 Christophe Lyon Add long call support for ARM. * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define. (THM2_MAX_BWD_BRANCH_OFFSET): Define. (ARM_MAX_FWD_BRANCH_OFFSET): Define. (ARM_MAX_BWD_BRANCH_OFFSET): Define. (THM_MAX_FWD_BRANCH_OFFSET): Define. (THM_MAX_BWD_BRANCH_OFFSET): Define. (arm_long_branch_stub): Define. (arm_pic_long_branch_stub): Define. (arm_thumb_v4t_long_branch_stub): Define. (arm_thumb_thumb_long_branch_stub): Define. (arm_thumb_arm_v4t_long_branch_stub): Define. (STUB_SUFFIX): Define. (elf32_arm_stub_type): Define. (elf32_arm_stub_hash_entry): Define. (elf32_arm_link_hash_entry): Add stub_cache field. (arm_stub_hash_lookup): Define. (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd, add_stub_section, layout_sections_again, stub_group, bfd_count, top_index, input_list fields. (elf32_arm_link_hash_newfunc): Init new field. (stub_hash_newfunc): New function. (elf32_arm_link_hash_table_create): Init stub_hash_table. (elf32_arm_hash_table_free): New function. (arm_type_of_stub): New function. (elf32_arm_stub_name): New function. (elf32_arm_get_stub_entry): New function. (elf32_arm_stub_add_mapping_symbol): New function. (elf32_arm_add_stub): New function. (arm_build_one_stub): New function. (arm_size_one_stub): New function. (elf32_arm_setup_section_lists): New function. (elf32_arm_next_input_section): New function. (group_sections): New function. (elf32_arm_size_stubs): New function. (elf32_arm_build_stubs): New function. (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections. (bfd_elf32_arm_process_before_allocation): No longer handle R_ARM_CALL and R_ARM_THM_CALL. (using_thumb_only): New function. (elf32_arm_final_link_relocate): Redirect calls to stub if range exceeds encoding capabilities. (bfd_elf32_bfd_link_hash_table_free): Define. * bfd-in.h (R_ARM_max): Fix value to 130. (elf32_arm_setup_section_lists): Protype. (elf32_arm_next_input_section): Protype. (elf32_arm_size_stubs): Protype. (elf32_arm_build_stubs): Protype. * bfd-in2.h: Regenerate. d2213 1 a2213 1 2008-05-14 Ulrich Weigand d2215 3 a2217 2 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls. * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise. d2219 1 a2219 1 2008-05-14 Alan Modra d2221 10 a2230 1 * Makefile.am: Run "make dep-am". d2232 148 d2381 2 a2382 2 2008-05-14 Ulrich Weigand Alan Modra d2384 1 a2384 24 * elf32-ppc.c (section_covers_vma): New function. (ppc_elf_get_synthetic_symtab): New function. (bfd_elf32_get_synthetic_symtab): Define. * elf64-ppc.c (section_covers_vma): New function. (ppc64_elf_get_synthetic_symtab): Generate sym@@plt on glink branch table entries, and __glink_PLTresolve on resolver stub. (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve. 2008-05-12 Alan Modra PR 6443 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete. (must_be_dyn_reloc): New function. (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs in pies. (ppc_elf_tls_optimize): Optimise pies. (ppc_elf_relocate_section): Use a section symbol rather than no symbol if possible for LD->IE TLS sequence, but don't error if we must use no symbol. * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c. (must_be_dyn_reloc): Likewise. (ppc64_elf_check_relocs): Likewise. (ppc64_elf_tls_optimize): Likewise. (ppc64_elf_relocate_section): Likewise. d2386 2 a2387 1 2008-05-12 Alan Modra d2389 1 a2389 1 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym. d2391 5 a2395 1 2008-05-10 Paul Pluzhnikov d2397 1 a2397 1 * elfcore.h (elf_core_file_p): Warn about core truncation. d2399 10 a2408 1 2008-05-07 Bob Wilson d2410 1 a2410 4 * elf32-xtensa.c (xtensa_property_section_name): New. (xtensa_make_property_section): New. (xtensa_get_property_section): Make static. Do not create a new section if it does not exist. d2412 2 a2413 1 2008-05-08 Alan Modra d2415 1 a2415 3 * elf32-spu.c (spu_elf_special_sections): Add "._ea". (spu_elf_relocate_section): Handle relocations against symbols defined in ._ea specially. d2417 5 a2421 1 2008-05-03 Daniel Jacobowitz d2423 1 a2423 4 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use ARRAY_SIZE. (elf32_arm_symbian_plt_sym_val): New. (elf_backend_plt_sym_val): Define. d2425 2 a2426 1 2008-05-03 Alan Modra d2428 1 a2428 5 PR 2995, PR 6473 * elf.c (rewrite_elf_program_header): Rather than clearing p_paddr_valid at end, don't set it in the first place. Delete comment no longer relevant. When not p_paddr_valid, don't set paddr from vaddr, and don't set p_vaddr_offset. d2430 3 a2432 1 2008-05-01 Cary Coutant d2434 1 a2434 2 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by corrupt string table. d2436 1 a2436 1 2008-05-01 Joel Brobecker d2438 2 a2439 2 * cache.c (cache_bread_1): Renames cache_bread. (cache_bread): New function. d2441 1 a2441 1 2008-05-01 Alan Modra d2443 1 a2443 5 PR 2995, PR 6473 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr. (assign_file_positions_for_load_sections): Combine nested "if". (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset when all header p_paddr fields are zero. d2445 1 a2445 1 2008-04-30 Edmar Wienskoski d2447 102 a2548 1 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry. d2550 1 a2550 1 2008-04-29 Daniel Jacobowitz d2552 6 a2557 5 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound) (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations even if they are not loaded. * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section first. d2559 10 a2568 1 2008-04-25 Jay Foad d2570 4 a2573 2 * reloc16.c (bfd_coff_reloc16_get_value): Add support for undefined weak symbols. d2575 1 a2575 1 2008-04-25 Nick Clifton d2577 4 a2580 1 * po/vi.po: Updated Vietnamese translation. d2582 1 a2582 1 2008-04-23 Paolo Bonzini d2584 40 a2623 1 * aclocal.m4: Regenerate. d2625 10 d2636 6 a2641 1 2008-04-21 Cary Coutant d2643 1 a2643 2 * archive.c (_bfd_write_archive_contents): Fix incorrect use of ARFMAG. d2645 3 a2647 1 2008-04-21 Nathan Sidwell d2649 1 a2649 4 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't set the value of undefined symbols in shared objects. (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for undefined symbols unless pointer equality is needed. d2651 2 a2652 1 2008-04-18 Dennis Roberts d2654 1 a2654 8 * aix5ppc-core.c: Define macros for the default architecture and machine for matching core files. (xcoff64_core_p): Set the architecture and machine to the default values defined in the macros mentioned above. * rs6000-core.c: Define macros to determine whether or not the core file header uses the core_dumpxx header format. (rs6000coff_core_p): Don't match core files that use the core_dumpxx header format. d2656 2 a2657 1 2008-04-16 Pedro Alves d2659 1 a2659 1 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add. d2661 12 a2672 1 2008-04-16 David S. Miller d2674 9 a2682 4 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22, BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22, BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New. * libbfd.h: Regnerate. a2683 10 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for GOTDATA relocations. (sparc_reloc_map): Likewise. (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like R_SPARC_GOT*. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22, R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc. Simply ignore R_SPARC_GOTDATA_OP relocations. d2685 6 a2690 1 2008-04-14 Aurelien Jarno d2692 16 a2707 2 * configure.in: Link with the PIC version of libiberty on Linux/MIPS hosts. d2709 17 d2727 1 a2727 1 2008-04-14 Edmar Wienskoski d2729 60 a2788 1 * archures.c: Add bfd_mach_ppc_e500mc. d2790 6 d2797 1 a2797 1 2008-04-08 Alan Modra d2799 2 a2800 150 * elf32-spu.c (spu_elf_build_stubs): Correct error message. (mark_functions_via_relocs): Remove premature init of symtab_hdr. (collect_overlays): Commment typo fix. 2008-04-08 Kees Cook * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note in EXEC_P bfds. 2008-04-08 Alan Modra * elf32-spu.c: Include libiberty.h. (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved, non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script, spu_elf_relink, auto_overlay fields. (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define. (needs_ovl_stub): Flip test so that call to non-function warning is emitted during relocate_section rather than earlier. (spu_elf_check_vma): Stash --auto-overlay parameters, and clear auto_overlay if no section exceeds local store. (struct call_info): Add count, max_depth, is_pasted fields. (struct function_info): Add rodata, last_caller, call_count, depth, new visit flags. (insert_callee): Increment call count. (copy_callee): New function. (mark_functions_via_relocs): Investigate all reloc types to count possible function pointer stubs for --auto-overlay. Track last_caller and increment function call_count. (pasted_function): Insert a "call" into call info for pasted section. (remove_cycles): Track max depth of calls. Don't emit call graph pruning warning for --auto-overlay. (build_call_tree): Don't transfer_calls for --auto-overlay. Adjust remove_cycles call. (sort_calls, sort_lib, sort_bfds): New functions. (struct _mos_param, struct _uos_param, struct _cl_param): New. (mark_overlay_section, unmark_overlay_section): New functions. (collect_lib_sectios, auto_ovl_lib_functions): New functions. (collect_overlays, find_pasted_call): New functions. (sum_stack): Deal with is_pasted "calls". Exit before printing when --auto-overlay. (spu_elf_auto_overlay): New function. (spu_elf_final_link): Call spu_elf_auto_overlay. * elf32-spu.h (spu_elf_check_vma): Update prototype. 2008-04-07 Alan Modra * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol is defined in overlay section before creating a stub. (build_spuear_stubs): Likewise. (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls. 2008-04-02 Alan Modra * elf32-spu.c (insert_callee): Reorder call list so most recent call is always first. (interesting_section): Move. (mark_functions_via_relocs): Fold interesting_section and reloc_count tests in callers to here. Simplify output section owner test. (discover_functions): Set "gaps" when no symbols and some "interesting_section". Run pasted_function loop for no symbol bfds. (for_each_node, transfer_calls): New functions. (mark_non_root): Adjust to suit for_each_node. (call_graph_traverse): Likewise. Fix memory leak. Rename to.. (remove_cycles): ..this. (build_call_tree): Use for_each_node and transfer_calls. (struct _sum_stack_param): New. (sum_stack): Adjust to suit for_each_node. Return error on malloc failure. Move code to print root node cumulative stack from.. (spu_elf_stack_analysis): ..here. Use for_each_node. 2008-03-31 Cary Coutant PR 6006 * archive.c (_bfd_slurp_extended_name_table): Change ARFMAG[0] to ARFMAG[1]. (_bfd_construct_extended_name_table): Likewise. 2008-03-31 Daniel Jacobowitz * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment. (_bfd_mips_elf_check_relocs): Update comments. Always call mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE. 2008-03-27 Cary Coutant Add support for thin archives. * archive.c (_bfd_find_nested_archive): New function. (get_extended_arelt_filename): Add origin parameter. (_bfd_generic_read_ar_hdr_mag): Deal with extended name combined with a file offset. (append_relative_path): New function. (_bfd_get_elt_at_filepos): Deal with external members and nested archives. (bfd_generic_openr_next_archived_file): Thin archives. (bfd_generic_archive_p): Recognize new magic string. (adjust_relative_path): New function. (_bfd_construct_extended_name_table): Construct extended names for thin archive members. (_bfd_write_archive_contents): Emit new magic string, skip copying files for thin archives. * bfd-in.h (bfd_is_thin_archive): New macro. * bfd.c (struct bfd): New fields for thin archives. * libbfd-in.h (struct areltdata): New field for thin archives. * opncls.c (bfd_close): Delete BFDs for nested archives. 2008-03-25 Bernd Schmidt * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around _bfd_final_link_relocate that also handles R_pcrel24 relocs. (bfinfdpic_relocate_section, bfin_relocate_section): Use it. 2008-03-25 Nathan Sidwell * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs in vxworks tls_vars sections. (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise. * elf32-i386.c (allocate_dynrelocs, elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise. * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections, ppc_elf_relocate_section): Likewise. * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections, sh_elf_relocate_section): Likewise. * elfxx-sparc.c (allocate_dynrelocs, _bfd_sparc_elf_size_dynamic_sections, _bfd_sparc_elf_relocate_section): Likewise. 2008-03-21 Adam Nemet * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to print the values from the dynamic section. 2008-03-20 Richard Sandiford * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro. (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000. 2008-03-20 Alan Modra * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter. (spu_elf_find_overlays, spu_elf_size_stubs): Likewise (process_stubs, discover_functions, build_call_tree): Likewise. (spu_elf_stack_analysis): Likewise. (spu_elf_check_vma): Likewise. Move. (struct call_info): Make "is_tail" a bitfield. (insert_callee): Clear fun->start and set fun->is_func if we find a non-tail call. * elf32-spu.h (spu_elf_create_sections): Update prototype. (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto. d2802 1 a2802 1 2008-03-17 Ralf Wildenhues d2804 16 a2819 3 * aclocal.m4: Regenerate. * configure: Likewise. * Makefile.in: Likewise. d2821 2 a2822 1 2008-03-16 H.J. Lu d2824 1 a2824 20 PR ld/5789 PR ld/5943 * elf32-i386.c (elf_i386_relocate_section): Issue an error for R_386_GOTOFF relocaton against undefined hidden/internal symbols when building a shared object. * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32 relocaton against undefined hidden/internal symbols when building a shared object. (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol is referenced locally, but isn't defined in a regular file. 2008-03-15 H.J. Lu * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED, BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY, HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ... * bfd.c: Here. d2826 11 a2836 3 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once, mtime_set, no_export, output_has_begun and has_armap to bit field. d2838 1 a2838 1 * bfd-in2.h: Regenerated. d2840 4 a2843 1 2008-03-14 Daniel Jacobowitz d2845 1 a2845 1 * cache.c (close_one): Remove mtime hack. d2847 3 a2849 1 2008-03-14 H.J. Lu d2851 5 a2855 29 PR ld/5913 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT. (elfNN_ia64_dtprel_base): Likewise. (elfNN_ia64_relocate_section): Go to missing_tls_sec if tls_sec is NULL before calling elfNN_ia64_tprel_base or elfNN_ia64_dtprel_base. Report unsupported TLS relocations. 2008-03-14 Alan Modra * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move common code to.. (maybe_needs_stub): ..here, a new function that also omits stubs for .eh_frame, and.. (needs_ovl_stub): ..here. Create stubs for labels in code section referenced by switch jump table. (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return. (enum _insn_type): Delete. (enum _stub_type): New. (count_stub, build_stub): Adjust. (allocate_spuear_stubs, build_spuear_stubs): Adjust. 2008-03-13 Alan Modra * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast. (_bfd_elf_assign_file_position_for_section): Simplify align. (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough for sh_addralign. (elf_fake_sections, swap_out_syms): Likewise. * elflink.c (bfd_elf_final_link): Likewise. d2857 5 a2861 1 2008-03-13 Alan Modra d2863 7 a2869 3 * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. d2871 3 a2873 1 2008-03-12 Bernd Schmidt d2875 48 a2922 98 From Jie Zhang * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo, gotoff, call and sym not bitfields. (bfinfdpic_gc_sweep_hook): New function; update the relocation information for the relocations of the section being removed. (bfinfdpic_check_relocs): Accumulate the number of relocations which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo, gotoff, call and sym fields. (elf_backend_gc_sweep_hook): Redefine for FD-PIC. 2008-03-12 Alan Modra PR 5900 * elf-bfd.h: Include elf/internal.h after elf/external.h. * elfcode.h (elf_swap_symbol_in): Map reserved shndx range. (elf_swap_symbol_out): Adjust SHN_XINDEX test. (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values seen in external structs. (valid_section_index_p): Delete. (elf_object_p): Don't increment section numbers over reserved range. Simplify test for valid sh_link, sh_info and e_shstrndx fields. (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values seen in external structs. Don't increment section numbers over reserved range. * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx. (bfd_section_from_shdr): Likewise. (group_signature): Range check before accessing elf_elfsections. (_bfd_elf_setup_sections): Likewise. (bfd_section_from_shdr): Likewise. (bfd_section_from_shdr): Don't increment section number over reserved sections. (assign_file_positions_for_non_load_sections): Likewise. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_write_object_contents): Likewise. (assign_section_numbers): Likewise. Adjust for changed SHN_*. (prep_headers): Delete unused variable. * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust for changed SHN_* values. (check_dynsym, elf_link_input_bfd): Likewise. (bfd_elf_final_link): Likewise. Don't skip over reserved section range. (elf_fixup_link_order): Check that sh_link field is valid. * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before accesssing elf_elfsections. * elf32-avr.c (elf32_avr_size_stubs): Likewise. * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise. * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed SHN_* defines. Test for SHN_BAD return from _bfd_elf_section_from_bfd_section 2008-03-12 Alan Modra * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype. * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int, SHN_BAD on error. (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from _bfd_elf_section_from_bfd_section, not -1. (swap_out_syms): Likewise. * elflink.c (elf_link_add_object_symbols): Likewise. (bfd_elf_get_bfd_needed_list): Likewise. (bfd_elf_match_symbols_in_sections): Likewise. (elf_link_add_object_symbols): Don't bother testing for symbols using normal sections before calling bfd_section_from_elf_index. (elf_link_input_bfd, bfd_elf_final_link): Likewise. (bfd_elf_reloc_symbol_deleted_p): Likewise. * elfcode.h (elf_slurp_symbol_table): Likewise. * elf32-spu.c (get_sym_h): Likewise. * elf32-xtensa.c (get_elf_r_symndx_section): Likewise. * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto. * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise. 2008-03-11 Alan Modra * elf32-spu.c (spu_elf_relocate_section): Test identical conditions to those in process_stubs for overlay symbols. 2008-03-09 Paul Brook * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new Tag_VFP_arch values. 2008-03-08 Paul Brook * elf32-arm.c (insert_thumb_branch): Rewrite. (elf32_thumb_to_arm_stub): Use new insert_thumb_branch. 2008-03-07 Paul Brook * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and MOVT relocations. (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign extension. (elf32_arm_relocate_section): Handle MOVW and MOVT relocations. Improve safety check for other weird relocations. (elf32_arm_check_relocs): Only set h->needs_plt for branch/call d2924 43 d2968 4 a2971 1 2008-03-03 Bob Wilson d2973 1 a2973 2 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and only compute its value once. d2975 2 a2976 1 2008-03-03 Alan Modra d2978 9 a2986 136 * elf32-spu.c (struct got_entry): Add "addend" field. (count_stub, build_stub): Use a new stub if relocation addend differs from existing stubs for this symbol. (process_stubs): Deal with addends. (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise. 2008-03-02 H.J. Lu PR ld/5789 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true for hidden and local symbols. 2008-03-03 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Discard relocs on undefined symbols with internal or hidden visibility. (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL rather than SYMBOL_REFERENCES_LOCAL on branches. Don't return immediately on dynamic reloc error. 2008-03-01 Alan Modra * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs if emitrelocations. (get_relocs): New function, split out from.. (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if emitrelocations. Remove indx temp. (ppc_size_one_stub): Count new stub relocs. (ppc64_elf_size_stubs): Count new glink reloc. (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations. (ppc64_elf_finish_dynamic_sections): Output glink relocs. * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic glink code. 2008-02-28 Alan Modra * elf32-spu.c (mark_functions_via_relocs): Don't assume that the "->start" pointer reaches to function origin, so that we can handle functions split over more than two sections. (build_call_tree): Likewise. (pasted_function): Don't attempt to set fun->start back to the function origin, just go back one section. 2008-02-27 Catherine Moore * elf.c ( _bfd_elf_print_private_bfd_data): Call elf_backend_get_target_dtag if defined. * elf32-mips.c (elf_backend_get_target_dtag): Define. * elf64-mips.c: Likewise. * elfn32-mips.c: Likewise. * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New. * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare. * elf-bfd.h (elf_backend_get_target_dtag): Add prototype. * elfxx-target.h (elf_backend_get_target_dtag): Add default. (elf_backend_data): Add elf_backend_get_target_dtag. 2008-02-26 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms, and assume branch relocs are not dynamic when non-shared. (readonly_dynrelocs): New function, split out from.. (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs. (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries, clear non_got_ref.. (allocate_dynrelocs): ..and don't set u.def for undefined weak. Do allow dynamic relocs on undefined symbols. (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs. (ppc_elf_relocate_section): Mirror dynamic reloc changes in check_relocs. (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak plt symbols needing pointer_equality_needed. 2008-02-23 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change. 2008-02-23 Alan Modra * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy pointer_equality_needed. (ppc_elf_check_relocs): Split out non-branch relocs from others that might emit dynamic relocs. Set pointer_equality_needed for their symbols. Don't set non_got_ref on branch reloc symbols. (ppc_elf_hash_symbol): New function. (elf_backend_hash_symbol): Define. (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed. Error if pointer_equality_needed on weak plt symbol. 2008-02-22 H.J. Lu PR ld/5788 * elflink.c (elf_create_symbuf): Correct buffer size and position. 2008-02-22 Nick Clifton PR 868 * dwarf2.c: Revert previous patch. All of the allocate memory is on an obstack which will be freed at some other time. 2008-02-20 Nick Clifton PR 868 * libbfd.c (bfd_realloc_or_free): New function. Performs like bfd_realloc, but if the (re)allocation fails, the pointer is freed. * libbfd-in.h: Prototype. * libbfd.h: Regenerate. * bfdio.c (bfd_bwrite): Use the new function. (bfd_seek): Likewise. * bfdwin.c:(bfd_get_file_window): Likewise. * elf-strtab.c (_bfd_elf_strtab_add): Likewise. * elf32-ppc.c (ppc_elf_relax_section): Likewise. * elf32-xtensa.c (vsprintf_msg): Likewise. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. * stabs.c (_bfd_link_seciton_stabs): Likewise. * vms-misc.c (_bfd_vms_get_record): Likewise. * vms-tir.c (check_section): Likewise. * vms.c (vms_new_section_hook): Likewise. * elf32-arm.c (elf32_arm_section_map_add): Check that the allocation of sec_data->map succeeded before using it. * elflink.c (elf_link_output_sym): Do not overwrite finfo-> symshndxbuf until it is known that the reallocation succeeded. 2008-02-20 Diogo de Carvalho Kraemer Nick Clifton PR 868 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run out of memory. (decode_line_info): Free the line_info_table before returning a failure result. (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table. Free the line table. Free the function table. Free the variable table. d2988 1 a2988 1 2008-02-17 Mark Kettenis d2990 6 a2995 2 * elf.c (swap_out_syms): Avoid preprocessing directive within macro arg. d2997 1 a2997 1 2008-02-17 Jan Kratochvil d2999 3 a3001 2 * elf.c (assign_file_positions_for_load_sections): Set the type of PT_NOTE sections to SHT_NOTE. d3003 1 a3003 1 2008-02-17 Ulrich Weigand d3005 4 a3008 2 * simple.c (bfd_simple_get_relocated_section_contents): Set link_info.output_bfd. d3010 1 a3010 1 2008-02-16 Nathan Sidwell d3012 3 a3014 2 * dwarf2.c (find_line): Don't trust debug information after an unparseable compilation unit. d3016 1 a3016 1 2008-02-15 Alan Modra d3018 1 a3018 3 PR 5765 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags. * bfd-in2.h: Regenerate. d3020 1 a3020 1 2008-02-15 Alan Modra d3022 2 a3023 50 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA. * elf.c (bfd_elf_allocate_object): Don't check for already allocated tdata. * elf32-hppa.c (elf32_hppa_mkobject): New function. (bfd_elf32_mkobject): Define. * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with.. (is_ppc_elf): ..this new macro. * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with.. (is_ppc64_elf): ..this new macro. 2008-02-15 Alan Modra * elflink.c: Replace all accesses to hash->creator field with output_bfd->xvec. * cofflink.c: Likewise. * coff-h8300.c: Likewise. * ecoff.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-ppc.c: Likewise. * elf64-alpha.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sparc.c: Likewise. * elfxx-mips.c: Likewise. * i386linux.c: Likewise. * m68klinux.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * xcofflink.c: Likewise. * linker.c: Likewise. (_bfd_link_hash_table_init): Don't store creator. 2008-02-14 Peter Jones * efi-rtdrv-ia32.c: New file. * efi-bsdrv-ia32.c: New file. * efi-rtdrv-ia64.c: New file. * efi-bsdrv-ia64.c: New file. * efi-rtdrv-x86_64.c: New file. * efi-bsdrv-x86_64.c: New file. * peicode.h (pe_bfd_object_p): Add support for boot service and runtime service drivers. * libpei.h: Add macros for EFI formats, and rename the efi application format macros to disambiguate. * targets.c: Add bfd_target _vec externs. (_bfd_tar): Add EFI _vec entries. * config.bfd: Add EFI vectors into the selection routines. * configure.in: add EFI _vec entries. * configure: Regenerate. * Makefile.am: Add EFI files. * Makefile.in: Regenerate. d3025 1 a3025 1 2008-02-14 Nathan Sidwell d3027 77 a3103 131 * dwarf1.c (struct dwarf1_debug): Add syms member. (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory. (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate section contents, check for out of memory. * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte. (parse_die): Change data pointers to bfd_byte. (parse_line_table, parse_functions_in_unit): Likewise. 2008-02-14 Alan Modra * elflink.c (compute_bucket_count): Warning fixes. 2008-02-12 DJ Delorie * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of relocation pointing to local symbol in merged section. * elf32-iq2000.c (iq2000_elf_relocate_offset16): New. (iq2000_elf_relocate_section): Call it. 2008-02-12 Nick Clifton PR ld/5692 * elf-bfd.h (enum elf_object_id): New enum, used to identify target specific extensions to the elf_obj_tdata structure. (struct elf_obj_tdata): New field 'object_id'. (elf_object_id, elf_program_header_size, elf_symtab_hdr): New macros for accessing fields in the elf_obj_tdata structure. (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object. (bfd_elf_allocate_object): New function. * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object and implement by calling bfd_elf_allocate_object. (bfd_elf_allocate_object): New function: Allocates an elf_obj_tdata structure, possibly with a target specific extension. * elfxx-target.h (bfd_elfNN_mkobject): Use bfd_elf_make_generic_object as the default value. * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata for consistency with other, similar structures. (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM ELF bfd. (elf32_arm_mkobject): Call bfd_elf_allocate_object. (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check the bfd being processed. (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. (bfd_elf32_arm_set_target_relocs): Likewise. (bfd_elf32_arm_final_link_relocate): Likewise. (bfd_elf32_arm_copy_private_bfd_data): Likewise. (bfd_elf32_arm_merge_eabi_attributes): Likewise. (bfd_elf32_arm_merge_private_bfd_data): Likewise. (bfd_elf32_arm_check_relocs): Likewise. (bfd_elf32_arm_gc_mark_extra_sections): Likewise. (bfd_elf32_arm_size_dynamic_sections): Likewise. (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr. (bfd_elf32_arm_init_maps): Likewise. (bfd_elf32_arm_final_link_relocate): Likewise. (bfd_elf32_arm_relocate_section): Likewise. (bfd_elf32_arm_gc_sweep_hook): Likewise. (bfd_elf32_arm_check_relocs): Likewise. (bfd_elf32_arm_size_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object. (is_i386_elf): New macro. Checks a BFD to make sure that is an x86 ELF bfd. (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd being processed. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_check_relocs): Use elf_symtab_hdr. (elf_i386_gc_sweep_hook): Likewise. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object. (elf_create_pointer_linker_section): Use is_ppc_elf_target to verify that the bfd before accessing target specific fields. (ppc_elf_check_relocs): Likewise. (elf_finish_pointer_linker_section): Likewise. (elf_create_pointer_linker_section): Use elf_symtab_hdr. (ppc_elf_check_relocs): Likewise. (ppc_elf_gc_sweep_hook): Likewise. (ppc_elf_tls_optimize): Likewise. (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relax_section): Likewise. (ppc_elf_relocate_section): Likewise. * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment reminding programmers to keep this structure in sync with the one defined in elf64-s390.c. (elf_s390_mkobject): Call bfd_elf_allocate_object. (is_s390_elf): New macro. Checks a BFD to make sure that is an s390 ELF bfd. (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd being processed. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. (elf_s390_check_relocs): Use elf_symtab_hdr. (elf_s390_gc_sweep_hook): Likewise. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object. (is_sh_elf): New macro. Checks a BFD to make sure that is an SH ELF bfd. (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the bfd being processed. (sh_elf_relocate_section): Likewise. (sh_elf_check_relocs): Likewise. (sh_elf_copy_private_data): Likewise. (sh_elf_relax_section): Use elf_symtab_hdr. (sh_elf_size_dynamic_sections): Likewise. (sh_elf_relocate_section): Likewise. (sh_elf_get_relocated_section_contents): Likewise. (sh_elf_gc_sweep_hook): Likewise. (sh_elf_check_relocs): Likewise. * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object. (is_alpha_elf): New macro. Checks a BFD to make sure that is an Alpha ELF bfd. (elf64_alpha_create_got_section): Use is_alpha_elf macro to check the bfd being processed. (elf64_alpha_create_dynamic_section): Likewise. (elf64_alpha_check_relocs): Likewise. (elf64_alpha_size_got_sections): Likewise. (elf64_alpha_relax_section): Likewise. (elf64_alpha_relocate_section): Likewise. (elf64_alpha_final_link): Likewise. (elf64_alpha_check_relocs): Use elf_symtab_hdr. (elf64_alpha_relax_section): Likewise. (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object. (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd being processed. (opd_entry_value): Likewise. d3105 70 a3174 6 (ppc64_elf_relocate_section): Likewise. (ppc64_elf_check_relocs): Use elf_symtab_hdr. (opd_entry_value): Likewise. (ppc64_elf_gc_sweep_hook): Likewise. (get_sym_h): Likewise. (ppc64_elf_edit_opd): Likewise. d3177 4 a3180 40 (ppc64_elf_size_dynamic_sections): Likewise. (toc_adjusting_stub_needed): Likewise. (ppc64_elf_size_stubs): Likewise. (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment reminding programmers to keep this structure in sync with the one defined in elf32-s390.c. (elf_s390_mkobject): Call bfd_elf_allocate_object. (is_s390_elf): New macro. Checks a BFD to make sure that is an s390 ELF bfd. (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd being processed. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. (elf_s390_check_relocs): Use elf_symtab_hdr. (elf_s390_gc_sweep_hook): Likewise. (elf_s390_size_dynamic_sections): Likewise. (elf_s390_relocate_section): Likewise. * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object. (is_x86_64_elf): New macro. Checks a BFD to make sure that is an x86_64 ELF bfd. (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd being processed. (elf64_x86_64_size_dynamic_sections): Likewise. (elf64_x86_64_relocate_section): Likewise. (elf64_x86_64_check_relocs): Use elf_symtab_hdr. (elf64_x86_64_gc_sweep_hook): Likewise. (elf64_x86_64_size_dynamic_sections): Likewise. (elf64_x86_64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object. (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc ELF bfd. (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the bfd being processed. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_size_dynamic_sections): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. d3182 11 a3192 1 2008-02-12 Alan Modra d3194 1 a3194 7 PR 5303, 5755 * arange-set.c: Delete. * arange-set.h: Delete. * dwarf2.c: Revert 2007-09-21 changes. * Makefile.am: Likewise. * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. d3196 2 a3197 1 2008-02-11 Bernd Schmidt d3199 1 a3199 4 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it if necessary. (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type mismatches are detected. d3201 3 a3203 2 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to emit invalid relocs or rofixup entries for deleted .eh_frame entries. d3205 1 a3205 1 2008-02-11 Daniel Jacobowitz d3207 3 a3209 3 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF was reached. * srec.c (srec_scan): Calculate the checksum. Complain on mismatch. d3211 1 a3211 1 2008-02-07 Alan Modra d3213 1 a3213 4 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling of _ovly_buf_table size. (spu_elf_build_stubs): Use low bit of .size as "present" bit. Adjust initialisations relating to _ovly_buf_table. d3215 1 a3215 1 2008-02-04 Bob Wilson d3217 193 a3409 5 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND relocations against dynamic symbols. (elf_xtensa_finish_dynamic_sections): Do not fail if there is no .xt.lit section. d3411 1 a3411 1 2008-02-04 Kai Tietz d3414 109 a3522 4 PR 5715 * warning.m4: Enable -Wno-format by default when using gcc on mingw. * configure: Regenerated. d3524 1 a3524 1 2008-02-04 Adam Nemet d3526 1 a3526 2 * archures.c: Update copyright. (bfd_mach_mips_octeon): New macro. d3528 11 a3538 76 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon. (mips_set_isa_flags): Likewise. (mips_mach_extensions): Add Octeon. * cpu-mips.c: Update copyright. (I_mipsocteon): New enum constant. (arch_info_struct): Add Octeon. 2008-02-04 Alan Modra * elf32-spu.c (spu_elf_relocate_section): Correct return type. Return error status on unexpected relocation errors. 2008-02-04 Alan Modra PR ld/5692 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort on non-ELF input. * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue processing on non-ELF input. 2008-01-31 Marc Gauthier * config.bfd (xtensa*-*-*): Recognize processor variants. 2008-01-31 Nick Clifton PR ld/5692 * elf.c (bfd_elf_get_elf_syms): Check the return value of get_elf_backend_data. 2008-01-28 Fabian Groffen * config.bfd (x86_64-*-solaris2): Add support for this target. 2008-01-28 Alan Modra Rewrite SPU overlay handling code. Put overlay calls stubs in the overlays where possible. Use a faster call stub, or optionally at compile time, a more compact stub. Double size of _ovly_buf_table so that low bit of _ovly_table.buf can be used as a "present" bit. Reserve an extra _ovly_table entry for index zero. * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields, add new ones. (struct got_entry): New. (struct spu_stub_hash_entry): Delete. (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete. (spu_elf_link_hash_table_create): Adjust for struct changes. (spu_stub_name): Delete. (spu_elf_find_overlays): Don't track sections from overlay regions. Instead set ovl_buf number in spu elf section data. Error if overlays in one region don't start at the same address. Adjust for struct _spu_elf_section_data changes. (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete. (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define. (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes. (enum _insn_type): New. (count_stub, build_stub): New functions. (allocate_spuear_stubs): Use count_stub. (build_spuear_stubs): Use build_stub. (populate_stubs, sort_stubs): Delete. (process_stubs): New function. (write_one_stub): Delete. (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite. (alloc_stack_info): Adjust for struct _spu_elf_section_data changes. (maybe_insert_function, check_function_ranges): Likewise. (find_function, pasted_function, build_call_tree): Likewise. (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise. (spu_elf_modify_program_headers): Likewise. (interesting_section): Detect stub sections differently. Delete htab param, adjust all callers. (spu_elf_relocate_section): Rewrite stub handling. (spu_elf_output_symbol_hook): Likewise. (bfd_elf32_bfd_link_hash_table_free): Delete. * elf32-spu.h (struct _spu_elf_section_data): Move input-only and output-only fields into a union. Add ovl_buf. (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes. d3540 1 a3540 1 2008-01-25 DJ Delorie d3542 1 a3542 1 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New. d3544 1 a3544 1 2008-01-25 Kai Tietz d3546 47 a3592 3 * bfd-in.h: Add mingw I64 support. * bfd-in2.h: Regenerated. * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64. d3594 1 a3594 1 2008-01-21 Alan Modra d3596 4 a3599 3 PR 4453 * format.c (bfd_check_format_matches): Don't accept archives as fully matching unless they have a map. d3601 1 a3601 1 2008-01-21 Alan Modra d3603 4 a3606 1 * elflink.c (_bfd_elf_link_output_relocs): Correct error return. d3608 1 a3608 1 2008-01-21 Alan Modra d3610 2 a3611 5 * ecoff.c (_bfd_ecoff_archive_p): Delete. * libecoff.h (_bfd_ecoff_archive_p): Delete. * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p. * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise. (ecoff_biglittle_vec): Likewise. d3613 1 a3613 1 2008-01-19 Alan Modra d3615 7 a3621 3 PR 5646 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr non-NULL before dereferencing. d3623 1 a3623 1 2008-01-15 Alan Modra d3625 5 a3629 19 PR 5604 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param names from others. (_bfd_elf_gc_keep): Declare. * elfxx-target.h (elf_backend_gc_keep): Define. (elfNN_bed): Init new field. * elflink.c (_bfd_elf_gc_keep): New function. (bfd_elf_gc_sections): Call gc_keep. * elf64-ppc.c (elf_backend_gc_keep): Define. (struct _ppc64_elf_section_data): Move .opd related fields to a struct so they don't occupy the same storage. Adjust accesses throughout file. (ppc64_elf_gc_keep): New function, split out from.. (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark to mark .opd section, just set gc_mark. (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust unless we are changing .opd. Test non-NULL opd->adjust at all accesses throughout file. * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype. d3631 1 a3631 1 2008-01-15 Alan Modra d3633 1 a3633 1 * bfd-in.h (BFD_HOST_LONG_LONG): Delete. d3635 2 d3638 1 a3638 2 2008-01-11 Tristan Gingold Eric Botcazou d3640 2 a3641 60 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a relocatable. * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise. * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise. * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise. * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise. * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise. * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise. * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise. * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise. * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise. * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise. * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise. * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output or executable output with relocations. 2008-01-09 Nick Clifton PR gas/5552 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field to FALSE for all relocs. 2008-01-09 Richard Sandiford PR ld/5526 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged fields. Rename u.cie.u.merged to u.cie.u.merged_with. (eh_frame_sec_info): Add a cies field. (eh_frame_hdr_info): Add a merge_cies field. * elf-eh-frame.c (cie): Add a reloc_index member to the personality union. (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead of hdr_info->cies. (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of cie structures in all cases and use it instead of extended_cies. If merging, store the cie array in sec_info->cies and point each CIE's eh_fde_cie at the associated element. Do not try to calculate the value of the personality routine here; record the offset of the relocation instead. Do not merge CIEs here. (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here... (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead. (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE. (find_merged_cie): New function. (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies. 2008-01-07 Nick Clifton PR binutils/5535 * vms.c (vms_close_and_cleanup): Check for the presence of a vms_private_data_struct before examining any of its fields. 2008-01-07 H.J. Lu PR ld/5522 * elflink.c (elf_link_input_bfd): Don't write out a section if its output section is marked with SEC_NEVER_LOAD. d3643 1 a3643 1 For older changes see ChangeLog-2007 @ 1.1 log @Initial revision @ text @d1 105 @ 1.1.1.1 log @Import binutils 2.19.1 as requested by matt@@ OK'ed by board@@ @ text @@ 1.1.1.2 log @Import the binutils-2_19-branch sources as of 2010-04-02. @ text @a0 105 2009-03-02 Alan Modra 2009-02-15 Alan Modra * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx, add toc.symndx and toc.add. (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here. Set up toc.add. (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all callers. (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd. (branch_reloc_hash_match): New function, extracted from.. (ppc64_elf_tls_optimize): ..here. (ppc64_elf_relocate_section): Properly set addends when optimizing tls sequences. Avoid unnecessary reading and writing of insns. Only redo reloc when symbol changed. Bypass symbol checks when using tlsld_got. * elf32-ppc.c (ppc_elf_tls_setup): Correct comment. (branch_reloc_hash_match): New function, extracted from.. (ppc_elf_tls_optimize): ..here. (ppc_elf_relocate_section): Avoid unnecessary reading of insns. Don't clear addend on zapped __tls_get_addr reloc. 2009-02-01 Jan Kratochvil * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove. (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs. 2009-01-26 Nathan Sidwell * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs describing the trampolines. (ppc_elf_relocate_section): Update relocs to describe the trampolines. 2009-01-22 Alan Modra PR 6832 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until after comp_unit_find_line call. 2009-01-14 Alan Modra PR 9735 * syms.c (_bfd_stab_section_find_nearest_line): Don't free saved filename, use bfd_alloc rather than bfd_malloc for it. 2009-01-11 Jan Kratochvil * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'. 2008-12-11 Alan Modra PR 7041 * elf64-ppc.c (func_desc_adjust): Correct logic making fake function descriptors. Similarly correct making function descriptors dynamic. 2008-11-14 Nathan Sidwell * elf.c (assign_file_positions_for_load_sections): Use header_size to avoid moving the load address of file headers. (assign_file_positions_for_load_sections): Set header_size for segments containing the file header. 2008-11-13 Hans-Peter Nilsson PR ld/7028 * elf.c (assign_file_positions_for_load_sections): Allocate phrds with bfd_zalloc2 instead of bfd_alloc2. For the amount, use the possibly-preset header-size, not the computed one. 2008-11-13 Alan Modra PR 7023 * elf.c (bfd_section_from_shdr ): Fail on invalid sh_info. 2008-11-11 Alan Modra PR 7012 * dwarf2.c (find_line): Don't keep stale pointers into realloc'd memory. Return on errors. Fix memory leak. (_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer. 2008-10-10 Nathan Froyd * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge Tag_GNU_Power_ABI_Struct_Return. 2008-10-03 Alan Modra * elf.c (bfd_elf_set_group_contents): Assign sh_info for ld -r when the signature symbol is global. * elflink.c (elf_link_input_bfd): Ensure group signature symbol is output when ld -r. Set group sh_info when local. * linker.c (default_indirect_link_order): Handle group sections specially. 2008-09-28 Alan Modra * elf.c (_bfd_elf_init_private_section_data): Tweak union copy. (bfd_section_from_shdr): Don't change SHT_GROUP section name. * elflink.c (section_signature): New function. (_bfd_elf_section_already_linked): Use it. 2009-02-15 Bjoern Haase PR 9841 * elf32-avr.c: Handle case where no local symbos exist correctly. 2009-02-04 Eric B. Weddington * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound. 2009-02-03 Tristan Gingold * Makefile.am (RELEASE): Unset. * Makefile.in: Regenerated. @ 1.1.1.3 log @from ftp.gnu.org @ text @d1 1 a1 1 2011-06-27 Tristan Gingold d3 29 a31 3 * configure.in: Bump version to 2.21.1 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d33 4 a36 1 2011-06-24 Alan Modra d38 55 a92 4 PR ld/12921 * elf.c (assign_file_positions_for_load_sections): Don't align sh_offset for all SHT_NOBITS sections here, just .tbss sections that don't get a PT_LOAD. d94 2 a95 1 2011-06-22 Alan Modra d97 1 a97 2 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for plugin symbols. Fix segfault on linker scrip defined syms. d99 1 a99 1 2011-05-29 Alan Modra d101 1 a101 5 Apply from mainline 2011-05-26 Alan Modra * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment. * elflink.c (_bfd_elf_symbol_refs_local_p): Expand local_protected comment. d103 2 a104 4 2011-05-23 Alan Modra PR 12763 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for .tbss, and page align same for all SHT_NOBITS sections. d106 1 a106 3 2011-05-23 Nick Clifton * elf-m10300.c (mn10300_elf_mkobject): New function. (bfd_elf32_mkobject): Define. d108 3 a110 52 2011-05-21 Alan Modra PR 12763 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs from PT_TLS header. (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD segment if just for .tbss. (assign_file_positions_for_load_sections): Don't report "can't allocate in segment" errors for .tbss. (assign_file_positions_for_non_load_sections): Don't set p_filesz from SHT_NOBITS section filepos. 2011-05-17 Alan Modra PR ld/12760 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call. * elflink.c (elf_link_add_object_symbols): Likewise. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. 2011-05-16 Alan Modra * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak. 2011-05-12 Jan Kratochvil * config.in: Regenerated. * configure: Regenerated. * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition. 2011-05-10 Jan Kratochvil * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and 32bit psinfo. * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid. * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise. 2011-05-07 Dave Korn PR ld/12365 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about references to symbols defined in discarded sections. 2011-05-07 Dave Korn PR ld/12365 * coffgen.c (coff_write_symbol): Assume input section is its own output section if output_section member not set. (coff_write_alien_symbol): Likewise. 2011-05-07 Anders Kaseorg PR 12739 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast. * bfd-in2.h: Regenerate. d112 1 a112 2 2011-04-28 Tom Tromey * bfdio.c (memory_bstat): Pass correct size to memset. d114 3 a116 144 2011-04-20 Alan Modra * libbfd.c (bfd_log2): Do return rounded up value. * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2 call with expanded old round down version of the function. * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd. * elflink.c (elf_link_add_object_symbols): Delete redundant code. 2011-04-09 Kai Tietz * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary buffer and use rawsize for sorting. * coffcode.h (coff_compute_section_file_positions): Set rawsize before doing alignment. 2011-04-07 Cary Coutant * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification. 2011-03-03 Michael Snyder * aoutx.h (aout_final_link): Use sizeof int not sizeof int*. (aout_link_write_other_symbol): Missing break statement. 2011-02-14 Mike Frysinger * elflink.c (bfd_elf_size_dynamic_sections): Add bfd_get_symbol_leading_char to the start of newname. 2011-01-18 Pierre Muller Fix compilation for mingw64. * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate typecast to avoid warning. * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type usage. * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead of long for pointer to avoid warning. (elfNN_ia64_relax_brl): Idem. (elfNN_ia64_install_value): Idem. * vms-alpha.c (_bfd_vms_slurp_etir): Idem. 2012-05-25 H.J. Lu Backport from mainline 2012-01-06 H.J. Lu PR ld/12366 PR ld/12371 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly handle symbols marked with regular reference, but not non-GOT reference when building shared library. * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle local and global STT_GNU_IFUNC symols when building shared library. * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise. 2011-05-23 DJ Delorie * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo the vma/lma swapping done in elf32_rx_modify_program_headers. 2011-05-15 Richard Sandiford * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and global GOT entries for GOT_PAGE relocations against global symbols. 2011-05-15 Richard Sandiford PR ld/12637 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count as the number of global entries when merging with the primary GOT. 2011-05-13 Alan Modra Apply 2011-04-17 Jan Kratochvil * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for SEC_LOAD. 2011-05-06 Richard Sandiford * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb branch to a PLT entry, redirect it to the PLT's Thumb entry point. 2011-05-04 Alan Modra PR ld/12727 * elf64-ppc.c (ppc_build_one_stub ): Clear was_undefined on dot-symbols. 2011-04-27 Alan Modra Backport from mainline 2011-04-24 Alan Modra PR ld/12365 PR ld/12696 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call. * linker.c (_bfd_link_hash_newfunc): Clear bitfields. (_bfd_generic_link_add_one_symbol): Update "notice" call. * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when it is a redef of an IR symbol in a real BFD. 2011-04-20 Alan Modra PR ld/12365 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols in their own common section. * elflink.c (elf_link_add_object_symbols): Likewise. * linker.c (generic_link_check_archive_element): Don't lose flags if common section is pre-existing. (_bfd_generic_link_add_one_symbol): Likewise. 2011-04-20 Alan Modra PR ld/12365 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call multiple_definition regardless of allow_multiple_definition. * simple.c (simple_dummy_multiple_definition): Update. * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition calls. 2011-04-18 Alan Modra PR ld/12365 PR ld/12672 * bfd.c (BFD_PLUGIN): Define. (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN. * bfd-in2.h: Regenerate. * elflink.c (elf_link_output_extsym): Strip undefined plugin syms. * opncls.c (bfd_make_readable): Don't lose original bfd flags. 2011-04-11 Mark Wielaard PR 10549 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols. (has_gnu_symbols): Renamed from has_ifunc_symbols. * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name. * elf32-i386.c (elf_i386_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. 2011-02-25 Rafael Ávila de Espíndola * plugin.c (bfd_plugin_object_p): Correctly set the filesize and handle claim_file seeking. Only try to load the plugin once. 2010-12-12 H.J. Lu * elf.c (special_sections_g): Add ".gnu.lto_". 2011-04-20 Jan Kratochvil d118 1 a118 2 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of memmove elements. d120 2 a121 1 2011-03-26 John Marino d123 3 a125 3 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*. * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec. * configure: Regenerate. d127 1 a127 1 2011-03-24 Alan Modra d129 4 a132 135 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where old-style __tls_get_addr calls without marker relocs don't match their arg setup insn one for one. If such mismatches are found report the reloc and don't do any tls optimization. * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise. 2011-03-10 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset for LO_DS error message and correct multiple. 2011-03-10 Alan Modra * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define. (ppc64_elf_link_just_syms): New function. (opd_entry_value): Don't assume big-endian host. (get_r2off): New function. (ppc_build_one_stub, ppc_size_one_stub): Use it here. 2011-03-04 Alan Modra * archive.c (bsd_write_armap): Don't call stat in deterministic mode, and don't use st_mtime if stat returns error. 2011-02-28 Alan Modra PR 12513 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and stringsize. Properly sanity check symdef_count. Remove redundant bfd_release. 2011-02-01 Alan Modra Backport from mainline 2011-01-22 Richard Sandiford * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore common sections too. 2011-01-14 Alan Modra * bfd.c (bfd_perror): Flush stdout before and stderr after printing error. (_bfd_default_error_handler): Likewise. * elf.c (print_segment_map): Likewise. * libbfd.c (warn_deprecated): Likewise. * som.c (som_sizeof_headers): No need to do so here. * coff-i860.c: Replace use of printf for error messages with _bfd_error_handler. * coff-ppc.c: Likewise. * coff-sh.c: Likewise. * elf32-bfin.c: Likewise. * elf32-dlx.c: Likewise. * elf32-mep.c: Likewise. * elf32-v850.c: Likewise. * mach-o.c: Likewise. * pef.c: Likewise. 2010-12-24 Alan Modra * compress.c (decompress_contents): Style. (bfd_get_full_section_contents): Do not decompress directly into caller buffer or directly return cached section contents. Check malloc return for compressed_buffer. 2010-12-13 Alan Modra * aoutx.h (aout_link_check_ar_symbols): Formatting. * cofflink.c (coff_link_check_ar_symbols): Likewise. * elflink.c (elf_link_add_archive_symbols): Likewise. * pdp11.c (aout_link_check_ar_symbols): Likewise. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols, xcoff_link_check_dynamic_ar_symbols): Likewise. * aoutx.h (aout_link_check_archive_element): Simplify code dealing with add_archive_element substitute BFD. * cofflink.c (coff_link_check_archive_element): Likewise. * ecoff.c (ecoff_link_check_archive_element): Likewise. (ecoff_link_add_archive_symbols): Likewise. * linker.c (generic_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_archive_element): Likewise. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise. * xcofflink.c (xcoff_link_check_archive_element): Likewise. * aoutx.h (aout_link_check_archive_element): Free symbols from old bfd if !keep_memory. * cofflink.c (coff_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_archive_element): Likewise. * xcofflink.c (xcoff_link_check_archive_element): Likewise. 2010-12-12 H.J. Lu * elflink.c (elf_link_add_archive_symbols): Remove subsbfd. 2010-12-06 Dmitry Gorbachev PR ld/12288 * plugin.c (message): Add putchar for the trailing `\n'. 2010-12-04 Alan Modra PR ld/12277 * elflink.c (elf_link_output_extsym): Set bfd_error on symbol and section errors. Allow better translation of error messages. 2010-11-24 Joel Brobecker * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo. (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c. * Makefile.in: Regenerate. 2010-11-24 Alan Modra PR ld/12253 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct DW_EH_PE_datarel handling. Truncate .eh_frame_hdr address to ptr_size. 2010-11-08 Alan Modra * hash.c (bfd_hash_hash): Extract from.. (bfd_hash_lookup): ..here. (bfd_hash_rename): New function. * section.c (bfd_rename_section): New function. * bfd-in.h (bfd_hash_rename): Declare. * bfd-in2.h: Regenerate. * elf.c (_bfd_elf_make_section_from_shdr): Rename input sections when compressing or decompressing. Don't assert name match. * elf64-hppa.c (get_reloc_section): Don't assert name match. * elfxx-ia64.c (get_reloc_section): Likewise. 2010-11-05 Joseph Myers * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low, _bfd_elf_merge_unknown_attribute_list): Correct test for matching string attributes. 2011-02-01 Alan Modra * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value for toc pointer on any section having makes_toc_func_call set. (check_pasted_section): Ensure pasted .init/.fini fragments use the same toc if any has makes_toc_func_call set. 2011-01-28 Joseph Myers * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs field. d134 1 a134 1 2010-12-10 Alan Modra d136 3 a138 2 * config.bfd: Configure rs6000-*-aix* as for powerpc-*-aix*. Add aix5coff64_vec to powerpc ELF entries. d140 1 a140 1 2010-12-08 Tristan Gingold d142 1 a142 1 * configure.in: Bump version to 2.21.0 d144 1 a144 1 * configure, Makefile.in: Regenerate. d146 1 a146 1 2010-12-08 Tristan Gingold d148 1 a148 1 * configure.in: Bump version to 2.21 d150 1 a150 1 * configure, Makefile.in: Regenerate. d152 1 a152 1 2010-12-07 H.J. Lu d154 2 a155 3 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS and BFD_DECOMPRESS. (bfd_openr_next_archived_file): Revert the last change. d157 1 a157 1 2010-12-06 Mike Frysinger d159 2 a160 3 * Makefile.am (!INSTALL_LIBBFD/bfdinclude_HEADERS): Set to nothing. (PLUGINS/bfdinclude_HEADERS): Append plugin-api.h. * Makefile.in: Regenerated. d162 1 a162 1 2010-11-30 Joel Sherrill d164 3 a166 1 * config.bfd: Add sparc64-rtems. d168 1 a168 1 2010-11-25 Alan Modra d170 2 a171 5 * po/es.po: Update. * po/fi.po: Update. * po/fr.po: Update. * po/ja.po: Update. * po/zh_CN.po: Update. d173 1 a173 1 2010-11-17 Tristan Gingold d175 6 a180 2 * vms-lib.c (vms_write_index): Add comments. Partially revert previous patch. Free blocks later. d182 1 a182 1 2010-11-10 Richard Sandiford d184 1 a184 2 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove unused variables. d186 1 a186 1 2010-11-10 Nick Clifton d188 2 a189 2 * po/ja.po: Updated Japanese translation. * po/ru.po: Updated Russian translation. d191 2 a192 1 2010-11-08 Tristan Gingold d194 14 a207 2 * configure.in: Bump version to 2.20.90 * configure: Regenerate. d209 1 a209 1 2010-11-08 Nick Clifton d211 1 a211 1 * po/ja.po: Updated Japanese translation. d213 1 a213 1 2010-11-05 Tristan Gingold d215 2 a216 1 * po/bfd.pot: Regenerate d218 1 a218 1 2010-11-04 Maciej W. Rozycki d220 3 a222 4 PR ld/10144 * elfxx-mips.c (_bfd_mips_elf_check_relocs) [R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from SEC_DEBUGGING sections. d224 1 a224 1 2010-11-04 Tristan Gingold d226 6 a231 2 * vms-lib.c (vms_write_index): Fix thinko: reverse the loop. Use bfd_zmalloc instead of bfd_malloc. Fix comment. d233 1 a233 1 2010-11-04 Kai Tietz d235 4 a238 4 * coffcode.h (GNU_LINKONCE_WT): New. (sec_to_styp_flags): Add handling of new debug section. (styp_to_sec_flags): Likewise. d240 1 a240 1 2010-11-04 Tristan Gingold d242 2 a243 2 * makefile.vms (CFLAGS): Make badalias warnings informational. * vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer. d245 1 a245 1 2010-11-04 Joseph Myers d247 3 a249 14 * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low, _bfd_elf_merge_unknown_attribute_list): New. * elf-bfd.h (struct elf_backend_data): Add obj_attrs_handle_unknown. (_bfd_elf_merge_unknown_attribute_low, _bfd_elf_merge_unknown_attribute_list): Declare. * elf32-arm.c (elf32_arm_obj_attrs_handle_unknown): New. Split out from elf32_arm_merge_eabi_attributes. (elf32_arm_merge_eabi_attributes): Use _bfd_elf_merge_unknown_attribute_low and _bfd_elf_merge_unknown_attribute_list. (elf_backend_obj_attrs_handle_unknown): Define. * elfxx-target.h (elf_backend_obj_attrs_handle_unknown): Define. (elfNN_bed): Update initializer. d251 1 a251 1 2010-11-02 H.J. Lu d253 1 a253 2 * bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New. * bfd-in2.h: Regenerated. d255 1 a255 1 2010-11-02 Joseph Myers d257 131 a387 107 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for Tag_ABI_compatibility, treat odd tags as strings and even ones as integers. (elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment, elf32_tic6x_array_alignment_to_tag): New. (elf32_tic6x_merge_attributes): Handle more attributes. Set type for merged attributes. (elf_backend_obj_attrs_order): Define. 2010-10-29 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): Fix a typo. 2010-10-29 Pawel Sikora PR binutils/12075 * compress.c (bfd_compress_section_contents): Use uLong on compressed_size. 2010-10-29 Joseph Myers * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check Tag_ABI_compatibility not Tag_compatibility. (elf32_tic6x_merge_attributes): Update compatibility attribute name in comment. Return FALSE if merging common attributes fails. 2010-10-29 Nick Clifton PR bintils/6962 * coffcode.h (handle_COMDAT): Only check the base type when looking for a section symbol. 2010-10-29 H.J. Lu Cary Coutant * archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS and BFD_DECOMPRESS. * bfd.c (BFD_COMPRESS): New. (BFD_DECOMPRESS): Likewise. (BFD_FLAGS_SAVED): Likewise. (bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED. * compress.c (bfd_uncompress_section_contents): Removed. (get_uncompressed_size): New. (decompress_contents): Likewise. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_is_section_compressed): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * dwarf2.c (dwarf_debug_sections): New. (dwarf_debug_section_enum): Likewise. (read_section): Remove section_name and compressed_section_name. Add dwarf_debug_section_enum. Try compressed debug section. (read_indirect_string): Updated. (read_abbrevs): Likewise. (decode_line_info): Likewise. (read_debug_ranges): Likewise. (find_line): Updated. * ecoff.c (bfd_debug_section): Add compress_status and compressed_size. * elf.c (_bfd_elf_make_section_from_shdr): Call bfd_is_section_compressed to check if a DWARF debug section is compressed. Call bfd_init_section_compress_status or bfd_init_section_decompress_status if needed. * elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents with bfd_get_full_section_contents. * merge.c (_bfd_add_merge_section): Likewise. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * simple.c (bfd_simple_get_relocated_section_contents): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and BFD_DECOMPRESS. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (dwarf_debug_section): New. (dwarf_debug_sections): Likewise. * libbfd.c (_bfd_generic_get_section_contents): Issue an error when getting contents on compressed/decompressed section. * section.c (COMPRESS_SECTION_NONE): New. (COMPRESS_SECTION_DONE): Likewise. (DECOMPRESS_SECTION_SIZED): Likewise. (BFD_FAKE_SECTION): Add compress_status and compressed_size. (bfd_malloc_and_get_section): Replace bfd_get_section_contents with bfd_get_full_section_contents. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. 2010-10-29 Bernd Schmidt Joseph Myers * elf32-tic6x.c (elf32_tic6x_merge_attributes): Check for mismatch of DSBT attributes. 2010-10-25 Daniel Jacobowitz * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call _bfd_clear_contents. Pass it the input section. * libbfd-in.h (_bfd_clear_contents): Add input_section argument. a388 62 * reloc.c (_bfd_clear_contents): Take input_section argument. Use non-zero for .debug_ranges. (bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents call. * elf32-arm.c (elf32_arm_relocate_section): Use RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. 2010-10-25 Nathan Sidwell d390 1 a390 1 * elf32-tic6x.c: Add attribution. d392 2 a393 1 2010-10-25 Alan Modra d395 1 a395 2 * elf32-arm.c (find_stub_size_and_template): Avoid uninitialized var warning at -O3. d397 7 a403 1 2010-10-25 Alan Modra d405 2 a406 4 * opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal. * libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here. * libbfd.h: Regenerate * bfd-in2.h: Regenerate. d408 1 a408 1 2010-10-25 Alan Modra d410 1 a410 4 * opncls.c (_bfd_id_counter): Rename to bfd_id_counter. (bfd_reserved_id_counter, bfd_use_reserved_id): New vars. (_bfd_new_bfd): Use negative id when bfd_use_reserved_id. (bfd_create): Doc fix. d412 2 d415 1 a415 1 2010-10-22 Rainer Orth d417 5 a421 28 * elfxx-sparc.c (tpoff): Define bed, static_tls_size. Consider static_tls_alignment. * elf32-sparc.c (TARGET_BIG_SYM): Redefine to bfd_elf32_sparc_sol2_vec. (TARGET_BIG_NAME): Redefine to elf32-sparc-sol2. (elf32_bed): Redefine to elf32_sparc_sol2_bed. (elf_backend_static_tls_alignment): Redefine to 8. Include elf32-target.h. (elf_backend_static_tls_alignment): Undef again for VxWorks. * elf64-sparc.c (TARGET_BIG_SYM): Redefine to bfd_elf64_sparc_sol2_vec. (TARGET_BIG_NAME): Redefine to elf64-sparc-sol2. (ELF_OSABI): Undef. (elf64_bed): Redefine to elf64_sparc_sol2_bed. (elf_backend_static_tls_alignment): Redefine to 16. Include elf64-target.h. * config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*. Set targ_defvec to bfd_elf32_sparc_sol2_vec. [BFD64] (sparc-*-solaris2*): Set targ_defvec to bfd_elf32_sparc_sol2_vec. Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in targ_selvecs. * configure.in: Handle bfd_elf32_sparc_sol2_vec, bfd_elf64_sparc_sol2_vec. d424 1 a424 72 * targets.c (bfd_elf32_sparc_sol2_vec): Declare. (bfd_elf64_sparc_sol2_vec): Declare. (_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec, bfd_elf64_sparc_sol2_vec. 2010-10-21 Joseph Myers * elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for attribute renaming. (elf_backend_obj_attrs_section): Change to ".c6xabi.attributes". 2010-10-21 Rainer Orth * elf-bfd.h (struct elf_backend_data): New member static_tls_alignment. * elfxx-target.h (elf_backend_static_tls_alignment): Provide default. (elfNN_bed): Initialize static_tls_alignment. * elflink.c (bfd_elf_final_link): Don't round end of TLS section if static TLS has special alignment requirements. * elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size. Consider static_tls_alignment. (elf_backend_static_tls_alignment): Redefine for Solaris 2. Undef again for VxWorks. * elf64-x86-64.c (elf64_x86_64_tpoff): Define bed, static_tls_size. Consider static_tls_alignment. (elf_backend_static_tls_alignment): Redefine for Solaris 2. Undef again for Intel L1OM. 2010-10-14 Dave Korn Apply LD plugin patch series (part 6/6). * aoutx.h (aout_link_check_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (aout_link_check_archive_element): Handle substitute bfd if it was set during add_archive_element callback in the above. * cofflink.c (coff_link_check_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (coff_link_check_archive_element): Handle substitute bfd if it was set during add_archive_element callback in the above. * ecoff.c (read_ext_syms_and_strs): New function holds symbol-reading code factored-out from ecoff_link_check_archive_element. (reread_ext_syms_and_strs): Clear old symbols and call it. (ecoff_link_check_archive_element): Use the above. Handle substitute BFD if one is set by add_archive_element callback. (ecoff_link_add_archive_symbols): Likewise allow bfd substitution. * elflink.c (elf_link_add_archive_symbols): Likewise. * linker.c (generic_link_check_archive_element): Likewise. * pdp11.c (aout_link_check_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (aout_link_check_archive_element): Handle substitute bfd if it was set during add_archive_element callback in the above. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Handle substitute BFD if one is set by add_archive_element callback. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Take new "subsbfd" reference parameter and pass it when invoking add_archive_element callback. (xcoff_link_check_ar_symbols): Likewise. (xcoff_link_check_archive_element): Handle bfd substitution if it was set by callback in the above. 2010-10-11 Alan Modra * elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms. (elf32_frvfdpic_finish_dynamic_sections): Don't crash on __ROFIXUP_END__ defined in shared lib. 2010-10-11 Thomas Schwinge * elf32-arm.c (elf32_arm_final_link_relocate) (elf32_arm_relocate_section): Handle relocations against STN_UNDEF. d426 1 a426 1 2010-10-11 Dave Korn d428 1 a428 2 * elflink.c (_bfd_elf_link_output_relocs): Delete unused variable "output_rel_hdr". d430 7 a436 1 2010-10-09 John Tytgat d438 1 a438 2 * reloc.c (BFD_RELOC_ARM_HVC): Add. * libbfd.h: Regenerate. d440 2 a441 1 2010-10-08 Kai Tietz d443 1 a443 99 * pei-x86_64.c (find_next_xdata_or_end): Removed. (pex64_dump_xdata): Remove arguments stop, onaline, and pdata. New argument endx. Print term "none" instead of misleading "CFA". (sort_xdata_arr): New function. (pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs instead of searching quadratic. 2010-10-08 Pierre Muller Alan Modra Fix build with -DDEBUG=7 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call to deleted function elf_symbol_flags. Add typecast to avoid warning. * elf32-rx.c (dump_symbol) : Rename to.. (rx_dump_symbol): ..this to avoid link errors. * elflink.c (elf_link_input_bfd): Add typecast to avoid warnings. (bfd_elf_perform_complex_relocation): Likewise. * elf32-xtensa.c (print_action_list): Likewise. 2010-10-06 Nathan Sidwell * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic, elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for ip/r12. (arm_type_of_stub): Remove superfluous braces. 2010-10-04 Bernd Schmidt * elf-bfd.h (struct bfd_elf_section_reloc_data): New structure. (struct bfd_elf_section_data): New members REL and RELA; delete members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX, REL_IDX2, REL_HASHES. (_bfd_elf_init_reloc_shdr): Adjust declaration. (_bfd_elf_single_rel_hdr): Declare. (RELOC_AGAINST_DISCARDED_SECTION): Use it. * elf.c (bfd_section_from_shdr): Adjusted to match changes in data structures. (_bfd_elf_init_reloc_shdr): New arg RELDATA. Remove arg REL_HDR. All callers changed. Allocate memory for the Elf_Internal_Shdr structure. (_bfd_elf_single_rel_hdr): New function. (struct fake_section_arg): New structure. (elf_fake_section): Expect to see a pointer to it in the third argument. If doing a relocatable link, allocate both REL and RELA sections as needed. (assign_section_numbers): Adjusted to match changes in data structures. (_bfd_elf_compute_section_file_positions): Call elf_fake_sections with a struct fake_section_args argument. * elfcode.h (elf_write_relocs): Adjusted to match changes in data structures. (elf_slurp_reloc_table): Likewise. * elflink.c (_bfd_elf_link_read_relocs): Likewise. (_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with RELDATA. Remove argument O. All callers changed. Remove code to discover the right rel_hdr and count. (_bfd_elf_link_output_relocs): Adjusted to match changes in data structures. (elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH; replace with RELDATA. All callers changed. (elf_link_input_bfd): Correctly generate rel_hash data when both REL and RELA sections are present. (elf_reloc_link_order): Adjusted to match changes in data structures. (bfd_elf_final_link): Simplify code to count relocs. Free the hashes array for both REL and RELA. (get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr * elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections): Delete. * elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections): Delete. (elf32_tic6x_rel_relocation_p): Adjusted to match changes in data structures. * elf32-microblaze.c (microblaze_elf_check_relocs): Use _bfd_elf_single_rel_hdr. * elf32-ppc.c (ppc_elf_relax_section): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (get_reloc_section): Likewise. * elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match changes in data structures. (mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr. * elf64-ppc.c (ppc64_elf_edit_opd): Likewise. (ppc64_elf_edit_toc): Likewise. (get_relocs): Adjusted to match changes in data structures. Allocate an Elf_Internal_Shdr structure if necessary. (ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr. * elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match changes in data structures. * elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr. * elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro. (mips_elf_rel_relocation_p): Adjusted to match changes in data structures. (_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather than MIPS_RELOC_RELOCA_P. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use _bfd_elf_single_rel_hdr. (_bfd_sparc_elf_relocate_section): Likewise. d445 2 a446 1 2010-10-01 Thomas Schwinge d448 1 a448 2 * elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in SHN_UNDEF, SHN_ABS, SHN_COMMON. d450 165 a614 1 2010-09-30 H.J. Lu d616 1 a616 5 PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise. d618 85 a702 1 * elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf. d704 1 a704 1 2010-09-27 Ralf Wildenhues d706 82 a787 1 * configure: Regenerate. d789 1 a789 1 2010-09-24 Thomas Schwinge d791 2 a792 20 * elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c, elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c, elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h, elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to the zero symbol index. * elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index to STN_UNDEF, not SHN_UNDEF. 2010-09-23 Bernd Schmidt * elf32-tic6x.c (elf32_tic6x_fake_sections): New function. (elf_backend_fake_sections): Define. 2010-09-23 Matthew Gretton-Dann * bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value. 2010-09-23 Alan Modra d794 1 a794 1 * cpu-d10v.c: Make bits_per_address 18 for all arch_info entries. d796 56 a851 59 2010-09-23 Alan Modra * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC difference between input and output section. 2010-09-22 Kai Tietz * coffcode.h (sec_to_styp_flags): Adjust debug sections to be conform to pe-coff specification and avoid marking them as excluded. (styp_to_sec_flags): Doing reverse mapping. * peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for setting IAT directory entry. 2010-09-20 Richard Henderson * elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc. 2010-09-19 Richard Sandiford * elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls. (mips_elf_link_hash_newfunc): Initialize it. (mips_elf_record_global_got_symbol): Add a for_call parameter. (mips_elf_count_got_symbols): Check SYMBOL_CALLS_LOCAL rather than SYMBOL_REFERENCES_LOCAL if the GOT entry is only used for calls. Try to remove .got entries in favour of .got.plt entries on VxWorks. (_bfd_mips_elf_check_relocs): Do not try to avoid allocating a global GOT entry for VxWorks calls. Update uses of mips_elf_record_global_got_symbol. (allocate_dynrelocs): Set got_only_for_calls to false if the GOT entry is used for dynamic relocations. 2010-09-19 Richard Sandiford * elfxx-mips.c (mips_got_entry): Adjust commentary. (mips_elf_create_local_got_entry): If given a symbol, check that it has been assigned to the local part of the GOT. (mips_elf_count_got_symbols): Take the bfd_link_info as argument instead of the master GOT. Put all locally-binding symbols in the local area. (mips_elf_make_got_per_bfd): Use global_got_area to decide whether a symbol lives in the local or global area. (mips_elf_local_relocation_p): Remove check_forced argument and retain only the !check_forced behavior. (mips_elf_calculate_relocation): Adjust call accordingly. Use global_got_area to decide whether an output relocation should be local or global. Explicitly decay R_MIPS_GOT_PAGE into R_MIPS_GOT_DISP where appropriate. Fix selection of local vs. global semantics for R_MIPS*_26. Remove redundant reevaluation of what is stored in was_local_p. (mips_elf_create_dynamic_relocation): Use global_got_area to decide whether the relocation should be against a global or local symbol. (mips_elf_lay_out_got): Update the GOT traversal after the above change to mips_elf_count_got_symbols. (mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p. (_bfd_mips_elf_relocate_section): Likewise. (_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide whether the symbol has a global got entry. d853 87 d941 1 a941 1 2010-09-19 Richard Sandiford d943 2 a944 2 * elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols to the global GOT on VxWorks. d946 1 a946 1 2010-09-19 Richard Sandiford d948 3 a950 3 * elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks, exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning about HI/LO relocations in shared objects. d952 1 a952 1 2010-09-16 Alan Modra d954 3 a956 6 * elf32-spu.c (spu_elf_size_sections): Omit fixups for non-alloc sections. (spu_elf_create_sections): Mark .fixup with SEC_LINKER_CREATED and set dynobj. (spu_elf_finish_dynamic_sections): New function. (elf_backend_finish_dynamic_sections): Define. d958 2 a959 206 2010-09-16 Alan Modra * elf.c (bfd_elf_get_default_section_type): Don't test SEC_NEVER_LOAD. * elflink.c (elf_link_input_bfd): Likewise. 2010-09-15 Kai Tietz * pei-x86_64.c (pex64_get_unwind_info): Reorgnized. (pex64_get_scope_entry): Removed. (find_next_xdata_or_end): New helper. (pex64_dump_xdata): Reworked. (pex64_bfd_print_pdata): Add checking for valid pdata sorting and values. Reworked output. 2010-09-15 H.J. Lu PR binutils/12004 * plugin.c (bfd_plugin_object_p): Handle NULL iostream. 2010-09-14 Kai Tietz * pe-x86_64.c (COFF_SECTION_ALIGNMENT_ENTRIES): Make .rdata, .data, and .text partial matched section names. * pei-x86_64.c: Likewise. * peXXigen.c (sort_x64_pdata): New helper. (_bfd_XXi_final_link_postscript): Do pdata sorting. 2010-09-09 H.J. Lu PR ld/11998 * elf.c (assign_file_positions_for_load_sections): Don't warn zero LMA adjustment. 2010-09-09 Bernd Schmidt * elflink.c (bfd_elf_final_link): Correct calculation of max_external_reloc_size. 2010-09-07 Alan Modra Marcus Brinkmann * peXXigen.c: Whitespace. (pe_print_idata): Correct section limit calculations. Tidy array indexing. (_bfd_XX_print_ce_compressed_pdata): Don't leak memory. 2010-09-02 Richard Henderson * config.bfd (x86_64-*-mingw*): Select 32-bit pei vectors too. 2010-09-01 Pedro Alves * netbsd-core.c (netbsd_core_core_file_pid): Renamed to ... (netbsd_core_file_pid): ... this. 2010-09-01 Tristan Gingold * coffcode.h (coff_slurp_line_table): Add a cast. (coff_slurp_reloc_table): Ditto. 2010-08-30 Gunther Nikl * cisco-core.c (cisco_core_file_pid): Define. 2010-08-30 Alan Modra PR binutils/11953 * elf.c (copy_elf_program_header): Calculate map->header_size from lowest_section, not first_section. Validate program header p_paddr against section lma. Find lowest_section in second loop over headers. 2010-08-28 Alan Modra * elflink.c (_bfd_elf_dynamic_symbol_p): Rename param. Make common syms local. (_bfd_elf_symbol_refs_local_p): Expand comment. (elf_link_output_extsym): Fix style nit. 2010-08-26 Nathan Sidwell * elf32-arm.c (elf32_arm_final_link): Process stub sections exactly once. 2010-08-25 H.J. Lu PR ld/11939 * elflink.c (elf_link_add_object_symbols): Don't set unique_global for non-ELF hash link table. 2010-08-25 H.J. Lu PR ld/11944 * elf-bfd.h (elf_backend_data): Add target_id. (bfd_elf_make_generic_object): Renamed to ... (bfd_elf_make_object): This. * elf.c (bfd_elf_make_generic_object): Removed. (bfd_elf_make_object): New. (bfd_elf_mkcorefile): Really treat it as an object file. * elf-m10300.c (ELF_TARGET_ID): New. * elf32-arm.c (ELF_TARGET_ID): Likewise. * elf32-bfin.c (ELF_TARGET_ID): Likewise. * elf32-cris.c (ELF_TARGET_ID): Likewise. * elf32-frv.c (ELF_TARGET_ID): Likewise. * elf32-i386.c (ELF_TARGET_ID): Likewise. * elf32-lm32.c (ELF_TARGET_ID): Likewise. * elf32-m32r.c (ELF_TARGET_ID): Likewise. * elf32-m68hc11.c (ELF_TARGET_ID): Likewise. * elf32-m68hc12.c (ELF_TARGET_ID): Likewise. * elf32-m68k.c (ELF_TARGET_ID): Likewise. * elf32-microblaze.c (ELF_TARGET_ID): Likewise. * elf32-ppc.c (ELF_TARGET_ID): Likewise. * elf32-s390.c (ELF_TARGET_ID): Likewise. * elf32-sh.c (ELF_TARGET_ID): Likewise. * elf32-sparc.c (ELF_TARGET_ID): Likewise. * elf32-spu.c (ELF_TARGET_ID): Likewise. * elf32-tic6x.c (ELF_TARGET_ID): Likewise. * elf32-xtensa.c (ELF_TARGET_ID): Likewise. * elf64-alpha.c (ELF_TARGET_ID): Likewise. * elf64-hppa.c (ELF_TARGET_ID): Likewise. * elf64-ppc.c (ELF_TARGET_ID): Likewise. * elf64-s390.c (ELF_TARGET_ID): Likewise. * elf64-x86-64.c (ELF_TARGET_ID): Likewise. * elfxx-ia64.c (ELF_TARGET_ID): Likewise. * elf32-hppa.c (elf32_hppa_mkobject): Removed. (bfd_elf32_mkobject): Likewise. (ELF_TARGET_ID): New. * elf32-mips.c (ELF_TARGET_ID): New. (bfd_elf32_mkobject): Removed. * elf64-mips.c (ELF_TARGET_ID): New. (bfd_elf64_mkobject): Removed. * elfn32-mips.c (ELF_TARGET_ID): New. (bfd_elf32_mkobject): Removed. * elfxx-mips.c (_bfd_mips_elf_mkobject): Removed. * elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise. * elfxx-target.h (bfd_elfNN_mkobject): Default to bfd_elf_make_object. (ELF_TARGET_ID): New. Default to GENERIC_ELF_DATA. (elfNN_bed): Initialize target_id. 2010-08-25 Julian Brown * elf32-arm.c (arm_stub_required_alignment): New. (arm_build_one_stub): Use above to partition stubs. (make_branch_to_a8_stub): Use arm_stub_a8_veneer_lwm not arm_stub_a8_veneer_b_cond. 2010-08-25 Alan Modra * aout-arm.c (MY(bfd_reloc_type_lookup)): Use bfd_arch_bits_per_address. * aout-ns32k.c (MY(bfd_reloc_type_lookup)): Likewise. * aoutx.h (NAME(aout,reloc_type_lookup)): Likewise. * coff-arm.c (coff_arm_reloc_type_lookup): Likewise. * elf-hppa.h (elf_hppa_reloc_final_type): Likewise. * reloc.c (bfd_default_reloc_type_lookup): Likewise. * riscix.c (riscix_reloc_type_lookup): Likewise. 2010-08-25 Alan Modra * elf.c (_bfd_elf_map_sections_to_segments): Don't load program headers if any loaded section wraps the address space. Simplify ~(m-1) to -m. Use lma rather than vma when determining whether note sections are adjacent. 2010-08-22 H.J. Lu PR ld/11933 * elflink.c (elf_link_add_object_symbols): Don't check relocation if input ELF object ID doesn't match output. 2010-08-21 Ralf Wildenhues * configure: Regenerate. 2010-08-20 H.J. Lu * merge.c (sec_merge_emit): Revert the last checkin. 2010-08-20 Maciej W. Rozycki * elf32-sh.c (sh_elf_relocate_section): Handle non-ELF output BFD. 2010-08-20 Maciej W. Rozycki * elf32-m68k.c (bfd_elf_m68k_set_target_options): Don't set GOT options unless an m68k hash table has been found. 2010-08-20 Nick Clifton * merge.c (sec_merge_emit): Do not zero pad sections that do not have an alignment. 2010-08-18 Pedro Alves PR corefile/8210 d961 57 a1018 125 * corefile.c (bfd_core_file_pid): New. * targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid. (struct bfd_target) <_core_file_pid>: New. * libbfd-in.h (_bfd_nocore_core_file_pid): Declare. * libbfd.c (_bfd_nocore_core_file_pid): New. * elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid): Declare. * elfcode.h (elf_core_file_pid): New define. * elfcore.h (elf_core_file_pid): New function. * elf.c (elfcore_make_pid): Rewrite. (elfcore_grok_prstatus): Only set core_pid if not set yet. (elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to getting the lwpid from prstat.pr_pid. * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. (elf64_x86_64_grok_psinfo): Extract the the main process's PID, and store it in elf_tdata's core_pid field. * elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. (elf_i386_grok_psinfo): Extract the the main process's PID, and store it in elf_tdata's core_pid field. * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to elf_tdata's core_lwpid instead of to core_pid. * plugin.c (bfd_plugin_core_file_pid): New function. * aout-target.h (MY_core_file_pid): Define. * aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines. * coff-rs6000.c (coff_core_file_pid): New define. (rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE. * coff64-rs6000.c (coff_core_file_pid): New define. (rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE. (xcoff64_core_file_pid): New define. (aix5coff64_vec): Use BFD_JUMP_TABLE_CORE. * mach-o-target.c (bfd_mach_o_core_file_pid): New define. * aix386-core.c (aix386_core_file_pid): New define. * hppabsd-core.c (hppabsd_core_core_file_pid): New define. * hpux-core.c (hpux_core_core_file_pid): New define. * irix-core.c (irix_core_core_file_pid): New define. * lynx-core.c (lynx_core_file_pid): New define. * osf-core.c (osf_core_core_file_pid): New define. * ptrace-core.c (ptrace_unix_core_file_pid): New define. * sco5-core.c (sco5_core_file_pid): New define. * xcoff-target.h (coff_core_file_pid): New define. * netbsd-core.c (netbsd_core_core_file_pid): New define. 2010-08-13 H.J. Lu PR ld/11913 * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if .got.plt section is discarded. * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise. 2010-08-13 Nathan Sidwell * elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B variant. 2010-08-12 H.J. Lu PR binutils/11909 * Makefile.am (coff-tic4x.lo): New. Disable -Werror. (coff-tic54x.lo): Likewise. * Makefile.in: Regenerated. 2010-08-12 Todd Veldhuizen PR ld/11843 * elflink.c (compute_bucket_count): Avoid futile long searches for the best bucket size. 2010-08-09 Richard Henderson PR ld/11891 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing to tlshi/lo until pos0 and pos1 are adjacent. Use the destination register from the tldgd insn. 2010-08-09 Catherine Moore * elfxx-mips.c (mips_elf_perform_relocation): Improve interlinking error message. 2010-08-06 Alan Modra * elf64-ppc.c (ha_reloc_match): Allow matches to other than r2. (ppc64_elf_relocate_section): Nop out high part insn of large toc code sequence when the high part of offset is zero. 2010-08-04 Tristan Gingold d1020 1 a1020 3 * vms-alpha.c (alpha_vms_build_fixups): Write the EICP. (alpha_vms_bfd_final_link): Explicitly forbid relocatable links. Clear the SEC_RELOC flag. d1022 3 a1024 1 2010-08-04 Tristan Gingold d1026 1 a1026 6 * vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable sections with relocs. (alpha_vms_add_fixup_lp): Set SEC_RELOC flag. (alpha_vms_add_fixup_ca): Ditto. (alpha_vms_add_fixup_qr): Ditto. Add comments. d1028 2 a1029 1 2010-08-04 Tristan Gingold d1031 1 a1031 2 * vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make CODE sections writable. d1033 1 a1033 1 2010-08-04 Tristan Gingold d1035 1 a1035 5 * vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ... (alpha_vms_add_fixup_lr): ... this for consistency. (alpha_vms_add_qw_fixup): Removed. Fix some comments. (vms_get_symbol_info): Adjust type for unknown sections. d1037 2 a1038 1 2010-08-04 Tristan Gingold d1040 1 a1040 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute section for any absolute section. Remove some debugging code. d1042 2 a1043 1 2010-08-03 DJ Delorie d1045 1 a1045 1 * elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes. d1047 2 a1048 1 2010-08-03 Tristan Gingold d1050 1 a1050 2 * vms-misc.c (vms_convert_to_var): Make it static. (_bfd_vms_convert_to_var_unix_filename): Make it public. d1052 3 a1054 1 2010-08-03 Tristan Gingold d1056 1 a1056 1 * makefile.vms (OBJS): Update list. d1058 2 a1059 1 2010-08-03 Tristan Gingold d1061 1 a1061 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS nor SEC_RELOC for empty sections. d1063 3 a1065 1 2010-08-03 Tristan Gingold d1067 1 a1067 2 * vms-alpha.c (evax_section_flags): Fix flags for absolute section. Remove useless parenthesis. d1069 9 a1077 1 2010-08-03 Tristan Gingold d1079 1 a1079 2 * vms-lib.c (vms_lib_bread_raw): Change type of BUF argument. (vms_lib_bread, vms_lib_bopen): Adjust. d1081 2 a1082 1 2010-08-02 Alan Modra d1084 1 a1084 3 PR 11866 * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to calculate off_adjust rather than first section vma. d1086 3 a1088 1 2010-07-30 H.J. Lu d1090 1 a1090 1 * elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info. d1092 5 a1096 1 2010-07-30 Anthony Green d1098 1 a1098 1 * config.bfd (targ_cpu): Add moxie-*-rtems support. d1100 1 a1100 68 2010-07-29 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in .toc section, even when none are used in relocs. 2010-07-27 Maciej W. Rozycki * elfxx-mips.h: Include "elf/mips.h". (gprel16_reloc_p): New static inline function. * elfxx-mips.c (_bfd_mips_elf_check_relocs) [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]: Use got16_reloc_p. (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use gprel16_reloc_p. * elf32-mips.c (mips_info_to_howto_rel): Likewise. * elfn32-mips.c (mips_info_to_howto_rel): Likewise. 2010-07-27 Maciej W. Rozycki * elf64-mips.c (mips_elf64_howto_table_rela) [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace. [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise. [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. * elfn32-mips.c (elf_mips_howto_table_rela) [R_MIPS_TLS_DTPMOD32]: Likewise. [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise. [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. 2010-07-23 Naveen.H.S Ina Pandit * archures.c (DESCRIPTION): Define bfd_mach_v850e2 and bfd_mach_v850e2v3. * reloc.c (bfd_architecture): Define bfd_mach_v850e2 and bfd_mach_v850e2v3. (BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL, BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23, BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS, BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1, BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET, BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET, BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT, BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL, BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY, BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT, BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF, BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE, BFD_RELOC_V850_DATA): New relocations for V850 target. * config.bfd: Match all v850 targets. * cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3. * elf32-v850.c (v850_elf_check_relocs): Check the newly added relocations. (v850_elf_perform_relocation ): Update the newly added relocations. (v850_elf_howto_t): Update the specifications of added relocations. (v850_elf_reloc_map): Update the relocation mappings. (v850_elf_final_link_relocate): Maps added relocation into the appropriate howto structure. (v850_elf_object_p): Add support for V850E2 and V850E2V3. (v850_elf_final_write_processing): Likewise. (v850_elf_merge_private_bfd_data): Likewise. (v850_elf_print_private_bfd_data): Likewise. * libbfd.h: Regenerate. d1102 71 d1174 1 a1174 4 2010-07-23 Alan Modra * archive.c (_bfd_archive_bsd44_construct_extended_name_table): Correct format specifier. d1176 2 a1177 10 2010-07-22 Alan Modra * ecoff.c: Don't include aout/ranlib.h. (_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs. (_bfd_ecoff_write_armap): Output ar_date and ar_size using _bfd_ar_spacepad. 2010-07-22 Alan Modra * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with d1179 2 d1182 1 a1182 1 2010-07-20 Alan Modra d1184 2 a1185 47 * elf.c (assign_file_positions_for_load_sections): Check that zero size sections are allocated in segments too. (assign_file_positions_for_non_load_sections): Warn if zero size alloc sections are found here. (copy_elf_program_header): Don't drop zero size sections from segment map. (copy_private_bfd_data): Check for changes in zero size sections. 2010-07-17 Alan Modra * elf.c (_bfd_elf_map_sections_to_segments): Force new segment for sections with overlapping LMAs. (assign_file_positions_for_load_sections): Catch overlap for sections that wrap around the address space. Replace a warning that duplicates ld's --check-sections error with a warning that lma has been adjusted for overlapping sections. 2010-07-14 Cary Coutant PR ld/11817 * dwarf2.c (read_section): Revert patch for compressed debug sections. (find_line): Likewise. (read_and_uncompress_section): Remove. 2010-07-13 H.J. Lu PR ld/11812 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't allocate .got.plt section if there are no GOT nor PLT entries. * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise. 2010-07-13 H.J. Lu PR ld/11791 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support garbage collection against STT_GNU_IFUNC symbols. * elf32-i386.c (elf_i386_get_local_sym_hash): Don't set elf.plt.offset/elf.got.offset to -1. (elf_i386_tls_transition): Skip TLS transition for functions. (elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols. * elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set elf.plt.offset/elf.got.offset to -1. (elf64_x86_64_tls_transition): Skip TLS transition for functions. (elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols. d1187 54 a1240 31 2010-07-12 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Re-indent. (elf_i386_relocate_section): Likewise. 2010-07-06 H.J. Lu * dwarf2.c (add_line_info): Initialize prev_line. 2010-07-06 Alan Modra * elf32-ppc.c (ppc_elf_relax_section): Insert branch around trampolines only for .init and .fini sections. 2010-07-05 Alan Modra * elf32-ppc.c: Formatting. (ppc_elf_finish_dynamic_sections): Don't make plt_entry var static. 2010-07-03 Cary Coutant * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED. * dwarf2.c (read_and_uncompress_section): New function. (read_section): Call it. (find_line): Likewise. 2010-07-01 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather than SYMBOL_REFERENCES_LOCAL. (ppc64_elf_relocate_section): Likewise. d1242 1 a1242 1 2010-07-01 Alan Modra d1244 2 a1245 1 * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs. d1247 1 a1247 1 2010-06-29 Alan Modra d1249 3 a1251 8 * cpu-maxq.c: Delete file. * coff-maxq.c: Delete file. * Makefile.am: Remove references to maxq. * archures.c: Likewise. * coffcode.h: Likewise. * configure.in: Likewise. * targets.c: Likewise. * config.bfd: Move maxq from obsolete to removed. d1254 2 d1257 47 a1303 7 * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2010-06-28 Alan Modra * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED to silence gcc warning. d1305 1 a1305 163 2010-06-27 Alan Modra * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data. (group_sections): Likewise. 2010-06-27 Alan Modra * bout.c (aligncode): Delete set but unused variables. * coff-mcore.c (coff_mcore_relocate_section): Likewise. * coff-ppc.c (ppc_record_toc_entry): Likewise. (coff_ppc_relocate_section): Likewise. * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise. * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise. * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relax_section): Likewise. * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise. (record_vfp11_erratum_veneer): Likewise. (bfd_elf32_arm_vfp11_erratum_scan): Likewise. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs, arm_map_one_stub): Likewise. * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise. (elf32_avr_relax_section): Likewise. (avr_mark_stub_not_to_be_necessary): Likewise. * elf32-bfin.c (_bfin_create_got_section): Likewise. * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise. (elf32_cr16_relax_delete_bytes): Likewise. * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise. * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise. * elf32-h8300.c (elf32_h8_relax_section): Likewise. (elf32_h8_relax_delete_bytes): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-i370.c (i370_elf_check_relocs): Likewise. (elf_relocate_section): Likewise. * elf32-ip2k.c (adjust_all_relocations): Likewise. (ip2k_elf_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. (lm32_elf_check_relocs): Likewise. (lm32_elf_finish_dynamic_sections): Likewise. (lm32_elf_finish_dynamic_symbol): Likewise. * elf32-m32c.c (m32c_offset_for_reloc): Likewise. (m32c_elf_relax_delete_bytes): Likewise. * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise. (m32r_elf_finish_dynamic_sections): Likewise. (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise. * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. (microblaze_elf_check_relocs): Likewise. (microblaze_elf_finish_dynamic_symbol): Likewise. * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise. * elf32-ppc.c (ppc_elf_tls_optimize): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise. (elf32_rx_relax_section): Likewise. * elf32-score.c (score_elf_got_offset_from_index): Likewise. (score_elf_final_link_relocate): Likewise. (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (score_elf_got_offset_from_index): Likewise. (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf32-spu.c (spu_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise. (find_remembered_hi16s_reloc): Likewise. * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise. (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise. (move_literal): Likewise. * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise. (elf64_hppa_check_relocs): Likewise. (elf64_hppa_finish_dynamic_symbol): Likewise. (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise. * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise. (elfNN_vms_section_from_shdr): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. * hp300hpux.c (slurp_symbol_table): Likewise. * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise. * mach-o.c (bfd_mach_o_write_thread): Likewise. * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise. * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise. * pdp11.c (pdp11_aout_link_input_section): Likewise. (aout_link_input_section, aout_link_input_bfd): Likewise. * pe-mips.c (mips_swap_reloc_out): Likewise. (coff_pe_mips_relocate_section): Likewise. * som.c (som_bfd_ar_write_symbol_stuff): Likewise. * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise. * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise. * coff-i860.c (i860_reloc_processing): Avoid set but unused warning. * coffcode.h (coff_compute_section_file_positions): Likewise. (coff_slurp_reloc_table): Likewise. * cpu-arm.c (arm_check_note): Likewise. * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-sh64.c (_bfd_sh_align_load_span): Likewise. * ieee.c (parse_expression): Likewise. (ieee_slurp_external_symbols, drop_int): Likewise. * peXXigen.c (pe_print_pdata): Likewise. * versados.c (process_esd): Likewise. 2010-06-25 Tristan Gingold * vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with its flags. Create an absolute section if needed. 2010-06-25 Tristan Gingold * vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of sections. Mark .vmsdebug section as SEC_DEBUGGING. Do not create dummy psect anymore. Adjust. (_bfd_vms_write_eeom): Adjust (use target_index instead of index) (_bfd_vms_write_etir): Ditto. (start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of section name. Adjust. 2010-06-25 Tristan Gingold * vms-alpha.c (alpha_vms_write_exec): Set linktime field. 2010-06-25 Alan Modra * elf64-ppc.c (toc_skip_enum): Define. (ppc64_elf_edit_toc): Use two low bits of skip array as markers. Optimize largetoc sequences. (adjust_toc_syms): Update for skip array change. (ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT. 2010-06-25 Alan Modra * elf64-ppc.c (is_static_defined): New function. (get_tls_mask, ppc_type_of_stub): Use it here. (ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input. (ppc64_elf_tls_setup): Typo fix. (adjust_toc_syms): Correctly handle symbols defined past the end of the toc. Move syms on removed entries to next entry rather than to start of toc. (ppc64_elf_edit_toc): Likewise. Ensure we only attempt to edit ppc64 input. Allocate one extra word in skip array. Honour info->keep_memory when reading relocs if we can. Adjust toc relocs after adjusting symbols. 2010-06-23 Nathan Sidwell * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun when scaning map. 2010-06-17 Tristan Gingold * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ... (BFD64_BACKENDS_CFILES): ... here. (BFD32_BACKENDS): Move vms-alpha.lo to ... (BFD64_BACKENDS): ... here. * Makefile.in: Regenerate. d1307 3 a1309 1 2010-06-15 Joseph Myers d1311 1 a1311 128 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2. * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type, elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes, elf32_tic6x_merge_private_bfd_data): New. (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section, elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor): Define. * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare. 2010-06-15 Joseph Myers * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define. (struct elf_backend_data): Update comment on obj_attrs_order. * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents, _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE instead of hardcoded 4. * elf32-arm.c (elf32_arm_obj_attrs_order): Use LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1 instead of hardcoded 4 and 5. (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE instead of hardcoded 4. 2010-06-14 Kevin Buettner * elf32-h8300.c (elf_symbol_leading_char): Define. 2010-06-11 Jan Kratochvil * vms-alpha.c (_bfd_vms_write_egsd): Make sname const. 2010-06-11 Tristan Gingold * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute sections to 0. 2010-06-11 Tristan Gingold * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW. 2010-06-11 Tristan Gingold * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const. Adjust cast. (_bfd_vms_output_dump): Make DATA argument const, adjust cast. * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust. * vms-alpha.c (evax_section_flags): Make it const. (vms_secflag_by_name): Remove unused ABFD argument. Make SECTION_FLAGS and NAME arguments const. Clarify comment. (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const. (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name. (_bfd_vms_write_egsd): Remove useless cast. 2010-06-10 Tristan Gingold * config.bfd: Remove #if/#endif so that som can be compiled on any host. * targets.c (_bfd_target_vector): Remove #if/#endif so that som can be used on any host. 2010-06-10 Tristan Gingold * som.c: Can now be compiled on any host. Include bfd headers instead of system one. (som_compute_checksum): Parameter is now a pointer to a som_external_header structure. Adjust. (struct section_to_type): Field section is now const. (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional definition. (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto. (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto. (som_swap_clock_in, som_swap_clock_out): New functions. (som_swap_header_in, som_swap_header_out): Likewise. (som_swap_space_dictionary_in): Likewise. (som_swap_space_dictionary_out): Likewise. (som_swap_subspace_dictionary_in): Likewise. (som_swap_subspace_dictionary_record_out): Likewise. (som_swap_aux_id_in, som_swap_aux_id_out): Likewise. (som_swap_string_auxhdr_out): Likewise. (som_swap_compilation_unit_out): Likewise. (som_swap_exec_auxhdr_in): Likewise. (som_swap_exec_auxhdr_out): Likewise. (som_swap_lst_header_in): Likewise. (som_object_setup): Adjust parameter type using bfd types. (setup_sections): Likewise. Ditto for object file types. Use intermediate variables for external representation and use the swap functions to convert. (som_object_p): Ditto. Remove #ifdef/#endif on always defined macros. (som_prep_headers): Likewise. (som_write_symbol_strings): Likewise. (som_begin_writing): Likewise. (som_finish_writing): Likewise. (som_build_and_write_symbol_table): Likewise. (bfd_section_from_som_symbol): Likewise. (som_slurp_symbol_table): Likewise. (som_bfd_print_private_bfd_data): Likewise. (bfd_som_attach_aux_hdr): Likewise. Clear the padding. (bfd_som_attach_compilation_unit): Likewise. (som_bfd_count_ar_symbols): Likewise. (som_bfd_fill_in_ar_symbols): Likewise. (som_slurp_armap): Likewise. (som_bfd_ar_write_symbol_stuff): Likewise. (som_write_armap): Likewise. Use _bfd_ar_spacepad instead of sprintf to write header fields. * som.h: Include bfd headers instead of system one. (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed. (struct somdata): Use bfd structures instead of system ones. (struct som_section_data_struct): Likewise. (struct som_subspace_dictionary_record): Removed (now in include/som/internal.h) 2010-06-10 Tristan Gingold * targets.c (bfd_target_list): Remove hp/ux compiler work-around as bfd requires an ANSI-C compiler. 2010-06-09 Tristan Gingold * bfdio.c (bfd_bread): Fix the code to prevent reading past the end of archive members. 2010-06-08 Tristan Gingold * som.c (som_bfd_free_cached_info): Do not free relocations as they were allocated with bfd_zalloc. 2010-06-08 Tristan Gingold d1313 2 a1314 2 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment for the first block. d1316 1 a1316 1 2010-06-08 Tristan Gingold d1318 13 a1330 5 * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function. * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare. * libbfd.h: Regenerate. * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS. (bfd_elfNN_mkarchive): Ditto. d1332 1 a1332 1 2010-06-02 Tristan Gingold d1334 2 a1335 1 * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant. d1337 1 a1337 1 2010-06-01 Ralf Wildenhues d1339 4 a1342 1 * configure: Regenerate. d1344 1 a1344 1 2010-06-01 Tristan Gingold d1346 1 a1346 91 * vms-alpha.c (struct vms_private_data_struct): Add transfer_address field. Remove unused dst_info field. (alpha_vms_write_exec): Use transfer_address. (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE. (alpha_vms_bfd_final_link): Set transfer_address. 2010-05-31 Tristan Gingold * vms-lib.c (credat_lo, credat_hi): New fields. (vms_read_block): Adjust comments. (vms_write_block): New function. (_bfd_vms_lib_archive_p): Decode majorid once. Replace some hard-coded values with constants. Set credat_lo and credat_hi. (_bfd_vms_lib_mkarchive): Add argument kind. Set ver, mhd_size and type according to kind. (_bfd_vms_lib_alpha_mkarchive): New function. (struct lib_index): Renamed from struct vms_index (lib_index_cmp): Renamed from vms_index_cmp. Adjusted. (get_idxlen): Type of idx argument adjusted. Add is_elfidx argument and handle it. (vms_write_index): Adjust argument idx. Handle elf indexes. (_bfd_vms_lib_build_map): Adjust type of arguments modules and res. (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and use it. Handle elf indexes. Set credat. * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ... (_bfd_vms_lib_alpha_mkarchive): ... this. * libbfd.h: Regenerated. * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming. 2010-05-28 Sterling Augustine * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount of code to change the bits in the instructions to match the changes in the relocations. Declare dest_addr and sym_sec to help. 2010-05-28 Jan Kratochvil Workaround GCC PR middle-end/4210. * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2] and val[3]. 2010-05-27 Tristan Gingold * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces. (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros. (vms_time_to_time_t): Use them instead of local const. (vms_time_t_to_vms_time): New function. (vms_get_time): Likewise. (vms_raw_get_time): Likewise. * vms.h (vms_time_t_to_vms_time): New declaration. (vms_get_time): Likewise. (vms_raw_get_time): Likewise. 2010-05-26 Tristan Gingold * vms-alpha.c: Update comments. (alpha_vms_write_exec): Set lnkflags. Write the GST. (alpha_vms_link_output_symbol): New function. (alpha_vms_bfd_final_link): Generate the VMS symbol table. Set dst_section private field. (alpha_vms_bfd_final_link): Remove code that set dst_section. 2010-05-26 Tristan Gingold * bfdio.c: Declare and define _bfd_memory_iovec. (bfd_bread): Move code for BFD_IN_MEMORY... (bfd_bwrite): ... Ditto ... (bfd_tell): ... Ditto ... (bfd_flush): ... Ditto ... (bfd_stat): ... Ditto ... (bfd_seek): ... Ditto ... (bfd_get_size): ... Ditto ... (bfd_mmap): ... Ditto ... (memory_bread): ... to these new functions. (memory_bwrite): Ditto. (memory_btell): Ditto. (memory_bseek): Ditto. (memory_bflush): Ditto. (memory_bstat): Ditto. (memory_bmmap): Ditto. (memory_bclose): New function. * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY. * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto. * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case. (bfd_make_writable): Use _bfd_memory_iovec. * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec. * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use _bfd_memory_iovec. (alpha_ecoff_openr_next_archived_file): Use proxy_origin instead of origin. * libbfd.h: Regenerate. d1348 1 a1348 100 2010-05-25 Daniel Jacobowitz Joseph Myers Andrew Stubbs * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs. * configure.in: Handle FDPIC vectors. * elf32-sh-relocs.h: Add FDPIC and movi20 relocations. * elf32-sh.c (DEFAULT_STACK_SIZE): Define. (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of SYMBOL_REFERENCES_LOCAL for function descriptors. (fdpic_object_p): New. (sh_reloc_map): Add FDPIC and movi20 relocations. (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid range. (struct elf_sh_plt_info): Add got20 and short_plt. Update all definitions. (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define. (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New. (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define. (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le) (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts): New. (get_plt_info): Handle FDPIC. (MAX_SHORT_PLT): Define. (get_plt_index, get_plt_offset): Handle short_plt. (union gotref): New. (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to got_type and adjust all uses. Add GOT_FUNCDESC. (struct sh_elf_obj_tdata): Add local_funcdesc. Rename local_got_tls_type to local_got_type. (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All users changed. (sh_elf_local_funcdesc): Define. (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p, and srofixup. (sh_elf_link_hash_newfunc): Initialize new fields. (sh_elf_link_hash_table_create): Set fdpic_p. (sh_elf_omit_section_dynsym): New. (create_got_section): Create .got.funcdesc, .rela.got.funcdesc and .rofixup. (allocate_dynrelocs): Allocate local function descriptors and space for R_SH_FUNCDESC-related relocations, and for rofixups. Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which require function descriptors. (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize. (sh_elf_modify_program_headers): New. (sh_elf_size_dynamic_sections): Allocate function descriptors for local symbols. Allocate .got.funcdesc contents. Allocate rofixups. Handle local GOT entries of type GOT_FUNCDESC. Create fixups for local GOT entries. Ensure that FDPIC libraries always have a PLTGOT entry in the .dynamic section. (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc) (sh_elf_add_rofixup, sh_elf_osec_to_segment) (sh_elf_osec_readonly_p, install_movi20_field): New functions. (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC, R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup read-only section warnings. Handle undefined weak symbols. Generate fixups for R_SH_DIR32 and GOT entries. Check for cross-segment relocations and clear EF_SH_PIC. Handle 20-bit relocations. Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE. (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20, R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC. Handle 20-bit relocations. (sh_elf_copy_indirect_symbol): Copy function descriptor reference counts. (sh_elf_check_relocs): Handle new relocations. Make symbols dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups for R_SH_DIR32. (sh_elf_copy_private_data): Copy PT_GNU_STACK size. (sh_elf_merge_private_data): Copy initial flags. Do not clobber non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches. (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt, FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC. Use install_movi20_field. Rename srel to srelgot. Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE. (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup. Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT. Rename sgot to sgotplt. Assert that the right number of rofixups and dynamic relocations were allocated. (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New. (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym. (elf_backend_can_make_relative_eh_frame) (elf_backend_can_make_lsda_relative_eh_frame) (elf_backend_encode_eh_address): Define. (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM) (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed): Redefine for FDPIC vector. * reloc.c: Add SH FDPIC and movi20 relocations. * targets.c (_bfd_target_vector): Add FDPIC vectors. * configure, bfd-in2.h, libbfd.h: Regenerated. 2010-05-25 Jay Krell PR ld/11624 * archive.c (_bfd_calloc_wrapper): New function. (_bfd_add_bfd_to_archive_cache): Use it. a1349 1 * configure.in: Add alpha*-*-*vms* to list of natives. d1352 1 a1352 6 * vms-misc.c: Define globalref if necessary. (vms_convert_to_var_unix_filename): Rename to _bfd_vms_convert_to_var_unix_filename and export. * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename. * vms-alpha.c (vms_close_and_cleanup): Update invocation of vms_convert_to_var_unix_filename. d1354 168 a1521 1 2010-05-24 Tristan Gingold d1523 1 a1523 2 * vms-alpha.c (add_symbol_entry): New function extrated from ... (add_symbol): ... adjusted. d1525 62 a1586 51 2010-05-24 Tristan Gingold * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation. (alpha_vms_write_exec): Add a comment. (_bfd_vms_write_egsd): Ditto. (alpha_vms_convert_symbol): Remove a blank line. 2010-05-21 Tristan Gingold * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section for the GST. 2010-05-21 Tristan Gingold * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and SEC_LOAD if isect has data. (vms_get_symbol_info): Refine the condition for 'T' type. 2010-05-18 Tristan Gingold * vms-alpha.c (_bfd_vms_write_emh): New function. (_bfd_vms_write_lmn): New function. (_bfd_vms_write_eeom): Moved. (hash_string): Likewise. (_bfd_vms_length_hash_symbol): Likewise. (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh and _bfd_vms_write_lmn, and call these functions. 2010-05-18 Tristan Gingold * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L. Add details in the messages. (evax_bfd_print_image): Change message. 2010-05-18 H.J. Lu PR gas/11600 * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE (elf_fake_sections): Likewise. * elf32-i370.c (i370_elf_section_from_shdr): Don't handle SHF_EXCLUDE here. * elf32-ppc.c (ppc_elf_fake_sections): Likewise. 2010-05-17 Tristan Gingold * vms-alpha.c: Include esgps.h and eidc.h. (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records. (evax_bfd_print_egsd_flags): New function, extracted from ... (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags. Handles EGSD__C_SPSC and EGSD__C_IDC. d1588 1 a1588 1 2010-05-14 Tristan Gingold d1590 2 a1591 3 * vms-alpha.c (alpha_vms_object_p): Accept header size of 0. (_bfd_vms_get_object_record): Handle align byte only in the foreign case. d1593 1 a1593 1 2010-05-14 Tristan Gingold d1595 1 a1595 10 * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function. * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype. * libbfd.h: Regenerate. * configure.in (havevecs): Define HAVE_all_vecs when --enable-targets=all is set. Use AC_SUBST on it. (tdefaults): Do not add havevecs. (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo * configure: Regenerate. * Makefile.am (HAVEVECS): New variable. (INCLUDES): Add HAVEVECS. a1596 126 * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms target is selected. Add #ifdef/#endif around vms specific code. (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap, bfd_elfNN_archive_slurp_extended_name_table, bfd_elfNN_archive_construct_extended_name_table, bfd_elfNN_archive_truncate_arname, bfd_elfNN_archive_write_armap, bfd_elfNN_archive_read_ar_hdr, bfd_elfNN_archive_write_ar_hdr, bfd_elfNN_archive_openr_next_archived_file, bfd_elfNN_archive_get_elt_at_index, bfd_elfNN_archive_generic_stat_arch_elt, bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives. 2010-05-11 Jie Zhang * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge Tag_ABI_HardFP_use correctly. 2010-05-11 Alan Modra * coffcode.h (coff_write_object_contents): Enclose all occurrences of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE. 2010-05-07 Daniel Jacobowitz * elf32-arm.c (struct a8_erratum_reloc): Add hash member. Move sym_name to improve packing. (cortex_a8_erratum_scan): Check for PLT entries. (elf32_arm_size_stubs): Save the target symbol for a8 relocs. 2010-05-07 Tristan Gingold * Makefile.in: Regenerate with automake 1.11.1. * aclocal.m4: Ditto. 2010-05-05 Nick Clifton * po/es.po: Updated Spanish translation. 2010-05-03 Tristan Gingold * vms-lib.c (vms_lib_bopen): Fix the size threshold to read selective_search flag. Add comments. * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section before output_has_begun is set. 2010-05-03 Tristan Gingold * vms-alpha.c: Add comments. (struct vms_private_data_struct): Remove image_autoextend field. (dst_check_allocation): Removed. (image_write): Remove call to dst_check_allocation. (vms_slurp_debug): Do not set image_autoextend. Adjust section size. (_bfd_vms_slurp_object_records): Remove useless new_type variable. (alpha_vms_write_exec): Use dst_section to get the dst section. Write the dmt section. (evax_bfd_print_image): Also print the dst size in hexa. Fix typo. (alpha_vms_read_sections_content): Do not set image_autoextend. (alpha_vms_bfd_final_link): Generate the dst. 2010-05-03 Tristan Gingold * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty next array. (vms_lib_dcx): Adjust for the above change. 2010-04-30 H.J. Lu PR ld/11542 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New. * elf32-i386.c (elf_i386_relocate_section): Use it. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. 2010-04-30 Tristan Gingold * vms-lib.c (vms_read_block): New function. (vms_traverse_index): Use vms_read_block. Handle long key names. 2010-04-30 Tristan Gingold * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms and syms removed. (struct carsym_mem): New structure. (vms_add_index): New function. (vms_add_indexes_from_list): New function. (vms_traverse_index): Parameter carsym changed to carsym_mem. Code adjusted to handle elfidx. (vms_lib_read_index): Adjusted for vms_traverse_index changes. Parameter NBREL is now a pointer. (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64 archives. (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata. (_bfd_vms_lib_find_symbol): Ditto. (vms_lib_bopen): Fix two typos: return FALSE in case of error, check MHD id. (_bfd_vms_lib_get_module): New function. (_bfd_vms_lib_get_elt_at_index): Rewritten using the above function. (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module. (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives. (vms_write_index): Adjust for structure renamed. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for changes of _bfd_vms_lib_find_symbol. 2010-04-28 Kai Tietz * config.bfd: Correct accidential reverted patch about vax*-*-*vms*. 2010-04-27 Kai Tietz * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent to USE_MINGW64_LEADING_UNDERSCORES. * pei-x86_64.c (TARGET_UNDERSCORE): Likewise. * config.bfd: Change underscoring default for x64 mingw to false. * coffcode.h (coff_write_relocs): Add check that dereferenced sym_ptr_ptr isn't NULL. * config.in (USE_MINGW64_LEADING_UNDERSCORES): New. * configure: Regenerated. * configure.in: Add option '--enable-leading-mingw64-underscores' and define config.in variable USE_MINGW64_LEADING_UNDERSCORES. d1598 2 a1599 1 2010-04-27 Nick Clifton d1601 24 a1624 3 PR binutils/11512 * coffgen.c (coff_find_nearest_line): Incldue the section address of function name symbols in address comparisons. d1626 1 a1626 1 2010-04-27 Nick Clifton d1628 1 a1628 1 * po/fr.po: Updated French translation. d1630 1 a1630 1 2010-04-23 Alan Modra d1632 1 a1632 7 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT throughout file. (assign_file_positions_for_load_sections): Modify section in segment warning to ignore overlay vmas. * elf32-spu.c (spu_elf_object_p): Replace use of ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT. d1634 1 a1634 1 2010-04-22 Nick Clifton d1636 4 a1639 2 * po/bfd.pot: Updated by the Translation project. * po/vi.po: Updated Vietnamese translation. d1641 1 a1641 1 2010-04-22 Alan Modra d1643 3 a1645 2 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29 change. Tidy. Don't error on sections not allocated in segment. d1647 1 a1647 1 2010-04-15 Andrew Haley d1649 4 a1652 5 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag: merge_exidx_entries. * bfd-in2.h: Likewise. * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to control merging of exidx entries. d1654 1 a1654 1 2010-04-20 Joseph Myers d1656 5 a1660 10 * elf32-tic6x.h: New. * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA. * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata, elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel, elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject, elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p, bfd_elf32_mkobject, bfd_elf32_new_section_hook): New. (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup, elf32_tic6x_relocate_section): Handle REL relocations. (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel. d1662 1 a1662 1 2010-04-20 Jakub Jelinek d1664 2 a1665 2 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name. d1667 1 a1667 1 2010-04-19 Nick Clifton d1669 2 a1670 5 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused arhdrpos variable. * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused attribute to warned variable. Remove unused val, type and type2 variables. d1672 1 a1672 1 2010-04-16 Andreas Schwab d1674 5 a1678 2 * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking strict-aliasing rules. d1680 1 a1680 1 2010-04-16 Tristan Gingold d1682 1 a1682 3 * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo. (_bfd_vms_get_object_record): Always assume there is a pad byte for alignment. d1684 1 a1684 1 * vms-lib.c: Add a few comments. d1686 5 a1690 1 2010-04-15 Matthew Gretton-Dann d1692 1 a1692 2 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to attributes in v2.08 of the ABI. d1694 2 a1695 1 2010-04-15 Alan Modra d1697 1 a1697 1 * config.bfd (vax*-*-*vms*): Delete. d1699 1 a1699 113 2010-04-14 Tristan Gingold * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo, vms-tir.lo, vms.lo and add vms-alpha.lo (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c, vms-tir.c, vms.c and add vms-alpha.c * Makefile.in: Regenerate. * configure.in (TDEFINES): Adjust file list for vms_alpha_vec. Remove vms_vax_vec. * configure: Regenerate. * targets.c (vms_vax_vec): Remove the declaration. (_bfd_target_vector): Remove vms_vax_vec. * vms-alpha.c: New file. * vms-gsd.c: Removed, rewritten in vms-alpha.c * vms-hdr.c: Ditto. * vms-tir.c: Ditto. * vms.c: Ditto. * vms-misc.c: Fix indentation and comments. Replace most of #if VMS_DEBUG/vms_debug with vms_debug2. (_bfd_vms_hash_newfunc): Moved to vms-alpha.c (hash_string): Ditto. (_bfd_vms_length_hash_symbol): Ditto. (maybe_adjust_record_pointer_for_object): Ditto. (_bfd_vms_get_object_record): Ditto. (vms_get_remaining_object_record): Ditto. (_bfd_vms_push): Ditto. (_bfd_vms_pop): Ditto. (_bfd_vms_get_header_values): Removed. (_bfd_vms_get_first_record): Removed. (vms_get_remaining_image_record): Removed. (new_symbol): Removed. (_bfd_vms_enter_symbol): Removed. (_bfd_vms_save_sized_string): Use memcpy instead of strncpy. (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd parameter with struct vms_rec_wr. (_bfd_vms_output_push): Removed and replaced by ... (_bfd_vms_output_begin_subrec): ... new function. (_bfd_vms_output_alignment): Replace bfd parameter with struct vms_rec_wr, and adjust. (_bfd_vms_output_check): Ditto (_bfd_vms_output_byte): Ditto. (_bfd_vms_output_short): Ditto. (_bfd_vms_output_long): Ditto. (_bfd_vms_output_quad): Ditto. (_bfd_vms_output_counted): Ditto. (_bfd_vms_output_dump): Ditto. (_bfd_vms_output_fill): Ditto. (_bfd_vms_output_pop): Removed and replaced by ... (_bfd_vms_output_end_subrec): ... new function. (_bfd_vms_output_flush): Removed. (_bfd_vms_output_align): New function. (_bfd_vms_output_end): Add recwr parameter. Adjust for this new parameter. (vms_convert_to_var): New function imported from vms.c (vms_convert_to_var_1): Ditto. (vms_convert_to_var_unix_filename): Ditto. (vms_get_module_name): Ditto. (get_vms_time_string): Ditto. (vms_time_to_time_t): Ditto. (vms_rawtime_to_time_t): Ditto. * vms.h: All macros for the VMS file format are now in include/vms. Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c have been removed. (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c (struct fileinfo, struct srecinfo, struct lineinfo): Ditto. (struct funcinfo, struct vms_private_data_struct): Ditto. (struct vms_section_data_struct): Ditto. (struct vms_rec_rd, stryct vms_rec_wr): New declarations. (vms_get_module_name, get_vms_time_string): New declarations. (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto. (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto. (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted. (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto. (_bfd_vms_output_end,_bfd_vms_output_check): Ditto. (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto. (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto. (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto. (_bfd_vms_output_fill): Ditto. (bfd_vms_set_section_flags): Ditto. 2010-04-14 Matthew Gretton-Dann * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early exit due to merging the same weak symbol to test that the symbols are actually weak. 2010-04-13 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location when optimizing high got_tlsgd/ld insns. 2010-04-10 H.J. Lu * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before define. (HAVE_PRSTATUS32_T): Likewise. 2010-04-10 H.J. Lu PR corefiles/11467 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h for x86_64-*-linux*. * config.in: Regenerated. * configure: Likewise. * elf.c: Include CORE_HEADER if it is defined. 2010-04-10 H.J. Lu Jan Kratochvil * hosts/x86-64linux.h: New. 2010-04-09 Nick Clifton d1701 1 a1701 10 * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count. * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused variables htab and hdr_info and mark info parameter as unused. * elf.c (prep_headers): Remove unused variable i_phdrp. (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp. * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned as unused. * peXXigen.c (pe_print_reloc): Remove unused variable datasize. * verilog.c (verilog_write_section): Remove unused variable address. d1703 1 a1703 3 2010-04-07 Alan Modra * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above. d1706 1 a1706 1 2010-04-06 H.J. Lu d1708 2 a1709 2 PR ld/11434 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally. d1711 1 a1711 1 2010-04-06 Tristan Gingold d1713 4 a1716 1 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags. d1718 1 a1718 49 2010-04-05 Jakub Jelinek * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4 provided that it has the expected address size and zero segment length. * dwarf2.c (struct line_head): Add maximum_ops_per_insn field. (struct line_info): Add op_index field, change end_sequence type to unsigned char. (new_line_sorts_after): For the same address compare op_index. (add_line_info): Add op_index argument, store it into the structure. (decode_line_info): Complain about unknown versions of .debug_line. Initialize maximum_ops_per_insn. Add op_index state register and track it. 2010-04-01 Nathan Sidwell * elf32-ppc.c (apuinfo_set): New static var. (ppc_elf_begin_write_processing): Set it here, always create an APUinfo section if there were any in the inputs. (ppc_elf_write_section): Check apuinfo_set. (ppc_elf_final_write_processing): Likewise. 2010-04-01 Tristan Gingold * vms.h: Include time.h. Add prototypes for vms_get_module_name, vms_time_to_time_t and vms_rawtime_to_time_t. * vms.c (vms_alpha_vec): Add archives support. * vms-misc.c: Include safe-ctype.h (vms_get_module_name): New function. (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto. * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the vms_get_module_name function. Use this function. * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector. * libbfd-in.h: Add prototype for _bfd_append_relative_path. Add prototypes for vms-lib.c * libbfd.h: Regenerate. * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add vms-lib.lo to vms_alpha_vec. * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*. * configure: Regenerate. * bfd.c: Add selective_search field. * bfd-in2.h: Regenerate. * archive.c (append_relative_path): Rename to _bfd_append_relative_path and make it public. (_bfd_get_elt_at_filepos): Adjust for above renaming. * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo (BFD32_BACKENDS_CFILES): Add vms-lib.c * Makefile.in: Regenerate. d1720 8 a1727 1 2010-04-01 Jakub Jelinek d1729 1 a1729 6 * dwarf2.c (read_attribute_value): Handle CU version 4 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc and DW_FORM_flag_present. For unknown form value return NULL. (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc like DW_FORM_block. (parse_comp_unit): Allow CU version 4. d1731 1 a1731 1 2010-04-01 Hans-Peter Nilsson d1733 1 a1733 3 * elf32-cris.c (cris_elf_relocate_section): Correct first argument to _bfd_elf_get_dynamic_reloc_section. (elf_cris_discard_excess_dso_dynamics): Ditto. d1735 4 a1738 34 2010-03-31 Kai Tietz * coff-i386.c (in_reloc_p): Check also for R_SECREL32. * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL. 2010-03-31 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized TPREL16_HI and TPREL16_HA insns. 2010-03-31 Hans-Peter Nilsson PR ld/11458 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid assert of empty pcrel_relocs_copied on the direct symbol. Instead of moving the list from the indirect symbol to the direct symbol, merge into any existing list. (cris_elf_check_relocs): Store the original section in the pcrel_relocs_copied list, not the relocation section. (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find the relocation section, for reducing its size. Change the BFD_ASSERT into a check for the section being read-only, and only emit warnings and TEXTREL marker when there's an entry for a read-only section. 2010-03-29 Daniel Jacobowitz * elf32-arm.c (using_thumb_only): Handle v6-M. 2010-03-26 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw ): Not pc-relative. * bfd-in.h (elf_discarded_section): Clarify comment. * reloc.c (struct reloc_howto_struct ): Likewise. d1740 10 d1751 1 a1751 6 2010-03-26 Matt Rice * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged as unique in the armap. 2010-03-26 Alan Modra d1753 2 a1754 16 PR ld/11375 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a possible stub on branches. 2010-03-25 Joseph Myers * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo. (ALL_MACHINES_CFILES): Add cpu-tic6x.c. (BFD32_BACKENDS): Add elf32-tic6x.lo. (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c. * Makefile.in: Regenerate. * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New. (bfd_archures_list): Update. * config.bfd (tic6x-*-elf): New. * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. a1755 17 * cpu-tic6x.c, elf32-tic6x.c: New. * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12, BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7, BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16, BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B, BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W, BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B, BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W, BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H, BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W, BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W, BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31, BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN, BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New. * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. (_bfd_target_vector): Update. * bfd-in2.h, libbfd.h: Regenerate. d1757 1 a1757 1 2010-03-24 H.J. Lu d1759 1 a1759 60 * aout-target.h: Update copyright year. * aout-tic30.c: Likewise. * coff-alpha.c: Likewise. * coff-rs6000.c: Likewise. * coff64-rs6000.c: Likewise. * elf64-mips.c: Likewise. * ieee.c: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * oasys.c: Likewise. * targets.c: Likewise. 2010-03-24 H.J. Lu * libbfd-in.h: Update copyright year. 2010-03-21 H.J. Lu PR ld/11413 * elflink.c (_bfd_elf_add_default_symbol): Check !executable instead of shared. 2010-03-19 Jie Zhang * elf32-arm.c (struct section_list): Remove. (section_list): Remove typedef. (record_section_with_arm_elf_section_data): Remove. (find_arm_elf_section_entry): Remove. (get_arm_elf_section_data): Use is_arm_elf. (unrecord_section_with_arm_elf_section_data): Remove. (elf32_arm_new_section_hook): Don't call record_section_with_arm_elf_section_data. (elf32_arm_write_section): Set mapcount to -1 when the map has been used. Don't call unrecord_section_with_arm_elf_section_data. (unrecord_section_via_map_over_sections): Remove. (elf32_arm_close_and_cleanup): Remove. (elf32_arm_bfd_free_cached_info): Remove. (bfd_elf32_close_and_cleanup): Don't define. (bfd_elf32_bfd_free_cached_info): Don't define. 2010-03-18 H.J. Lu PR binutils/11396 * libcoff-in.h (pe_tdata): Add dont_strip_reloc. * libcoff.h: Regenerated. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG if dont_strip_reloc is set. (_bfd_XX_bfd_copy_private_bfd_data_common): Set dont_strip_reloc on output if there is no .reloc and IMAGE_FILE_RELOCS_STRIPPED isn't set in input. 2010-03-18 Wei Guozhi PR gas/11323 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to R_ARM_GOT_PREL. * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation. a1760 1 * libbfd.h: Regenerate. d1762 1 a1762 1 2010-03-17 H.J. Lu d1764 150 a1913 2 * reloc.c (BFD_RELOC_SPU_PIC18): Removed. (BFD_RELOC_SPU_STUB): Likewise. d1915 1 a1915 1 2010-03-17 Jie Zhang d1917 3 a1919 2 * elf.c (assign_file_positions_for_load_sections): Avoid overflow. d1921 1 a1921 1 2010-03-17 Alan Modra d1923 20 a1942 3 PR binutils/11382 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using proper type. d1944 3 a1946 1 2010-03-17 Alan Modra d1948 1 a1948 1 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix. d1950 1 a1950 1 2010-03-16 Alan Modra d1952 1 a1952 4 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt. (ppc64_elf_edit_toc): Set it here. (ha_reloc_match): New function. (ppc64_elf_relocate_section): Optimize bigtoc insn sequences. d1954 1 a1954 1 2010-03-15 Alan Modra d1956 29 a1984 2 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function. * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare. d1986 1 a1986 1 2010-03-14 Alan Modra d1988 3 a1990 11 PR ld/11378 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare. * elf64-ppc.c (call_check_done): Define. (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro. (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise. (ppc64_elf_finish_multitoc_partition): Remove unnecessary check. (toc_adjusting_stub_needed): Use call_check_done rather than toc_off. Simplify return logic. Iterate over all .init and .fini fragments by recursion. Set makes_toc_func_call here.. (ppc64_elf_next_input_section): ..rather than here. (check_pasted_section, ppc64_elf_check_init_fini): New functions. d1992 1 a1992 1 2010-03-13 Alan Modra d1994 99 a2092 4 PR ld/11375 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the function descriptor symbol if there is one, not just for plt stubs. (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls. d2094 1 a2094 1 2010-03-05 Rainer Orth d2096 2 a2097 3 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base version twice. Skip it when constructing def.vd_next. d2099 1 a2099 5 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to bfd_elf32_i386_sol2_vec. (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2. (elf32_bed): Redefine to elf32_i386_sol2_bed. (elf_backend_want_plt_sym): Redefine to 1. d2101 135 a2235 101 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to bfd_elf64_x86_64_sol2_vec. (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2. (elf64_bed): Redefine to elf64_x86_64_sol2_bed. (elf_backend_want_plt_sym): Redefine to 1. * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec. Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in targ64_selvecs. (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec. Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in targ_selvecs. * configure.in: Handle bfd_elf32_i386_sol2_vec, bfd_elf64_x86_64_sol2_vec. * configure: Regenerate. * targets.c (bfd_elf32_i386_sol2_vec): Declare. (bfd_elf64_x86_64_sol2_vec): Declare. (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec, bfd_elf64_x86_64_sol2_vec. 2010-03-04 Daniel Jacobowitz * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program sections. 2010-03-04 Alan Modra PR 11302 * dwarf2.c (read_abbrevs): Return NULL on alloc failures. (read_attribute_value, decode_line_info): Likewise. (add_line_info, read_rangelist): Return FALSE on alloc failures. (arange_add, sort_line_sequences): Likewise. (find_abstract_instance_name): Handle failures from called funcs. (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise. (find_line): Realloc to a temp, and handle alloc fail. 2010-03-03 Daniel Jacobowitz * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add a mapping symbol to an empty section. 2010-03-02 Matthew Gretton-Dann * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the return value from the call to _bfd_elf_merge_object_attributes. 2010-03-02 Christophe Lyon Alan Modra * elf32-arm.c (a8_erratum_fix): Add st_type field to record the destination mode of the a8 stub. (elf32_arm_link_hash_table): Add top_id field. (elf32_arm_link_hash_table_create): Initialize top_id. (arm_type_of_stub): Update prototype, st_type can now be updated by this function. Actual destination address in case of PLT is computed here, to help factorizing code. (elf32_arm_stub_name): Update prototype, use stub_type additional parameter to build stub name. (elf32_arm_get_stub_entry): Update prototype, use stub_type additional parameter to build stub entry. (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of put_thumb_insn/put_arm_insn as BE8 encoding is now handled later. Call elf32_arm_final_link_relocate to process all in-stub relocations. (elf32_arm_setup_section_lists): Update top_id. (cortex_a8_erratum_scan): Record stub destination mode. (elf32_arm_size_stubs): Update call to arm_type_of_stub according to new prototype. (elf32_arm_final_link_relocate): Enable processing of in-stub REL32 relocations. Rely on arm_type_of_stub to detect if a stub is needed, enabling code factorization. (elf32_arm_final_link): Process stub sections. (elf32_arm_output_map_sym): Add entry to code/data map. 2010-03-01 David S. Miller * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and h->def_regular, set h->ref_regular. (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries and dynamic relocations if h->ref_regular. * elfxx-sparc.c (struct elf_reloc_map): Delete. (sparc_reloc_map): Delete. (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each relocation type in switch statements. 2010-02-25 Alan Modra PR ld/11304 * elf.c (_bfd_elf_init_private_section_data): Rename need_group to final_link and invert. For final link allow some flags to differ. Don't specially allow flags to be all zero. 2010-02-24 Alan Modra PR binutils/10858 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol d2238 1 a2238 1 2010-02-23 Andrew Zabolotny d2240 2 a2241 3 PR binutils/11297 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8. (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8. d2243 1 a2243 1 2010-02-22 Alan Modra d2245 2 a2246 4 * reloc.c (bfd_check_overflow): When forming addrmask, shift fieldmask left by rightshift. (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all overflow checks. d2248 1 a2248 1 2010-02-20 H.J. Lu d2250 2 a2251 2 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check STT_GNU_IFUNC on large common symbol. d2253 1 a2253 1 2010-02-18 H.J. Lu d2255 2 a2256 7 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set has_ifunc_symbols if the symbol comes from a shared library. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise. d2258 1 a2258 1 2010-02-19 Alan Modra d2260 3 a2262 6 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from.. (_bfd_elf_copy_private_header_data): ..here. * elflink.c (_bfd_elf_size_group_sections): New function. (bfd_elf_size_dynamic_sections): Call it. * elf-bfd.h (_bfd_elf_size_group_sections): Declare. (_bfd_elf_fixup_group_sections): Declare. d2264 1 a2264 1 2010-02-18 Matthew Gretton-Dann d2266 50 a2315 3 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for merging Tag_DIV_use, Tag_MPextension_use, and Tag_MPextension_use_legacy tags. d2317 1 a2317 1 2010-02-18 Alan Modra d2319 131 a2449 86 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15 commit. Don't write zeros for removed group members. (_bfd_elf_copy_private_header_data): Adjust size of group section when group members are removed by objcopy. 2010-02-15 Dave Korn PR binutils/11280 * configure.host (*-*-solaris2.11): Add host define to select valid default code page for windres/windmc on solaris. 2010-02-15 Nick Clifton * po/vi.po: Updated Vietnamese translation. 2010-02-12 Daniel Gutson * elf32-arm.c (elf32_arm_output_arch_local_syms): add missing mapping symbol to data only sections. 2010-02-11 David S. Miller * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global symbols. (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for these relocs on global symbols. (gdopoff): New. (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on local symbol references which are not STT_GNU_IFUNC. Handle relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively, and deal with negative vs. non-negative values properly. 2010-02-09 Tristan Gingold * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for non-external relocation. 2010-02-09 Alan Modra * elf64-ppc.c (merge_got_entries): Move earlier in file. (allocate_dynrelocs): Merge got entries here if not doing multi-toc. (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got. (ppc64_elf_layout_multitoc): Don't resize if we have already merged got entries. 2010-02-09 Michael Holzheu * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp, elfcore_write_s390_todpreg, elfcore_write_s390_ctrs, elfcore_write_s390_prefix): New. * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp, elfcore_write_s390_todpreg, elfcore_write_s390_ctrs, elfcore_write_s390_prefix): New. (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX. (elfcore_write_register_note): Handle .reg-s390-timer, .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs, .reg-s390-prefix section. 2010-02-09 Alan Modra * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect unsigned char. Update variables and code using them throughout file. (struct ppc_link_hash_entry): Likewise for tls_mask. * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents. * elf64-ppc.c (has_small_toc_reloc): Don't define. (makes_toc_func_call, call_check_in_progress): Shuffle flags. (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update code setting the flag. (ppc64_elf_next_toc_section): Group big-toc sections in 0x80008000 chunks. 2010-02-08 David S. Miller * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot, srelgot, splt, srelplt, and sgotplt members in favor of generic copies. * elfxx-sparc.c (create_got_section): Delete. (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic section creator does that work for us. Use ->elf.foo instead of ->foo where applicable. (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo where applicable. d2451 46 a2498 13 (sparc_vxworks_build_plt_entry): Likewise. (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. (sparc_finish_dyn): Likewise. (sparc_vxworks_finish_exec_plt): Likewise. (sparc_vxworks_finish_shared_plt): Likewise. (_bfd_sparc_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_* macros for visibilty and locality checks. (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. (_bfd_sparc_elf_finish_dynamic_symbol):Likewise. d2500 1 a2500 2 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set but never used local var 'dynobj'. d2502 7 a2508 68 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle nocopyreloc. * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New. (BFD_RELOC_SPARC_IRELATIVE): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table and loc_hash_memory. (_bfd_sparc_elf_link_hash_table_free): Declare. * elf32-sparc.c (elf32_sparc_add_symbol_hook): New. (elf_backend_add_symbol_hook, elf_backend_post_process_headers, bfd_elf32_bfd_link_hash_table_free): Define. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set has_ifunc_symbols if STT_GNU_IFUNC. (bfd_elf64_bfd_link_hash_table_free): Define. (elf_backend_post_process_headers): Define always. * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New. (sparc_reloc_map): Add entries for new IFUNC relocs. (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs. (_bfd_sparc_elf_info_to_howto_ptr): Likewise. (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq, elf_sparc_get_local_sym_hash): New. (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization from here... (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate local hash table. (_bfd_sparc_elf_link_hash_table_free): New. (create_ifunc_sections): New. (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols cons up a fake local hash table entry for it. Unconditionally add a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count dyn relocs for ifunc. (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc. (allocate_dynrelocs): Unconditionally emit a PLT entry when STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc. (allocate_local_dynrelocs): New function. (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table. Emit dynamic relocs to irelplt when not shared. Treat iplt like splt. (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand. (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt in iplt/irelplt. 2010-02-08 Richard Sandiford * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating max_contents_size, only consider sections whose contents must be swapped in. 2010-02-09 Alan Modra * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here.. (ppc64_elf_size_dynamic_sections): ..and here.. (merge_got_entries): ..rather than here. 2010-02-09 Alan Modra * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc. (has_small_toc_reloc): Define. (ppc64_elf_check_relocs): Set the above flags. (ppc64_elf_edit_opd): Delete obfd param. (ppc64_elf_tls_optimize): Likewise. (ppc64_elf_edit_toc): Likewise. (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param. * elf64-ppc.h: Update prototypes. d2510 1 a2510 1 2010-02-08 Alan Modra d2512 4 a2515 11 * section.c (struct bfd_section): Delete has_tls_reloc, has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done. Add sec_flg0 thru sec_flg5. (BFD_FAKE_SECTION): Update for changed flags. * ecoff.c (bfd_debug_section): Likewise. * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define. * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define. (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update. * elf32-xtensa.c (reloc_done): Define. * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update. * bfd-in2.h: Regenerate. d2517 2 a2518 1 2010-02-08 Tristan Gingold d2520 1 a2520 2 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern for non-scattered relocations. d2522 3 a2524 1 2010-02-08 Nathan Sidwell d2526 1 a2526 3 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty apuinfo sections, only scan input sections once and reuse the buffer. d2528 4 a2531 1 2010-02-08 Philipp Tomsich d2533 1 a2533 3 * archures.c (bfd_mach_ppc_titan): Define. * bfd-in2.h: Regenerate. * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry. d2535 5 a2539 199 2010-02-08 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code. 2010-02-05 Sterling Augustine * elf.c (assign_file_positions_for_load_sections) Update lma of section if necessary. Fixes Bugzilla 11219. 2010-02-05 H.J. Lu * elf32-i386.c: Remove trailing white spaces. * elf64-x86-64.c: Likewise. 2010-02-03 Nick Clifton * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add entries for other architectures. (struct elf_link_hash_table): Add hash_table_id field. (elf_hash_table_id): New accessor macro. * elflink.c (_bfd_elf_link_hash_table_init): Add target_id parameter. * elf-m10300.c (elf32_mn10300_hash_table): Check table id before returning cast pointer. (elf32_mn10300_link_hash_table_create): Identify new table as containing MN10300 extensions. (mn10300_elf_relax_section): Check pointer returned by elf32_mn10300_hash_table. * elf32-arm.c: Likewise, except using ARM extensions. * elf32-avr.c: Likewise, except using AVR extensions. * elf32-bfin.c: Likewise, except using BFIN extensions. * elf32-cris.c: Likewise, except using CRIS extensions. * elf32-frv.c: Likewise, except using FRV extensions. * elf32-hppa.c: Likewise, except using HPPA32 extensions. * elf32-i386.c: Likewise, except using I386 extensions. * elf32-lm32.c: Likewise, except using LM32 extensions. * elf32-m32r.c: Likewise, except using M32RM extensions. * elf32-m68hc11.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions. * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions. * elf32-m68k.c: Likewise, except using M68K extensions. * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions. * elf32-ppc.c: Likewise, except using PPC32 extensions. * elf32-s390.c: Likewise, except using S390 extensions. * elf32-sh.c: Likewise, except using SH extensions. * elf32-spu.c: Likewise, except using SPU extensions. * elf32-xtensa.c: Likewise, except using XTENSA extensions. * elf64-alpha.c: Likewise, except using ALPHA extensions. * elf64-hppa.c: Likewise, except using HPPA64 extensions. * elf64-ppc.c: Likewise, except using PPC64 extensions. * elf64-s390.c: Likewise, except using S390 extensions. * elf64-x86-64.c: Likewise, except using X86_64 extensions. * elfxx-ia64.c: Likewise, except using IA64 extensions. * elfxx-mips.c: Likewise, except using MIPS extensions. * elfxx-sparc.c: Likewise, except using SPARC extensions. * elfxx-sparc.h: Likewise, except using SPARC extensions. * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete redundant structure. (elf32_cr16_hash_table): Delete unused macro. (elf32_cr16_link_hash_traverse): Delete unused macro. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-vax.c: Likewise. * elf64-sh64.c: Likewise. 2010-02-03 Alan Modra * elf64-ppc.c (struct plt_entry): Move earlier in file. (struct got_entry): Likewise. Add is_indirect and got.ent fields. (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry. Update all uses. (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass. Remove no_multi_toc. (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect when allocating a new struct got_entry. (allocate_got): New function, extracted from.. (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd. (ppc64_elf_size_dynamic_sections): Track got relocs allocated in .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries. (ppc64_elf_setup_section_lists): Remove output_bfd param and no_multi_toc, add add_stub_section and layout_sections_again. Stash new params in htab. Extract some code to.. (ppc64_elf_start_multitoc_partition): ..here. New function. (ppc64_elf_next_toc_section): Check for linker script errors. Handle second pass toc scan. (merge_got_entries, merge_global_got, reallocate_got): New functions. (ppc64_elf_reinit_toc): Rename to.. (ppc64_elf_finish_multitoc_partition): ..this. (ppc64_elf_layout_multitoc): New function. (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and layout_sections_again params. (ppc64_elf_relocate_section): Handle indirect got entries. * elf64-ppc.h: Update prototypes. Declare new functions. 2010-02-02 H.J. Lu * elf-bfd.h (elfcore_write_xstatereg): New. * elf.c (elfcore_grok_xstatereg): New. (elfcore_write_xstatereg): Likewise. (elfcore_grok_note): Handle NT_X86_XSTATE. (elfcore_write_register_note): Handle .reg-xstate section. 2010-02-01 Tristan Gingold * som.c (som_write_ar_hdr): Define this macro. 2010-01-30 John David Anglin * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the linkage table pointer to use the global table pointer if not doing a shared link. 2010-01-29 Joel Brobecker * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal if it has already been set. 2010-01-27 Tristan Gingold * vms.h: Remove trailing spaces. (struct hdr_struct): Remove unused hdr_c_cpr field. (enum file_format_enum): Add comments. * vms.c (vms_bfd_print_private_bfd_data): New function that replaces the macro. Remove trailing spaces. * vms-misc.c: Improve comments. (_bfd_vms_get_object_record): Also handle files without pads. * vms-hdr.c (_bfd_vms_write_dbg): Fix format string. * vms-gsd.c (struct flagdescstruct): Make name field const. (gsyflagdesc): Fix typo. 2010-01-27 Alan Modra PR ld/11217 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec. (ppc64_elf_setup_section_lists): Init them. (ppc64_elf_next_toc_section): Don't partition multi-toc between .got and .toc on the same input file. (ppc64_elf_relocate_section): Correct GOT entry offset. 2010-01-26 Tristan Gingold * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr. (bfd_target): Add _bfd_write_ar_hdr_fn field. * archive.c (is_bsd44_extended_name): New macro. (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size. (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended name. (_bfd_archive_bsd44_construct_extended_name_table): New function. (_bfd_generic_write_ar_hdr): Ditto. (_bfd_bsd44_write_ar_hdr): Ditto. (_bfd_write_archive_contents): Call _bfd_write_ar_hdr. (bsd_write_armap): Adjust firstreal computation. * libbfd-in.h (struct areltdata): Add extra_size field. (_bfd_generic_write_ar_hdr): Add prototype. (_bfd_bsd44_write_ar_hdr): Ditto. (_bfd_write_ar_hdr): Define. (_bfd_noarchive_write_ar_hdr): Ditto. (_bfd_archive_bsd_write_ar_hdr): Ditto. (_bfd_archive_coff_write_ar_hdr): Ditto. (_bfd_archive_bsd44_slurp_armap): Ditto. (_bfd_archive_bsd44_slurp_extended_name_table): Ditto. (_bfd_archive_bsd44_construct_extended_name_table): New prototype. (_bfd_archive_bsd44_truncate_arname): Ditto. (_bfd_archive_bsd44_write_armap): Ditto. (_bfd_archive_bsd44_read_ar_hdr): Ditto. (_bfd_archive_bsd44_write_ar_hdr): Ditto. (_bfd_archive_bsd44_openr_next_archived_file): Ditto. (_bfd_archive_bsd44_get_elt_at_index): Ditto. (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto. (_bfd_archive_bsd44_update_armap_timestamp): Ditto. * libbfd.h: Regenerate. * oasys.c (oasys_write_ar_hdr): Define. * libecoff.h (_bfd_ecoff_write_ar_hdr): Define. * ieee.c (ieee_write_ar_hdr): Define. * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define. * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field. (bfd_pmac_xcoff_backend_data): Ditto. * coff64-rs6000.c (rs6000coff64_vec): Ditto. (bfd_xcoff_aix5_backend_data): Ditto. * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define. * aout-target.h (MY_write_ar_hdr): Define it if not defined. * aout-tic30.c (MY_write_ar_hdr): Ditto. * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive. (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr) (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table) (bfd_mach_o_construct_extended_name_table) (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap) (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt) (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr) (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table) (bfd_mach_o_construct_extended_name_table) (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap) (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt) (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c * bfd-in2.h: Regenerate. d2541 1 a2541 1 2010-01-26 Alan Modra d2544 4 a2547 109 PR ld/11218 * elflink.c (elf_link_output_extsym): Do not ignore undefined symbols with ref_regular set when gc_sections is active. 2010-01-25 Alan Modra PR ld/11217 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences with relocations against undefined weak symbols. (ppc64_elf_relocate_section): Don't optimize calls to undefined weak functions if the symbol is dynamic. (ppc64_elf_relocate_section): Edit tprel tls sequences. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. (_bfd_elf_ppc_at_tprel_transform): New function. * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare. * bfd-in2.h: Regenerate. 2010-01-23 Richard Sandiford * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1. (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE. * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and bitsize to 1. (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE. 2010-01-21 Nick Clifton * elflink.c (elf_link_add_object_symbols): Look up name of undefined symbol both before and after versioning has been applied. Do not bother with symbols that are weakly undefined. 2010-01-21 Andreas Krebbel * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function. (bfd_elf32_bfd_merge_private_bfd_data): New macro definition. 2010-01-19 Cary Coutant * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8. 2010-01-19 Daisuke Hatayama Alan Modra * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff. (elf_object_p): Read e_phnum extension. (elf_write_shdrs_and_ehdr): Write e_phnum extension. * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check that we can read last program header. 2010-01-19 Matthew Gretton-Dann * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of R_ARM_THM_CALL entry. (elf32_arm_final_link_relocate): Correct calculation of reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22, or R_ARM_THM_JUMP24 relocation. 2010-01-18 Alan Modra PR 11168 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C block past vars in COFF_IMAGE_WITH_PE block. Report error on more than 32k sections. 2010-01-15 Jan Kratochvil Fix compilation warning on gcc-3.4. * vms-tir.c (start_etir_record, sto_imm): Rename the prototype parameter index to sec_index according to the function definition. 2010-01-13 Chao-ying Fu * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B. It is true for all CPUs. (jal_reloc_p): New function. (mips_elf_calculate_relocation): Rename require_jalxp to cross_mode_jump_p. Update comment for CROSS_MODE_JUMP_P. Set up cross_mode_jump_p based on the mode change. (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p. Update comment for CROSS_MODE_JUMP_P. Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx. Use !cross_mode_jump_p to guard conversion. Convert "jr t9" to "b", if possible. (_bfd_mips_elf_relocate_section): Rename require_jalx to cross_mode_jump_p. Pass &cross_mode_jump_p to call mips_elf_calculate_relocation. Pass cross_mode_jump_p to call mips_elf_perform_relocation. 2010-01-13 Nick Clifton * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for "m32c" returns the m32c arch_info_struct and not the m16c arch_info_struct. (arch_info_struct): Use the new scan function. (bfd_m32c_arch): Likewise. 2010-01-13 Tristan Gingold * config.bfd: Remove duplicated target vector for i386-*-darwin. Appends new arch instead of overriding. Use mach_o_x86_64_vec for x86_64-*-darwin. * configure.in: Add mach_o_x86_64_vec. * configure: Regenerate. * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector. * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c * Makefile.in: Regenerate. * mach-o-x86-64.c: New file. d2549 1 a2549 1 2010-01-13 Tristan Gingold d2551 2 a2552 1 * reloc.c: Add MACH_O_X86_64 relocations. d2554 76 a2629 1 * libbfd.h: Regenerate. d2631 1 a2631 1 2010-01-13 Tristan Gingold d2633 1 a2633 3 * archive.c (normalize): Use lbasename. (bfd_bsd_truncate_arname): Ditto. (bfd_gnu_truncate_arname): Ditto. d2635 1 a2635 1 2010-01-12 Tristan Gingold d2637 3 a2639 1 * makefile.vms (CFLAGS): Turns warnings into informational messages. d2641 1 a2641 1 2010-01-11 Tristan Gingold d2643 3 a2645 1 * mach-o.h: Add x86-64 relocation types. d2647 1 a2647 1 2010-01-11 Tristan Gingold d2649 1 a2649 10 * mach-o.h (bfd_mach_o_backend_data): Add arch field. (bfd_mach_o_set_arch_mach): New prototype. * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject. (bfd_mach_o_set_arch_mach): New function. (bfd_mach_o_gen_mkobject): New function. Set TARGET_ARCHITECTURE for the generic back-ends. * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define. Check that TARGET_ARCHITECTURE is defined. Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure. * mach-o-i386.c (TARGET_ARCHITECTURE): Define. d2651 1 a2651 1 2010-01-11 Tristan Gingold d2653 5 a2657 1 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap. d2659 1 a2659 1 2010-01-11 Nick Clifton d2661 3 a2663 2 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow handling of R_V850_HI16_S relocation. d2665 1 a2665 1 2010-01-11 Alan Modra d2667 19 a2685 2 PR 11103 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment. d2687 1 a2687 6 2010-01-11 Alan Modra PR 6832 * dwarf2.c (struct comp_unit): Add sec_info_ptr. (find_abstract_instance_name): Use it. (parse_comp_unit): Set it. d2689 1 a2689 56 2010-01-09 Ralf Wildenhues * Makefile.in: Regenerate. * configure: Regenerate. 2010-01-08 Tristan Gingold * archive.c: Remove bfd_special_undocumented_glue. 2010-01-08 Alan Modra PR ld/11133 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook. * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise. * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise. 2010-01-07 H.J. Lu PR ld/11138 * elflink.c (elf_link_check_versioned_symbol): Don't abort if a symbol referenced by DSO is is defined in a non-shared object and forced local. 2010-01-07 H.J. Lu PR ld/11133 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for undefined __start_XXX/__stop_XXX in all input files and set SEC_KEEP. 2010-01-07 H.J. Lu PR ld/11143 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section. 2010-01-04 Daniel Gutson * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC before including procfs.h. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. * configure.in: Added autoconf probe for the pr_fpreg member. * configure: Regenerated. * config.in: Regenerated. * elf.c: Define _STRUCTURE_PROC before including procfs.h. 2010-01-04 Joel Brobecker Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64). * dwarf2.c (concat_filename): Rename dirname with dir_name to void shadowing the dirname function. Rename subdirname with subdir_name to stay consistent with the new dir_name variable name. 2010-01-04 Edmar Wienskoski * archures.c: Add bfd_mach_ppc_e500mc64. a2690 2 * cpu-powerpc.c (bfd_powerpc_archs): Add entry for bfd_mach_ppc_e500mc64. d2692 2 a2693 1 2010-01-01 Joel Brobecker d2695 60 a2754 2 Fix -Wshadow warnings (seen on ppc-aix) * xcofflink.c: Replace finfo by flinfo throughout. d2756 1 a2756 1 For older changes see ChangeLog-2009 @ 1.1.1.4 log @from ftp.gnu.org @ text @d1 1 a1 1 2013-03-25 Tristan Gingold d3 1 a3 1 * configure.in: Bump version to 2.23.2 d7 1 a7 1 2013-03-04 Alan Modra d9 4 a12 3 * elf32-ppc.c (ppc_elf_relocate_section ): Adjust non-zero addends when relocatable, rather than addends >= 32768. Always zero "addend" before applying relocation. d14 1 a14 1 2013-02-18 Alan Modra d16 2 a17 8 PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): Declare. (_bfd_elf_strtab_resize): Declare. * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete. (_bfd_elf_strtab_clear_all_refs): New function. (_bfd_elf_strtab_resize): Likewise. * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize. d19 1 a19 1 2013-02-11 Richard Sandiford d21 31 a51 2 * elfxx-mips.c (mips_elf_recreate_got): Remove free. (mips_elf_resolve_final_got_entries): Remove bogus comment. d53 2 a54 1 2013-02-10 Alan Modra d56 32 a87 2 PR ld/15113 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc. d89 2 a90 1 2013-02-08 Alan Modra d92 35 a126 4 PR binutils/15106 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache. * elf.c (elf_find_function): Revert last change. Use new tdata field rather than static vars for cache. d128 1 a128 1 2013-02-07 Roberto Agostino Vitillo d130 2 a131 2 PR binutils/15106 * elf.c (elf_find_function): Don't cache if symbols change. d133 82 a214 1 2013-02-07 Alan Modra d216 20 a235 3 PR binutils/14873 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to copy attributes from or to non-ELF. d237 2 a238 1 2013-02-01 Alan Modra d240 1 a240 2 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol clears def_regular. d242 3 a244 2 2013-01-31 Alan Modra David S. Miller d246 1 a246 6 PR ld/15056 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit references to __tls_get_addr. * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct vtinherit and vtentry reloc handling too. * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro. d248 55 a302 1 2013-01-31 Alan Modra d304 44 a347 1 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink. d349 29 a377 7 2013-01-28 Alan Modra * elf64-ppc.c: Use %T to print symbols names and remove redundant "relocation" in error messages throughout file. (ppc64_elf_relocate_section): Remove sibling call error message, replace with "call lacks nop". Specially report errors for branches to function entry points via OPD lookup and branches to stubs. Remove NULL symbol handling now done by %T. d379 1 a379 1 2013-01-22 Alan Modra d381 2 a382 4 Apply mainline patches 2013-01-15 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to plt-thread-safe. d384 1 a384 8 2013-01-14 Alan Modra PR binutils/14813 * bfdio.c (struct bfd_iovec ): Revert 2012-11-06. (memory_bclose): Likewise. Return 0 on success. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose, bfd_close): Likewise. * vms-lib.c (vms_lib_bclose): Likewise. * libbfd.h: Regenerate. d386 2 a387 64 2013-01-13 Alan Modra * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak. Add ref_dynamic_nonweak. * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete. (_bfd_elf_merge_symbol): Don't call above function. Move setting of ref_dynamic_nonweak and dynamic_def earlier. Don't clear dynamic_def. (elf_link_add_object_symbols): Delete redundant "override" test. Don't set dynamic_def here. (elf_link_output_extsym): Update. 2013-01-12 Alan Modra * elf-bfd.h (_bfd_elf_strtab_refcount): Declare. * elf-strtab.c (_bfd_elf_strtab_refcount): New function. * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount. 2013-01-12 Alan Modra PR ld/12549 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare. (_bfd_elf_strtab_clear_all_refs): Define. * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function. (_bfd_elf_strtab_clear_all_refs): Delete. * elflink.c (elf_link_add_object_symbols): Clear out added strtab refs. Correct handling of warning common symbols. 2012-12-19 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Replace bfd_elf32_swap_reloc_out with elf_append_rel. (elf_i386_finish_dynamic_symbol): Likewise. * elflink.c (elf_append_rel): Call swap_reloc_out instead of swap_reloca_out. 2012-12-18 Alan Modra * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of the special MAP_* values. 2012-12-07 Alan Modra PR ld/14926 * elf.c (_bfd_elf_map_sections_to_segments): Include elf header size when determining phdr_in_segment. 2012-12-05 Alan Modra * elf64-ppc.c (build_plt_stub): Fix off by one error in branch to glink. 2012-11-21 H.J. Lu PR binutils/14493 * elf.c (copy_elf_program_header): When rewriting program header, set the output maxpagesize to the maximum alignment of input PT_LOAD segments. 2012-11-13 Joe Seymour * elf.c (rewrite_elf_program_header): Allocate elf_segment_map with bfd_zalloc, instead of bfd_alloc. 2012-11-06 H.J. Lu PR binutils/14813 * bfdio.c (bfd_iovec): Change return type of bclose to bfd_boolean. (memory_bclose): Change return type to bfd_boolean. * cache.c (cache_bclose): Likewise. * opncls.c (opncls_bclose): Likewise. Return TRUE on success. * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE. * libbfd.h: Regenerated. d389 1 a389 68 2012-11-06 Alan Modra PR binutils/14567 * opncls.c (opncls_iovec): Forward declare. (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream to new bfd. 2012-11-06 Alan Modra * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP. 2012-11-05 Alan Modra * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside loop. Really mark toc entry referring to another toc entry only if the first is used. 2012-10-29 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HA16A reloc howtos. 2012-10-26 Alan Modra PR gas/14758 * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS bfd_reloc values. Map to corresponding D-form relocs. (is_insn_ds_form, is_insn_qs_form): New functions. (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form fields using D-form reloc. 2012-10-21 Hans-Peter Nilsson * linker.c (_bfd_generic_link_output_symbols): Handle a no-longer-global symbol entered as a BFD_PLUGIN. 2012-10-08 Alan Modra PR binutils/14662 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as SEC_DEBUGGING. 2012-09-04 H.J. Lu PR binutils/14493 * elf.c (ignore_section_sym): Also ignore section symbols without a BFD section. 2012-12-21 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_standard instead of R_X86_64_max for unrecognized relocation. 2012-12-21 H.J. Lu PR ld/14980 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly adjust h->plt.refcount. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. 2012-12-20 H.J. Lu PR ld/14968 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check local IFUNC references. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. 2012-12-20 H.J. Lu PR ld/14956 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local IFUNC calls. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. d391 3 a393 2 2012-12-17 Roland McGrath Alan Modra d395 1 a395 2 * elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are not ARM ELF. d397 3 a399 1 2012-12-09 H.J. Lu d401 1 a401 3 PR binutils/14933 * archive.c (bsd_write_armap): Properly check indicies bigger than 4Gb. d403 3 a405 1 2012-11-29 Roland McGrath d407 1 a407 1 * elf-nacl.c (segment_eligible_for_headers): Disallow writable segments. d409 3 a411 1 2012-11-26 Roland McGrath d413 1 a413 1 * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null. d415 1 a415 1 2012-11-21 Roland McGrath d417 1 a417 5 * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ... (segment_eligible_for_headers): ... this. Take new arguments MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's start address doesn't leave space for the headers. (nacl_modify_segment_map): Update caller. d419 5 a423 1 2012-11-19 Joey Ye d425 1 a425 6 * elf32-arm.c (elf32_arm_final_link_relocate, case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12): Align address of the place being relocated. (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address of the place being relocated and truncate addend. (Pa): New macro. d427 2 a428 1 2012-11-14 Roland McGrath d430 1 a430 2 * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc instruction for data sandboxing. d432 2 a433 1 2012-11-13 Tristan Gingold d435 1 a435 2 * Makefile.am (RELEASE): Unset. * Makefile.in: Regenerate. d437 2 a438 1 2012-11-13 Tristan Gingold d440 1 a440 3 * configure.in: Bump version to 2.23.1 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d442 2 a443 1 2012-11-05 Andreas Krebbel d445 1 a445 4 PR target/14788 * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for local ifunc symbols. * elf64-s390.c (elf_s390_relocate_section): Likewise. d447 1 a447 1 2012-11-05 Alan Modra d449 1 a449 1 * configure.in: Apply 2012-09-10 change to config.in here. d451 1 a451 1 2012-10-29 Sean Keys d453 1 a453 2 * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for R_XGATE_16 d455 4 a458 1 2012-10-22 Tristan Gingold d460 1 a460 3 * configure.in: Bump version to 2.23.0 * Makefile.am (RELEASE): Unset. * configure, Makefile.in: Regenerate. d462 2 a463 1 2012-10-22 Tristan Gingold d465 1 a465 3 * configure.in: Bump version to 2.23 * Makefile.am (RELEASE): Set. * configure, Makefile.in: Regenerate. d467 4 a470 1 2012-10-16 Sofiane Naci d472 1 a472 31 * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2, R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC, R_AARCH64_TLSLE_ADD_TPREL_HI12. (elf64_aarch64_tlsdesc_howto_table): Fix shift value for R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1. (elf64_aarch64_final_link_relocate): Add signed_addend when resolving AARCH64_TLSLE_*_TPREL_* relocations. 2012-09-20 Walter Lee * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got relocations with value of hgot. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. 2012-09-18 H.J. Lu PR ld/14591 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. * elf32-sh-symbian.c (sh_symbian_relocate_section): Update _bfd_elf_merge_symbol call. * elflink.c (_bfd_elf_merge_symbol): Add an argument to return if the old symbol is weak. (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol call. (elf_link_add_object_symbols): Don't update symbol type from a weak definition. Update symbol type from a common symbol when overriding a weak symbol. d474 2 a475 1 2012-09-17 Walter Lee d477 1 a477 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused got_base variable. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d479 14 a492 1 2012-09-17 Walter Lee d494 1 a494 3 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation of got relocations for when .got.plt section is merged with .got. * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto. d496 2 a497 1 2012-09-13 Doug Kwan d499 1 a499 2 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted relocation for stub lookup. d501 92 a592 1 2012-09-10 Matthias Klose d594 2 a595 1 * config.in: Disable sanity check for kfreebsd. d597 2 a598 1 2012-09-07 Alan Modra d600 2 a601 3 PR ld/14464 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined by a linker script in .opd to corresponding input .opd section. d603 1 a603 1 2012-08-09 Maciej W. Rozycki d605 8 a612 12 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2): Remove macros, folding them into... (LA25_LUI_MICROMIPS): ... this new macro. (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into... (LA25_J_MICROMIPS): ... this new macro. (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise into... (LA25_ADDIU_MICROMIPS): ... this new macro. (bfd_put_micromips_32, bfd_get_micromips_32): New functions. (mips_elf_create_la25_stub): Use them. (check_br32_dslot, check_br32, check_relocated_bzc): Likewise. (_bfd_mips_elf_relax_section): Likewise. d614 49 a662 2 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is not minus one. d664 5 d670 1 a670 1 2012-08-28 Maciej W. Rozycki d672 1 a672 3 * elflink.c (_bfd_elf_merge_symbol): Also override the version a dynamic symbol defaulted to if preempted with a hidden or internal definition. d674 1 a674 3 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up the options section in the output rather than input BFD to decide if to add a DT_MIPS_OPTIONS tag. d676 2 a677 1 2012-08-13 Maciej W. Rozycki d679 1 a679 2 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into #ifdef BFD64. d681 4 a684 1 2012-08-13 Maciej W. Rozycki d686 1 a686 2 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling of protected symbols. d688 5 a692 1 2012-08-06 Maciej W. Rozycki d694 1 a694 2 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym symbols special case. d696 2 a697 3 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask field initializers throughout. * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise. d699 22 a720 1 2012-08-03 Maciej W. Rozycki d722 3 a724 2 * elfxx-mips.c (mips_elf_perform_relocation): Update the cross-mode jump message. d726 72 a797 1 2012-09-04 Sergey A. Guriev d799 1 a799 5 * cpu-ia64-opc.c (ins_cnt6a): New function. (ext_cnt6a): Ditto. (ins_strd5b): Ditto. (ext_strd5b): Ditto. (elf64_ia64_operands): Add new operand types. d801 2 a802 1 2012-08-05 Maciej W. Rozycki d804 1 a804 2 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate PLT slots for local symbols. d806 2 a807 1 2012-08-28 Matthew Gretton-Dann d809 108 a916 6 Apply from mainline 2012-08-24 Matthew Gretton-Dann * elf32-arm.c (v8): New array. (tag_cpu_arch_combine): Add support for ARMv8 attributes. (elf32_arm_merge_eabi_attributes): Likewise. (VFP_VERSION_COUNT): New define. d918 5 a922 1 2012-08-17 Nick Clifton d924 1 a924 1 * po/vi.po: Updated Vietnamese translation. d926 1 a926 10 2012-08-16 Ian Bolton Laurent Desnogues Jim MacArthur Marcus Shawcroft Nigel Stephens Ramana Radhakrishnan Richard Earnshaw Sofiane Naci Tejas Belagod Yufeng Zhang a927 23 * Makefile.am: Add AArch64 files. * Makefile.in: Regenerate. * archures.c (bfd_aarch64_arch): New declaration. (bfd_archures_list): Use bfd_archures_list. * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration. (bfd_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_process_before_allocation): New declaration. (bfd_elf64_aarch64_set_options): New declaration. (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration. (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition. (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition. (bfd_is_aarch64_special_symbol_name): New declaration. (bfd_aarch64_merge_machines): New declaration. (bfd_aarch64_update_notes): New declaration. (int bfd_aarch64_get_mach_from_notes): New declaration. (elf64_aarch64_setup_section_lists): New declaration. (elf64_aarch64_next_input_section): New declaration. (elf64_aarch64_size_stubs): New declaration. (elf64_aarch64_build_stubs): New declaration. * config.bfd: Add AArch64. * configure.in: Add AArch64. a928 8 * cpu-aarch64.c: New file. * elf-bfd.h: Add AArch64. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf64-aarch64.c: New file. * reloc.c: Add AArch64 relocations. * targets.c: Add AArch64. * po/SRC-POTFILES.in: Regenerate. d930 162 a1091 1 2012-08-14 Nick Clifton d1093 1 a1093 1 * po/uk.po: Updated Ukranian translation. d1095 2 a1096 1 2012-08-09 Nick Clifton d1098 1 a1098 1 * po/vi.po: Updated Vietnamese translation. d1100 1 a1100 1 2012-08-07 Nick Clifton d1102 1 a1102 1 * po/uk.po: Updated Ukranian translation. d1104 5 a1108 1 2012-07-30 Nick Clifton d1110 1 a1110 6 * po/bfd.pot: Updated template. * po/es.po: Updated Spanish translation. * po/fi.po: Updated Finnish translation. * po/fr.po: Updated French translation. * po/ru.po: Updated Russian translation. * po/uk.po: Updated Ukranian translation. d1112 4 a1115 1 2012-07-27 Tristan Gingold d1117 1 a1117 2 * configure.in: Bump version to 2.22.90 * configure: Regenerate. d1119 2 a1120 1 2012-07-26 Teresa Johnson d1122 1 a1122 2 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr if it is non-NULL. d1124 3 a1126 2 2012-07-26 Meador Inge Nick Clifton d1128 1 a1128 3 PR ld/14397 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error if a required section is missing from the linker script. d1130 4 a1133 4 2012-07-24 Jan Waclawek PR 13899 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call _bfd_elf_link_read_relocs with keep_memory as TRUE. d1135 3 a1137 1 2012-07-24 Teresa Johnson d1139 25 a1163 41 * bfd.c (bfd_find_nearest_line_discriminator): New macro. * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator. * coff64-rs6000.c: Likewise. * dwarf2.c (struct line_info): Add discriminator field. (add_line_info): Fill in new discriminator field. (decode_line_info): Record discriminator information instead of ignoring it. (lookup_address_in_line_info_table): Return discriminator field if requested. (comp_unit_find_nearest_line): Add discriminator argument. (find_line): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. (_bfd_dwarf2_find_line): Likewise. * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line_discriminator): Likewise. (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined. * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper that invokes _bfd_elf_find_nearest_line_discriminator with correct arguments. (_bfd_elf_find_nearest_line_discriminator): New. (_bfd_elf_find_line): Change to a wrapper that invokes _bfd_elf_find_line_discriminator with correct arguments. (_bfd_elf_find_line_discriminator): New. * coffgen.c (coff_find_nearest_line_with_names): Handle new discriminator argument. * elf32-arm.c (elf32_arm_find_nearest_line): Likewise. * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise. * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise. * mach-o.c (bfd_mach_o_find_nearest_line): Likewise. * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator argument. (_bfd_dwarf2_find_line): Likewise. (_bfd_generic_find_nearest_line_discriminator): New. * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_nearest_line_discriminator with _bfd_generic_find_nearest_line_discriminator. (bfd_target): Add _bfd_find_nearest_line_discriminator. d1165 3 a1167 1 2012-07-24 Sean Keys d1169 2 a1170 3 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code that enables the linker to offset addresses, when linking against symbols from the XGATE processor and vice versa. d1172 2 a1173 1 2012-07-23 Nick Clifton d1175 2 a1176 2 * cisco-core.c (cisco_core_file_failing_command): Make static. (cisco_core_file_failing_signal): Make static. d1178 2 a1179 1 2012-07-18 H.J. Lu d1181 4 a1184 1 * bfd-in2.h: Regenerated. d1186 1 a1186 1 2012-07-18 Nicolàs Alejandro Di Risio d1188 4 a1191 2 PR binutils/14335 * section.c: Fix a typo in comments. d1193 1 a1193 1 2012-07-13 Andreas Krebbel d1195 7 a1201 266 * elf64-s390.c: Include elf-s390-common.c. (R_390_IRELATIVE): New reloc. (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE. (RELA_ENTRY_SIZE): New macro. (elf_s390_link_hash_entry): New fields ifunc_resolver_address and *ifunc_resolver_section. (struct plt_entry): New struct. (struct elf_s390_obj_tdata): New field local_plt. (elf_s390_local_plt): New macro. (struct elf_s390_link_hash_table): New field irelifunc. (ELF64): New macro. (link_hash_newfunc): Initialize new fields. (elf_s390_check_relocs): Handle IFUNC symbols. (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC symbols. (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for IFUNC symbols. (elf_s390_size_dynamic_sections): Handle IFUNC symbols. (elf_s390_relocate_section): Likewise. (elf_s390_finish_dynamic_symbol): Likewise. (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols. (elf_s390_finish_ifunc_symbol): New function. (elf_s390_gc_sweep_hook): Handle local plt entries. (elf_backend_add_symbol_hook): Define. * elf32-s390.c: See elf64-s390.c changes. * elf-s390-common.c: New file. * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field. * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for BFD_RELOC_390_IRELATIVE. * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation. 2012-07-13 Nick Clifton * aix386-core.c: Remove use of PTR and PARAMS macros. * archive.c: Likewise. * cache.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-apollo.c: Likewise. * coff-aux.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-m68k.c: Likewise. * coff-m88k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-sparc.c: Likewise. * coff-stgo32.c: Likewise. * coff-tic30.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff-w65.c: Likewise. * cofflink.c: Likewise. * cpu-arc.c: Likewise. * cpu-cris.c: Likewise. * cpu-h8500.c: Likewise. * cpu-i960.c: Likewise. * cpu-msp430.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-w65.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-m10200.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-h8300.c: Likewise. * elf32-i960.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-vax.c: Likewise. * elf64-alpha.c: Likewise. * elf64-mmix.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386dynix.c: Likewise. * i386linux.c: Likewise. * i386lynx.c: Likewise. * i386mach3.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.h: Likewise. * mipsbsd.c: Likewise. * netbsd-core.c: Likewise. * nlm32-i386.c: Likewise. * osf-core.c: Likewise. * pc532-mach.c: Likewise. * pef.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * reloc16.c: Likewise. * sco5-core.c: Likewise. * som.h: Likewise. * sparclinux.c: Likewise. * sparclynx.c: Likewise. * ticoff.h: Likewise. * trad-core.c: Likewise. * vms-lib.c: Likewise. * xsym.h: Likewise. 2012-07-09 Alan Modra PR ld/14323 * elflink.c (elf_sort_symbol): Sort by size too. (elf_link_add_object_symbols ): Simplify binary search. Do not depend on ordering of symbol aliases. Match largest size. 2012-07-03 H.J. Lu * elf.c (assign_section_numbers): Check if number of sections >= SHN_LORESERVE. * elfcode.h (elf_object_p): Likewise. 2012-07-03 Nick Clifton * archive.c (bsd_write_armap): Catch attempts to create an archive with indicies bigger than 4Gb. (coff_write_armap): Likewise. 2012-07-03 H.J. Lu PR binutils/14319 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty debug section. 2012-07-03 H.J. Lu PR ld/3351 * elflink.c (_bfd_elf_update_dynamic_flags): New. (_bfd_elf_merge_symbol): Update both real and indirect symbol dynamic flags. (_bfd_elf_add_default_symbol): Make the real symbol dynamic if the indirect symbol is defined in a shared library. (elf_link_add_object_symbols): Likewise. If the indirect symbol has been forced local, don't make the real symbol dynamic. (elf_link_check_versioned_symbol): Check indirect symbol. (elf_link_output_extsym): Use real symbol definition when reporting indirect symbol error. Check version info for dynamic versioned symbol. 2012-07-03 Alan Modra PR ld/14207 * elf.c (assign_file_positions_for_load_sections): Remove assertions that only PT_LOAD headers include file header and section headers. (assign_file_positions_for_non_load_sections): Similarly don't assert PT_GNU_RELRO header does not include file and section headers. Compare first section vma rather than PT_LOAD p_vaddr against relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace abort with assertion. 2012-07-02 Alan Modra * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section "anyway" variant when creating .plt. (m32c_elf_relax_plt_section): Remove redundant test and unused param. (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling m32c_elf_relax_plt_section. * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant when creating .got and .got.plt. (_bfd_mips_elf_final_link): Likewise for .rtproc, and use bfd_get_linker_section. * sunos.c: Similarly throughout. 2012-07-01 Andreas Schwab * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error message. 2012-06-29 H.J. Lu * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE on unresolvable relocation. 2012-06-29 H.J. Lu * archive.c (_bfd_compute_and_write_armap): Simplify global symbol handling. 2012-06-29 Nick Clifton PR ld/14189 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount for locally bound symbols. 2012-06-29 Alan Modra * section.c (bfd_get_linker_section): New function. * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use the above throughout rather than bfd_get_section_by_name. Use bfd_make_section_anyway rather than bfd_make_section when creating them. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cris.c: Likewise. * elf32-frv.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68k.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-vax.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elflink.c: Likewise. * elf-vxworks.c: Likewise. * elf-m10300.c: Likewise. Also make use of htab plt, got and gotplt shortcuts. * bfd-in2.h: Regenerate. * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when calling create_rofixup_section. * elflink.c (bfd_elf_final_link): Simplify test for .dynstr. d1203 1 a1203 1 2012-06-29 Alan Modra d1205 4 a1208 7 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela section for bss type sections, except for .rela.bss. * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise. d1210 1 a1210 1 2012-06-28 Roland McGrath d1212 3 a1214 2 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for displacement calculation in nacl_p case. d1216 1 a1216 1 2012-06-28 Nick Clifton a1217 2 * po/uk.po: New Ukranian translation. * configure.in (ALL_LINGUAS): Add uk. d1220 18 a1237 1 2012-06-26 Alan Modra d1239 1 a1239 3 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input file has multiple .got/.toc sections and all don't fit in current toc group. d1241 1 a1241 1 2012-06-22 Roland McGrath d1243 5 a1247 3 * elf.c (assign_file_positions_for_non_load_sections): Define __ehdr_start symbol if it's referenced and there's a PT_LOAD segment that covers both the file and program headers. d1249 2 a1250 1 2012-06-22 Andreas Schwab d1252 79 a1330 2 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute. d1332 1 a1332 1 2012-06-22 Alan Modra d1334 2 a1335 2 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line save/restore functions when relocatable. Make "funcs" static. d1337 1 a1337 1 2012-06-18 Hans-Peter Nilsson d1339 4 a1342 2 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence of merged .got and .got.plt entries. d1344 1 a1344 1 2012-06-18 John Szakmeister d1346 3 a1348 1 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value. d1350 1 a1350 1 2012-06-17 Hans-Peter Nilsson d1352 4 a1355 3 * elf32-cris.c (cris_elf_relocate_section): : Handle references to thread common symbols. d1357 1 a1357 1 2012-06-13 Nick Clifton d1359 2 a1360 4 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function. (elf32_arm_object_p): If the machine number could not be deduced from the notes, call bfd_arm_get_mach_from_attributes to get the number from the attributes. d1362 1 a1362 1 2012-06-12 H.J. Lu d1364 3 a1366 3 PR bfd/14207 * elf.c (assign_file_positions_for_non_load_sections): Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment. d1368 1 a1368 1 2012-06-12 Alan Modra d1370 3 a1372 4 PR ld/14207 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type sections at end of PT_LOAD segment when searching for segment that contains end of relro extent. d1374 1 a1374 1 2012-06-11 H.J. Lu d1376 6 a1381 1 * elf.c (assign_file_positions_for_non_load_sections): Reindent. d1383 1 a1383 1 2012-06-11 H.J. Lu d1385 2 a1386 1 * elf.c (_bfd_elf_map_sections_to_segments): Reindent. d1388 1 a1388 1 2012-06-06 Alan Modra d1390 5 a1394 8 * elflink.c (elf_link_input_bfd): Provide a file symbol for each input file with local syms, if the input lacks such. (bfd_elf_final_link): Add a file symbol to mark end of locals for which we can associate with input files. (struct elf_final_link_info): Add filesym_count field. (struct elf_outext_info): Add need_second_pass and second_pass. (elf_link_output_extsym): Detect symbols defined in the output file, emit them on second pass over locals. d1396 1 a1396 1 2012-06-04 Jan Kratochvil d1398 6 a1403 22 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as bfd_size_type. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. 2012-06-03 Alan Modra PR binutils/13897 * elf.c (elf_find_function): Cache last function sym info. (_bfd_elf_maybe_function_sym): Return function size, pass in section of interest. * elf-bfd.h (struct elf_backend_data ): Likewise. (_bfd_elf_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. (opd_entry_value): Add in_code_sec param. Revert caching code. Return -1 if in_code_sec and function found in wrong section. Update all calls. d1405 1 a1405 1 2012-06-01 Siddhesh Poyarekar d1407 2 a1408 28 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. * bfd-in2.h: Regenerate. * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN argument of target_read_memory as size_t. (_bfd_elf32_bfd_from_remote_memory): Likewise. (_bfd_elf64_bfd_from_remote_memory): Likewise. * elf.c (bfd_elf_bfd_from_remote_memory): Likewise. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise. 2012-06-01 Alan Modra PR binutils/13897 * elf64-ppc.c (opd_entry_value): Rewrite cache code. 2012-05-29 Tom Tromey * opncls.c (bfd_fopen): Always close fd on failure. (bfd_fdopenr): Likewise. 2012-05-27 Alan Modra PR ld/14170 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in a dynamic library finds a new instance with non-default visibility in a regular object, correctly handle symbols already on the undefs list and undo dynamic symbol state when the new symbol is hidden or internal. d1410 1 a1410 1 2012-05-25 H.J. Lu d1412 1 a1412 82 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use dynamic_sec_flags to create PLT .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-25 Alan Modra PR ld/13909 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here. * elf-bfd.h (_bfd_elf_eh_frame_present): Declare. * elflink.c (bfd_elf_size_dynamic_sections): Let the backend size dynamic sections before stripping eh_frame_hdr. (bfd_elf_gc_sections): Handle multiple .eh_frame sections. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame if no other .eh_frame sections exist. * elf64-ppc.c (ppc64_elf_size_stubs): Likewise. * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_i386_size_dynamic_sections): ..do it here instead. Don't specially keep sgotplt, iplt, tgotplt, sdynbss for symbols. (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size or alloc plt_eh_frame here.. (elf_x86_64_size_dynamic_sections): ..do it here instead. (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents before writing plt offset. 2012-05-24 Alan Modra PR ld/14158 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame size to output section alignment. (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover. 2012-05-23 Alan Modra * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle BFDs with multiple .eh_frame sections. 2012-05-23 Alan Modra PR ld/13909 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs. 2012-05-22 H.J. Lu PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the last change. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 Alan Modra * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if first one is zero size or discarded. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of glink_eh_frame contents here.. (ppc_elf_finish_dynamic_sections): ..rather than here. Just set offset to .glink. 2012-05-22 H.J. Lu PR ld/13909 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT eh_frame section if there is an input .eh_frame section. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 H.J. Lu PR ld/14105 * elf32-i386.c (elf_i386_create_dynamic_sections): Always create PLT eh_frame section with SEC_LINKER_CREATED. * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise. 2012-05-22 Alan Modra * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame sections attached to a BFD. * section.c (bfd_get_section_by_name): Rewrite description. (bfd_get_next_section_by_name): New function. * bfd-in2.h: Regenerate. d1414 1 a1414 1 2012-05-21 Andreas Schwab d1416 2 a1417 4 * elf32-m68k.c (elf_m68k_grok_prstatus): New function. (elf_m68k_grok_psinfo): New function. (elf_backend_grok_prstatus): Define. (elf_backend_grok_psinfo): Define. d1419 1 a1419 1 2012-05-19 Maciej W. Rozycki d1421 2 a1422 3 * elf64-mips.c (elf_backend_got_header_size): Correct definition. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF backend's GOT header size instead of hardcoding it. d1424 1 a1424 1 2012-05-19 Maciej W. Rozycki d1426 2 a1427 2 * elf32-vax.c (elf_vax_relocate_section) : Don't check if info->shared again. d1429 1 a1429 1 2012-05-19 Maciej W. Rozycki d1431 3 a1433 3 * elf32-vax.c (elf_vax_relocate_section) : Use section flags rather than its name as the check for text sections. d1435 1 a1435 1 2012-05-19 Maciej W. Rozycki d1437 1 a1437 2 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure the third reloc offset is the same as the first. d1439 1 a1439 1 2012-05-19 Alan Modra d1441 1 a1441 5 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete. (has_tls_reloc, has_tls_get_addr_call): Move back to.. * elf32-ppc.c: ..here. (ppc_elf_section_flags, elf_backend_section_flags): Delete. (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections. d1443 1 a1443 1 2012-05-18 H.J. Lu d1445 2 a1446 3 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. d1448 1 a1448 1 2012-05-18 Roland McGrath d1450 9 a1458 2 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as not to clobber the ar_fmag field stored in ARED->arch_header. d1460 1 a1460 1 2012-05-18 Pedro Alves d1462 12 a1473 1 * mach-o.h: Don't include sysdep.h. d1475 2 a1476 1 2012-05-18 Nick Clifton d1478 33 a1510 3 PR 14072 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before complaining about config.h not having been included. d1513 1 a1513 1 2012-05-18 Andreas Schwab d1515 40 a1554 2 * aclocal.m4: Regenerate. * Makefile.in: Regenerate. d1556 1 a1556 2 2012-05-17 Daniel Richard G. Nick Clifton d1558 5 a1562 15 PR 14072 * configure.in: Add check that sysdep.h has been included before any system header files. * configure: Regenerate. * config.in: Regenerate. * aclocal.m4: Regenerate. * bfd-in.h: Generate an error if included before config.h. * sysdep.h: Likewise. * bfd-in2.h: Regenerate. * compress.c: Remove #include "config.h". * plugin.c: Likewise. * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * xsymc.c: Likewise. d1564 1 a1564 2 2012-05-17 Maciej W. Rozycki Alan Modra d1566 3 a1568 38 * elf.c (ignore_section_sym): Correct comment. Don't return true for absolute section. (elf_map_symbols): Move stray comment. Adjust for above change. Don't discard global section symbols. 2012-05-17 Alan Modra * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC, _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute. * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC absolute. 2012-05-17 Alan Modra * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns, is_ppc_vle): Move to.. * elf32-ppc.h: ..here, making is_ppc_vle a macro. 2012-05-16 Sergio Durigan Junior * bfd-in.h (bfd_get_section_name, bfd_get_section_vma, bfd_get_section_lma, bfd_get_section_alignment, bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros in order to use the `bfd' argument. * bfd-in2.h: Regenerate. * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd' as the first argument for `bfd_get_section_alignment'. * elf32-arm.c (create_ifunc_sections): Likewise, for `bfd_set_section_alignment'. * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for `bfd_get_section_name'. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. (ppc_elf_relocate_section): Likewise. * elf64-mmix.c (mmix_final_link_relocate): Likewise, for `bfd_get_section_vma'. * elf64-ppc.c (create_linkage_sections): Likewise, for `bfd_set_section_alignment'. d1570 4 a1573 1 2012-05-16 Georg-Johann Lay d1575 4 a1578 84 PR target/13503 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to R_AVR_8_HLO8. (avr_reloc_map): Likewise. 2012-05-16 Daniel Richard G. PR binutils/13558 * bfd/aout-cris.c: Include sysdep.h before bfd.h. * bfd/aout-ns32k.c: Likewise. * bfd/aout-sparcle.c: Likewise. * bfd/aout0.c: Likewise. * bfd/bfd-in2.h: Likewise. * bfd/coff-stgo32.c: Likewise. * bfd/cpu-lm32.c: Likewise. * bfd/cpu-microblaze.c: Likewise. * bfd/cpu-score.c: Likewise. * bfd/cpu-tilegx.c: Likewise. * bfd/cpu-tilepro.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/mach-o.h: Likewise. * bfd/nlm32-ppc.c: Likewise. * bfd/ns32knetbsd.c: Likewise. * bfd/pef.h: Likewise. * bfd/plugin.c: Likewise. * bfd/stab-syms.c: Likewise. * bfd/sunos.c: Likewise. * bfd/syms.c: Likewise. * bfd/xsym.h: Likewise. 2012-05-16 Alan Modra * elflink.c: Rename flaginfo to flinfo throughout, except.. (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo. Formatting, style. Simplify flag match. 2012-05-16 Alan Modra * dwarf2.c: Formatting. (arange_add): Pass in unit rather than bfd. Update callers. Ignore empty ranges. Don't ask for cleared memory. (parse_comp_unit): Only set unit->base_address if processing DW_TAG_compile_unit. (find_debug_info): Optimise section lookup. (place_sections): Use bfd_alloc for stash->adjusted_sections. (find_line): Match previously parsed comp unit addresses as we do for newly parsed comp units. 2012-05-16 Alan Modra * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf stops at end of ar_size field. 2012-05-16 Alan Modra PR ld/13962 PR ld/7023 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is out of range. As a special case, fix sh_info for zero sh_size. Do the same for .symtab. 2012-05-15 James Murray Stephane Carrez * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg. * config.bfd: Likewise. * cpu-m9s12x.c: New. * cpu-m9s12xg.c: New. * elf32-m68hc12.c: Add S12X and XGATE co-processor support. Add option to offset S12 addresses into XGATE memory space. Fix carry bug in IMM16 (IMM8 low/high) relocate. * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg. (ALL_MACHINES_CFILES): Likewise. * reloc.c: Add S12X relocs. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d1580 1 a1580 2 2012-05-14 James Lemke Catherine Moore d1582 2 a1583 17 * bfd.c (bfd_lookup_section_flags): Add section parm. * ecoff.c (bfd_debug_section): Remove flag_info initializer. * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info. (bfd_elf_lookup_section_flags): Add section parm. * elf32-ppc.c (is_ppc_vle): New function. (ppc_elf_modify_segment_map): New function. (elf_backend_modify_segment_map): Define. (has_vle_insns): New define. * elf32-ppc.h (ppc_elf_modify_segment_map): Declare. * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm. Move in logic to omit / include a section. * libbfd-in.h (bfd_link_info): Add section parm. (bfd_generic_lookup_section_flags): Likewise. * reloc.c (bfd_generic_lookup_section_flags): Likewise. * section.c (bfd_section): Move out section_flag_info. (BFD_FAKE_SECTION): Remove flag_info initializer. * targets.c (_bfd_lookup_section_flags): Add section parm. d1585 1 a1585 1 2012-05-14 Catherine Moore d1587 1 a1587 38 * archures.c (bfd_mach_ppc_vle): New. * bfd-in2.h: Regenerated. * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle. * elf32-ppc.c (split16_format_type): New enumeration. (ppc_elf_vle_split16): New function. (HOWTO): Add entries for R_PPC_VLE relocations. (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations. (ppc_elf_section_flags): New function. (ppc_elf_lookup_section_flags): New function. (ppc_elf_section_processing): New function. (ppc_elf_check_relocs): Handle PPC_VLE relocations. (ppc_elf_relocation_section): Likewise. (elf_backend_lookup_section_flags_hook): Define. (elf_backend_section_flags): Define. (elf_backend_section_processing): Define. * elf32-ppc.h (ppc_elf_section_processing): Declare. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15, BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A, BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A, BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A, BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21, BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A, BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A, BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations. 2012-05-11 Georg-Johann Lay PR target/13503 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI. * bfd-in2.h: Regenerate. * libbfd.h: Regenrate. * elf32-avr.c (elf_avr_howto_table): Add entries for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8. d1589 1 a1589 1 2012-05-10 H.J. Lu d1591 2 a1592 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32 addend overflow check. d1594 1 a1594 1 2012-05-10 DJ Delorie d1596 2 a1597 1 * elf32-rx.c (rx_elf_object_p): Ignore empty segments. d1599 1 a1599 1 2012-05-10 H.J. Lu d1601 4 a1604 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed hex number in x32 addend overflow check. d1606 1 a1606 1 2012-05-10 H.J. Lu d1608 3 a1610 2 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle R_X86_64_RELATIVE64. d1612 1 a1612 1 2012-05-09 H.J. Lu d1614 1 a1614 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend overflow for R_X86_64_RELATIVE64. d1616 1 a1616 1 2012-05-08 Ben Cheng d1618 13 a1630 2 * elf.c: Preserve the original p_align and p_flags if they are valid. d1632 1 a1632 1 2012-05-07 Alan Modra d1634 2 a1635 2 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update RELOC_AGAINST_DISCARDED_SECTION invocation. d1637 1 a1637 1 2012-05-07 Hans-Peter Nilsson d1639 2 a1640 2 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use local variable i_ instead of assuming and using a variable i. d1642 1 a1642 1 2012-05-07 Maciej W. Rozycki d1644 29 a1672 28 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound relocations. * elfxx-mips.c (mips_reloc_against_discarded_section): New function. (_bfd_mips_elf_relocate_section): Call it, in place of RELOC_AGAINST_DISCARDED_SECTION. * elf-m10200.c (mn10200_elf_relocate_section): Update arguments to RELOC_AGAINST_DISCARDED_SECTION. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. d1674 9 a1682 2 * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. d1684 6 a1689 9 * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. d1691 8 a1698 4 * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. d1700 4 a1703 4 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. d1705 245 a1949 13 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. d1951 1 a1951 1 2012-05-05 Alan Modra d1953 28 a1980 3 PR ld/14052 PR ld/13621 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change. d1982 1 a1982 1 2012-05-05 Alan Modra d1984 60 a2043 22 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section and bfd_ind_section with their _ptr variants, or use corresponding bfd_is_* macros. * aout-ns32k.c: Likewise. * aout-tic30.c: Likewise. * coff-arm.c: Likewise. * coff-tic54x.c: Likewise. * cpu-ns32k.c: Likewise. * elf-attrs.c: Likewise. * elfcode.h: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * riscix.c: Likewise. * versados.c: Likewise. * section.c: Likewise. (bfd_abs_section, bfd_ind_section, bfd_com_section, bfd_ind_section): Delete. (std_section): New array replacing above. (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr, bfd_ind_section_ptr, STD_SECTION): Update. (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts. * bfd-in2.h: Regenerate. d2045 100 a2144 1 2012-05-03 Sean Keys d2146 2 a2147 100 * cpu-xgate.c: New file. Added XGATE support. * archures.c (bfd_architecture): Add XGATE architecture. (bfd_archures_list): Add reference to XGATE architecture info. * elf-bfd.h (prep_headers): Handle bfd_arch_xgate. * reloc.c: Add various XGATE relocation enums. * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector list. * Makefile.am: Add support for XGATE elf. * configure.in: Ditto. * config.bfd: Ditto. * Makefile.in: Regenerate. * configure: Ditto. * bfd-in2.h: Ditto. * libbfd.h: Ditto. Added files for XGATE relocations. * elf32-xgate.c: Created minimal relocation file. * elf32-xgate.h: Created minimal header file for elf32-xgate. 2012-05-03 Tristan Gingold * dwarf2.c (decode_line_info): Ignore DW_LNE_HP_source_file_correlation. 2012-05-01 Nick Clifton PR binutils/13121 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. * coff-ppc.c: Likewise. * cofflink.c: Likewise. * elf32-arm.c: Likewise. * elf64-sparc.c: Likewise. * elflink.c: Likewise. * pdp11.c: Likewise. * rescoff.c: Likewise. 2012-04-26 Mark Wielaard * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc possibly being relative to DW_AT_low_pc. (parse_comp_unit): Likewise. 2012-04-26 Andreas Schwab * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references also when generating PIE. (elf_m68k_discard_copies): Mark undefined weak symbols referenced by relocations as dynamic. 2012-04-26 Hans-Peter Nilsson Provide a way for programs to recognize BFD_ASSERT calls. * bfd.c (bfd_assert_handler_type): New API type. (bfd_set_assert_handler, bfd_get_assert_handler): New API functions. (_bfd_assert_handler): New variable. (_bfd_default_assert_handler): New function. (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler. * libbfd-in.h (_bfd_assert_handler): Declare. * libbfd.h, bfd-in2.h: Regenerate. 2012-04-24 Hans-Peter Nilsson PR ld/13990 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local symbol, where PLT refcount is set to -1. 2012-04-24 Alan Modra PR ld/13991 * elf-bfd.h (_bfd_elf_link_just_syms): Define as _bfd_generic_link_just_syms. * elflink.c (_bfd_elf_link_just_syms): Delete. * linker.c (_bfd_generic_link_just_syms): Set sec_info_type. * bfd-in.h (discarded_section): Renamed from elf_discarded_section. * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c, * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * reloc.c: Update all references. * bfd-in2.h: Regenerate. d2149 6 a2154 1 2012-04-20 Andreas Krebbel d2156 1 a2156 2 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default. d2158 2 a2159 1 2012-04-19 Thomas Schwinge d2161 1 a2161 4 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for got_type. (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use it. d2163 4 a2166 1 2012-04-17 Kaz Kojima d2168 1 a2168 2 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic relocations when LE conversion happens on the IE tls symbol. d2170 2 a2171 1 2012-04-17 Roland McGrath d2173 1 a2173 2 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding so that 32-byte boundary is a proper instruction boundary. d2175 3 a2177 1 2012-04-17 Tristan Gingold d2179 1 a2179 2 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to member of an object archive.< d2181 7 a2187 1 2012-04-17 Tristan Gingold d2189 1 a2189 6 * vms-lib.c (MAX_EKEYLEN): Define. (MAX_KEYLEN): Fix value. (vms_write_index): Add comments and fix indentation. Adjust comparaison. Add assertions. Free kbn_blk. (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN. Compense MAX_KEYLEN adjustment. d2191 3 a2193 1 2012-04-16 Maciej W. Rozycki d2195 1 a2195 2 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs. (_bfd_mips_elf_check_relocs): Update accordingly. d2197 3 a2199 1 2012-04-13 Alan Modra d2201 3 a2203 3 PR ld/13947 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for reloc sections. d2205 1 a2205 1 2012-04-12 David S. Miller d2207 5 a2211 11 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32, BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function. (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34, R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10. (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs. (_bfd_sparc_elf_check_relocs): Likewise. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. d2213 1 a2213 1 2012-04-12 Roland McGrath d2215 3 a2217 23 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry): New variables. (struct elf32_arm_link_hash_table): New member `nacl_p'. (elf32_arm_link_hash_table_create): Initialize it. (elf32_arm_nacl_link_hash_table_create): New function. (arm_movw_immediate, arm_movt_immediate): New functions. (elf32_arm_populate_plt_entry): Test HTAB->nacl_p. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_plt_map_1): Likewise. (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec): New backend vector stanza. (elf32_arm_nacl_modify_segment_map): New function. * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*. * targets.c: Support bfd_elf32_{big,little}_nacl_vec. * configure.in: Likewise. (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here. (bfd_elf32_littlearm_nacl_vec): Likewise. (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise. (bfd_elf32_bigarm_symbian_vec): Likewise. (bfd_elf32_littlearm_symbian_vec): Likewise. (bfd_elf32_bigarm_vxworks_vec): Likewise. (bfd_elf32_littlearm_vxworks_vec): Likewise. * configure: Regenerated. d2219 1 a2219 1 2012-04-12 Tristan Gingold d2221 7 a2227 13 * elflink.c (elf_link_output_extsym): Add a guard. (bfd_elf_final_link): Remove assertion. (bfd_elf_final_link): Add a guard. * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed. (elfNN_vms_section_from_shdr, elfNN_vms_object_p) (elfNN_vms_post_process_headers, elfNN_vms_section_processing) (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup): Remove. (elfNN-ia64-vms target): Move to ... * elf64-ia64-vms.c: New file. * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo. (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c. d2229 2 d2232 35 d2268 1 a2268 1 2012-04-11 Nick Clifton d2270 85 a2354 33 PR binutils/13897 * elf64-ppc.c (opd_entry_value): When dealing with sections without relocs, keep the last section loaded in order to avoid unnecessary reloads. 2012-04-09 Roland McGrath * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs. * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs. (nacl_modify_program_headers): Likewise. 2012-04-03 Roland McGrath * elf-nacl.c: New file. * elf-nacl.h: New file. * elf32-i386.c (elf_backend_modify_segment_map): Define for bfd_elf32_i386_nacl_vec. (elf_backend_modify_program_headers): Likewise. * elf64-x86-64.c (elf_backend_modify_segment_map): Define for bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec. (elf_backend_modify_program_headers): Likewise. * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here. (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here. * Makefile.in: Regenerated. * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here. (bfd_elf32_x86_64_nacl_vec): Likewise. (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise. (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise. (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise. (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise. (bfd_elf32_i386_nacl_vec): Likewise. (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise. (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise. d2356 84 d2441 1 a2441 1 2012-03-31 Andreas Schwab d2443 1 a2443 2 * elf32-m68k.c (elf_m68k_relocate_section): Allow R_68K_TLS_LE{8,16,32} for PIE. d2445 1 a2445 1 2012-03-30 Andreas Krebbel d2447 104 a2550 3 * elf64-s390.c: Fix several comments regarding PLT entry description. * elf32-s390.c: Likewise. d2552 2 a2553 1 2012-03-30 Andreas Krebbel d2555 3 a2557 4 * elf64-s390.c: Use the section pointer shortcuts in elf_link_hash_table and remove them from the target specific variant. * elf32-s390.c: Likewise. d2559 10 a2568 1 2012-03-30 Andreas Krebbel d2570 1 a2570 10 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry): New definitions. (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove. (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32. (elf_s390_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry) (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry) (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions. (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*) (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove. d2572 2 a2573 1 2012-03-30 Andreas Krebbel d2575 1 a2575 3 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove. Rename all occurrences in the file to elf_dyn_relocs. * elf64-s390.c: Likewise. d2577 2 a2578 1 2012-03-30 Alan Modra d2580 1 a2580 2 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic libraries. d2582 1 a2582 1 2012-03-29 Alan Modra d2584 42 a2625 1 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete. d2627 21 d2649 1 a2649 1 2012-03-23 Alan Modra d2651 2 a2652 2 * elf.c (assign_file_positions_for_non_load_sections): Don't warn on empty alloc sections. d2654 1 a2654 1 2012-03-23 Alan Modra d2656 2 a2657 32 * linker.c (_bfd_nearby_section): New function, split out from.. (fix_syms): ..here. * bfd-in.h (_bfd_nearby_section): Declare. * bfd-in2.h: Regenerate. * elflink.c (elf_link_input_bfd): Don't use text_index_section or data_index_section with ld -q or ld -r output relocs against stripped output sections. Instead use _bfd_nearby_section. 2012-03-23 Alan Modra PR binutils/13894 * elf64-ppc.c (opd_entry_value): Read full symbol table when sym hashes unavailable. 2012-03-21 Eliot Dresselhaus * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE for non-C6X objects. 2012-03-20 Kai Tietz PR ld/12742 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h. * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined. Add windows.h header include if HAVE_WINDOWS_H is defined. (dlerror): New static function if windows variant is used instead of dlfcn.h. (dlclose): Likewise. (dlopen): Likewise. (dlsym): Likewise. * configure: Regenerated. * config.in: Regenerated. d2659 1 a2659 1 2012-03-20 H.J. Lu d2661 12 a2672 17 PR ld/13880 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error for R_386_GOTOFF relocation against protected function if SYMBOLIC_BIND is true. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an error for R_X86_64_GOTOFF64 relocation against protected function when building executable or SYMBOLIC_BIND is true. 2012-03-16 Roland McGrath * config.bfd: Handle x86_64-*-nacl*. * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza. (bfd_elf32_x86_64_nacl_vec): Likewise. * targets.c: Support them. * configure.in: Likewise. * configure: Regenerated. d2674 1 a2674 1 2012-03-16 Matthew Gretton-Dann d2676 1 a2676 52 * elf32-arm.c (elf32_arm_attributes_accept_div): New function. (elf32_arm_attributes_forbid_div): Likewise. (elf32_arm_merge_eabi_attributes): Correct handling of Tag_DIV_use. 2012-03-15 Roland McGrath * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use elf_x86_64_backend_data parameters for plt_eh_frame. * elf64-x86-64.c (struct elf_x86_64_backend_data): New type. (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros. (elf_x86_64_arch_bed): New variable. (elf_backend_arch_data): New macro. (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_plt_sym_val): Likewise. (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data parameters for PLT details. (elf_x86_64_finish_dynamic_sections): Likewise. 2012-03-14 Roland McGrath * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up to the full size, padding out with nop instructions. 2012-03-12 Alan Modra * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn on zero size dynbss symbol. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise. d2678 1 a2678 1 2012-03-10 Edmar Wienskoski d2680 3 a2682 1 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. a2683 2 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500. d2685 1 a2685 1 2012-03-09 H.J. Lu d2687 2 a2688 3 PR ld/13817 * elf32-i386.c (elf_i386_relocate_section): Restore R_386_IRELATIVE. d2690 1 a2690 2 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore R_X86_64_IRELATIVE. d2692 3 a2694 1 2012-03-08 Tristan Gingold d2696 1 a2696 3 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum keylen according to archive kind. Set nextvbn and nextrfa lhd fields. Add comments. d2698 28 a2725 1 2012-03-07 Nick Clifton d2727 62 a2788 30 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type field. (elf32_mn10300_link_hash_table): Add tls_ldm_got entry; (elf_mn10300_tdata): Define. (elf_mn10300_local_got_tls_type): Define. (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD, R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE, R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD, R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs. (mn10300_reloc_map): Likewise. (elf_mn10300_tls_transition): New function. (dtpoff, tpoff, mn10300_do_tls_transition): New functions. (mn10300_elf_check_relocs): Add TLS support. (mn10300_elf_final_link_relocate): Likewise. (mn10300_elf_relocate_section): Likewise. (mn10300_elf_relax_section): Likewise. (elf32_mn10300_link_hash_newfunc): Initialise new field. (_bfd_mn10300_copy_indirect_symbol): New function. (elf32_mn10300_link_hash_table_create): Initialise new fields. (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support. (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise. (_bfd_mn10300_elf_reloc_type_class): Allocate an elf_mn10300_obj_tdata structure. (elf_backend_copy_indirect_symbol): Define. * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD, BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE, BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD, BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations. (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to alongside other MN10300 relocations. d2792 45 a2836 1 2012-03-06 Jakub Jelinek d2838 1 a2838 2 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE set relocate to TRUE. d2840 4 a2843 1 2012-03-05 Rainer Orth d2845 78 a2922 70 PR ld/12152 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore overflows for R_SPARC_UA32 in .stab sections. 2012-03-01 Alan Modra * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning. 2012-02-27 Alan Modra * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd before calling elf specific function. (sh_elf_osec_readonly_p): Test for error return from above. 2012-02-27 Alan Modra * elf32-spu.c (build_stub): Fix malloc under-allocation. 2012-02-25 Walter Lee * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL, BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE, BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD, BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD. Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD, BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE, BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE, BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE. * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro d2924 11 a2934 65 (tilepro_reloc_map): Ditto. (tilepro_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilepro_tls_translate_to_le): New. (tilepro_tls_translate_to_ie): New. (tilepro_elf_tls_transition): New. (tilepro_elf_check_relocs): Handle new tls relocations. (tilepro_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilepro_elf_relocate_section): Ditto. (tilepro_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New (insn_mask_X1_no_dest_no_srca): New (insn_mask_Y0_no_dest_no_srca): New (insn_mask_Y1_no_dest_no_srca): New (srca_mask_X0): New (srca_mask_X1): New (insn_tls_le_move_X1): New (insn_tls_le_move_zero_X0X1): New (insn_tls_ie_lw_X1): New (insn_tls_ie_add_X0X1): New (insn_tls_ie_add_Y0Y1): New (insn_tls_gd_add_X0X1): New (insn_tls_gd_add_Y0Y1): New * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx relocations. (tilegx_reloc_map): Ditto. (tilegx_info_to_howto_rela): Ditto. (reloc_to_create_func): Ditto. (tilegx_elf_link_hash_table): New field disable_le_transition. (tilegx_tls_translate_to_le): New. (tilegx_tls_translate_to_ie): New. (tilegx_elf_tls_transition): New. (tilegx_elf_check_relocs): Handle new tls relocations. (tilegx_elf_gc_sweep_hook): Ditto. (allocate_dynrelocs): Ditto. (tilegx_elf_relocate_section): Ditto. (tilegx_copy_bits): New. (tilegx_replace_insn): New. (insn_mask_X1): New. (insn_mask_X0_no_dest_no_srca): New. (insn_mask_X1_no_dest_no_srca): New. (insn_mask_Y0_no_dest_no_srca): New. (insn_mask_Y1_no_dest_no_srca): New. (insn_mask_X0_no_operand): New. (insn_mask_X1_no_operand): New. (insn_mask_Y0_no_operand): New. (insn_mask_Y1_no_operand): New. (insn_tls_ie_ld_X1): New. (insn_tls_ie_ld4s_X1): New. (insn_tls_ie_add_X0X1): New. (insn_tls_ie_add_Y0Y1): New. (insn_tls_ie_addx_X0X1): New. (insn_tls_ie_addx_Y0Y1): New. (insn_tls_gd_add_X0X1): New. (insn_tls_gd_add_Y0Y1): New. (insn_move_X0X1): New. (insn_move_Y0Y1): New. (insn_add_X0X1): New. (insn_add_Y0Y1): New. (insn_addx_X0X1): New. (insn_addx_Y0Y1): New. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. d2936 4 a2939 1 2012-02-25 Walter Lee d2941 4 a2944 29 * config.bfd (tilegx-*-*): rename little endian vector; add big endian vector. (tilegxbe-*-*): New case. * configure.in (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): New vector. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): New vector. * configure: Regenerate. * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename. (TARGET_LITTLE_NAME): Ditto. (TARGET_BIG_SYM): Define. (TARGET_BIG_NAME): Define. * targets.c (bfd_elf32_tilegx_vec): Rename... (bfd_elf32_tilegx_le_vec): ... to this. (bfd_elf32_tilegx_be_vec): Declare. (bfd_elf64_tilegx_vec): Rename... (bfd_elf64_tilegx_le_vec): ... to this. (bfd_elf64_tilegx_be_vec): Declare. (_bfd_target_vector): Add / rename above vectors. * arctures.c (bfd_architecture): Define bfd_mach_tilegx32. * bfd-in2.h: Regenerate. * cpu-tilegx.c (bfd_tilegx32_arch): define. (bfd_tilegx_arch): link to bfd_tilegx32_arch. d2946 1 a2946 1 2012-02-24 Nick Clifton d2948 4 a2951 4 PR ld/13730 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an error message instead of aborting, when an outofrange reloc is encountered. d2953 1 a2953 1 2012-02-23 Iain Sandoe d2955 4 a2958 7 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New. (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc bit-fields when target and host differ in endian-ness. When PAIRs are non-scattered find the 'symbol' from the preceding reloc. Add FIXME re. reloc symbols on section boundaries. (bfd_mach_o_swap_out_non_scattered_reloc): New. (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc. d2960 1 a2960 1 2012-02-17 Iain Sandoe d2962 3 a2964 4 * mach-o-i386.c (i386_howto_table): Add support for 16 bit sect-diffs. (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs. (bfd_mach_o_i386_swap_reloc_out): Likewise. d2966 1 a2966 1 2012-02-17 Tristan Gingold d2968 4 a2971 6 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF): * libbfd.h: Regenerated. * bfd-in2.h: Likewise. * mach-o-i386.c (i386_howto_table): Include local sectdiff. (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff. (bfd_mach_o_i386_swap_reloc_out): Likewise. d2973 1 a2973 1 2012-02-17 Andreas Krebbel d2975 2 a2976 2 * elf32-s390.c (elf_s390_relocate_section): Support basr in the GD->LE and LD->LE optimizations. d2978 1 a2978 1 2012-02-16 Alan Modra d2980 7 a2986 2 PR binutils/13355 * elf32-rx.c (elf32_rx_relax_section): Correct width check. d2988 1 a2988 1 2012-02-13 Richard Henderson d2990 6 a2995 3 PR ld/13621 * linker.c (fix_syms): Force symbols outside any section into bfd_abs_section_ptr. d2997 1 a2997 1 2012-02-13 Alan Modra d2999 3 a3001 4 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function. * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare. * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define. * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define. d3003 1 a3003 2 2012-02-11 Jan Kratochvil Nick Clifton d3005 4 a3008 2 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized memset. d3010 1 a3010 1 2012-02-10 Iain Sandoe d3012 3 a3014 2 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section vma additions in their logical, rather than physical order. d3016 1 a3016 1 2012-02-10 Iain Sandoe d3018 1 a3018 6 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section parameters. * mach-o-x86-64.c (text_section_names_xlat): New. (mach_o_x86_64_segsec_names_xlat): New. (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat. * mach-o-i386.c (text_section_names_xlat): Correct section parameters. d3020 1 a3020 1 2012-02-10 Tristan Gingold d3022 2 a3023 2 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator to avoid infinite loop. Add comments. d3025 1 a3025 1 2012-02-09 H.J. Lu d3027 80 a3106 8 PR ld/13675 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte nop instructions. (bfd_arch_i386_short_nop_fill): New. (bfd_arch_i386_long_nop_fill): Likewise. Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info initializers. Use bfd_arch_i386_long_nop_fill on 64bit bfd_arch_info initializers. d3108 2 a3109 4 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ... (bfd_arch_i386_short_nop_fill): This. Update bfd_arch_info initializers. * cpu-l1om.c: Likewise. d3111 2 a3112 1 2012-02-08 Alan Modra d3114 4 a3117 3 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too. (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear the correct h->u.weakdef. d3119 74 a3192 1 2012-02-07 Alan Modra d3194 1 a3194 6 * elf.c (elf_find_function): Don't use internal_elf_sym. (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type parameter with asymbol. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype. (struct elf_backend_data ): Likewise. d3196 2 a3197 1 2012-02-02 Vidya Praveen (vidya.praveen@@atmel.com) d3199 1 a3199 3 PR bfd/13410 * elf32-avr.c (elf32_avr_relax_section): Correct the condition that qualifies the candidates for relaxation. d3201 3 a3203 1 2012-02-02 Tristan Gingold d3205 1 a3205 1 * bfdio.c (real_fopen): Remove unused vms_modes variable. d3207 5 a3211 1 2012-02-02 Tristan Gingold d3213 1 a3213 2 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized variable warning. d3215 1 a3215 1 2012-02-02 Tristan Gingold d3217 2 a3218 1 * archive.c (bfd_slurp_armap): Fix thinko in cast. d3220 4 a3223 1 2012-01-31 H.J. Lu d3225 1 a3225 4 PR ld/13616 * archures.c (bfd_arch_info): Add fill. (bfd_default_arch_struct): Add bfd_arch_default_fill. (bfd_arch_default_fill): New. d3227 48 a3274 2 * configure.in: Set bfd version to 2.22.52. * configure: Regenerated. d3276 1 a3276 77 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info initializer. * cpu-arc.c: Likewise. * cpu-arm.c: Likewise. * cpu-avr.c: Likewise. * cpu-bfin.c: Likewise. * cpu-cr16.c: Likewise. * cpu-cr16c.c: Likewise. * cpu-cris.c: Likewise. * cpu-crx.c: Likewise. * cpu-d10v.c: Likewise. * cpu-d30v.c: Likewise. * cpu-dlx.c: Likewise. * cpu-epiphany.c: Likewise. * cpu-fr30.c: Likewise. * cpu-frv.c: Likewise. * cpu-h8300.c: Likewise. * cpu-h8500.c: Likewise. * cpu-hppa.c: Likewise. * cpu-i370.c: Likewise. * cpu-i860.c: Likewise. * cpu-i960.c: Likewise. * cpu-ia64.c: Likewise. * cpu-ip2k.c: Likewise. * cpu-iq2000.c: Likewise. * cpu-lm32.c: Likewise. * cpu-m10200.c: Likewise. * cpu-m10300.c: Likewise. * cpu-m32c.c: Likewise. * cpu-m32r.c: Likewise. * cpu-m68hc11.c: Likewise. * cpu-m68hc12.c: Likewise. * cpu-m68k.c: Likewise. * cpu-m88k.c: Likewise. * cpu-mcore.c: Likewise. * cpu-mep.c: Likewise. * cpu-microblaze.c: Likewise. * cpu-mips.c: Likewise. * cpu-mmix.c: Likewise. * cpu-moxie.c: Likewise. * cpu-msp430.c: Likewise. * cpu-mt.c: Likewise. * cpu-ns32k.c: Likewise. * cpu-openrisc.c: Likewise. * cpu-or32.c: Likewise. * cpu-pdp11.c: Likewise. * cpu-pj.c: Likewise. * cpu-plugin.c: Likewise. * cpu-powerpc.c: Likewise. * cpu-rl78.c: Likewise. * cpu-rs6000.c: Likewise. * cpu-rx.c: Likewise. * cpu-s390.c: Likewise. * cpu-score.c: Likewise. * cpu-sh.c: Likewise. * cpu-sparc.c: Likewise. * cpu-spu.c: Likewise. * cpu-tic30.c: Likewise. * cpu-tic4x.c: Likewise. * cpu-tic54x.c: Likewise. * cpu-tic6x.c: Likewise. * cpu-tic80.c: Likewise. * cpu-tilegx.c: Likewise. * cpu-tilepro.c: Likewise. * cpu-v850.c: Likewise. * cpu-vax.c: Likewise. * cpu-w65.c: Likewise. * cpu-we32k.c: Likewise. * cpu-xc16x.c: Likewise. * cpu-xstormy16.c: Likewise. * cpu-xtensa.c: Likewise. * cpu-z80.c: Likewise. * cpu-z8k.c: Likewise. * cpu-i386.c: Include "libiberty.h". (bfd_arch_i386_fill): New. Add bfd_arch_i386_fill to bfd_arch_info initializer. d3278 132 a3409 2 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer. * cpu-l1om.c: Likewise. d3411 2 a3412 2 * linker.c (default_data_link_order): Call abfd->arch_info->fill if fill size is 0. d3414 16 a3429 1 * bfd-in2.h: Regenerated. d3431 1 a3431 1 2012-01-27 Michael Eager d3433 90 a3522 2 * elf32-microblaze.c (create_got_section): Reuse existing .rela.got section. d3524 1 a3524 1 2012-01-23 Alan Modra d3526 2 a3527 33 * elf-bfd.h: Formatting. (struct elf_backend_data): Add "maybe_function_sym". (_bfd_elf_maybe_function_sym): Declare. * elfxx-target.h (elf_backend_maybe_function_sym): Define. (elfNN_bed): Init new field. * elf.c (elf_find_function): Use maybe_function_sym. (_bfd_elf_maybe_function_sym): New function. * elf64-ppc.c (elf_backend_maybe_function_sym): Define. (ppc64_elf_maybe_function_sym): New function. 2012-01-20 Francois Gouget PR binutils/13534 * archive.c (_bfd_ar_sizepad): New function. Correctly install and pad the size field in an archive header. (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan function for the archive size field. (bfd_generic_openr_next_archived_file): Likewise. (do_slurp_coff_armap): Likewise. (_bfd_write_archive_contents): Likewise. (_bfd_bsd44_write_ar_hdr): Use the new function. (bfd_ar_hdr_from_filesystem): Likewise. (_bfd_write_archive_contents): Likewise. (bsd_write_armap): Likewise. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_write_armap): Likewise. * bfdio.c (bfd_bread): Use correct type for archive element sizes. * ar.c (open_inarch): Likewise. (extract_file): Likewise. * libbfd-in.h (struct areltdata): Use correct types for parsed_size and extra_size fields. Prototype _bfd_ar_sizepad function. d3530 9 a3538 1 2012-01-20 Ulrich Weigand d3540 1 a3540 5 * elf.c (elfcore_write_prpsinfo): Provide unconditionally. Return NULL if core file generation is unsupported. (elfcore_write_prstatus): Likewise. * elf32-arm.c (elf32_arm_nabi_write_core_note): New function. (elf_backend_write_core_note): Define. d3542 1 a3542 1 2012-01-19 Tristan Gingold d3544 1 a3544 2 * pef.c: Add a comment. * xsym.c: Likewise. d3546 10 a3555 1 2012-01-17 Alan Modra d3557 1 a3557 3 * elf32-ppc.c (ppc_elf_write_core_note ): Don't leave trailing garbage in the note. * elf64-ppc.c (ppc64_elf_write_core_note ): Likewise. d3559 1 a3559 1 2012-01-16 Daniel Green d3561 1 a3561 4 PR ld/13491 * coff-i386.c (coff_i386_rtype_to_howto ): Test h->root.type not h->type. * coff-x86_64.c (coff_amd64_rtype_to_howto ): Likewise. d3563 2 a3564 1 2012-01-13 Iain Sandoe d3566 16 a3581 2 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute indirect symbols. d3583 1 a3583 1 2012-01-13 Iain Sandoe d3585 1 a3585 2 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file position from here... to (bfd_mach_o_build_seg_command): Here. d3587 1 a3587 1 2012-01-12 Iain Sandoe d3589 4 a3592 4 * mach-o.c (bfd_mach_o_count_indirect_symbols): New. (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table. * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the file. (bfd_mach_o_section): Add indirect_syms field. d3594 1 a3594 1 2012-01-11 Iain Sandoe d3596 4 a3599 3 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of vmsize from filesize. Don't compute offsets or file sizes for zerofill sections. d3601 1 a3601 1 2012-01-11 Iain Sandoe d3603 4 a3606 2 * mach-o.c (bfd_mach_o_build_commands): Make the building of each command type independent. d3608 1 a3608 1 2012-01-11 Alan Modra d3610 32 a3641 200 * elf64-ppc.c: Define more insns used in plt call stubs. (ppc64_elf_brtaken_reloc): Assume isa version 2 or above. (ppc64_elf_relocate_section): Likewise. (enum ppc_stub_type): Add ppc_stub_plt_call_r2save. (struct ppc_link_hash_table): Increase size of stub_count array. Add plt_stub_align and plt_thread_safe. (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define. (plt_stub_size, plt_stub_pad): New functions. (build_plt_stub): Emit barriers for power7 thread safety. Don't emit needless save of r2. (build_tls_get_addr_stub): Adjust params. (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning plt stubs. Adjust build_*plt_stub calls. (ppc_size_one_stub): Similarly. (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align params. Choose default for plt_thread_safe based on existence of calls to thread creation functions. Modify plt_call to plt_call_r2save when no tocsave reloc found. Align tail of stub sections. (ppc64_elf_build_stubs): Align tail of stub sections. Adjust output of stub statistics. (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save. * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype. 2012-01-10 H.J. Lu PR ld/13581 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P check on R_X86_64_PCXX. 2012-01-10 Tristan Gingold * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false warning. 2012-01-10 Tristan Gingold * bfdio.c (bfd_tell): Handle nested archives. (bfd_seek): Ditto. * cache.c (bfd_cache_lookup_worker): Ditto. * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with nested archives. (bfd_generic_openr_next_archived_file): Likewise. 2012-01-09 Iain Sandoe * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement. (bfd_mach_o_write_symtab): Remove handling for indirect syms. (bfd_mach_o_primary_symbol_sort_key): Likewise. (bfd_mach_o_cf_symbols): Likewise. (bfd_mach_o_sort_symbol_table): Remove. (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling for indirect and dysymtab counts. Do the symbol sorting here. (bfd_mach_o_build_dysymtab_command): Count the symbol types here. Make the indirect symbols a TODO. (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols. (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with a non-zero value. (bfd_mach_o_read_symtab_symbol): Record the symbol index. (bfd_mach_o_read_symtab_symbol): Adjust recording of global status. * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries. (IS_MACHO_INDIRECT): Remove. (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New. 2012-01-06 Nick Clifton PR binutils/13121 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to 'flaginfo' to avoid conflicts with AIX system headers. 2012-01-06 Tristan Gingold * bfdio.c (bfd_bread): Use arelt_size macro. 2012-01-06 Tristan Gingold * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs. 2012-01-05 Nick Clifton PR ld/12161 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if necessary. 2012-01-05 Jan Kratochvil Fix zero registers core files when built by gcc-4.7. * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and size. Call elfcore_write_note for the local variables. Remove the final elfcore_write_note call. Add NOTREACHED comments. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function. (bfd_mach_o_generic_stat_arch_elt): Adjust. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_fat_member_init): New function. (bfd_mach_o_openr_next_archived_file): Reindent. Adjust to call bfd_mach_o_fat_member_init. (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init. 2012-01-04 Tristan Gingold * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1, BFD_RELOC_MACH_O_X86_64_PCREL32_2, BFD_RELOC_MACH_O_X86_64_PCREL32_4, BFD_RELOC_MACH_O_X86_64_BRANCH32, BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, BFD_RELOC_MACH_O_X86_64_GOT. 2012-01-04 Tristan Gingold * mach-o.h (bfd_mach_o_fvmlib_command): New structure. (bfd_mach_o_load_command): Add fvmlib field. * mach-o.c (bfd_mach_o_read_fvmlib): New function. (bfd_mach_o_read_command): Handle fvmlib. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_convert_architecture): Reindent. Decode msubtype for ARM. 2012-01-04 Tristan Gingold * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments. 2012-01-04 Tristan Gingold * mach-o.h: Reindent header. (bfd_mach_o_encryption_info_command): New structure. (bfd_mach_o_load_command): Add encryption_info field. * mach-o.c (bfd_mach_o_read_encryption_info): New function. (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO. (bfd_mach_o_read_command): Adjust error message. 2012-01-04 Shinichiro Hamaji * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part which reads DWARF2 and stores in stash from find_line. (find_line) Call _bfd_dwarf2_slurp_debug_info. * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration. * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate. * mach-o.c (dsym_subdir): The name of subdir where debug information may be stored. (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose type is UUID. (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is corresponding to the executable. (bfd_mach_o_find_dsym): New. Find a debug information BFD in the specified binary file. (bfd_mach_o_follow_dsym): New. Find a debug information BFD for the original BFD. (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O executables, dylibs, and bundles. (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file. * mach-o.h (dsym_bfd): The BFD of the dSYM file. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index for stabd symbols. (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs. (bfd_mach_o_cf_symbols): Likewise. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo. 2012-01-03 Iain Sandoe * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index as the value of an indirect symbol. Keep the string table index in non-indirect syms for reference. (bfd_mach_o_write_dysymtab): New. (bfd_mach_o_primary_symbol_sort_key): New. (bfd_mach_o_cf_symbols): New. (bfd_mach_o_sort_symbol_table): New. (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols. If we are emitting a dysymtab, process indirect symbols and count the number of each other kind. (bfd_mach_o_mangle_sections): New. (bfd_mach_o_write_contents): Split out some pre-requisite code into the command builder. Write dysymtab if the command is present. (bfd_mach_o_count_sections_for_seg): New. (bfd_mach_o_build_seg_command): New. (bfd_mach_o_build_dysymtab_command): New. (bfd_mach_o_build_commands): Reorganize to support the fact that some commands are optional and should not be emitted if there are no sections or symbols. (bfd_mach_o_set_section_contents): Amend comment. * mach-o.h: Amend and add to comments. (mach_o_data_struct): Add fields for dysymtab symbols counts and a pointer to the indirects, when present. (bfd_mach_o_should_emit_dysymtab): New macro. (IS_MACHO_INDIRECT): Likewise. d3643 1 a3643 1 For older changes see ChangeLog-2011 @ 1.1.1.5 log @Import binutils-2.26 @ text @d1 1 a1 1 2016-01-25 Tristan Gingold d3 3 a5 2 * version.m4: Bump version to 2.26 * configure: Regenerate. d7 1 a7 1 2016-01-14 Alan Modra d9 3 a11 4 PR ld/19421 PR ld/4317 * elflink.c (elf_link_input_bfd): Revert 2015-02-19 changes. (elf_link_output_extsym): Likewise. d13 1 a13 1 2016-01-11 Jiong Wang d15 8 a22 1 Apply from master d24 1 a24 2 2016-01-08 Richard Sandiford Jiong Wang d26 2 a27 3 PR ld/19368 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to reloc_class_ifunc. d29 1 a29 1 2016-01-06 Maciej W. Rozycki d31 2 a32 4 Apply from master. 2016-01-04 Maciej W. Rozycki * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the return status from `_bfd_elf_merge_object_attributes'. d34 1 a34 1 2015-12-11 Andreas Krebbel d36 4 a39 2 Apply from master. 2015-11-19 Andreas Krebbel d41 1 a41 5 PR ld/19263 * elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check. * elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling over from the 32 bit code. (elf_s390_relocate_section): Likewise. d43 2 a44 1 2015-12-10 Alan Modra d46 1 a46 27 Apply from master. 2015-12-07 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Don't error on local ifunc plt call. Wrap long lines. (ppc_elf_relocate_section): Wrap long lines. * elf64-ppc.c (ppc64_elf_check_relocs): Don't error on local ifunc plt calls. Move __tls_get_addr checks later. Don't create plt for addr14/addr24 relocs. (ppc64_elf_gc_sweep_hook): Adjust to suit check_relocs changes. (ppc64_elf_relocate_section): Correct local ifunc handling for PLT64, PLT32 and PLT16 relocs. 2015-12-07 Alan Modra PR 19323 * elfcode.h (elf_object_p): Check for ridiculous e_shnum and e_phnum values. 2015-12-07 Alan Modra * reloc.c (BFD_RELOC_PPC64_ENTRY): New. * elf64-ppc.c (reloc_howto_type ppc64_elf_howto_raw): Add entry for R_PPC64_ENTRY. (LD_R2_0R12, ADD_R2_R2_R12, LIS_R2, ADDIS_R2_R12): Define. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_ENTRY. (ppc64_elf_relocate_section): Edit code at R_PPC64_ENTTY. Use new insn defines. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. d48 3 a50 38 2015-12-02 Alan Modra PR binutils/19315 * dwarf2.c (_bfd_elf_find_function): Return symbol matched. (_bfd_dwarf2_find_nearest_line): Check symbol returned above against dwarf range. * elf-bfd.h (_bfd_elf_find_function): Update prototype. 2015-12-02 Alan Modra * elf64-ppc.c (ppc64_elf_tls_optimize): Don't segfault on NULL symbol section or output section. (ppc64_elf_edit_toc): Similarly for ld -R objects. (ppc64_elf_size_stubs): Likewise. 2015-11-20 Stefan Teleman PR ld/19260 * cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit Solaris as the result is unreliable. 2015-11-18 Alan Modra PR 19256 * archive.c (bfd_generic_openr_next_archived_file): Don't allow backward file movement via "negative" sizes. * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise. 2015-12-04 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Skip if addend isn't 0. (elf_i386_relocate_section): Skip R_386_GOT32X optimization if addend isn't 0. 2015-12-01 H.J. Lu PR ld/19319 * elf32-i386.c (elf_i386_convert_load): Check h->def_regular instead of bfd_link_hash_new. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip relocation overflow for bfd_link_hash_undefined and bfd_link_hash_new if h->def_regular is set. d52 1 a52 1 2015-11-13 Tristan Gingold d54 2 a55 2 * version.m4: Bump version to 2.25.90 * configure: Regenerate. d57 2 a58 1 2015-11-13 Tristan Gingold d60 6 a65 2 * version.m4: Bump version to 2.26.51 * configure: Regenerate. d67 1 a67 2 2015-11-11 Alan Modra Peter Bergner d69 1 a69 14 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA. (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA. (ppc_elf_addr16_ha_reloc): Likewise. (ppc_elf_check_relocs): Likewise. (ppc_elf_relocate_section): Likewise. (is_insn_dq_form): Handle lxv and stxv instructions. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA. (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA. (ppc64_elf_ha_reloc): Likewise. (ppc64_elf_check_relocs): Likewise. (ppc64_elf_relocate_section): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New. d71 7 a77 1 2015-11-10 H.J. Lu d79 1 a79 3 * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT and VTENTRY relocations when deleting relocations. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d81 4 a84 1 2015-11-10 H.J. Lu d86 8 a93 3 * elf32-i386.c (elf_i386_relocate_section): Properly move kept relocations when deleting relocations. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d95 64 a158 1 2015-11-09 H.J. Lu d160 41 a200 5 * elf32-i386.c (elf_i386_relocate_section): Use read and write pointers to reloc array, rather than memmove when deleting a reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust reloc counts at end of loop. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d202 1 a202 1 2015-11-10 Alan Modra d204 3 a206 5 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write pointers to reloc array, rather than memmove when deleting a reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust reloc counts at end of loop. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. d208 1 a208 1 2015-11-09 Dominik Vogt d210 4 a213 6 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left shift of negative value. * libbfd.c (safe_read_leb128): Likewise. * dwarf2.c (place_sections): Likewise. * bfd-in.h (align_power): Likewise. * bfd-in2.h (align_power): Likewise. d215 1 a215 1 2015-10-30 Nick Clifton d217 4 a220 1 * po/zh_CN.po: Updated (simplified) Chinese translation. d222 1 a222 1 2015-10-29 Catherine Moore d224 4 a227 2 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output section to bfd_abs_section_ptr if the stub is discarded. d229 2 a230 1 2015-10-29 Ed Schouten d232 2 a233 7 * config.bfd (targ_defvec): Add support for CloudABI on aarch64. For this target we have to make sure we use ELFOSABI_CLOUDABI instead of ELFOSABI_NONE. * configure.ac (tb): Likewise. * elfnn-aarch64.c: Likewise. * targets.c (_bfd_target_vector): Likewise. * configure: Regenerate. d235 1 a235 1 2015-10-29 Pedro Alves d237 3 a239 1 * libhppa.h (bfd_hppa_insn2fmt): Add cast. d241 1 a241 1 2015-10-28 H.J. Lu d243 1 a243 2 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in comment. d245 1 a245 1 2015-10-28 Nick Clifton d247 1 a247 7 * elf32-arm.c (create_instruction_branch_absolute): Replace pointer parameters with a simple integer parameter. (stm32l4xx_create_replacing_stub_ldmia): Update calls to create_instruction_branch_absolute. (stm32l4xx_create_replacing_stub_ldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): Likewise. (elf32_arm_write_section): Use pointer type for veneer addresses. d249 1 a249 1 2015-10-28 Cupertino Miranda d251 5 a255 6 * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry. * elf32-arc.c (arc_elf_howto_ini): Update formula. (get_middle_endian_relocation): New function. (PDATA): Define. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. d257 1 a257 1 2015-10-28 Alan Modra d259 6 a264 8 PR ld/19162 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over linker input bfds.. * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param. (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call. * tekhex.c (first_phase): Likewise. * elflink.c (bfd_elf_gc_sections): Likewise. * bfd-in2.h: Regenerate. d266 1 a266 2 2015-10-27 Laurent Alfonsi Christophe Monat d268 2 a269 64 * bfd-in2.h: Regenerate. * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how STM32L4XX instruction scanning should be done. (bfd_elf32_arm_set_stm32l4xx_fix) (bfd_elf32_arm_stm32l4xx_erratum_scan) (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes. (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument to prototype. * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME) (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros. (elf32_stm32l4xx_erratum_type): New enum. (elf32_stm32l4xx_erratum_list): New struct. List of veneers or jumps to veneers. (_arm_elf_section_data): Add stm32l4xx_erratumcount, stm32l4xx_erratumlist. (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size, stm32l4xx_fix and num_stm32l4xx_fixes fields. (ctz): New function. (popcount): New function. (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix. (put_thumb2_insn): New function. (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for LDM instructions. (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for VLDM instructions. (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum glue section. (record_stm32l4xx_erratum_veneer) : New function. Create a single veneer, and its associated symbols. (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue. (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of erratum workaround required. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find out where veneers and branches to veneers have been placed in virtual memory after layout. (is_thumb2_ldmia): New function. (is_thumb2_ldmdb): Likewise. (is_thumb2_vldm ): Likewise. (stm32l4xx_need_create_replacing_stub): New function. Decide if a veneer must be emitted. (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an input BFD for potential erratum-triggering insns. Record results. (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in global hash table. (elf32_arm_size_dynamic_sections): Collect glue information. (create_instruction_branch_absolute): New function. (create_instruction_ldmia): Likewise. (create_instruction_ldmdb): Likewise. (create_instruction_mov): Likewise. (create_instruction_sub): Likewise. (create_instruction_vldmia): Likewise. (create_instruction_vldmdb): Likewise. (create_instruction_udf_w): Likewise. (create_instruction_udf): Likewise. (push_thumb2_insn32): Likewise. (push_thumb2_insn16): Likewise. (stm32l4xx_fill_stub_udf): Likewise. (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the replacing stub for ldmia instructions. (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb. (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm. (stm32l4xx_create_replacing_stub): New function. Dispatches the stub emission to the appropriate functions. (elf32_arm_write_section): Output veneers, and branches to veneers. d271 1 a271 1 2015-10-27 Sangamesh Mallayya sangamesh.swamy@@in.ibm.com> d273 2 a274 27 * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running aix for core file support. * configure: Regenerate. * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb. Added BFD64 check if we are using old core file format for 32-bit gdb. Set sizeof CORE_COMMONSZ appropriately in case of either new or old core file format. (read_hdr): Added BFD64 check for 64-bit support. (rs6000coff_core_p): Likewise. (rs6000coff_core_file_matches_executable_p): Likewise. (rs6000coff_core_file_failing_command): Likewise. (rs6000coff_core_file_failing_signal): Likewise. Add support for debugging core files generated by binaries in Large Memory model. (rs6000coff_core_p): If Large Memory Model is used, then the .data segment should start from BDATAORG which has been defined in the system header files. 2015-10-26 H.J. Lu PR ld/19175 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new instead of calling bfd_link_get_defined_symbol. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip relocation overflow for bfd_link_hash_new. * linker.c (bfd_link_get_defined_symbol): Removed. * bfd-in2.h: Regenerated. d276 1 a276 1 2015-10-26 H.J. Lu d278 3 a280 8 PR ld/19171 * elf32-i386.c (elf_i386_convert_load): Call bfd_link_get_defined_symbol to check if a symbol is defined. * elf64-x86-64.c (elf_x86_64_convert_load): Call bfd_link_get_defined_symbol to get defined symbol section and value. * linker.c (bfd_link_get_defined_symbol): New function. * bfd-in2.h: Regenerated. d282 1 a282 1 2015-10-23 Alan Modra d284 4 a287 67 PR ld/11133 PR ld/19161 PR ld/19167 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_* and __stop_* symbol refs. (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_* and __stop_* symbol refs here.. (_bfd_elf_gc_mark_reloc): ..and here. * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update _bfd_elf_gc_mark_rsec call. 2015-10-23 Alan Modra PR ld/11133 PR ld/19161 * elflink.c (elf_gc_sweep): Revert last patch. (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here. 2015-10-22 H.J. Lu PR ld/19161 * elflink.c (elf_gc_sweep): Always keep sections marked with SEC_KEEP. 2015-10-22 Hans-Peter Nilsson * mmo.c (struct mmo_data_struct): New members symbol_consistency_override_calculated and ignore_symbol_consistency. (mmo_section_has_contents, mmo_ignore_symbol_consistency): New functions. (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to report an error for unexpected value of Main. (mmo_write_symbols_and_terminator): Similar. 2015-10-22 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and check call_nop_as_suffix for 1-byte NOP padding to pad call. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. 2015-10-22 H.J. Lu * elf64-x86-64.c: Include opcode/i386.h. (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. (R_X86_64_standard): Replace R_X86_64_PLT32_BND with R_X86_64_REX_GOTPCRELX. (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and BFD_RELOC_X86_64_REX_GOTPCRELX. (need_convert_mov_to_lea): Renamed to ... (need_convert_load): This. (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with need_convert_load. (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX. (elf_x86_64_size_dynamic_sections): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_convert_mov_to_lea): Renamed to ... (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea with need_convert_load. Support R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX transformations. * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New. (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. d289 1 a289 1 2015-10-22 H.J. Lu d291 1 a291 17 * elf32-i386.c: Include opcode/i386.h. (elf_howto_table): Add R_386_GOT32X. (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X. (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X. (need_convert_mov_to_lea): Renamed to ... (need_convert_load): This. (elf_i386_check_relocs): Handle R_386_GOT32X. Replace need_convert_mov_to_lea with need_convert_load. (elf_i386_gc_sweep_hook): Handle R_386_GOT32X. (elf_i386_size_dynamic_sections): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_convert_mov_to_lea): Renamed to ... (elf_i386_convert_load): This. Replace need_convert_mov_to_lea with need_convert_load. Support R_386_GOT32X transformations. * reloc.c (BFD_RELOC_386_GOT32X): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. d293 1 a293 1 2015-10-22 Andreas Krebbel d295 2 a296 8 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker only when linking an executable. (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT slot. * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker only when linking an executable. (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT slot. d298 1 a298 1 2015-10-22 Andreas Krebbel d300 3 a302 3 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT reference counters for local IFUNC calls. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. d304 1 a304 1 2015-10-22 Andreas Krebbel d306 3 a308 6 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT slot allocating code for GOTOFF relocs on ifunc symbols. (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs on ifunc symbols. (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt slot. d310 1 a310 1 2015-10-22 Andreas Krebbel d312 8 a319 4 PR ld/18841 * elf32-s390.c (elf_s390_reloc_type_class): Return reloc_class_ifunc for ifunc symbols. * elf64-s390.c (elf_s390_reloc_type_class): Likewise. d321 1 a321 1 2015-10-22 Andreas Krebbel d323 3 a325 3 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call elf_s390_finish_ifunc_symbol only for actually defined symbols. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. d327 1 a327 1 2015-10-22 Andreas Krebbel d329 3 a331 4 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove `head' parameter. * elf32-s390.c (allocate_dynrelocs): Don't use last parameter. * elf64-s390.c (allocate_dynrelocs): Don't use last parameter. d333 2 a334 1 2015-10-20 Hans-Peter Nilsson d336 7 a342 2 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value of Main in error message. d344 1 a344 1 2015-10-18 Doug Evans d346 3 a348 1 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo". d350 1 a350 1 2015-10-17 Alan Modra d352 3 a354 2 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve eh_frame FDE for ELFv1. d356 1 a356 1 2015-10-16 H.J. Lu d358 2 a359 3 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol is defined. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. d361 1 a361 1 2015-10-16 H.J. Lu d363 1 a363 3 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check def_regular. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. d365 1 a365 1 2015-10-15 H.J. Lu d367 3 a369 1 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments d371 1 a371 1 2015-10-15 Alan Modra d373 12 a384 3 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion that input and output .note.renesas sections are same size. Instead, only copy input to output if they are. d386 3 a388 1 2015-10-15 Riku Voipio d390 1 a390 4 PR ld/19123 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the offset for bfd_seek. * elfcode.h (elf_object_p): Likewise. d392 3 a394 1 2015-10-14 Rich Felker d396 3 a398 3 PR ld/19091 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit DT_PLTGOT for FDPIC output. d400 1 a400 1 2015-10-13 Alan Modra d402 2 a403 4 * elf.c (_bfd_elf_map_sections_to_segments): Don't set PT_GNU_RELRO p_flags. (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO flags to PF_R here. d405 1 a405 1 2015-10-12 H.J. Lu d407 2 a408 3 PR ld/19073 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned definition after the default version. d410 1 a410 1 2015-10-12 Andreas Krebbel d412 2 a413 4 PR ld/19083 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got refcount for relocs not really requiring a got slot. * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise. d415 3 a417 1 2015-10-11 John David Anglin d419 1 a419 2 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in .data.rel.ro.local. d421 2 a422 1 2015-10-07 Cupertino Miranda d424 1 a424 9 * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. d426 5 a430 1 2015-10-06 H.J. Lu d432 1 a432 3 * bfd.c (bfd_update_compression_header): Clear the ch_reserved field in 64-bit output. (bfd_convert_section_contents): Likewise. d434 2 a435 1 2015-10-05 H.J. Lu d437 1 a437 3 PR ld/18914 * elflink.c (elf_link_add_object_symbols): Don't re-export a symbol if it isn't undefined. d439 6 a444 1 2015-10-04 H.J. Lu d446 1 a446 2 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec, i386_pei_vec and x86_64_pei_vec for Solaris2/x86. d448 1 a448 1 2015-10-02 Renlin Li d450 10 a459 12 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC, TLSDESC_OFF_G1. (aarch64_tls_transition_without_check): Add relaxation support. (aarch64_reloc_got_type): Add support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_tls_relax): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. d461 26 a486 88 2015-10-02 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for BFD_RELOC_AARCH64_TLSDESC_OFF_G1. 2015-10-02 Renlin Li * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC): Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1. (aarch64_tls_transition_without_check): Likewise (elfNN_aarch64_tls_relax): Likwise. 2015-10-02 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation. 2015-10-02 Renlin Li * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order. * libbfd.h: Regenerate. * bfd-in2.h: Likewise. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make TLSIE_MOVW_GOTTPREL_G1 check overflow. (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1 and TLSIE_MOVW_GOTTPREL_G0_NC. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC. * libbfd.h: Regenerate. * bfd-in2.h: Likewise 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSGD_MOVW_G1. * bfd-in2.h: Regenerate. * libbfd.h: Likewise. 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-10-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry MOVW_GOTOFF_G0_NC. * libbfd.h: Regnerate. a487 16 2015-10-02 Renlin Li * elfnn-aarch64.c (aarch64_reloc_got_type): Add support for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise (elfNN_aarch64_final_link_relocate): Likewise 2015-010-02 Renlin Li * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for MOVW_GOTOFF_G1. d489 4 a492 1 * bfd-in2.h: Regenerate. d494 1 a494 1 2015-10-02 Renlin Li d496 1 a496 19 * elfnn-aarch64.c (aarch64_reloc_got_type): Add BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise (elfNN_aarch64_final_link_relocate): Calculate offset within GOT. 2015-10-02 Renlin Li * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to switch statement. 2015-10-01 H.J. Lu PR ld/19031 * elf64-x86-64.c (elf_x86_64_check_relocs): Set pointer_equality_needed for R_X86_64_PC32 reloc in non-code sections. d498 1 a498 1 2015-10-01 Renlin Li d500 1 a500 2 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove. (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once. d502 1 a502 1 2015-10-01 Kaz Kojima d504 1 a504 2 * config.bfd (targ_selvecs): Remove sh_elf32_vec and sh_elf32_le_vec from sh*-*-linux cases. d506 1 a506 1 2015-10-01 Alan Modra d508 6 a513 2 PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Revert last change. d515 1 a515 1 2015-09-30 H.J. Lu d517 2 a518 4 PR ld/19031 * elf32-i386.c (elf_i386_check_relocs): Set pointer_equality_needed for R_386_PC32 reloc in non-code sections. d520 1 a520 1 2015-09-30 H.J. Lu d522 2 a523 3 PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that have the compatible ELF machine code with the output bfd. d525 2 a526 1 2015-09-30 Alan Modra d528 46 a573 14 PR ld/19013 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that will be handled by elf_link_input_bfd. Rename abfd param to obfd. 2015-09-30 Rich Felker * config.bfd (targ_selvecs): Add fdpic and misc targets for sh*-*-linux*. 2015-09-29 Andrew Stubbs H.J. Lu PR binutils/19020 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter. d575 5 d581 1 a581 1 2015-08-11 Peter Zotov d583 3 a585 101 PR ld/18759 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE. (R_OR1K_16_PCREL): Likewise. (R_OR1K_8_PCREL): Likewise. 2015-09-23 Nick Clifton * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in order to avoid problems with left shifting negative values. (abs32code): Likewise. * mach-o.c (FILE_ALIGN): Likewise. * coff-rs6000.c (xcoff_debug_sections): Delete unused static array. * elf32-visium.c (visium_reloc_map): Likewise. * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless calls to abs function. * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise. * elf32-score.c (score_elf_final_link_relocate): Likewise. * elf32-score7.c (score_elf_final_link_relocate): Likewise. * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead of shifting to create a negative mask. * elf32-msp430.c (elf_backend_special_sections): Define. * elfxx-mips.c (got_ofst_reloc_p): Delete unused function. (got_hi16_reloc_p): Delete unused function. * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of partition name. 2015-09-23 Nick Clifton PR binutils/15835 * elf-bfd.h (struct elf_section_list): New structure. (struct elf_obj_tdata): Replace symtab_shndx_hdr with symtab_shndx_list. Delete symtab_shndx_section. (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list. * elf.c (bfd_elf_get_syms): If symtab index sections are present, scan them for the section that matches the provided symbol table. (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections. (assign_section_numbers): Use the first symtab index table in the list. (_bfd_elf_compute_section_file_positions): Replace use of symtab_shndx_hdr with use of symtab_shndx_list. (find_section_in_list): New function. (assign_file_postions_except_relocs): Use new function. (_bfd_elf_copy_private_symbol_data): Likewise. (swap_out_syms): Handle multiple symbol table index sections. * elf32-m32c.c (m32c_elf_relax_section): Replace use of symtab_shndx_hdr with use of symtab_shndx_list. * elf32-rl78.c (rl78_elf_relax_section): Likewise. * elf32-rx.c (rx_relax_section): Likewise. * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise. * elflink.c (bfd_elf_final_link): Likewise. 2015-09-21 H.J. Lu * bfd.c (bfd_update_compression_header): Use bfd_put_32 on ch_type. (bfd_check_compression_header): Use bfd_get_32 on ch_type. (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32 on ch_type. 2015-09-20 Rich Felker * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create .interp when info->nointerp. (bfd_elf_size_dynamic_sections): Adjust assert. * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp when info->nointerp. * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise. * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise. * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise. * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise. * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise. * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise. * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise. d587 1 a587 1 2015-09-18 Doug Evans d589 2 a590 3 * targets.c (enum bfd_flavour): Add comment. (bfd_flavour_name): New function. * bfd-in2.h: Regenerate. d592 1 a592 1 2015-09-18 Alan Modra d594 1 a594 5 * elf64-ppc.h (struct ppc64_elf_params ): Rename from no_tls_get_addr_opt. * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt. (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at default of -1. d596 1 a596 1 2015-09-17 Alan Modra d598 2 a599 3 PR 18867 * elflink.c (elf_link_adjust_relocs): Correct start of insertion sort main loop. d601 1 a601 1 2015-09-16 Alan Modra d603 84 a686 165 PR 18867 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to insert a run. Return status in case of malloc failure. Adjust callers. 2015-09-15 Max Filippov * elf32-xtensa.c (elf_xtensa_be_plt_entry) (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for windowed ABI. (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix up instructions according to ABI. 2015-09-14 Rich Felker * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag instead of clearing it on cross-section relocations. (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default. 2015-09-12 Helge Deller PR ld/18514 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry size to 0. 2015-09-09 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically. 2015-09-09 Jiong Wang * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three TLS local dynamic traditional relocations types. (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to local executable relaxation. 2015-09-03 H.J. Lu * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove convert_mov_to_lea. 2015-09-02 H.J. Lu * elf32-i386.c (R_386_irelative): Renamed to ... (R_386_ext2): This. (R_386_vt_offset): Updated. (elf_i386_rtype_to_howto): Likewise. (elf_i386_relocate_section): Likewise. 2015-09-01 H.J. Lu PR ld/18900 * elf32-i386.c (elf_i386_link_hash_entry): Add func_pointer_refcount. (elf_i386_link_hash_newfunc): Clear func_pointer_refcount. (elf_i386_get_local_sym_hash): Likewise. (elf_i386_copy_indirect_symbol): Also copy func_pointer_refcount. (elf_i386_check_relocs): Increment func_pointer_refcount. (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount. (elf_i386_allocate_dynrelocs): Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. Keep dynanamic relocations for run-time function pointer initialization. (elf_i386_relocate_section): Copy dynamic function pointer relocations. * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add func_pointer_refcount. (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount. (elf_x86_64_get_local_sym_hash): Likewise. (elf_x86_64_copy_indirect_symbol): Also copy func_pointer_refcount. (elf_x86_64_check_relocs): Increment func_pointer_refcount. (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount. (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. Keep dynanamic relocations for run-time function pointer initialization. (elf_x86_64_relocate_section): Copy dynamic function pointer relocations. 2015-09-01 Alan Modra * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value if .opd section has been edited. 2015-09-01 Alan Modra PR 18878 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout. (enum ppc_stub_type): Add ppc_stub_save_res. (struct map_stub): Add "next" and "needs_save_res". (struct ppc_link_hash_entry): Add "save_res" flag. (struct ppc_link_hash_table): Add "group". (sfpr_define): Add stub_sec param. Define symbol in stub_sec if stub_sec is non-null. Set "save_res". (save_res_funcs): Make file scope, rename from funcs. Adjust uses. (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms. (ppc_build_one_stub): Handle ppc_stub_save_res. (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding stub for linker defined save_res sym. (group_sections): Init new fields of struct map_stub. (ppc64_elf_size_stubs): Reserve space for save/restore func copy. (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit alias syms too. (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res. 2015-08-31 Alan Modra * elf64-ppc.c (get_r2off): Return -1 on error. (ppc_build_one_stub): Adjust for get_r2off change. Don't emit addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero. (ppc_size_one_stub): Corresponding size changes for r2off stubs. Add condition in test for -R objects. 2015-08-31 Alan Modra * section.c (section_id): Make file scope. (bfd_get_next_section_id): New function. * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl. (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add group. Update all uses. (struct ppc_link_hash_table): Delete top_id, top_index, and input_list. Add sec_info_arr_size. Rename stub_group to sec_info, and make group info indirect. Update stub_group refs throughout file. (ppc_add_stub): Don't look for stub_sec on link_sec stub_group entry. (ppc_build_one_stub): Delete FIXME. (ppc64_elf_setup_section_lists): Size htab->sec_info for all sections, not just input sections. Don't create htab->input_list. (ppc64_elf_next_input_section): Update to use sec_info union as list pointer. (PREV_SEC): Delete. (group_sections): Pass "info" param rather than "htab". Iterate over output sections rather than input_list. Use sec_info union as list pointers. Alloc atruct map_stub, and return fail status. * bfd-in2.h: Regenerate. 2015-08-31 Alan Modra * elflink.c (elf_sort_symbol): Use correctly sized type for calculating signed section->id difference. (elf_link_add_object_symbols): Likewise. * pef.c (bfd_pef_scan_start_address): Warning fix. * vms-alpha.c (vms_new_section_hook): Likewise. 2015-08-31 Alan Modra * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix. (find_relocs_at_address_addr): Make "reloc_type" an enum. (nds32_elf_relax_delete_blanks): Warning fix. (nds32_elf_relax_loadstore): Correct loop bound. 2015-08-31 Alan Modra * section.c (struct bfd_section): Make "id" and "index" unsigned. * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit. * elf.c (elf_map_symbols): Likewise. * elf64-ppc.c (sym_exists_at): Make "id" param unsigned. (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned. (ppc64_elf_setup_section_lists): Ditto for local vars. * elf32-arm.c: Similarly to elf64-ppc.c. * elf32-avr.c: Likewise. * elf32-hppa.c: Likewise. d688 51 a738 5 * elf32-metag.c: Likewise. * elf32-nios2.c: Likewise. * elfnn-aarch64.c: Likewise. * simple.c (struct saved_offsets): Make "section_count" unsigned. * bfd-in2.h: Regenerate. d740 1 a740 1 2015-08-27 Alan Modra d742 3 a744 36 PR 18867 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function. (elf_backend_sort_relocs_p): Define. 2015-08-26 Alan Modra PR 18867 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete. (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete. (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset): New functions. (elf_link_adjust_relocs): Use an insertion sort to sort relocs. 2015-08-26 Matthew Fortune PR ld/18401 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an ISA value to a bfd machine number. (bfd_mips_isa_ext): Update the ISA level and revision if necessary. Use mips_mach_extends_p to decide if the ISA extension needs to be set. (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to be inferred from the ABI setting. Set the ISA level from the maximum of the incoming and outgoing ISA levels. 2015-08-25 Nick Clifton PR binutils/18854 * elf.c (bfd_section_from_shdr): Replace assertions with warnings about multiple symbol tables. 2015-08-25 Renlin Li * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of ILP64. * bfd-in2.h: Regenerate. d746 1 a746 1 2015-08-22 Alan Modra d748 78 a825 81 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename. Don't copy fields not set by _bfd_elf_swap_verdef_in. 2015-08-19 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC. (elfNN_aarch64_final_link_relocate): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-19 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2015-08-19 Jiong Wang PR ld/18276 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2. (elfNN_aarch64_final_link_relocate): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-19 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2015-08-19 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2015-08-19 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC. 2015-08-19 Alan Modra * elf-s390-common.c: Simplify expressions using bfd_linke_executable, bfd_link_pie and bfd_link_pic. * elf32-arm.c: Likewise. d827 2 d830 6 d837 1 a837 1 * elf32-nios2.c: Likewise. d839 1 d841 2 d844 5 d850 2 d854 7 d862 7 d870 1 a870 1 2015-08-18 Jiong Wang d872 7 a878 130 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. 2015-08-18 H.J. Lu PR ld/18841 * elf-bfd.h (elf_link_hash_table): Add dynsym. * elf32-i386.c (elf_i386_reloc_type_class): Return reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym. (bfd_elf_size_dynsym_hash_dynstr): Use dynsym. (elf_final_link_info): Remove dynsym_sec. (elf_link_output_extsym): Replace dynsym_sec with dynsym. (bfd_elf_final_link): Remove reference to dynsym_sec. Replace dynsym_sec with dynsym. 2015-08-18 H.J. Lu * bfd/aoutx.h: Replace shared, executable, relocatable and pie fields with bfd_link_executable, bfd_link_dll, bfd_link_relocatable, bfd_link_pic and bfd_link_pie. * bfd/bout.c: Likewise. * bfd/coff-alpha.c: Likewise. * bfd/coff-arm.c: Likewise. * bfd/coff-i386.c: Likewise. * bfd/coff-i960.c: Likewise. * bfd/coff-m68k.c: Likewise. * bfd/coff-mcore.c: Likewise. * bfd/coff-mips.c: Likewise. * bfd/coff-ppc.c: Likewise. * bfd/coff-rs6000.c: Likewise. * bfd/coff-sh.c: Likewise. * bfd/coff-tic80.c: Likewise. * bfd/coff-x86_64.c: Likewise. * bfd/coff64-rs6000.c: Likewise. * bfd/coffgen.c: Likewise. * bfd/cofflink.c: Likewise. * bfd/ecoff.c: Likewise. * bfd/ecofflink.c: Likewise. * bfd/elf-bfd.h: Likewise. * bfd/elf-eh-frame.c: Likewise. * bfd/elf-ifunc.c: Likewise. * bfd/elf-m10200.c: Likewise. * bfd/elf-m10300.c: Likewise. * bfd/elf-s390-common.c: Likewise. * bfd/elf-vxworks.c: Likewise. * bfd/elf.c: Likewise. * bfd/elf32-arm.c: Likewise. * bfd/elf32-avr.c: Likewise. * bfd/elf32-bfin.c: Likewise. * bfd/elf32-cr16.c: Likewise. * bfd/elf32-cr16c.c: Likewise. * bfd/elf32-cris.c: Likewise. * bfd/elf32-crx.c: Likewise. * bfd/elf32-d10v.c: Likewise. * bfd/elf32-dlx.c: Likewise. * bfd/elf32-epiphany.c: Likewise. * bfd/elf32-fr30.c: Likewise. * bfd/elf32-frv.c: Likewise. * bfd/elf32-ft32.c: Likewise. * bfd/elf32-h8300.c: Likewise. * bfd/elf32-hppa.c: Likewise. * bfd/elf32-i370.c: Likewise. * bfd/elf32-i386.c: Likewise. * bfd/elf32-i860.c: Likewise. * bfd/elf32-ip2k.c: Likewise. * bfd/elf32-iq2000.c: Likewise. * bfd/elf32-lm32.c: Likewise. * bfd/elf32-m32c.c: Likewise. * bfd/elf32-m32r.c: Likewise. * bfd/elf32-m68hc11.c: Likewise. * bfd/elf32-m68hc1x.c: Likewise. * bfd/elf32-m68k.c: Likewise. * bfd/elf32-mcore.c: Likewise. * bfd/elf32-mep.c: Likewise. * bfd/elf32-metag.c: Likewise. * bfd/elf32-microblaze.c: Likewise. * bfd/elf32-moxie.c: Likewise. * bfd/elf32-msp430.c: Likewise. * bfd/elf32-mt.c: Likewise. * bfd/elf32-nds32.c: Likewise. * bfd/elf32-nios2.c: Likewise. * bfd/elf32-or1k.c: Likewise. * bfd/elf32-ppc.c: Likewise. * bfd/elf32-rl78.c: Likewise. * bfd/elf32-rx.c: Likewise. * bfd/elf32-s390.c: Likewise. * bfd/elf32-score.c: Likewise. * bfd/elf32-score7.c: Likewise. * bfd/elf32-sh-symbian.c: Likewise. * bfd/elf32-sh.c: Likewise. * bfd/elf32-sh64.c: Likewise. * bfd/elf32-spu.c: Likewise. * bfd/elf32-tic6x.c: Likewise. * bfd/elf32-tilepro.c: Likewise. * bfd/elf32-v850.c: Likewise. * bfd/elf32-vax.c: Likewise. * bfd/elf32-visium.c: Likewise. * bfd/elf32-xc16x.c: Likewise. * bfd/elf32-xstormy16.c: Likewise. * bfd/elf32-xtensa.c: Likewise. * bfd/elf64-alpha.c: Likewise. * bfd/elf64-hppa.c: Likewise. * bfd/elf64-ia64-vms.c: Likewise. * bfd/elf64-mmix.c: Likewise. * bfd/elf64-ppc.c: Likewise. * bfd/elf64-s390.c: Likewise. * bfd/elf64-sh64.c: Likewise. * bfd/elf64-x86-64.c: Likewise. * bfd/elflink.c: Likewise. * bfd/elfnn-aarch64.c: Likewise. * bfd/elfnn-ia64.c: Likewise. * bfd/elfxx-mips.c: Likewise. * bfd/elfxx-sparc.c: Likewise. * bfd/elfxx-tilegx.c: Likewise. * bfd/i386linux.c: Likewise. * bfd/linker.c: Likewise. * bfd/m68klinux.c: Likewise. * bfd/pdp11.c: Likewise. * bfd/pe-mips.c: Likewise. * bfd/peXXigen.c: Likewise. * bfd/reloc.c: Likewise. * bfd/reloc16.c: Likewise. * bfd/sparclinux.c: Likewise. * bfd/sunos.c: Likewise. * bfd/vms-alpha.c: Likewise. * bfd/xcofflink.c: Likewise. d880 1 a880 1 2015-08-18 Alan Modra d882 2 a883 3 PR 18667 * Makefile.am: Use $(SED) in place of sed throughout. * Makefile.in: Regenerate. d885 1 a885 1 2015-08-18 Alan Modra d887 3 a889 4 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC. if already defined, and set linker_def. (ppc64_elf_set_toc): Use .TOC. value if defined other than by the backend. d891 1 a891 1 2015-08-14 Alan Modra d893 3 a895 2 PR ld/18759 * elf32-or1k.c: Revert 2015-08-11 change. d897 1 a897 1 2015-08-13 H.J. Lu d899 3 a901 4 PR ld/18801 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise. d903 1 a903 1 2015-08-12 Simon Dardis d905 2 a906 6 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only. (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry, mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry): Update to use 'or' instead of 'addu/daddu'. (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE. (move_insns_32): Reorder table. d908 1 a908 1 2015-08-11 H.J. Lu d910 2 a911 3 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC relocations in debug sections. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d913 1 a913 1 2015-08-11 Jiong Wang d915 2 a916 2 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14. d918 1 a918 1 2015-08-11 Jiong Wang d920 1 a920 2 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New. (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC. d922 1 a922 1 2015-08-11 Jiong Wang d924 3 a926 3 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". Loose the check for symbol from ABS section. (elfNN_aarch64_size_stubs): Pass sym_sec. d928 1 a928 1 2015-08-11 Jiong Wang d930 4 a933 5 PR ld/18668 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for calls go through plt stub. (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26, JUMP26 relocation to support inserting veneer for call to plt stub. d935 1 a935 1 2015-08-11 Jiong Wang d937 3 a939 7 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. d941 1 a941 1 2015-08-11 Jiong Wang d943 4 a946 5 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. d948 1 a948 1 2015-08-11 Jiong Wang d950 1 a950 9 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. d952 1 a952 1 2015-08-11 Jiong Wang d954 1 a954 5 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC. d956 1 a956 1 2015-08-11 Jiong Wang d958 8 a965 9 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. d967 1 a967 1 2015-08-11 Jiong Wang d969 2 a970 1 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry. d972 6 a977 3 * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21. d979 1 a979 1 2015-08-11 H.J. Lu d981 10 a990 4 PR ld/18808 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC relocations in debug sections. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. d992 1 a992 1 2015-08-11 Peter Zotov d994 9 a1002 122 PR ld/18759 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE. (R_OR1K_16_PCREL): Likewise. (R_OR1K_8_PCREL): Likewise. 2015-08-11 Nick Clifton PR binutils/18747 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting opcode count. PR binutils/18758 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section group information. * peicode.h (pe_ILF_make_a_section): Ensure alignment of the used_by_bfd pointer. (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer. 2015-08-11 H.J. Lu * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo. 2015-08-10 H.J. Lu * elf-bfd.h (elf_symbol_version): New enum. (elf_link_hash_entry): Replace hidden with versioned. * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol version if the symbol is unversioned. Initialize versioned. (_bfd_elf_add_default_symbol): Don't look for symbol version if the symbol is unversioned or hidden. Initialize versioned. (elf_collect_hash_codes): Don't look for symbol version if the symbol is unversioned. (elf_collect_gnu_hash_codes): Likewise. (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise. (_bfd_elf_link_hash_copy_indirect): Check versioned instead of hidden. (elf_link_output_extsym): Likewise. 2015-08-07 H.J. Lu PR binutils/18785 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the sh_link and sh_info fields in stripped section headers, we also check if the sh_type, sh_flags, sh_addralign and sh_entsize fields of the output section match the output. Since --only-keep-debug turns all non-debug sections into SHT_NOBITS sections, the output SHT_NOBITS type matches any input type. 2015-08-07 H.J. Lu PR ld/18720 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate if the new symbol matches the existing one. The new hidden versioned symbol matches the existing symbol if they have the same symbol version. Update the existing symbol only if they match. (_bfd_elf_add_default_symbol): Update call to _bfd_elf_merge_symbol. (_bfd_elf_link_assign_sym_version): Don't set the hidden field here. (elf_link_add_object_symbols): Override a definition only if the new symbol matches the existing one. (_bfd_elf_link_hash_copy_indirect): Don't copy any references to the hidden versioned symbol. (elf_link_output_extsym): Bind a symbol locally when linking executable if it is locally defined, hidden versioned, not referenced by shared library and not exported. Turn on VERSYM_HIDDEN only if the hidden versioned symbol is defined locally. 2015-08-05 Nick Clifton * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and sh_info fields of sections whose type has been changed to SHT_NOBITS. 2015-08-04 Yuriy M. Kaminskiy" Tyler Hicks PR binutils/18750 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message and stack overflow when char is signed and \200-\376 was in place of hex digit; also fixes \377 was handled as EOF instead of "incorrect character". (ihex_read_section): Changed for consistency. (ihex_bad_byte): Prevent (now impossible to trigger) stack overflow and incorrect escape sequence handling. * srec.c (srec_bad_byte): Likewise. 2015-08-03 Hans-Peter Nilsson * elf32-cris.c (cris_elf_relocate_section) (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs) (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not just link_info->symbolic, to check if a symbol should be bound symbolically. 2015-07-30 H.J. Lu PR ld/18735 * elflink.c (_bfd_elf_add_default_symbol): Add the default symbol if not performing a relocatable link. (elf_link_add_object_symbols): Adjust the default symbol if not performing a relocatable link. 2015-07-29 H.J. Lu * elflink.c (elf_link_add_object_symbols): Remove !info->relocatable check for info->executable. Add !info->relocatable check for !info->executable. (elf_link_output_extsym): Remove !info->relocatable check for info->executable. 2015-07-29 Hans-Peter Nilsson * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type assignment loop for bfd plugin objects. 2015-07-28 Alan Modra * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new segment for loaded sections after nonloaded sections if the sections are on the same page. d1004 1 a1004 1 2015-07-28 Iain Buclaw d1006 2 a1007 2 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS. * config.in, configure: Regenerate. d1009 1 a1009 1 2015-07-27 H.J. Lu d1011 2 a1012 1 * configure: Regenerated. d1014 1 a1014 1 2015-07-27 Nick Clifton d1016 6 a1021 3 * elf32-msp430.c (uses_large_model): New function. (msp430_elf_eh_frame_address_size): New function. (elf_backend_eh_frame_address_size): Define. d1023 1 a1023 1 2015-07-27 Szabolcs Nagy d1025 3 a1027 2 PR ld/18705 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define. d1029 1 a1029 1 2015-07-27 Szabolcs Nagy d1031 21 a1051 2 PR ld/18705 * elf32-arm.c (elf_backend_extern_protected_data): Define. d1053 1 a1053 1 2015-07-25 H.J. Lu d1055 4 a1058 4 PR ld/18718 * elflink.c (elf_link_output_extsym): Check symbol version section check only if not linking executable, the symbol is referenced by shared library or not locally defined. d1060 1 a1060 1 2015-07-25 Thomas Preud'homme d1062 2 a1063 11 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. * elf32-hppa.c (elf32_hppa_check_relocs, elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section, elf32_hppa_finish_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section, nios2_elf32_check_relocs, allocate_dynrelocs): Likewise. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_relocate_section): Likewise. d1065 1 a1065 1 2015-07-24 Alan Modra d1067 2 a1068 3 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela prefix for reloc section corresponding to rela section associated with renamed debug section. d1070 1 a1070 1 2015-07-24 Alan Modra d1072 4 a1075 2 * section.c (bfd_get_section_by_name_if): Iterate over entire hash chain. d1077 1 a1077 1 2015-07-23 Joseph Myers d1079 6 a1084 3 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections) : Add target address to host address difference, not to host pointer. d1086 1 a1086 1 2015-07-22 Alan Modra d1088 4 a1091 2 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead, return -1 if symbol referenced is not defined. Tidy. d1093 1 a1093 3 2015-07-20 Alan Modra * po/SRC-POTFILES.in: Regenerate. d1095 4 a1098 1 2015-07-17 Jiong Wang d1100 1 a1100 2 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically. (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically. d1102 4 a1105 15 2015-07-16 Jiong Wang * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize BFD_RELOC_AARCH64_TLSLD_ADR_PREL21. (aarch64_reloc_got_type): Ditto. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_relocate_section): Ditto. (elfNN_aarch64_gc_sweep_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. (_bfd_aarch64_elf_resolve_relocation): Ditto. 2015-07-16 Jiong Wang * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry. a1106 3 * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_TLSLD_ADR_PREL21. d1108 1 a1108 1 2015-07-10 H.J. Lu d1110 4 a1113 49 PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. 2015-07-09 Catherine Moore * elflink.c (bfd_elf_size_dynamic_sections): Call to _bfd_elf_maybe_strip_eh_frame_hdr should be before bed->elf_backend_size_dynamic_sections. 2015-07-08 Pitchumani Sivanupandi * elf32-avr.c: Add 32 bit PC relative relocation for AVR target. 2015-07-05 Richard Sandiford * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value plus addend rather than the original st_value when looking up entries in opd->adjust. 2015-07-03 Kai Tietz Nick Clifton PR ld/11539 * coffcode.h (coff_bfd_gc_sections): Define default to bfd_coff_gc_sections function. (coff_gc_mark_hook_fn): New type. * coffgen.c (init_reloc_cookie): Copy and adjust coff related code about gc-sections from elflink.c to here. (fini_reloc_cookie): Likewise. (init_reloc_cookie_rels): Likewise. (fini_reloc_cookie_rels): Likewise. (init_reloc_cookie_for_section): Likewise. (fini_reloc_cookie_for_section): Likewise. (_bfd_coff_gc_mark_hook): Likewise. (_bfd_coff_gc_mark_rsec): Likewise. (_bfd_coff_gc_mark_reloc): Likewise. (_bfd_coff_gc_mark): Likewise. (_bfd_coff_gc_mark_extra_sections): Likewise. (coff_gc_sweep_symbol_info): Likewise. (coff_gc_sweep_symbol): Likewise. (gc_sweep_hook_fn): Likewise. (coff_gc_sweep): Likewise. (bfd_coff_gc_sections): Likewise. (_bfd_coff_gc_keep): Likewise. * libcoff-in.h (coff_reloc_cookie): New struct. (bfd_coff_gc_sections): New prototype. * libcoff.h: Regenerate. d1115 1 a1115 2 2015-07-01 Sandra Loosemore Cesar Philippidis d1117 3 a1119 31 * bfd-in2.h: Regenerated. * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to... (elf_nios2_r1_howto_table_rel): This. (elf_nios2_r2_howto_table_rel): New. (BFD_IS_R2): New. (lookup_howto): Add ABFD parameter. Adjust to look up in either the R1 or R2 relocation table, as determined by ABFD. (nios2_reloc_map): Add R2 relocations. (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to return an R1 or R2 relocation. (nios2_elf32_info_to_howto): Do lookup using lookup_howto. Pass it the ABFD parameter. (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte boundary. (nios2_elf32_relocate_section): Adjust call to lookup_howto. * libbfd.h: Regenerated. * reloc.c (BFD_RELOC_NIOS2_R2_S12): New. (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New. (BFD_RELOC_NIOS2_R2_T1I7_2): New. (BFD_RELOC_NIOS2_R2_T2I4): New. (BFD_RELOC_NIOS2_R2_T2I4_1): New. (BFD_RELOC_NIOS2_R2_T2I4_2): New. (BFD_RELOC_NIOS2_R2_X1I7_2): New. (BFD_RELOC_NIOS2_R2_X2L5): New. (BFD_RELOC_NIOS2_R2_F1I5_2): New. (BFD_RELOC_NIOS2_R2_L5I4X1): New. (BFD_RELOC_NIOS2_R2_T1X1I6): New. (BFD_RELOC_NIOS2_R2_T1X1I6_2): New. d1121 1 a1121 2 2015-07-01 Sandra Loosemore Cesar Philippidis d1123 2 a1124 141 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New. * bfd-in2.h: Regenerated. * cpu-nios2.c (nios2_compatible): New. (N): Use nios2_compatible instead of bfd_default_compatible. (NIOS2R1_NEXT, NIOS2R2_NEXT): Define. (arch_info_struct): New. (bfd_nios2_arch): Chain to NIOS2R1_NEXT. * elf32-nios2.c (is_nios2_elf): New. (nios2_elf32_merge_private_bfd_data): New. (nios2_elf32_object_p): New. (bfd_elf32_bfd_merge_private_bfd_data): Define. (elf_backend_object_p): Define. 2015-07-01 H.J. Lu * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor. 2015-06-30 Nick Clifton PR binutils/18570 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag. (write_obj_attribute): Likewise. (elf_new_obj_attr): Likewise. (bfd_elf_get_obj_attr_int): Likewise. (bfd_elf_add_obj_attr_int): Likewise. (bfd_elf_add_obj_attr_string): Likewise. (bfd_elf_add_obj_attr_int_string): Likewise. (gnu_obj_attrs_arg_type): Likewise. (_bfd_elf_obj_attrs_arg_type): Likewise. (_bfd_elf_parse_attributes): Likewise. (_bfd_elf_merge_unknown_attribute_list): Likewise. * elf-bfd.h (struct obj_attribute_list): Likewise. Update prototypes. 2015-06-28 H.J. Lu * bfd-in.h (compressed_debug_section_type): Remove COMPRESS_DEBUG_ZLIB. * bfd-in2.h : Regenerated. 2015-06-26 Matthew Fortune * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable instead of !shared to indicate an application vs shared library. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL. (_bfd_mips_elf_get_target_dtag): Likewise. 2015-06-25 DJ Delorie * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix REL loads to match RELA stores. 2015-06-25 H.J. Lu * elf.c (_bfd_elf_compute_section_file_positions): Don't initialize sh_size for .shstrtab here. 2015-06-25 H.J. Lu PR gas/18451 * elf-bfd.h (elf_sym_strtab): New. (elf_link_hash_table): Add strtabcount, strtabsize and strtab. (_bfd_elf_stringtab_init): Removed. * elf.c (_bfd_elf_stringtab_init): Removed. (_bfd_elf_compute_section_file_positions): Replace bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/ _bfd_stringtab_size with elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/ _bfd_elf_strtab_size. Use _bfd_elf_strtab_add, _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get st_name. (swap_out_syms): Likewise. * elflink.c (elf_final_link_info): Replace bfd_strtab_hash with elf_strtab_hash. Remove symbuf, symbuf_count, symbuf_size and shndxbuf_size. (elf_link_flush_output_syms): Removed. (elf_link_output_sym): Renamed to ... (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add with _bfd_elf_strtab_add. Don't flush symbols to the file nor swap out symbols. (elf_link_swap_symbols_out): New. (elf_link_output_extsym): Replace elf_link_output_sym with elf_link_output_symstrtab. (elf_link_input_bfd): Likewise. (elf_final_link_free): Replace _bfd_stringtab_free with _bfd_elf_strtab_free. Remove symbuf. (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with _bfd_elf_strtab_init. Don't set symbuf, symbuf_count, symbuf_size nor shndxbuf_size. Initialize strtabsize and strtab. Initialize symshndxbuf to -1 when number of sections >= 64K. Replace elf_link_output_sym/elf_link_output_sym with elf_link_output_symstrtab/elf_link_output_symstrtab. Don't call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize and elf_link_swap_symbols_out. Replace _bfd_stringtab_size and _bfd_stringtab_emit with _bfd_elf_strtab_size and _bfd_elf_strtab_emit. 2015-06-24 H.J. Lu * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older GCC warning. 2015-06-24 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate space for the first .plt entry. (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if there are PLT relocations. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always allocate space for the first .plt entry. (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if there are PLT relocations. 2015-06-24 H.J. Lu PR ld/18591 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation overflow. 2015-06-23 Jiong Wang * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function. (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check relocations against read-only sections. 2015-06-18 Nick Clifton PR 18481 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL. 2015-06-15 Jon Turney * bfd.c: Change struct bfd_build_id to use bfd_size_type. * bfd-in2.h : Regenerate. 2015-06-16 Alan Modra d1126 1 a1126 2 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of dynamic relocs. d1128 3 a1130 11 2015-06-10 Jon Turney * elf-bfd.h : Remove struct elf_build_id. * bfd.c : Add struct bfd_build_id. * bfd-in2.h: Regenerate. * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id. * libpei.h: Add protoype and macros for bfd_XXi_slurp_codeview_record. * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public * peicode.h (pe_bfd_read_buildid): Add. (pe_bfd_object_p): Use pe_bfd_read_buildid(). d1132 1 a1132 1 2015-06-15 Renlin Li d1134 2 a1135 5 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTOFF_LO15. d1137 1 a1137 1 2015-06-15 Alan Modra d1139 5 a1143 3 * cofflink.c (_bfd_coff_generic_relocate_section): Revert 2014-03-26 change. Call _bfd_clear_contents for relocs against local and global symbols defined in discarded input sections. d1145 1 a1145 1 2015-06-05 Nick Clifton d1147 3 a1149 3 * elf32-msp430.c (rl78_sym_diff_handler): New function. (msp430_howto_table): Use the new function for the SYM_DIFF reloc. (msp430x_howto_table): Likewise. d1151 1 a1151 1 2015-06-05 Alan Modra d1153 2 a1154 3 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text relocs with insns moved by --ppc476-workaround. Correct output of REL16 relocs. d1156 1 a1156 1 2015-06-01 Jiong Wang d1158 1 a1158 6 * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. d1160 1 a1160 1 2015-06-01 Jiong Wang d1162 3 a1164 1 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry. a1165 3 * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14. d1167 1 a1167 1 2015-06-01 Jiong Wang d1169 2 a1170 4 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12. d1172 2 a1173 1 2015-06-01 Jiong Wang d1175 96 a1270 6 * elfnn-aarch64.c (aarch64_reloc_got_type): Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_gc_swap_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. d1272 1 a1272 1 2015-06-01 Jiong Wang d1274 3 a1276 5 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15. d1278 1 a1278 3 2015-05-28 Catherine Moore Bernd Schmidt Paul Brook d1280 9 a1288 119 bfd/ * bfd-in2.h: Regenerated. * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define. (COMPACT_EH_CANT_UNWIND_OPCODE): Define. (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from eh_frame_hdr_info. (compact_eh_frame_hdr_info): Declare. (eh_frame_hdr_info): Redeclare with union for dwarf-specific fields and compact-eh fields. (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding. (bfd_elf_section_data): Add eh_frame_entry_field. (elf_section_eh_frame_entry): Define. (bfd_elf_parse_eh_frame_entries): Declare. (_bfd_elf_parse_eh_frame_entry): Declare. (_bfd_elf_end_eh_frame_parsing): Declare. (_bfd_elf_write_section_eh_frame_entry): Declare. (_bfd_elf_eh_frame_entry_present): Declare. (_bfd_elf_section_for_symbol): Declare. * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function. (bfd_elf_record_eh_frame_entry): New function. (_bfd_elf_parse_eh_frame_entry): New function. (_bfd_elf_parse_eh_frame): Update hdr_info field references. (cmp_eh_frame_hdr): New function. (add_eh_frame_hdr_terminator): New function. (_bfd_elf_end_eh_frame_parsing): New function. (find_merged_cie): Update hdr_info field references. (_bfd_elf_discard_section_eh_frame): Likewise. (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support. (_bfd_elf_eh_frame_entry_present): New function. (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support. (_bfd_elf_write_section_eh_frame_entry): New function. (_bfd_elf_write_section_eh_frame): Update hdr_info field references. (_bfd_elf_fixup_eh_frame_hdr): New function. (write_compact_eh_frame_hdr): New function. (write_dwarf_eh_frame_hdr): New function. (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support. * elflink.c (_bfd_elf_section_for_symbol): New function. (elf_section_ignore_discarded_relocs): Add Compact EH support. (elf_link_input_bfd): Likewise. (bfd_elf_final_link): Likewise. (_bfd_elf_gc_mark): Likewise. (bfd_elf_parse_eh_frame_entries): New function. (bfd_elf_gc_sections): Add Compact EH support. (bfd_elf_discard_info): Likewise. * elfxx-mips.c: Include dwarf2.h. (_bfd_mips_elf_compact_eh_encoding): New function. (_bfd_mips_elf_cant_unwind_opcode): New function. * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare. (_bfd_mips_elf_cant_unwind_opcode): Declare. (elf_backend_compact_eh_encoding): Define. (elf_backend_cant_unwind_opcode): Define. * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default. (elf_backend_cant_unwind_opcode): Provide default. (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and elf_backend_cant_unwind_opcode. * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition. 2015-05-27 H.J. Lu PR binutils/18458 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_i386_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. 2015-05-26 H.J. Lu PR binutils/18437 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations in .rel.plt/.rela.plt. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. 2015-05-19 Jiong Wang * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort relocation case labels alphabetically. (elfNN_aarch64_final_link_relocate): Ditto. (elfNN_aarch64_tls_relax): Ditto. (elfNN_aarch64_relocate_section): Ditto. (elfNN_aarch64_gc_sweep_hook): Ditto. (elfNN_aarch64_check_relocs): Ditto. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto. (_bfd_aarch64_elf_resolve_relocation): Ditto. 2015-05-18 Jiong Wang * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite comments. 2015-05-16 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section for now binding. (elf_i386_allocate_dynrelocs): Use .plt.got section for now binding. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got section for now binding. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now binding. 2015-05-14 H.J. Lu * bfd.c (bfd_update_compression_header): Also write the zlib header if the SHF_COMPRESSED bit cleared.. (bfd_check_compression_header): Return the uncompressed size. * compress.c (decompress_contents): Don't skip the zlib header. (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB, which doesn't have the zlib header. (bfd_init_section_decompress_status): Likewise. (bfd_get_full_section_contents): Updated. (bfd_is_section_compressed): Likewise. (bfd_is_section_compressed_with_header): Return the uncompressed size. * elf.c (_bfd_elf_make_section_from_shdr): Updated. * bfd-in2.h: Regenerated. d1290 1 a1290 1 2015-05-14 Jiong Wang d1292 2 a1293 2 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow check restrictions. d1295 1 a1295 1 2015-05-14 Max Filippov d1297 5 a1301 2 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference as GOT reference when plt.refcount is not positive. d1303 2 a1304 1 2015-05-12 H.J. Lu d1306 8 a1313 7 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space for the first .plt entry only if needed. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. 2015-05-11 H.J. Lu * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo. d1315 4 a1318 17 * archures.c (bfd_mach_iamcu): New. (bfd_mach_i386_iamcu): Likewise. (bfd_mach_i386_iamcu_intel_syntax): Likewise. (bfd_iamcu_arch): Likewise. (bfd_archures_list): Add &bfd_iamcu_arch. * config.bfd (targ_selvecs): Add iamcu_elf32_vec to i386_elf32_vec. (targ_archs): Add bfd_iamcu_arch if needed. * configure.ac: Support iamcu_elf32_vec. * cpu-iamcu.c: New file. * elf32-i386.c (elf32_iamcu_elf_object_p): New function. Add support for iamcu_elf32_vec and elf32_iamcu_bed. * targets.c (iamcu_elf32_vec): New. (_bfd_target_vector): Add iamcu_elf32_vec. * Makefile.in: Regenerated. * bfd-in2.h: Likewise. * configure: Likewise. d1320 2 a1321 1 2015-05-11 H.J. Lu d1323 17 a1339 1 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU. d1341 1 a1341 1 2015-05-10 H.J. Lu d1343 26 a1368 3 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd and output_bfd with abfd. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. d1370 1 a1370 1 2015-05-06 Toni Spets d1372 9 a1380 3 PR ld/18372 * peXXigen.c (rsrc_process_section): Skip discarded resource sections. d1382 1 a1382 1 2015-05-01 H.J. Lu d1384 2 a1385 1 * config.bfd: Support i[3-7]86-*-elf*. d1387 1 a1387 1 2015-04-30 H.J. Lu d1389 1 a1389 2 * elf32-i386.c (elf_backend_post_process_headers): Undef for Solaris 2. d1391 1 a1391 1 2015-04-30 Nick Clifton d1393 2 a1394 4 PR 18317 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of mep_reloc. (mep_reloc): Delete unused function. d1396 1 a1396 1 2015-04-29 Nick Clifton d1398 2 a1399 3 PR 17099 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG relocs. d1401 1 a1401 1 2015-04-27 Andreas Krebbel d1403 2 a1404 4 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function. * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call elf_s390_merge_obj_attributes. * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function. d1406 1 a1406 1 2015-04-24 Jiong Wang d1408 2 a1409 5 PR ld/18270 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for GOT_NORMAL for both sgot/srelgot section. (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address and generate necessary runtime relocation for GOT entry. d1411 1 a1411 1 2015-04-24 H.J. Lu d1413 2 a1414 2 PR binutils/18209 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input. d1416 1 a1416 1 2015-04-24 Jiong Wang d1418 2 a1419 2 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject PC-relative relocation for external symbol. d1421 1 a1421 1 2015-04-24 Nick Clifton d1423 134 a1556 3 PR 18313 * compress.c (decompress_contents): Zero initialse the z_stream structure. d1558 1 a1558 1 2015-04-24 Nick Clifton d1560 3 a1562 3 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler local labels to include local labels with a numeric suffix and fake symbols. d1564 1 a1564 1 2015-04-24 H.J. Lu d1566 4 a1569 3 PR binutils/18316 * section.c (SEC_MEP_VLIW): New. * bfd-in2.h: Regenerated. d1571 1 a1571 1 2015-04-23 H.J. Lu d1573 8 a1580 26 PR ld/18277 * compress.c (bfd_compress_section_contents): Remove the write_compress argument. (bfd_init_section_compress_status): Updated. (bfd_compress_section): Likewise. * elf.c (_bfd_elf_set_reloc_sh_name): New. (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name to (unsigned int) -1 if delay_st_name_p is TRUE. Use _bfd_elf_set_reloc_sh_name. (elf_fake_sections): Don't rename DWARF debug section for linker output if it will be compressed. Instead, set delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr. (assign_section_numbers): Call _bfd_elf_strtab_addref only if sh_name != (unsigned int) -1. Don't finalize nor assign shstrtab section here. Delay setting output section names to _bfd_elf_write_object_contents. (_bfd_elf_compute_section_file_positions): Update comments on sh_offset for shstrtab section. (assign_file_positions_for_non_load_sections): Set sh_offset to -1 for shstrtab section. (assign_file_positions_except_relocs): Likewise. (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name when compressing DWARF debug sections. Place shstrtab section after DWARF debug sections have been compressed. (_bfd_elf_write_object_contents): Setting sh_name for output sections. d1582 1 a1582 1 2015-04-23 H.J. Lu d1584 3 a1586 12 PR binutils/18209 * bfd.c (bfd): Add is_linker_input. * elf.c (convert_debug_to_zdebug): New. (convert_zdebug_to_debug): Likewise. (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME. (_bfd_elf_init_reloc_shdr): Pass a pointer to section name instead of a pointer to section. (elf_fake_sections): Rename the section name if SEC_ELF_RENAME is set. * section.c (SEC_ELF_RENAME): New. * bfd-in2.h: Regenerated. d1588 1 a1588 1 2015-04-23 Alan Modra d1590 5 a1594 59 * elf64-ppc.c (TOC_BASE_ALIGN): Define. (ppc64_elf_next_toc_section): Align multi-got toc base. (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol. 2015-04-22 H.J. Lu PR ld/18289 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref. (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0. (elf_i386_create_dynamic_sections): Always allow copy relocs for building executables. (elf_i386_copy_indirect_symbol): Also copy gotoff_ref. (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF. (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for PIE and R_386_GOTOFF. (elf_i386_relocate_section): Allow R_386_GOTOFF in executable. 2015-04-20 H.J. Lu * elf.c (assign_section_numbers): Always set up sh_name. 2015-04-20 H.J. Lu * elf.c (assign_file_positions_for_non_load_sections): Iterate sections by pointer. (_bfd_elf_assign_file_positions_for_non_load): Likewise. 2015-04-14 H.J. Lu * bfd-in.h (compressed_debug_section_type): New. * compress.c (bfd_compress_section_contents): Add an argument for linker write compression and always generate .zdebug_* section when linking. (bfd_init_section_compress_status): Pass FALSE to bfd_compress_section_contents. (bfd_compress_section): New function. * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS on DWARF debug sections if COMPRESS_DEBUG is set and rename section if COMPRESS_DEBUG_GABI_ZLIB isn't set. (assign_file_positions_for_non_load_sections): Set sh_offset to -1 if SEC_ELF_COMPRESS is set. (assign_file_positions_except_relocs): Likwise. (_bfd_elf_assign_file_positions_for_relocs): Renamed to ... (_bfd_elf_assign_file_positions_for_non_load): This. Change return time to bfd_boolean. Compress the section if SEC_ELF_COMPRESS is set. (_bfd_elf_write_object_contents): Updated. (_bfd_elf_set_section_contents): Write section contents to the buffer if SEC_ELF_COMPRESS is set. * merge.c: Include "elf-bfd.h". (sec_merge_emit): Add arguments for contents and offset. Write to contents with offset if contents isn't NULL. (_bfd_write_merged_section): Write section contents to the buffer if SEC_ELF_COMPRESS is set. Pass contents and output_offset to sec_merge_emit. * elflink.c (bfd_elf_final_link): Allocate the buffer for output section contents if SEC_ELF_COMPRESS is set. * section.c (SEC_ELF_COMPRESS): New. * bfd-in2.h: Regenerated. d1596 26 a1621 1 2015-04-15 Alan Modra d1623 1 a1623 1 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix. d1625 2 a1626 1 2015-04-14 Nick Clifton d1628 1 a1628 228 * elf32-rl78.c (RL78_OP_REL): New macro. (rl78_elf_howto_table): Use it for complex relocs. (get_symbol_value): Handle the cases when the info or status arguments are NULL. (get_romstart): Cache the status returned by get_symbol_value. (get_ramstart): Likewise. (RL78_STACK_PUSH): Generate an error message if the stack overflows. (RL78_STACK_POP): Likewise for underflows. (rl78_compute_complex_reloc): New function. Contains the basic processing code for all RL78 complex relocs. (rl78_special_reloc): New function. Provides special reloc handling for complex relocs. (rl78_elf_relocate_section): Use rl78_compute_complex_reloc. (rl78_offset_for_reloc): Likewise. 2015-04-14 H.J. Lu PR ld/pr17709 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check info->extern_protected_data when warning copy relocs against protected symbols. (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data when checking protected non-function symbols. 2015-04-13 John Baldwin * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on FreeBSD. (elfcore_write_xstatereg): Use correct note name on FreeBSD. 2015-04-13 H.J. Lu PR ld/18250 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE if the object has been claimed by plugin. 2015-04-11 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against protected data symbol when building shared library. * elf64-x86-64.c (elf_x86_64_relocate_section): Check R_X86_64_GOTOFF64 against undefined symbol and replace SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking R_X86_64_GOTOFF64 against protected data symbol when building shared library. 2015-04-10 H.J. Lu PR ld/pr17709 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF against protected data symbol when building shared library. * elf64-x86-64.c (elf_x86_64_relocate_section): Also check R_X86_64_GOTOFF64 against protected data symbol when building shared library. 2015-04-10 H.J. Lu PR ld/pr15228 PR ld/pr17709 * elf-bfd.h (elf_backend_data): Add extern_protected_data. * elf32-i386.c (elf_backend_extern_protected_data): New. Defined to 1. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on copy relocs against protected symbols if extern_protected_data is true. (_bfd_elf_symbol_refs_local_p): Don't return true on protected non-function symbols if extern_protected_data is true. * elfxx-target.h (elf_backend_extern_protected_data): New. Default to 0. (elfNN_bed): Initialize extern_protected_data with elf_backend_extern_protected_data. 2015-04-10 H.J. Lu * compress.c (bfd_compress_section_contents): Replace bfd_malloc and free with bfd_alloc and bfd_release on compressed buffer. Release buffer if compressed section isn't smaller. 2015-04-10 Alan Modra PR ld/18222 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error on adding a protected visibility variable to .dynbss. 2015-04-10 Alan Modra Revert 2015-03-05 H.J. Lu PR ld/pr15228 PR ld/pr17709 * elf-bfd.h (elf_backend_data): Delete extern_protected_data. * elf32-i386.c (elf_backend_extern_protected_data): Delete. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove extern_protected_data test. (_bfd_elf_symbol_refs_local_p): Likewise. * elfxx-target.h (elf_backend_extern_protected_data): Delete. (elfNN_bed): Delete elf_backend_extern_protected_data init. 2015-04-09 H.J. Lu * compress.c (bfd_compress_section_contents): Update comments. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. 2015-04-09 H.J. Lu * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to object_flags. (TARGET_LITTLE_SYM): Likewise. 2015-04-09 Max Filippov * elf32-xtensa.c (splay-tree.h): include header. (text_action_struct): drop next pointer. (text_action_list_struct): drop head pointer, add count and tree fields. (find_fill_action): instead of linear search in text_action_list search in the tree. (text_action_compare, action_first, action_next): new functions. (text_action_add, text_action_add_literal): instead of linear search and insertion insert new node into the tree. (removed_by_actions): pass additional parameter: action_list, use it to traverse the tree. (offset_with_removed_text): pass additional action_list parameter to removed_by_actions. (map_action_fn_context): new typedef. (map_action_fn_context_struct): new structure. (map_action_fn): new function. (map_removal_by_action): use splay_tree_foreach to build map. (find_insn_action): replace linear search in text_action_list with series of splay_tree_lookups. (print_action, print_action_list_fn): new functions. (print_action_list): use splay_tree_foreach. (init_xtensa_relax_info): drop action_list.head initialization. Initialize the tree. (compute_text_actions): use non-zero action_list_count instead of non-NULL action list. (xlate_map_context): new typedef. (xlate_map_context_struct): new structure. (xlate_map_fn): new function. (build_xlate_map): use splay_tree_foreach to build map. (action_remove_bytes_fn): new function. (relax_section): use zero action_list_count instead of NULL action list. Use splay_tree_foreach to count final section size. Drop unused variable 'removed'. 2015-04-09 Max Filippov * elf32-xtensa.c (removed_literal_map_entry): new typedef. (removed_literal_map_entry_struct): new structure. (removed_literal_list_struct): add new fields: n_map and map. (map_removed_literal, removed_literal_compare): new functions. (find_removed_literal): build index array for literals ordered by VMA, use binary search to find removed literal. 2015-04-09 Max Filippov * elf32-xtensa.c (removal_by_action_entry_struct, removal_by_action_map_struct): new structures. (removal_by_action_entry, removal_by_action_map): new typedefs. (text_action_list_struct): add new field: map. (map_removal_by_action, removed_by_actions_map, offset_with_removed_text_map): new functions. (relax_section): replace offset_with_removed_text with offset_with_removed_text_map. (translate_reloc, relax_property_section, relax_section_symbols): replace removed_by_actions with removed_by_actions_map. 2015-04-09 Max Filippov * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry, reloc_range): new typedef. (reloc_range_list_struct, reloc_range_list_entry_struct, reloc_range_struct): new structures. (reloc_range_compare, build_reloc_ranges, reloc_range_list_append, reloc_range_list_remove, reloc_range_list_update_range, free_reloc_range_list): new functions. (compute_text_actions): precompute relocation opcodes before the loop. Add relevant_relocs variable, initialize it before the loop, pass it to the check_section_ebb_pcrels_fit. (check_section_ebb_pcrels_fit): add new parameter: relevant_relocs. Update address range in the relevant_relocs if it's non-NULL and iterate only over relevant relocations. 2015-04-09 Nick Clifton * elf32-rx.c (describe_flags): Report the settings of the string insn using bits. (rx_elf_merge_private_bfd_data): Handle merging of the string insn using bits. 2015-04-08 H.J. Lu * compress.c (bfd_compress_section_contents): Work around a GCC uninitialized warning bug fixed in GCC 4.7. 2015-04-08 H.J. Lu * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI bit. * bfd.c (bfd::flags): Increase size to 18 bits. (BFD_COMPRESS_GABI): New. (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise. (bfd_update_compression_header): New fuction. (bfd_check_compression_header): Likewise. (bfd_get_compression_header_size): Likewise. (bfd_is_section_compressed_with_header): Likewise. * compress.c (MAX_COMPRESSION_HEADER_SIZE): New. (bfd_compress_section_contents): Return the uncompressed size if the full section contents is compressed successfully. Support converting from/to .zdebug* sections. (bfd_get_full_section_contents): Call bfd_get_compression_header_size to get compression header size. (bfd_is_section_compressed): Renamed to ... (bfd_is_section_compressed_with_header): This. Add a pointer argument to return compression header size. (bfd_is_section_compressed): Use it. (bfd_init_section_decompress_status): Call bfd_get_compression_header_size to get compression header size. Return FALSE if uncompressed section size is 0. * elf.c (_bfd_elf_make_section_from_shdr): Support converting from/to .zdebug* sections. * bfd-in2.h: Regenerated. d1630 4 a1633 1 2015-04-07 Alan Modra d1635 1 a1635 2 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being mapped to output .got section. d1637 2 a1638 1 2015-04-07 Alan Modra d1640 1 a1640 17 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha and has_addr16_lo. Make has_sda_refs a bitfield. (ppc_elf_check_relocs): Set new flags. (ppc_elf_link_hash_table_create): Update default_params. (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases where we won't be making .dynbss entries or editing code. Set params->pic_fixup when we'll edit code for protected var access. (allocate_dynrelocs): Allocate got entry for edited code and discard dyn_relocs. (struct ppc_elf_relax_info): Add picfixup_size. (ppc_elf_relax_section): Rename struct one_fixup to struct one_branch_fixup. Rename fixups to branch_fixups. Size space for pic fixups. (ppc_elf_relocate_section): Edit non-PIC accessing protected visibility variables to PIC. Don't emit dyn_relocs for code we've edited. * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup. d1642 2 a1643 1 2015-04-07 Nick Clifton d1645 1 a1645 2 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated local labels as local. d1647 2 a1648 1 2015-04-06 H.J. Lu d1650 1 a1650 5 * compress.c (get_uncompressed_size): Removed. (bfd_compress_section_contents): Use bfd_putb64 to write uncompressed section size. (bfd_init_section_decompress_status): Replace get_uncompressed_size with bfd_getb64. d1652 6 a1657 1 2015-04-04 H.J. Lu d1659 1 a1659 2 * elf.c (_bfd_elf_init_private_section_data): Also preserve the SHF_COMPRESSED bit if not decompress. d1661 2 a1662 1 2015-04-04 H.J. Lu d1664 1 a1664 2 * compress.c (get_uncompressed_size): New. Extracted from ... (bfd_init_section_decompress_status): This. Use it. d1666 3 a1668 1 2015-04-02 Andrew Turner d1670 1 a1670 3 * config.bfd: Add aarch64-*-freebsd* target triple. 2015-04-02 H.J. Lu d1672 36 d1710 1 a1710 3 2015-04-01 Tejas Belagod Marcus Shawcroft Jiong Wang d1712 15 a1726 36 * bfd-in.h (bfd_elf64_aarch64_set_options) (bfd_elf32_aarch64_set_options): Add parameter. * bfd-in2.h: Regenerated. * elfnn-aarch64.c (aarch64_erratum_843419_stub) (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p) (_bfd_aarch64_erratum_843419_stub_name) (_bfd_aarch64_erratum_843419_fixup) (_bfd_aarch64_erratum_843419_scan) (_bfd_aarch64_erratum_843419_branch_to_stub) (_bfd_aarch64_erratum_843419_p): Define. (enum elf_aarch64_stub_type): Define aarch64_stub_erratum_843419_veneer. (struct elf_aarch64_stub_hash_entry): Define adrp_offset. (struct elf_aarch64_link_hash_table): Define fix_erratum_843419 and fix_erratum_843419_adr. (stub_hash_newfunc): Initialize adrp_offset; (_bfd_aarch64_add_stub_entry_after): Define. (aarch64_map_one_stub, aarch64_build_one_stub) (aarch64_size_one_stub): Handle aarch64_stub_erratum_843419_veneer. (_bfd_aarch64_resize_stubs): Round stub section size. (elfNN_aarch64_size_stubs): Add scan for 843419. (bfd_elfNN_aarch64_set_options): Add parameter. Initialize fix_erratum_843419 and fix_erratum_843419_adr. (struct erratum_835769_branch_to_stub_data): Add info. (elfNN_aarch64_write_section): Initialise info. Handle 843419. (elfNN_aarch64_size_dynamic_sections): Handle 843419. * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm) (_bfd_aarch64_sign_extend): Define. (reencode_adr_imm): Remove static. Rename to: (_bfd_aarch64_reencode_adr_imm): Define. (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm. * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP) (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend) (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm): Define. d1728 1 a1728 1 2015-04-01 H.J. Lu d1730 33 d1765 1 a1765 1 2015-03-31 Ed Schouten d1767 2 a1768 10 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec for x86_64-*-cloudabi*. * configure.ac: Handle x86_64_elf64_cloudabi_vec. * configure: Regenerated. * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*. (TARGET_LITTLE_NAME): Likewise. (ELF_OSABI): Likewise. (elf64_bed): Likewise. * targets.c (x86_64_elf64_cloudabi_vec): New. (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec. d1770 1 a1770 1 2015-03-31 H.J. Lu d1772 3 a1774 39 * configure.ac: Revert the AM_ZLIB change. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. 2015-03-30 H.J. Lu PR ld/18169 * elf-bfd.h (elf_backend_data): Add get_reloc_section. (_bfd_elf_get_reloc_section): New. * elf.c (_bfd_elf_get_reloc_section): Likewise. (assign_section_numbers): Call get_reloc_section to look up the section the relocs apply. * elfxx-target.h (elf_backend_get_reloc_section): Likewise. (elfNN_bed): Initialize get_reloc_section with elf_backend_get_reloc_section. 2015-03-29 H.J. Lu * Makefile.am (ZLIB): New. (ZLIBINC): Likewise. (AM_CFLAGS): Add $(ZLIBINC). (libbfd_la_LIBADD): Add $(ZLIB). * compress.c: Don't check HAVE_ZLIB_H to include . (decompress_contents): Don't check HAVE_ZLIB_H. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * configure.ac (AM_ZLIB): Removed. (zlibdir): New. AC_SUBST. (zlibinc): Likewise. Add --with-system-zlib. * Makefile.in: Regenerated. * acinclude.m4: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. d1776 1 a1776 1 2015-03-27 Alan Modra d1778 4 a1781 5 PR ld/15228 PR ld/18167 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set protected_def when symbol section is read-only. Adjust all calls. * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment. d1783 1 a1783 1 2015-03-26 Tejas Belagod d1785 10 a1794 2 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic _bfd_final_link_relocate with aarch64_relocate. d1796 1 a1796 1 2015-03-26 H.J. Lu d1798 3 a1800 3 PR ld/18160 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible. (bfd_elf_gc_sections): Likewise. d1802 1 a1802 1 2015-03-25 Marcus Shawcroft d1804 2 a1805 5 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section size for initial branch. (elfNN_aarch64_build_stubs): Write initial branch. _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write mapping symbol on initial branch. d1807 1 a1807 1 2015-03-25 Marcus Shawcroft d1809 2 a1810 2 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan): Update erratum count. d1812 1 a1812 1 2015-03-25 Senthil Kumar Selvaraj d1814 2 a1815 2 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on first matching debug section. d1817 1 a1817 1 2015-03-24 H.J. Lu d1819 7 a1825 6 PR gas/18087 * compress.c (bfd_compress_section_contents): Don't write the zlib header and set contents as well as compress_status if compression didn't make the section smaller. (bfd_init_section_compress_status): Don't check compression size here. d1827 1 a1827 1 2015-03-24 Nick Clifton d1829 3 a1831 3 PR binutils/17512 * coffgen.c (coff_get_normalized_symtab): Fix test for out of range auxillary sections. d1833 1 a1833 1 2015-03-24 Marcus Shawcroft d1835 2 a1836 3 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor code into: (_bfd_aarch64_get_stub_for_link_section): Define. d1838 1 a1838 1 2015-03-24 Marcus Shawcroft d1840 11 a1850 2 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust update of section_group[].stub_sec. d1852 1 a1852 1 2015-03-24 Marcus Shawcroft d1854 17 a1870 10 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove. (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments. Delete fixes, fix_table_size and associated code. Call _bfd_aarch64_add_stub_entry_in_group. Rename to... (bfd_aarch64_erratum_835769_scan): Define. (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes, erratum_835769_fix_table_size, i and associated code. Relocate call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size correction. Delete construction of stub entry from erratum_835769_fixes array. d1872 1 a1872 1 2015-03-24 Marcus Shawcroft d1874 109 a1982 2 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use _bfd_aarch64_add_stub_entry_in_group. d1984 1 a1984 1 2015-03-24 Alan Modra d1986 2 a1987 6 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to stubs, even those for undefined weak symbols. Otherwise, don't report relocation overflow on branches to undefined strong symbols. Fix memory leak. * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation overflow on branches to undefined strong symbols. d1989 1 a1989 1 2015-03-23 Keith Seitz d1991 136 a2126 2 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add missing ';'. d2128 1 a2128 1 2015-03-23 Marcus Shawcroft d2130 36 a2165 3 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name construction into... (_bfd_aarch64_erratum_835769_stub_name): Define. d2167 1 a2167 1 2015-03-23 Marcus Shawcroft d2169 14 a2182 3 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out stub resize code into... (bfd_aarch64_resize_stubs): Define. d2184 1 a2184 1 2015-03-23 Marcus Shawcroft d2186 6 a2191 45 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub creation code into... (bfd_aarch64_create_stub_section): Define. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename from elf_aarch64_create_or_find_stub_sec. (_bfd_aarch64_add_stub_entry_in_group): Rename from elfNN_aarch64_add_stub. Call _bfd_aarch64_create_or_find_stub_sec. (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call _bfd_aarch64_add_stub_entry_in_group. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse sense of boolean return. (elfNN_aarch64_size_stubs): Adjust for above. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec): Remove unused parameter. (elfNN_aarch64_size_stubs): Adjust for above. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (aarch64_erratum_835769_fixes) (num_aarch64_erratum_835769_fixes): Remove. (elfNN_aarch64_size_stubs): Remove assignments to above. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn to rt2. (aarch64_erratum_seqeunce): Rename rtn to rt2. 2015-03-23 Marcus Shawcroft * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout. d2193 1 a2193 1 2015-03-19 Nick Clifton d2195 2 a2196 6 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of the RL78 core based upon the flags. (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14 flags. (rl78_elf_print_private_bfd_data): Use rl78_cpu_name. (elf32_rl78_machine): Always return bfd_mach_rl78. d2198 1 a2198 1 2015-03-19 Nick Clifton d2200 2 a2201 3 PR 18078 * compress.c (bfd_compress_section_contents): Do not define this function if it is not used. d2203 1 a2203 1 2015-03-18 H.J. Lu d2205 3 a2207 2 * compress.c (bfd_compress_section_contents): Make it static. * bfd/bfd-in2.h: Regenerated. d2209 1 a2209 1 2015-03-18 Eric Youngdale d2211 4 a2214 3 PR ld/16598 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs suitable for the AMD64. d2216 1 a2216 1 2015-03-18 Jon Turney d2219 2 a2220 9 PR binutils/18087 * coffgen.c (make_a_section_from_file): Only prepend a z to a debug section's name if the section was actually compressed. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. * compress.c (bfd_init_section_compress_status): Do not compress the section if doing so would make it bigger. In such cases leave the section alone and return COMPRESS_SECTION_NONE. 2015-03-17 Alan Modra d2222 1 a2222 2 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0 on nothing to do, before malloc of returned symbol array. d2224 2 a2225 1 2015-03-16 Nick Clifton d2227 1 a2227 3 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not stored in the elf_section_data structure then load them as necessary. d2229 6 a2234 1 2015-03-14 Andreas Krebbel d2236 1 a2236 4 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort relocs against code sections. * elf32-s390.c: Define elf_backend_sort_relocs_p. * elf64-s390.c: Likewise. d2238 2 a2239 1 2015-03-11 Alan Modra d2241 1 a2241 2 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in reverse order. Account for larger size of __tls_get_addr_opt stub. d2243 8 a2250 1 2015-03-10 Yuri Gribov d2252 4 a2255 46 PR ld/16572 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for ELF_ARM_HASENTRY. (elf32_arm_print_private_bfd_data): Likewise. 2015-03-06 Nick Clifton PR binutils/17765 * elflink.c (put_value): Like previous delta, but for the 32-bit case. 2015-03-05 Nick Clifton PR binutils/17765 * elflink.c (put_value): Avoid using an undefined shift operation. 2015-03-05 H.J. Lu PR ld/pr15228 PR ld/pr17709 * elf-bfd.h (elf_backend_data): Add extern_protected_data. * elf32-i386.c (elf_backend_extern_protected_data): New. Defined to 1. * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise. * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on copy relocs against protected symbols if extern_protected_data is true. (_bfd_elf_symbol_refs_local_p): Don't return true on protected non-function symbols if extern_protected_data is true. * elfxx-target.h (elf_backend_extern_protected_data): New. Default to 0. (elfNN_bed): Initialize extern_protected_data with elf_backend_extern_protected_data. 2015-03-05 Nick Clifton PR binutils/18025 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2 lookup fails, check for an address bias in the dwarf info, and if one exists, retry the lookup with the biased value. * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function. Determines if a bias exists bewteen the addresses of functions based on DWARF information vs symbol table information. * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype. * libbfd.h: Regenerate. d2257 1 a2257 1 2015-03-04 Marcus Shawcroft d2259 3 a2261 3 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm) (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19) (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove. d2263 1 a2263 1 2015-03-04 Marcus Shawcroft d2265 6 a2270 3 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort. (aarch64_size_one_stub): Likewise. (aarch64_map_one_stub): Likewise. d2272 1 a2272 1 2015-03-04 Andreas Arnez d2274 3 a2276 6 * cpu-s390.c (N): New macro. (bfd_s390_31_arch): New. Define only if default target word size is 64 bits. Otherwise define... (bfd_390_64_arch): ...this. Make static. (bfd_s390_arch): Define according to the default target word size. Let the 'next' field point to the alternate arch. d2278 1 a2278 1 2015-03-04 Richard Sandiford d2280 1 a2280 4 PR gas/17843 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC to be used with MOVK rather than MOVZ. d2282 1 a2282 1 2015-03-03 DJ Delorie d2284 2 a2285 2 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if there's a symbol. d2287 1 a2287 1 2015-02-28 Alan Modra d2289 1 a2289 2 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if not PLT_NEW. d2291 1 a2291 1 2015-02-27 H.J. Lu d2293 4 a2296 8 * elf32-i386.c (need_convert_mov_to_lea): New. (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed. (elf_i386_convert_mov_to_lea): Return TRUE if need_convert_mov_to_lea is unset. * elf64-x86-64.c (need_convert_mov_to_lea): New. (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed. (elf_x86_64_convert_mov_to_lea): Return TRUE if need_convert_mov_to_lea is unset. d2298 2 a2299 1 2015-02-27 Nick Clifton d2301 77 a2377 4 PR binutils/17910 * coffgen.c (_bfd_coff_internal_syment_name): Only check for string length overflow when the string table length is actually set. d2379 2 a2380 1 2015-02-27 Marcus Shawcroft d2382 2 a2383 2 * bfd/bfd-in2.h: Regenerate. * bfd/libbfd.h: Regenerate. d2385 1 a2385 1 2015-02-26 Marcus Shawcroft d2387 1 a2387 9 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix TLSDESC_LD_PREL19 field width and masks. (aarch64_tls_transition_without_check) (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate) (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section) (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSDESC_LD_PREL19. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. d2389 2 a2390 1 2015-02-26 Marcus Shawcroft d2392 1 a2392 10 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE tests. (aarch64_tls_transition_without_check) (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate) (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section) (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define. d2394 34 a2427 1 2015-02-26 Marcus Shawcroft d2429 1 a2429 9 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC) (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check) (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate) (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section) (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSGD_ADR_PREL21. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define. d2431 5 a2435 1 2015-02-26 Marcus Shawcroft d2437 1 a2437 6 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width. (aarch64_tls_transition_without_check, aarch64_reloc_got_type) (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax) (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook) (elfNN_aarch64_check_relocs): Handle BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19. d2439 2 a2440 2 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend) (_bfd_aarch64_elf_resolve_relocation): Likewise. d2442 1 a2442 1 2015-02-26 Marcus Shawcroft d2444 3 a2446 1 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width. d2448 1 a2448 1 2015-02-26 Marcus Shawcroft d2450 4 a2453 4 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2) (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC) (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field width. d2455 1 a2455 1 2015-02-26 Marcus Shawcroft d2457 2 a2458 2 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit field width. d2460 1 a2460 1 2015-02-26 Nick Clifton d2462 2 a2463 12 PR binutils/17512 * coffcode.h (coff_compute_section_file_positions): Report negative page sizes. * elf.c (elf_fake_sections): Handle excessive alignmment powers. (assign_file_positions_for_non_load_sections): Replace assertion with an error message. (rewrite_elf_program_header): Handle excessive segment alignments. * mach-o.c (bfd_mach_o_read_section_32): Likewise. (bfd_mach_o_read_section_64): Likewise. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to print a bfd name, not %A. d2465 1 a2465 1 2015-02-26 Alan Modra d2467 4 a2470 3 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build thread-safe stubs for iplt. (build_tls_get_addr_stub): Restore r2 immediately after call. d2472 1 a2472 1 2015-02-26 Terry Guo d2474 3 a2476 2 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we merge Tag_ABI_HardFP_use. d2478 1 a2478 1 2015-02-26 Alan Modra d2480 2 a2481 4 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc. Use text relocs rather than giving an error on trying to use .dynbss for protected shared lib vars. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. d2483 1 a2483 1 2015-02-25 Andrew Burgess d2485 23 a2507 62 * elf32-avr.c (struct elf_avr_section_data): New structure. (struct avr_relax_info): New structure. (elf_avr_new_section_hook): New function. (struct elf_avr_section_data): Add relax_info. (get_avr_relax_info): New function. (init_avr_relax_info): New function. (elf32_avr_relax_delete_bytes): Find next property record before deleting bytes. When deleting don't move bytes beyond the next property record. (avr_elf32_assign_records_to_section): New function. (avr_property_record_compare): New function. (avr_load_all_property_sections): New function. (elf32_avr_relax_section): Load property data. After relaxing the section, move any .align directives that have enough deleted bytes before them. (bfd_elf32_new_section_hook): Define. 2015-02-25 Andrew Burgess * elf32-avr.h (struct avr_property_header): New strucure. (avr_elf32_load_property_records): Declare. (avr_elf32_property_record_name): Declare. * elf32-avr.c: Add bfd_stdint.h include. (retrieve_local_syms): New function. (get_elf_r_symndx_section): New function. (get_elf_r_symndx_offset): New function. (internal_reloc_compare): New function. (struct avr_find_section_data): New structure. (avr_is_section_for_address): New function. (avr_find_section_for_address): New function. (avr_elf32_load_records_from_section): New function. (avr_elf32_load_property_records): New function. (avr_elf32_property_record_name): New function. 2015-02-25 Andrew Burgess * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define. (AVR_PROPERTY_RECORDS_VERSION): Define. (AVR_PROPERTY_SECTION_HEADER_SIZE): Define. (struct avr_property_record): New structure. 2015-02-24 Nick Clifton * elf32-v850.c (v850_set_note): New function. Creates a Renesas style note entry. (v850_elf_make_note_section): New function. Creates a note section. (v850_elf_create_sections): New function. Create a note section if one is not already present. (v850_elf_set_note): New function. Adds a note to a bfd. (v850_elf_copy_private_bfd_data): New function. Copies V850 notes. (v850_elf_merge_notes): New function. Merges V850 notes. (print_v850_note): New function. Displays a V850 note. (v850_elf_print_notes): New function. Displays all notes attached to a bfd. (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes. (v850_elf_print_private_bfd_data): Call v850_elf_print_notes. (v850_elf_fake_sections): Set the type of the V850 note section. * bfd-in.h (v850_elf_create_sections): Add prototype. (v850_elf_set_note): Add prototype. * bfd-in2.h: Regenerate. d2509 1 a2509 1 2015-02-24 Nick Clifton d2511 3 a2513 7 * configure.ac (AC_CHECK_HEADERS): Add wctype.h. * configure: Regenerate. * config.in: Regenerate. * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined. (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined. (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H is defined. d2515 1 a2515 1 2015-02-24 Nick Clifton d2517 2 a2518 2 * pdp11.c (set_section_contents): Pad the .text and .data sections to their aligned sizes. d2520 1 a2520 1 2015-02-23 Yoshinori Sato d2522 6 a2527 5 * config.bfd: Add h8300-*-linux. * configure.ac: Add h8300_elf32_linux_vec. * configure: Regenerate. * elf32-h8300.c: Likewise. * targets.c(_bfd_target_vector): Likewise. d2529 1 a2529 1 2015-02-23 Nick Clifton d2531 17 a2547 2 PR 17914 * cpu-w65.c: Correct typos in license notice. d2549 1 a2549 84 PR 17940 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug symbols at end of sections. Adjust function sizes. 2015-02-20 Andreas Arnez * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype. (elfcore_write_s390_vxrs_high): Likewise. * elf.c (elfcore_grok_s390_vxrs_low): New function. (elfcore_grok_s390_vxrs_high): New function. (elfcore_grok_note): Call them. (elfcore_write_s390_vxrs_low): New function. (elfcore_write_s390_vxrs_high): New function. (elfcore_write_register_note): Call them. 2015-02-19 Branko Drevensek PR 17995 * verilog.c (verilog_write_record): Correct buffer size. 2015-02-19 Alan Modra * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier. 2015-02-19 Alan Modra PR ld/4317 * elflink.c (elf_link_input_bfd): Drop undefined local syms. (elf_link_output_extsym): Drop local and global undefined syms. Tidy. Expand comment. 2015-02-17 Alan Modra PR ld/17975 * elflink.c (struct elf_outext_info): Remove need_second_pass and second_pass. (elf_link_output_extsym): Delete code handling second forced local pass. Move code emitting NULL STT_FILE symbol later, so that it can be omitted if forced local is stripped. Don't emit the NULL STT_FILE if no file symbols have been output. (bfd_elf_final_link): Remove second forced local pass. * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms. (ppc_elf_size_dynamic_sections): Likewise. * elf64-ppc.c (ppc_build_one_stub): Likewise. (build_global_entry_stubs): Likewise. (ppc64_elf_build_stubs): Likewise. 2015-02-16 H.J. Lu PR ld/17975 * elflink.c (elf_link_output_extsym): Only check filesym_count when outputting a NULL FILE symbol. Set second_pass_sym to h->forced_local && !h->root.linker_def. 2015-02-15 H.J. Lu * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def on _TLS_MODULE_BASE_. * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise. 2015-02-15 Alan Modra * dwarf2.c (read_rangelist): Correct buffer overflow check Whitespace throughout file. 2015-02-14 Alan Modra PR ld/17973 * bfd.c (struct bfd): Add lto_output. * linker.c (_bfd_handle_already_linked): Explicitly test for objects added by the lto plugin. * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and no_export flags from archive. * archive.c (open_nested_file): New function, setting lto_output and no_export, extracted from.. (find_nested_archive): ..here. Flip params. Rename from _bfd_find_nested_archive. (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file. (_bfd_look_for_bfd_in_cache): Copy no_export. * elflink.c (elf_link_add_object_symbols): Remove now unnecessary my_archive->no_export test. (elf_link_input_bfd): Drop existing lto_output STT_FILE syms. Don't use the file name when adding lto_output STT_FILE sym. * bfd-in2.h: Regenerate. d2551 3 a2553 1 2015-02-13 Alan Modra d2555 1 a2555 45 PR binutils/17512 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove now redundant assert. 2015-02-12 Nick Clifton PR binutils/17512 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes) (read_4_bytes, read_8_bytes, read_n_bytes, read_string) (read_indirect_string, read_alt_indirect_string) (read_alt_indirect_ref, read_address, read_abbrevs) (read_attribute_value, read_attribute, decode_line_info) (find_abstract_instance_name, read_rangelist) (scan_unit_for_symbols, parse_comp_unit) (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass end pointers to reading functions and check for offsets taking pointers out of range. Replace calls to read_*_leb128 with calls to safe_read_leb128. (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge offset. * syms.c (_bfd_stab_section_find_nearest_line): Add checks for computed file_name address being before the start of the string table. 2015-02-11 H.J. Lu PR ld/17878 * bfd.c (bfd_plugin_format): New. (bfd): Add plugin_format and plugin_dummy_bfd. * plugin.c (try_load_plugin): Take a pointer to bfd_boolean argument to return TRUE if any plugin is found. Set plugin_format. (has_plugin): New. (bfd_plugin_target_p): New. (bfd_plugin_specified_p): Likewise. (bfd_plugin_target_p): Likewise. (register_ld_plugin_object_p): Likewise. (bfd_plugin_set_plugin): Set has_plugin. (load_plugin): Cache try_load_plugin result. (bfd_plugin_object_p): Try ld_plugin_object_p first. Check plugin_format. * plugin.h (bfd_plugin_target_p): New. (bfd_plugin_specified_p): Likewise. (register_ld_plugin_object_p): Likewise. * bfd-in2.h: Regenerated. d2557 1 a2557 1 2015-02-11 Pedro Alves d2559 1 a2559 4 * libbfd-in.h [__cplusplus]: Open extern "C" scope. * libcoff-in.h [__cplusplus]: Open extern "C" scope. * libbfd.h: Regenerate. * libcoff.h: Regenerate. d2561 1 a2561 21 * elf-bfd.h [__cplusplus]: Wrap in extern "C". * mach-o.h [__cplusplus]: Wrap in extern "C". * som.h [__cplusplus]: Wrap in extern "C". 2015-02-10 Nick Clifton PR binutils/17512 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to hold the flag bits. * peXXigen.c (pe_print_reloc): Use unsigned types to hold the size and number of relocs. (pe_print_debugdata): Use a 32-bit aligned buffer to store the codeview record. * versados.c (process_otr): Check the esdid value before using it to access the EDATA. 2015-02-09 Ed Maste * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing uninitialized and unused variable. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. d2563 1 a2563 1 2015-02-09 Alan Modra d2565 3 a2567 451 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL tls_sec. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec. 2015-02-09 Alan Modra * elflink.c: Whitespace, formatting fixes. (elf_link_input_bfd): Clarify comment. (elf_link_output_extsym): Exclude symbols in linker created sections when testing for plugin symbols. 2015-02-07 H.J. Lu PR ld/17935 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a warning for relocation in readonly section for -z text. (elf_i386_size_dynamic_sections): Likewise. * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise. (elf_x86_64_size_dynamic_sections): Likewise. 2015-02-06 H.J. Lu PR ld/12365 PR ld/14272 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change. (elf_link_input_bfd): Mark the plugin symbol undefined if it is referenced from a non-IR file. 2015-02-06 Nick Clifton PR binutils/17512 * peXXigen.c (rsrc_print_resource_entries): Add range check for addresses that wrap around the address space. (rsrc_parse_entry): Likewise. 2015-02-03 H.J. Lu PR ld/12365 PR ld/14272 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol undefined if it is referenced from a non-IR file. 2015-02-03 Nick Clifton PR binutils/17512 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays. (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol index or an out of range fdr index. * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise. * elf32-cris.c (cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-v850.c (v850_elf_perform_relocation): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays. (bfd_mach_o_canonicalize_one_reloc): Fix check on out of range symbol indicies. (bfd_mach_o_canonicalize_relocs): Check for out of range alloc. (bfd_mach_o_canonicalize_dynamic_reloc): Likewise. (bfd_mach_o_build_dysymtab): Likewise. (bfd_mach_o_write_symtab_content): Set the string table size to zero upon error. (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the read fails. * peXXigen.c (pe_print_edata): Check for numeric overflow in edt fields. * tekhex.c (first_phase): Check for src pointer reaching end of buffer. 2015-02-03 Will Newton * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Set st_value to zero for undefined symbols if the reference is weak or pointer_equality_needed is FALSE. * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve comment discussing why we clear st_value for some symbols. 2015-02-02 Kuan-Lin Chen * elf32-nds32.c (nds32_get_section_contents): Add one more argument. (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7. 2015-01-29 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD optimization. Tidy mask for GOT_TLSGD optimization. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct location of nop zapping high insn too. 2015-01-28 Alan Modra * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc". * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols in .toc indicate xlc compiled code that might require a rw .toc. 2015-01-28 James Bowman * Makefile.am: Add FT32 files. * archures.c (enum bfd_architecture): Add bfd_arch_ft32. (bfd_mach_ft32): Define. (bfd_ft32_arch): Declare. (bfd_archures_list): Add bfd_ft32_arch. * config.bfd: Handle FT32. * configure.ac: Likewise. * cpu-ft32.c: New file. * elf32-ft32.c: New file. * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17, BFD_RELOC_FT32_18): Define. * targets.c (_bfd_target_vector): Add ft32_elf32_vec. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2015-01-27 Nick Clifton PR binutils/17512 * pdp11.c (aout_get_external_symbols): Return false if there are no symbols. * dwarf2.c (concat_filename): Check for an empty directory table. (scan_unit_for_symbols): Check for reading off the end of the unit. (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a non-string form. * elf64-ppc.c (opd_entry_value): Fail if there are no relocs available. 2015-01-26 Kuan-Lin Chen * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting. 2015-01-22 DJ Delorie * elf32-m32c.c (m32c_apply_reloc_24): New. (m32c_elf_howto_table): Use it for R_M32C_24. (m32c_elf_relocate_section): Handle R_M32C_24 specially. 2015-01-22 Nick Clifton PR binutils/17512 * coffcode.h (handle_COMDAT): When searching for the section symbol, make sure that there is space left in the symbol table. * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks. 2015-01-21 Nick Clifton PR binutils/17512 * coffcode.h (coff_set_arch_mach_hook): Check return value from bfd_malloc. (coff_slurp_line_table): Return FALSE if the line number information was corrupt. (coff_slurp_symbol_table): Return FALSE if the symbol information was corrupt. * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always initialise the fields of the dyld_info structure. (bfd_mach_o_build_exec_seg_command): Replace assertion with an error message and a return value. (bfd_mach_o_layout_commands): Change the function to boolean. Return FALSE if the function fails. (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands fails. (bfd_mach_o_read_command): Fail if an unrecognised command is encountered. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the read fails. (slurp_symtab): Check the return from bfd_malloc. (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy encountered an error. (_bfd_XXi_final_link_postscript): Fail if a section could not be copied. * peicode.h (pe_bfd_object_p): Fail if the header could not be swapped in. * tekhex.c (first_phase): Fail if the section is too big. * versados.c (struct esdid): Add content_size field. (process_otr): Use and check the new field. (versados_get_section_contents): Check that the section exists and that the requested data is available. 2015-01-20 Chung-Lin Tang * elf32-nios2.c (elf_backend_default_execstack): Define as 0. 2015-01-20 Alan Modra PR ld/17615 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop ELF_COMMON_DEF syms. 2015-01-19 Alan Modra PR ld/17615 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for linker script assignments too. * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms. (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly. 2015-01-19 Alan Modra * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration to allow return of first howto. * elf32-fr30.c (fr30_reloc_type_lookup): Likewise. * elf32-m32c.c (m32c_reloc_type_lookup): Likewise. * elf32-moxie.c (moxie_reloc_type_lookup): Likewise. * elf32-or1k.c (or1k_reloc_type_lookup): Likewise. * elf32-rl78.c (rl78_reloc_type_lookup): Likewise. * elf32-rx.c (rx_reloc_type_lookup): Likewise. * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise. * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE. * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE. (spu_elf_reloc_type_lookup): Adjust to suit. 2015-01-19 Alan Modra * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from.. (bfd_get_section_limit): ..here. * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check. (bfd_install_relocation, _bfd_final_link_relocate): Add same check here. * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check. * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated bfd_reloc_outofrange check. * bfd-in2.h: Regenerate. * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok on zero size relocs. * ecoff.c (ecoff_reloc_link_order): Likewise. * elf32-nds32.c (nds32_relocate_contents): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs. (_bfd_clear_contents): Likewise. * elfxx-mips.c (mips_elf_obtain_contents): Likewise. (mips_elf_perform_relocation): Likewise. * aoutx.h (aout_link_reloc_link_order): Allow for NULL return from malloc on zero size alloc. * cofflink.c (_bfd_coff_reloc_link_order): Likewise. * elflink.c (elf_reloc_link_order): Likewise. * linker.c (_bfd_generic_reloc_link_order): Likewise. * pdp11.c (aout_link_reloc_link_order): Likewise. * xcofflink.c (xcoff_reloc_link_order): Likewise. * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3, bitsize 0, and complain_overflow_dont. * coff-sparc.c (coff_sparc_howto_table): Likewise. * elf-hppa.h (elf_hppa_howto_table): Likewise. * elf-m10200.c (elf_mn10200_howto_table): Likewise. * elf-m10300.c (elf_mn10300_howto_table): Likewise. * elf32-arc.c (elf_arc_howto_table): Likewise. * elf32-arm.c (elf32_arm_howto_table_1): Likewise. * elf32-avr.c (elf_avr_howto_table): Likewise. * elf32-bfin.c (bfin_howto_table): Likewise. * elf32-cr16.c (cr16_elf_howto_table): Likewise. * elf32-cris.c (cris_elf_howto_table): Likewise. * elf32-crx.c (crx_elf_howto_table): Likewise. * elf32-d10v.c (elf_d10v_howto_table): Likewise. * elf32-d30v.c (elf_d30v_howto_table): Likewise. * elf32-dlx.c (dlx_elf_howto_table): Likewise. * elf32-epiphany.c (epiphany_elf_howto_table): Likewise. * elf32-fr30.c (fr30_elf_howto_table): Likewise. * elf32-frv.c (elf32_frv_howto_table): Likewise. * elf32-h8300.c (h8_elf_howto_table): Likewise. * elf32-i370.c (i370_elf_howto_raw): Likewise. * elf32-i386.c (elf_howto_table): Likewise. * elf32-i860.c (elf32_i860_howto_table): Likewise. * elf32-i960.c (elf32_i960_relocate): Likewise. * elf32-ip2k.c (ip2k_elf_howto_table): Likewise. * elf32-iq2000.c (iq2000_elf_howto_table): Likewise. * elf32-lm32.c (lm32_elf_howto_table): Likewise. * elf32-m32c.c (m32c_elf_howto_table): Likewise. * elf32-m32r.c (m32r_elf_howto_table): Likewise. * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise. * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise. * elf32-m68k.c (howto_table): Likewise. * elf32-mcore.c (mcore_elf_howto_raw): Likewise. * elf32-mep.c (mep_elf_howto_table): Likewise. * elf32-metag.c (elf_metag_howto_table): Likewise. * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise. * elf32-mips.c (elf_mips_howto_table_rel): Likewise. * elf32-moxie.c (moxie_elf_howto_table): Likewise. * elf32-msp430.c (elf_msp430_howto_table): Likewise. * elf32-mt.c (mt_elf_howto_table): Likewise. * elf32-nds32.c (nds32_elf_howto_table): Likewise. * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise. * elf32-or1k.c (or1k_elf_howto_table): Likewise. * elf32-pj.c (pj_elf_howto_table): Likewise. * elf32-ppc.c (ppc_elf_howto_raw): Likewise. * elf32-rl78.c (rl78_elf_howto_table): Likewise. * elf32-rx.c (rx_elf_howto_table): Likewise. * elf32-s390.c (elf_howto_table): Likewise. * elf32-score.c (elf32_score_howto_table): Likewise. * elf32-score7.c (elf32_score_howto_table): Likewise. * elf32-sh-relocs.h (R_SH_NONE): Likewise. * elf32-spu.c (elf_howto_table): Likewise. * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise. * elf32-tilepro.c (tilepro_elf_howto_table): Likewise. * elf32-v850.c (v850_elf_howto_table): Likewise. * elf32-vax.c (howto_table): Likewise. * elf32-visium.c (visium_elf_howto_table): Likewise. * elf32-xc16x.c (xc16x_elf_howto_table): Likewise. * elf32-xgate.c (elf_xgate_howto_table): Likewise. * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise. * elf32-xtensa.c (elf_howto_table): Likewise. * elf64-alpha.c (elf64_alpha_howto_table): Likewise. * elf64-mips.c (mips_elf64_howto_table_rel): Likewise. * elf64-mmix.c (elf_mmix_howto_table): Likewise. * elf64-ppc.c (ppc64_elf_howto_raw): Likewise. * elf64-s390.c (elf_howto_table): Likewise. * elf64-sh64.c (sh_elf64_howto_table): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Likewise. * elfn32-mips.c (elf_mips_howto_table_rel): Likewise. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. (elfNN_aarch64_howto_none): Likewise. * elfxx-ia64.c (ia64_howto_table): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise. * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise. * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise. 2015-01-15 H.J. Lu PR ld/17847 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain about -fPIC if the symbol is undefined when building executable. 2015-01-15 Nick Clifton PR binutils/17512 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an error message. Never return an invalid howto pointer. * elf32-cr16.c (cr16_info_to_howto): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. * elfn32-mips.c (sh_elf_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. (sh_elf_reloc): Check that the reloc is in range. * reloc.c (bfd_perform_relocation): Check that the section is big enough for the entire reloc. (bfd_generic_get_relocated_section_contents): Report unexpected return values from perform_reloc. 2015-01-15 Nick Clifton * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled relocs. Include PC-relative adjustment for R_MSP430X_ABS16 relaxation. 2015-01-15 Alan Modra * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for any output section matching a linker created dynobj section. 2015-01-15 Alan Modra PR 17842 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set. (bfd_elf_final_link): Always create a symbol table when emit_relocs. Don't assign symtab file position unless symbols will be output. Merge blocks with condition in common. Don't call elf_backend_output_arch_local_syms or elf_backend_output_arch_syms unless other symbols are output. Move assignment of symtab_shndx file position. Localize variable. 2015-01-14 Jiong Wang * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when trying to defer them to runtime. 2015-01-13 Thomas Preud'homme * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND to check if a symbol should be bound symbolically. 2015-01-13 Jiong Wang * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check for TLSLE_MOVW_TPREL_G2. 2015-01-13 Jiong Wang PR ld/17415 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned. * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the bit mask. 2015-01-12 Terry Guo * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New function. (_bfd_elf_gc_mark_extra_sections): Use it. 2015-01-11 H.J. Lu PR ld/17827 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE, only discard space for pc-relative relocs symbols which turn out to need copy relocs. 2015-01-09 Nick Clifton d2569 1 a2569 4 * tekhex.c (getvalue): Fix thinko in test for correct extraction of value. (getsym): Return false if there was not enough data to extract the symbol. d2571 114 a2684 1 2015-01-09 Anthony Green d2686 1 a2686 67 * elf32-moxie.c (ELF_MACHINE_ALT1): Define. 2015-01-08 Nick Clifton * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of 16-bit absolute BR instructions to 10-bit pc-relative JMP instructions. 2015-01-08 Nick Clifton PR binutils/17512 * coffcode.h (coff_slurp_symbol_table): Return false if we failed to load the line table. * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum maxpagesize of 1. * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the Data Directory Size is too large. 2015-01-06 H.J. Lu PR binutils/17512 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. 2015-01-06 Nick Clifton PR binutils/17512 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the string table. * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1. (bfd_perform_relocation): Include the size of the reloc in the test for an out of range relocation. (bfd_generic_get_relocated_section_contents): Remove reloc range test. * coff-i860.c (CALC_ADDEND): Always set an addend value. * tekhex.c (getvalue): Add an end pointer parameter. Use it to avoid reading off the end of the buffer. (getsym): Likewise. (first_phase): Likewise. (pass_over): Pass an end pointer to the invoked function. 2015-01-05 H.J. Lu PR binutils/17512 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt input. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise. 2015-01-05 Nick Clifton PR binutils/17512 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized is at least big enough for the header to be read. * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs. * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks. (bfd_mach_o_read_command): Prevetn duplicate error messages about unrecognized commands. * syms.c (_bfd_stab_section_find_nearest_line): Add range checks when indexing into the string table. 2015-01-01 Alan Modra Update year range in copyright notice of all files. For older changes see ChangeLog-2014 a2687 6 Copyright (C) 2015 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. @ 1.1.1.6 log @Import 2.26.1; please see the individual ChangeLogs for bug fixes. @ text @a0 298 2016-06-29 Tristan Gingold * version.m4: Bump version to 2.26.1 * configure: Regenerate. 2016-06-29 Tristan Gingold * development.sh: Set development to false. 2016-06-28 Alan Modra Apply from master 2016-05-19 Alan Modra * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. 2016-06-28 Alan Modra PR ld/19264 * elf64-ppc.c (STUB_SHRINK_ITER): Define. (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER if shrinking stubs. (ppc64_elf_size_stubs): Adjust to suit. 2016-06-14 Senthil Kumar Selvaraj Backport from master 2016-06-14 Senthil Kumar Selvaraj PR ld/20254 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc offsets until reloc_toaddr. 2016-06-14 H.J. Lu Backport from master 2016-06-13 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. 2016-06-13 H.J. Lu * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. 2016-06-14 H.J. Lu Backport from master 2016-06-11 H.J. Lu PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): When relocating R_386_GOT32, return error without a base register for PIC and subtract the .got.plt section address only with a base register. 2016-06-13 Senthil Kumar Selvaraj Backport from master 2016-06-08 Senthil Kumar Selvaraj PR ld/20221 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms and relocs only if shrinking occurred. 2016-06-09 Alan Modra PR ld/20159 PR ld/16467 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change. (_bfd_elf_add_default_symbol): Don't indirect to/from defined symbol given a version by a script different to the version of the symbol being added. (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and _bfd_elf_strtab_restore. Don't fudge dynstr references. * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete. (struct strtab_save): New. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions. * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare. 2016-05-20 H.J. Lu Backport from master 2016-05-20 H.J. Lu * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32 when setting need_convert_load. 2016-05-19 H.J. Lu PR ld/20117 * elf32-i386.c (elf_i386_convert_load): Don't convert R_386_GOT32. 2016-05-18 Christophe Monat Backport from master 2016-05-09 Christophe Monat PR ld/20030 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding. (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs to nb_words. (create_instruction_vldmia): Add is_dp to disambiguate SP/DP encoding. (create_instruction_vldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding, uses it to re-encode. 2016-05-15 H.J. Lu Backport from master 2016-05-13 H.J. Lu PR ld/20093 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert GOTPCREL relocation against large section. * elflink.c (bfd_elf_final_link): Likewise. 2016-05-11 Alan Modra PR 20060 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local. * elf32-ppc.c (ppc_elf_tls_setup): Likewise. 2016-04-30 H.J. Lu Backport from master 2016-04-27 H.J. Lu PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. 2016-03-29 Toni Spets PR 19878 * coffcode.h (coff_write_object_contents): Revert accidental 2014-11-10 change. 2016-03-17 H.J. Lu Backport from master 2016-03-15 H.J. Lu PR ld/19827 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol locally in PIE. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. 2016-03-15 H.J. Lu Backport from master 2016-01-30 H.J. Lu PR ld/19539 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation against STT_GNU_IFUNC symbol only with dynamic symbols. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. 2016-03-15 Nick Clifton Backport from master: 2016-03-09 Leon Winter PR ld/19623 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply relocations against absolute symbols. 2016-03-14 H.J. Lu Backport from master 2016-01-28 H.J. Lu PR binutils/19523 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to decompress debug sections. 2016-03-09 H.J. Lu PR ld/19579 Backport from master 2016-03-08 H.J. Lu * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking together. 2016-03-04 H.J. Lu * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. 2016-03-09 Nick Clifton Alan Modra PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise. 2016-03-01 H.J. Lu PR ld/19752 Backport from master 2015-12-18 H.J. Lu * coff-x86_64.c (coff_amd64_reloc): Fix formatting. 2015-12-18 Nick Clifton * coff-i386.c (coff_i386_reloc): Fix formatting. 2016-02-26 H.J. Lu Backport from master 2016-02-24 H.J. Lu PR ld/19698 * elflink.c (bfd_elf_record_link_assignment): Set versioned if symbol version is unknown. 2016-02-26 H.J. Lu Backport from master 2016-02-01 H.J. Lu PR ld/19553 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED doesn't match the symbol referenced by regular object. 2016-02-26 H.J. Lu Backport from master 2016-02-24 H.J. Lu * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. 2016-02-26 Alan Modra * elf64-ppc.c (create_linkage_sections): Create sfpr when save_restore_funcs, rest of sections when not relocatable. (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. (sfpr_define): Define all symbols on emitted code. (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created when relocatable. Move sfpr_define loop earlier. 2016-02-25 Jiong Wang Backport from master 2016-01-21 Jiong Wang * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch veneer for sym_sec != input_sec. (elfNN_aarch64_size_stub): Support STT_SECTION symbol. (elfNN_aarch64_final_link_relocate): Take rela addend into account when calculation destination. 2016-02-10 H.J. Lu Backport from master 2016-02-10 H.J. Lu PR ld/19601 * elf32-i386.c (elf_i386_relocate_section): Mask off the least significant bit in GOT offset for R_386_GOT32X. 2016-02-02 H.J. Lu Backport from master 2016-02-02 H.J. Lu PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distances in the compressed_size field of the output section. 2016-02-01 John David Anglin PR ld/19526 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output files. * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. 2016-01-25 Tristan Gingold * version.m4: Bump version to 2.26.0 * configure: Regenerate. d122 1 a122 1 Peter Bergner d182 2 a183 2 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output section to bfd_abs_section_ptr if the stub is discarded. d235 1 a235 1 Christophe Monat d1228 1 a1228 1 * aoutx.h: Replace shared, executable, relocatable and pie d1231 106 a1336 106 * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i386.c: Likewise. * coff-i960.c: Likewise. * coff-m68k.c: Likewise. * coff-mcore.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic80.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf-bfd.h: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10200.c: Likewise. * elf-m10300.c: Likewise. * elf-s390-common.c: Likewise. * elf-vxworks.c: Likewise. * elf.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-dlx.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-ft32.c: Likewise. * elf32-h8300.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i860.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-xc16x.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * i386linux.c: Likewise. * linker.c: Likewise. * m68klinux.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. d1390 1 a1390 1 * elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec". d1691 4 a1694 4 PR binutils/18656 * bfd.c (bfd_convert_section_size): New function. (bfd_convert_section_contents): Likewise. * bfd-in2.h: Regenerated. d2007 1 d2916 1 a2916 1 * bfd-in2.h: Regenerated. d3065 2 a3066 2 * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d3537 1 a3537 1 comment discussing why we clear st_value for some symbols. @ 1.1.1.7 log @Import binutils-2.27 minus the testsuites @ text @d1 1 a1 1 2016-08-03 Tristan Gingold d3 1 a3 1 * version.m4: Bump version to 2.27 d6 1 a6 1 2016-08-03 Tristan Gingold d10 1 a10 1 2016-08-02 Alan Modra d12 238 a249 2 PR ld/20428 * elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group. d251 66 a316 1 2016-07-27 Nick Clifton d318 92 a409 3 * Import this patch from the mainline: 2016-07-27 Ozkan Sezer Nick Clifton d411 2 a412 3 PR ld/20401 * coffgen.c (fini_reloc_cookie_rels): Check for the extistence of the coff_section_data before using it. d414 1 a414 1 2016-07-01 Tristan Gingold d416 1 a416 1 * version.m4: Bump version to 2.26.90 d419 56 a474 1 2016-07-01 Tristan Gingold d476 15 a490 1 * version.m4: Bump version to 2.27.51 d493 29 a521 1 2016-06-29 Nick Clifton d523 7 a529 49 * elfnn-aarch64.c (is_aarch64_mapping_symbol): New function. Returns TRUE for AArch64 mapping symbols. (elfNN_aarch64_backend_symbol_processing): New function. Marks mapping symbols as precious in object files so that they will not be stripped. (elf_backend_symbol_processing): Define. * elf32-arm.c (is_arm_mapping_symbol): New function. Returns TRUE for ARM mapping symbols. (elf32_arm_backend_symbol_processing): Make use of the new function. 2016-06-28 H.J. Lu PR ld/20306 * elflink.c (elf_link_check_versioned_symbol): Return false for unreferenced undefined symbol. 2016-06-28 Nick Clifton * elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc is needed. * elf32-arm.c (elf32_arm_backend_symbol_processing): New function. Marks mapping symbols in object files as precious, so that strip will not remove them. (elf_backend_symbol_processing): Define. 2016-06-28 James Clarke * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64. 2016-06-28 Maciej W. Rozycki * elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_PC16_S1. (mips16_reloc_map): Likewise. * elf64-mips.c (mips16_elf64_howto_table_rel): Likewise. (mips16_elf64_howto_table_rela): Likewise. (mips16_reloc_map): Likewise. * elfn32-mips.c (elf_mips16_howto_table_rel): Likewise. (elf_mips16_howto_table_rela): Likewise. (mips16_reloc_map): Likewise. * elfxx-mips.c (mips16_branch_reloc_p): New function. (mips16_reloc_p): Handle R_MIPS16_PC16_S1. (b_reloc_p): Likewise. (mips_elf_calculate_relocation): Likewise. (_bfd_mips_elf_check_relocs): Likewise. * reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation. a530 1 * libbfd.h: Regenerate. d532 320 a851 1 2016-06-27 Alan Modra d853 9 a861 5 PR ld/19264 * elf64-ppc.c (STUB_SHRINK_ITER): Define. (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER if shrinking stubs. (ppc64_elf_size_stubs): Adjust to suit. d863 1 a863 1 2016-06-27 Trevor Saunders d865 3 a867 2 * elf32-dlx.h: New file. * elf32-dlx.c: Adjust. d869 1 a869 1 2016-06-25 Trevor Saunders d871 3 a873 1 * elf32-xtensa.c (xtensa_make_property_section): Remove prototype. d875 1 a875 1 2016-06-24 John Baldwin d877 2 a878 2 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV notes. d880 1 a880 1 2016-06-24 John Baldwin d882 12 a893 7 * elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for FreeBSD. Remove case for NT_FREEBSD_THRMISC. (elfcore_grok_freebsd_psinfo): New function. (elfcore_grok_freebsd_prstatus): New function. (elfcore_grok_freebsd_note): New function. (elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD" notes. d895 1 a895 1 2016-06-24 Joel Brobecker d897 2 a898 2 * elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather than its existance. d900 1 a900 1 2016-06-24 Alan Modra d902 4 a905 2 * config.bfd: Delete mips vxworks patterns matched earlier. Combine mips*-*-none with mips*-*-elf*. d907 1 a907 1 2016-06-21 Maciej W. Rozycki d909 2 a910 5 * elfxx-mips.c (mips_elf_perform_relocation): Call `info->callbacks->einfo' rather than `*_bfd_error_handler' and use the `%X%H' format for the cross-mode jump conversion error message. Remove the full stop from the end of the message. Continue processing rather than returning failure. d912 1 a912 1 2016-06-21 Graham Markall d914 3 a916 1 * archures.c: Remove bfd_mach_arc_nps400. d918 106 a1023 3 * cpu-arc.c (arch_info_struct): Likewise. * elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing): Likewise. d1025 1 a1025 1 2016-06-20 H.J. Lu d1027 2 a1028 15 PR ld/18250 PR ld/20267 * elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is defined. (elf_link_is_defined_archive_symbol): Call bfd_link_plugin_object_p on unknown plugin object and use the IR symbol table if the input is an IR object. * plugin.c (bfd_link_plugin_object_p): New function. * plugin.h (bfd_link_plugin_object_p): New prototype. 2016-06-20 H.J. Lu PR ld/20276 * elflink.c (elf_link_add_object_symbols): Don't check alignment on symbol from plugin dummy input. d1030 1 a1030 1 2016-06-18 H.J. Lu d1032 2 a1033 5 * bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to bfd_plugin_unknown. * bfd-in2.h: Regenerated. * plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown with bfd_plugin_unknown. d1035 1 a1035 1 2016-06-18 H.J. Lu d1037 2 a1038 91 PR ld/20253 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an bfd_boolean argument. * elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace "shared object" with "PIC object" in comments. (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Replace "shared object" with "PIC object" in comments. Avoid PLT if requested. Generate dynamic relocations for non-GOT references. Make room for the special first entry in PLT and allocate PLT entry only for PLT and PC-relative references. Store dynamic GOT relocations in .rel[a].iplt section for static executables. If PLT isn't used, always use GOT for symbol value. Don't allocate GOT entry if it isn't used. * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count only in the code section. Allocate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section. (elf_i386_adjust_dynamic_symbol): Increment PLT reference count only for PC-relative references. (elf_i386_allocate_dynrelocs): Pass TRUE to _bfd_elf_allocate_ifunc_dyn_relocs. (elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X relocations against STT_GNU_IFUNC symbols without PLT. Generate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section and store it in the proper REL section. Don't allow non-pointer relocation against STT_GNU_IFUNC symbol without PLT. (elf_i386_finish_dynamic_symbol): Generate dynamic R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against STT_GNU_IFUNC symbols without PLT. (elf_i386_finish_dynamic_sections): Don't handle local STT_GNU_IFUNC symbols here. (elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC symbols here. (elf_backend_output_arch_local_syms): New. * elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference count only in the code section. Allocate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section. (elf_x86_64_adjust_dynamic_symbol): Increment PLT reference count only for PC-relative references. (elf_x86_64_allocate_dynrelocs): Pass TRUE to _bfd_elf_allocate_ifunc_dyn_relocs. (elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL, R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols without PLT. Generate dynamic pointer relocation against STT_GNU_IFUNC symbol in the non-code section and store it in the proper RELA section. Don't allow non-pointer relocation against STT_GNU_IFUNC symbol without PLT. (elf_x86_64_finish_dynamic_symbol): Generate dynamic R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against STT_GNU_IFUNC symbols without PLT. (elf_x86_64_finish_dynamic_sections): Don't handle local STT_GNU_IFUNC symbols here. (elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC symbols here. (elf_backend_output_arch_local_syms): New. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs. 2016-06-17 Thomas Preud'homme Tony Wang * elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub sequence. (stub_long_branch_thumb2_only): Define stub. (arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only. (arm_stub_long_branch_thumb2_only): Likewise. (arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2 capable targets. 2016-06-17 Jose E. Marchesi * archures.c (bfd_mach_sparc_v8plusc): Define. (bfd_mach_sparc_v9c): Likewise. (bfd_mach_sparc_v8plusd): Likewise. (bfd_mach_sparc_v9d): Likewise. (bfd_mach_sparc_v8pluse): Likewise. (bfd_mach_sparc_v9e): Likewise. (bfd_mach_sparc_v8plusv): Likewise (bfd_mach_sparc_v9v): Likewise. (bfd_mach_sparc_v8plusm): Likewise. (bfd_mach_sparc_v9m): Likewise. (bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m. (bfd_mach_sparc_64bit_p): Likewise. * bfd-in2.h: Regenerate. * cpu-sparc.c (arch_info_struct): Add entries for bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}. * aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}. * elf32-sparc.c (elf32_sparc_final_write_processing): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise. d1040 1 a1040 1 2016-06-16 H.J. Lu d1042 4 a1045 3 * elf32-i386.c (elf_i386_check_relocs): Don't check undefined symbols for relocations against IFUNC symbols. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d1047 1 a1047 1 2016-06-16 Marcin Kościelnicki d1049 3 a1051 4 * elf32-s390.c (elf_s390_finish_dynamic_sections): Include .rela.iplt in DT_PLTRELSZ. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise, for DT_PLTRELSZ and DT_RELASZ as well. d1053 1 a1053 1 2016-06-16 H.J. Lu d1055 3 a1057 3 * elf32-i386.c (elf_i386_check_relocs): Skip relocations in non-loaded, non-alloced sections. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d1059 1 a1059 1 2016-06-15 H.J. Lu d1061 2 a1062 3 * elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before allocating dynamic relocation. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d1064 2 a1065 1 2016-06-14 Senthil Kumar Selvaraj d1067 3 a1069 3 PR ld/20254 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc offsets until reloc_toaddr. d1071 1 a1071 1 2016-06-14 H.J. Lu d1073 51 a1123 40 * elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE. Don't check symbol type for STN_UNDEF symbol index. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Check R_X86_64_IRELATIVE. Don't check symbol type for STN_UNDEF symbol index. 2016-06-14 Thomas Preud'homme * elf32-arm.c (using_thumb_only): Force review of arch check logic for new architecture. (using_thumb2): Try Tag_THUMB_ISA_use first and check for exact arch value then. Force review of arch check logic for new architecture. (arch_has_arm_nop): Update and fix arch check logic. Force review of that logic for new architecture. (arch_has_thumb2_nop): Remove. (elf32_arm_tls_relax): Use using_thumb2 instead of above function. (elf32_arm_final_link_relocate): Likewise but using thumb2. 2016-06-14 Alan Modra * bfd-in.h (bfd_my_archive): Delete. * bfd-in2.h: Regenerate. 2016-06-14 Alan Modra PR ld/20241 * archive.c (open_nested_file): Set my_archive. * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name for thin archives. * bfdio.c (bfd_tell): Don't adjust origin for thin archives. (bfd_seek): Likewise. * bfdwin.c (bfd_get_file_window): Likewise. * cache.c (cache_bmmap): Likewise. (bfd_cache_lookup_worker): Don't look in my_archive for thin archives. * mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for thin archives. * plugin.c (try_claim): Likewise. * xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of file within thin archive, not the archive. d1125 1 a1125 1 2016-06-13 H.J. Lu d1127 47 a1173 5 PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt section address for R_386_GOT32/R_386_GOT32X relocations against IFUNC symbols if there is no base register and return error for PIC. d1175 1 a1175 1 2016-06-13 H.J. Lu d1177 3 a1179 2 * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC GOT32 adjustment for static executables. d1181 1 a1181 1 2016-06-13 Maciej W. Rozycki d1183 5 a1187 1 * elf32-mips.c (elf_mips_gnu_pcrel32): Update comment. d1189 1 a1189 1 2016-06-13 Cupertino Miranda d1191 3 a1193 1 * elf32-arc.c (elf_arc_relocate_section): Fixed condition. d1195 1 a1195 1 2016-06-13 Cupertino Miranda d1197 4 a1200 1 * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed. d1202 1 a1202 1 2016-06-13 Cupertino Miranda d1204 5 a1208 5 * elf32-arc.c (arc_local_data, arc_local_data): Removed. (SECTSTART): Changed. (elf_arc_relocate_section): Fixed mistake in PIE related condition. (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT. d1210 1 a1210 1 2016-06-13 Cupertino Miranda d1212 3 a1214 3 * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to enable support for "-z combreloc" and DT_RELACOUNT. (elf_backend_reloc_type_class): Likewise d1216 1 a1216 1 2016-06-11 H.J. Lu d1218 3 a1220 4 PR ld/20244 * elf32-i386.c (elf_i386_relocate_section): When relocating R_386_GOT32, return error without a base register for PIC and subtract the .got.plt section address only with a base register. d1222 1 a1222 1 2016-06-10 Alan Modra d1224 1 a1224 33 * elf-strtab.c (struct strtab_save): Use size_t for "size". (struct elf_strtab_hash): Likewise for "size" and "alloced". (_bfd_elf_strtab_init): Formatting. (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type. (_bfd_elf_strtab_addref): Take size_t idx param. (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise. (_bfd_elf_strtab_offset): Likewise. (_bfd_elf_strtab_clear_all_refs): Use size_t idx. (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars. (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly. (_bfd_elf_strtab_finalize): Similarly. * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes. (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise. (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise. * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size using bfd_size_type. (bfd_section_from_shdr): Delete amt. (_bfd_elf_init_reloc_shdr): Likewise. (_bfd_elf_link_assign_sym_version): Likewise. (assign_section_numbers): Use size_t reloc_count. * elflink.c (struct elf_symbuf_head): Use size_t "count". (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars. (elf_link_is_defined_archive_symbol): Likewise. (elf_add_dt_needed_tag): Likewise. (elf_finalize_dynstr): Likewise. (elf_link_add_object_symbols): Likewise. (bfd_elf_size_dynamic_sections): Likewise. (elf_create_symbuf): Similarly. (bfd_elf_match_symbols_in_sections): Likewise. (elf_link_swap_symbols_out): Likewise. (elf_link_check_versioned_symbol): Likewise. (bfd_elf_gc_record_vtinherit): Likewise. (bfd_elf_gc_common_finalize_got_offsets): Likewise. d1226 1 a1226 1 2016-06-08 Senthil Kumar Selvaraj d1228 4 a1231 3 PR ld/20221 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms and relocs only if shrinking occurred. d1233 1 a1233 1 2016-06-08 H.J. Lu d1235 2 a1236 18 * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr. (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2. (elf_i386_check_tls_transition): Check indirect call and direct call with the addr32 prefix for general and local dynamic models. Set the tls_get_addr feild. (elf_i386_convert_load_reloc): Always use addr32 prefix for indirect ___tls_get_addr call via GOT. (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE transitions with indirect call and direct call with the addr32 prefix. 2016-06-07 Marcin Kościelnicki * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment. * elf64-s390.c (elf_s390x_plt_entry): Fix comment. (elf_s390_relocate_section): Fix comment. (elf_s390_finish_dynamic_sections): Fix initialization of fixed .got.plt entries. d1238 1 a1238 1 2016-06-07 Ulrich Weigand d1240 5 a1244 3 * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt section offset when calculation the larl operand in the first PLT entry. d1246 1 a1246 1 2016-06-07 Alan Modra d1248 86 a1333 12 * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry to match other 32-bit archs. * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function. (ppc_elf_object_p): Call it. (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix overlong line. (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here. * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch. * bfd-in.h (_bfd_elf_ppc_at_tls_transform, _bfd_elf_ppc_at_tprel_transform): Move to.. * elf-bfd.h: ..here. (_bfd_elf_ppc_set_arch): Declare. d1336 1 a1336 1 2016-06-06 H.J. Lu d1338 5 a1342 10 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr. (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2. (elf_x86_64_check_tls_transition): Check indirect call and direct call with the addr32 prefix for general and local dynamic models. Set the tls_get_addr feild. (elf_x86_64_convert_load_reloc): Always use addr32 prefix for indirect __tls_get_addr call via GOT. (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE transitions with indirect call and direct call with the addr32 prefix. d1344 1 a1344 1 2016-06-04 Christian Groessler d1346 22 a1367 1 * coff-z8k.c (extra_case): Fix range check for R_JR relocation. d1369 1 a1369 1 2016-06-02 Nick Clifton d1371 30 a1400 5 PR target/20088 * cpu-arm.c (processors): Add "arm_any" type to match any ARM architecture. (arch_info_struct): Likewise. (architectures): Likewise. d1402 1 a1402 1 2016-06-02 Vineet Gupta d1404 3 a1406 1 * config.bfd: Replace -uclibc with *. d1408 1 a1408 1 2016-06-02 H.J. Lu d1410 2 a1411 1 * elf64-x86-64.c: Replace data32 with data16 in comments. d1413 1 a1413 1 2016-05-31 Alan Modra d1415 26 a1440 13 PR ld/20159 PR ld/16467 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change. (_bfd_elf_add_default_symbol): Don't indirect to/from defined symbol given a version by a script different to the version of the symbol being added. (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and _bfd_elf_strtab_restore. Don't fudge dynstr references. * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete. (struct strtab_save): New. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions. * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete. (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare. d1442 1 a1442 1 2016-06-01 Trevor Saunders d1444 23 a1466 3 * elf32-hppa.h: Add extern "C". * elf32-nds32.h: Likewise. * elf32-tic6x.h: Likewise. d1468 1 a1468 1 2016-06-01 Nick Clifton d1470 7 a1476 3 * po/sr.po: New Serbian translation. * configure.ac (ALL_LINGUAS): Add sr. * configure: Regenerate. d1478 1 a1478 1 2016-05-28 Maciej W. Rozycki d1480 5 a1484 3 * elfxx-mips.c (b_reloc_p): New function. (_bfd_mips_elf_relocate_section) : Handle branch relocations. d1486 1 a1486 1 2016-05-28 Maciej W. Rozycki d1488 14 a1501 4 * elfxx-mips.c (mips_elf_calculate_relocation): : Drop the region bits of the reloc location from calculation, treat the addend as signed with local non-section symbols and enable overflow detection. d1503 1 a1503 1 2016-05-28 Alan Modra d1505 24 a1528 2 * aoutx.h: Adjust linker callback calls throughout file, removing dead code. d1532 1 a1532 2 * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. d1534 1 d1541 1 a1541 3 * coff-w65.c: Likewise. * coff-z80.c: Likewise. * coff-z8k.c: Likewise. d1543 1 d1546 1 d1548 2 d1552 3 a1554 1 * elf32-arc.c: Likewise. d1563 1 d1578 1 d1581 1 d1592 2 d1597 1 d1606 1 d1608 101 a1708 114 * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * linker.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * reloc.c: Likewise. * reloc16.c: Likewise. * simple.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. * elf32-rx.c: (get_symbol_value, get_gp, get_romstart, get_ramstart): Delete status param. Adjust calls to these and linker callbacks throughout. 2016-05-27 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation) : Include the addend in JALX's target alignment verification. 2016-05-27 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): Also use the section name if `bfd_elf_string_from_elf_section' returns an empty string. 2016-05-26 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Use the `%X%H' rather than `%C' format for message. Continue processing rather than returning failure. 2016-05-25 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Call `->einfo' rather than `->warning'. Call `bfd_set_error'. 2016-05-25 H.J. Lu PR binutils/14625 * archive.c (bfd_slurp_armap): Replace bfd_elf64_archive_slurp_armap with _bfd_archive_64_bit_slurp_armap. (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if BFD64 is defined and the archive is too big. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ... (_bfd_archive_64_bit_slurp_armap): This. (bfd_elf64_archive_write_armap): Renamed to ... (_bfd_archive_64_bit_write_armap): This. * configure.ac: Add --enable-64-bit-archive. (want_64_bit_archive): New. Set to true by default for 64-bit MIPS and s390 ELF targets. (USE_64_BIT_ARCHIVE): New AC_DEFINE. * config.in: Regenerated. * configure: Likewise. * elf64-mips.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elf64-s390.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and bfd_elfNN_archive_functions isn't defined. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype. (_bfd_archive_64_bit_write_armap): Likewise. (_bfd_archive_64_bit_slurp_extended_name_table): New macro. (_bfd_archive_64_bit_construct_extended_name_table): Likewise. (_bfd_archive_64_bit_truncate_arname): Likewise. (_bfd_archive_64_bit_read_ar_hdr): Likewise. (_bfd_archive_64_bit_write_ar_hdr): Likewise. (_bfd_archive_64_bit_openr_next_archived_file): Likewise. (_bfd_archive_64_bit_get_elt_at_index): Likewise. (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise. (_bfd_archive_64_bit_update_armap_timestamp): Likewise. * libbfd.h: Regenerated. * plugin.c (plugin_vec): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined. d1710 1 a1710 1 2016-05-25 H.J. Lu d1712 1 a1712 23 PR ld/20103 * cofflink.c (coff_link_check_archive_element): Return TRUE if linker add_archive_element callback returns FALSE. * ecoff.c (ecoff_link_check_archive_element): Likewise. * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip archive element if linker add_archive_element callback returns FALSE. * elflink.c (elf_link_add_archive_symbols): Likewise. * pdp11.c (aout_link_check_ar_symbols): Likewise. * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise. * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise. (xcoff_link_check_ar_symbols): Likewise. 2016-05-24 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_relocate_section) : Unify error reporting code. 2016-05-23 Jim Wilson * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL. * relocs.c: Add BFD_RELOC_AARCH64_NULL. d1714 15 a1728 1 * libbfd.h: Likewise. d1730 1 a1730 1 2016-05-23 Kuba Sejdak d1732 5 a1736 1 * config.bfd: Add entry for arm-phoenix. d1738 1 a1738 1 2016-05-23 Thomas Preud'homme d1740 9 a1748 5 * elf32-arm.c (arm_dedicated_stub_section_padding): New function. (elf32_arm_size_stubs): Declare stub_type in a more outer scope and account for padding for stub section requiring one. (elf32_arm_build_stubs): Add comment to stress the importance of zeroing veneer section content. d1750 1 a1750 1 2016-05-23 Thomas Preud'homme d1752 1 a1752 2 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare bfd hook. d1754 5 a1758 14 * elf32-arm.c (arm_dedicated_stub_output_section_required): New function. (arm_dedicated_stub_output_section_required_alignment): Likewise. (arm_dedicated_stub_output_section_name): Likewise. (arm_dedicated_stub_input_section_ptr): Likewise. (elf32_arm_create_or_find_stub_sec): Add stub type parameter and function description comment. Add support for dedicated output stub section to given stub types. (elf32_arm_add_stub): Add a stub type parameter and pass it down to elf32_arm_create_or_find_stub_sec. (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub. (elf32_arm_size_stubs): Pass stub type when calling elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers. (bfd_elf32_arm_keep_private_stub_output_sections): New function. d1760 4 a1763 1 2016-05-20 H.J. Lu d1765 1 a1765 2 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32 when setting need_convert_load. d1767 4 a1770 1 2016-05-20 Maciej W. Rozycki d1772 1 a1772 2 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for microMIPS JALX. d1774 3 a1776 1 2016-05-19 H.J. Lu d1778 6 a1783 4 PR ld/20117 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check R_386_GOT32X. (elf_i386_convert_load): Don't convert R_386_GOT32. d1785 1 a1785 1 2016-05-20 Alan Modra d1787 1 a1787 3 PR gas/20118 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY, SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY. d1789 1 a1789 1 2016-05-19 Cupertino Miranda d1791 13 a1803 6 * elf32-arc.c (arc_elf_final_write_processing): Changed. (debug_arc_reloc): Likewise. (elf_arc_relocate_section): Likewise. (elf_arc_check_relocs): Likewise. (elf_arc_adjust_dynamic_symbol): Likewise. (elf_arc_add_symbol_hook): Likewise. d1805 1 a1805 1 2016-05-19 Maciej W. Rozycki d1807 7 a1813 1 * config.bfd: Remove `am34-*-linux*' support. d1815 1 a1815 1 2016-05-19 Alan Modra d1817 19 a1835 2 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic relocs before plt relocs. d1837 1 a1837 1 2016-05-19 Alan Modra d1839 3 a1841 2 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner before dereferencing. d1843 2 a1844 1 2016-05-18 Nick Clifton d1846 8 a1853 1 * po/sv.po: Updated Swedish translation. d1855 1 a1855 1 2016-05-18 Alan Modra d1857 5 a1861 2 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms for each BFD. Don't goto error_ret_free_local from outside loop. d1863 1 a1863 25 2016-05-17 Maciej W. Rozycki * elf-s390-common.c (elf_s390_add_symbol_hook): Remove STB_GNU_UNIQUE handling. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise. * elf32-i386.c (elf_i386_add_symbol_hook): Remove function. (elf_backend_add_symbol_hook): Remove macro. * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols' for STB_GNU_UNIQUE symbols. 2016-05-16 Maciej W. Rozycki * elf32-v850.c (v850_elf_copy_notes): New function, factored out from... (v850_elf_copy_private_bfd_data): ... here. Call the new function and `_bfd_elf_copy_private_bfd_data'. d1865 5 a1869 1 2016-05-13 H.J. Lu d1871 1 a1871 3 PR ld/20093 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert GOTPCREL relocation against large section. d1873 5 a1877 1 2016-05-13 Alan Modra d1879 1 a1879 40 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use linker dynamic sections in calculating size and address of dynamic tags rather than using output sections. Remove asserts. * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise. * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise. * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise. * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise. * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise. * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise. * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise. * elflink.c (bfd_elf_final_link): Likewise. * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise. * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message. * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and don't set doit. Look up dynobj section. (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION invocation and dynamic tag vma calculation. Don't test boolean var == TRUE. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix DT_JMPREL calc. 2016-05-13 Alan Modra * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix octets_per_byte. Put dynamic .rela.plt last in link orders. Assign output_offset for reloc sections rather than writing sorted relocs from block corresponding to output_offset. d1881 2 a1882 1 2016-05-12 Alan Modra d1884 1 a1884 1 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last. d1886 3 a1888 1 2016-05-11 Andrew Bennett d1890 1 a1890 1 * elfxx-mips.c (print_mips_ases): Add DSPR3. d1892 2 a1893 1 2016-05-11 Alan Modra d1895 1 a1895 5 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function. (elf32_hppa_check_relocs): Don't set dynobj. (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections. (elf32_hppa_build_stubs): Likewise. * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare. d1897 1 a1897 1 2016-05-11 Alan Modra d1899 1 a1899 3 PR 20060 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local. * elf32-ppc.c (ppc_elf_tls_setup): Likewise. d1901 3 a1903 1 2016-05-10 Jiong Wang d1905 1 a1905 2 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant aarch64_tls_transition check. d1907 2 a1908 1 2016-05-10 Thomas Preud'homme d1910 1 a1910 21 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type enumerator. (arm_stub_sym_claimed): New function. (elf32_arm_create_stub): Use veneered symbol name and section if veneer needs to claim its symbol, and keep logic unchanged otherwise. (arm_stub_claim_sym): New function. (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim veneered symbol, otherwise create local symbol as before. 2016-05-10 Thomas Preud'homme * elf32-arm.c (elf32_arm_size_stubs): Use new macros ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get and set branch type of a symbol. (bfd_elf32_arm_process_before_allocation): Likewise. (elf32_arm_relocate_section): Likewise and fix identation along the way. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_finish_dynamic_symbol): Likewise. (elf32_arm_swap_symbol_in): Likewise. (elf32_arm_swap_symbol_out): Likewise. d1912 2 a1913 1 2016-05-10 Thomas Preud'homme d1915 1 a1915 57 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter. * bfd-in2.h: Regenerated. * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section parameter to add_stub_section callback. (elf32_arm_create_or_find_stub_sec): Get output section from link_sec and pass it down to add_stub_section. (elf32_arm_add_stub): Set section to stub_sec if NULL before using it for error message. (elf32_arm_size_stubs): Add output section parameter to add_stub_section function pointer parameter. 2016-05-10 Thomas Preud'homme * elf32-arm.c (elf32_arm_create_stub): New function. (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation. 2016-05-10 Thomas Preud'homme * elf32-arm.c (enum elf32_arm_stub_type): Delete arm_stub_a8_veneer_lwm enumerator. (arm_stub_a8_veneer_lwm): New unsigned constant to replace aforementioned enumerator. (struct elf32_arm_stub_hash_entry): Delete target_addend field and add source_value. (struct a8_erratum_fix): Delete addend field and add target_offset. (stub_hash_newfunc): Initialize source_value field amd remove initialization for target_addend. (arm_build_one_stub): Stop special casing Thumb relocations: promote the else to being always executed, moving the arm_stub_a8_veneer_b_cond specific code in it. Remove stub_entry->target_addend from points_to computation. (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset to target symbol from start of section rather than the offset from the stub address. (elf32_arm_size_stubs): Set stub_entry's source_value and target_value fields from struct a8_erratum_fix's offset and target_offset respectively. (make_branch_to_a8_stub): Rename target variable to loc. Compute veneered_insn_loc and loc using stub_entry's source_value. 2016-05-10 Thomas Preud'homme (elf32_arm_merge_eabi_attributes): Add merging logic for Tag_DSP_extension. 2016-05-10 Pip Cet PR ld/20059 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define as _bfd_generic_copy_link_hash_symbol_type when using generic hash table. 2016-05-09 Nick Clifton PR binutils/20063 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link field before accessing sections array. d1917 4 a1920 1 2016-05-09 Christophe Monat d1922 1 a1922 9 PR ld/20030 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding. (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs to nb_words. (create_instruction_vldmia): Add is_dp to disambiguate SP/DP encoding. (create_instruction_vldmdb): Likewise. (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding, uses it to re-encode. d1924 11 a1934 1 2016-05-09 Nick Clifton d1936 1 a1936 3 PR 19938 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental commit. d1938 3 a1940 1 2016-05-09 Alan Modra d1942 1 a1942 1 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check. d1944 2 a1945 1 2016-05-06 H.J. Lu d1947 1 a1947 91 PR ld/17550 * elf-bfd.h (elf_link_hash_entry): Update comments for indx, documenting that indx == -3 if symbol is defined in a discarded section. * elflink.c (elf_link_add_object_symbols): Set indx to -3 if symbol is defined in a discarded section. (elf_link_output_extsym): Strip a global symbol defined in a discarded section. 2016-05-06 H.J. Lu * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel MCU. 2016-05-05 H.J. Lu * elf32-i386.c (elf_i386_convert_load): Extract the GOT load conversion to ... (elf_i386_convert_load_reloc): This. New function. * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load conversion to ... (elf_x86_64_convert_load_reloc): This. New function. 2016-05-05 H.J. Lu * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd. Don't check if contents == NULL. (elf_i386_tls_transition): Add from_relocate_section. Check from_relocate_section instead of contents != NULL. Update elf_i386_check_tls_transition call. (elf_i386_check_relocs): Cache the section contents if keep_memory is FALSE. Pass FALSE as from_relocate_section to elf_i386_tls_transition. (elf_i386_relocate_section): Pass TRUE as from_relocate_section to elf_i386_tls_transition. (elf_backend_caches_rawsize): New. * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check if contents == NULL. (elf_x86_64_tls_transition): Add from_relocate_section. Check from_relocate_section instead of contents != NULL. (elf_x86_64_check_relocs): Cache the section contents if keep_memory is FALSE. Pass FALSE as from_relocate_section to elf_x86_64_tls_transition. (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section to elf_x86_64_tls_transition. (elf_backend_caches_rawsize): New. 2016-05-03 Maciej W. Rozycki PR 10549 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle STB_GNU_UNIQUE. 2016-05-03 Jiong Wang * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype. * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise. * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize no_apply_dynamic_relocs. (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though dynamic relocations generated. 2016-04-29 H.J. Lu * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp setting to ... (elf_i386_create_dynamic_sections): Here. * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move interp setting to ... (elf_x86_64_create_dynamic_sections): Here. 2016-04-29 H.J. Lu * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC. (elf_i386_fixup_symbol): Pass has_got_reloc to UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_i386_allocate_dynrelocs): Likewise. (elf_i386_relocate_section): Likewise. (elf_i386_finish_dynamic_symbol): Likewise. (elf_i386_convert_load): Pass TRUE to UNDEFINED_WEAK_RESOLVED_TO_ZERO. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC. (elf_x86_64_fixup_symbol): Pass has_got_reloc to UNDEFINED_WEAK_RESOLVED_TO_ZERO. (elf_x86_64_allocate_dynrelocs): Likewise. (elf_x86_64_relocate_section): Likewise. (elf_x86_64_finish_dynamic_symbol): Likewise. (elf_x86_64_convert_load): Pass TRUE to UNDEFINED_WEAK_RESOLVED_TO_ZERO. d1949 3 a1951 1 2016-04-29 H.J. Lu d1953 1 a1953 3 * elf32-i386.c (check_relocs_failed): New. (elf_i386_check_relocs): Set check_relocs_failed on error. (elf_i386_relocate_section): Skip if check_relocs failed. d1955 2 a1956 1 2016-04-29 H.J. Lu d1958 1 a1958 2 * elf64-x86-64.c (elf_x86_64_check_relocs): Set check_relocs_failed on error. d1960 1 a1960 1 2016-04-29 Nick Clifton d1962 1 a1962 22 PR 19938 * elf-bfd.h (struct elf_backend_data): Rename elf_backend_set_special_section_info_and_link to elf_backend_copy_special_section_fields. * elfxx-target.h: Likewise. * elf.c (section_match): Ignore the SHF_INFO_LINK flag when comparing section flags. (copy_special_section_fields): New function. (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field. Perform two scans over special sections. The first one looks for a direct mapping between the output section and an input section. The second scan looks for a possible match based upon section characteristics. * elf32-arm.c (elf32_arm_copy_special_section_fields): New function. Handle setting the sh_link field of SHT_ARM_EXIDX sections. * elf32-i386.c (elf32_i386_set_special_info_link): Rename to elf32_i386_copy_solaris_special_section_fields. * elf32-sparc.c (elf32_sparc_set_special_section_info_link): Rename to elf32_sparc_copy_solaris_special_section_fields. * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to elf64_x86_64_copy_solaris_special_section_fields. d1964 2 a1965 1 2016-04-28 Nick Clifton d1967 1 a1967 1 * po/zh_CN.po: Updated Chinese (simplified) translation. d1969 9 a1977 1 2016-04-27 H.J. Lu d1979 1 a1979 3 PR ld/20006 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections when estimating distances between output sections. d1981 5 a1985 1 2016-04-27 Alan Modra d1987 1 a1987 3 * elflink.c (_bfd_elf_is_start_stop): New function. (_bfd_elf_gc_mark_rsec): Use it. * elf-bfd.h (_bfd_elf_is_start_stop): Declare. d1989 4 a1992 1 2016-04-26 Trevor Saunders d1994 1 a1994 3 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *. * mmo.c (mmo_get_section_contents): Likewise. (mmo_set_section_contents): Likewise. d1996 42 a2037 1 2016-04-26 H.J. Lu d2039 2 a2040 6 * elf-bfd.h (elf_link_hash_table): Update comments for dynsymcount. * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for the unused NULL entry at the head of dynamic symbol table. (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0 checks. d2042 31 a2072 1 2016-04-21 H.J. Lu d2074 2 a2075 2 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker created file from dynobj. d2077 141 a2217 1 2016-04-21 H.J. Lu d2219 2 a2220 2 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a normal input file if possible. d2222 1 a2222 1 2016-04-21 Nick Clifton d2224 2 a2225 34 * aout-adobe.c: Use _bfd_generic_link_check_relocs. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * binary.c: Likewise. * bout.c: Likewise. * coff-alpha.c: Likewise. * coff-rs6000.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd-in.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mmo.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * som.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * xsym.c: Likewise. * elfxx-target.h: Use _bfd_elf_link_check_relocs. * linker.c (bfd_link_check_relocs): New function. (_bfd_generic_link_check_relocs): New function. * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of _bfd_link_check_relocs field. (struct bfd_target)L Add _bfd_link_check_relocs field. d2227 6 a2232 1 * libbfd.h: Regenerate. d2234 1 a2234 1 2016-04-20 H.J. Lu d2236 5 a2240 4 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed. (elf_backend_gc_sweep_hook): Likewise. * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise. (elf_backend_gc_sweep_hook): Likewise. d2242 1 a2242 1 2016-04-20 H.J. Lu d2244 3 a2246 2 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations in excluded sections d2248 1 a2248 1 2016-04-20 H.J. Lu d2250 3 a2252 8 PR ld/19969 * elf64-x86-64.c (check_relocs_failed): New. (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. Support relocation agaist local symbol. Set check_relocs_failed. (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check R_X86_64_32 relocation overflow. (elf_x86_64_relocate_section): Skip if check_relocs failed. Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. d2254 1 a2254 1 2016-04-20 H.J. Lu d2256 3 a2258 3 * elf32-i386.c (elf_i386_check_relocs): Call _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d2260 1 a2260 1 2016-04-20 H.J. Lu d2262 6 a2267 4 * elf-bfd.h (_bfd_elf_link_check_relocs): New. * elflink.c (_bfd_elf_link_check_relocs): New function. (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs if check_relocs_after_open_input is FALSE. d2269 1 a2269 1 2016-04-20 Trevor Saunders d2271 5 a2275 4 * cache.c: Update old style function definitions. * elf32-m68k.c: Likewise. * elf64-mmix.c: Likewise. * stab-syms.c: Likewise. d2277 1 a2277 1 2016-04-20 Trevor Saunders d2279 4 a2282 1 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *. d2284 1 a2284 1 2016-04-15 H.J. Lu d2286 6 a2291 3 * Makefile.in: Regenerated with automake 1.11.6. * aclocal.m4: Likewise. * doc/Makefile.in: Likewise. d2293 1 a2293 1 2016-04-14 Andrew Burgess d2295 1 a2295 1 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry. d2298 179 a2476 55 * elf32-arc.c: Add 'opcode/arc.h' include. (struct arc_relocation_data): Add symbol_name. (arc_special_overflow_checks): New function. (arc_do_relocation): Use arc_special_overflow_checks, reindent as required, add an extra comment. (elf_arc_relocate_section): Setup symbol_name in reloc_data. 2016-04-14 Andrew Burgess * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all entries. (elf_arc_relocate_section): Update enum uses. (elf_arc_check_relocs): Likewise. (elf_arc_finish_dynamic_symbol): Likewise. 2016-04-14 H.J. Lu * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with "sh_link". 2016-04-14 Nick Clifton PR target/19938 * elf-bbfd.h (struct elf_backend_data): New field: elf_strtab_flags. New field: elf_backend_set_special_section_info_and_link * elfxx-target.h (elf_backend_strtab_flags): Define if not already defined. (elf_backend_set_special_section_info_and_link): Define if not already defined. (elfNN_bed): Use elf_backend_set_special_section_info_and_link and elf_backend_strtab_flags macros to initialise fields in structure. * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS being set even if SHF_MERGE is not set. (elf_fake_sections): Likewise. (section_match): New function. Matches two ELF sections based upon fixed characteristics. (find_link): New function. Locates a section in a BFD that matches a section in a different BFD. (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link fields of reserved sections. (bfd_elf_compute_section_file_positions): Set the flags for the .shstrtab section based upon the elf_strtab_flags field in the elf_backend_data structure. (swap_out_syms): Likewise for the .strtab section. * elflink.c (bfd_elf_final_link): Set the flags for the .strtab section based upon the elf_strtab_flags field in the elf_backend_data structure. * elf32-i386.c (elf32_i386_set_special_info_link): New function. (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris targets. (elf_backend_set_special_section_info_and_link): Define for Solaris targets. * elf32-sparc.c: Likewise. * elf64-x86-64.c: Likewise. d2478 1 a2478 1 2016-04-11 H.J. Lu d2480 1 a2480 84 PR ld/19939 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer to bfd_boolean. * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated. Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc applies to read-only section. * elf32-i386.c (elf_i386_link_hash_table): Add readonly_dynrelocs_against_ifunc. (elf_i386_allocate_dynrelocs): Updated. (elf_i386_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations only if readonly_dynrelocs_against_ifunc is TRUE. * elf64-x86-64.c (elf_x86_64_link_hash_table): Add readonly_dynrelocs_against_ifunc. (elf_x86_64_allocate_dynrelocs): Updated. (elf_x86_64_size_dynamic_sections): Issue an error for read-only segment with dynamic IFUNC relocations only if readonly_dynrelocs_against_ifunc is TRUE. * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs): Updated. 2016-04-06 Thomas Preud'homme * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be a fall through from error_ret_free_internal. Free local_syms in error_ret_free_local if allocated from bfd_elf_get_elf_syms (). 2016-04-05 Cupertino Miranda * elf32-arc.c (plt_do_relocs_for_symbol): Changed. (relocate_plt_for_entry): Likewise. 2016-04-05 Cupertino Miranda * elf32-arc.c (elf_arc_check_relocs): Changed 2016-04-05 Cupertino Miranda * elf32-arc.c (name_for_global_symbol): Changed assert. (get_replace_function): Created.: (struct arc_relocation_data): Changed to signed types. (defines S, L, P, PDATA): Casted to signed type. (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise. (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed. (arc_do_relocation): Changed. 2016-04-05 Cupertino Miranda * elf32-arc.c (name_for_global_symbol): Added assert to check for symbol index. (elf_arc_relocate_section): Added and changed asserts, validating the synamic symbol index. (elf_arc_finish_dynamic_symbol): Do not fill the dynamic relocation if symbol has dynindx set to -1. 2016-04-05 Maciej W. Rozycki * elflink.c (elf_link_add_object_symbols): Always turn hidden and internal symbols which have a dynamic index into local ones. 2016-04-04 Nick Clifton PR 19872 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised version number if the version is zero. 2016-04-01 Alan Modra PR 19886 * elflink.c (on_needed_list): Recursively check needed status. (elf_link_add_object_symbols): Adjust. 2016-03-30 Senthil Kumar Selvaraj * elf32-avr.c (avr_elf32_load_records_from_section): Free internal_relocs only if they aren't cached. 2016-03-29 Nick Clifton PR 17334 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax assertion on the size of the got section to allow it to be bigger than the number of relocs. d2482 1 a2482 1 2016-03-29 Toni Spets d2484 2 a2485 3 PR 19878 * coffcode.h (coff_write_object_contents): Revert accidental 2014-11-10 change. d2487 1 a2487 1 2016-03-22 Alan Modra d2489 4 a2492 3 PR 19850 * dwarf2.c (read_attribute_value): Skip info_ptr check for DW_FORM_flag_present. d2494 1 a2494 1 2016-03-22 Nick Clifton d2496 3 a2498 2 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an architecture name for backwards compatibility. d2500 1 a2500 2 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible unbounded stack use. d2502 4 a2505 3 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a sufficiently recent version of GCC. * configure: Regenerate. d2507 1 a2507 1 2016-03-22 Alan Modra d2509 5 a2513 2 PR 19851 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning. d2515 1 a2515 1 2016-03-21 Andrew Burgess d2517 2 a2518 6 * archures.c (bfd_mach_arc_nps400): Define. * bfd-in2.h: Regenerate. * cpu-arc.c (arch_info_struct): New entry for nps400, renumber some existing entries to make space. * elf32-arc.c (arc_elf_object_p): Add nps400 case. (arc_elf_final_write_processing): Likewise. d2520 1 a2520 1 2016-03-21 Andrew Burgess d2522 2 a2523 4 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of EF_ARC_CPU_GENERIC. (arc_elf_final_write_processing): Don't bother setting cpu field in e_flags, this will have been set elsewhere. d2525 1 a2525 1 2016-03-21 Andrew Burgess d2527 3 a2529 2 * elf32-arc.c (arc_elf_final_write_processing): Switch to using EF_ARC_MACH_MSK. d2531 1 a2531 1 2016-03-21 Nick Clifton d2533 3 a2535 11 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144 * configure: Regenerate. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of alloca with call to xmalloc. * elf32-nds32.c: Likewise. * elf64-hppa.c: Likewise. * elfxx-mips.c: Likewise. * pef.c: Likewise. * pei-x86_64.c: Likewise. * som.c: Likewise. * xsym.c: Likewise. d2537 1 a2537 1 2016-03-15 H.J. Lu d2539 3 a2541 6 PR ld/19827 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol locally in PIE. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. (elf_x86_64_relocate_section): Likewise. d2543 1 a2543 1 2016-03-15 H.J. Lu d2545 26 a2570 4 PR ld/19807 * elf64-x86-64.c (elf_x86_64_relocate_section): Check no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S relocation overflow check. d2572 1 a2572 1 2016-03-14 H.J. Lu d2574 11 d2587 1 a2587 1 2016-03-11 Dan Gissel d2589 59 a2647 14 PR 19713 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset uses bytes not octets. * elflink.c (resolve_section): Likewise. Add a bfd parameter. (eval_section): Pass the input_bfd to resolve_section. (bfd_elf_perform_complex_relocation): Convert byte offset to octets before read and writing values. (elf_link_input_bfd): Add byte to octet conversions. (elf_reloc_link_order): Likewise. (elf_fixup_link_order): Likewise. (bfd_elf_final_link): Likewise. * reloc.c (_bfd_final_link_relocate): Likewise. * syms.c (_bfd_stab_section_find_nearest_line): Likewise. d2649 1 a2649 1 2016-03-10 Nick Clifton d2651 1 a2651 1 * config.bfd: Mark the i370 target as obsolete. d2653 1 a2653 1 2016-03-09 Pedro Alves d2655 30 a2684 4 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old gcc ABI)" to printable name. * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead of "v850-rh850" as printable name. d2686 1 a2686 1 2016-03-09 Leon Winter d2688 3 a2690 3 PR ld/19623 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply relocations against absolute symbols. d2692 1 a2692 1 2016-03-09 Alan Modra d2694 8 a2701 3 PR binutils/19775 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero length elements in the archive. d2703 1 a2703 1 2016-03-08 H.J. Lu d2705 6 a2710 3 PR ld/19789 * elflink.c (elf_link_add_object_symbols): Create dynamic sections for -E/--dynamic-list only when not relocatable. d2712 1 a2712 1 2016-03-08 H.J. Lu d2714 47 a2760 4 PR ld/19784 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference count for locally defined local IFUNC symbols in shared object. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. d2762 1 a2762 1 2016-03-08 H.J. Lu d2764 3 a2766 3 PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking together. d2768 1 a2768 2 2016-03-08 Cupertino Miranda Andrew Burgess d2770 113 a2882 11 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32. (arc_bfd_put_32): Becomes an alias for bfd_put_32. (arc_elf_howto_init): Added assert to validate relocations. (get_middle_endian_relocation): Delete. (middle_endian_convert): New function. (ME): Redefine, now does nothing. (IS_ME): New define. (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO' definition to call middle_endian_convert. Add a new local variable and make use of this throughout. Added call to arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations. d2884 1 a2884 1 2016-03-07 Nick Clifton d2886 2 a2887 3 PR binutils/19775 * archive.c (bfd_generic_openr_next_archived_file): Allow zero length elements in the archive. d2889 1 a2889 1 2016-03-07 Jiong Wang d2891 17 a2907 2 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced. d2909 1 a2909 1 2016-03-04 H.J. Lu d2911 2 a2912 4 PR ld/19579 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in executable as definition if the new definition comes from a shared library. d2914 1 a2914 1 2016-03-02 Alan Modra d2916 5 a2920 2 * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. d2922 1 a2922 1 2016-02-29 Cupertino Miranda d2924 2 a2925 2 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the relocation addend when sections get merged. d2927 1 a2927 1 2016-02-29 Cupertino Miranda d2929 2 a2930 4 * elf32-arc.c (arc_elf_final_write_processing): Add condition to the flag change. (elf_arc_relocate_section): Fixes and conditions to support PIE. Assert for code sections dynamic relocs. d2932 1 a2932 1 2016-02-26 Renlin Li d2934 1 a2934 2 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2. d2936 1 a2936 1 2016-02-26 H.J. Lu d2938 1 a2938 12 PR ld/19609 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for load with locally bound symbols if PIC is false or there is no base register. Optimize branch to 0 if PIC is false. (elf_i386_relocate_section): Don't generate dynamic relocations against undefined weak symbols if PIC is false. * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization if we can't estimate relocation overflow with --no-relax. Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound symbols if PIC is false. Optimize branch to 0 if PIC is false. (elf_x86_64_relocate_section): Don't generate dynamic relocations against undefined weak symbols if PIC is false. d2940 3 a2942 1 2016-02-26 H.J. Lu d2944 2 a2945 24 PR ld/19645 * bfd.c (bfd): Change flags to 20 bits. (BFD_CONVERT_ELF_COMMON): New. (BFD_USE_ELF_STT_COMMON): Likewise. (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise. * configure.ac: Remove --enable-elf-stt-common. * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for common symbol depending on BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for STT_COMMON. * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check STT_COMMON. (elf_link_convert_common_type): New function. (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for common symbol depending on BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx. * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON and BFD_USE_ELF_STT_COMMON to object_flags. (TARGET_LITTLE_SYM): Likewise. * syms.c (BSF_KEEP_G): Renamed to ... (BSF_ELF_COMMON): This. d2947 89 d3038 1 d3040 1 a3040 1 2016-02-26 H.J. Lu d3042 5 a3046 58 PR ld/19636 PR ld/19704 PR ld/19719 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. (elf_i386_link_hash_entry): Add has_got_reloc and has_non_got_reloc. (elf_i386_link_hash_table): Add interp. (elf_i386_link_hash_newfunc): Initialize has_got_reloc and has_non_got_reloc. (elf_i386_copy_indirect_symbol): Copy has_got_reloc and has_non_got_reloc. (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc. (elf_i386_fixup_symbol): New function. (elf_i386_pie_finish_undefweak_symbol): Likewise. (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic relocations and discard relocations against resolved undefined weak symbols in executable. Don't make resolved undefined weak symbols in executable dynamic. Keep dynamic non-GOT/non-PLT relocation against undefined weak symbols in PIE. (elf_i386_size_dynamic_sections): Set interp to .interp section. (elf_i386_relocate_section): Don't generate dynamic relocations against resolved undefined weak symbols in PIE, except for R_386_PC32. (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols. Don't generate dynamic relocation against resolved undefined weak symbol in executable. (elf_i386_finish_dynamic_sections): Call elf_i386_pie_finish_undefweak_symbol on all symbols in PIE. (elf_backend_fixup_symbol): New. * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. (elf_x86_64_link_hash_entry): Add has_got_reloc and has_non_got_reloc. (elf_x86_64_link_hash_table): Add interp. (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and has_non_got_reloc. (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and has_non_got_reloc. (elf_x86_64_check_relocs): Set has_got_reloc and has_non_got_reloc. (elf_x86_64_fixup_symbol): New function. (elf_x86_64_pie_finish_undefweak_symbol): Likewise. (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic relocations and discard relocations against resolved undefined weak symbols in executable. Don't make resolved undefined weak symbols in executable dynamic. (elf_x86_64_size_dynamic_sections): Set interp to .interp section. (elf_x86_64_relocate_section): Check relocation overflow for dynamic relocations against unresolved weak undefined symbols. Don't generate dynamic relocations against resolved weak undefined symbols in PIE. (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without dynamic PLT/GOT relocations for resolved undefined weak symbols. Don't generate dynamic relocation against resolved undefined weak symbol in executable. (elf_x86_64_finish_dynamic_sections): Call elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE. (elf_backend_fixup_symbol): New. d3048 1 a3048 1 2016-02-26 Alan Modra d3050 2 a3051 6 * elf64-ppc.c (create_linkage_sections): Create sfpr when save_restore_funcs, rest of sections when not relocatable. (ppc64_elf_init_stub_bfd): Always call create_linkage_sections. (sfpr_define): Define all symbols on emitted code. (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created when relocatable. Move sfpr_define loop earlier. d3053 1 a3053 1 2016-02-24 H.J. Lu d3055 3 a3057 3 * elf64-x86-64.c (elf_x86_64_need_pic): New function. (elf_x86_64_relocate_section): Use it. Replace x86_64_elf_howto_table[r_type] with howto. d3059 1 a3059 1 2016-02-24 H.J. Lu d3061 5 a3065 3 PR ld/19698 * elflink.c (bfd_elf_record_link_assignment): Set versioned if symbol version is unknown. d3067 1 a3067 1 2016-02-24 H.J. Lu d3069 2 a3070 3 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0. * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise. d3072 1 a3072 1 2016-02-23 H.J. Lu d3074 2 a3075 3 * elflink.c (bfd_elf_record_link_assignment): Check for shared library, instead of PIC, and don't check PDE when making linker assigned symbol dynamic. d3077 1 a3077 1 2016-02-23 Faraz Shahbazker d3079 6 a3084 2 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment ABIVERSION for non-executable stack. d3086 1 a3086 1 2016-02-23 Rich Felker d3088 3 a3090 3 PR target/19516 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Always produce a RELATIVE reloc for a local symbol. d3092 1 a3092 1 2016-02-23 Hans-Peter Nilsson d3094 3 a3096 3 Fix test-case ld-elf/pr19617b * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't discard unused non-function symbols when --dynamic-list-data. d3098 1 a3098 1 2016-02-22 H.J. Lu d3100 2 a3101 2 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the dynsym section, even if it is empty, with dynamic sections. d3103 1 a3103 1 2016-02-22 H.J. Lu d3105 10 a3114 2 * syms.c: Remove BSF_COMMON from comments. * bfd-in2.h: Regenerated. d3116 1 a3116 1 2016-02-22 Jiong Wang d3118 2 a3119 3 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation for destination. Remove useless function parameters. (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub. d3121 1 a3121 1 2016-02-19 Nick Clifton d3123 6 a3128 3 PR ld/19629 * aoutx.h (aout_link_add_symbols): Check for out of range string table offsets. d3130 1 a3130 3 PR ld/19628 * reloc.c (bfd_generic_get_relocated_section_contents): Stop processing if we encounter a reloc without an associated symbol. d3132 2 a3133 1 2016-02-18 H.J. Lu d3135 1 a3135 3 PR ld/19617 * elflink.c (elf_link_add_object_symbols): Always create dynamic sections for -E/--dynamic-list. d3137 3 a3139 1 2016-02-17 H.J. Lu d3141 1 a3141 2 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined to bfd_true. d3143 3 a3145 1 2016-02-16 Joseph Myers d3147 1 a3147 4 * plugin.c (plugin_vec): Set match priority to 255. * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When matching against the plugin vector, take priority from there not from TEMP. d3149 3 a3151 1 2016-02-15 Nick Clifton d3153 1 a3153 3 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values for length and type fields. Use a signed value for the suffix_length field. d3155 7 a3161 1 2016-02-10 H.J. Lu d3163 1 a3163 3 PR ld/19601 * elf32-i386.c (elf_i386_relocate_section): Mask off the least significant bit in GOT offset for R_386_GOT32X. d3165 3 a3167 1 2016-02-10 Nick Clifton d3169 1 a3169 6 PR 19405 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed immediate values. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the number of messages about FDE encoding preventing .eh_frame_hdr generation. d3171 3 a3173 1 2016-02-09 Nick Clifton d3175 1 a3175 3 * oasys.c (oasys_archive_p): Fix indentation. * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned constant for left shifting. d3177 1 a3177 3 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more helpful warning message to explain why certain AArch64 relocs might overflow. d3179 1 a3179 1 2016-02-05 Simon Marchi d3181 3 a3183 1 * pe-mips.c (coff_mips_reloc): Fix formatting. d3185 1 a3185 1 2016-02-05 Cupertino Miranda d3187 3 a3189 2 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2 to bfd_mach_arc_arc600. d3191 1 a3191 1 2016-02-04 Alan Modra d3193 1 a3193 2 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch for big-endian. d3195 1 a3195 1 2016-02-02 H.J. Lu d3197 6 a3202 3 PR ld/19542 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated distances in the compressed_size field of the output section. d3204 1 a3204 1 2016-02-02 Alan Modra d3206 3 a3208 2 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict ELFv2 entry optimization. d3210 1 a3210 1 2016-02-02 H.J. Lu d3212 2 a3213 3 PR binutils/19547 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are no relocations in relocatable files. d3215 1 a3215 1 2016-02-01 H.J. Lu d3217 3 a3219 4 PR ld/19553 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED doesn't match the symbol referenced by regular object. d3221 2 a3222 1 2016-02-01 Nathaniel Smith d3224 25 a3248 2 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both CODE and DATA. d3250 1 a3250 1 2016-02-01 Alan Modra d3252 2 a3253 3 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on an out of range reloc_index. * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise. d3255 1 a3255 1 2016-02-01 Kamil Rytarowski d3257 46 a3302 3 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo. (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c. * Makefile.in: Regenerated. d3304 1 a3304 1 2016-02-01 Jan Kratochvil d3306 3 a3308 1 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation. d3310 1 a3310 1 2016-01-31 John David Anglin d3312 3 a3314 4 PR ld/19526 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output files. * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval. d3316 1 a3316 1 2016-01-30 H.J. Lu d3318 6 a3323 4 PR ld/19539 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation against STT_GNU_IFUNC symbol only with dynamic symbols. * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise. d3325 1 a3325 1 2016-01-28 H.J. Lu d3327 4 a3330 3 PR binutils/19523 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to decompress debug sections. d3332 1 a3332 1 2016-01-25 Maciej W. Rozycki d3334 2 a3335 2 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to `dynindx'. d3337 1 a3337 1 2016-01-25 Nick Clifton d3339 2 a3340 3 PR target/19435 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free dsym filename buffer. d3342 1 a3342 1 2016-01-24 Maciej W. Rozycki d3344 8 a3351 1 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation. d3353 1 a3353 1 2016-01-24 Maciej W. Rozycki d3355 4 a3358 1 * elfxx-mips.c (BZ16_REG): Correct calculation. d3360 1 a3360 1 2016-01-21 Nick Clifton d3362 2 a3363 3 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by changing the type of _loc to be bfd_byte *. (elf_arc_finish_dynamic_symbol): Likewise. d3365 1 a3365 1 2016-01-21 Nick Clifton d3367 160 a3526 7 PR ld/19455 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF class of the linker stub bfd. (elf32_arm_check_relocs): Skip check for pic format after processing a vxWorks R_ARM_ABS12 reloc. * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when reporting a class mismatch. d3528 1 a3528 1 2016-01-21 Jiong Wang d3530 7 a3536 5 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch veneer for sym_sec != input_sec. (elfNN_aarch64_size_stub): Support STT_SECTION symbol. (elfNN_aarch64_final_link_relocate): Take rela addend into account when calculation destination. d3538 1 a3538 1 2016-01-21 Alan Modra d3540 2 a3541 18 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function. (swap_linux_prpsinfo64_out): New function. (LINUX_PRPSINFO32_SWAP_FIELDS): Delete. (LINUX_PRPSINFO64_SWAP_FIELDS): Delete. * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset. (elfcore_write_linux_prpsinfo64): Likewise. * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function. (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete. (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset. 2016-01-21 Alan Modra * elf-linux-core.h: Rename from elf-linux-psinfo.h. * elf.c: Adjust #include. * elf32-ppc.c: Don't #include elf-linux-psinfo.h * Makefile.am (SOURCE_HFILES): Update. * Makefile.in: Regenerate. * po/SRC-PORFILES.in: Regenerate. d3543 1 a3543 1 2016-01-21 Alan Modra d3545 2 a3546 2 * configure.ac: Move corefile selection later in file. Move tdefaults code immediately after other target vector code. d3548 4 d3553 2 a3554 1 2016-01-20 Mickael Guene d3556 84 a3639 2 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread section using '.text.noread' pattern. d3641 1 a3641 1 2016-01-19 John Baldwin d3643 45 a3687 1 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes. d3689 1 a3689 49 2016-01-18 Miranda Cupertino Zissulescu Claudiu * arc-plt.def: New file. * arc-plt.h: Likewise. * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry, elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry, elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry, elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove. (name_for_global_symbol): Added. (ADD_RELA): Helper to create dynamic relocs. (new_got_entry_to_list): Create a new got entry in linked list. (symbol_has_entry_of_type): Search for specific type of entry in list. (is_reloc_for_GOT): return FALSE for any TLS related relocs. (is_reloc_for_TLS, arc_elf_set_private_flags) (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data) (arc_elf_merge_private_bfd_data): New functions. (debug_arc_reloc): Cleaned debug info printing. (PDATA reloc): Changed not to perform address alignment. (reverse_me): Added. Fix for ARC_32 relocs. (arc_do_relocation): Return bfd_reloc_of when no relocation should occur. (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets. Changed function to access an array of list of GOT entries instead of just an array of offsets. (elf_arc_relocate_section): Added support for PIC and TLS related relocations. (elf_arc_check_relocs): Likewise. (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol, (elf_arc_finish_dynamic_sections): Likewise (arc_create_dynamic_sections): Modified conditions to create dynamic sections. (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro. (plt_do_relocs_for_symbol, relocate_plt_for_symbol) (relocate_plt_for_entry): Changed to support new way to define PLT related code. (add_symbol_to_plt): Likewise. (arc_elf_link_hash_table_create): New function. 2016-01-18 Nick Clifton PR ld/19440 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external section number into internal section number. * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise. * coffswap.h (coff_swap_sym_in): Likewise. * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise. * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal section number field is big enough to hold the external value. d3691 4 a3694 1 2016-01-17 Alan Modra d3696 175 d3872 284 d4157 1 a4157 1 2016-01-12 Yury Usishchev d4159 3 a4161 3 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind when address in first unwind entry does not match start of section. d4163 1 a4163 2 2016-01-08 Richard Sandiford Jiong Wang d4165 4 a4168 3 PR ld/19368 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to reloc_class_ifunc. d4170 1 a4170 1 2016-01-06 Andrew Burgess d4172 4 a4175 4 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to place 'R_' before the reloc name returned. (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before the relocation string. d4177 1 a4177 1 2016-01-04 Maciej W. Rozycki d4179 1 a4179 3 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function, factored out from... (_bfd_mips_elf_merge_private_bfd_data): ... here. d4181 1 a4181 1 2016-01-04 Maciej W. Rozycki d4183 3 a4185 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move attribute check after ELF file header flag check. d4187 1 a4187 1 2016-01-04 Maciej W. Rozycki d4189 7 a4195 2 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the return status from `_bfd_elf_merge_object_attributes'. d4197 1 a4197 1 2016-01-04 Maciej W. Rozycki d4199 3 a4201 3 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function, factored out from... (_bfd_mips_elf_merge_private_bfd_data): ... here. d4203 1 a4203 1 2016-01-04 Maciej W. Rozycki d4205 3 a4207 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the handling of input MIPS ABI flags together. d4209 5 a4213 1 2016-01-04 Maciej W. Rozycki d4215 6 a4220 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress attribute checks for null input. d4222 1 a4222 1 2016-01-04 Maciej W. Rozycki d4224 4 a4227 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local pointers to target data. d4229 1 a4229 1 2016-01-04 Maciej W. Rozycki d4231 9 a4239 2 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct an FP ABI warning. d4241 1 a4241 1 2016-01-01 Alan Modra d4245 1 a4245 1 For older changes see ChangeLog-2015 and doc/ChangeLog-0415 d4247 1 a4247 1 Copyright (C) 2016 Free Software Foundation, Inc. @ 1.1.1.8 log @2018-01-10 Nick Clifton * config-ml.in: Sync with gcc sources. * config.guess: Likewise. * config.sub: Likewise. * configure.ac: Likewise. * configure: Regenerate. 2017-12-14 Nick Clifton * COPYING.LIBGLOSS: Update address of FSF in copyright notice. 2017-12-12 Stafford Horne * configure.ac: Remove logic adding gdb to noconfigsdirs for or1k. * configure: Regenerate. 2017-09-15 Nick Clifton * src-release.sh (LZIPPROG): New define. Provides the name of the lzip program. (do_lz): New function. Compresses a tarball using the lzip program. (do_compress): Add support for lzip compression. (usage): Mention -l option. (build_release): Support -l option to invoke lzip compression. 2017-09-15 Alan Modra * src-release.sh (do_proto_toplev): Revert last patch. Enable or disable binutils, gas, gdb, gold, gprof, ld, libdecnumber, readline, and sim depending on $tool and $support_files. Echo configure line. 2017-09-14 Matt Rice * src-release.sh (do_proto_toplev): Enable gold during release process. 2017-04-13 Andrew Jenner * config.sub: Sync with master version in config project. 2017-04-03 Andrew Jenner * config.sub: Handle ia16 in $basic_machine. bfd/ * config.bfd: Handle ia16. gas/ * configure.tgt: Handle ia16. ld/ * configure.tgt: Handle ia16. 2017-03-22 Nick Clifton * config.sub: Sync with master version in config project. * config.guess: Likewise. 2017-01-23 Nick Clifton * configure.ac: Update year in copyright notice. Sync from FSF GCC mainline, bringing in the following patches. * Makefile.def: Likewise. * Makefile.tpl: Likewise. * configure: Regenerate. * Makefile.in: Regenerate. 2016-12-21 Jakub Jelinek * configure.ac: Don't bootstrap libmpx unless --with-build-config includes bootstrap-mpx. 2016-12-01 Matthias Klose * configure.ac: Don't use pkg-config to check for bdw-gc. 2016-11-30 Matthias Klose * Makefile.def: Remove reference to boehm-gc target module. * configure.ac: Include pkg.m4, check for --with-target-bdw-gc options and for the bdw-gc pkg-config module. 2016-11-15 Matthias Klose * config-ml.in: Remove references to GCJ. * configure.ac: Likewise. 2016-09-30 Jakub Jelinek * configure.ac: Add target-libffi to target_libraries. Readd libgcj target disablings, modified to only target-libffi. Readd target addition of go to unsupported languages. 2016-09-30 Andrew Haley * Makefile.def: Remove libjava. * Makefile.tpl: Likewise. * configure.ac: Likewise. 2016-09-26 Anton Kolesov * configure.ac: Disable "sim" directory for arc*-*-*. 2016-09-12 Maciej W. Rozycki * configure.ac: Check for the minimum in-tree MPFR version handled. 2016-12-31 Alan Modra * config.sub: Import from upstream. 2016-12-08 Alan Modra * configure: Regenerate. 2016-12-02 Josh Conner * configure.ac: Add fuchsia to targets that use ELF. * configure: Regenerated. 2016-11-07 Doug Evans * config.sub: Sync with upstream version 2016-11-03. git://git.sv.gnu.org/config.git * config.guess: Sync with upstream version 2016-10-02. 2016-09-27 Simon Marchi * .gitignore: Add archives and make stamps. 2016-07-20 Yan-Ting Lin * configure.ac (nds32*-*-*): Remove entry to enable gdb. * configure: Regenerated. @ text @d1 1 a1 1 2018-01-27 Nick Clifton d3 11 a13 1 This is the 2.30 release: d15 13 a27 2 * version.m4 (BFD_VERSION): Set to 2.30 * development.sh: Set to false. a28 1 * po/bfd.pot: Regenerate. d30 1 a30 1 2018-01-27 Nick Clifton d32 2 a33 1 * po/ru.po: Updated Russian translation. d35 1 a35 1 2018-01-26 Alan Modra d37 489 a525 2 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when .branch_lt changes size. d527 1 a527 1 2018-01-25 Eric Botcazou d529 5 a533 3 PR ld/22727 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Do a mere lookup of the __tls_get_addr symbol instead of adding it. d535 945 a1479 2 Revert 2017-10-19 H.J. Lu d1481 2 a1482 7 PR ld/22263 * elfxx-sparc.c (sparc_elf_tls_transition): Replace bfd_link_pic with !bfd_link_executable, !bfd_link_pic with bfd_link_executable for TLS check. (_bfd_sparc_elf_check_relocs): Likewise. (allocate_dynrelocs): Likewise. (_bfd_sparc_elf_relocate_section): Likewise. d1484 2 a1485 1 2018-01-23 Nick Clifton d1487 2 a1488 1 * version.m4: Reset version number to 2.29.90. d1491 306 a1796 1 2018-01-20 H.J. Lu d1798 1 a1798 3 PR ld/22721 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the versioned __tls_get_addr symbol. d1800 3 a1802 1 2018-01-19 Nick Clifton d1804 1 a1804 1 * po/fr.po: Updated French translation. d1806 2 a1807 1 2018-01-18 Alan Modra d1809 1 a1809 3 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink. * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align. (ppc64_elf_build_stubs): Likewise. d1811 3 a1813 1 2018-01-18 Alan Modra d1815 1 a1815 23 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier. (CRSETEQ, BEQCTRM): Define. (is_nonpic_glink_stub): Don't check bctr. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (ppc_elf_relax_section): Size speculation barrier. (output_bctr): New function. (write_glink_stub): Use output_bctr. (ppc_elf_relocate_section): Use output_bctr for long branch stub. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Use output_bctr. * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps. * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define. (GLINK_PLTRESOLVE_SIZE): Size speculation barrier. (size_global_entry_stubs): Handle speculation barrier sizing. (plt_stub_size): Likewise. (output_bctr): New function. (build_plt_stub, build_tls_get_addr_stub): Output speculation barrier. (ppc_build_one_stub): Likewise for ppc_stub_plt_branch. (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch. (build_global_entry_stubs): Output speculation barrier. (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub. * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps. d1817 3 a1819 1 2018-01-18 Alan Modra d1821 1 a1821 1 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. d1823 2 a1824 1 2018-01-18 Alan Modra d1826 1 a1826 34 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle __tls_get_addr_opt, and alignment sizing. (TLS_GET_ADDR_GLINK_SIZE): Delete. (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE. (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6, or 8 insns. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE. (ppc_elf_size_dynamic_sections): Likewise. Size branch table by PLT reloc count. (write_glink_stub): Handle __tls_get_addr_opt stub. Pad out to size given by GLINK_ENTRY_SIZE. (ppc_elf_relocate_section): Adjust write_glink_stub call. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Write PLTresolve without using insn array since so many need rewriting. * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align. * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without nops. Adjust all uses. (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE in glink_vma calculation. (struct ppc_link_hash_table): Add global_entry section pointer. (create_linkage_sections): Create separate section for global entry stubs. (PPC_LO, PPC_HI, PPC_HA): Move earlier. (size_global_entry_stubs): Handle sizing for aligned stubs. (ppc64_elf_size_dynamic_sections): Handle global_entry alloc, and don't stash end of glink branch table in rawsize. (ppc_build_one_stub): Rewrite stub size calculations. (build_global_entry_stubs): Use new section. (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops. Build lazy link stubs out to end of section. Build global entry stubs in new section. d1828 2 a1829 1 2018-01-17 Nick Clifton d1831 1 a1831 2 * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. d1833 3 a1835 1 2018-01-15 Nick Clifton d1837 1 a1837 1 * po/uk.po: Updated Ukranian translation. d1839 266 a2104 1 2018-01-13 Nick Clifton a2105 1 * version.m4 (BFD_VERSION): Change to 2.30.0. a2106 1 * po/bfd.pot: Regenerate. d2108 8 a2115 1 2018-01-13 Nick Clifton d2117 3 a2119 1 2.30 branch created. d2121 1 a2121 1 2018-01-12 Jens Widell d2123 4 a2126 3 * elf.c (setup_group): Optimize search for group by remembering last found group and restarting search at that index. * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field. d2128 1 a2128 1 2018-01-12 Gunther Nikl d2130 3 a2132 2 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle bfd_link_common_skip_none in switch. d2134 1 a2134 1 2018-01-12 Alan Modra d2136 2 a2137 3 PR ld/22649 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic references on forced local symbols. d2139 1 a2139 1 2018-01-12 Vlad Ivanov d2141 2 a2142 2 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. d2144 1 a2144 1 2018-01-11 H.J. Lu d2146 3 a2148 6 PR ld/22393 * elf.c (_bfd_elf_map_sections_to_segments): When generating separate code and read-only data LOAD segments, create a new LOAD segment if the previous section contains text and the current section doesn't or vice versa. Don't put a writable section in a read-only segment if there is a RELRO segment. d2150 1 a2150 1 2018-01-11 H.J. Lu d2152 2 a2153 3 PR ld/22649 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic references on forced local symbols. d2155 1 a2155 1 2018-01-11 H.J. Lu d2157 2 a2158 3 PR ld/22677 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY, INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section. d2160 1 a2160 1 2017-09-27 Kuan-Lin Chen d2162 2 a2163 2 PR 22662 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error. d2165 1 a2165 1 2018-01-03 John Baldwin d2167 2 a2168 3 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and NT_FREEBSD_PROCSTAT_VMMAP. d2170 1 a2170 1 2018-01-03 Alan Modra d2174 1 a2174 1 For older changes see ChangeLog-2017 d2176 1 a2176 1 Copyright (C) 2018 Free Software Foundation, Inc. @ 1.1.1.9 log @2018-07-18 Nick Clifton 2.31.1 Release point. 2018-07-18 Nick Clifton * (DEVO_SUPPORT): Fix typo in previous delta. (do_proto_toplev): Add --quiet option to configure command line. 2018-07-16 Nick Clifton * src-release.sh (DEVO_SUPPORT): Add test-driver and ar-lib. 2018-07-06 Sebastian Huber * config.sub: Sync with upstream version 2018-07-03. 2018-07-05 Sebastian Huber * config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. 2018-06-24 Nick Clifton * configure: Regenerate. 2018-06-19 Simon Marchi * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * README-maintainer-mode: Update version requirements. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. 2018-06-18 Eric Botcazou * Makefile.def (fortran): Add check-target-libgomp-fortran. * Makefile.tpl (check-target-libgomp-fortran): New phony target. * Makefile.in: Regenerate. * configure: Regenerate. 2018-06-18 Simon Marchi * configure.ac: Sync with GCC, remove MPX-related things. 2018-05-01 Nick Clifton * config.guess: Synchronize with config project master sources. * config.sub: Likewise. 2018-05-01 Francois H. Theron * configure.ac: Added "nfp" target. * configure: Regenerate. 2018-02-13 Maciej W. Rozycki * configure.ac (noconfigdirs): Add `ld'. * configure: Regenerate. 2018-01-30 Nick Clifton * src-release.sh (do_proto_toplev): Add patterns for more junk files to delete before creating the tarball. 2018-01-29 Nick Clifton * src-release.sh (do_proto_toplev): Strip patch remnant files from the sources before creating the tarball. 2018-01-13 Nick Clifton * src-release.sh: Update copyright notice. Change reference to devo to be a reference to root. @ text @d1 1 a1 14 2018-07-18 Nick Clifton 2.31.1 Release point. * version.m4: Set to 2.31.1 * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. 2018-07-14 Nick Clifton * version.m4: Update to 2.31.0. * development.sh: Set to true. * configure: Regenerate. * po/bfd.pot: Regenerate. d3 1 a3 1 2018-07-14 Nick Clifton d5 1 a5 2 2.31 Release point. * version.m4: Update to 2.31. a9 3053 2018-07-03 Alan Modra PR 17550 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols in discarded sections. 2018-07-11 Max Filippov * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate space for dynamic relocation for undefined weak symbol. (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE relocation for undefined weak symbols. (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation section for relocations against undefined weak symbols. 2018-07-10 Maciej W. Rozycki * elflink.c (bfd_elf_final_link): Rename `remove' local variable to `remove_section'. 2018-07-09 H.J. Lu PR ld/23388 * configure.ac: Use changequote for "i[3-7]86-*-linux-*". * configure: Regenerated. 2018-07-09 H.J. Lu PR ld/23372 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86 ISA properties with empty bits. 2018-07-06 Alan Modra * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-ppc.c (ppc64_elf_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. 2018-07-05 Jim Wilson * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*. (riscv64*-*-*): Likewise. (riscv-*-*): Add as an alias for riscv32*-*-*. 2018-07-05 Alan Modra * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error on mismatch. Remove "warning: " from messages. Track last bfd used to set tags. (ppc_elf_merge_obj_attributes): Likewise. Handle status from _bfd_elf_ppc_merge_fp_attributes. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status from _bfd_elf_ppc_merge_fp_attributes. 2018-07-03 Alan Modra * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes sections. 2018-07-03 Alan Modra * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define. * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding incompatible attribute. (ppc_elf_merge_obj_attributes): Likewise. Return _bfd_elf_merge_object_attributes result. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return _bfd_elf_merge_object_attributes result. 2018-07-05 Nick Clifton * po/ru.po: Updated Russian translation. 2018-07-04 H.J. Lu * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h. * Makefile.in: Regenerated. 2018-07-04 H.J. Lu PR ld/23324 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the R_X86_64_converted_reloc_bit bit. 2018-06-26 Nick Clifton * po/uk.po: Updated Ukranian translation. 2018-06-25 Nick Clifton * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check for malloc returning NULL. (_bfd_aarch64_erratum_843419_fixup): Check for _bfd_aarch64_erratum_835769_stub_name returning NULL. 2018-06-24 Nick Clifton * version.m4 (BFD_VERSION): Update to 2.30.90. * configure: Regenerate. * po/bfd.pot: Regenerate. 2018-06-24 Nick Clifton 2.31 branch created. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding) (_bfd_mips_elf_cant_unwind_opcode): Correct formatting. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_post_process_headers): Keep EI_ABIVERSION setting together. 2018-06-21 Maciej W. Rozycki * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT) (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64) (MIPS_LIBC_ABI_MAX): New enumeration constants. (_bfd_mips_post_process_headers): Use them in place of magic numbers. 2018-06-21 Jim Wilson * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment. Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset. 2018-06-21 Alan Modra * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign". * doc/Makefile.in: Regenerate. 2018-06-20 Renlin Li * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. 2018-06-20 Nick Clifton PR 23316 * opncls.c (get_build_id): Check for a negative or excessive data size in the build-id note. 2018-06-20 Nick Clifton PR 23299 * mach-o.c (cputype): New function. (cpusubtype): New function. (bfd_mach_o_bfd_print_private_data): New function. Dispalys the values in the MACH-O file header. (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and cpusubtype fields from the input bfd's mach-o header to the output bfd. * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Redefine to bfd_mach_o_bfd_print_private_data. * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype. 2018-06-19 Maciej W. Rozycki PR ld/22966 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the `.got.plt' entry referred is in range. (mips_finish_exec_plt): Correct the range check for `.got.plt' start. Replace the assertion used for that with a proper error message. 2018-06-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix formatting. 2018-06-19 Simon Marchi * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. (INCLUDES): Rename to ... (AM_CPPFLAGS): ... this. * configure.ac: Remove AC_PREREQ. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add info-in-builddir no-texinfo.tex. (info_TEXINFOS): Rename bfd.texinfo to bfd.texi. * doc/bfd.texinfo: Rename to ... * doc/bfd.texi: ... this. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. 2018-06-18 Mephi PR 23297 * mach-o-x86-64.c (x86_64_howto_table): Add entry for BFD_RELOC_MACH_O_X86_64_RELOC_TLV. (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc. (bfd_mach_o_x86_64_swap_reloc_out): Likewise. * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-06-14 Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add GINV extension. 2018-06-14 H.J. Lu PR binutils/23267 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first symbol version is base version. 2018-06-14 Alan Modra * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs". * elflink.c (_bfd_elf_init_2_index_sections): Comment fix. (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs". (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when "dynamic_relocs" is not set. * elfxx-mips.c (count_section_dynsyms): Likewise. 2018-06-14 Alan Modra PR 23282 * bfdio.c (bfd_seek): Optimize away seeks to current position. 2018-06-13 Scott Egerton Faraz Shahbazker * elfxx-mips.c (print_mips_ases): Add CRC. 2018-06-08 H.J. Lu PR ld/23161 * elfxx-x86.c (elf_x86_hide_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to hide hidden __bss_start, _end and _edata in shared libraries. 2018-06-07 Alan Modra * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs. 2018-06-05 Alan Modra * bfd.c (struct bfd): Update comment on "where" usage. * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec", "iostream", and "where" from containing archive file. Return error on NULL iovec. (bfd_bread): Similarly, and return error attempted out of bounds archive element access. (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and "where" from containing archive file. (bfd_seek): Likewise. Return error on NULL iovec. Don't attempt to optimize away seeks. Don't paper over errors by calling bfd_tell. (bfd_get_mtime): Call bfd_stat rather than iovec->bstat. (bfd_get_size): Likewise. (bfd_mmap): Operate on and use iovec of containing archive file. Return error on NULL iovec. * cache.c (bfd_cache_lookup_worker): Abort if working on archive element bfd. (cache_bread_1): Delete bfd parameter, add FILE* parameter. Don't ignore zero byte reads. (cache_bread): Look up FILE* in cache here. Error on NULL lookup. (cache_bwrite): Rename "where" to "from". (cache_bmmap): Don't handle archive elements. * coffcode.h (coff_slurp_line_table): Exit early on zero lineno count. * bfd-in2.h: Regenerate. 2018-06-05 Alan Modra PR 23254 * plugin.c (bfd_plugin_open_input): Allow for possibility of nested archives. Open file again for plugin. (try_claim): Don't save and restore file position. Close file if not claimed. * sysdep.h (O_BINARY): Define. 2018-06-04 Max Filippov * elf32-xtensa.c (xtensa_read_table_entries): Make global. (compute_fill_extra_space): Drop declaration. Rename function to xtensa_compute_fill_extra_space. (compute_ebb_actions, remove_dead_literal): Update references to compute_fill_extra_space. 2018-06-04 Volodymyr Arbatov * elf32-xtensa.c (elf32xtensa_separate_props): New global variable. (xtensa_add_names): New function. (xtensa_property_section_name): Add new parameter separate_sections, use it to choose property section name. (xtensa_get_separate_property_section): New function. (xtensa_get_property_section): Invoke xtensa_get_separate_property_section to get individual property section if it exists, common property section otherwise. (xtensa_make_property_section): Pass elf32xtensa_separate_props to xtensa_property_section_name. 2018-06-04 H.J. Lu PR binutils/23146 * bfd-in.h: Include "diagnostics.h". * bfd-in2.h: Regenerated. * elf32-arm.c (elf32_arm_nabi_write_core_note): Use DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and DIAGNOSTIC_POP to silence GCC 8.1 warnings with -Wstringop-truncation. * elf32-ppc.c (ppc_elf_write_core_note): Likewse. * elf32-s390.c (elf_s390_write_core_note): Likewse. * elf64-ppc.c (ppc64_elf_write_core_note): Likewse. * elf64-s390.c (elf_s390_write_core_note): Likewse. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse. 2018-06-03 Jim Wilson PR ld/23244 * elfnn-riscv.c (riscv_elf_relocate_section) : Check for and handle an undefined weak with no PLT. PR ld/22756 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check to code that ignores duplicate symbols. 2018-06-01 H.J. Lu * version.m4: Bump version to 2.30.52 * configure: Regenerated. 2018-06-01 Alan Modra * bfd.c (_bfd_error_handler): Arrange for this function to be declared in bfd-in2.h. * libbfd-in.h (_bfd_error_handler): Don't declare. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-30 Amaan Cheval * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems* This is needed to generate UEFI application image files from ELFs. 2018-05-28 H.J. Lu * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_i386_lazy_ibt_plt): Likewise. (elf_i386_nacl_plt): Likewise. * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ... (elf_x86_64_tlsdesc_plt_entry): This. (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end for TLSDESC entry. (elf_x86_64_lazy_bnd_plt): Likewise. (elf_x86_64_lazy_ibt_plt): Likewise. (elf_x32_lazy_ibt_plt): Likewise. (elf_x86_64_nacl_plt): Likewise. (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end to update TLSDESC entry. * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments. Add plt_tlsdesc_entry, plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end. (elf_x86_non_lazy_plt_layout): Update comments. (elf_x86_plt_layout): Likewise. 2018-05-28 H.J. Lu PR ld/23238 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed. * elf32-arc.c (elf_arc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-s390.c (elf_backend_add_symbol_hook): Likewise. * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf64-s390.c (elf_backend_add_symbol_hook): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise. * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise. (elf_backend_add_symbol_hook): Likewise. * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC handling. * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise. * elflink.c (elf_link_add_object_symbols): Set elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols. 2018-05-26 H.J. Lu PR ld/23194 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New. * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function. Extracted from _bfd_elf_link_assign_sym_version. (_bfd_elf_link_hide_sym_by_version): New function. (_bfd_elf_link_assign_sym_version): Use _bfd_elf_link_hide_versioned_symbol. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call _bfd_elf_link_hide_sym_by_version instead of bfd_hide_sym_by_version. Don't check unversioned symbol. 2018-05-25 Alan Modra * Makefile.in: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-05-25 Alan Modra * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS. * configure: Regenerate. 2018-05-23 H.J. Lu * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING to data. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec is NULL. (elf32_hppa_size_stubs): Only create stubs for load, alloc, code sections. (final_link_relocate): Revert last change. 2018-05-22 Alan Modra PR 23207 * elf32-hppa.c (final_link_relocate): Don't look for plt call stubs in non-alloc sections. 2018-05-21 H.J. Lu PR ld/23201 * aout-target.h (MY_bfd_link_hide_symbol): New. * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise. * binary.c (binary_bfd_link_hide_symbol): Likewise. * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise. * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise. * coffcode.h (coff_bfd_link_hide_symbol): Likewise. * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise. * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise. * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise. * ihex.c (ihex_bfd_link_hide_symbol): Likewise. * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise. * linker.c (_bfd_generic_link_hide_symbol): Likewise. (bfd_link_hide_symbol): Likewise. * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise. * mmo.c (mmo_bfd_link_hide_symbol): Likewise. * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise. * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise. * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise. * som.c (som_bfd_link_hide_symbol): Likewise. * srec.c (srec_bfd_link_hide_symbol): Likewise. * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise. * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise. (alpha_vms_bfd_link_hide_symbol): Likewise. * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise. * coff64-rs6000.c (rs6000_xcoff64_vec): Add _bfd_generic_link_hide_symbol. (rs6000_xcoff64_aix_vec): Likewise. * elflink.c (bfd_elf_record_link_assignment): Don't make forced local symbol dynamic. (_bfd_elf_link_hide_symbol): New function. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't check root.ldscript_def. * targets.c (bfd_target): Add _bfd_link_hide_symbol. (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. 2018-05-21 H.J. Lu PR binutils/23199 * elf.c (setup_group): Mark section in a section group with SHF_GROUP. 2018-05-18 H.J. Lu PR ld/23194 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 if a symbol is versioned and there is a version script. 2018-05-18 Kito Cheng * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle EF_RISCV_RVE. 2018-05-18 Jim Wilson * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_relocate_section): Don't generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true. (riscv_elf_finish_dynamic_symbol): Likewise. 2018-05-18 John Darrington * Makefile.am: Add s12z files. * Makefile.in: Regenerate. * archures.c: Add bfd_s12z_arch. * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24. * bfd-in2.h: Regenerate. * config.bfd: Add s12z target. * configure.ac: Add s12z target. * configure: Regenerate. * cpu-s12z.c: New file. * elf32-s12z.c: New file. * libbfd.c (bfd_putb24): New function. (bfd_putl24): New function. * libbfd.h: Regenerate. * reloc.c: Add s12z relocations. (bfd_get_reloc_size): Handle size 5 relocs. * targets.c: Add s12z_elf32_vec. 2018-05-18 H.J. Lu PR ld/23189 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X like R_386_GOT32. * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 for linker defined symbols. 2018-05-18 Alan Modra PR 23199 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries don't point at other SHT_GROUP sections. Set shdr corresponding to invalid entry, to NULL rather than section 0. Identify SHT_GROUP section index when reporting an error. Cope with NULL shdr pointer. 2018-05-18 Alan Modra * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout. * configure.ac (HAVE_HIDDEN): Check compiler support for hidden visibility. * libbfd.h: Regenerate. * configure: Regenerate. * config.in: Regenerate. 2018-05-18 Alan Modra * libbfd-in.h: Add include guard. * libcoff-in.h: Likewise. * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif. * doc/Makefile.in: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. 2018-05-16 Maciej W. Rozycki * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'. 2018-05-16 Alan Modra PR 22458 * format.c (struct bfd_preserve): Add section_id. (bfd_preserve_save, bfd_preserve_restore): Save and restore _bfd_section_id. (bfd_reinit): Set _bfd_section_id. (bfd_check_format_matches): Put all matches of any priority into matching_vector. Save initial section id and start each attempted match at that section id. * libbfd-in.h (_bfd_section_id): Declare. * section.c (_bfd_section_id): Rename from section_id and make global. Adjust uses. (bfd_get_next_section_id): Delete. * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of bfd_get_section_id with _bfd_section_id. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. 2018-05-15 Christophe Guillon * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields of the aux structure are initialised. 2018-05-15 Francois H. Theron * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef. 2018-05-15 Nick Clifton * po/pt.po: New Portuguese translation. * configure.ac (ALL_LINGUAS): Add pt. * configure: Regenerate. 2018-05-14 H.J. Lu PR ld/23169 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue an error on IFUNC pointer defined in PDE. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call _bfd_x86_elf_link_fixup_ifunc_symbol. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New function. * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New. 2018-05-14 H.J. Lu PR ld/23162 * elfxx-x86.c (elf_x86_linker_defined): New function. (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start, _end and _edata locally defined within executables. 2018-05-12 Alan Modra PR 20659 * elf.c (rewrite_elf_program_header): Use segment_mark only for PT_LOAD headers. Delete first_matching_lma and first_suggested_lma. Instead make matching_lma and suggested_lma pointers to the sections. Align section vma and lma calculated from segment. Don't clear includes_phdrs or includes_filehdr based on p_paddr test. Try to handle alignment padding before first section by adjusting new segment lma down. Adjust PT_PHDR map p_paddr. 2018-05-09 Dimitar Dimitrov * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation conformant to TI ABI. (pru_elf32_relax_section): Likewise. (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code. * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend. (pru_elf32_pmem_relocate): Trap - should not get here. (pru_elf32_relocate_section): Add support for REL relocations. (elf_info_to_howto_rel): Enable REL. (elf_backend_may_use_rel_p): Likewise. (elf_backend_may_use_rela_p): Likewise. (elf_backend_default_use_rela_p): Likewise. 2018-05-09 Alan Modra PR 23148 * peXXigen.c (pe_print_edata): Correct minimum size. 2018-05-09 Alan Modra PR 23147 * peXXigen.c (pe_print_idata): Bound check hint_addr. 2018-05-08 Nick Clifton PR 22809 * elf.c (bfd_elf_get_str_section): Check for an excessively large string section. * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the attribute section is larger than the size of the file. 2018-05-07 Alan Modra * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than strncmp when checking for ".bf" special symbol. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags section name a char array, remove sentinal known_sections entry, and adjust loop over known_sections to suit. Use memcmp rather than strncmp. 2018-05-04 Alan Modra * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32), (struct elf_external_linux_prpsinfo32_ugid16), (struct elf_external_linux_prpsinfo64_ugid32), (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas. Move comment to.. * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor directives. * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING to data. * elf32-ppc.c (ppc_elf_write_core_note): Likewise. * elf32-s390.c (elf_s390_write_core_note): Likewise. * elf64-s390.c (elf_s390_write_core_note): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise. * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic pragmas. * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid false positive gcc-8 warning. * cofflink.c (_bfd_coff_link_input_bfd): Likewise. 2018-05-04 Tulio Magno Quites Machado Filho * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order of arguments when warning about different long double types. 2018-05-03 Simon Atanasyan * elf32-mips.c: (elf32_mips_fixup_symbol): New function. (elf_backend_fixup_symbol): New macro. * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp handling. (_bfd_mips_elf_finish_dynamic_symbol): Likewise. 2018-04-30 Francois H. Theron * Makefile.am: Added NFP files to build. * archures.c: Added bfd_arch_nfp * config.bfd: Added NFP support. * configure.ac: Added NFP support. * cpu-nfp.c: New, for NFP support. * elf-bfd.h: Added elf_section_info() * elf64-nfp.c: New, for NFP support. * po/SRC-POTFILES.in: Added NFP source files. * targets.c: Added nfp_elf64_vec * bfd-in2.h: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. 2018-04-27 Alan Modra * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-04-27 Alan Modra PR 23123 PR 22374 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt relocs for ifuncs. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes. 2018-04-26 Pedro Alves * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider ifunc and non-ifunc symbols duplicates. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New. (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. (elf32_arm_output_arch_local_syms): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle _GLOBAL_OFFSET_TABLE_ in FDPIC mode. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (DEFAULT_STACK_SIZE): New. (elf32_arm_always_size_sections): Create stack segment. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC) (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New relocations. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations. (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC, R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC. (struct elf32_arm_link_hash_table): Update comment. (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations. (IS_ARM_TLS_RELOC): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Update comment. * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC, BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_fdpic_plt_entry): New. (elf32_arm_create_dynamic_sections): Handle FDPIC. (elf32_arm_allocate_plt_entry): Likewise. (elf32_arm_populate_plt_entry): Likewise. (elf32_arm_output_plt_map_1): Likewise. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (struct fdpic_local): New. (elf_arm_obj_tdata): Add local_fdpic_cnts field. (elf32_arm_local_fdpic_cnts): New. (struct fdpic_global): New. (elf32_arm_link_hash_entry): Add fdpic_cnts field. (elf32_arm_link_hash_table): Add srofixup field. (arm_elf_add_rofixup): New. (arm_elf_fill_funcdesc): New. (elf32_arm_link_hash_newfunc): Handle fdpic_cnts. (elf32_arm_allocate_local_sym_info): Likewise. (create_got_section): Create .rofixup section. (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts. (bfd_elf32_arm_set_target_params): Handle FDPIC. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (allocate_dynrelocs_for_symbol): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_finish_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. (elf32_arm_fdpic_omit_section_dynsym): New. 2018-04-25 Christophe Lyon Mickaël Guêné * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC) (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC) (BFD_RELOC_ARM_FUNCDESC_VALUE): New. * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC, R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE. (elf32_arm_howto_from_type): Take new members of elf32_arm_howto_table_2 into account. (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC, BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC, BFD_RELOC_ARM_FUNCDESC_VALUE. 2018-04-25 Christophe Lyon Mickaël Guêné * elf32-arm.c (elf32_arm_print_private_bfd_data): Support EF_ARM_PIC and ELFOSABI_ARM_FDPIC. (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC. (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC. 2018-04-25 Christophe Lyon Mickaël Guêné * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec to targ_selvecs. Accept arm*-*-uclinuxfdpiceabi. * configure.ac: Add support for arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. * configure: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p. (elf32_arm_link_hash_table_create): Initialize fdpic_p. (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM) (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets. (elf32_arm_fdpic_link_hash_table_create): New. * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and arm_elf32_fdpic_le_vec. 2018-04-25 Alan Modra * elf-linux-core.h: Disable gcc-8 string truncation warning. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-25 Alan Modra * Makefile.am: Remove arm-aout and arm-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-arm.c: Delete. * armnetbsd.c: Delete. * riscix.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-24 Nick Clifton PR 23113 * elf.c (ignore_section_sym): Check for the output_section pointer being NULL before dereferencing it. PR 23110 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for a negative PE_DEBUG_DATA size before iterating over the debug data. 2018-04-23 Alan Modra * elf-linux-core.h: Revert last change. * elf.c: Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-23 Alan Modra * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable gcc-8 string truncation warning. (swap_linux_prpsinfo32_ugid16_out): Likewise. (swap_linux_prpsinfo64_ugid32_out): Likewise. (swap_linux_prpsinfo64_ugid16_out): Likewise. * elf.c (elfcore_write_prpsinfo): Likewise. 2018-04-23 Nick Clifton PR 23056 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at the end of the string table, and zero it. 2018-04-20 Alan Modra PR 22978 * elf32-hppa.c (got_relocs_needed): Add extra param to special case both dtprel and tprel relocs. (allocate_dynrelocs): Adjust conditions for got relocs. (elf32_hppa_relocate_section): Likewise for local sym got relocs. Emit dynamic relocs on TLS GOT entries for shared libraries, not when pic. Omit dynamic reloc on dtprel entry when local, and on tprel entry when local and executable. 2018-04-19 Alan Modra PR 22537 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1. (hppa_type_of_stub): Don't return a long branch stub for symbols other than those defined statically. 2018-04-19 Alan Modra * Makefile.am: Revert 2018-04-18 coff-mips changes. * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec to selvecs for mips targets change 2018-04-18. * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec and mips_ecoff_bele_vec. * targets.c: Likewise. * coff-mips.c: Resurrect. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-18 Alan Modra * Makefile.am: Remove mips aout and coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-mips.c: Delete * mipsbsd.c: Delete * pe-mips.c: Delete * pei-mips.c: Delete * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 H.J. Lu * elf32-i386.c (elf32_bed): Define before including "elf32-target.h". * elf64-x86-64.c (elf64_bed): Define before including "elf64-target.h". (elf32_bed): Define before including "elf32-target.h". 2018-04-17 H.J. Lu PR ld/23055 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a normal input file with compatible relocation. 2018-04-18 Alan Modra * Makefile.am: Remove support for assorted i386 aout and coff targets. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * targets.c: Likewise. * freebsd.h: Delete. * i386dynix.c: Delete. * i386freebsd.c: Delete. * i386linux.c: Delete. * i386mach3.c: Delete. * i386netbsd.c: Delete. * i386os9k.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-17 Andrew Sadek Microblaze Target: PIC data text relative * bfd/reloc.c (2 new BFD relocations): BFD_RELOC_MICROBLAZE_64_TEXTPCREL & BFD_RELOC_MICROBLAZE_64_TEXTPCREL * bfd/bfd-in2.h: Regenerate * bfd/libbfd.h: Regenerate * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3 new relocs and handle them in both relocate and relax functions. (microblaze_elf_reloc_type_lookup): add mapping between for new bfd relocs. (microblaze_elf_relocate_section): Handle new relocs in case of elf relocation. (microblaze_elf_relax_section): Handle new relocs for elf relaxation. 2018-04-17 Nick Clifton PR 23055 * aoutx.h (find_nearest_line): Check that the symbol name exists and is long enough, before attempting to see if it is for a .o file. * hash.c (bfd_hash_hash): Add an assertion that the string is not NULL. * linker.c (bfd_link_hash_lookup): Fail if the table or string are NULL. (_bfd_generic_link_add_archive_symbols): Fail if an archive entry has no name. PR 23065 * dwarf2.c (concat_filename): Check for a NULL table pointer. 2018-04-16 Nick Clifton PR 23061 * coffgen.c (coff_pointerize_aux): Check for an out of range fixup. 2018-04-16 Alan Modra * Makefile.am: Remove arm-epoc-pe support. * coff-arm.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * epoc-pe-arm.c: Delete. * epoc-pei-arm.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sparc-aout and sparc-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-sparcle.c: Delete. * aoutf1.h: Delete. * cf-sparclynx.c: Delete. * coff-sparc.c: Delete. * demo64.c: Delete. * sparclinux.c: Delete. * sparclynx.c: Delete. * sparcnetbsd.c: Delete. * sunos.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m68k-aout and m68k-coff support. * aoutf1.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bfd-in.h: Likewise. * bfd.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * configure.host: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * freebsd.h: Likewise. * gen-aout.c: Likewise. * hpux-core.c: Likewise. * libaout.h: Likewise. * libbfd-in.h: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * riscix.c: Likewise. * targets.c: Likewise. * aout0.c: Delete. * coff-apollo.c: Delete. * coff-aux.c: Delete. * coff-m68k.c: Delete. * coff-svm68k.c: Delete. * coff-u68k.c: Delete. * hosts/delta68.h: Delete. * hosts/hp300bsd.h: Delete. * hosts/m68kaux.h: Delete. * hosts/news.h: Delete. * hp300bsd.c: Delete. * hp300hpux.c: Delete. * liboasys.h: Delete. * m68k4knetbsd.c: Delete. * m68klinux.c: Delete. * m68knetbsd.c: Delete. * oasys.c: Delete. * versados.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh5 and sh64 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-sh.c: Likewise. * elf32-sh-relocs.h: Likewise. * elf32-sh.c: Likewise. * targets.c: Likewise. * elf32-sh64-com.c: Delete. * elf32-sh64.c: Delete. * elf32-sh64.h: Delete. * elf64-sh64.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove sh-symbianelf support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * elf32-sh-symbian.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove vax-bsd and vax-ultrix support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * vaxbsd.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove w65 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-w65.c: Delete. * cpu-w65.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove we32k support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-we32k.c: Delete. * cpu-we32k.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove m88k support. * aoutx.h: Likewise. * archures.c: Likewise. * coffcode.h: Likewise. * coffswap.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * cpu-ns32k.c: Likewise. * elf32-nds32.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * reloc.c: Likewise. * targets.c: Likewise. * coff-m88k.c: Delete. * cpu-m88k.c: Delete. * elf32-m88k.c: Delete. * hosts/m88kmach3.h: Delete. * m88kmach3.c: Delete. * m88kopenbsd.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove i370 support. * archures.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * cpu-i370.c: Delete. * elf32-i370.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove h8500 support. * archures.c: Likewise. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * coff-h8500.c: Delete. * cpu-h8500.c: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove h8300-coff support. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * reloc16.c: Likewise. * targets.c: Likewise. * coff-h8300.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove IEEE 695 support. * archures.c: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfd.texinfo: Likewise. * doc/bfdint.texi: Likewise. * doc/bfdsumm.texi: Likewise. * section.c: Likewise. * targets.c: Likewise. * ieee.c: Delete. * libieee.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * config.bfd: Remove tandem support. 2018-04-16 Alan Modra * Makefile.am: Remove newsos3 support. * aoutx.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * newsos3.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * Makefile.am: Remove netware support. * bfd-in.h: Likewise. * bfd.c: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * ecoff.c: Likewise. * targets.c: Likewise. * libnlm.h: Delete. * nlm-target.h: Delete. * nlm.c: Delete. * nlm32-alpha.c: Delete. * nlm32-i386.c: Delete. * nlm32-ppc.c: Delete. * nlm32-sparc.c: Delete. * nlm32.c: Delete. * nlm64.c: Delete. * nlmcode.h: Delete. * nlmswap.h: Delete. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-16 Alan Modra * archures.c: Remove tahoe support. * config.bfd: Likewise. * configure.ac: Likewise. * hosts/tahoe.h: Delete. * bfd-in2.h: Regenerate. * configure: Regenerate. 2018-04-14 Alan Modra * elf-bfd.h (struct elf_backend_data): Add relropagesize. * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and sanity test. (elfNN_bed): Init relropagesize. * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to select relropagesize. * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. (ELF_MINPAGESIZE): Don't define. * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000. (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE. * bfd-in2.h: Regenerate. 2018-04-14 Alan Modra * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend on __QNXTARGET__ define. 2018-04-14 Alan Modra * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss* to obsolete list. 2018-04-11 Alan Modra * aout-adobe.c: Delete. * bout.c: Delete. * coff-i860.c: Delete. * coff-i960.c: Delete. * cpu-i860.c: Delete. * cpu-i960.c: Delete. * elf32-i860.c: Delete. * elf32-i960.c: Delete. * hosts/i860mach3.h: Delete. * Makefile.am: Remove i860, i960, bout, and adobe support. * archures.c: Remove i860 and i960 support. * coffcode.h: Likewise. * reloc.c: Likewise. * aoutx.h: Comment updates. * archive.c: Remove BOUT and i960 support. * bfd.c: Remove BOUT support. * coffswap.h: Remove i960 support. * config.bfd: Remove i860, i960 and adobe targets. * configure.ac: Remove adode, bout, i860, i960, icoff targets. * targets.c: Likewise. * ieee.c: Remove i960 support. * mach-o.c: Remove i860 support. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * po/SRC-POTFILES.in: Regenerate. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer in the BFD symbol referred by the relocation. (mips_elf64_write_rela): Likewise. 2018-04-09 Maciej W. Rozycki * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an error for out-of-range `r_sym' values. 2018-04-09 Alan Modra * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field. (struct ppc_link_hash_table): Add can_convert_all_inline_plt. (ppc64_elf_check_relocs): Set has_pltcall. (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc64_elf_inline_plt): New function. (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals. * elf64-ppc.h (ppc64_elf_inline_plt): Declare. * elf32-ppc.c (has_pltcall): Define. (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt. (ppc_elf_check_relocs): Set has_pltcall. (ppc_elf_inline_plt): New function. (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries. (ppc_elf_size_dynamic_sections): Likewise. * elf32-ppc.h (ppc_elf_inline_plt): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos. (is_plt_seq_reloc): New function. (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs. (ppc_elf_tls_optimize): Handle inline plt call sequence. (ppc_elf_relax_section): Handle PLTCALL reloc. (ppc_elf_relocate_section): Nop out inline plt call sequence when resolving locally. * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE. (has_tls_get_addr_call): Correct comment. (is_branch_reloc): Add PLTCALL. (is_plt_seq_reloc): New function. (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt entry for R_PPC64_PLTCALL. (ppc64_elf_tls_optimize): Handle inline plt call sequence. (ppc_type_of_stub): Handle PLTCALL reloc. (toc_adjusting_stub_needed): Likewise. (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL reloc insn. Nop out inline plt call sequence when resolving locally. Handle __tls_get_addr inline plt call optimization. 2018-04-09 Alan Modra * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define. (struct ppc_stub_hash_entry): Add symtype field. (PLT_KEEP): Define. (struct ppc_link_hash_table): Add pltlocal and relpltlocal. (create_linkage_sections): Create pltlocal and relpltlocal. (ppc64_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal. Keep PLT entries for inline calls against locals. (ppc_build_one_stub): Use pltlocal as appropriate. (ppc_size_one_stub): Likewise. (ppc64_elf_size_stubs): Set symtype. (build_global_entry_stubs_and_plt): Init pltlocal and write relpltlocal for globals. (write_plt_relocs_for_local_syms): Likewise for local syms. (ppc64_elf_relocate_section): Support PLT for local syms. * elf32-ppc.c (PLT_KEEP): Define. (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal. (ppc_elf_create_glink): Create pltlocal and relpltlocal. (ppc_elf_check_relocs): Allow PLT relocs on local symbols. Set PLT_KEEP. Adjust update_local_sym_info call. (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls. (allocate_dynrelocs): Allocate pltlocal and relpltlocal. (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal. (ppc_elf_relocate_section): Support PLT16 relocs for local syms. (write_global_sym_plt): Init pltlocal and write relpltlocal. (ppc_finish_symbols): Likewise for locals. 2018-04-09 Alan Modra * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs for local symbols to.. (write_plt_relocs_for_local_syms): ..here. New function. (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for global symbols to.. (build_global_entry_stubs_and_plt): ..here. Rename from build_global_entry_stubs. (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt. Call write_plt_relocs_for_local_syms. * elf32-ppc.c (get_sym_h): New function. (ppc_elf_relax_section): Use get_sym_h. (ppc_elf_relocate_section): Move output of PLT relocs and glink stubs for local symbols to.. (ppc_finish_symbols): ..here. New function. (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for global syms to.. (write_global_sym_plt): ..here. New function. * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute. (ppc_finish_symbols): Declare. 2018-04-09 Alan Modra * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs. (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS. (ppc64_elf_relocate_section): Likewise. Correct PLT16 resolution to plt entry relative to toc pointer. 2018-04-09 Alan Modra * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout file when other TLS flags are tested in a mask. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK. (ppc64_elf_relocate_section): Likewise. (ppc64_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TPRELGD): Renumber. Update comment. (TLS_MARK, NON_GOT): Define. (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well. (update_local_sym_info): Don't create got entry when NON_GOT. (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC. Set TLS_MARK. (ppc_elf_tls_optimize): Don't attempt to optimize indirect __tls_get_addr calls lacking a marker reloc. 2018-04-06 H.J. Lu * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out R_X86_64_converted_reloc_bit. 2018-04-05 H.J. Lu PR gas/22318 * configure: Regenerated. 2018-04-05 Alan Modra * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto): Also return unsuccessfully for unimplemented relocations. (elf_hppa_info_to_howto_rel): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the `bfd_error_bad_value' error and call `_bfd_error_handler' on a howto lookup failure. (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call accordingly. (elf32_i860_info_to_howto_rela): Likewise. (elf32_i860_relocate_splitn): Likewise. (elf32_i860_relocate_pc16): Likewise. (elf32_i860_relocate_pc26): Likewise. (elf32_i860_relocate_section): Likewise. 2018-04-04 Maciej W. Rozycki * elf32-visium.c (visium_info_to_howto_rela): Correct the range check for `visium_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range check for `iq2000_elf_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-frv.c (frv_info_to_howto_rela): Correct the range check for `elf32_frv_howto_table' table access. 2018-04-04 Maciej W. Rozycki * elf32-mips.c (mips_elf32_rtype_to_howto): Also return unsuccessfully for placeholder howtos. * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise. * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise. 2018-03-29 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to `_bfd_error_handler' and to set the `bfd_error_bad_value' error. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove ATTRIBUTE_UNUSED from `abfd'. 2018-03-28 Maciej W. Rozycki * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct `_bfd_error_handler' call formatting. 2018-03-28 Maciej W. Rozycki * elf32-mips.c (mips_info_to_howto_rel): Call `mips_elf32_rtype_to_howto' directly rather than via `->elf_backend_mips_rtype_to_howto'. 2018-03-28 Renlin Li PR ld/22970 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. (elfNN_aarch64_final_link_relocate): Support new relocations. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new relocations. (_bfd_aarch64_elf_resolve_relocation): Support new relocations. 2018-03-28 Renlin Li PR ld/22970 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for TLSLE_LDST16_TPREL_LO12, TLSLE_LDST16_TPREL_LO12_NC, TLSLE_LDST32_TPREL_LO12, TLSLE_LDST32_TPREL_LO12_NC, TLSLE_LDST64_TPREL_LO12, TLSLE_LDST64_TPREL_LO12_NC, TLSLE_LDST8_TPREL_LO12, TLSLE_LDST8_TPREL_LO12_NC. * bfd-in2.h: Regenerated. * libbfd.h: Regenerated. 2018-03-28 Eric Botcazou PR ld/22972 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag has_old_style_got_reloc. (_bfd_sparc_elf_check_relocs) : Set it for old-style relocations. Fix a couple of long lines. (_bfd_sparc_elf_relocate_section) : Do not generate a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style GOT relocations. 2018-03-25 H.J. Lu PR ld/23000 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add ENDBR64 to the TLSDESC PLT entry. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting symbols. Use size_t counts. Delete redundant opd test. 2018-03-21 Alan Modra * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms. 2018-03-21 Alan Modra * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask field unsigned. (update_local_sym_info): Likewise for local_got_tls_masks. (ppc_elf_tls_optimize): Likewise for lgot_masks. 2018-03-21 Alan Modra * elf64-ppc.c (ppc_size_one_stub): Fix comment typo. (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we do in size_dynamic_sections. 2018-03-21 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1] without first checking array bounds. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. 2018-03-20 H.J. Lu PR ld/22983 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list. 2018-03-19 Nick Clifton * po/es.po: Updated Spanish translation. 2018-03-15 Max Filippov * elf32-xtensa.c (xlate_map_entry): Change types of address fields from 'unsigned' to 'bfd_vma'. (xlate_offset_with_removed_text): Use struct xlate_map_entry as the key argument to bsearch. Allow offsets past the end of a section, use the last map entry for translation of such offsets. 2018-03-15 Kuan-Lin Chen * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed. Not support the target feature. (nds32_elf_ex9_itb_base): Likewise. (nds32_elf_ex9_import_table): Likewise. (nds32_elf_ex9_finish): Likewise. (nds32_elf_ex9_reloc_jmp): Likewise. (nds32_elf_get_insn_with_reg): Likewise. (nds32_get_local_syms): Likewise. (nds32_elf_ex9_replace_instruction): Likewise. (nds32_elf_ifc_calc): Likewise. (nds32_elf_ifc_finish): Likewise. (nds32_elf_ifc_replace): Likewise. (nds32_elf_ifc_reloc): Likewise. 2018-03-14 Alan Modra * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having sfpr size added before defining alias symbols. (ppc64_elf_build_stubs): Add stub section padding before copying sfpr contents and defining save/restore alias symbols. 2018-03-14 H.J. Lu PR ld/20882 * elflink.c (elf_gc_mark_debug_section): Also check the local debug definition section. 2018-03-13 Nick Clifton PR 22113 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean function. Add an end address parameter. Check access of the data pointer to make sure that they do not extend beyond the end address. Return FALSE if any check fails. Add the end address pointer to the ui structure. (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind codes to make sure that they do not extend beyond the end address pointer. Print an error message and return immediately if any check fails. 2018-03-09 Nick Clifton * elf64-s390.c (elf_s390_relocate_section): Move check for relocations against non-allocated sections to before the code that handles ifunc relocations. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat relocs against IFUNC symbols in non-allocated sections as relocs against FUNC symbols. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. 2018-03-08 H.J. Lu PR ld/22929 * elf32-i386.c (elf_i386_relocate_section): Treat relocation against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as relocation against FUNC symbol. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. 2018-03-07 Renlin Li PR ld/20402 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute symbol, and don't emit relocation in specific case. 2018-03-07 Alan Modra * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error. (mips_elf64_slurp_one_reloc_table): Pass on error. 2018-03-03 James Cowgill Maciej W. Rozycki PR ld/21900 * elfxx-mips.c (mips_elf_calculate_relocation): Only return after calling `undefined_symbol' hook if this is an error condition. Assume the value of 0 for the symbol requested otherwise. 2018-03-02 Jim Wilson PR 22903 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch and nop instead of 4. (elfNN_arch64_build_stubs): Add nop after branch. Increase size by 8 instead of 4. 2018-03-01 Jim Wilson PR 22756 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use else if instead of if. 2018-03-01 Alan Modra * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test. 2018-02-28 Alan Modra PR 22887 * aoutx.h (swap_std_reloc_in): Correct r_index bound check. 2018-02-28 Nick Clifton PR 22895 PR 22893 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block pointer. Drop unused abfd parameter. Check the size of the block before initialising the data field. Return the end pointer if the size is invalid. (read_attribute_value): Adjust invocations of read_n_bytes. PR 22894 * dwarf1.c (parse_die): Check the length of form blocks before advancing the data pointer. 2018-02-28 Alan Modra PR 22887 * aoutx.h (translate_symbol_table): Print an error message and set bfd_error on finding an invalid name string offset. 2018-02-27 H.J. Lu * config.in: Regenerated. * configure: Likewise. * configure.ac: Add --enable-separate-code. (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default to 1 for Linux/x86 targets, * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if DEFAULT_LD_Z_SEPARATE_CODE is 1. 2018-02-27 Nick Clifton * aout-cris.c (swap_ext_reloc_out): Standadize error/warning message. * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise. * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise. * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (sh_elf64_info_to_howto): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise. * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise. PR 22875 * elf-bfd.h (struct elf_backend_data): Change the return type of the elf_info_to_howto and elf_info_to_howto_rel function pointers to bfd_boolean. * elfcode.h (elf_slurp_reloc_table_from_section): Check the return value from the info_to_howto function and fail if that function failed. * elf32-h8300.c (elf32_h8_relocate_section): Check return value from the info_to_howto function. (elf32_h8_relax_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise. * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. (riscv_elf_relocate_section): Likewise. * elf-hppa.h (elf_hppa_info_to_howto): Change return type to bfd_boolean. Issue an error message, set an error value and return FALSE if the reloc is not recognized. (elf_hppa_info_to_howto_rel): Likewise. * elf-m10200.c (mn10200_info_to_howto): Likewise. * elf-m10300.c (mn10300_info_to_howto): Likewise. * elf.c (_bfd_elf_no_info_to_howto): Likewise. * elf32-arc.c (arc_info_to_howto_rel): Likewise. * elf32-arm.c (elf32_arm_info_to_howto): Likewise. * elf32-avr.c (avr_info_to_howto_rela): Likewise. * elf32-bfin.c (bfin_info_to_howto): Likewise. * elf32-cr16.c (elf_cr16_info_to_howto): Likewise. * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise. * elf32-cris.c (elf_cr16c_info_to_howto_rel) (cris_info_to_howto_rela): Likewise. * elf32-crx.c (elf_crx_info_to_howto): Likewise. * elf32-d10v.c (d10v_info_to_howto_rel): Likewise. * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela): Likewise. * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto) (elf32_dlx_info_to_howto_rel): Likewise. * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise. * elf32-fr30.c (fr30_info_to_howto_rela): Likewise. * elf32-frv.c (frv_info_to_howto_rela) (frvfdpic_info_to_howto_rel): Likewise. * elf32-ft32.c (ft32_info_to_howto_rela): Likewise. * elf32-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf32-h8300.c (elf32_h8_info_to_howto) (elf32_h8_info_to_howto_rel): Likewise. * elf32-i370.c (i370_elf_info_to_howto): Likewise. * elf32-i386.c (elf_i386_reloc_type_lookup) (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise. * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela): Likewise. * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise. * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise. * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise. * elf32-lm32.c (lm32_info_to_howto_rela): Likewise. * elf32-m32c.c (m32c_info_to_howto_rela): Likewise. * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto): Likewise. * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise. * elf32-m68k.c (rtype_to_howto): Likewise. * elf32-mcore.c (mcore_elf_info_to_howto): Likewise. * elf32-mep.c (mep_info_to_howto_rela): Likewise. * elf32-metag.c (metag_info_to_howto_rela): Likewise. * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise. * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elf32-moxie.c (moxie_info_to_howto_rela): Likewise. * elf32-msp430.c (msp430_info_to_howto_rela): Likewise. * elf32-mt.c (mt_info_to_howto_rela): Likewise. * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto): Likewise. * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise. * elf32-or1k.c (or1k_info_to_howto_rela): Likewise. * elf32-pj.c (pj_elf_info_to_howto): Likewise. * elf32-ppc.c (ppc_elf_info_to_howto): Likewise. * elf32-pru.c (pru_elf32_info_to_howto): Likewise. * elf32-rl78.c (rl78_info_to_howto_rela): Likewise. * elf32-rx.c (rx_info_to_howto_rela): Likewise. * elf32-s390.c (elf_s390_info_to_howto): Likewise. * elf32-score.c (s3_bfd_score_info_to_howto) (_bfd_score_info_to_howto): Likewise. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. * elf32-sh.c (sh_elf_info_to_howto): Likewise. * elf32-spu.c (spu_elf_info_to_howto): Likewise. * elf32-tic6x.c (elf32_tic6x_info_to_howto) (elf32_tic6x_info_to_howto_rel): Likewise. * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise. * elf32-v850.c (v850_elf_info_to_howto_rel) (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise. * elf32-vax.c (rtype_to_howto): Likewise. * elf32-visium.c (visium_info_to_howto_rela): Likewise. * elf32-wasm32.c (elf32_wasm32_rtype_to_howto) (elf32_wasm32_info_to_howto_rela): Likewise. * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise. * elf32-xgate.c (xgate_info_to_howto_rel): Likewise. * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise. * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise. * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise. * elf64-gen.c (elf_generic_info_to_howto) (elf_generic_info_to_howto_rel): Likewise. * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise. * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise. * elf64-mmix.c (mmix_info_to_howto_rela): Likewise. * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise. * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise. * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto): Likewise. * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise. * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela): Likewise. * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise. * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise. * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise. * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise. * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise. * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype. * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype. * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype. * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel): Default to NULL. 2018-02-26 Jim Wilson Stephan Schreiber PR 15904 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl call, set changed_contents and changed_relocs. Likewise after successful ia64_elf_relax_br call. 2018-02-26 Alan Modra * elf.c (assign_file_positions_except_relocs): Don't segfault when actual number of phdrs is less than allocated. Delete outdated comment. Formatting. 2018-02-26 Alan Modra * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c, * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c, * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c, * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize error/warning messages. 2018-02-26 Alan Modra * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c, * syms.c: Standardize error/warning messages. 2018-02-26 Alan Modra * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c, * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c, * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c, * peXXigen.c, * peicode.h: Standardize error/warning messages. 2018-02-26 Alan Modra * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages. 2018-02-26 Alan Modra * elfxx-mips.c: Standardize error/warning messages. 2018-02-26 Alan Modra * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c, * elflink.c: Standardize error/warning messages. Replace use of linker callback einfo with _bfd_error_handler when possible. 2018-02-26 Alan Modra * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c, * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c, * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize unrecognized/unsupported reloc message. 2018-02-26 Alan Modra * elf32-ppc.c: Standardize error/warning messages. Use _bfd_error_handler rather than einfo when einfo features not used. * elf64-ppc.c: Likewise. 2018-02-23 Alan Modra PR 22881 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO segment if no matching LOAD segment. 2018-02-23 Kuan-Lin Chen * elf32-nds32.h: Define mask for ict_model. 2018-02-20 Jason Duerstock * elfnn-ia64.c (elf_backend_can_gc_sections): Enable. 2018-02-19 Maciej W. Rozycki Revert 2018-01-12 Vlad Ivanov * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when .reginfo section has wrong size. 2018-02-19 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and `.MIPS.abiflags' sections. (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo' section's end. 2018-02-19 Maciej W. Rozycki * section.c (SEC_FIXED_SIZE): New macro. * bfd-in2.h: Regenerate. 2018-02-19 Maciej W. Rozycki * section.c (SEC_HAS_GOT_REF): Remove macro. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler arguments. * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise. * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise. (_bfd_riscv_relax_pc): Likewise and fix typos. * libbfd-in.h (_bfd_error_handler): Add attribute printf. * libbfd.h: Regenerate. 2018-02-19 Alan Modra * dwarf2.c (read_section): Don't use 'll' format modifier. (find_abstract_instance): Likewise. * elfcore.h (elf_core_file_p): Likewise. 2018-02-19 Alan Modra * bfd-in.h: Include inttypes.h or if not available define PRId64, PRIu64 and PRIx64. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L modifier to print bfd_vma. * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c, * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64, and cast input to uint64_t, and similarly for Ld and Lu. * bfd-in2.h: Regenerate. 2018-02-19 Alan Modra * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c, * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c, * reloc.c: Replace use of %R and %T in format strings passed to einfo and friends by %pR and %pT. 2018-02-19 Alan Modra * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place of %A and %B. * aout-adobe.c: Update all messages using %A and %B. * aout-cris.c: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * binary.c: Likewise. * cache.c: Likewise. * coff-alpha.c: Likewise. * coff-arm.c: Likewise. * coff-i860.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic4x.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * coffswap.h: Likewise. * compress.c: Likewise. * cpu-arm.c: Likewise. * ecoff.c: Likewise. * elf-attrs.c: Likewise. * elf-eh-frame.c: Likewise. * elf-ifunc.c: Likewise. * elf-m10300.c: Likewise. * elf-properties.c: Likewise. * elf-s390-common.c: Likewise. * elf.c: Likewise. * elf32-arc.c: Likewise. * elf32-arm.c: Likewise. * elf32-avr.c: Likewise. * elf32-bfin.c: Likewise. * elf32-cr16.c: Likewise. * elf32-cr16c.c: Likewise. * elf32-cris.c: Likewise. * elf32-crx.c: Likewise. * elf32-d10v.c: Likewise. * elf32-d30v.c: Likewise. * elf32-epiphany.c: Likewise. * elf32-fr30.c: Likewise. * elf32-frv.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-i960.c: Likewise. * elf32-ip2k.c: Likewise. * elf32-iq2000.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32c.c: Likewise. * elf32-m32r.c: Likewise. * elf32-m68hc11.c: Likewise. * elf32-m68hc12.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-m68k.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mep.c: Likewise. * elf32-metag.c: Likewise. * elf32-microblaze.c: Likewise. * elf32-moxie.c: Likewise. * elf32-msp430.c: Likewise. * elf32-mt.c: Likewise. * elf32-nds32.c: Likewise. * elf32-nios2.c: Likewise. * elf32-or1k.c: Likewise. * elf32-pj.c: Likewise. * elf32-ppc.c: Likewise. * elf32-rl78.c: Likewise. * elf32-rx.c: Likewise. * elf32-s390.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-sh-symbian.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-sparc.c: Likewise. * elf32-spu.c: Likewise. * elf32-tic6x.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-v850.c: Likewise. * elf32-vax.c: Likewise. * elf32-visium.c: Likewise. * elf32-wasm32.c: Likewise. * elf32-xgate.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sh64.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.c: Likewise. * elfnn-aarch64.c: Likewise. * elfnn-ia64.c: Likewise. * elfnn-riscv.c: Likewise. * elfxx-mips.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.c: Likewise. * hpux-core.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mach-o.c: Likewise. * merge.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peXXigen.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * rs6000-core.c: Likewise. * srec.c: Likewise. * stabs.c: Likewise. * vms-alpha.c: Likewise. * xcofflink.c: Likewise. 2018-02-19 Alan Modra PR 22845 * elf.c (IS_TBSS): Define. (_bfd_elf_map_sections_to_segments): Use IS_TBSS. (assign_file_positions_for_non_load_sections): Revert last change. Properly calculate load segment limits to compare against relro limits. 2018-02-17 Alan Modra PR 22845 * elf.c (assign_file_positions_for_non_load_sections): Ignore degenerate zero size PT_LOAD segments when finding one overlapping the PT_GNU_RELRO segment. 2018-02-16 Alan Modra * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false. (_bfd_bool_bfd_true): Rename from bfd_true. (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr. (_bfd_int_bfd_0): Rename from bfd_0. (_bfd_uint_bfd_0): Rename from bfd_0u. (_bfd_long_bfd_0): Rename from bfd_0l. (_bfd_long_bfd_n1_error): Rename from _bfd_n1. (_bfd_void_bfd): Rename from bfd_void. (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false), (_bfd_bool_bfd_link_false_error), (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true), (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true), (_bfd_bool_bfd_asection_bfd_asection_true), (_bfd_bool_bfd_asymbol_bfd_asymbol_true), (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions. * archive.c (_bfd_noarchive_get_elt_at_index), (_bfd_noarchive_openr_next_archived_file), (_bfd_noarchive_construct_extended_name_table), (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname), (_bfd_noarchive_write_armap): New functions. * archures.c (_bfd_nowrite_set_arch_mach): New function. * coff-alpha.c (alpha_ecoff_swap_coff_aux_in), (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in), (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out), (alpha_ecoff_swap_coff_lineno_out), (alpha_ecoff_swap_coff_reloc_out): New functions. * coff-mips.c (mips_ecoff_swap_coff_aux_in), (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in), (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out), (mips_ecoff_swap_coff_lineno_out), (mips_ecoff_swap_coff_reloc_out): New functions. * coffcode.h (coff_set_alignment_hook): Replace define with new function. (symname_in_debug_hook): Likewise. * ecoff.c (_bfd_ecoff_set_alignment_hook): New function. * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0. * elf.c (assign_file_positions_except_relocs): Test elf_backend_allow_non_load_phdr for NULL. * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from _bfd_elf_link_omit_section_dynsym. Update uses. (_bfd_elf_omit_section_dynsym_all): New function. * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete. (_bfd_elf_omit_section_dynsym_default): Declare. (_bfd_elf_omit_section_dynsym_all): Declare. * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section), (_bfd_nolink_bfd_get_relocated_section_contents), (_bfd_nolink_bfd_lookup_section_flags), (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group), (_bfd_nolink_bfd_link_hash_table_create), (_bfd_nolink_bfd_link_just_syms), (_bfd_nolink_bfd_copy_link_hash_symbol_type), (_bfd_nolink_bfd_link_split_section), (_bfd_nolink_section_already_linked), (_bfd_nolink_bfd_define_common_symbol), (_bfd_nolink_bfd_define_start_stop): New functions. * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup), (_bfd_norelocs_bfd_reloc_name_lookup), (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions. * section.c (_bfd_nowrite_set_section_contents): New function. * syms.c (_bfd_nosymbols_canonicalize_symtab), (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info), (_bfd_nosymbols_get_symbol_version_string), (_bfd_nosymbols_bfd_is_local_label_name), (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line), (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info), (_bfd_nosymbols_bfd_make_debug_symbol), ( _bfd_nosymbols_read_minisymbols), ( _bfd_nosymbols_minisymbol_to_symbol), (_bfd_nodynamic_get_synthetic_symtab): New functions. * libbfd-in.h: Declare new functions. Update existing defines, removing casts. * aix386-core.c: Update to use new hooks. Formatting. * aout-adobe.c: Likewise. * aout-arm.c: Likewise. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * bout.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-i860.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic30.c: Likewise. * coff-tic54x.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * elf-m10300.c: Likewise. * elf32-cr16.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32r.c: Likewise. * elf32-metag.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-target.h: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.h: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * libaout.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mipsbsd.c: Likewise. * mmo.c: Likewise. * netbsd-core.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * osf-core.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * pe-x86_64.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * sco5-core.c: Likewise. * som.c: Likewise. * sparclynx.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * trad-core.c: Likewise. * verilog.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * libbfd.h: Regenerate. 2018-02-15 Jim Wilson * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore symbols whose section address is zero. * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous when pcrel_lo reloc has an addend. Use reloc_dangerous callback for bfd_reloc_dangerous. Use einfo instead of warning callback for errors. Add %X%P to error messages. 2018-02-15 Eric Botcazou PR ld/22832 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) : Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup and assert that the result of the call is not NULL. 2018-02-14 Nick Clifton PR 22823 Revert previous delta. Add extra casts to avoid compile time warnings instead. * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra cast to avoid warning from gcc v8 compiler. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): Delete. (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete. (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Add extra cast to avoid warning from gcc v8 compiler. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. 2018-02-14 H.J. Lu PR ld/22842 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for R_X86_64_PC32 reloc against dynamic function in data section. Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P. (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc against dynamic function in data section. * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as function address only if pcrel_plt is true. (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt. * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for PC-relative PLT. If PLT is PC-relative, don't generate dynamic PC-relative relocation against a function definition in data secton in PIE. Remove the obsolete comments. (elf_x86_link_hash_table): Add pcrel_plt. 2018-02-13 H.J. Lu * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll, instead of bfd_link_pic, for building shared library. 2018-02-13 H.J. Lu PR gas/22791 * elf64-x86-64.c (is_32bit_relative_branch): Removed. (elf_x86_64_relocate_section): Check PIC relocations in PIE. Remove is_32bit_relative_branch usage. Disallow PC32 reloc against protected function in shared object. 2018-02-13 Sergei Trofimovich PR 22828 * po/ru.po: Fix typo in Russian translation. 2018-02-13 Maciej W. Rozycki * wasm-module.c (wasm_scan_name_function_section): Rename `index' local variable to `idx'. 2018-02-13 Nick Clifton PR 22823 Fix compile time warnings generated by gcc version 8. * libbfd-in.h: Remove extraneous text from prototypes. Add prototypes for bfd_false_any, bfd_true_any, bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any, bfd_n1_any, bfd_void_any. (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy function. (_bfd_generic_bfd_merge_private_bfd_data): Likewise. (_bfd_generic_bfd_set_private_flags): Likewise. (_bfd_generic_bfd_copy_private_section_data): Likewise. (_bfd_generic_bfd_copy_private_symbol_data): Likewise. (_bfd_generic_bfd_copy_private_header_data): Likewise. (_bfd_generic_bfd_print_private_bfd_data): Likewise. (_bfd_noarchive_construct_extended_name_table): Likewise. (_bfd_noarchive_truncate_arname): Likewise. (_bfd_noarchive_write_ar_hdr): Likewise. (_bfd_noarchive_get_elt_at_index): Likewise. (_bfd_nosymbols_canonicalize_symtab): Likewise. (_bfd_nosymbols_print_symbol): Likewise. (_bfd_nosymbols_get_symbol_info): Likewise. (_bfd_nosymbols_get_symbol_version_string): Likewise. (_bfd_nosymbols_bfd_is_local_label_name): Likewise. (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise. (_bfd_nosymbols_get_lineno): Likewise. (_bfd_nosymbols_find_nearest_line): Likewise. (_bfd_nosymbols_find_line): Likewise. (_bfd_nosymbols_find_inliner_info): Likewise. (_bfd_nosymbols_bfd_make_debug_symbol): Likewise. (_bfd_nosymbols_read_minisymbols): Likewise. (_bfd_nosymbols_minisymbol_to_symbol): Likewise. (_bfd_norelocs_bfd_reloc_type_lookup): Likewise. (_bfd_norelocs_bfd_reloc_name_lookup): Likewise. (_bfd_nowrite_set_arch_mach): Likewise. (_bfd_nowrite_set_section_contents): Likewise. (_bfd_nolink_sizeof_headers): Likewise. (_bfd_nolink_bfd_get_relocated_section_contents): Likewise. (_bfd_nolink_bfd_relax_section): Likewise. (_bfd_nolink_bfd_gc_sections): Likewise. (_bfd_nolink_bfd_lookup_section_flags): Likewise. (_bfd_nolink_bfd_merge_sections): Likewise. (_bfd_nolink_bfd_is_group_section): Likewise. (_bfd_nolink_bfd_discard_group): Likewise. (_bfd_nolink_bfd_link_hash_table_create): Likewise. (_bfd_nolink_bfd_link_add_symbols): Likewise. (_bfd_nolink_bfd_link_just_syms): Likewise. (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise. (_bfd_nolink_bfd_final_link): Likewise. (_bfd_nolink_bfd_link_split_section): Likewise. (_bfd_nolink_section_already_linked): Likewise. (_bfd_nolink_bfd_define_common_symbol): Likewise. (_bfd_nolink_bfd_define_start_stop): Likewise. (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise. (_bfd_nodynamic_get_synthetic_symtab): Likewise. (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise. (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise. * libbfd.c (bfd_false_any): New function. Like bfd_false but accepts one or more arguments. (bfd_true_any): Likewise. (bfd_nullvoidptr_any): Likewise. (bfd_0_any): Likewise. (bfd_0u_any): Likewise. (bfd_0l_any): Likewise. (_bfd_n1_any): Likewise. (bfd_void_any): Likewise. * libbfd.h (extern): Regenerate * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg based dummy function. * aout-tic30.c (tic30_aout_set_arch_mach): Likewise. * binary.c (binary_get_symbol_info): Likewise. * coff-alpha.c (alpha_ecoff_backend_data): Likewise. * coff-mips.c (mips_ecoff_backend_data): Likewise. * coffcode.h (coff_set_alignment_hook): Likewise. (symname_in_debug_hook): Likewise. (bfd_coff_backend_data bigobj_swap_table): Likewise. * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise. * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise. * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise. * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score.c (elf_backend_omit_section_dynsym): Likewise. * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise. * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise. * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise. * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise. * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise. * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise. * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise. * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise. (bfd_elfNN_bfd_make_debug_symbol): Likewise. (bfd_elfNN_bfd_merge_private_bfd_data): Likewise. (bfd_elfNN_bfd_set_private_flags): Likewise. (bfd_elfNN_bfd_is_target_special_symbol): Likewise. (elf_backend_init_index_section): Likewise. (elf_backend_allow_non_load_phdr): Likewise. * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise. * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise. * ieee.c (ieee_construct_extended_name_table): Likewise. (ieee_write_armap): Likewise. (ieee_write_ar_hdr): Likewise. (ieee_bfd_is_target_special_symbol): Likewise. * ihex.c (ihex_canonicalize_symtab): Likewise. (ihex_bfd_is_target_special_symbol): Likewise. * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise. * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise. (_bfd_ecoff_set_alignment_hook): Likewise. * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise. * mmo.c (mmo_bfd_is_target_special_symbol): Likewise. * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise. * oasys.c (oasys_construct_extended_name_table): Likewise. (oasys_write_armap): Likewise. (oasys_write_ar_hdr): Likewise. (oasys_bfd_is_target_special_symbol): Likewise. * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise. * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise. * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise. * som.c (som_bfd_is_target_special_symbol): Likewise. * srec.c (srec_bfd_is_target_special_symbol): Likewise. * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise. * verilog.c (verilog_bfd_is_target_special_symbol): Likewise. * versados.c (versados_bfd_is_target_special_symbol): Likewise. (versados_bfd_reloc_name_lookup): Likewise. * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise. (vms_bfd_define_start_stop): Likewise. (alpha_vms_bfd_is_target_special_symbol): Likewise. * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise. * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise. * elf32-arc.c (get_replace_function): Assign replacement function to func pointer. * elf32-i370.c (i370_noop): Update prototype. 2018-02-13 Alan Modra PR 22836 * elf.c (_bfd_elf_fixup_group_sections): Account for removed relocation sections. If size reduces to just the flag word, remove that too and mark with SEC_EXCLUDE. * elflink.c (bfd_elf_final_link): Strip empty group sections. 2018-02-13 Alan Modra PR 22829 * elf.c (assign_file_positions_for_non_load_sections): Rewrite PT_GNU_RELRO setup. 2018-02-12 Zebediah Figura * 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-12 Nick Clifton * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant assignment. * elf32-arc.c (elf_arc_relocate_section): Likewise. 2018-02-09 Eric Botcazou * 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) : If relocation is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation. : Adjust comments. : 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-09 H.J. Lu * 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-08 H.J. Lu * 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-08 H.J. Lu * 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-08 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous change. 2018-02-08 Nick Clifton PR 22788 * elf.c (elf_parse_notes): Reject notes with excessuively large alignments. 2018-02-07 Alan Modra Revert 2018-01-17 Alan Modra * elf32-ppc.c: Remove speculation barrier support. * elf32-ppc.h: Likewise. * elf64-ppc.c: Likewise. * elf64-ppc.h: Likewise. 2018-02-06 Jim Wilson * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used callback to report an error. 2018-02-06 Eric Botcazou PR ld/22263 * 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. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Remove useless code, tidy and merge related blocks. : Turn call to bfd_link_pic into call to !bfd_link_executable. : 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. : Merge into... : ...this. Adjust 4th argument in call to sparc_elf_tls_transition and remove redundant code. : Turn call to bfd_link_pic into call to !bfd_link_executable. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. Tidy up. : Likewise. : Likewise. : Likewise. : Likewise. 2018-02-06 Miloš Stojanović 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-06 Sergio Durigan Junior * coff-rs6000.c (xcoff_write_archive_contents_old): Use 'memcpy' instead of 'strncpy' when writing the magic number. 2018-02-06 Nick Clifton 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-06 Paul Carroll * bfd/dwarf2.c (find_abstract_name): Modified to return file and line information in addition to name, if they can be found. 2018-02-05 Renlin Li 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. 2018-02-05 H.J. Lu 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. 2018-02-05 Maciej W. Rozycki * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to initialize `hi_reloc'. 2018-02-05 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_section_processing): For SHT_MIPS_REGINFO sections don't assert the correct size and report an error instead. 2018-02-05 Maciej W. Rozycki * elf.c (_bfd_elf_write_object_contents): Propagate a failure status from `->elf_backend_section_processing'. 2018-02-02 Jim Wilson 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-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops emitted for toc sequence optimization. Set and use "howto" later. 2018-02-01 Simon Marchi * 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. 2018-01-31 Michael Matz * elflink.c (bfd_elf_define_start_stop): Fix check of def_dynamic. 2018-01-31 H.J. Lu PR ld/21964 * elflink.c (bfd_elf_define_start_stop): Check if __start and __stop symbols are referenced by shared objects. 2018-01-30 Alan Modra 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-30 Alan Modra * elflink.c (bfd_elf_define_start_stop): Make __start and __stop symbols dynamic. 2018-01-29 Alan Modra PR 22741 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in range before converting to a symbol table pointer. a15 5 * elflink.c (bfd_elf_define_start_stop): Override symbols when they are defined dynamically. 2018-01-26 Alan Modra a18 5 2018-01-25 Alan Modra PR 22746 * elfcode.h (elf_object_p): Avoid integer overflow. d36 1 a36 1 2018-01-24 Renlin Li d38 2 a39 26 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. 2018-01-24 Renlin Li * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2018-01-23 Maciej W. Rozycki * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale `mips_elf32_section_processing' comment reference. d57 1 a57 10 2018-01-17 Nick Clifton * po/ru.po: Updated Russian translation. * po/uk/po: Updated Ukranian translation. 2018-01-17 Alan Modra * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning. 2018-01-17 Alan Modra d83 5 a87 1 2018-01-17 Alan Modra d124 5 d135 1 a135 5 * po/bfd.pot: Regenerated. 2018-01-13 Nick Clifton * version.m4: Bump version to 2.30.51 d137 1 d186 1 a186 1 2018-01-09 Kuan-Lin Chen @ 1.1.1.10 log @Import binutils-2.34 2020-01-18 Nick Clifton Binutils 2.34 branch created. 2020-01-18 Nick Clifton Synchronize top level configure files with master version: 2020-01-01 Ben Elliston * config.guess: Update copyright years. * config.sub: Likewise. 2019-12-21 Ben Elliston * config.guess (set_cc_for_build): Prevent multiple calls by checking if $tmp is already set. We can't check CC_FOR_BUILD as the user may set it externally. Thanks to Torbjörn Granlund for the bug report. 2019-12-21 Torbjörn Granlund * config.guess (alpha:Linux:*:*): Guard against missing /proc/cpuinfo by redirecting standard error to /dev/null. 2019-09-12 Daniel Bittman * config.guess (*:Twizzler:*:*): New. * config.sub (-twizzler*): New. 2019-07-24 Ben Elliston * config.guess (mips:OSF1:*.*): Whitespace cleanup. 2019-06-30 Ben Elliston * config.sub (case $os): Match nsk* and powerunix. Don't later match nsk* and set os=nsk which removes the OS version number. 2019-06-30 Ben Elliston * config.sub: Recognise os108*. 2019-06-26 Ben Elliston * config.sub (hp300): Set $os to hpux. 2019-06-26 Ben Elliston * config.sub (vsta): Move into alphabetical order. 2019-06-10 Ben Elliston * config.guess (*:OS108:*:*): Recognise new OS. 2019-05-28 Ben Elliston * config.guess (*:Darwin:*:*): Run xcode-select to determine if a system compiler is installed. If not, do not run set_cc_for_build, as the default cc will open a dialog box asking to install Xcode. If no C compiler is available, guess based on uname -p and uname -m. 2019-05-28 Ben Elliston * config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR. 2020-01-17 Simon Marchi * Makefile.def: Add dependencies of all-gdbsupport on all-bfd. * Makefile.in: Re-generate. 2020-01-14 Tom Tromey * src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport. * MAINTAINERS: Add gdbsupport. * configure: Rebuild. * configure.ac (configdirs): Add gdbsupport. * gdbsupport: New directory, move from gdb/gdbsupport. * Makefile.def (host_modules, dependencies): Add gnulib. * Makefile.in: Rebuild. 2020-01-09 Aaron Merey * config/debuginfod.m4: New file. Add macro AC_DEBUGINFOD. Adds new configure option --with-debuginfod. * configure: Regenerate. * configure.ac: Call AC_DEBUGINFOD. 2019-12-26 Christian Biesinger * .gitignore: Add perf.data and perf.data.old. 2019-10-17 Sergio Durigan Junior * src-release.sh (GDB_SUPPORT_DIRS): Add libctf. 2019-10-17 Alan Modra PR 29 * src-release.sh (getver): Replace "head -1" with "head -n 1". 2019-07-30 Nick Alcock * Makefile.def (host_modules): libctf is no longer no_install. * Makefile.in: Regenerated. 2019-07-13 Nick Alcock * Makefile.def (dependencies): all-ld depends on all-libctf. * Makefile.in: Regenerated. 2019-09-09 Phil Blundell binutils 2.33 branch created 2019-08-19 Tom Tromey * configure: Rebuild. * configure.ac: Add --with-static-standard-libraries. 2019-08-09 Nick Clifton * libiberty: Sync with gcc. Bring in: 2019-08-08 Martin Liska PR bootstrap/91352 * lrealpath.c (is_valid_fd): New function. 2019-07-24 Martin Liska PR lto/91228 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Find first '\0' starting from gnu_lto + 1. 2019-07-12 Ren Kimura * simple-object-elf.c (simple_object_elf_match): Check zero value shstrndx. This fixes a Bug 90924. 2019-07-22 Martin Liska * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Do not search for gnu_lto_v1, but search for first '\0'. 2019-07-18 Eduard-Mihai Burtescu * cplus-dem.c: Include rust-demangle.h. * rust-demangle.c: Include rust-demangle.h. * rust-demangle.h: New file. 2019-05-31 Michael Forney * cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__ is non-zero. 2019-04-30 Ben L * d-demangle.c (dlang_parse_assocarray): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_tuple): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_structlit): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result. * testsuite/d-demangle-expected: Add testcase. * d-demangle.c (dlang_parse_integer): Fix stack underflow. * testsuite/d-demangle-expected: Add testcase. * cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'. * testsuite/demangle-expected: Add testcase. * cp-demangle.c (d_encoding): Guard against NULL return values from d_right (dc). * testsuite/demangle-expected: Add testcase. 2019-04-29 Ben L * cp-demangle.c (d_expression_1): Don't peek ahead unless the current char is valid. * testsuite/demangle-expected: Add testcase. 2019-04-10 Nick Clifton PR 89394 * cp-demangle.c (cplus_demangle_fill_name): Reject negative lengths. (d_count_templates_scopes): Replace num_templates and num_scopes parameters with a struct d_print_info pointer parameter. Adjust body of the function accordingly. Add recursion counter and check that the recursion limit is not reached. (d_print_init): Pass dpi parameter to d_count_templates_scopes. Reset recursion counter afterwards, unless the recursion limit was reached. 2019-07-13 Joel Brobecker * src-release (getver): If $tool/gdbsupport/create-version.sh exists, use that to determine the version number. 2019-06-21 Andreas Schwab * src-release.sh (GDB_SUPPORT_DIRS): Add gnulib. 2019-06-14 Tom Tromey * MAINTAINERS: Add gnulib. * gnulib: New directory, move from gdb/gnulib. * configure.ac (host_libs): Add gnulib. * configure: Rebuild. * Makefile.def (host_modules, dependencies): Add gnulib. * Makefile.in: Rebuild. 2019-06-03 Nick Clifton Revert: 2019-05-29 Nick Clifton * configure.ac (noconfigdirs): Add libctf if the target does not use the ELF file format. * configure: Regenerate. 2019-05-29 Nick Clifton * src-release.sh (do_proto_toplev): Add libctf to list of directories that can be disabled. 2019-05-29 Nick Clifton * configure.ac (noconfigdirs): Add libctf if the target does not use the ELF file format. * configure: Regenerate. 2019-05-28 Nick Alcock * Makefile.def (dependencies): configure-libctf depends on all-bfd and all its deps. * Makefile.in: Regenerated. 2019-05-28 Nick Alcock * MAINTAINERS: Add libctf. 2019-05-28 Nick Alcock * Makefile.def (host_modules): Add libctf. * Makefile.def (dependencies): Likewise. libctf depends on zlib, libiberty, and bfd. * Makefile.in: Regenerated. * configure.ac (host_libs): Add libctf. * configure: Regenerated. 2019-05-23 Jose E. Marchesi * config.guess: Synchronize with config project master sources. * config.sub: Likewise. * readline/support/config.guess: Likewise. * readline/support/config.sub: Likewise. 2019-04-10 Nick Clifton * libiberty: Sync with gcc. Bring in: 2019-04-10 Nick Clifton PR 89394 * cp-demangle.c (cplus_demangle_fill_name): Reject negative lengths. (d_count_templates_scopes): Replace num_templates and num_scopes parameters with a struct d_print_info pointer parameter. Adjust body of the function accordingly. Add recursion counter and check that the recursion limit is not reached. (d_print_init): Pass dpi parameter to d_count_templates_scopes. Reset recursion counter afterwards, unless the recursion limit was reached. 2018-06-24 Nick Clifton 2.32 branch created. 2019-01-14 Rainer Orth Merge from GCC: PR target/88535 * config.guess: Import upstream version 2019-01-03. * config.sub: Import upstream version 2019-01-01. 2019-01-10 Nick Clifton * libiberty: Sync with gcc. Bring in: 2019-01-09 Sandra Loosemore PR other/16615 * cp-demangle.c: Mechanically replace "can not" with "cannot". * floatformat.c: Likewise. * strerror.c: Likewise. 2018-12-22 Jason Merrill Remove support for demangling GCC 2.x era mangling schemes. * cplus-dem.c: Remove cplus_mangle_opname, cplus_demangle_opname, internal_cplus_demangle, and all subroutines. (libiberty_demanglers): Remove entries for ancient GNU (pre-3.0), Lucid, ARM, HP, and EDG demangling styles. (cplus_demangle): Remove 'work' variable. Don't call internal_cplus_demangle. 2019-01-03 Дилян Палаузов * configure.ac: Don't configure readline if --with-system-readline is used. * configure: Re-generate. 2018-10-31 Joseph Myers Merge from GCC: PR bootstrap/82856 * multilib.am: New file. From automake. 2018-09-12 Sergio Durigan Junior * src-release.sh (GDB_SUPPORT_DIRS): Add "contrib". 2018-07-16 Nick Clifton @@ -20,6 +338,18 @@@@ * config.guess: Sync with upstream version 2018-06-26. * config.sub: Sync with upstream version 2018-07-02. 2018-06-29 Alexandre Oliva * configure.ac: Introduce support for @@unless/@@endunless. * Makefile.tpl (dep-kind): Rewrite with cond; return postbootstrap in some cases. (make-postboot-dep, postboot-targets): New. (dependencies): Do not output postbootstrap dependencies at first. Output non-target ones changed for configure to depend on stage_last @@if gcc-bootstrap, and the original deps @@unless gcc-bootstrap. * configure.in, Makefile.in: Rebuilt. 2018-06-24 Nick Clifton * configure: Regenerate. @ text @d1 1 a1 1 2020-02-01 Nick Clifton d3 46 a48 1 Binutils 2.34 release. d50 1 a50 1 2020-01-29 Alan Modra d52 3 a54 5 Apply from master 2020-01-27 H.J. Lu Alan Modra PR ld/25458 * elflink.c (_bfd_elf_gc_mark_rsec): Mark all weak aliases. d56 1 a56 4 2020-01-23 Alan Modra PR 25444 * elf.c (assign_file_positions_for_load_sections): Avoid divide by zero when p_align is zero. d58 7 a64 3 2020-01-22 Alan Modra * elf64-ppc.c (ppc64_elf_size_stubs): Correct condition under which __tls_get_addr calls will be eliminated. d66 1 a66 1 2020-01-23 Nick Clifton d68 31 a98 1 * po/fr.po: Updated French translation. d100 1 a100 1 2020-01-20 Nick Clifton a101 1 * po/pt.po: Updates Portuguese translation. d103 14 d119 6 a124 1 2020-01-18 Nick Clifton d126 3 a128 1 * version.m4 (BFD_VERSION): Set to 2.33.90. d132 458 a589 1 2020-01-18 Nick Clifton d591 6 a596 1 Binutils 2.34 branch created. d598 1 a598 1 2020-01-17 Christian Biesinger d600 1 a600 4 * coff-arm.c: Fix spelling error (seperate). * elfxx-riscv.c (riscv_parse_sv_or_non_std_ext): Fix spelling error (seperate). * sysdep.h (strnlen): Fix spelling error (seperate). d602 1 a602 1 2020-01-15 Lars Brinkhoff d604 16 a619 2 PR 20694 * pdp11.c (TARGET_PAGE_SIZE): Set to 8192. d621 1 a621 1 2020-01-15 Alan Modra d623 2 a624 6 PR 25384 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Update comment. (ppc64_elf_adjust_dynamic_symbol): Don't allow .dynbss copies of function symbols unless dot symbols are present. Do warn whenever one is created, regardles of whether a PLT entry is also emitted for the function symbol. d626 1 a626 1 2020-01-14 Alan Modra d628 1 a628 2 * som.c (som_bfd_count_ar_symbols): Error when file position of symbols on chains is not strictly increasing. d630 1 a630 1 2020-01-14 Alan Modra d632 3 a634 5 * vms.h (VMS_DEBUG): Define as 0. * vms-alpha.c (image_write): Move debug output after bounds check. Tidy bounds check. (_bfd_vms_slurp_eihd): Warning fix. (_bfd_vms_slurp_etir): Init variables to avoid bogus warnings. d636 1 a636 1 2020-01-13 Alan Modra d638 118 a755 2 * vms-alpha.c (_bfd_vms_slurp_egsd): Ensure minimum size even for "ignored" records. d757 1 a757 1 2020-01-13 Alan Modra d759 2 a760 9 * wasm-module.c (wasm_scan_name_function_section): Formatting. Delete asect name check. Move asect NULL check to wasm_object_p. Correct bounds check of sizes against end. Replace uses of bfd_zalloc with bfd_alloc, zeroing only necessary bytes. Use just one bfd_release. (wasm_scan): Don't use malloc/strdup for section names, bfd_alloc instead. Simplify code prefixing section name. Formatting. Don't attempt to free memory here.. (wasm_object_p): ..do so here. d762 1 a762 1 2020-01-10 Szabolcs Nagy d764 52 a815 3 PR ld/22269 * elf32-arm.c (elf32_arm_final_link_relocate): Use UNDEFWEAK_NO_DYNAMIC_RELOC. d817 96 d914 1 a914 1 2020-01-10 Tamar Christina d916 3 a918 2 PR 25210 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Remove elfclass. d920 3 a922 1 2020-01-10 Alan Modra d924 1 a924 1 * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type. d926 2 a927 1 2020-01-09 Nick Clifton d929 1 a929 3 PR 25221 * bfd.c (bfd_convert_section_contents): Check for a compress header size that is larger than the actual section size. d931 3 a933 1 2020-01-08 Alan Modra d935 229 a1163 3 PR 25351 * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms after removing sections. d1165 1 a1165 1 2020-01-06 Jim Wilson d1167 8 a1174 7 PR 25205 * elfnn-riscv.c (riscv_elf_relocate_section) : Add check for !bfd_link_pic (info). : Move next to R_RISCV_CALL. : Add comment. (_bfd_riscv_relax_section): For plt.offset check, add check for bfd_link_pic (info). Add comment. d1176 1 a1176 1 2020-01-06 Alan Modra d1178 8 a1185 3 * format.c (bfd_check_format_matches): Ignore bfd_error on target match failures. Don't init to bfd_error_wrong_format before calling _bfd_check_format. d1187 1 a1187 1 2020-01-06 Alan Modra d1189 12 a1200 3 * vms-alpha.c (_bfd_vms_push, _bfd_vms_pop): Return pass/fail status rather than exiting on stack overflow or underflow. (_bfd_vms_slurp_etir): Adjust to suit. d1202 1 a1202 1 2020-01-06 Alan Modra d1204 12 a1215 1 * som.c (som_bfd_fill_in_ar_symbols): Bounds check som_dict index. d1217 1 a1217 1 2020-01-06 Alan Modra d1219 23 a1241 15 * mach-o.c (bfd_mach_o_read_dylinker): Don't read past end of command. Check name offset is within command. (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib), (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints), (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab), (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid), (bfd_mach_o_read_linkedit, bfd_mach_o_read_str), (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min), (bfd_mach_o_read_encryption_info, bfd_mach_o_read_source_version), (bfd_mach_o_read_encryption_info_64, bfd_mach_o_read_main), (bfd_mach_o_read_note, bfd_mach_o_read_build_version), (bfd_mach_o_read_segment): Similarly. (bfd_mach_o_read_thread): Properly bound check thread struct. Don't repeat checks on second loop. (bfd_mach_o_read_command): Fail on invalid command length. d1243 1 a1243 1 2020-01-04 Alan Modra d1245 11 a1255 5 * format.c (bfd_check_format_matches): Add preserve_match. Save initial bfd state in "preserve", matched bfd state in "preserve_match". Save just the first match. Release bfd_alloc memory. Restore and finish preserved state as appropriate on all function exit paths. d1257 1 a1257 1 2020-01-04 Alan Modra d1259 12 a1270 1 * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc. d1272 1 a1272 1 2020-01-04 Alan Modra d1274 10 a1283 2 * coffgen.c (coff_real_object_p): Free malloc'd memory on target match too. d1285 1 a1285 1 2020-01-03 Nick Clifton d1287 16 a1302 4 PR 25307 (bfd_pef_parse_function_stubs): Correct the test that ensures that there is enough data remaining in the code buffer before attempting to read a function stub. d1304 1 a1304 1 2020-01-03 Nick Clifton d1306 1 a1306 13 PR 25308 * elf-properties.c (_bfd_elf_convert_gnu_properties): Check the return value from bfd_malloc. * elf32-arm.c (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise. (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Likewise. (elf32_arm_filter_cmse_symbols): Likewise. (elf32_arm_write_section): Likewise. * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise. (bfd_mach_o_follow_dsym): Likewise. * pef.c (bfd_pef_print_loader_section): Likewise. (bfd_pef_scan_start_address): Likewise. (bfd_pef_parse_function_stubs): Likewise. (bfd_pef_parse_symbols): Likewise. d1308 1 a1308 1 2020-01-03 Sergei Trofimovich d1310 9 a1318 3 * elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): don't fail on binary inputs ld/PR25316. (is_ia64_elf): new helper to filter on ia64 objects. d1320 1 a1320 1 2020-01-03 Jan Beulich d1322 23 a1344 3 * mach-o.c (cpusubtype, bfd_mach_o_header_p): Insert underscore in parameter names. (bfd_mach_o_scan): Insert underscore in two variable names. d1346 1 a1346 1 2020-01-02 Sergey Belyashov d1348 2 a1349 1 * Makefile.am: Add z80-elf target support. d1351 50 d1402 2 d1405 1 d1407 1016 a2422 4 * config.bfd: Add z80-elf target support and new arches: ez80 and z180. * elf32-z80.c: New file. * archures.c: Add new z80 architectures: eZ80 and Z180. d2424 710 a3133 4 * cpu-z80.c: Likewise. * coff-z80.c: Add new relocations for Z80 target and local label check. * reloc.c: Add new relocs. d3137 159 a3295 1 2020-01-02 Tamar Christina d3297 3 a3299 3 PR 25210 PR 24753 * elfnn-aarch64.c (_bfd_aarch64_create_stub_section): Set ELF class. d3301 1 a3301 1 2020-01-01 Alan Modra d3305 1 a3305 1 For older changes see ChangeLog-2019 d3307 1 a3307 1 Copyright (C) 2020 Free Software Foundation, Inc. @ 1.1.1.11 log @Update binutils from 2.34 to 2.39 2022-07-08 Nick Clifton * 2.39 branch created. 2022-07-04 Nick Clifton * libiberty: Synchronize with GCC. Bring in: 2022-07-01 Nick Clifton PR demangler/105039 * rust-demangle.c (demangle_const): Add recursion limit. 2022-06-26 Simon Marchi * configure.ac: Add AC_CONFIG_MACRO_DIRS call. * configure: Re-generate. 2022-04-12 Nick Clifton * zlib: Rebase to the 1.2.12 release. 2022-04-08 Simon Marchi * configure.ac: Add AC_SUBST(PKG_CONFIG_PATH). * configure: Re-generate. * Makefile.tpl (HOST_EXPORTS): Pass PKG_CONFIG_PATH. (PKG_CONFIG_PATH): New. * Makefile.in: Re-generate. 2022-03-15 Jose E. Marchesi * gprofng/src/gp-collect-app.cc (collect::check_args): Use fallthrough comment instead of attribute. 2022-03-11 Vladimir Mezentsev * Makefile.def: Add gprofng module. * configure.ac: Add --enable-gprofng option. * src-release.sh: Add gprofng. * Makefile.in: Regenerate. * configure: Regenerate. * gprofng: New directory. 2022-01-22 Nick Clifton * 2.38 release branch created. 2022-01-17 Nick Clifton Update config.[guess|sub] from upstream: 2022-01-09 Idan Horowitz config.guess: recognize SerenityOS * config.guess (*:SerenityOS:*:*): Recognize. (timestamp): Update. 2022-01-03 Bernhard Voelker Fix GPLv3 license headers to use a comma instead of semicolon See: https://www.gnu.org/licenses/gpl-3.0.html#howto Update license headers automatically using the following script: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * config.guess: Adjust via the above command. (timestamp): Update. * config.sub: Likewise. * doc/config.guess.1: Regenerate. * doc/config.sub.1: Likewise. 2022-01-01 Dmitry V. Levin Update copyright years * config.guess: Update copyright years. * config.sub: Likewise. 2021-12-25 Dmitry V. Levin config.sub: alias armh to armv7l ALT uses armh as an alias for armv7l-alt-linux-gnueabihf since 2012. * config.sub (armh-unknown|armh-alt): Set cpu, vendor, and basic_os. (timestamp): Update. 2021-12-24 Dmitry V. Levin config.sub: alias aarch64le to aarch64 Apparently, QNX reports aarch64 as aarch64le on little-endian machines. * config.sub (aarch64le-*): Set cpu to aarch64. (timestamp): Update. 2021-12-13 Dmitry V. Levin config.sub: fix typo in timestamp * config.sub: Fix timestamp. 2021-11-30 Andreas F. Borchert config.guess: x86_64-pc-solaris2.11 is not properly recognized config.guess guesses Solaris 11 to run on a 32-bit platform despite Solaris 11 no longer supporting any 32-bit platform. See the following code at lines 434 to 445: | SUN_ARCH=i386 | # If there is a compiler, see if it is configured for 64-bit objects. | # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | # This test works for both compilers. | if test "$CC_FOR_BUILD" != no_compiler_found; then | if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ | grep IS_64BIT_ARCH >/dev/null | then | SUN_ARCH=x86_64 | fi | fi If "cc" is installed, i.e. the Oracle Studio compiler, this one is chosen for $CC_FOR_BUILD. This compiler, the gcc provided by Oracle and also gcc bootstrapped from sources on that platform with a default configuration will by default generate 32-bit binaries -- even on a 64-bit platform. And __amd64 will not be defined for compilations targeting a 32-bit platform. This is different from the corresponding behaviour on GNU/Linux systems where the local platform is targeted by default. Thus, as long as you do not add "-m64" or if you have a custom-built gcc which defaults to 64 bit, you will get 32-bit binaries on Solaris despite living on a 64-bit platform. * config.guess (i86pc:SunOS:5.*:* || i86xen:SunOS:5.*:*): Adapt the test by adding the "-m64" flag. This will work properly for Solaris 10 as well (the last Solaris release that supported x86 32-bit platforms). 2021-10-27 Jordi Sanfeliu Recognize Fiwix $ make check cd testsuite && bash config-guess.sh && rm uname PASS: config.guess checks (137 tests) cd testsuite && bash config-sub.sh PASS: config.sub checks (882 tests) PASS: config.sub idempotency checks (819 tests) PASS: config.sub canonicalise each config.guess testcase (137 tests) * config.guess (i*86:Fiwix:*:*): Recognize. * config.sub (fiwix*): Likewise. 2021-10-18 Kinshuk Dua config.sub: Fix typo in comment Fixes: 5e531d391852a54e7fab2d8ff55625fca514b305 2021-08-14 Nick Bowler config.sub: work around command assignment bug in some shells When combining variable assignments with a shell command, some older shells (notably heirloom-sh and presumably also Solaris 10 /bin/sh) have a bug which causes the assignment to alter the current execution environment whenever the command is a shell built-in. For example: % dash -c 'x=good; x=bad echo >/dev/null; echo $x' good % jsh -c 'x=good; x=bad echo >/dev/null; echo $x' bad The config.sub script contains a few commands of the form: IFS=- read ... which triggers this bug, causing the IFS assignment to persist for the remainder of the script. This can cause misbehaviour in certain cases, for example: % jsh config.sub i386-linux-gnu config.sub: test: unknown operator gnu % jsh config.sub i386-gnu/linux sed: can't read s|gnu/linux|gnu|: No such file or directory Invalid configuration `i386-gnu/linux': OS `' not recognized * config.sub: Save and restore IFS explicitly to avoid shell bugs. * doc/config.sub.1: Regenerate. 2021-08-04 Jeremy Soller config.sub: add Linux Relibc Target $ make check cd testsuite && bash config-guess.sh && rm uname PASS: config.guess checks (136 tests) cd testsuite && bash config-sub.sh PASS: config.sub checks (881 tests) PASS: config.sub idempotency checks (818 tests) PASS: config.sub canonicalise each config.guess testcase (136 tests) * config.sub (relibc*): Recognize. * doc/config.sub.1: Regenerate. * testsuite/config-sub.data (x86_64-linux-relibc): New test. 2021-07-06 Stephanos Ioannidis config.sub: add Zephyr RTOS support This adds the Zephyr RTOS targets in preparation for implementing the Zephyr RTOS-specific toolchain support. $ make check cd testsuite && bash config-guess.sh && rm uname PASS: config.guess checks (136 tests) cd testsuite && bash config-sub.sh PASS: config.sub checks (880 tests) PASS: config.sub idempotency checks (817 tests) PASS: config.sub canonicalise each config.guess testcase (136 tests) * config.sub (zephyr*): Recognize. * doc/config.sub.1: Regenerate. * testsuite/config-sub.data: Add testcases for *-zephyr. 2021-07-03 Ozkan Sezer config.sub: disable shellcheck SC2006 / SC2268 warnings This is in line with the recent config.guess change in commit 12fcf67c9108f4c4b581eaa302088782f0ee40ea * config.sub (shellcheck disable): Add SC2006,SC2268. Suggested-by: Jacob Bachmeyer 2021-07-03 Ozkan Sezer config.sub: normalize the quoting in the `echo FOO | sed ...` Some cases quote the argument to echo and some do not. At runtime it probably does not matter because the substituted values will never contain whitespace, but quoting them all would make shellcheck more useful. * config.sub: Consistently quote the argument of echo. * doc/config.sub.1: Regenerate. Suggested-by: Jacob Bachmeyer 2021-07-02 Ozkan Sezer config.sub: replace POSIX $( ) with classic ` ` throughout This is in line with the recent config.guess change in commit d70c4fa934de164178054c3a60aaa0024ed07c91. The patch was generated using patch-6.gawk script introduced in that commit. * config.sub: Revert POSIX command substitutions to classic form. 2021-06-04 Vineet Gupta Recognize arc32 This is the 32-bit variant of ARCv3 ISA (which is not compatible with the 32-bit ARCv2 ISA) | make check | cd testsuite && bash config-guess.sh && rm uname | PASS: config.guess checks (136 tests) | cd testsuite && bash config-sub.sh | PASS: config.sub checks (864 tests) | PASS: config.sub idempotency checks (801 tests) | PASS: config.sub canonicalise each config.guess testcase (136 tests) * config.guess (arc32:Linux:*:*): Recognize. * config.sub (arc32): Likewise. 2021-05-27 Jacob Bachmeyer Remove automatic patch generators These tools have served their purposes and need not be kept outside of the repository history any longer. This patch as a diff also collects the contents of the various tools in one convenient place. * patch-1.gawk: Remove. * patch-3.gawk: Likewise. * patch-6.gawk: Likewise. 2021-05-26 Jacob Bachmeyer config.guess: manual fixups after previous automatic patch The tool could not handle command substitutions that span lines, but fortunately there were only two such substitutions in the script. The test for which universe is active on Pyramid is rewritten into a case block because it was the only use of a command substitution as an argument to the test command, which would require quoting. * config.guess: Rewrite "if" for Pyramid systems to "case". 2021-05-26 Jacob Bachmeyer config.guess: replace POSIX $( ) with classic ` ` throughout The previous replacement of backticks with POSIX command substitutions was ill-considered and illogical: this script recognizes many archaic machine types that probably never had POSIX shells, therefore it needs to be able to run successfully under pre-POSIX shells. This patch was generated using the included GNU Awk program. * config.guess: Revert POSIX command substitutions to classic form. * patch-6.gawk: Store the tool that produced the automated patch. 2021-05-26 Jacob Bachmeyer config.guess: manual fixup after previous automated patches This patch provides the special handling for the GNU system. As these were two small and unique edits, they were not included in the scripts. This patch also cleans up other minor issues that must be addressed before reverting to classic command substitutions and updates "shellcheck" directives to account for changes in this script and the change in "shellcheck" towards reporting individual portability issues. 2021-05-26 Jacob Bachmeyer config.guess: automatic fixups after previous automated patch This patch was generated using the following command: sed -i config.guess \ -e '/="[^"]\+"\(-\|$\)/s/="\([^"([:space:])]\+\)"/=\1/' \ -e '/="[^"]\+"[[:alnum:]]/s/="\$\([^([:space:])]\+\)"/=${\1}/' \ -e \ '/\$(echo[^|]\+|/s/\([^[:space:]]\)[[:space:]]*|[[:space:]]*sed/\1 | sed/g' * config.guess: Remove unneeded quotes in other variable assignments, standardize spacing for "echo ... | sed" substitutions. 2021-05-26 Jacob Bachmeyer config.guess: remove unneeded quotes and factor command substitutions This is further cleanup and simplifies some constructs that can confuse Emacs' syntax highlighting while generally reducing required quoting. This patch was generated using the included GNU Awk program. * config.guess: Remove unneeded variable quotes and factor out command substitutions when setting GUESS. * patch-3.gawk: Store the tool that produced the automated patch. 2021-05-25 Jacob Bachmeyer config.guess: manual fixups after previous automatic patch * config.guess: Adjust a few "leftover" cases that the tool could not easily recognize and fixes comment indentation in a few other special cases. 2021-05-25 Jacob Bachmeyer config.guess: use intermediate variable with uname results This will allow quoting to be significantly simplified in another pass through the file. This patch was generated using the included GNU Awk program. * config.guess: Use GUESS variable to hold results of uname analysis. * patch-1.gawk: Store the tool that produced the automated patch. 2021-05-25 Jacob Bachmeyer config.guess: introduce intermediate variable with uname results This will allow quoting to be significantly simplified in another pass through the file. * config.guess: Introduce GUESS variable to hold results of uname analysis. 2021-05-24 Dmitry V. Levin config.guess: fix shellcheck warning SC2154 While, according to Plan 9 documentation, the environment variable $cputype is set to the name of the kernel's CPU's architecture, shellcheck warns that cputype is referenced but not assigned. Be on the safe side and do not use cputype if it is not defined or empty. * config.guess (*:Plan9:*:*): Fix shellcheck warning SC2154. 2021-05-24 Dmitry V. Levin config.guess: remove redundant quotes in case commands According to the GNU Autoconf Portable Shell Programming manual, the Bourne shell does not systematically split variables and back-quoted expressions, in particular on the right-hand side of assignments and in the argument of 'case'. The change is made automatically using the following command: $ sed -E -i 's/(\)/\1\2\3/' config.guess * config.guess: Simplify case commands by removing quotes around the argument. Suggested-by: Jacob Bachmeyer 2021-05-24 Dmitry V. Levin config.guess: simplify exit status workaround on alphaev67-dec-osf5.1 Commit 29865ea8a5622cdd80b7a69a0afa78004b4cd311 introduced an exit trap reset before exiting to avoid a spurious non-zero exit status on alphaev67-dec-osf5.1. Simplify that code a bit by moving the exit trap reset around. * config.guess (alpha:OSF1:*:*): Reset exit trap earlier. * doc/config.guess.1: Regenerate. 2021-10-29 Eli Zaretskii * gdb/doc/gdb.texinfo (Command Options): (Data): Document '-memory-tag-violations'. Update the example. 2021-09-28 Andrew Burgess * src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace. 2021-09-27 Nick Alcock PR libctf/27967 * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided NM, if there is one. Run nm on itself, not on /dev/null, to avoid errors from nms that refuse to work on non-regular files. Remove other workarounds for this problem. Strip out blank lines from the nm output. 2021-09-27 Nick Alcock PR libctf/27967 * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11. 2021-07-03 Nick Clifton * 2.37 release branch created. 2021-07-03 Nick Clifton * libiberty: Sync with gcc. Bring in: 2021-06-30 Gerald Pfeifer * make-temp-file.c (usrtmp): Remove. (choose_tmpdir): Remove use of usrtmp. 2021-06-28 Indu Bhagat * simple-object.c (handle_lto_debug_sections): Copy over .BTF section. 2021-06-28 Indu Bhagat David Faust Jose E. Marchesi Weimin Pan * simple-object.c (handle_lto_debug_sections): Copy over .ctf sections. 2021-06-05 John David Anglin PR target/100734 * configure.ac: Use libiberty snprintf and vsnprintf on hppa*-*-hpux*. * configure: Regenerate. 2021-05-06 Tom Tromey * hashtab.c (htab_eq_string): New function. 2021-05-04 Eric Botcazou * configure.ac: Make test for variables more robust. * configure: Regenerate. 2021-05-03 H.J. Lu PR bootstrap/99703 * configure: Regenerated. 2021-04-21 Andreas Schwab PR demangler/100177 * rust-demangle.c (demangle_const_char): Properly print the character value. 2021-03-31 Patrick Palka PR c++/88115 * cp-demangle.c (d_dump, d_make_comp, d_expression_1) (d_count_templates_scopes): Handle DEMANGLE_COMPONENT_VENDOR_EXPR. (d_print_comp_inner): Likewise. : Revert r11-4926 change. : Likewise. * testsuite/demangle-expected: Adjust __alignof__ tests. 2021-03-16 Nick Clifton * sha1.c (sha1_process_bytes): Use memmove in place of memcpy. 2021-02-20 Mike Frysinger * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, $(srcdir)/aclocal.m4): Define. (configure_deps): Rename to ... (aclocal_deps): ... this. Replace aclocal.m4 with acinclude.m4. ($(srcdir)/configure): Replace $(configure_deps) with $(srcdir)/aclocal.m4. * aclocal.m4: Move libiberty macros to acinclude.m4, then regenerate. * acinclude.m4: New file. * configure: Regenerate. 2021-02-19 Ayush Mittal * argv.c (expandargv): free allocated buffer if read fails. 2021-02-01 Martin Sebor * dyn-string.c (dyn_string_insert_cstr): Use memcpy instead of strncpy to avoid -Wstringop-truncation. 2021-05-29 Mike Frysinger * configure.ac: Add gnulib to configdirs for sim. * configure: Regenerate. 2021-05-24 Maciej W. Rozycki * MAINTAINERS: Update path to readline config.{sub,guess} files. 2021-05-24 Maciej W. Rozycki * config.guess: Import from upstream. * config.sub: Likewise. 2021-05-18 Mike Frysinger * Makefile.def: Add configure-sim dependency on all-gnulib. * Makefile.in: Regenerated. 2021-05-04 Nick Clifton * configure.ac (AC_PROG_CC): Replace with AC_PROG_CC_C99. * configure: Regenerate. 2021-03-18 Nick Alcock PR libctf/27482 * Makefile.def: Add install-bfd dependencies for install-libctf and install-ld, and install-strip-bfd dependencies for install-strip-libctf and install-strip-ld; move the install-ld dependency on install-libctf to join it. * Makefile.in: Regenerated. 2021-03-12 Mike Frysinger * Makefile.def: Remove all-sim dependency on configure-gdb. * Makefile.in: Regenerated. 2021-02-28 H.J. Lu PR binutils/26766 * Makefile.tpl (PGO_BUILD_TRAINING_FLAGS_TO_PASS): Add PGO_BUILD_TRAINING=yes. (PGO_BUILD_TRAINING_MFLAGS): New. (all): Pass $(PGO_BUILD_TRAINING_MFLAGS) to the PGO build. 2021-02-09 Alan Modra * configure.ac: Delete arm*-*-symbianelf* entry. * configure: Regenerate. 2021-01-26 Nick Alcock * Makefile.def: Add install-libctf dependency to install-ld. * Makefile.in: Regenerated. 2021-01-12 Mike Frysinger * src-release.sh (do_proto_toplev): Rewrite indentation. 2021-01-11 H.J. Lu PR binutils/26766 * configure.ac: * configure: Regenerated. 2021-01-11 H.J. Lu PR ld/27173 * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. 2021-01-09 H.J. Lu PR binutils/26766 * Makefile.tpl (BUILD_CFLAGS): New. (CFLAGS): Append $(BUILD_CFLAGS). (CXXFLAGS): Likewise. (PGO_BUILD_GEN_FLAGS_TO_PASS): New. (PGO_BUILD_TRAINING_CFLAGS): Likewise. (PGO_BUILD_TRAINING_CXXFLAGS): Likewise. (PGO_BUILD_TRAINING_FLAGS_TO_PASS): Likewise. (PGO_BUILD_TRAINING_MFLAGS): Likewise. (PGO_BUILD_USE_FLAGS_TO_PASS): Likewise. (PGO-TRAINING-TARGETS): Likewise. (PGO_BUILD_TRAINING): Likewise. (all): Add '+' to the command line for recursive make. Support the PGO build. * configure.ac: Add --enable-pgo-build[=lto]. AC_SUBST PGO_BUILD_GEN_CFLAGS, PGO_BUILD_USE_CFLAGS and PGO_BUILD_LTO_CFLAGS. Enable the PGO build in Makefile. * Makefile.in: Regenerated. * configure: Likewise. 2021-01-09 H.J. Lu * Makefile.tpl (AR): Add @@AR_PLUGIN_OPTION@@ (RANLIB): Add @@RANLIB_PLUGIN_OPTION@@. * configure.ac: Include config/gcc-plugin.m4. AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and RANLIB if possible. * Makefile.in: Regenerated. * configure: Likewise. 2021-01-09 Nick Clifton * 2.36 release branch crated. 2021-01-07 Samuel Thibault * libtool.m4: Match gnu* along with other GNU systems. 2021-01-07 Alan Modra * config.sub: Accept OS of eabi* and gnueabi*. 2021-01-05 Nick Alcock * Makefile.def (libctf): No longer no_check. Checking depends on all-ld. * Makefile.in: Regenerated. 2021-01-05 Nick Clifton * libiberty: Sync with gcc. Bring in: 2021-01-04 Martin Liska * strverscmp.c: Convert to utf8 from iso8859. 2020-12-22 Jason Merrill PR c++/67343 * cp-demangle.h (struct d_info): Add unresolved_name_state. * cp-demangle.c (d_prefix): Add subst parm. (d_nested_name): Pass it. (d_unresolved_name): Split out from... (d_expression_1): ...here. (d_demangle_callback): Maybe retry with old sr mangling. * testsuite/demangle-expected: Add test. 2020-12-21 Jason Merrill * cp-demangle.c (d_expression_1): Recognize qualified-id on RHS of dt/pt. * testsuite/demangle-expected: Add test. 2020-12-21 Jason Merrill * cp-demangle.c (d_unqualified_name): Clear is_expression. * testsuite/demangle-expected: Add tests. 2020-11-25 Matthew Malcomson * configure: Regenerate. * configure.ac: Avoid using sanitizer. 2020-11-13 Eduard-Mihai Burtescu * rust-demangle.c (struct rust_demangler): Add skipping_printing and bound_lifetime_depth fields. (eat): Add (v0-only). (parse_integer_62): Add (v0-only). (parse_opt_integer_62): Add (v0-only). (parse_disambiguator): Add (v0-only). (struct rust_mangled_ident): Add punycode{,_len} fields. (parse_ident): Support v0 identifiers. (print_str): Respect skipping_printing. (print_uint64): Add (v0-only). (print_uint64_hex): Add (v0-only). (print_ident): Respect skipping_printing, Support v0 identifiers. (print_lifetime_from_index): Add (v0-only). (demangle_binder): Add (v0-only). (demangle_path): Add (v0-only). (demangle_generic_arg): Add (v0-only). (demangle_type): Add (v0-only). (demangle_path_maybe_open_generics): Add (v0-only). (demangle_dyn_trait): Add (v0-only). (demangle_const): Add (v0-only). (demangle_const_uint): Add (v0-only). (basic_type): Add (v0-only). (rust_demangle_callback): Support v0 symbols. * testsuite/rust-demangle-expected: Add v0 testcases. 2020-11-13 Seija Kijin * strstr.c (strstr): Make implementation ANSI/POSIX compliant. 2020-11-11 Patrick Palka PR c++/88115 * cp-demangle.c (d_print_comp_inner) : Don't print the "operator " prefix for __alignof__. : Always print parens around the operand of __alignof__. * testsuite/demangle-expected: Test demangling for __alignof__. 2020-11-09 Christophe Lyon * pex-win32.c (pex_win32_exec_child): Initialize orig_err. 2020-10-06 Martin Liska PR lto/97290 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Use sh_link of a .symtab_shndx section. 2021-01-05 Alan Modra * config.guess: Import from upstream. * config.sub: Likewise. 2020-12-16 Martin Liska Tom de Vries * gdb/debuginfod-support.c (struct user_data): Remove has_printed field. Add meter field. (progressfn): Print progress using meter. 2020-12-02 Enze Li * .gitignore: Add gnu global outputs. 2020-12-02 Simon Marchi * .gitignore: Sync with gcc. 2020-10-26 Andreas Rammhold * src-release.sh: Use sha256sum instead of md5sum. 2020-10-14 Andrew Burgess * Makefile.in: Rebuild. * Makefile.def: Make distclean-gnulib depend on distclean-gdb and distclean-gdbserver. 2020-07-24 Aaron Merey * configure: Rebuild. * configure.ac: Remove AC_DEBUGINFOD. 2020-07-04 Nick Clifton Binutils 2.35 branch created. 2020-04-21 Stephen Casner PR 25830 * configure.ac (noconfigdirs): Exclude gdb & gprof for pdp11. * configure: Rebuild. 2020-03-12 Tom Tromey * Makefile.in: Rebuild. * Makefile.def (gdbserver): Depend on gdbsupport. 2020-03-12 Tom Tromey * Makefile.in: Rebuild. * Makefile.def (gdbsupport): Don't depend on bfd. 2020-03-12 Tom Tromey * Makefile.in: Rebuild. * Makefile.def (gdbsupport): Depend on intl. 2020-02-17 Tom Tromey * configure: Rebuild. * configure.ac (configdirs): Add gnulib and gdbsupport when building gdbserver. 2020-02-14 Tom Tromey * Makefile.in: Rebuild. * Makefile.def: Make gdbserver require gnulib and libiberty. 2020-02-07 Tom Tromey Pedro Alves * src-release.sh (GDB_SUPPORT_DIRS): Add gdbserver. * gdbserver: New directory, moved from gdb/gdbserver. * configure.ac (host_tools): Add gdbserver. Only build gdbserver on certain systems. * Makefile.in, configure: Rebuild. * Makefile.def (host_modules, dependencies): Add gdbserver. * MAINTAINERS: Add gdbserver. 2020-01-28 Sergio Durigan Junior * src-release.sh (getver): Look for gdbsupport's create-version.sh script at the current directory if tool is "gdb". 2020-01-19 Simon Marchi * remote-sim.c (gdbsim_target::wait): Return sim_data->remote_sim_ptid instead of inferior_ptid. @ text @d1 1 a1 1 2022-08-05 Nick Clifton d3 1 a3 137 2.39 Release. * development.sh (experimental): Set to false. (development): Set to false. * version.m4: Set to 2.39. * configure: Regenerate. 2022-07-29 Nick Clifton PR 29424 * dwarf2.c (read_attribute_value): Handle DW_FORM_rnglistx and DW_FORM_loclistx. 2022-07-08 Nick Clifton * 2.39 branch created. 2022-05-19 Yvan Roux PR 25713 * bfdio.c (_bfd_real_fopen): Delete ccs string. 2022-04-27 John Baldwin * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_TLS notes. 2022-04-25 Nick Clifton PR 29072 * elflink.c (bfd_elf_size_dynamic_sections): Display a note to the user that the current ehaviour of creating an executable stack because of a missing .note.GNU-stack section is deprecated and will be changed in a future release. 2022-04-20 Clément Chigot * coff-rs6000.c (xcoff_reloc_type_noop): Add info argument. (xcoff_reloc_type_fail): Likewise. (xcoff_reloc_type_pos): Likewise. (xcoff_reloc_type_neg): Likewise. (xcoff_reloc_type_rel): Likewise. (xcoff_reloc_type_toc): Likewise. (xcoff_reloc_type_ba): Likewise. (xcoff_reloc_type_crel): Likewise. (xcoff_reloc_type_tls): Likewise. (xcoff_reloc_type_br): Add stub handler. (xcoff_ppc_relocate_section): Add info to xcoff_calculate_relocation. (xcoff_stub_indirect_call_code): New constant. (xcoff_stub_shared_call_code): Likewise. (bfd_xcoff_backend_data): Add stub code fields. (bfd_pmac_xcoff_backend_data): Likewise. * coff64-rs6000.c (xcoff64_reloc_type_br): Add stub handler. (xcoff64_ppc_relocate_section): Add info to xcoff64_calculate_relocation. (xcoff64_stub_indirect_call_code): New constant. (xcoff64_stub_shared_call_code): Likewise. (bfd_xcoff_backend_data): Add stub code fields. (bfd_xcoff_aix5_backend_data): Likewise. * libxcoff.h (struct xcoff_backend_data_rec): Add stub fields. (bfd_xcoff_stub_indirect_call_code): New define. (bfd_xcoff_stub_indirect_call_size): New define. (bfd_xcoff_stub_shared_call_code): New define. (bfd_xcoff_stub_shared_call_size): New define. (xcoff_reloc_function): Add info argument. (enum xcoff_stub_type): New enum. (struct xcoff_stub_hash_entry): New structure. * xcofflink.c (struct xcoff_link_hash_table): Add stub hash table and params fields. (xcoff_stub_hash_entry): New define. (xcoff_stub_hash_lookup): New define. (stub_hash_newfunc): New function. (_bfd_xcoff_bfd_link_hash_table_free): Free the new stub hash table. (_bfd_xcoff_bfd_link_hash_table_create): Create the new stub hash table. (xcoff_link_add_symbols): Save rawsize for XTY_SD. (bfd_xcoff_link_init): New function. (xcoff_stub_csect_name): New function. (xcoff_stub_get_csect_in_range): New function. (xcoff_stub_name): New function. (bfd_xcoff_get_stub_entry): New function. (bfd_xcoff_type_of_stub): New function. (xcoff_add_stub): New function. (xcoff_build_one_stub): New function. (bfd_xcoff_size_stubs): New function. (bfd_xcoff_build_stubs): New function. (xcoff_stub_create_relocations): New function. (xcoff_link_input_bfd): Adapt relocations to stub. (xcoff_write_global_symbol): Adapt to new TOC entries generated for stubs. (_bfd_xcoff_bfd_final_link): Handle stub file. * xcofflink.h (struct bfd_xcoff_link_params): New structure. 2022-04-20 Clément Chigot * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Write len in ldinfo->strings instead of directly in the output_bfd. * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise. * xcofflink.c (struct xcoff_link_hash_table): Remove ldrel_count field. Add ldinfo field. (xcoff_mark_symbol): Adjust to new ldinfo field. (xcoff_mark): Likewise. (bfd_xcoff_link_count_reloc): Likewise. (xcoff_build_loader_section): Split into two functions: one that build the loader section (this function) and one that only size it... (xcoff_size_loader_section): ... (this function). (bfd_xcoff_size_dynamic_sections): Adapt to new ldinfo field. Move the part where the dynamic sections are build to ... (bfd_xcoff_build_dynamic_sections): ... this function. * xcofflink.h: Add bfd_xcoff_build_dynamic_sections prototype. 2022-04-13 Alexander von Gluck IV * config.bfd (x86-haiku): Add i386_pei_vec as a selectable format. 2022-04-08 Nick Clifton PR 29038 * coffgen.c (coff_find_nearest_line_with_names): Fix typo retrieving saved bias. 2022-04-07 Mark Harmstone * coff-i386.c (in_reloc_p): Add R_SECTION. (howto_table): Add R_SECTION. (coff_pe_i386_relocation_section): Add support for R_SECTION. (coff_i386_reloc_type_lookup): Add support for BFD_RELOC_16_SECCIDX. * coff-x86_64.c (in_reloc_p): Add R_SECTION. (howto_table): Add R_SECTION. (coff_pe_amd64_relocation_section): Add support for R_SECTION. (coff_amd64_reloc_type_lookup): Add support for BFD_RELOC_16_SECCIDX. * reloc.c: Add BFD_RELOC_16_SECIDX. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. d5 1 a5 1 2022-04-01 John Baldwin d7 5 a11 6 * elf-bfd.h (elfcore_write_x86_segbases): New. * elf.c (elfcore_grok_freebsd_note): Add pseudosections for NT_FREEBSD_X86_SEGBASES register notes. (elfcore_write_x86_segbases): New. (elfcore_write_register_note): Write NT_FREEBSD_X86_SEGBASES register notes. d13 4 a16 1 2022-04-01 John Baldwin d18 3 a20 1 * elf.c (elfcore_grok_freebsd_note): Remove checks for namesz. d22 1 a22 1 2022-03-22 Steiner H Gunderson d24 1 a24 75 * dwarf2.c (_bfd_dwarf2_find_nearest_line): if a function name is found, but no line number info, then return a result of 2. 2022-03-21 Steiner H Gunderson PR 28978 * dwarf2.c (scan_unit_for_symbols): When performing second pass, check to see if the function or variable being processed is the same as the previous one. 2022-03-18 Viorel Preoteasa PR 28924 * elf32-arm.c (THM_MAX_FWD_BRANCH_OFFSET): Fix definition. (THM2_MAX_FWD_BRANCH_OFFSET): Likewise. 2022-03-16 Simon Marchi * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add cpu-amdgcn.c. (BFD64_BACKENDS): Add elf64-amdgcn.lo. (BFD64_BACKENDS_CFILES): Add elf64-amdgcn.c. * Makefile.in: Re-generate. * cpu-amdgcn.c: New. * elf64-amdgcn.c: New. * archures.c (bfd_architecture): Add bfd_arch_amdgcn and related mach defines. (bfd_amdgcn_arch): New. (bfd_archures_list): Add bfd_amdgcn_arch. * bfd-in2.h: Re-generate. * config.bfd: Handle amdgcn* target. * configure.ac: Handle amdgcn_elf64_le_vec. * configure: Re-generate. * elf-bfd.h (elf_target_id): Add AMDGCN_ELF_DATA. * targets.c (amdgcn_elf64_le_vec): New. (_bfd_target_vector): Add amdgcn_elf64_le_vec. 2022-03-01 Torbjörn Svensson Fred Eisele PR 25713 * bfdio.c (_bfd_real_fopen): Fix typo. 2022-03-01 Nick Clifton PR 28848 * elf32-arm.c (elf32_arm_merge_eabi_attributes): If the first input bfd has a Tag_ABI_HardFP_use set to 3 but does not also have TAG_FP_arch set then reset the TAG_ABI_HardFP_use. 2022-02-28 Torbjörn Svensson Fred Eisele PR 25713 * bfdio.c (_bfd_real_fopen): Fix handling of paths longer than 260 characters on Windows hosts. 2022-02-28 Nick Clifton PR 28886 * config.bfd: Update error message for obsolete configurations. 2022-02-17 Nick Clifton * po/sr.po: Updated Serbian translation. 2022-02-16 Fangrui Song Nick Clifton PR ld/28841 * bfd-in2.h (struct bfd_section): Add type. (discarded_section): Add field. * elf.c (elf_fake_sections): Handle bfd_section::type. * section.c (BFD_FAKE_SECTION): Add field. * mri.c (mri_draw_tree): Update function call. d26 1 a26 1 2022-02-11 Michael Forney d28 2 a29 29 * bfd.c (bfd_set_gp_value): Remove return with expression in void function. 2022-02-09 Nick Clifton * config.bfd: Move pending obsolesence targets into the definitely obsolete list. 2022-02-02 Nick Clifton PR 28834 * dwarf2.c (read_section): Change the heuristic that checks for overlarge dwarf debug info sections. 2022-02-02 Stafford Horne PR 28735 * elf32-or1k.c (or1k_elf_got16_no_overflow_howto): Define. (or1k_elf_relocate_section): Use new howto instead of trying to mask out relocation bits. 2022-01-24 Roland McGrath * doc/local.mk (%D%/bfdver.texi): Add mkdir command. 2022-01-24 Nick Clifton * po/fr.po: Updated French translation. * po/ro.po: Updated Romanian translation. d32 1 a32 7 2022-01-22 Nick Clifton * version.m4: Change to 2.38.50. * configure: Regenerate. * po/bfd.pot: Regenerate. 2022-01-22 Nick Clifton d34 1 a34 5 * 2.38 release branch created. 2022-01-17 Nick Clifton * Makefile.in: Regenerate. a35 1 * doc/Makefile.in: Regenerate. d38 1 a38 1 2021-12-15 Nikita Popov d40 1 a40 2 PR 28687 * dwarf1.c (parse_die): Fix undefined behaviour in range tests. d42 1 a42 1 2021-11-17 Nick Clifton d44 4 a47 3 PR 28452 * elf.c (assign_file_positions_for_non_load_sections): Replace assertion with a warning message. d49 1 a49 1 2021-10-19 Nick Clifton d51 2 a52 3 * linker.c (_bfd_generic_link_add_one_symbol): Test for a NULL name before checking to see if the symbol is __gnu_lto_slim. * archive.c (_bfd_compute_and_write_armap): Likewise. d54 1 a54 1 2021-09-27 Nick Alcock d56 6 a61 1 * configure: Regenerate. d63 1 a63 1 2021-09-15 Andrew Burgess d65 2 a66 2 * archures.c (bfd_arch_list): Use 'char *' instead of 'char **' when calculating space for a string list. d68 1 a68 2 2021-09-014 Cupertino Miranda Claudiu Zissulescu d70 5 a74 5 * arc-got.h (arc_static_sym_data): New structure. (get_static_sym_data): New function. (relocate_fix_got_relocs_for_got_info): Move the computation fo symbol value and section to above introduced function, and use this new function. d76 1 a76 1 2021-09-07 Luis Machado d78 2 a79 1 Revert: [AArch64] MTE corefile support d81 1 a81 1 2021-05-21 Luis Machado d83 9 a91 2 * elf.c (elfcore_make_memtag_note_section): New function. (elfcore_grok_note): Handle NT_MEMTAG note types. d93 1 a93 1 2021-09-07 Nick Clifton d95 4 a98 337 PR 28305 * elf32-xtensa.c (elf_xtensa_do_reloc): Add check for put of range reloc. PR 28303 * elfxx-riscv.c (riscv_elf_add_sub_reloc): Add check for out of range relocs. 2021-08-10 Nick Clifton * po/sr.po: Updated Serbian translation. 2021-07-18 Nick Clifton * config.bfd: Move pending obsoletion targets to obsolete list. 2021-07-16 Giulio Benetti * elf32-or1k.c (or1k_elf_relocate_section): Use a separate entry in switch case R_OR1K_INSN_REL_26 where we need to check for !SYMBOL_CALLS_LOCAL() instead of !SYMBOL_REFERENCES_LOCAL(). 2021-07-14 Clément Chigot * libxcoff.h (struct xcoff_dwsect_name): Add DWARF name. * coff-rs6000.c (xcoff_dwsect_names): Update. * coffcode.h (sec_to_styp_flags): Likewise. (coff_new_section_hook): Likewise. 2021-07-10 Alan Modra * dwarf2.c (read_address): Remove accidental commit. (read_ranges): Compare offset rather than pointers. 2021-07-08 Nick Clifton * po/pt.po: Updated Portuguese translation. 2021-07-07 Nick Clifton * elfcode.h (elf_swap_symbol_out): Revert accidental change that removed an abort if the shndx pointer is NULL. 2021-07-07 Rainer Orth * sysdep.h [!ENABLE_NLS]: Prevent inclusion of on Solaris. 2021-07-07 Rainer Orth * configure.ac: Check for strnlen declaration. * configure, config.in: Regenerate. 2021-07-07 Nick Clifton PR 28051 * coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in order to fix problems when translating. * cofflink.c (_bfd_coff_write_global_sym): Likewise. * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub): Likewise. * po/bfd.pot: Regenerate. 2021-07-06 Michael Matz PR ld/28021 * elfnn-riscv.c (riscv_relax_delete_bytes): Check for any versioning. 2021-07-06 Alan Modra PR 28055 * elf64-bpf.c (bpf_elf_generic_reloc): Add missing ATTRIBUTE_UNUSED. 2021-07-05 Alan Modra PR 28055 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put and bfd_put_32 calls. Correct section limit checks. 2021-07-03 Nick Clifton * version.m4: Update version number. * configure: Regenerate. * po/opcodes.pot: Regenerate. 2021-07-03 Nick Clifton * 2.37 release branch created. 2021-07-02 Nick Clifton PR 28046 * dwarf2.c (read_ranges): Check that range_ptr does not exceed range_end. 2021-06-30 YunQiang Su PR mips/28009 * bfd/elfxx-mips.c (_bfd_mips_elf_section_from_shdr, _bfd_mips_elf_fake_sections): Mark LTO debug info as SHT_MIPS_DWARF. 2021-06-29 Nick Clifton * config.bfd (obsolete configurations): Add netbsdpe. 2021-06-22 Nelson Chu * elfnn-riscv.c (riscv_pcrel_hi_reloc): Added field to store the original relocation type, in case the type is converted to R_RISCV_HI20. (riscv_pcrel_lo_reloc): Removed unused name field. (riscv_pcrel_relocs): Added comments. (riscv_zero_pcrel_hi_reloc): Removed unused input_bfd. (riscv_record_pcrel_hi_reloc): Updated. (riscv_record_pcrel_lo_reloc): Likewise. (riscv_resolve_pcrel_lo_relocs): Likewise. Check the original type of auipc, to make sure the %pcrel_lo without any addends. Otherwise, report dangerous relocation error. (riscv_elf_relocate_section): Updated above functions are changed. For R_RISCV_GOT_HI20, report dangerous relocation error when addend isn't zero. 2021-06-19 H.J. Lu PR ld/27998 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Count PLT for GOTOFF relocation against IFUNC symbols. (_bfd_x86_elf_adjust_dynamic_symbol): Likewise. 2021-06-19 H.J. Lu * elflink.c (bfd_elf_final_link): Correct DT_TEXTREL warning in PDE. 2021-06-18 H.J. Lu * elf-properties.c (_bfd_elf_parse_gnu_properties): Handle GNU_PROPERTY_UINT32_AND_LO, GNU_PROPERTY_UINT32_AND_HI, GNU_PROPERTY_UINT32_OR_LO and GNU_PROPERTY_UINT32_OR_HI. (elf_merge_gnu_properties): Likewise. 2021-06-11 Alan Modra PR 27952 * elf-bfd.h (struct elf_obj_tdata): Add is_pie. * elflink.c (elf_link_add_object_symbols): Set is_pie. 2021-06-09 Nick Clifton PR 27666 * config.bfd: Do not add the sparc_elf32_vec or sparc_elf64_vec vectors to Sparc Solaris2 targets. 2021-06-08 Michael Matz * elf.c (bfd_section_from_shdr): Set has_secondary_relocs flag. (_bfd_elf_slurp_secondary_reloc_section): Use it for early-out. 2021-06-07 Jan Beulich * dwarf2.c (read_ranges, read_rnglists): Add u suffix to constant. 2021-06-02 Alan Modra * elf-attrs.c (_bfd_elf_parse_attributes): Break out of loop if subsection length is too small to cover tag and length field. 2021-05-31 Nelson Chu Lifang Xia PR 27566 * elfnn-riscv.c (struct riscv_elf_link_hash_table): New integer pointer to monitor the data segment phase. (bfd_elfNN_riscv_set_data_segment_info): New function called by after_allocation, to set the data_segment_phase from expld.dataseg. (_bfd_riscv_relax_section): Don't relax when data_segment_phase is exp_seg_relro_adjust (0x4). * elfxx-riscv.h (bfd_elf32_riscv_set_data_segment_info): New extern. (bfd_elf64_riscv_set_data_segment_info): Likewise 2021-05-28 H.J. Lu PR ld/27905 * elf32-i386.c: Don't include "libiberty.h". (elf_howto_table): Revert commits a7664973b24 and 50c95a739c9. (elf_i386_rtype_to_howto): Revert commit 50c95a739c9. (elf_i386_info_to_howto_rel): Likewise. (elf_i386_tls_transition): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Revert commits a7664973b24 and 50c95a739c9. (elf_x86_64_rtype_to_howto): Revert commit 50c95a739c9. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Likewise. * elfxx-x86.h (elf_x86_obj_tdata): Likewise. (elf_x86_has_code16): Likewise. 2021-05-26 H.J. Lu PR ld/27905 * elf32-i386.c: Include "libiberty.h". (elf_howto_table): Add 16-bit R_386_PC16 entry. (elf_i386_rtype_to_howto): Add a BFD argument. Use 16-bit R_386_PC16 if input has 16-bit mode instructions. (elf_i386_info_to_howto_rel): Update elf_i386_rtype_to_howto call. (elf_i386_tls_transition): Likewise. (elf_i386_relocate_section): Likewise. * elf64-x86-64.c (x86_64_elf_howto_table): Add 16-bit R_X86_64_PC16 entry. (elf_x86_64_rtype_to_howto): Use 16-bit R_X86_64_PC16 if input has 16-bit mode instructions. * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Set elf_x86_has_code16 if relocatable input is marked with GNU_PROPERTY_X86_FEATURE_2_CODE16. * elfxx-x86.h (elf_x86_obj_tdata): Add has_code16. (elf_x86_has_code16): New. 2021-05-26 Nelson Chu * elfxx-riscv.h (check_unknown_prefixed_ext): New bool. * elfxx-riscv.c (riscv_parse_prefixed_ext): Do not check the prefixed extension name if check_unknown_prefixed_ext is false. * elfnn-riscv.c (riscv_merge_arch_attr_info): Set check_unknown_prefixed_ext to false for linker. 2021-05-25 Nick Clifton * elf32-arn.c (struct elf_arm_obj_tdata): Add num_entries field. (elf32_arm_num_entries): New macro. (elf32_arm_allocate_local_sym_info): Initialise the new field. Allocate arrays individually so that buffer overruns can be detected by memory checkers. (elf32_arm_create_local_iplt): Check num_entries. (elf32_arm_get_plt_info): Likewise. (elf32_arm_final_link_relocate): Likewise. (elf32_arm_check_relocs): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (elf32_arm_output_arch_local_syms): Likewise. 2021-05-25 Nick Clifton * elf32-arm.c: Fix formatting. 2021-05-25 Alan Modra * elf-attrs.c (elf_attr_strdup): New function. (_bfd_elf_attr_strdup): Use it here. (elf_add_obj_attr_string): New function, extracted from.. (bfd_elf_add_obj_attr_string): ..here. (elf_add_obj_attr_int_string): New function, extracted from.. (bfd_elf_add_obj_attr_int_string): ..here. (_bfd_elf_parse_attributes): Don't allocate an extra byte for a string terminator. Instead ensure parsing doesn't go past end of sub-section. Use size_t variables for lengths. 2021-05-22 Alan Modra * libbfd.c (_bfd_safe_read_leb128): Remove length_return parameter. Replace data pointer with pointer to pointer. Increment pointer over bytes read. * libbfd-in.h (_bfd_safe_read_leb128): Update prototype. * elf-attrs.c (_bfd_elf_parse_attributes): Adjust to suit. Be careful not to increment data pointer past end. Remove now redundant pr17512 check. * wasm-module.c (READ_LEB128): Adjust to suit changes to _bfd_safe_read_leb128. * dwarf2.c (read_n_bytes): New inline function, old one renamed to.. (read_blk): ..this. Allocate and return block. Increment bfd_byte** arg. (read_3_bytes): New function. (read_1_byte, read_1_signed_byte, read_2_bytes, read_4_bytes), (read_8_bytes, read_string, read_indirect_string), (read_indirect_line_string, read_alt_indirect_string): Take a byte_byte** arg which is incremented over bytes read. Remove any bytes_read return. Rewrite limit checks to compare lengths rather than pointers. (read_abbrevs, read_attribute_value, read_formatted_entries), (decode_line_info, find_abstract_instance, read_ranges), (read_rnglists, scan_unit_for_symbols, parse_comp_unit), (stash_comp_unit): Adjust to suit. Rewrite limit checks to compare lengths rather than pointers. * libbfd.h: Regenerate. 2021-05-21 Luis Machado * elf.c (elfcore_make_memtag_note_section): New function. (elfcore_grok_note): Handle NT_MEMTAG note types. 2021-05-20 Andrew Burgess * section.c (bfd_get_section_by_name): Return NULL if name is NULL. (bfd_get_section_by_name_if): Likewise. * dwarf2.c (read_section): Remove unneeded NULL check. (find_debug_info): Likewise. 2021-05-19 Nick Clifton * plugin.c (bfd_plugin_open_input): Inform the user if the limit on the number of open files is reached. If possible, try to increase this limit before failing. 2021-05-14 Nelson Chu * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Check the values of %pcrel_hi, before and after adding the addend. Make sure the value won't be changed, otherwise, report dangerous error. 2021-05-13 Nelson Chu * elfxx-riscv.c (check_implicit_always): The check_func, always add the implicit subset without checking. (check_implicit_for_i): The check_func for i, only add zicsr and zifencei when the version of i less than 2.1. (struct riscv_implicit_subset): Record the subsets and their corresponding implicit subsets. (riscv_implicit_subsets): Table records all implicit informations. (riscv_parse_add_implicit_subsets): Updated and add implicit subsets according to riscv_implicit_subsets. Remove the redundant codes. 2021-05-13 Alan Modra PR 27858 * elf32-sh.c (sh_elf_info_to_howto): Correct check for last valid reloc howto. 2021-05-12 Luis Machado * elf-bfd.h (elfcore_write_aarch_mte): New prototype. * elf.c (elfcore_grok_aarch_mte, elfcore_write_aarch_mte): New functions. (elfcore_grok_note): Handle notes of type NT_ARM_TAGGED_ADDR_CTRL. (elfcore_write_register_note): Handle MTE notes. 2021-05-11 Alan Modra d100 1 a100 4 PR 27844 * pdp11.c (aout_get_external_symbols): Clear first four bytes of strings array, not just the first byte. * aoutx.h (aout_get_external_symbols): Likewise. d102 2 a103 1 2021-05-10 H.J. Lu d105 1 a105 3 PR binutils/27839 * simple.c (bfd_simple_get_relocated_section_contents): Remove strayed fprintf. d107 1 a107 1 2021-05-10 Nick Clifton d109 1 a109 7 PR 27839 * simple.c (simple_dummy_add_to_set): New function. (simple_dummy_constructor): New function. (simple_dummy_multiple_common): New function. (bfd_simple_get_relocated_section_contents): Zero out the callbacks structure, and then set the add_to_set, constructor and multiple_common fields. d111 3 a113 1 2021-05-10 Dimitar Dimitrov d115 1 a115 1 * elf32-pru.c (elf_backend_can_gc_sections): Define as 1. d117 3 a119 1 2021-05-08 Mike Frysinger d121 1 a121 2 * doc/Makefile.am (html-local, bfd/index.html): New targets. * doc/Makefile.in: Regenerate. d123 7 a129 1 2021-05-08 Mike Frysinger d131 1 a131 2 * doc/Makefile.am (AM_MAKEINFOFLAGS): Define. * doc/Makefile.in: Regenerate. d133 3 a135 1 2021-05-07 Clément Chigot d137 1 a137 5 * coff-rs6000.c (xcoff_dwsect_names): Add new DWARF sections. * coffgen.c (coff_pointerize_aux): Handle C_DWARF. (coff_print_symbol): Likewise. * libxcoff.h (XCOFF_DWSECT_NBR_NAMES): Update. d139 3 a141 1 2021-05-07 Jan Beulich d143 1 a143 2 * elf64-x86-64.c (x86_64_elf_howto_table): Set src_mask fields to zero. d145 1 a145 1 2021-05-07 Alan Modra d147 1 a147 126 * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. 2021-05-06 Stafford Horne PR 27746 * elf32-or1k.c (PLT_ENTRY_SIZE_LARGE, PLT_MAX_INSN_COUNT, OR1K_ADD, OR1K_ORI): New macros to help with plt creation. (elf_or1k_link_hash_table): New field plt_count. (elf_or1k_link_hash_entry): New field plt_index. (elf_or1k_plt_entry_size): New function. (or1k_write_plt_entry): Update to support variable size PLTs. (or1k_elf_finish_dynamic_sections): Use new or1k_write_plt_entry API. (or1k_elf_finish_dynamic_symbol): Update to write large PLTs when needed. (allocate_dynrelocs): Use elf_or1k_plt_entry_size to account for PLT size. 2021-05-06 Stafford Horne PR 21464 * elf32-or1k.c (or1k_elf_relocate_section): Relax R_OR1K_GOT16 overflow check if we have R_OR1K_GOT_AHI16 followed by R_OR1K_GOT16. 2021-05-06 Stafford Horne PR 21464 * bfd-in2.h: Add BFD_RELOC_OR1K_GOT_AHI16 relocation. * elf32-or1k.c (or1k_elf_howto_table, or1k_reloc_map): Likewise. (or1k_final_link_relocate, or1k_elf_relocate_section, or1k_elf_check_relocs): Likewise. * libbfd.h (bfd_reloc_code_real_names): Likewise. * reloc.c: Likewise. 2021-05-06 Stafford Horne PR 27624 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Change condition used to cleanup plt entries to cleanup forced local entries. 2021-05-05 H.J. Lu PR ld/27825 * elflink.c (elf_link_output_symstrtab): Always append ".COUNT" to local symbols. 2021-05-05 Alan Modra * vms-lib.c (vms_traverse_index): Account for vms_kbn size when sanity checking keylen. 2021-05-04 Nick Clifton * libbfd.c (bfd_malloc): Provide some documenation. Treat a size of 0 as 1. (bfd_realloc): Likewise. (bfd_zmalloc): Likewise. (bfd_realloc_or_free): Provide some documentation. Treat a size of 0 as a request to free. * libbfd-in.h (bfd_realloc): Remove prototype. (bfd_realloc_or_free): Remove prototype. (bfd_zmalloc): Remove prototype. * libbfd.h: Regenerate. 2021-05-03 Jan Beulich * elf32-i386.c (elf_howto_table): Switch all 32-bit relocs to complain_overflow_dont. * elf64-x86-64.c (x86_64_elf_howto_table): Switch all 64-bit relocs to complain_overflow_dont. 2021-05-03 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Keep dyn_relocs for undefweak symbols when -z dynamic-undefined-weak or when there are no dynamic relocs in read-only sections and -z nodynamic-undefined-weak is not given. * elf64-ppc.c (allocate_dynrelocs): Likewise. 2021-05-03 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for weak undefined symols that only appear on PLT relocs. * elf64-ppc.c (allocate_dynrelocs): Likewise. 2021-05-03 Alan Modra PR 27755 * elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop. 2021-05-03 Alan Modra * elf32-csky.c (is_mapping_symbol_name): New function. (csky_elf_is_target_special_symbol): Likewise. (csky_elf_maybe_function_sym): Likewise. (bfd_elf32_bfd_is_target_special_symbol): Define. (elf_backend_maybe_function_sym): Define. 2021-04-30 Nick Clifton PR 27801 * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to read 32-bit value. 2021-04-30 Nick Clifton PR 27799 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Check for core notes that are too small. 2021-04-30 Nick Clifton PR 27797 * libbfd.c (bfd_realloc_or_free): Do not free a pointer than has been realloc'ed to size 0. 2021-04-30 Nick Clifton PR 27795 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Check for invalid name lengths. 2021-04-29 Nick Clifton d149 15 a163 5 PR 27793 * som.c (som_slurp_symbol_table): Assign symbols without any scope to the undefined section. (som_decode_symclass): Check for a missing symbol section. * syms.c (bfd_decode_symclass): Likewise. d165 1 a165 94 2021-04-29 Nick Clifton PR 27792 * som.c (som_slurp_string_table): Place a terminating NUL byte at the end of the table. (som_slurp_symbol_table): Check for an over-large offset into the string string table. 2021-04-28 Nick Clifton * elf.c (_bfd_elf_maybe_function_sym): Do not accept annobin symbols as potential function symbols. * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. * elf32-arm.c (elf32_arm_maybe_function_sym): Likewise. 2021-04-26 Mike Frysinger * elf-bfd.h: Include stdlib.h. 2021-04-26 Jan Beulich * elf32-i386.c (elf_howto_table): Switch R_386_PC16 to complain_overflow_signed. * elf64-x86-64.c (x86_64_elf_howto_table): Switch R_X86_64_PC16 to complain_overflow_signed. 2021-04-23 Eric Botcazou * elf.c (special_sections_p): Add .persistent.bss. 2021-04-23 Jan Beulich * elf32-i386.c (elf_howto_table): R_386_TLS_DESC_CALL has zero size field. * elf64-x86-64.c (x86_64_elf_howto_table): R_X86_64_TLSDESC_CALL has zero size field. 2021-04-22 Clément Chigot * hash.c (struct bfd_strtab_hash): Remove xcoff field. Add length_field_size field. (_bfd_stringtab_init): Change prototype. Adapt to new length_field_size. (_bfd_xcoff_stringtab_init): Likewise. (_bfd_stringtab_add): Likewise. (_bfd_stringtab_emit): Likewise. * libbfd-in.h (_bfd_xcoff_stringtab_init): Change prototype. * libbfd.h: Regenerate. * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Call _bfd_xcoff_stringtab_init with isxcoff64 value. 2021-04-22 Clément Chigot * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Add errors for unsupported storage class or auxialiry entries. Improve and adapt to new aux structures. Add C_DWARF support. (_bfd_xcoff_swap_aux_out): Likewise. * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Likewise. (_bfd_xcoff64_swap_aux_out): Likewise. 2021-04-21 Eli Zaretskii PR 27760 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add display of IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP, IMAGE_FILE_NET_RUN_FROM_SWAP and IMAGE_FILE_UP_SYSTEM_ONLY flags. Decode the contents of the DllCharacteristics field. 2021-04-21 Nick Clifton PR 27759 * srec.c (srec_read_section): Replace assertions with error returns. 2021-04-20 Clément Chigot PR binutils/21700 * reloc.c (BFD_RELOC_PPC_NEG): New relocation. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler. (xcoff_reloc_type_neg): Correctly substract addend. * coff64-rs6000.c (xcoff64_howto_table): Add R_NEG_32 howto. (xcoff64_rtype2howto): Add handler for R_NEG_32. (xcoff64_reloc_type_lookup): Add BFD_RELOC_PPC_NEG handler. * xcofflink.c (xcoff_need_ldrel_p): Check output section for R_POS-like relocations. New argument added. (xcoff_mark): Adapt to new xcoff_need_ldrel_p argument. (xcoff_link_input_bfd): Likewise. d167 5 a171 1 2021-04-16 Alan Modra d173 1 a173 4 PR 27567 * coffcode.h (styp_to_sec_flags): Use an unsigned long styp_flags. (coff_write_object_contents): Pass bfd to COFF_ENCODE_ALIGNMENT, ignore alignment checks when return is false. Formatting. d175 1 a175 1 2021-04-15 Nelson Chu d177 1 a177 4 PR27584 * elfnn-riscv.c (riscv_elf_is_target_special_symbol): Added to omit local and empty symbols since they usually generated to mark the auipc instructions. d179 2 a180 1 2021-04-15 Lifang Xia d182 1 a182 7 * elf32-csky.c (csky_elf_howto_table) : Set special_function to bfd_elf_generic_reloc. : Likewise. : Likewise. : Likewise. : Likewise. d184 4 a187 1 2021-04-14 H.J. Lu d189 1 a189 3 PR binutils/27708 * elf.c (assign_file_positions_for_non_load_sections): Set p_memsz to p_filesz for the loadable PT_NOTE segment. d191 13 a203 1 2021-04-14 Frederic Cambus d205 1 a205 2 * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef checks for NT_NETBSDCORE_AUXV and NT_NETBSDCORE_LWPSTATUS. d207 3 a209 1 2021-04-14 Alan Modra d211 1 a211 3 PR 27631 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf when hh might be NULL, test for NULL first. d213 3 a215 1 2021-04-14 Alan Modra d217 1 a217 3 PR 27630 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when hash might be NULL, cast instead. d219 3 a221 305 2021-04-13 Clément Chigot * xcofflink.c (xcoff_link_check_ar_symbols): Update esym earlier. 2021-04-13 Nelson Chu * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning when the version of input or output is RISCV_UNKNOWN_VERSION, since the extension is added implicitly. * elfxx-riscv.c: Updated the obsolete comments. (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h. * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added. 2021-04-12 Alan Modra * elf-bfd.h (ENABLE_CHECKING): Define. (elf_link_hash_lookup): Abort if wrong type of hash table. * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. 2021-04-12 Alan Modra * elf-bfd.h (is_elf_hash_table): Convert macro to inline function. (elf_link_hash_lookup, elf_link_hash_traverse): Likewise. (elf_hash_table, elf_hash_table_id): Likewise. * elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant is_elf_hash_table check. * elf32-csky.c (elf32_csky_setup_section_lists): Likewise. * elf32-hppa.c (clobber_millicode_symbols): Correct param types. * elf64-alpha.c (elf64_alpha_output_extsym): Likewise. * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise. (elfNN_ia64_global_dyn_sym_thunk: Likewise. * elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise. (elf64_ia64_global_dyn_sym_thunk): Likewise. (elf64_vms_link_add_object_symbols): Pass base type of hash table to is_elf_hash_table. * elflink.c (_bfd_elf_dynamic_symbol_p): Likewise. (_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise. (_bfd_elf_strip_zero_sized_dynamic_sections): Likewise. (_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise. (bfd_elf_final_link): Likewise. * elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise. * elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup. 2021-04-12 Alan Modra * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry* from elf_backend_archive_symbol_lookup. (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*. * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check we have a ppc_hash_table before accessing ppc_link_hash_entry fields. * elflink.c (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*. (elf_link_add_archive_symbols): Adjust to suit. 2021-04-12 Nelson Chu * elfxx-riscv.c (riscv_parse_std_ext): Fixed the wrong versions of i-ext when expanding g-ext. 2021-04-12 Nelson Chu * elfxx-riscv.c (riscv_ext_dont_care_version): Removed. (riscv_parse_add_subset): Always add the implicit extensions, even if their versions are RISCV_UNKNOWN_VERSION. (riscv_parse_std_ext): Delay to add i-ext as the implicit extension in the riscv_parse_add_implicit_subsets. Besides, add g-ext as the implicit extension after it has been expanded. (riscv_parse_add_implicit_subsets): Updated. 2021-04-12 Nelson Chu * elfxx-riscv.c (riscv_std_z_ext_strtab): Moved forward. (riscv_std_s_ext_strtab): Likewise. (riscv_std_h_ext_strtab): Likewise. (riscv_std_zxm_ext_strtab): Added for the zxm prefix. (enum riscv_prefix_ext_class): Moved forward and renamed from riscv_isa_ext_class. Reorder them according to the parsing order, since the enum values are used to check the orders in the riscv_compare_subsets. (struct riscv_parse_prefix_config): Moved forward and renamed from riscv_parse_config_t. Also removed the ext_valid_p field, the related functions are replaced by riscv_valid_prefixed_ext. (parse_config): Moved forward and updated. The more letters of the prefix string, the more forward it must be defined. Otherwise, we will get the wrong mapping when using strncmp in riscv_get_prefix_class. (riscv_get_prefix_class): Moved forward. Support to parse the multi-letter prefix, like zxm. (riscv_known_prefixed_ext): New function, check if the prefixed extension is supported according to the right riscv_std_*_ext_strtab. (riscv_valid_prefixed_ext): New function, used to replace the riscv_ext_*_valid_p functions. (riscv_init_ext_order): Do not set the values for prefix keywords since they may have multiple letters for now. (riscv_compare_subsets): Set the order values of prefix keywords to negative numbers according to the riscv_prefix_ext_class. (riscv_parse_std_ext): Call riscv_get_prefix_class to see if we have parsed the prefixed extensions. (riscv_parse_prefixed_ext): Updated and removed the parameter config. Report error when the prefix is unknown. (riscv_parse_subset): Do not parse the prefixed extensions according to the orders in the parse_config. Remove the confused message and let riscv_parse_prefixed_ext to report the details. * elfxx-riscv.h (enum riscv_isa_ext_class): Moved to elfxx-riscv.c. (riscv_get_prefix_class): Removed to static. 2021-04-08 Mike Frysinger * configure.ac (ACX_BUGURL): Use https://. * configure.com (COPY_TEXT): Likewise. * configure: Regenerate. 2021-04-05 Alan Modra * configure.ac: Don't check for long long or long double type. Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h, strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check for strtoull, free, malloc, realloc, getenv, strstr, snprintf, vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS. (AC_ISC_POSIX): Don't invoke. (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise. * sysdep.h: Remove many HAVE_*_H checks and fallback declarations. Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder header order as per automake AC_INCLUDES_DEFAULT. * bfd-in.h: Include inttypes.h unconditionally. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and long double are available. (bfd_scan_vma): Assume long long and strtoull are available. * elflink.c: Include limits.h unconditionally. * elfnn-riscv.c: Likewise. * wasm-module.c: Likewise. * hpux-core.c: Include dirent.h unconditionally. * trad-core.c: Likewise. * hosts/x86-64linux.h: Include stdlib.h unconditionally. * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks. * elf32-m68hc1x.c: Don't include alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * bfd-in2.h: Regenerate. * config.in: Regenerate. * configure: Regenerate. 2021-04-01 Tamar Christina PR ld/26659 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore overflow. 2021-04-01 Martin Liska * ecoff.c (strneq): Remove strneq and use startswith. (_bfd_ecoff_slurp_armap): Likewise. 2021-04-01 Martin Liska * elf-bfd.h (bfd_section_is_ctf): Use startswith function. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. (elf_get_reloc_section): Likewise. * elf32-arc.c (elf_arc_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_section_flags): Likewise. * elf32-microblaze.c (microblaze_elf_size_dynamic_sections): Likewise. * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise. (nds32_elf_relocate_section): Likewise. (nds32_elf_action_discarded): Likewise. (nds32_elf_check_relocs): Likewise. (nds32_elf_section_flags): Likewise. * elf32-or1k.c (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise. * elf32-rx.c (rx_table_find): Likewise. (rx_table_map): Likewise. * elf32-spu.c (spu_elf_backend_symbol_processing): Likewise. (spu_elf_find_overlays): Likewise. (needs_ovl_stub): Likewise. (allocate_spuear_stubs): Likewise. (build_spuear_stubs): Likewise. (mark_overlay_section): Likewise. (spu_elf_auto_overlay): Likewise. (spu_elf_output_symbol_hook): Likewise. * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise. * elf32-xtensa.c (xtensa_property_section_name): Likewise. * elf64-ppc.c (ppc64_elf_section_flags): Likewise. (ppc64_elf_relocate_section): Likewise. * elflink.c (resolve_section): Likewise. (UNARY_OP): Likewise. (BINARY_OP_HEAD): Likewise. (elf_link_input_bfd): Likewise. * elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise. * elfxx-riscv.c (riscv_parse_subset): Likewise. * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise. * opncls.c (get_build_id): Likewise. 2021-03-31 Alan Modra PR 27671 * bfd-in.h: Don't poison FALSE or TRUE. * bfd-in2.h: Regenerate. 2021-03-31 Alan Modra * sysdep.h: POISON_BFD_BOOLEAN: Define. * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c, * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c, * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c, * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c, * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c, * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c, * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c, * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c, * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c, * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c, * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c, * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c, * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c, * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c, * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c, * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c, * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c, * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c, * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c, * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c, * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c, * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c, * elf-nacl.h, * elf-properties.c, * elf-s390-common.c, * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h, * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h, * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h, * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h, * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c, * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h, * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c, * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c, * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c, * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c, * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h, * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c, * xsym.h: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. 2021-03-31 Alan Modra * bfd-in.h: Include stdbool.h. (bfd_boolean): Define as bool * bfd-in2.h: Regenerate. 2021-03-31 Alan Modra * .gitignore: Delete bfd_stdint.h entry. * Makefile.am (bfdinclude_HEADERS): Delete bfd_stdint.h. (BUILD_HFILES, LOCAL_H_DEPS): Likewise. * bfd-in.h: Include stdint.h in place of bfd_stdint.h. * configure.ac: Don't invoke GCC_HEADER_STDINT. * configure.com: Don't create bfd_stdint.h. a222 3 * aclocal.m4: Regenerate. * bfd-in2.h: Regenerate. * config.in: Regenerate. d224 9 a232 341 * doc/Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate. 2021-03-31 Alan Modra * bfd-in.h: Include string.h. (LITMEMCPY, LITSTRCPY): Delete. * bfd-in2.h: Regenerate. 2021-03-30 Alan Modra * elflink.c (elf_link_add_object_symbols): Don't set h->indx unless is_elf_hash_table. 2021-03-29 Alan Modra * aoutx.h (aout_link_write_symbols): Don't cast boolean expression to bfd_boolean. * elf32-or1k.c (or1k_set_got_and_rela_sizes): Dont compare booleans against FALSE. * elf32-arc.c (name_for_global_symbol): Don't compare boolean to TRUE. (is_reloc_PC_relative): Don't use "boolean_condition ? TRUE : FALSE". (is_reloc_SDA_relative, is_reloc_for_GOT): Likewise. (is_reloc_for_PLT, is_reloc_for_TLS): Likewise. * elf32-arm.c (stm32l4xx_need_create_replacing_stub): Likewise. * elf32-nds32.c (insert_nds32_elf_blank): Likewise. * elf32-rx.c (rx_set_section_contents): Likewise. * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise. * elfxx-mips.c (_bfd_mips_elf_ignore_undef_symbol): Likewise. * mach-o.c (bfd_mach_o_read_command): Likewise. * targets.c (bfd_get_target_info): Likewise. 2021-03-29 Alan Modra * coff-z80.c (z80_is_local_label_name): Return bfd_boolean. * elf32-z80.c (z80_is_local_label_name): Likewise. * elf32-spu.c (spu_elf_modify_headers): Likewise. * elf32-nds32.h (struct elf_nds32_link_hash_table ): Change type to int. * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test for error return from vms_write_data_block. 2021-03-29 Alan Modra * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int. * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise. (elf64_ia64_local_dyn_sym_thunk): Likewise. * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol): Likewise. * elfnn-aarch64.c (elfNN_aarch64_allocate_local_ifunc_dynrelocs), (elfNN_aarch64_finish_local_dynamic_symbol): Likewise. * elfnn-ia64.c (elfNN_ia64_local_dyn_info_free): Likewise. (elfNN_ia64_local_dyn_sym_thunk): Likewise. * elfnn-riscv.c (allocate_local_ifunc_dynrelocs): Likewise. (riscv_pcrel_reloc_eq): Likewise. (riscv_elf_finish_local_dynamic_symbol): Likewise. * elfxx-sparc.c (allocate_local_dynrelocs): Likewise. (finish_local_dynamic_symbol): Likewise. * elfxx-x86.c (elf_x86_allocate_local_dynreloc): Likewise. * elfxx-mips.c (mips_elf_resolve_got_page_ref): Likewise. (mips_elf_count_got_symbols): Change return type to bfd_boolean. 2021-03-29 Alan Modra * elflink.c (elf_link_output_symstrtab): Make flinfo parameter a void pointer. (bfd_elf_final_link): Delete out_sym_func typedef and don't cast elf_link_output_symstrtab when calling output_arch_syms and output_arch_local_syms. * elf-bfd.h (struct elf_backend_data ): Change return type of func arg to match elf_link_output_symstrtab. * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Correct return type. * elf32-nds32.c (nds32_elf_output_symbol_hook): Correct return type. (nds32_elf_output_arch_syms): Correct func return type. 2021-03-29 Alan Modra * elf-m10200.c (mn10200_elf_relocate_section): Return int. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arc.c (elf_arc_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfin_relocate_section): Likewise. (bfinfdpic_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-csky.c (csky_elf_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-ft32.c (ft32_elf_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m32c.c (m32c_elf_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68hc1x.h (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-metag.c (elf_metag_relocate_section): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-nds32.c (nds32_elf_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise. * elf32-or1k.c (or1k_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-pru.c (pru_elf32_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise. (_bfd_score_elf_relocate_section): Likewise. * elf32-score.h (s7_bfd_score_elf_relocate_section): Likewise. * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-visium.c (visium_elf_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf32-z80.c (z80_elf_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise. (elf64_alpha_relocate_section): Likewise. * elf64-bpf.c (bpf_elf_relocate_section): Likewise. * elf64-hppa.c (elf64_hppa_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise. * elfnn-riscv.c (riscv_elf_relocate_section): Likewise. * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise. * elfxx-mips.h (_bfd_mips_elf_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-sparc.h (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. * elfxx-tilegx.h (tilegx_elf_relocate_section): Likewise. 2021-03-26 Keith Seitz * elfcore.h (_bfd_elf_core_find_build_id): Seek file offset of program headers after calling elf_read_notes. 2021-03-23 Jan Beulich * dwarf2.c (read_indexed_string): Rename index to idx. 2021-03-22 Martin Liska * bfd-in.h (startswith): Add startswith function. (CONST_STRNEQ): Remove. * bfd-in2.h (startswith): Regenerate with make headers. * archive.c (bfd_slurp_armap): Replace usage of CONST_STRNEQ with startswith. (_bfd_slurp_extended_name_table): Likewise. * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise. * bfd.c (bfd_get_sign_extend_vma): Likewise. (bfd_convert_section_size): Likewise. (bfd_convert_section_contents): Likewise. * coff-stgo32.c (go32exe_create_stub): Likewise. (go32exe_check_format): Likewise. * coffcode.h (styp_to_sec_flags): Likewise. (GNU_DEBUGALTLINK): Likewise. * coffgen.c (_bfd_coff_section_already_linked): Likewise. (coff_gc_sweep): Likewise. (bfd_coff_gc_sections): Likewise. * cofflink.c (coff_link_add_symbols): Likewise. (process_embedded_commands): Likewise. * compress.c (bfd_is_section_compressed_with_header): Likewise. (bfd_init_section_decompress_status): Likewise. * dwarf2.c (find_debug_info): Likewise. (place_sections): Likewise. * ecoff.c (_bfd_ecoff_slurp_armap): Likewise. * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise. * elf.c (_bfd_elf_make_section_from_shdr): Likewise. (assign_section_numbers): Likewise. (elfcore_grok_win32pstatus): Likewise. * elf32-arm.c (cmse_scan): Likewise. (elf32_arm_gc_mark_extra_sections): Likewise. (elf32_arm_size_dynamic_sections): Likewise. (is_arm_elf_unwind_section_name): Likewise. * elf32-bfin.c (bfin_size_dynamic_sections): Likewise. * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise. * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise. * elf32-csky.c (csky_elf_size_dynamic_sections): Likewise. * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise. * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise. * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise. * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise. * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise. * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise. * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise. * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise. * elf32-tic6x.c (is_tic6x_elf_unwind_section_name): Likewise. (elf32_tic6x_size_dynamic_sections): Likewise. * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise. * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise. (xtensa_is_insntable_section): Likewise. (xtensa_is_littable_section): Likewise. (xtensa_is_proptable_section): Likewise. (xtensa_property_section_name): Likewise. (xtensa_callback_required_dependence): Likewise. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. * elf64-ia64-vms.c (is_unwind_section_name): Likewise. (get_reloc_section): Likewise. (elf64_ia64_size_dynamic_sections): Likewise. (elf64_ia64_object_p): Likewise. * elf64-mmix.c (mmix_elf_add_symbol_hook): Likewise. * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise. * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise. * elflink.c (elf_link_add_object_symbols): Likewise. (_bfd_elf_gc_mark_extra_sections): Likewise. (bfd_elf_parse_eh_frame_entries): Likewise. (_bfd_elf_section_already_linked): Likewise. * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise. * elfnn-ia64.c (is_unwind_section_name): Likewise. (elfNN_ia64_size_dynamic_sections): Likewise. (elfNN_ia64_object_p): Likewise. * elfxx-mips.c (FN_STUB_P): Likewise. (CALL_STUB_P): Likewise. (CALL_FP_STUB_P): Likewise. (_bfd_mips_elf_section_from_shdr): Likewise. (_bfd_mips_elf_fake_sections): Likewise. (_bfd_mips_elf_size_dynamic_sections): Likewise. (_bfd_mips_final_write_processing): Likewise. (_bfd_mips_elf_final_link): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise. * elfxx-x86.c (elf_i386_is_reloc_section): Likewise. (elf_x86_64_is_reloc_section): Likewise. * hpux-core.c (thread_section_p): Likewise. * libcoff.h (bfd_pei_p): Likewise. * linker.c (REAL): Likewise. (unwrap_hash_lookup): Likewise. (_bfd_generic_link_add_one_symbol): Likewise. * mmo.c (mmo_internal_write_section): Likewise. * osf-core.c (osf_core_core_file_p): Likewise. * pef.c (bfd_pef_print_symbol): Likewise. * pei-x86_64.c (pex64_print_all_pdata_sections): Likewise. * som.c (som_slurp_symbol_table): Likewise. (som_slurp_armap): Likewise. * wasm-module.c (wasm_compute_custom_section_file_position): Likewise. 2021-03-22 Jan Beulich * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Add missing language translation wrapping to _bfd_error_handler() invocations. 2021-03-21 Alan Modra * bfd-in.h (startswith): New inline. (CONST_STRNEQ): Use startswith. * bfd-in2.h: Regenerate. 2021-03-20 Alan Modra PR 27590 * elf.c (_bfd_elf_make_section_from_shdr): Remove SHF_EXCLUDE test for .gnu.debuglto*. 2021-03-18 H.J. Lu PR ld/27590 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gnu.debuglto_.debug_ section as debugging section unless it is marked with SHF_EXCLUDE. * elflink.c (elf_create_symbuf): Revert commit 994b2513281. (bfd_elf_match_symbols_in_sections): Ignore section symbols when matching non-debugging sections or linkonce section with comdat section. 2021-03-18 H.J. Lu PR ld/27587 * dwarf2.c (read_attribute_value): Check version >= 3 for DW_FORM_ref_addr. 2021-03-16 Nick Clifton * peXXigen.c (_bfd_XXi_swap_aux_out): Avoid potential buffer overrun by using sizeof of the destination x_fname field as the limit for a memcpy. 2021-03-16 Kuan-Lin Chen * elfxx-riscv.c (riscv_std_z_ext_strtab): Add zba, zbb and zbc. 2021-03-12 Clément Chigot * reloc.c (BFD_RELOC_PPC_TLS_LE, BFD_RELOC_PPC_TLS_IE, BFD_RELOC_PPC_TLS_M, BFD_RELOC_PPC_TLS_ML, BFD_RELOC_PPC64_TLS_GD, BFD_RELOC_PPC64_TLS_LD, BFD_RELOC_PPC64_TLS_LE, BFD_RELOC_PPC64_TLS_IE, BFD_RELOC_PPC64_TLS_M, BFD_RELOC_PPC64_TLS_ML): New relocations. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * coff-rs6000.c (xcoff_calculate_relocation): Call xcoff_reloc_type_tls for TLS relocations. (xcoff_howto_table): Implement TLS relocations. (_bfd_xcoff_reloc_type_lookup): Add cases TLS relocations. (xcoff_reloc_type_tls): New function. * coff64-rs6000.c (xcoff_calculate_relocation): Likewise. (xcoff_howto_table): Likewise. (_bfd_xcoff_reloc_type_lookup): Likewise. * coffcode.h (sec_to_styp_flags): Handle TLS sections. (styp_to_sec_flags): Likewise. (coff_compute_section_file_positions): Avoid file offset optimisation for .data when the previous section is .tdata. (coff_write_object_contents): Handle TLS sections. * coffswap.h (coff_swap_aouthdr_out): Add support for new fields in aouthdr. * libxcoff.h (xcoff_reloc_type_tls): Add prototype. * xcofflink.c (xcoff_link_add_symbols): Handle XMC_UL. (xcoff_need_ldrel_p): Add cases for TLS relocations. (xcoff_create_ldrel): Add l_symndx for TLS sections. 2021-03-12 Clément Chigot * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO): New relocations. a234 768 * coff-rs6000.c (xcoff_calculate_relocation): Call xcoff_reloc_type_toc for R_TOCU and R_TOCL. (xcoff_howto_table): Remove src_mask for TOC relocations. Add R_TOCU and R_TOCL howtos. (_bfd_xcoff_reloc_type_lookup): Add cases for BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO. (xcoff_reloc_type_toc): Compute the whole offset. Implement R_TOCU and R_TOCL. * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise. (xcoff64_howto_table): Likewise. (xcoff64_reloc_type_lookup): Likewise. 2021-03-12 Clément Chigot * coff-rs6000.c (xcoff_calculate_relocation): Correct and add new relocations. (xcoff_howto_table): Likewise. (xcoff_rtype2howto): Increase r_type maximum value. (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead of create a new one from scratch. Enable only some relocations to have a changing r_size. * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise. (xcoff64_howto_table): Likewise. (xcoff64_rtype2howto): Likewise. (xcoff64_ppc_relocate_section): Likewise. * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value. 2021-03-12 Clément Chigot * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move. 2021-03-12 Clément Chigot * coff64-rs6000.c (xcoff64_write_object_contents): Remove. * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620 support for o_cputype field. Avoid creating an empty a.out header for XCOFF64. 2021-03-12 Clément Chigot * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add missing smclass. 2021-03-11 Nelson Chu * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean restart_relax, used to check if we need to run the whole relaxations from relax pass 0 to 2 again. (riscv_elf_link_hash_table_create): Init restart_relax to FALSE. (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set. (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code. (bfd_elfNN_riscv_restart_relax_sections): New function. Called by after_allocation to check if we need to run the whole relaxations again. (_bfd_riscv_relax_section): We will only enter into the relax pass 3 when the restart_relax is FALSE; At last set restart_relax to TRUE if again is TRUE, too. * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration. (bfd_elf64_riscv_restart_relax_sections): Likewise. 2021-03-10 Jan Beulich * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol offset. 2021-03-10 Alan Modra Jan Beulich * elf.c (bfd_elf_generic_reloc): Make references between debug sections use section relative values. 2021-03-09 Jan Beulich * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA. 2021-03-05 H.J. Lu PR ld/27425 PR ld/27432 * bfd.c (_bfd_get_link_info): New function. * elf-bfd.h (output_elf_obj_tdata): Add link_info. (elf_link_info): New. * libbfd-in.h (_bfd_get_link_info): New prototype. * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for R_AMD64_IMAGEBASE when generating x86-64 ELF executable. * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h". (pex64_link_add_symbols): New function. (coff_bfd_link_add_symbols): New macro. * libbfd.h: Regenerated. 2021-03-05 Craig Blackmore Andrew Burgess * elf-bfd.h (elfcore_write_riscv_csr): Declare. * elf.c (elfcore_grok_riscv_csr): New function. (elfcore_grok_note): Handle NT_RISCV_CSR. (elfcore_write_riscv_csr): New function. (elfcore_write_register_note): Handle '.reg-riscv-csr'. 2021-03-05 Craig Blackmore Andrew Burgess * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define. (PRPSINFO_PR_PSARGS_LENGTH): Define. (riscv_write_core_note): New function. (riscv_elf_grok_psinfo): Make use of two new length defines. (elf_backend_write_core_note): Define. 2021-03-05 Craig Blackmore Andrew Burgess * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function. * elf.c (elfcore_grok_gdb_tdesc): New function. (elfcore_grok_note): Handle NT_GDB_TDESC. (elfcore_write_gdb_tdesc): New function. (elfcore_write_register_note): Handle NT_GDB_TDESC. 2021-03-05 Nick Clifton PR 27521 * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms. (read_indexed_string): Placeholder function. (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx* forms. 2021-03-05 Alan Modra * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and 2020-09-16 changes. * coff-x86_64.c (coff_amd64_reloc): Do more or less the same adjustments here instead. Separate pc-relative adjustments from symbol related adjustments. Tidy comments and formatting. 2021-03-04 Jan Beulich * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in final PE images. 2021-03-04 Alan Modra * rs6000-core.c (rs6000coff_core_p): Correct prototype. 2021-03-03 Alan Modra PR 27500 * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop processing not when start/stop symbol section is unmarked but on first time a start/stop symbol is processed. 2021-03-03 Alan Modra * reloc.c: Include x86_64.h rather than internal.h. 2021-03-02 Nick Clifton PR 27484 * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate function and variable tags and a second time to resolve their attributes. 2021-03-02 Nick Alcock * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount. 2021-03-02 Alan Modra PR 27451 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized linker defined start/stop symbols when start_stop_gc. 2021-03-02 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got indirect to pc-relative or toc-relative for undefined symbols. 2021-03-01 Alan Modra Fangrui Song * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker defined start/stop symbols when start_stop_gc. (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise. (bfd_elf_define_start_stop): Don't modify ldscript_def syms. * linker.c (bfd_generic_define_start_stop): Likewise. 2021-02-25 Alan Modra PR 27441 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak. * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and use when deciding an as-needed library should be loaded instead of using the binding of the library definition. 2021-02-24 Alan Modra PR 27459 * coff-stgo32.c (go32exe_check_format): Sanity check size of header to avoid a buffer overflow. 2021-02-22 Alan Modra * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16. * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise. 2021-02-19 Nelson Chu PR 27158 * elfnn-riscv.c (perform_relocation): Updated encoding macros. (_bfd_riscv_relax_call): Likewise. (_bfd_riscv_relax_lui): Likewise. * elfxx-riscv.c (howto_table): Likewise. 2021-02-18 Nelson Chu * Makefile.am: Added cpu-riscv.h. * Makefile.in: Regenerated. * po/SRC-POTFILES.in: Regenerated. * cpu-riscv.h: Added to support spec versions controlling. Also added extern arrays and functions for cpu-riscv.c. (enum riscv_spec_class): Define all spec classes here uniformly. (struct riscv_spec): Added for all specs. (RISCV_GET_SPEC_CLASS): Added to reduce repeated code. (RISCV_GET_SPEC_NAME): Likewise. (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class. (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class. (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name. * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec. (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS. (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME. (riscv_priv_specs): Moved below. (riscv_get_priv_spec_class_from_numbers): Likewise, updated. (riscv_isa_specs): Moved from include/opcode/riscv.h. * elfnn-riscv.c: Included cpu-riscv.h. (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec. * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h. (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h. * elfxx-riscv.h: Removed extern functions to cpu-riscv.h. 2021-02-17 Alan Modra * wasm-module.c: Guard include of limits.h. (CHAR_BIT): Provide backup define. (wasm_read_leb128): Use CHAR_BIT to size "result" in bits. Correct signed overflow checking. 2021-02-17 Nelson Chu PR 27200 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay copying the elf flags from input BFD to output BFD, until we have checked if the input BFD has no code section or not. Also fix the problem that we only check the first section rather than the entire sections for input BFD. 2021-02-16 Alan Modra * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift. (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise. 2021-02-15 Jan Beulich * doc/Makefile.am: Replace "cp -p" by "$(LN_S)". * doc/Makefile.in: Re-generate. 2021-02-15 Alan Modra * elf32-nds32.c (nds32_get_section_contents): Replace bfd_malloc_and_get_section with bfd_get_full_section_contents. (nds32_elf_relax_delete_blanks): Init contents. (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise. 2021-02-15 Alan Modra * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use bfd_get_full_section_contents. 2021-02-14 Alan Modra * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply all fixes to bfd_generic_get_relocated_section_contents since this function was split out. 2021-02-11 Alan Modra * config.bfd: Remove ia64 from obsolete list. 2021-02-11 Alan Modra PR ld/22269 * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234. 2021-02-11 Alan Modra PR 27294 * elf32-avr.c (avr_elf32_load_records_from_section): Use bfd_malloc_and_get_section. Use bfd_byte* vars and remove then unnecessary casts. 2021-02-11 Alan Modra PR 27291 * section.c (bfd_get_section_contents): Avoid possible overflow when range checking offset and count. (bfd_set_section_contents): Likewise. 2021-02-03 Nick Alcock * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in favour of LIBINTL. * configure: Regenerated. 2021-02-09 Alan Modra * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed. * configure.ac: Delete symbian entries. * elf-bfd.h (enum elf_target_os): Delete is_symbian. * elf32-arm.c: Remove symbian support. Formatting. * targets.c: Delete symbian entries. * configure: Regenerate. 2021-02-04 H.J. Lu PR ld/19609 * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more info when failed to convert GOTPCREL relocation. 2021-02-04 Nelson Chu * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*. 2021-02-04 Alan Modra PR 27311 * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed libraries for IR references on pass over libraries after LTO recompilation. 2021-02-03 Alan Modra PR 27311 * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes. (elf_link_add_object_symbols): Here too. Don't pull in as-needed libraries when H is an indirect symbol after calling _bfd_elf_add_default_symbol. 2021-02-03 Alan Modra PR 27311 * elflink.c (_bfd_elf_add_default_symbol): Clear override when undecorated symbol will have a different version. 2021-02-02 Alan Modra PR 27311 * elflink.c (_bfd_elf_add_default_symbol): Add override parameter. Use when handling default versioned symbol. Rename existing override variable to nondef_override and use for non-default versioned symbol. (elf_link_add_object_symbols): Adjust call to suit. Don't pull in as-needed libraries when override is set. 2021-02-01 Emery Hemingway * config.bfd: Add *-*-genode* as a target for AArch64 and x86. 2021-02-01 Egor Vishnyakov PR 27254 * elf32-rl78.c (rl78_elf_relocate_section): Fix calculation of offset for the R_RL78_RH_SADDR relocation. 2021-01-29 Alan Modra PR 27271 * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't segfault on symbols defined in absolute or other special sections. 2021-01-28 Alan Modra PR 27259 * elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to prevent endless looping of linked-to sections. 2020-12-17 Mihails Strasuns * bfd-elf.h (elfcore_write_file_note): New function. * elf.c (elfcore_write_file_note): New function. 2021-01-26 Alan Modra * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0]. 2021-01-24 H.J. Lu PR binutils/27231 * dwarf2.c (read_rnglists): Ignore empty range when parsing line number tables. 2021-01-23 H.J. Lu PR binutils/27231 * dwarf2.c (read_rnglists): Advance rngs_ptr after _bfd_safe_read_leb128 when parsing DW_RLE_offset_pair. 2021-01-20 Alan Modra * elf32-ppc.c: Delete outdated comment. (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define. * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define. 2021-01-20 Alan Modra * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't assume section symbols are present. 2021-01-19 Alan Modra * elf64-ppc.c (elf_hash_entry): New inline function. Use throughout to replace casts. (branch_reloc_hash_match): Remove const from params. (use_local_plt): New function. (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub), (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section): Use use_local_plt. * elf32-ppc.c (use_local_plt): New function. (allocate_dynrelocs, ppc_elf_relocate_section), (write_global_sym_plt): Use use_local_plt. 2021-01-17 H.J. Lu PR ld/27193 * elflink.c (elf_create_symbuf): Also ignore section symbols. 2021-01-16 H.J. Lu PR ld/23169 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): Don't check pointer_equality_needed. 2021-01-15 H.J. Lu * elf-linker-x86.h (elf_linker_x86_params): Add report_relative_reloc. * elf32-i386.c (elf_i386_relocate_section): Call _bfd_x86_elf_link_report_relative_reloc to report relative relocations for -z report-relative-reloc. (elf_i386_finish_dynamic_symbol): Likewse. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewse. (elf_x86_64_finish_dynamic_symbol): Likewse. * elfxx-x86.c (_bfd_x86_elf_link_report_relative_reloc): New function. * elfxx-x86.h (_bfd_x86_elf_link_report_relative_reloc): New prototype. 2021-01-16 Alan Modra * compress.c (decompress_contents): Tidy inflateEnd result test. 2021-01-16 Alan Modra PR 26002 * elflink.c (elf_link_output_extsym): Use version 1 in .gnu.version for undefined unversioned symbols. 2021-01-15 Nelson Chu * elfnn-riscv.c (riscv_relax_delete_bytes): Fixed the indent that caused the by previous commit accidentally. 2021-01-15 Nelson Chu * elfnn-riscv.c: Indent, labels and GNU coding standards tidy, also aligned the code. 2021-01-15 Nelson Chu * elfnn-riscv.c (riscv_merge_attributes): Fix typos of messages. 2021-01-15 Nelson Chu * elfnn-riscv.c: Comments tidy and improvement. * elfxx-riscv.c: Likewise. * elfxx-riscv.h: Likewise. 2021-01-14 H.J. Lu PR ld/26688 * elf32-bfin.c (bfinfdpic_relocate_section): Skip non SEC_ALLOC section for R_BFIN_FUNCDESC. 2021-01-14 Nick Clifton * elf.c (elfcore_grok_win32pstatus): Check for a note type of 0. 2021-01-13 Alan Modra * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. 2021-01-13 Alan Modra PR 27160 * section.c (struct bfd_section): Remove pattern field. (BFD_FAKE_SECTION): Adjust to suit. * bfd-in2.h: Regenerate. * elflink.c (compare_link_order, elf_fixup_link_order): Delete. (bfd_elf_final_link): Don't call elf_fixup_link_order. 2021-01-12 H.J. Lu PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. 2021-01-12 H.J. Lu PR ld/27171 * reloc.c (bfd_perform_relocation): Adjust R_AMD64_DIR64 and R_AMD64_DIR32 relocations for PE/x86-64 inputs. 2021-01-11 H.J. Lu PR ld/27173 * configure: Regenerated. 2021-01-11 Nick Clifton * po/fr.po: Updated French translation. * po/pt.po: Updated Portuguese translation. * po/sr.po: Updated Serbian translation. * po/uk.po: Updated Ukranian translation. 2021-01-09 H.J. Lu * configure: Regenerated. 2021-01-09 H.J. Lu PR ld/27166 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Handle -z lam-u48 and -z lam-u57. 2021-01-09 Nick Clifton * version.m4: Change to 2.36.50. * configure: Regenerate. * po/bfd.pot: Regenerate. 2021-01-09 Nick Clifton * 2.36 release branch crated. 2021-01-08 H.J. Lu * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Also set LAM_U57 when setting LAM_U48. 2021-01-08 H.J. Lu PR ld/26256 PR ld/27160 * elflink.c (elf_fixup_link_order): Verify that fixing up SHF_LINK_ORDER doesn't increase the output section size. 2021-01-09 Alan Modra * configure: Regenerate. 2021-01-07 Samuel Thibault * configure: Regenerate. 2021-01-07 H.J. Lu PR 27109 * aix386-core.c (core_aix386_vec): Initialize keep_unused_section_symbol to TARGET_KEEP_UNUSED_SECTION_SYMBOLS. * aout-target.h (MY (vec)): Likewise. * binary.c (binary_vec): Likewise. * cisco-core.c (core_cisco_be_vec): Likewise. (core_cisco_le_vec): Likewise. * coff-alpha.c (alpha_ecoff_le_vec): Likewise. * coff-i386.c (TARGET_SYM): Likewise. (TARGET_SYM_BIG): Likewise. * coff-ia64.c (TARGET_SYM): Likewise. * coff-mips.c (mips_ecoff_le_vec): Likewise. (mips_ecoff_be_vec): Likewise. (mips_ecoff_bele_vec): Likewise. * coff-rs6000.c (rs6000_xcoff_vec): Likewise. (powerpc_xcoff_vec): Likewise. * coff-sh.c (sh_coff_small_vec): Likewise. (sh_coff_small_le_vec): Likewise. * coff-tic30.c (tic30_coff_vec): Likewise. * coff-tic54x.c (tic54x_coff0_vec): Likewise. (tic54x_coff0_beh_vec): Likewise. (tic54x_coff1_vec): Likewise. (tic54x_coff1_beh_vec): Likewise. (tic54x_coff2_vec): Likewise. (tic54x_coff2_beh_vec): Likewise. * coff-x86_64.c (TARGET_SYM): Likewise. (TARGET_SYM_BIG): Likewise. * coff64-rs6000.c (rs6000_xcoff64_vec): Likewise. (rs6000_xcoff64_aix_vec): Likewise. * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): Likewise. (CREATE_BIGHDR_COFF_TARGET_VEC): Likewise. (CREATE_LITTLE_COFF_TARGET_VEC): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Likewise. (TARGET_LITTLE_SYM): Likewise. * hppabsd-core.c (core_hppabsd_vec): Likewise. * hpux-core.c (core_hpux_vec): Likewise. * i386msdos.c (i386_msdos_vec): Likewise. * ihex.c (ihex_vec): Likewise. * irix-core.c (core_irix_vec): Likewise. * mach-o-target.c (TARGET_NAME): Likewise. * mmo.c (mmix_mmo_vec): Likewise. * netbsd-core.c (core_netbsd_vec): Likewise. * osf-core.c (core_osf_vec): Likewise. * pdp11.c (MY (vec)): Likewise. * pef.c (pef_vec): Likewise. (pef_xlib_vec): Likewise. * plugin.c (plugin_vec): Likewise. * ppcboot.c (powerpc_boot_vec): Likewise. * ptrace-core.c (core_ptrace_vec): Likewise. * sco5-core.c (core_sco5_vec): Likewise. * som.c (hppa_som_vec): Likewise. * srec.c (srec_vec): Likewise. (symbolsrec_vec): Likewise. * tekhex.c (tekhex_vec): Likewise. * trad-core.c (core_trad_vec): Likewise. * verilog.c (verilog_vec): Likewise. * vms-alpha.c (alpha_vms_vec): Likewise. * vms-lib.c (alpha_vms_lib_txt_vec): Likewise. * wasm-module.c (wasm_vec): Likewise. * xsym.c (sym_vec): Likewise. * elf.c (ignore_section_sym): Return TRUE if BSF_SECTION_SYM_USED isn't set. (elf_map_symbols): Don't include ignored section symbols. * elfcode.h (elf_slurp_symbol_table): Also set BSF_SECTION_SYM_USED on STT_SECTION symbols. * elflink.c (bfd_elf_final_link): Generated section symbols only when emitting relocations or reqired. * elfxx-x86.h (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New. * syms.c (BSF_SECTION_SYM_USED): New. * targets.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): New. (bfd_target): Add keep_unused_section_symbols. (bfd_keep_unused_section_symbols): New. * bfd-in2.h: Regenerated. 2021-01-07 Nick Clifton PR 25713 * bfdio.c (_bfd_real_fopen): For Win32 convert relative paths to absolute paths and check to see if they are longer than MAX_PATH. 2021-01-07 Philipp Tomsich * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zihintpause. 2021-01-07 Claire Xenia Wolf Jim Wilson Andrew Waterman Maxim Blinov Kito Cheng Nelson Chu * elfxx-riscv.c (riscv_std_z_ext_strtab): Added zba, zbb and zbc. 2021-01-06 H.J. Lu * elf32-bfin.c (bfin_check_relocs): Check bfd_link_hash_indirect. (bfinfdpic_check_relocs): Likewise. 2021-01-06 Alan Modra * elf32-score.c (s3_bfd_score_info_to_howto): Report an error on unknown r_type. * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise. 2021-01-06 Alan Modra * config.bfd (sparc-*-solaris2*): Add sparc_elf32_vec. (sparc64-*-solaris2*): Add sparc_elf64_vec and sparc_elf32_vec. 2021-01-06 Marcus Comstedt * config.bfd: Added targets riscv64be*-*-*, riscv32be*-*-* and riscvbe*-*-*. Also added riscv_elf[32|64]_be_vec. * configure.ac: Handle riscv_elf[32|64]_be_vec. * configure: Regenerate. * elfnn-riscv.c: Include and define CHAR_BIT for riscv_is_insn_reloc. (riscv_get_insn): RISC-V instructions are always little endian, but bfd_get may be used for big-endian, so add new riscv_get_insn to handle the insturctions. (riscv_put_insn): Likewsie. (riscv_is_insn_reloc): Check if we are relocaing an instruction. (perform_relocation): Call riscv_is_insn_reloc to decide if we should use riscv_[get|put]_insn or bfd_[get|put]. (riscv_zero_pcrel_hi_reloc): Use riscv_[get|put]_insn, bfd_[get|put]l32 or bfd_[get|put]l16 for code. (riscv_elf_relocate_section): Likewise. (riscv_elf_finish_dynamic_symbol): Likewise. (riscv_elf_finish_dynamic_sections): Likewise. (_bfd_riscv_relax_call): Likewise. (_bfd_riscv_relax_lui): Likewise. (_bfd_riscv_relax_align): Likewise. (_bfd_riscv_relax_pc): Likewise. (riscv_elf_object_p): Handled for big endian. (TARGET_BIG_SYM, TARGET_BIG_NAME): Defined. * targets.c: Add riscv_elf[32|64]_be_vec. (_bfd_target_vector): Likewise. 2021-01-05 Alan Modra * elflink.c (bfd_elf_link_record_dynamic_symbol): Handle no_export for relocatable executable. 2021-01-05 Alan Modra * vms-alpha.c (_bfd_vms_slurp_egsd): Read flags after size check. 2021-01-05 Nelson Chu * elfnn-riscv.c (allocate_dynrelocs): When we are generating pde, make sure gp symbol is output as a dynamic symbol. 2021-01-04 H.J. Lu PR ld/26256 * elflink.c (compare_link_order): Place unordered sections before ordered sections. (elf_fixup_link_order): Add a link info argument. Allow mixed ordered and unordered input sections for non-relocatable link. Sort the consecutive bfd_indirect_link_order sections with the same pattern. Change the offsets of the bfd_indirect_link_order sections only. (bfd_elf_final_link): Pass info to elf_fixup_link_order. * section.c (bfd_section): Add pattern. (BFD_FAKE_SECTION): Initialize pattern to NULL. * bfd-in2.h: Regenerated. 2021-01-04 Alexander Fedotov * elf32-arm.c (elf32_arm_print_private_bfd_data): Prefix hex value of private flags with 0x. * elfnn-aarch64.c (elfNN_aarch64_print_private_bfd_data): Likewise. 2021-01-04 Alan Modra PR 26822 * elflink.c (elf_link_input_bfd): Use the file base name in linker generated STT_FILE symbols. 2021-01-04 Nelson Chu * elfxx-riscv.c (riscv_compare_subsets): Removed static. * elfxx-riscv.h: Add declaration. * elfnn-riscv.c (riscv_merge_multi_letter_ext): Use riscv_compare_subsets to check the orders. (riscv_skip_prefix): Removed. (riscv_prefix_cmp): Removed. 2021-01-04 Alan Modra PR 26741 * elfxx-riscv.c (riscv_parse_prefixed_ext): Free subset after calculating subset version length. d236 1 a236 1 2021-01-01 Nicolas Boulenguez d238 3 a240 1 * xcofflink.c: Correct spelling in comments. d242 1 a242 1 2021-01-01 Alan Modra d246 1 a246 1 For older changes see ChangeLog-2020 d248 1 a248 1 Copyright (C) 2021-2022 Free Software Foundation, Inc. @ 1.1.1.12 log @Import binutils-2.42 (last was 2.39) 2024-01-15 Nick Clifton * 2.42 branch point. 2023-11-15 Arsen Arsenović * intl: Remove directory. Replaced with out-of-tree GNU gettext. * .gitignore: Add '/gettext*'. * configure.ac (host_libs): Replace intl with gettext. (hbaseargs, bbaseargs, baseargs): Split baseargs into {h,b}baseargs. (skip_barg): New flag. Skips appending current flag to bbaseargs. : Exempt --with-libintl-{type,prefix} from target and build machine argument passing. * configure: Regenerate. * Makefile.def (host_modules): Replace intl module with gettext module. (configure-ld): Depend on configure-gettext. * Makefile.in: Regenerate. * src-release.sh: Remove references to the intl/ directory. 2023-07-03 Nick Clifton 2.41 Branch Point. 2023-06-26 Nick Clifton * Import these updates to the config scripts commit 4ad4bb7c30aca1e705448ba8d51a210bbd47bb52 Author: Paul Eggert Date: Fri Jun 23 09:55:10 2023 -0700 Quote 'like this', not `like this'. commit 63acb96f92473ceb5e21d873d7c0aee266b3d6d3 Author: Paul Eggert Date: Sat Jan 21 00:15:01 2023 -0600 Fix config.sub spelling typo for "athlon" commit 4ce12a5c9125cedc0d0ba584444a6865396923ec Author: Dmitry V. Levin Date: Sun Jan 1 08:00:00 2023 +0000 Update copyright years commit c397e2c040bce50bcdccb131f90115ba7e8bfc19 Author: Arsen Arsenovi Date: Sat Sep 17 23:34:48 2022 +0200 config.sub: add linux-mlibc targets commit 9f9f9b0b13197269848c76e3e057a3ed0680b4bf Author: Arsen Arsenovi Date: Sat Sep 17 23:34:47 2022 +0200 config.guess: support running on Managarm systems commit 87e6687749da7bb2ab158a79fa83721c19ed9246 Author: Arsen Arsenovi Date: Sat Sep 17 23:34:46 2022 +0200 config.sub: add managarm-{mlibc,kernel} targets commit 20403c5701973a4cbd7e0b4bbeb627fcd424a0f1 Author: Xiaotian Wu Date: Mon Aug 1 16:05:29 2022 +0800 Remove loongarchx32 commit 02ba26b218d3d3db6c56e014655faf463cefa983 Author: Alexander von Gluck IV Date: Wed May 25 15:43:13 2022 -0500 config.guess: Update Haiku guesses commit f56a7140386d08a531bcfd444d632b28c61a6329 Author: Bruno Haible Date: Sun May 8 19:08:08 2022 +0200 config.guess (x86_64:Linux:*:*): Detect 32-bit ABI. 2023-04-20 Nick Clifton * SECURITY.txt: New file. * src-release.sh (DEVO_SUPPORT): Add SECURITY.txt. 2022-12-31 Nick Clifton * 2.40 binutils branch created. 2022-10-10 Nick Clifton * src-release.sh: Add "-r " option to create reproducible tarballs based upon a fixed timestamp of . * binutils/README-how-to-make-a-release: Add a line showing how to use -r when creating a binutils release. 2022-10-04 Nick Clifton * README-maintainer-mode: Add a minimum version of dejagnu requirement. 2022-09-08 Nick Clifton * README-maintainer-mode: Update minimum version of gettext required. @ text @d1 1 a1 1 2024-01-15 Nick Clifton d3 4 a6 1 * version.m4: Change to 2.41.90. a7 544 * po/bfd.pot: Regenerate. 2024-01-15 Nick Clifton * 2.42 branch point. 2023-12-05 Nick Clifton PR 31106 * elfcode.h (elf_write_relocs): Do not convert a relocation against a zero-value absolute symbol into a relocation without a symbol if the symbol is being used for a complex relocation. 2023-11-21 Nick Clifton PR 31067 linker.c (_bfd_generic_link_add_one_symbol): When issuing a warning message, also display a message about the warning not being affected by garbage colleciton. 2023-11-15 Arsen Arsenović * aclocal.m4: Regenerate. * configure.ac (SHARED_LIBADD): Use LTLIBINTL rather than LIBINTL. * configure: Regenerate. * po/Make-in ($(srcdir)/$(PACKAGE).pot): Output to a .pot temporary file, to suppress xgettext checking charset names. 2023-11-10 Simon Marchi * archures.c (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * bfd-in2.h (bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102): New. * cpu-amdgcn.c (arch_info_struct): Add entries for bfd_mach_amdgcn_gfx1100, bfd_mach_amdgcn_gfx1101, bfd_mach_amdgcn_gfx1102. 2023-11-10 Nick Clifton * elf.c (assign_file_positions_except_relocs): Turn warnings about executable segments into errors if so requested. * elflink.c (bfd_elf_size_dynamic_sections): Turn warnings about executable stacks into errors if so requested. 2023-10-30 Nick Clifton * bpf-reloc.def (R_BPF_64_NODLD32): Add entry. 2023-10-16 Nick Clifton PR 28910 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Do not set output flags if the input flags have not been set. 2023-10-09 Nick Clifton PR 30950 * elf32-i386.c (elf_i386_convert_load_reloc): Check for elf_x86_hash_table returning a NULL pointer. PR 30949 * elflink.c (elf_gc_mark_debug_section): Check for bfd_section_from_elf_index returning a NULL pointer. 2023-10-06 Nick Clifton PR 30940 * elf64-alpha.c (elf64_alpha_check_relocs): Correct error message. 2023-10-05 Nick Clifton PR 30904 * elf.c (_bfd_elf_get_dynamic_symbols): Fix typo when checking to see if the gnuchains array has been successfully created. 2023-10-02 Nick Clifton * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Use bfd_get_current_time when filing in the timestamp. 2023-09-29 Nick Clifton PR 30906 * elf.c (_bfd_elf_slurp_version_tables): Test that the verref section header has been initialised before using it. 2023-09-28 Nick Clifton PR 30886 * elf-bfd.h (struct elf_obj_tdata): Add dt_strsz field. * elf.c (_bfd_elf_get_dynamic_symbols): Add a NUL byte at the end of the string table. Initialise the dt_strsz field. (_bfd_elf_slurp_version_tables): Only free the contents if they were malloc'ed. Add checks before setting string pointers in the dt_strtab buffer. 2023-09-27 Nick Clifton PR 30885 * elfcode.h (elf_slurp_symbol_table): Compute the symcount for non dynamic symbols in the same way as _bfd_elf_get_symtab_upper_bound. 2023-09-13 Jacob Navia * elf.c (_bfd_elf_init_reloc_shdr): Don't segfault on alloc fail. 2023-09-13 Alan Modra * elf-strtab.c (_bfd_elf_strtab_init): In the event of memory allocation failure, make sure that the hash table is freed. 2023-08-30 Tom Tromey PR binutils/30703 * doc/webassembly.texi, doc/bfd.texi: Revert 8bb23cdb, adding parameters back to @@node. 2023-08-04 Nick Clifton PR 15545 * cache.c (bfd_cache_close_all): Extend description to note that all files will be closed, even those that are not cacheable. Add code to prevent a possible infinite loop. 2023-08-02 Tom Tromey * pei-x86_64.c (PEI_HEADERS): Do not define. * pei-loongarch64.c (PEI_HEADERS): Do not define. * pei-aarch64.c (PEI_HEADERS): Do not define. * pe-x86_64.c (PEI_HEADERS): Do not define. * pe-aarch64.c (PEI_HEADERS): Do not define. * libpei.h (_LIBPEI_H): Add include guard. * coff-x86_64.c (PEI_HEADERS): Do not check. * coff-loongarch64.c (PEI_HEADERS): Do not check. * coff-aarch64.c (PEI_HEADERS): Do not check. 2023-07-24 Johannes Schauer Marin Rodrigues * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): If inserting a timestamp, use the value held in the SOURCE_DATE_EPOCH environment variable, if it is defined. 2023-07-24 Jose E. Marchesi * reloc.c: New reloc BFD_RELOC_BPF_DISPCALL32. * elf64-bpf.c (bpf_reloc_type_lookup): Handle the new reloc. * libbfd.h (bfd_reloc_code_real_names): Regenerate. 2023-07-09 Fangrui Song PR 30592 * section.c: Define SEC_ELF_LARGE. * bfd-in2.h: Regenerate. * elf64-x86-64.c (elf_x86_64_section_flags, elf_x86_64_fake_sections, elf_x86_64_copy_private_section_data): New. 2023-07-03 Nick Clifton * version.m4: Update version number to 2.41.50. * configure: Regenerate. * bfd/po/bfd.pot: Regenerate. 2023-07-03 Nick Clifton 2.41 Branch Point. 2023-06-19 Nick Clifton PR 30560 * elf64-x86-64.c (elf_x86_64_relocate_section): Add more checks for a valid relocation offset. 2023-06-07 Nick Clifton PR 30499 * elflink.c (elf_link_add_object_symbols): Add a message indicating that alignment and size discrepancies between the definition of common symbols and normal symbols are serious and should be investigated. 2023-05-31 Tristan Gingold PR 30444 * coffcode.h (coff_write_object_contents): Handle base64 encoding on PE. Also check for too large string table. * coffgen.c (extract_long_section_name): New function extracted from ... (make_a_section_from_file): ... here. Add support for base64 long section names. (decode_base64): New function. 2023-05-17 Luca Bacci PR 30421 * cofflink.c (_decoration_hash_newfunc): New function. (_bfd_coff_link_hash_table_init): Call it. * libcoff-in.h (struct coff_link_hash_table): Add decoration_hash field. (struct decoration_hash_entry): Declare. (_decoration_hash_newfunc): Prototype. * libcoff.h: Regenerate. 2023-05-16 Oleg Tolmatcev * libcoff-in.h (struct coff_tdata): Add section_by_index and section_by_target_index hash tables. * libcoff.h: Regenerate. * coffcode.h (htab_hash_section_index): New function. (htab_eq_section_index): New function. (htab_hash_section_target_index): New function. (htab_eq_section_target_index): New function. (coff_mkobject_hool): Create the hash tables. * peicode.h: Add the same new functions. (pe_mkobject_hook): Create the hash tables. * coff-x86_64.c (coff_amd64_rtype_to_howto): Use the new tables to speed up lookups. * coffgen.c (coff_section_from_bfd_index): Likewise. (_bfd_coff_close_and_cleanup): Delete the hash tables. 2023-05-10 Luca Bonissi PR 30422 * elf32-or1k.c (or1k_elf_relocate_section): Prescan for R_OR1K_GOT_AHI16 relocs as they may occur after R_OR1K_GOT16 relocs. 2023-05-05 Nick Clifton PR 30354 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): If any debug sections are marked then rerun the extra marking in order to pick up any dependencies. 2023-05-03 Oleg Tolmatcev * archive.c (_bfd_write_archive_contents): Use a larger buffer in order to improve efficiency. 2023-05-03 Oleg Tolmatcev * coffcode.h (coff_read_word_from_buffer): New function. * coffcode.h (COFF_CHECKSUM_BUFFER_SIZE): New constant. * coffcode.h (coff_compute_checksum): Improve speed by reducing the number of seeks and reads used. 2023-04-24 Nick Clifton * po/la.po: New Georgian translation. 2023-04-17 Nick Clifton PR 30142 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do not force the .rsrc section to be writeable. 2023-03-30 Nick Clifton PR 30285 * elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated. 2023-02-27 Felix Willgerodt * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for elf_external_linux_prpsinfo32_ugid32. 2023-02-23 Fangrui Song * elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params. (riscv_elfNN_set_options): New. (riscv_info_to_howto_rela): Check relax_gp. (_bfd_riscv_relax_section): Likewise. * elfxx-riscv.h (struct riscv_elf_params): New. (riscv_elf32_set_options): New. (riscv_elf64_set_options): New. 2023-02-23 Nick Clifton Alan Modra PR 30150 * dwarf2.c (comp_unit_contains_address): Renamed to ... (comp_unit_may_contain_address): this, and added code to return true if the CU's ranges have not yet been computed. (_bfd_dwarf2_find_nearest_line_with_alt): Use the renamed function, simplifying code in the process. 2023-02-21 Nick Clifton * opncls.c (bfd_fill_in_gnu_debuglink_section): Update description. 2023-02-17 Tom Tromey * doc/doc.str (FUNCTION): Call func. 2023-02-17 Tom Tromey * opncls.c: Hoist the SECTION comment. 2023-02-17 Tom Tromey * opncls.c (bfd_get_debug_link_info_1, separate_debug_file_exists) (separate_alt_debug_file_exists, find_separate_debug_file) (get_build_id, get_build_id_name, check_build_id_file): Don't use chew comments. 2023-02-17 Tom Tromey * doc/doc.str (SYNOPSIS): Use collapse_whitespace. * doc/chew.c (collapse_whitespace): New function. (main): Register collapse_whitespace. 2023-02-07 Tom Tromey * bfd.c, cache.c, compress.c, opncls.c: Remove RETURNS from documentation comments. * doc/doc.str, doc/proto.str (RETURNS): Remove. 2023-02-07 Tom Tromey * syms.c (bfd_decode_symclass, bfd_is_undefined_symclass) (bfd_symbol_info): Reorder documentation comment. * doc/doc.str (synopsis_seen): New variable. (SYNOPSIS): Set synopsis_seen. Emit @@deftypefn. (DESCRIPTION): Use synopsis_seen. * doc/chew.c (catstrif): New function. (main): Add catstrif intrinsic. (compile): Recognize "variable" command. 2023-02-07 Tom Tromey * doc/proto.str (external, internal, ifinternal, ENUMEQ, ENUMDOC): Update. * doc/chew.c (internalmode): Remove. (add_intrinsic_variable): New function. (main): Add internalmode as intrinsic. (internal_mode): Remove global. (maybecatstr): Update. (free_words): Free variables. 2023-02-07 Tom Tromey * doc/chew.c (pcu) : Now intptr_t. (internal_mode, istack, isp): Likewise. (bang, atsign): Use intptr_t. 2023-02-07 Tom Tromey * doc/proto.str (SYNOPSIS): Don't use paramstuff. * doc/chew.c (paramstuff): Remove. (main): Don't add paramstuff intrinsic. 2023-02-07 Tom Tromey * doc/doc.str, doc/proto.str: Add copyright header. 2023-02-07 Tom Tromey * doc/webassembly.texi (File layout): Remove second argument from @@node. * doc/bfd.texi: Use single-argument @@node everywhere. 2023-02-07 Tom Tromey * Makefile.in: Rebuild. * doc/local.mk (%D%/chew.stamp): Don't use H_CFLAGS. 2023-01-24 Nick Clifton PR 29998 * cofflink.c (_bfd_coff_generic_relocate_section): Add an assertion that the output section is set for defined, global symbols. 2023-01-17 Xianmiao Qu * elf32-csky.c (elf32_csky_merge_attributes): Don't save and restore the ARCH attribute, it will actually clear the ARCH attribute. (csky_elf_merge_private_bfd_data): Store the machine flag correctly. 2023-01-13 Nick Clifton * po/ro.po: Updated Romainian translation. 2023-01-11 Nick Clifton PR 29988 * dwarf2.c (read_indexed_address): Fix check for an out of range offset. 2023-01-06 Nick Clifton * po/ru.po: Updated Russian translation. 2023-01-03 Himal PR 29947 * bfdio.c (_bfd_real_fopen): Do not add a prefix to the Windows' nul device filename. 2023-01-03 Nick Clifton * po/fr.po: Updated French trabslation. * po/uk.po: Updated Ukrainian trabslation. 2022-12-31 Nick Clifton * 2.40 branch created. 2022-12-23 Nick Clifton PR 29936 * dwarf2.c (concat_filename): Fix check for a directory index off the end of the directory table. 2022-12-21 Nick Clifton * po/ro.po: Updated Romanian translation. 2022-12-06 Nick Clifton PR 29852 * elf32-arm.c (cmse_scan): Check for NULL entries in the sym_hashes array. (elf32_arm_gc_mark_extra_sections): Likewise. 2022-12-05 Nick Clifton PR 29848 * vms-alpha.c (parse_module): Fix potential out of bounds memory access. 2022-12-01 Nick Clifton PR 25202 * bfd.c (VerilogDataEndianness): New variable. (verilog_write_record): Use VerilogDataEndianness, if set, to choose the endianness of the output. (verilog_write_section): Adjust the address by the data width. 2022-11-21 Nick Clifton PR 29764 * cpu-arm.c (scan): Accept machine names prefixed with "arm:". * cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:". 2022-10-19 Nick Clifton PR 29699 * elf.c (_bfd_elf_slurp_version_tables): Fail if the sh_info field of the section header is zero. 2022-09-09 Nick Clifton PR 29532 * elf.c (setup_group): Do not return false if there is no group information available. 2022-09-02 Aaron Merey * aout-target.h (MY_find_nearest_line_with_alt): New macro. * bfd-in2.h: Regenerate. * bfd.c (bfd_find_nearest_line_with_alt): New macro. * binary.c (binary_find_nearest_line_with_alt): New macro. * coff-rs6000.c (_bfd_xcoff_find_nearest_line_with_alt): New macro. (rs6000_xcoff64_vec): Add coff_find_nearest_line_with_alt. * dwarf2.c (_bfd_dwarf2_find_nearest_line): Calls _bfd_dwarf2_find_nearest_line_with_alt. (_bfd_dwarf2_find_nearest_line_with_alt): New function. Implements the former _bfd_dwarf2_find_nearest_line. Adds parameter alt_filename. Attempt to open alt_filename and use it as the .dwz file if not NULL. * elf-bfd.h (_bfd_elf_find_nearest_line_with_alt): New declaration. * elf.c (_bfd_elf_find_nearest_line): Calls _bfd_elf_find_nearest_line_with_alt. (_bfd_elf_find_nearest_line_with_alt): New function. Implements the former _bfd_elf_find_nearest_line. Adds parameter alt_filename. * elf32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro. * elf64-mips.c (bfd_elf64_find_nearest_line_with_alt): New macro. * elfn32-mips.c (bfd_elf32_find_nearest_line_with_alt): New macro. * elfxx-mips.h (_bfd_mips_elf_find_nearest_line_with_alt): New macro. * elfxx-target.h (bfd_elfNN_find_nearest_line_with_alt): New macro. * i386mdos.c (msdos_find_nearest_line_with_alt): New macro. * ihex.c (ihex_find_nearest_line_with_alt): New macro. * libbfd-in.h (_bfd_nosymbols_find_nearest_line_with_alt): New declaration. (_bfd_dwarf2_find_nearest_line_with_alt): New declaration. * libbfd.h: Regenerate. * libcoff-in.h (coff_find_nearest_line_with_alt): New macro. * libcoff.h: Regenerate. * libecoff.h (_bfd_ecoff_find_nearest_line_with_alt): New macro. * mach-o.h (bfd_mach_o_find_nearest_line_with_alt): New macro. * mmo.c (mmo_find_nearest_line_with_alt): New macro. * pef.c (bfd_pef_find_nearest_line_with_alt): New macro. * plugin.c (bfd_plugin_find_nearest_line_with_alt): New macro. * ppcboot.c (ppcboot_find_nearest_line_with_alt): New macro. * som.h (som_find_nearest_line_with_alt): New macro. * srec.c (srec_find_nearest_line_with_alt): New macro. * syms.c (_bfd_nosymbols_find_nearest_line_with_alt): New function. * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add symbol for NAME##_find_nearest_line_with_alt. (_bfd_find_nearest_line_with_alt): Add declaration. * tekhex.c (tekhex_find_nearest_line_with_alt): New macro. * verilog.c (verilog_find_nearest_line_with_alt): New macro. * vms-alpha.c (_bfd_vms_find_nearest_line_with_alt): New macro. * wasm-module.c (wasm_find_nearest_line_with_alt): New macro. * xsym.c (bfd_sym_find_nearest_line_with_alt): New macro. 2022-09-02 Frederic Cambus * config.bfd (arm-*-openbsd*): Restore target. 2022-08-30 Nick Clifton PR 29529 * dwarf2.c (struct line_info_table): Add new field: use_dir_and_file_0. (concat_filename): Use new field to help select the correct table slot. (read_formatted_entries): Do not skip entry 0. (decode_line_info): Set new field depending upon the version of DWARF being parsed. Initialise filename based upon the setting of the new field. 2022-08-22 Frederic Cambus * config.bfd (aarch64-*-openbsd*): Add target. 2022-08-03 Nick Clifton PR 29389 * bfd.c (BFD_CLOSED_BY_CACHE): New bfd flag. * cache.c (bfd_cache_delete): Set BFD_CLOSED_BY_DELETE on the closed bfd. (bfd_cache_lookup_worker): Clear BFD_CLOSED_BY_DELETE on the newly reopened bfd. * opncls.c (bfd_set_filename): Refuse to change the name of a bfd that has been closed by bfd_cache_delete. Mark changed bfds as uncacheable. * bfd-in2.h: Regenerate. a14 5 2022-07-26 Nick Clifton * elfnn-loongarch.c (loongarch_elf_relocate_section): Fix indentation. d2423 1 a2423 1 Copyright (C) 2021-2024 Free Software Foundation, Inc. @ 1.1.1.13 log @Import binutils 2.45 (previous was 2.42) 2.45 Release Notes ------------------ Assembler: All sframe information generated by the assembler is now in compliance with the SFrame V2 specification. The assembler now supports .errif and .warnif directives, permitting user-controlled diagnostics with conditionals that are evaluated only at the end of assembly. The assembler predefines the symbol "GAS(version)". The assembler now supports the generation of SFrame stack trace information (.sframe) from CFI directives on s390 64-bit (s390x). For RISC-V, the ".option arch, -ext" format is deprecated due to its controversial use. For RISC-V, stop generating mapping symbols $x and replace with $x. The $x was defined to have the same ISA as previous $x, but now is defined to have the same ISA as elf architecture attribute. Once both used .option arch/rvc/norvc/push/pop directives (some code have different architectures with file attribute) and data directives in text, then the file need to be rebuilt since 2.45. The assembler supports the latest architecture extensions for the RISC-V, LoongArch and AArch64 architectures. Linker: The linker's --stats option can take an optional argument which if used is interpreted as a filename into which resource usage information should be stored. As an alternative mechanism the LD_STATS environment variable can also be used to achieve the same results. Resource usage information for various phases of the linking operation is now included in the report. If a map file is being produced then the information is also included there. The --no-stats option can be used to disable stat reporting, should it have been enabled. On s390 64-bit (s390x), generate SFrame stack trace information (.sframe) for the linker generated .plt section. On s390 32-bit, generate ".eh_frame" unwind information for the linker generated .plt section. Both features are enabled by default and can be disabled using linker option --no-ld-generated-unwind-info. On RISC-V, add new PLT formats, and GNU property merge rules for zicfiss and zicfilp extensions. On AVR, the default linker scripts now assert that the .progmem sections don't extend past 0xffff since they are accessed by means of LPM. For data in program memory that may be located past 0xffff, a .progmemx section should be used. On LoongArch, linker relaxation time complexity is no longer quadratic with respect to relocation counts. Linking time of large software should be improved. In addition R_LARCH_32_PCREL records are now checked for overflow. Other binary utilities: New versioned release of libsframe: libsframe.so.2. This release introduces versioned symbols with version node name LIBSFRAME_2.0. Some new symbols have been added to support the new flag SFRAME_F_FDE_FUNC_START_PCREL and retrieving flags from SFrame decoder and encoder objects: - Addition of sframe_decoder_get_flags, sframe_decoder_get_offsetof_fde_start_addr, sframe_encoder_get_flags, sframe_encoder_get_offsetof_fde_start_addr. This release also includes backward-incompatible ABI changes: - Removal of sframe_get_funcdesc_with_addr. - Change in the behavior of sframe_decoder_get_funcdesc_v2, sframe_encoder_add_funcdesc_v2 and sframe_encoder_write. For SFrame stack trace format, the function start address in each SFrame FDE has a changed encoding: The 32-bit signed integer now holds the offset of the start PC of the associated function from the sfde_func_start_address field itself (instead of the earlier where it was the offset from the start of the SFrame section itself). All SFrame sections generated by gas and ld now default to this new encoding, setting the (new) SFRAME_F_FDE_FUNC_START_PCREL flag. Relocatable SFrame links are now fixed. Readelf now recognizes RISC-V GNU_PROPERTY_RISCV_FEATURE_1_CFI_SS and GNU_PROPERTY_RISCV_FEATURE_1_CFI_LP_UNLABELED for zicfiss and zicfilp extensions. The LoongArch disassembler now properly accepts multiple disassembly options given by -M, such as "-M no-aliases,numeric". (Previously only the first option took effect.) 2.44 Release Notes ------------------ Assembler: Support for new architecture extensions for AArch64, Risc-V and x86. Linker: The default maximum page size was changed from 16KiB to 64KiB for LoongArch. This now supports mixed LTO and non-LTO object files in relocatable output. The ELF forms of the linker support a --image-base= option for compatibility with LLD. The --build-id= option now accepts an argument of "xx" which enables the use of the xxhash library. This produces a 128-bit hash and is 2-4x faster than md5 or sha1. The ELF linker option --package-metadata supports percent-encoded and %[string] encoded JSON payloads. Disassembler: The RISC-V disassembler now supports -M,max option like QEMU to dump instruction without checking architecture support as usual. GprofNG: Support added for hardware event counters for Neoverse-N1, Ampere-1, and Appliedmicro processors. Support for the Nios II target has been removed. 2.43 Release Notes ------------------ Assembler: * Add a .base64 directive to the assembler which allows base64 encoded binary data to be provided as strings. * Assembler macros as well as the bodies of .irp / .irpc / .rept can now use the syntax \+ to access the number of times a given macro has been executed. This is similar to the already existing \@@ syntax, except that the count is maintained on a per-macro basis. * References to FB and dollar labels, when supported, are no longer permitted in a radix other than 10. (Note that definitions of such labels were already thus restricted, except that leading zeroes were permitted). Linker: * Add support for DT_RELR type compressed runtime relocations for the AArch64 and LoongArch architectures. * Add --rosegment option which changes the -z separate-code option so that only one read-only segment is created (instead of two). * Add --section-ordering-file option to add extra mapping of input sections to output sections. * Add -plugin-save-temps to store plugin intermediate files permanently. Utilities: * Readelf will now display DT_RELR relocations in full detail. * Readelf now has a -j/--display-section option which takes the name or index of a section and displays its contents according to its type. The option can be used multiple times on the command line to display multiple sections. * When objdump or readelf are used to display the contents of a .eh_frame section they will now also display the contents of the .eh_frame_hdr section, if present. Gprofng: * Improved the support for hardware event counters: - Re-designed and streamlined the implementation. - Defined a common set of events for ARM processors. - Added specific events for AMD ZEN3 / ZEN4, and Intel Ice Lake processors. * Added a minimal support for RISC-V. General: * Target specific improvements for many architectures. @ text @d1 1 a1 1 2025-07-13 Nick Clifton d3 3 a5 28 * 2.45 Branch point. 2025-02-08 Alexandre Oliva * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Check for _GLOBAL_OFFSET_TABLE_ references early, then compare hashed symbols instead of strings. (_bfd_sparc_elf_relocate_section): Compare hashed symbols. 2025-01-23 Jose E. Marchesi * doc/local.mk (AM_MAKEINFOFLAGS): Prepend the build directory to the @@include search path. * Makefile.in: Regenerate. 2025-01-19 Nick Clifton * 2.44 Branch point. 2024-10-18 WANG Xuerui * elfnn-loongarch.c (ELF_MAXPAGESIZE): Bump to 64KiB. (ELF_MINPAGESIZE): Define as 4KiB. (ELF_COMMONPAGESIZE): Define as 16KiB. 2024-07-20 Nick Clifton * 2.43 branch point. d2969 1 a2969 1 Copyright (C) 2021-2025 Free Software Foundation, Inc. @ 1.1.1.14 log @Import binutils-2.46.0 (previous was 2.45) Changes in 2.45: * New versioned release of libsframe: libsframe.so.2. This release introduces versioned symbols with version node name LIBSFRAME_2.0. Some new symbols have been added to support the new flag SFRAME_F_FDE_FUNC_START_PCREL and retrieving flags from SFrame decoder and encoder objects: - Addition of sframe_decoder_get_flags, sframe_decoder_get_offsetof_fde_start_addr, sframe_encoder_get_flags, sframe_encoder_get_offsetof_fde_start_addr. This release also includes backward-incompatible ABI changes: - Removal of sframe_get_funcdesc_with_addr. - Change in the behavior of sframe_decoder_get_funcdesc_v2, sframe_encoder_add_funcdesc_v2 and sframe_encoder_write. * On s390 64-bit (s390x), gas, ld, objdump, and readelf now support generating and processing SFrame V2 stack trace information (.sframe). The assembler generates SFrame info from CFI directives with option "--gsframe". The linker generates SFrame info for the linker-generated .plt section and merges all .sframe sections. Both objdump and readelf dump SFrame info with option "--sframe[=]". * For SFrame stack trace format, the function start address in each SFrame FDE has a changed encoding: The 32-bit signed integer now holds the offset of the start PC of the associated function from the sfde_func_start_address field itself (instead of the earlier where it was the offset from the start of the SFrame section itself). All SFrame sections generated by gas and ld now default to this new encoding, setting the (new) SFRAME_F_FDE_FUNC_START_PCREL flag. Relocatable SFrame links are now fixed. * Readelf now recognizes RISC-V GNU_PROPERTY_RISCV_FEATURE_1_CFI_SS and GNU_PROPERTY_RISCV_FEATURE_1_CFI_LP_UNLABELED for zicfiss and zicfilp extensions. * For RISC-V dis-assembler, the definition of mapping symbol $x is changed, so the file needs to be rebuilt since 2.45 once used .option arch directives. * The LoongArch disassembler now properly accepts multiple disassembly options given by -M, such as "-M no-aliases,numeric". (Previously only the first option took effect.) @ text @a0 4 2025-09-16 Rainer Orth * config.bfd : Remove. d2994 1 a2994 1 Copyright (C) 2021-2026 Free Software Foundation, Inc. @