1*c42dbd0eSchristos2020-12-19 H.J. Lu <hjl.tools@gmail.com> 2*c42dbd0eSchristos 3*c42dbd0eSchristos PR gold/27097 4*c42dbd0eSchristos * incremental.cc (Sized_relobj_incr::do_add_symbols): Move sym 5*c42dbd0eSchristos declaration just before use. 6*c42dbd0eSchristos (Sized_incr_dynobj::do_add_symbols): Likewise. 7*c42dbd0eSchristos * plugin.cc (Sized_pluginobj::do_add_symbols): Likewise. 8*c42dbd0eSchristos 9*c42dbd0eSchristos2020-12-15 Cary Coutant <ccoutant@gmail.com> 10*c42dbd0eSchristos 11*c42dbd0eSchristos * dwp.cc (class Dwo_file): Use new Ehdr::get_ei_osabi and 12*c42dbd0eSchristos get_ei_abiversion methods. 13*c42dbd0eSchristos * incremental.cc (make_sized_incremental_binary): Likewise. 14*c42dbd0eSchristos * object.cc (Sized_relobj_file::Sized_relobj_file): Likewise. 15*c42dbd0eSchristos (make_elf_sized_object): Likewise. 16*c42dbd0eSchristos * object.h (class Osabi): Make the class untemplated. 17*c42dbd0eSchristos 18*c42dbd0eSchristos2020-12-15 Vivek Das Mohapatra <vivek@collabora.com> 19*c42dbd0eSchristos 20*c42dbd0eSchristos Implement -z unique / -z nounique options. 21*c42dbd0eSchristos * layout.cc (Layout::finish_dynamic_section): Set DF_GNU_1_UNIQUE. 22*c42dbd0eSchristos * options.h (class General_options): Handle -z unique, -z nounique. 23*c42dbd0eSchristos 24*c42dbd0eSchristos2020-12-14 H.J. Lu <hjl.tools@gmail.com> 25*c42dbd0eSchristos Cary Coutant <ccoutant@gmail.com> 26*c42dbd0eSchristos 27*c42dbd0eSchristos PR gold/27039 28*c42dbd0eSchristos * layout.cc (Layout::layout): Strip SHF_GNU_RETAIN. 29*c42dbd0eSchristos * object.cc (Sized_relobj_file::Sized_relobj_file): Initialize osabi_. 30*c42dbd0eSchristos (Sized_relobj_file::do_layout): Keep SHF_GNU_RETAIN sections for 31*c42dbd0eSchristos GNU/FreBSD ELFOSABIs. 32*c42dbd0eSchristos * object.h (Osabi) New class. 33*c42dbd0eSchristos (Sized_relobj_file): Add osabi() and osabi_. 34*c42dbd0eSchristos * testsuite/Makefile.am (check_SCRIPTS): Add retain.sh. 35*c42dbd0eSchristos (check_DATA): Add retain_1.out retain_2.out. 36*c42dbd0eSchristos (MOSTLYCLEANFILES): Add retain_1 retain_2. 37*c42dbd0eSchristos (retain_1.out): New target. 38*c42dbd0eSchristos (retain_1): Likewise. 39*c42dbd0eSchristos (retain_1.o): Likewise. 40*c42dbd0eSchristos (retain_2.out): Likewise. 41*c42dbd0eSchristos (retain_2): Likewise. 42*c42dbd0eSchristos (retain_2.o): Likewise. 43*c42dbd0eSchristos * testsuite/Makefile.in: Regenerate. 44*c42dbd0eSchristos * testsuite/retain.sh: New file. 45*c42dbd0eSchristos * testsuite/retain_1.s: Likewise. 46*c42dbd0eSchristos * testsuite/retain_2.s: Likewise. 47*c42dbd0eSchristos 48*c42dbd0eSchristos2020-12-13 Cary Coutant <ccoutant@gmail.com> 49*c42dbd0eSchristos 50*c42dbd0eSchristos PR gold/23539 51*c42dbd0eSchristos PR gold/24123 52*c42dbd0eSchristos * testsuite/Makefile.am (incremental_copy_test): Re-enable for GCC 9+. 53*c42dbd0eSchristos (incremental_comdat_test_1): Likewise. 54*c42dbd0eSchristos * testsuite/Makefile.in: Regenerate. 55*c42dbd0eSchristos 56*c42dbd0eSchristos2020-12-13 Cary Coutant <ccoutant@gmail.com> 57*c42dbd0eSchristos 58*c42dbd0eSchristos PR gold/23539 59*c42dbd0eSchristos * object.cc (Sized_relobj_file::layout_gnu_property_section): Ignore 60*c42dbd0eSchristos Gnu properties during incremental links. 61*c42dbd0eSchristos 62*c42dbd0eSchristos2020-12-13 Cary Coutant <ccoutant@gmail.com> 63*c42dbd0eSchristos 64*c42dbd0eSchristos PR gold/24123 65*c42dbd0eSchristos * layout.cc (Layout::init_fixed_output_section): Mask out flags that 66*c42dbd0eSchristos should be ignored when matching sections. 67*c42dbd0eSchristos 68*c42dbd0eSchristos2020-12-07 Alan Modra <amodra@gmail.com> 69*c42dbd0eSchristos 70*c42dbd0eSchristos * plugin.cc (Plugin_recorder::init): Replace strncpy with memcpy. 71*c42dbd0eSchristos 72*c42dbd0eSchristos2020-12-03 Alan Modra <amodra@gmail.com> 73*c42dbd0eSchristos 74*c42dbd0eSchristos * testsuite/Makefile.am (pr26936a.o): Pass -mx86-used-note=yes. 75*c42dbd0eSchristos (pr26936b.o, pr26936c.o, pr26936d.o): Likewise. 76*c42dbd0eSchristos * testsuite/Makefile.in: Regenerate. 77*c42dbd0eSchristos 78*c42dbd0eSchristos2020-11-29 H.J. Lu <hongjiu.lu@intel.com> 79*c42dbd0eSchristos 80*c42dbd0eSchristos PR ld/26972 81*c42dbd0eSchristos * x86_64.cc (Output_data_plt_x86_64_ibt::tlsdesc_plt_entry): Add 82*c42dbd0eSchristos endbr64. 83*c42dbd0eSchristos (Output_data_plt_x86_64_ibt::do_fill_tlsdesc_entry): Adjusted. 84*c42dbd0eSchristos 85*c42dbd0eSchristos2020-11-29 H.J. Lu <hongjiu.lu@intel.com> 86*c42dbd0eSchristos 87*c42dbd0eSchristos PR gold/26939 88*c42dbd0eSchristos * x86_64.cc (Target_x86_64<size>::Scan::local): Check 89*c42dbd0eSchristos get_r_addend() == -4 for GOTPCRELX conversion. 90*c42dbd0eSchristos (Target_x86_64<size>::Scan::global): Likewise. 91*c42dbd0eSchristos (Target_x86_64<size>::Relocate::relocate): Likewise. 92*c42dbd0eSchristos * testsuite/Makefile.am (check_DATA): Add 93*c42dbd0eSchristos x86_64_mov_to_lea15.stdout and x86_64_mov_to_lea16.stdout. 94*c42dbd0eSchristos (MOSTLYCLEANFILES): Add x86_64_mov_to_lea15 and 95*c42dbd0eSchristos x86_64_mov_to_lea16. 96*c42dbd0eSchristos (x86_64_mov_to_lea9.o): New target. 97*c42dbd0eSchristos (x86_64_mov_to_lea10.o): Likewise. 98*c42dbd0eSchristos (x86_64_mov_to_lea15): Likewise. 99*c42dbd0eSchristos (x86_64_mov_to_lea16): Likewise. 100*c42dbd0eSchristos (x86_64_mov_to_lea15.stdout): Likewise. 101*c42dbd0eSchristos (x86_64_mov_to_lea16.stdout): Likewise. 102*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 103*c42dbd0eSchristos * testsuite/x86_64_mov_to_lea.sh: Updated. 104*c42dbd0eSchristos * testsuite/x86_64_mov_to_lea5.s: New file. 105*c42dbd0eSchristos 106*c42dbd0eSchristos2020-11-29 H.J. Lu <hongjiu.lu@intel.com> 107*c42dbd0eSchristos 108*c42dbd0eSchristos PR gold/26937 109*c42dbd0eSchristos * object.cc (Sized_relobj_file::map_to_kept_section): Get the 110*c42dbd0eSchristos section index for linkonce section. Also check the single 111*c42dbd0eSchristos comdat section. 112*c42dbd0eSchristos * testsuite/Makefile.am (check_SCRIPTS): Add pr26936.sh. 113*c42dbd0eSchristos (check_DATA): Add pr26936a.stdout and pr26936b.stdout. 114*c42dbd0eSchristos (MOSTLYCLEANFILES): Add pr26936a and pr26936b. 115*c42dbd0eSchristos (pr26936a.stdout): New target. 116*c42dbd0eSchristos (pr26936a): Likewise. 117*c42dbd0eSchristos (pr26936b.stdout): Likewise. 118*c42dbd0eSchristos (pr26936b): Likewise. 119*c42dbd0eSchristos (pr26936a.o): Likewise. 120*c42dbd0eSchristos (pr26936b.o): Likewise. 121*c42dbd0eSchristos (pr26936c.o): Likewise. 122*c42dbd0eSchristos (pr26936d.o): Likewise. 123*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 124*c42dbd0eSchristos * testsuite/pr26936.sh: New file. 125*c42dbd0eSchristos * testsuite/pr26936a.s: Likewise. 126*c42dbd0eSchristos * testsuite/pr26936b.s: Likewise. 127*c42dbd0eSchristos * testsuite/pr26936c.s: Likewise. 128*c42dbd0eSchristos * testsuite/pr26936d.s: Likewise. 129*c42dbd0eSchristos 130*c42dbd0eSchristos2020-11-17 Alan Modra <amodra@gmail.com> 131*c42dbd0eSchristos 132*c42dbd0eSchristos * powerpc.cc (Target_powerpc::no_tprel_opt_): Rename from tprel_opt_. 133*c42dbd0eSchristos Init to false. 134*c42dbd0eSchristos (Target_powerpc::tprel_opt): Test parameters->options().tls_optimize(). 135*c42dbd0eSchristos (Target_powerpc::set_tprel_opt): Delete. 136*c42dbd0eSchristos (Target_powerpc::set_no_tprel_opt): New function. Update all uses 137*c42dbd0eSchristos of set_tprel_opt. 138*c42dbd0eSchristos 139*c42dbd0eSchristos2020-11-16 Michael Hudson-Doyle <michael.hudson@canonical.com> 140*c42dbd0eSchristos 141*c42dbd0eSchristos PR 26902 142*c42dbd0eSchristos * powerpc.cc (Relocate::relocate): Do not include local entry 143*c42dbd0eSchristos offset of target function when computing the address of a stub. 144*c42dbd0eSchristos 145*c42dbd0eSchristos2020-11-08 H.J. Lu <hongjiu.lu@intel.com> 146*c42dbd0eSchristos 147*c42dbd0eSchristos PR gold/26200 148*c42dbd0eSchristos * plugin.cc (Plugin_manager::claim_file): Don't share Plugin_list 149*c42dbd0eSchristos iterator. 150*c42dbd0eSchristos (Plugin_manager::all_symbols_read): Likewise. 151*c42dbd0eSchristos (Plugin_manager::cleanup): Likewise. 152*c42dbd0eSchristos 153*c42dbd0eSchristos2020-11-03 Alan Modra <amodra@gmail.com> 154*c42dbd0eSchristos 155*c42dbd0eSchristos * powerpc.cc (Target_powerpc::tocsave_loc): Return a pointer. 156*c42dbd0eSchristos (Target_powerpc::Relocate::relocate): Avoid -Wdangling-gsl error. 157*c42dbd0eSchristos 158*c42dbd0eSchristos2020-11-03 Nick Gasson <nick.gasson@arm.com> 159*c42dbd0eSchristos 160*c42dbd0eSchristos PR 26827 161*c42dbd0eSchristos * fileread.cc (File_read::open): Ensure file_counts_lock is 162*c42dbd0eSchristos initialized. 163*c42dbd0eSchristos * testsuite/Makefile.am (check_PROGRAMS): Add a test that passes 164*c42dbd0eSchristos -Wl,--threads. 165*c42dbd0eSchristos * testsuite/Makefile.in: Regenerate. 166*c42dbd0eSchristos 167*c42dbd0eSchristos2020-10-30 H.J. Lu <hongjiu.lu@intel.com> 168*c42dbd0eSchristos 169*c42dbd0eSchristos * testsuite/gnu_property_test.sh: Updated. 170*c42dbd0eSchristos 171*c42dbd0eSchristos2020-10-22 H.J. Lu <hongjiu.lu@intel.com> 172*c42dbd0eSchristos 173*c42dbd0eSchristos * Makefile.am (bootstrap-test): Skip for LTO build. 174*c42dbd0eSchristos (bootstrap-test-r): Likewise. 175*c42dbd0eSchristos 176*c42dbd0eSchristos2020-10-13 H.J. Lu <hongjiu.lu@intel.com> 177*c42dbd0eSchristos 178*c42dbd0eSchristos PR gold/23539 179*c42dbd0eSchristos * configure.ac: Check for GCC 9 or later and for -fcf-protection. 180*c42dbd0eSchristos * configure: Regenerated. 181*c42dbd0eSchristos * testsuite/Makefile.am (check_PROGRAMS): Skip incremental_test_2, 182*c42dbd0eSchristos incremental_test_3, incremental_test_4, incremental_test_5, 183*c42dbd0eSchristos incremental_copy_test, incremental_common_test_1 and 184*c42dbd0eSchristos incremental_comdat_test_1 for -fcf-protection. Also Skip 185*c42dbd0eSchristos incremental_copy_test and incremental_comdat_test_1 for GCC 9 or 186*c42dbd0eSchristos later. 187*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 188*c42dbd0eSchristos 189*c42dbd0eSchristos2020-10-13 H.J. Lu <hongjiu.lu@intel.com> 190*c42dbd0eSchristos 191*c42dbd0eSchristos PR gold/23503 192*c42dbd0eSchristos * testsuite/Makefile.am (justsyms_lib): Pass 193*c42dbd0eSchristos -T $(srcdir)/justsyms_lib.t to gold. 194*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 195*c42dbd0eSchristos * testsuite/justsyms_lib.t: New file. 196*c42dbd0eSchristos * testsuite/script_test_10.t: Discard .note.gnu.property section. 197*c42dbd0eSchristos 198*c42dbd0eSchristos2020-10-13 H.J. Lu <hongjiu.lu@intel.com> 199*c42dbd0eSchristos 200*c42dbd0eSchristos * x86_64.cc (Target_x86_64::Target_x86_64): Initialize 201*c42dbd0eSchristos feature_2_used_, feature_2_needed_ and object_feature_2_used_. 202*c42dbd0eSchristos (Target_x86_64::feature_2_used_): New data member. 203*c42dbd0eSchristos (Target_x86_64::feature_2_needed_): Likewise. 204*c42dbd0eSchristos (Target_x86_64::object_isa_1_used_): Likewise. 205*c42dbd0eSchristos (Target_x86_64::record_gnu_property): Support 206*c42dbd0eSchristos GNU_PROPERTY_X86_COMPAT_ISA_1_USED, 207*c42dbd0eSchristos GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED, 208*c42dbd0eSchristos GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED, 209*c42dbd0eSchristos GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED, 210*c42dbd0eSchristos GNU_PROPERTY_X86_FEATURE_2_USED and 211*c42dbd0eSchristos GNU_PROPERTY_X86_FEATURE_2_NEEDED. 212*c42dbd0eSchristos (Target_x86_64::merge_gnu_properties): Merge FEATURE_2_USED bits. 213*c42dbd0eSchristos Initialize object_feature_2_used_. 214*c42dbd0eSchristos (Target_x86_64::do_finalize_gnu_properties): Support 215*c42dbd0eSchristos GNU_PROPERTY_X86_FEATURE_2_USED and 216*c42dbd0eSchristos GNU_PROPERTY_X86_FEATURE_2_NEEDED. 217*c42dbd0eSchristos * testsuite/gnu_property_a.S (GNU_PROPERTY_X86_ISA_1_USED): Set 218*c42dbd0eSchristos to 0xc0010002. 219*c42dbd0eSchristos (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002. 220*c42dbd0eSchristos * testsuite/gnu_property_b.S (GNU_PROPERTY_X86_ISA_1_USED): Set 221*c42dbd0eSchristos to 0xc0010002. 222*c42dbd0eSchristos (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002. 223*c42dbd0eSchristos * testsuite/gnu_property_c.S (GNU_PROPERTY_X86_ISA_1_USED): Set 224*c42dbd0eSchristos to 0xc0010002. 225*c42dbd0eSchristos (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002. 226*c42dbd0eSchristos * testsuite/gnu_property_test.sh: Updated. 227*c42dbd0eSchristos 228*c42dbd0eSchristos2020-10-13 H.J. Lu <hongjiu.lu@intel.com> 229*c42dbd0eSchristos 230*c42dbd0eSchristos PR gold/22914 231*c42dbd0eSchristos PR gold/23535 232*c42dbd0eSchristos * layout.cc (Layout::attach_allocated_section_to_segment): Place 233*c42dbd0eSchristos a note section in a PT_NOTE segment with the same alignment. Set 234*c42dbd0eSchristos the alignment of the PT_NOTE segment from the alignment of the 235*c42dbd0eSchristos note section. 236*c42dbd0eSchristos (Layout::create_note): Align the NT_GNU_PROPERTY_TYPE_0 note to 8 237*c42dbd0eSchristos bytes for 64-bit ELF. 238*c42dbd0eSchristos (Layout::segment_precedes): Place segments with larger alignments 239*c42dbd0eSchristos first. 240*c42dbd0eSchristos * output.cc (Output_segment::Output_segment): Initialize align_. 241*c42dbd0eSchristos * output.h (Output_segment): Add align, set_align and align_. 242*c42dbd0eSchristos * testsuite/Makefile.am (gnu_property_test.stdout): Pass -lhSWn 243*c42dbd0eSchristos to $(TEST_READELF). 244*c42dbd0eSchristos (gnu_property_test): Pass --build-id to ld. 245*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 246*c42dbd0eSchristos * testsuite/gnu_property_test.sh (check_alignment): New. 247*c42dbd0eSchristos Use check_alignment to check the NT_GNU_PROPERTY_TYPE_0 note 248*c42dbd0eSchristos alignment. Verify that there are 2 PT_NOTE segments. 249*c42dbd0eSchristos 250*c42dbd0eSchristos2020-10-13 H.J. Lu <hongjiu.lu@intel.com> 251*c42dbd0eSchristos 252*c42dbd0eSchristos PR gold/21452 253*c42dbd0eSchristos * x86_64.cc (Scan::local_reloc_may_be_function_pointer): Remove 254*c42dbd0eSchristos check for shared library. 255*c42dbd0eSchristos (Scan::global_reloc_may_be_function_pointer): Remove check for 256*c42dbd0eSchristos shared library and symbol visibility. 257*c42dbd0eSchristos * testsuite/icf_safe_so_test.cc (bar_static): New function. 258*c42dbd0eSchristos (main): Take function address of bar_static and use it. 259*c42dbd0eSchristos * testsuite/icf_safe_so_test.sh (arch_specific_safe_fold): Also 260*c42dbd0eSchristos check fold on x86-64. Check bar_static isn't folded. 261*c42dbd0eSchristos 262*c42dbd0eSchristos2020-10-13 H.J. Lu <hongjiu.lu@intel.com> 263*c42dbd0eSchristos 264*c42dbd0eSchristos * icf.cc (Icf::find_identical_sections): Skip zero-sized sections. 265*c42dbd0eSchristos 266*c42dbd0eSchristos2020-10-09 Alan Modra <amodra@gmail.com> 267*c42dbd0eSchristos 268*c42dbd0eSchristos * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do 269*c42dbd0eSchristos local entry offset optimisation for lplt_section. 270*c42dbd0eSchristos (Target_powerpc::Branch_info::make_stub): Don't add local 271*c42dbd0eSchristos entry offset to long branch dest passed to 272*c42dbd0eSchristos add_long_branch_entry. Do pass st_other bits. 273*c42dbd0eSchristos (Stub_table::Branch_stub_ent): Add "other_" field. 274*c42dbd0eSchristos (Stub_table::add_long_branch_entry): Add "other" param, and 275*c42dbd0eSchristos save. 276*c42dbd0eSchristos (Stub_table::branch_stub_size): Adjust long branch offset. 277*c42dbd0eSchristos (Stub_table::do_write): Likewise. 278*c42dbd0eSchristos (Target_powerpc::Relocate::relocate): Likewise. 279*c42dbd0eSchristos 280*c42dbd0eSchristos2020-10-09 Alan Modra <amodra@gmail.com> 281*c42dbd0eSchristos 282*c42dbd0eSchristos * powerpc.cc (is_got_reloc): New function. 283*c42dbd0eSchristos (Target_powerpc::Relocate::relocate): Use it here, exclude GOT 284*c42dbd0eSchristos relocs when looking for stubs. 285*c42dbd0eSchristos 286*c42dbd0eSchristos2020-10-08 H.J. Lu <hongjiu.lu@intel.com> 287*c42dbd0eSchristos 288*c42dbd0eSchristos * testsuite/split_i386.sh: Updated for --split-stack-adjust-size 289*c42dbd0eSchristos default change. 290*c42dbd0eSchristos * testsuite/split_x86_64.sh: Likewise. 291*c42dbd0eSchristos 292*c42dbd0eSchristos2020-10-08 Alan Modra <amodra@gmail.com> 293*c42dbd0eSchristos 294*c42dbd0eSchristos * options.h (split_stack_adjust_size): Default to 0x100000. 295*c42dbd0eSchristos 296*c42dbd0eSchristos2020-09-26 Alan Modra <amodra@gmail.com> 297*c42dbd0eSchristos 298*c42dbd0eSchristos * powerpc.cc (Target_powerpc): Rename power10_stubs_ to 299*c42dbd0eSchristos power10_relocs_. 300*c42dbd0eSchristos (Target_powerpc::set_power10_relocs): New accessor. 301*c42dbd0eSchristos (Target_powerpc::set_power10_stubs): Delete. 302*c42dbd0eSchristos (Target_powerpc::power10_stubs): Adjust. 303*c42dbd0eSchristos (Target_powerpc::has_localentry0): New accessor. 304*c42dbd0eSchristos (ld_0_11): New constant. 305*c42dbd0eSchristos (glink_eh_frame_fde_64v1, glink_eh_frame_fde_64v2): Adjust. 306*c42dbd0eSchristos (glink_eh_frame_fde_64v2_localentry0): New. 307*c42dbd0eSchristos (Output_data_glink::pltresolve_size): Update. 308*c42dbd0eSchristos (Output_data_glink::add_eh_frame): Use localentry0 version eh_frame. 309*c42dbd0eSchristos (Output_data_glink::do_write): Move r2 save to start of ELFv2 stub 310*c42dbd0eSchristos and only emit for has_localentry0. Don't use r2 in the stub. 311*c42dbd0eSchristos (Target_powerpc::Scan::local, global): Adjust for 312*c42dbd0eSchristos set_power10_relocs renaming. 313*c42dbd0eSchristos (Target_powerpc::scan_relocs): Warn and reset plt_localentry0_. 314*c42dbd0eSchristos 315*c42dbd0eSchristos2020-09-24 Alan Modra <amodra@gmail.com> 316*c42dbd0eSchristos 317*c42dbd0eSchristos * powerpc.cc (Target_powerpc::Relocate::relocate): Don't skip 318*c42dbd0eSchristos first insn of __tls_get_addr_opt stub. 319*c42dbd0eSchristos 320*c42dbd0eSchristos2020-08-24 Alan Modra <amodra@gmail.com> 321*c42dbd0eSchristos 322*c42dbd0eSchristos * powerpc.cc (Target_powerpc): Add tprel_opt_ and accessors. 323*c42dbd0eSchristos (Target_powerpc::Scan::local): Sanity check tprel high relocs. 324*c42dbd0eSchristos (Target_powerpc::Scan::global): Likewise. 325*c42dbd0eSchristos (Target_powerpc::Relocate::relocate): Control tprel optimisation 326*c42dbd0eSchristos with tprel_opt_ and enable for 32-bit. 327*c42dbd0eSchristos 328*c42dbd0eSchristos2020-08-12 Nick Clifton <nickc@redhat.com> 329*c42dbd0eSchristos 330*c42dbd0eSchristos * po/sr.po: Updated Serbian translation. 331*c42dbd0eSchristos 332*c42dbd0eSchristos2020-07-27 Alan Modra <amodra@gmail.com> 333*c42dbd0eSchristos 334*c42dbd0eSchristos * options.h (DEFINE_enum): Add optional_arg__ param, adjust 335*c42dbd0eSchristos all uses. 336*c42dbd0eSchristos (General_options): Add --power10-stubs and --no-power10-stubs. 337*c42dbd0eSchristos * options.cc (General_options::parse_no_power10_stubs): New. 338*c42dbd0eSchristos (General_options::finalize): Handle --power10-stubs. 339*c42dbd0eSchristos * powerpc.cc (set_power10_stubs): Don't set when --power10-stubs=no. 340*c42dbd0eSchristos (power10_stubs_auto): New. 341*c42dbd0eSchristos (struct Plt_stub_ent): Add toc_ and tocoff_. Don't use a bitfield 342*c42dbd0eSchristos for indx_. 343*c42dbd0eSchristos (struct Branch_stub_ent): Add toc_and tocoff_. Use bitfields for 344*c42dbd0eSchristos iter_, notoc_ and save_res_. 345*c42dbd0eSchristos (add_plt_call_entry): Set toc_. Adjust resizing conditions for 346*c42dbd0eSchristos --power10-stubs=auto. 347*c42dbd0eSchristos (add_long_branch_entry): Set toc_. 348*c42dbd0eSchristos (add_eh_frame, define_stub_syms): No longer use const_iterators 349*c42dbd0eSchristos for plt and long branch stub iteration. 350*c42dbd0eSchristos (build_tls_opt_head, build_tls_opt_tail): Change parameters and 351*c42dbd0eSchristos return value. Move tests for __tls_get_addr to callers. 352*c42dbd0eSchristos (plt_call_size): Handle --power10-stubs=auto. 353*c42dbd0eSchristos (branch_stub_size): Likewise. 354*c42dbd0eSchristos (Stub_table::do_write): Likewise. 355*c42dbd0eSchristos (relocate): Likewise. 356*c42dbd0eSchristos 357*c42dbd0eSchristos2020-07-19 H.J. Lu <hongjiu.lu@intel.com> 358*c42dbd0eSchristos 359*c42dbd0eSchristos * testsuite/bnd_ifunc_1.sh: Updated. 360*c42dbd0eSchristos * testsuite/bnd_plt_1.sh: Likewise. 361*c42dbd0eSchristos * testsuite/split_x32.sh: Likewise. 362*c42dbd0eSchristos * testsuite/split_x86_64.sh: Likewise. 363*c42dbd0eSchristos * testsuite/x86_64_indirect_call_to_direct.sh: Likewise. 364*c42dbd0eSchristos 365*c42dbd0eSchristos2020-07-08 Nick Clifton <nickc@redhat.com> 366*c42dbd0eSchristos 367*c42dbd0eSchristos * testsuite/script_test_7.sh: Adjust expected address of the .bss 368*c42dbd0eSchristos section. 369*c42dbd0eSchristos * testsuite/script_test_9.sh: Do not expect the .init section to 370*c42dbd0eSchristos immediately follow the .text section in the mapping of sections to 371*c42dbd0eSchristos segments. 372*c42dbd0eSchristos 373*c42dbd0eSchristos2020-07-07 Nick Clifton <nickc@redhat.com> 374*c42dbd0eSchristos 375*c42dbd0eSchristos * target-reloc.h: (Default_comdat_behaviour:get): Ignore discarded 376*c42dbd0eSchristos relocs that refer to the .gnu.build.attributes section. 377*c42dbd0eSchristos 378*c42dbd0eSchristos2020-07-06 Nick Clifton <nickc@redhat.com> 379*c42dbd0eSchristos 380*c42dbd0eSchristos * po/fr.po: Updated French translation. 381*c42dbd0eSchristos * po/uk.po: Updated Ukranian translation. 382*c42dbd0eSchristos 383*c42dbd0eSchristos2020-07-04 Nick Clifton <nickc@redhat.com> 384*c42dbd0eSchristos 385*c42dbd0eSchristos Binutils 2.35 branch created. 386*c42dbd0eSchristos 387*c42dbd0eSchristos2020-07-03 Alan Modra <amodra@gmail.com> 388*c42dbd0eSchristos 389*c42dbd0eSchristos PR 26028 390*c42dbd0eSchristos * testsuite/Makefile.am (file_in_many_sections.stdout): Add -W 391*c42dbd0eSchristos to readelf options. 392*c42dbd0eSchristos * testsuite/Makefile.in: Regenerate. 393*c42dbd0eSchristos 394*c42dbd0eSchristos2020-06-26 Nick Alcock <nick.alcock@oracle.com> 395*c42dbd0eSchristos 396*c42dbd0eSchristos * configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls. 397*c42dbd0eSchristos * configure: Regenerated. 398*c42dbd0eSchristos * config.h.in: Likewise. 399*c42dbd0eSchristos 400*c42dbd0eSchristos2020-06-24 Nick Clifton <nickc@redhat.com> 401*c42dbd0eSchristos 402*c42dbd0eSchristos * target-reloc.h (issue_discarded_error): Initialise the 403*c42dbd0eSchristos key_symndx variable. 404*c42dbd0eSchristos 405*c42dbd0eSchristos2020-06-23 Roland McGrath <mcgrathr@google.com> 406*c42dbd0eSchristos 407*c42dbd0eSchristos PR 22843 408*c42dbd0eSchristos * options.h (class General_options): Add --dependency-file option. 409*c42dbd0eSchristos * fileread.cc (File_read::files_read): New static variable. 410*c42dbd0eSchristos (File_read::open): Add the file to the files_read list. 411*c42dbd0eSchristos (File_read::record_file_read): New static member function. 412*c42dbd0eSchristos (File_read::write_dependency_file): New static member function. 413*c42dbd0eSchristos * fileread.h (class File_read): Declare them. 414*c42dbd0eSchristos * layout.cc (Layout::read_layout_from_file): Call record_file_read. 415*c42dbd0eSchristos (Close_task_runner::run): Call write_dependency_file if 416*c42dbd0eSchristos --dependency-file was passed. 417*c42dbd0eSchristos 418*c42dbd0eSchristos2020-06-18 Fangrui Song <i@maskray.me> 419*c42dbd0eSchristos 420*c42dbd0eSchristos PR gold/26039 421*c42dbd0eSchristos * layout.cc (Layout::finish_dynamic_section): Set DF_1_PIE. 422*c42dbd0eSchristos 423*c42dbd0eSchristos2020-06-16 Alan Modra <amodra@gmail.com> 424*c42dbd0eSchristos 425*c42dbd0eSchristos * testsuite/discard_locals_test.c: Replace uses of asm with __asm__. 426*c42dbd0eSchristos * testsuite/discard_locals_relocatable_test.c: Likewise. 427*c42dbd0eSchristos 428*c42dbd0eSchristos2020-06-16 Alan Modra <amodra@gmail.com> 429*c42dbd0eSchristos 430*c42dbd0eSchristos * testsuite/Makefile.am (export_dynamic_plugin.o): Use CXXCOMPILE. 431*c42dbd0eSchristos (plugin_test_wrap_symbols_1.o): Likewise. 432*c42dbd0eSchristos (plugin_test_wrap_symbols_2.o): Likewise. 433*c42dbd0eSchristos * testsuite/Makefile.in: Regenerate. 434*c42dbd0eSchristos 435*c42dbd0eSchristos2020-06-15 Roland McGrath <mcgrathr@google.com> 436*c42dbd0eSchristos 437*c42dbd0eSchristos Implement -z start-stop-visibility=... option. 438*c42dbd0eSchristos * options.h (class General_options): Handle -z start-stop-visibility=. 439*c42dbd0eSchristos (General_options::start_stop_visibility_enum): New public method. 440*c42dbd0eSchristos (General_options::set_start_stop_visibility_enum): New private method. 441*c42dbd0eSchristos (General_options::start_stop_visibility_enum_): New private member. 442*c42dbd0eSchristos * options.cc (General_options::General_options): Add initializer. 443*c42dbd0eSchristos (General_options::finalize): Set this->start_stop_visibility_enum_ 444*c42dbd0eSchristos from string value. 445*c42dbd0eSchristos * layout.cc (Layout::define_section_symbols): Use option setting. 446*c42dbd0eSchristos 447*c42dbd0eSchristos2020-06-06 Alan Modra <amodra@gmail.com> 448*c42dbd0eSchristos 449*c42dbd0eSchristos * powerpc.cc: Update throughout for reloc renaming. 450*c42dbd0eSchristos 451*c42dbd0eSchristos2020-05-22 Alan Modra <amodra@gmail.com> 452*c42dbd0eSchristos 453*c42dbd0eSchristos PR 25882 454*c42dbd0eSchristos * powerpc.cc (merge_object_attributes): Replace name param with 455*c42dbd0eSchristos obj param. Update callers. Don't init FP attributes from shared 456*c42dbd0eSchristos libraries, and do not emit an error if they don't match. 457*c42dbd0eSchristos 458*c42dbd0eSchristos2020-05-15 Nikita Ermakov <coffe92@gmail.com> 459*c42dbd0eSchristos 460*c42dbd0eSchristos * powerpc.cc (do_gc_mark_symbol): Don't segfault on plugin symbols. 461*c42dbd0eSchristos 462*c42dbd0eSchristos2020-05-14 Nick Clifton <nickc@redhat.com> 463*c42dbd0eSchristos 464*c42dbd0eSchristos * po/sr.po: New Serbian translation. 465*c42dbd0eSchristos 466*c42dbd0eSchristos2020-05-11 Alan Modra <amodra@gmail.com> 467*c42dbd0eSchristos 468*c42dbd0eSchristos * powerpc.cc: Rename powerxx to power10 throughout. 469*c42dbd0eSchristos 470*c42dbd0eSchristos2020-05-02 H.J. Lu <hongjiu.lu@intel.com> 471*c42dbd0eSchristos 472*c42dbd0eSchristos PR gold/25904 473*c42dbd0eSchristos * testsuite/Makefile.am (COMMON_TEST_C_CFLAGS): New. 474*c42dbd0eSchristos (common_test_1.o): New rule. 475*c42dbd0eSchristos (common_test_2.o): Likewise. 476*c42dbd0eSchristos (common_test_3.o): Likewise. 477*c42dbd0eSchristos (plugin_common_test_1.o): Likewise. 478*c42dbd0eSchristos (plugin_common_test_2.o): Likewise. 479*c42dbd0eSchristos (common_test_1_v1.o): Likewise. 480*c42dbd0eSchristos (common_test_1_v2.o): Likewise. 481*c42dbd0eSchristos (common_test_2_pic.o): Compile with $(COMMON_TEST_C_CFLAGS). 482*c42dbd0eSchristos (common_test_3_pic.o): Likewise. 483*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 484*c42dbd0eSchristos 485*c42dbd0eSchristos2020-05-01 H.J. Lu <hongjiu.lu@intel.com> 486*c42dbd0eSchristos 487*c42dbd0eSchristos PR gold/25426 488*c42dbd0eSchristos * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie): 489*c42dbd0eSchristos For x32, relax "rex leal foo@tlsdesc(%rip), %reg" to 490*c42dbd0eSchristos "rex movl foo@gottpoff(%rip), %eax" and relax ""call *(%eax)" 491*c42dbd0eSchristos to "nopl (%rax)". 492*c42dbd0eSchristos (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): For x32, 493*c42dbd0eSchristos relax "rex leal foo@tlsdesc(%rip), %reg" to 494*c42dbd0eSchristos "rex movl foo@tpoff, %eax" and relax "call *foo@tlscall(%eax)" 495*c42dbd0eSchristos to "nopl (%rax)". 496*c42dbd0eSchristos * testsuite/Makefile.am (tls_test_gnu2.o): Depend on 497*c42dbd0eSchristos gcctestdir/as. 498*c42dbd0eSchristos (tls_test_file2_gnu2.o): Likewise. 499*c42dbd0eSchristos (tls_test_c_gnu2.o): Likewise. 500*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 501*c42dbd0eSchristos 502*c42dbd0eSchristos2020-05-01 H.J. Lu <hongjiu.lu@intel.com> 503*c42dbd0eSchristos 504*c42dbd0eSchristos PR gold/25473 505*c42dbd0eSchristos * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie): 506*c42dbd0eSchristos Properly check r8 - r15 in "lea foo@TLSDESC(%rip), %reg". 507*c42dbd0eSchristos (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): Properly 508*c42dbd0eSchristos relax r8 - r15 in "lea foo@TLSDESC(%rip), %reg". 509*c42dbd0eSchristos * testsuite/Makefile.am (check_SCRIPTS): Add x86_64_gd_to_le.sh. 510*c42dbd0eSchristos (check_DATA): Add x86_64_gd_to_le.stdout. 511*c42dbd0eSchristos (MOSTLYCLEANFILES): Add x86_64_gd_to_le. 512*c42dbd0eSchristos (x86_64_gd_to_le.o): New target. 513*c42dbd0eSchristos (x86_64_gd_to_le): Likewise. 514*c42dbd0eSchristos (x86_64_gd_to_le.stdout): Likewise. 515*c42dbd0eSchristos * testsuite/Makefile.in: Regenerated. 516*c42dbd0eSchristos * testsuite/x86_64_gd_to_le.s: New file. 517*c42dbd0eSchristos * testsuite/x86_64_gd_to_le.sh: Likewise. 518*c42dbd0eSchristos 519*c42dbd0eSchristos2020-05-01 H.J. Lu <hongjiu.lu@intel.com> 520*c42dbd0eSchristos 521*c42dbd0eSchristos * testsuite/odr_violation2.cc (Ordering::operator()): Make 522*c42dbd0eSchristos expression even more complex. 523*c42dbd0eSchristos 524*c42dbd0eSchristos2020-05-01 H.J. Lu <hongjiu.lu@intel.com> 525*c42dbd0eSchristos 526*c42dbd0eSchristos * testsuite/ver_test_pr16504.sh: Updated. 527*c42dbd0eSchristos 528*c42dbd0eSchristos2020-05-01 H.J. Lu <hongjiu.lu@intel.com> 529*c42dbd0eSchristos 530*c42dbd0eSchristos PR gold/25872 531*c42dbd0eSchristos * x86_64.cc (Output_data_plt_x86_64_bnd::do_write): Increment 532*c42dbd0eSchristos plt_offset after setting the reserved TLSDESC PLT entry. 533*c42dbd0eSchristos (Output_data_plt_x86_64_ibt<size>::do_write): Likewise. 534*c42dbd0eSchristos 535*c42dbd0eSchristos2020-05-01 H.J. Lu <hongjiu.lu@intel.com> 536*c42dbd0eSchristos 537*c42dbd0eSchristos PR gold/25872 538*c42dbd0eSchristos * x86_64.cc (Output_data_plt_x86_64_bnd::do_address_for_local): 539*c42dbd0eSchristos Handle local IFUNC symbol. 540*c42dbd0eSchristos (Output_data_plt_x86_64_ibt::do_address_for_local): Likewise. 541*c42dbd0eSchristos 542*c42dbd0eSchristos2020-03-19 Fangrui Song <maskray@google.com> 543*c42dbd0eSchristos 544*c42dbd0eSchristos * options.h (General_options): Add --no-rosegment option. 545*c42dbd0eSchristos 546*c42dbd0eSchristos2020-02-24 Nick Clifton <nickc@redhat.com> 547*c42dbd0eSchristos 548*c42dbd0eSchristos * po/fr.po: Update French translation. 549*c42dbd0eSchristos 550*c42dbd0eSchristos2020-01-20 Nick Clifton <nickc@redhat.com> 551*c42dbd0eSchristos 552*c42dbd0eSchristos * po/uk.po: Updated Ukranian translation. 553*c42dbd0eSchristos 554*c42dbd0eSchristos2020-01-18 Nick Clifton <nickc@redhat.com> 555*c42dbd0eSchristos 556*c42dbd0eSchristos * configure: Regenerate. 557*c42dbd0eSchristos * po/gold.pot: Regenerate. 558*c42dbd0eSchristos 559*c42dbd0eSchristos2020-01-18 Nick Clifton <nickc@redhat.com> 560*c42dbd0eSchristos 561*c42dbd0eSchristos Binutils 2.34 branch created. 562*c42dbd0eSchristos 563*c42dbd0eSchristos2020-01-01 Alan Modra <amodra@gmail.com> 564*c42dbd0eSchristos 565*c42dbd0eSchristos Update year range in copyright notice of all files. 566*c42dbd0eSchristos 567*c42dbd0eSchristosFor older changes see ChangeLog-2019 568*c42dbd0eSchristos 569*c42dbd0eSchristosCopyright (C) 2020 Free Software Foundation, Inc. 570*c42dbd0eSchristos 571*c42dbd0eSchristosCopying and distribution of this file, with or without modification, 572*c42dbd0eSchristosare permitted in any medium without royalty provided the copyright 573*c42dbd0eSchristosnotice and this notice are preserved. 574*c42dbd0eSchristos 575*c42dbd0eSchristosLocal Variables: 576*c42dbd0eSchristosmode: change-log 577*c42dbd0eSchristosleft-margin: 8 578*c42dbd0eSchristosfill-column: 74 579*c42dbd0eSchristosversion-control: never 580*c42dbd0eSchristosEnd: 581