1*6f4ced0bSchristos2019-11-26 Martin Liska <mliska@suse.cz> 2*6f4ced0bSchristos 3*6f4ced0bSchristos * layout.cc (Layout::special_ordering_of_input_section): 4*6f4ced0bSchristos Add ".text.sorted". 5*6f4ced0bSchristos * output.cc: Special case ".text.sorted". 6*6f4ced0bSchristos * testsuite/section_sorting_name.cc: Cover also .text.sorted 7*6f4ced0bSchristos subsections. 8*6f4ced0bSchristos * testsuite/section_sorting_name.sh: Likewise. 9*6f4ced0bSchristos 10*6f4ced0bSchristos2019-11-19 Alan Modra <amodra@gmail.com> 11*6f4ced0bSchristos 12*6f4ced0bSchristos PR 24853 13*6f4ced0bSchristos * symtab.h (set_has_gnu_output, has_gnu_output_): New. 14*6f4ced0bSchristos * symtab.cc (Symbol_table::Symbol_table): Init has_gnu_output_. 15*6f4ced0bSchristos (Symbol_table::finalize): Set ELFOSABI_GNU when has_gnu_output_. 16*6f4ced0bSchristos (Symbol_table::set_dynsym_indexes, Symbol_table::sized_finalize): 17*6f4ced0bSchristos Call set_has_gnu_output for STT_GNU_IFUNC and STB_GNU_UNIQUE globals. 18*6f4ced0bSchristos * object.cc (Sized_relobj_file::do_finalize_local_symbols): Call 19*6f4ced0bSchristos set_has_gnu_output when STT_GNU_IFUNC locals will be output. 20*6f4ced0bSchristos 21*6f4ced0bSchristos2019-11-11 Miguel Saldivar <saldivarcher@gmail.com> 22*6f4ced0bSchristos 23*6f4ced0bSchristos PR 24996 24*6f4ced0bSchristos * expression.cc (Trinary_expression::arg2_value): Use correct integer 25*6f4ced0bSchristos expression when calling "eval_maybe_dot" method. 26*6f4ced0bSchristos (Trinary_expression::arg3_value): Likewise. 27*6f4ced0bSchristos 28*6f4ced0bSchristos2019-09-28 Alan Modra <amodra@gmail.com> 29*6f4ced0bSchristos 30*6f4ced0bSchristos PR 16794 31*6f4ced0bSchristos * i386.cc (Target_i386::Relocate::relocate <R_386_GOTOFF>): Don't 32*6f4ced0bSchristos ignore addend, apply using pcrel32. 33*6f4ced0bSchristos * x86_64.cc (Target_x86_64::Relocate::relocate <R_X86_64_GOTOFF64>): 34*6f4ced0bSchristos Similarly use pcrel64. 35*6f4ced0bSchristos 36*6f4ced0bSchristos2019-09-24 Nick Clifton <nickc@redhat.com> 37*6f4ced0bSchristos 38*6f4ced0bSchristos * descriptors.cc: Include <string> 39*6f4ced0bSchristos 40*6f4ced0bSchristos2019-09-23 Alan Modra <amodra@gmail.com> 41*6f4ced0bSchristos 42*6f4ced0bSchristos * testsuite/plugin_new_section_layout.c (new_input_hook): Correct 43*6f4ced0bSchristos return status enum values. 44*6f4ced0bSchristos 45*6f4ced0bSchristos2019-09-20 Alan Modra <amodra@gmail.com> 46*6f4ced0bSchristos 47*6f4ced0bSchristos PR 24768 48*6f4ced0bSchristos * layout.cc (Layout::Layout): Init lto_slim_object_. 49*6f4ced0bSchristos * object.cc (Sized_relobj_file::do_layout): Wrap overlong line. 50*6f4ced0bSchristos Don't use C cast. Validate section size. Don't copy contents. 51*6f4ced0bSchristos 52*6f4ced0bSchristos2019-09-20 Alan Modra <amodra@gmail.com> 53*6f4ced0bSchristos 54*6f4ced0bSchristos * powerpc.cc (Target_powerpc::Scan::check_non_pic): Move REL24 55*6f4ced0bSchristos to 32-bit supported. 56*6f4ced0bSchristos 57*6f4ced0bSchristos2019-09-18 Simon Marchi <simon.marchi@polymtl.ca> 58*6f4ced0bSchristos 59*6f4ced0bSchristos * testsuite/Makefile.in: Re-generate. 60*6f4ced0bSchristos 61*6f4ced0bSchristos2019-09-09 Phil Blundell <pb@pbcl.net> 62*6f4ced0bSchristos 63*6f4ced0bSchristos binutils 2.33 branch created. 64*6f4ced0bSchristos 65*6f4ced0bSchristos2019-08-16 Martin Liska <mliska@suse.cz> 66*6f4ced0bSchristos 67*6f4ced0bSchristos PR ld/24912 68*6f4ced0bSchristos * object.cc (big_endian>::do_layout): Do not report error, 69*6f4ced0bSchristos but only set a flag. 70*6f4ced0bSchristos (big_endian>::do_add_symbols): Report error only for when 71*6f4ced0bSchristos relocatable. 72*6f4ced0bSchristos 73*6f4ced0bSchristos2019-08-02 Alan Modra <amodra@gmail.com> 74*6f4ced0bSchristos 75*6f4ced0bSchristos * powerpc.cc (Target_powerpc::Scan::get_reference_flags): Set 76*6f4ced0bSchristos flags for new relocations, and some missing older relocs. 77*6f4ced0bSchristos (Target_powerpc::Scan::local): Handle new pcrel tls relocs. 78*6f4ced0bSchristos Call set_has_static_tls for tprel relocs. 79*6f4ced0bSchristos (Target_powerpc::Scan::global): Likewise. 80*6f4ced0bSchristos (Target_powerpc::Relocate::relocate): Handle new pcrel tls relocs. 81*6f4ced0bSchristos 82*6f4ced0bSchristos2019-08-02 Alan Modra <amodra@gmail.com> 83*6f4ced0bSchristos 84*6f4ced0bSchristos * powerpc.cc (Powerpc_relocate_functions::rela, rela_ua): Perform 85*6f4ced0bSchristos signed right shift for signed overflow check. 86*6f4ced0bSchristos 87*6f4ced0bSchristos2019-07-29 Martin Liska <mliska@suse.cz> 88*6f4ced0bSchristos 89*6f4ced0bSchristos PR 24768 90*6f4ced0bSchristos * layout.h (class Layout): Add is_lto_slim_object and 91*6f4ced0bSchristos set_lto_slim_object. 92*6f4ced0bSchristos * object.cc (struct lto_section): Add lto_slim_object_. 93*6f4ced0bSchristos (big_endian>::do_layout): Parse content of 94*6f4ced0bSchristos .gnu_lto_.lto section. 95*6f4ced0bSchristos (big_endian>::do_add_symbols): Report error for a missing 96*6f4ced0bSchristos LTO plugin. 97*6f4ced0bSchristos 98*6f4ced0bSchristos2019-07-13 Alan Modra <amodra@gmail.com> 99*6f4ced0bSchristos 100*6f4ced0bSchristos * powerpc.cc (xlate_pcrel_opt): New function. 101*6f4ced0bSchristos (Target_powerpc::Relocate::relocate): Optimise PCREL34 and 102*6f4ced0bSchristos GOT_PCREL34 sequences marked with PCREL_OPT. 103*6f4ced0bSchristos 104*6f4ced0bSchristos2019-07-13 Alan Modra <amodra@gmail.com> 105*6f4ced0bSchristos 106*6f4ced0bSchristos * powerpc.cc (Powerpc_relobj::make_got_relative): New function. 107*6f4ced0bSchristos (relative_value_is_known): New functions. 108*6f4ced0bSchristos (Target_powerpc::Relocate::relocate): Edit code using 109*6f4ced0bSchristos GOT16_HA, GOT16_LO_DS, and GOT_PCREL34 relocs. 110*6f4ced0bSchristos 111*6f4ced0bSchristos2019-07-13 Alan Modra <amodra@gmail.com> 112*6f4ced0bSchristos 113*6f4ced0bSchristos * powerpc.cc (Target_powerpc): Add powerxx_stubs_ and accessor 114*6f4ced0bSchristos functions. 115*6f4ced0bSchristos (Target_powerpc::maybe_skip_tls_get_addr_call): Handle PLT_PCREL34 116*6f4ced0bSchristos and PLT_PCREL34_NOTOC relocs. 117*6f4ced0bSchristos (Powerpc_relocate_functions): Add addr34, addr34_hi, addr34_ha, 118*6f4ced0bSchristos addr28, addr16_higher34, addr16_highera34, addr16_highest34, 119*6f4ced0bSchristos addr16_highest34a functions. 120*6f4ced0bSchristos (li_11_0, ori_11_11_0, sldi_11_11_34): Define. 121*6f4ced0bSchristos (paddi_12_pc, pld_12_pc, pnop): Define. 122*6f4ced0bSchristos (d34, ha34): New inline functions. 123*6f4ced0bSchristos (Stub_table::add_plt_call_entry): Handle powerxx_stubs. 124*6f4ced0bSchristos (Stub_table::add_eh_frame): Likewise. 125*6f4ced0bSchristos (build_powerxx_offset): New function. 126*6f4ced0bSchristos (Stub_table::plt_call_size): Handle powerxx_stubs. 127*6f4ced0bSchristos (Stub_table::branch_stub_size): Likewise. 128*6f4ced0bSchristos (Stub_table::do_write): Likewise. 129*6f4ced0bSchristos (Target_powerpc::Scan::get_reference_flags): Handle new relocs. 130*6f4ced0bSchristos (Target_powerpc::Scan::reloc_needs_plt_for_ifunc: Likewise. 131*6f4ced0bSchristos (Target_powerpc::Scan::local, global, relocate): Likewise. 132*6f4ced0bSchristos 133*6f4ced0bSchristos2019-07-13 Alan Modra <amodra@gmail.com> 134*6f4ced0bSchristos 135*6f4ced0bSchristos * ehframe.cc (Fde::operator==): Delete. 136*6f4ced0bSchristos (Cie::remove_fde): Delete. 137*6f4ced0bSchristos (Eh_frame::remove_ehframe_for_plt): Delete fde_data and fde_length 138*6f4ced0bSchristos parameters. Remove all post-map plt FDEs. 139*6f4ced0bSchristos * ehframe.h (Fde:post_map): Make const, add variant to compare plt. 140*6f4ced0bSchristos (Fde::operator==): Delete. 141*6f4ced0bSchristos (Cie::remove_fde): Implement here. 142*6f4ced0bSchristos (Cie::last_fde): New accessor. 143*6f4ced0bSchristos (Eh_frame::remove_ehframe_for_plt): Update prototype. 144*6f4ced0bSchristos * layout.cc (Layout::remove_eh_frame_for_plt): Delete fde_data and 145*6f4ced0bSchristos fde_length parameters. 146*6f4ced0bSchristos * layout.h (Layout::remove_eh_frame_for_plt): Update prototype. 147*6f4ced0bSchristos * powerpc.cc (Stub_table::tls_get_addr_opt_bctrl_): Delete. 148*6f4ced0bSchristos (Stub_table::plt_fde_len_, plt_fde_, init_plt_fde): Delete. 149*6f4ced0bSchristos (Stub_table::add_plt_call_entry): Don't set tls_get_addr_opt_bctrl_. 150*6f4ced0bSchristos (eh_advance): New function. 151*6f4ced0bSchristos (stub_sort): New function. 152*6f4ced0bSchristos (Stub_table::add_eh_frame): Emit eh_frame for notoc plt calls and 153*6f4ced0bSchristos branches as well as __tls_get_addr_opt plt call stub. 154*6f4ced0bSchristos (Stub_table::remove_eh_frame): Update to suit. 155*6f4ced0bSchristos 156*6f4ced0bSchristos2019-07-13 Alan Modra <amodra@gmail.com> 157*6f4ced0bSchristos 158*6f4ced0bSchristos * powerpc.cc (Target_powerpc::maybe_skip_tls_get_addr_call): Handle 159*6f4ced0bSchristos notoc calls. 160*6f4ced0bSchristos (is_branch_reloc): Template on size. Return true for REL24_NOTOC. 161*6f4ced0bSchristos Update all callers. 162*6f4ced0bSchristos (max_branch_delta): Likewise. 163*6f4ced0bSchristos (Target_powerpc::Branch_info::make_stub): Add a stub for notoc 164*6f4ced0bSchristos calls to functions needing a valid toc pointer. 165*6f4ced0bSchristos (Target_powerpc::do_relax): Layout stubs again if any need resize. 166*6f4ced0bSchristos (add_12_11_12, addi_12_11, addis_12_11, ldx_12_11_12, ori_12_12_0), 167*6f4ced0bSchristos (oris_12_12_0, sldi_12_12_32): Define. 168*6f4ced0bSchristos (Stub_table::Plt_stub_ent): Add notoc_ and iter_ fields. 169*6f4ced0bSchristos (Stub_table::Branch_stub_key, Branch_stub_key_hash): Rename from 170*6f4ced0bSchristos Branch_stub_ent and Branch_stub_ent hash. Remove save_res_ from key. 171*6f4ced0bSchristos (Stub_table::Branch_stub_ent): New struct. 172*6f4ced0bSchristos (class Stub_table): Add need_resize and resizing vars. 173*6f4ced0bSchristos (Stub_table::need_resize, branch_size): New accessors. 174*6f4ced0bSchristos (Stub_table::set_resizing): New function. 175*6f4ced0bSchristos (Stub_table::add_plt_call_entry): Handle notoc calls and resizing 176*6f4ced0bSchristos on seeing such or a tocsave stubs after a normal stub using the 177*6f4ced0bSchristos same sym. 178*6f4ced0bSchristos (Stub_table::add_long_branch_entry): Similarly. 179*6f4ced0bSchristos (Stub_table::find_long_branch_entry): Return a Branch_stub_ent*. 180*6f4ced0bSchristos (Stub_table::define_stub_syms): Adjust 181*6f4ced0bSchristos (Stub_table::build_tls_opt_head, build_tls_opt_tail): New functions. 182*6f4ced0bSchristos (build_notoc_offset): New function. 183*6f4ced0bSchristos (Stub_table::plt_call_size): Move out of line. Handle notoc calls. 184*6f4ced0bSchristos (Stub_table::branch_stub_size): Similarly. 185*6f4ced0bSchristos (Stub_table::do_write): Separate loop for ELFv2 stubs, handling 186*6f4ced0bSchristos notoc calls. Simplify ELFv1 loop. Output notoc branch stubs. 187*6f4ced0bSchristos Use build_tls_opt_head and build_tls_opt_tail. 188*6f4ced0bSchristos (Target_powerpc::Scan::get_reference_flags): Handle REL24_NOTOC. 189*6f4ced0bSchristos (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Likewise, 190*6f4ced0bSchristos and PLTSEQ_NOTOC and PLTCALL_NOTOC. 191*6f4ced0bSchristos (Target_powerpc::Scan::local, global, relocate): Likewise. 192*6f4ced0bSchristos 193*6f4ced0bSchristos2019-06-28 Alan Modra <amodra@gmail.com> 194*6f4ced0bSchristos 195*6f4ced0bSchristos * powerpc.cc (Target_powerpc::Relocate::relocate): Don't look 196*6f4ced0bSchristos at next/previous reloc when relnum is -1. 197*6f4ced0bSchristos 198*6f4ced0bSchristos2019-06-28 Alan Modra <amodra@gmail.com> 199*6f4ced0bSchristos 200*6f4ced0bSchristos * powerpc.cc (Stub_table::plt_error): New function. 201*6f4ced0bSchristos (Stub_table::do_write): Use it. 202*6f4ced0bSchristos (Output_data_glink::do_write): Don't segfault emitting linkage 203*6f4ced0bSchristos table error. 204*6f4ced0bSchristos 205*6f4ced0bSchristos2019-06-28 Alan Modra <amodra@gmail.com> 206*6f4ced0bSchristos 207*6f4ced0bSchristos * powerpc.cc (Target_powerpc::Scan::get_reference_flags): Handle 208*6f4ced0bSchristos REL16_HIGH* relocs. 209*6f4ced0bSchristos (Target_powerpc::Scan::local): Likewise. 210*6f4ced0bSchristos (Target_powerpc::Scan::global): Likewise. 211*6f4ced0bSchristos (Target_powerpc::Relocate::relocate): Likewise. 212*6f4ced0bSchristos 213*6f4ced0bSchristos2019-06-10 Martin Liska <mliska@suse.cz> 214*6f4ced0bSchristos 215*6f4ced0bSchristos * errors.h: Include string. 216*6f4ced0bSchristos 217*6f4ced0bSchristos2019-05-10 Joshua Oreman <oremanj@hudson-trading.com> 218*6f4ced0bSchristos 219*6f4ced0bSchristos PR gold/21066 220*6f4ced0bSchristos * gc.h (gc_process_relocs): Track relocations in .eh_frame sections 221*6f4ced0bSchristos when ICF is enabled, even though the .eh_frame sections themselves 222*6f4ced0bSchristos are not foldable. 223*6f4ced0bSchristos * icf.cc (get_section_contents): Change arguments to permit operation 224*6f4ced0bSchristos on just part of a section. Include extra identity regions in the 225*6f4ced0bSchristos referring section's contents recursively. 226*6f4ced0bSchristos (match_sections): Lock object here instead of in get_section_contents 227*6f4ced0bSchristos so that get_section_contents can operate recursively. 228*6f4ced0bSchristos (Icf::add_ehframe_links): New method. 229*6f4ced0bSchristos (Icf::find_identical_sections): Pass .eh_frame sections to 230*6f4ced0bSchristos add_ehframe_links(). Increase default iteration count from 2 to 3 231*6f4ced0bSchristos because handling exception info typically requires one extra iteration. 232*6f4ced0bSchristos * icf.h (Icf::extra_identity_list_): New data member with accessor. 233*6f4ced0bSchristos (is_section_foldable_candidate): Include .gcc_except_table sections. 234*6f4ced0bSchristos * options.h: Update documentation for new default ICF iteration count. 235*6f4ced0bSchristos * testsuite/Makefile.am (icf_test_pr21066): New test case. 236*6f4ced0bSchristos * testsuite/Makefile.in: Regenerate. 237*6f4ced0bSchristos * testsuite/icf_test_pr21066.cc: New source file. 238*6f4ced0bSchristos * testsuite/icf_test_pr21066.sh: New test script. 239*6f4ced0bSchristos 240*6f4ced0bSchristos2019-02-19 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com> 241*6f4ced0bSchristos 242*6f4ced0bSchristos PR gold/23870 243*6f4ced0bSchristos * aarch64.cc (Target_aarch64::Scan::global): Check if a symbol with 244*6f4ced0bSchristos R_AARCH64_MOVW_.ABS_* relocations requires a PLT entry. 245*6f4ced0bSchristos * testsuite/Makefile.am: Add aarch64_pr23870 test case. 246*6f4ced0bSchristos * testsuite/Makefile.in: Regenerate. 247*6f4ced0bSchristos * testsuite/aarch64_pr23870_bar.c: New file. 248*6f4ced0bSchristos * testsuite/aarch64_pr23870_foo.c: New file. 249*6f4ced0bSchristos * testsuite/aarch64_pr23870_main.S: New file. 250*6f4ced0bSchristos 251*6f4ced0bSchristos2019-02-12 Nick Clifton <nickc@redhat.com> 252*6f4ced0bSchristos 253*6f4ced0bSchristos * po/fr.po: Updated French translation. 254*6f4ced0bSchristos 255*6f4ced0bSchristos2019-01-21 Nick Clifton <nickc@redhat.com> 256*6f4ced0bSchristos 257*6f4ced0bSchristos * po/uk.po: Updated Ukranian translation. 258*6f4ced0bSchristos 259*6f4ced0bSchristos2019-01-19 Nick Clifton <nickc@redhat.com> 260*6f4ced0bSchristos 261*6f4ced0bSchristos * po/gold.pot: Regenerate. 262*6f4ced0bSchristos 263*6f4ced0bSchristos2018-06-24 Nick Clifton <nickc@redhat.com> 264*6f4ced0bSchristos 265*6f4ced0bSchristos 2.32 branch created. 266*6f4ced0bSchristos 267*6f4ced0bSchristos2019-01-09 Andrew Paprocki <andrew@ishiboo.com> 268*6f4ced0bSchristos 269*6f4ced0bSchristos * configure: Regenerate. 270*6f4ced0bSchristos 271*6f4ced0bSchristos2019-01-01 Alan Modra <amodra@gmail.com> 272*6f4ced0bSchristos 273*6f4ced0bSchristos Update year range in copyright notice of all files. 274*6f4ced0bSchristos 275*6f4ced0bSchristosFor older changes see ChangeLog-2018 276*6f4ced0bSchristos 277*6f4ced0bSchristosCopyright (C) 2019 Free Software Foundation, Inc. 278*6f4ced0bSchristos 279*6f4ced0bSchristosCopying and distribution of this file, with or without modification, 280*6f4ced0bSchristosare permitted in any medium without royalty provided the copyright 281*6f4ced0bSchristosnotice and this notice are preserved. 282*6f4ced0bSchristos 283*6f4ced0bSchristosLocal Variables: 284*6f4ced0bSchristosmode: change-log 285*6f4ced0bSchristosleft-margin: 8 286*6f4ced0bSchristosfill-column: 74 287*6f4ced0bSchristosversion-control: never 288*6f4ced0bSchristosEnd: 289