12016-12-28 Andreas Schwab <schwab@linux-m68k.org> 2 3 * copy-relocs.h: Fix comment typo. 4 52016-12-28 Cary Coutant <ccoutant@gmail.com> 6 7 PR gold/20996 8 * object.cc (build_compressed_section_map): Add explicit instantiations. 9 102016-12-27 Cary Coutant <ccoutant@gmail.com> 11 12 PR ld/20995 13 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Use .data.rel.ro for 14 read-only data when linking with -z relro. 15 * copy-relocs.h (Copy_relocs::dynrelro_): New data member. 16 * testsuite/Makefile.am (copy_test_relro): New test case. 17 * testsuite/Makefile.in: Regenerate. 18 * testsuite/copy_test_relro.cc: New source file. 19 * testsuite/copy_test_relro_1.cc: New source file. 20 212016-12-23 Cary Coutant <ccoutant@gmail.com> 22 23 * NEWS: Add new features in 1.14. 24 * version.cc (version_string): Bump to 1.14. 25 262016-12-22 Cary Coutant <ccoutant@gmail.com> 27 28 PR gold/17643 29 * options.h (-z bndplt): New option. 30 * x86_64.cc (Output_data_plt_x86_64::regular_count): New method. 31 (Output_data_plt_x86_64::address_for_global): Move implementation into 32 virtual method. 33 (Output_data_plt_x86_64::address_for_local): Likewise. 34 (Output_data_plt_x86_64::got): New method. 35 (Output_data_plt_x86_64::got_plt): New method. 36 (Output_data_plt_x86_64::got_irelative): New method. 37 (Output_data_plt_x86_64::do_address_for_global): New virtual method. 38 (Output_data_plt_x86_64::do_address_for_local): New virtual method. 39 (class Output_data_plt_x86_64_bnd): New class. 40 (Target_x86_64::do_make_data_plt): Move out of line and specialize 41 for each size (both overloads). 42 (Output_data_plt_x86_64::set_final_data_size): Cosmetic changes. 43 * testsuite/Makefile.am (bnd_plt_1): New test case. 44 (bnd_ifunc_1): New test case. 45 (bnd_ifunc_2): New test case. 46 * testsuite/Makefile.in: Regenerate. 47 * testsuite/bnd_ifunc_1.s: New source file. 48 * testsuite/bnd_ifunc_1.sh: New shell script. 49 * testsuite/bnd_ifunc_2.s: New source file. 50 * testsuite/bnd_ifunc_2.sh: New shell script. 51 * testsuite/bnd_plt_1.s: New source file. 52 * testsuite/bnd_plt_1.sh: New shell script. 53 542016-12-22 Cary Coutant <ccoutant@gmail.com> 55 56 * layout.cc (Layout::finalize): Track count of forced-local symbols 57 in .dynsym. 58 (Layout::create_symtab_sections): Add local_dynamic_count parameter; 59 use that instead of sh_info value. 60 (Layout::create_dynamic_symtab): Add pforced_local_dynamic_count 61 parameter; pass it to Symtab::set_dynsym_indexes(). Include forced 62 locals in sh_info value. Pass index of first real global to 63 Dynobj::create_gnu_hash_table() and Dynobj::create_elf_hash_table(). 64 * layout.h (Layout::create_symtab_sections): Add local_dynamic_count 65 parameter. 66 (Layout::create_dynamic_symtab): Add pforced_local_dynamic_count 67 parameter. 68 * symtab.cc (Symbol_table::set_dynsym_indexes): Add pforced_local_count 69 parameter. Process forced-local symbols first and return the count. 70 (Symbol_table::finalize): Update comments. 71 * symtab.h (Symbol_table::set_dynsym_indexes): Add pforced_local_count 72 parameter. 73 (Symbol_table::first_dynamic_global_index_): Update comment. 74 (Symbol_table::dynamic_count_): Update comment. 75 * testsuite/Makefile.am (ifuncmod1.sh): New test case. 76 * testsuite/Makefile.in: Regenerate. 77 * testsuite/ifuncmod1.sh: New shell script. 78 792016-12-21 Cary Coutant <ccoutant@gmail.com> 80 81 * symtab.cc (Symbol_table::define_special_symbol): Add is_forced_local 82 parameter; if set, do not check version script. 83 (Symbol_table::do_define_in_output_data): Pass is_forced_local for 84 STB_LOCAL predefined symbols. 85 (Symbol_table::do_define_in_output_segment): Likewise. 86 (Symbol_table::do_define_in_output_segment): Likewise. 87 (Symbol_table::do_define_as_constant): Likewise. 88 * symtab.h (Symbol_table::define_special_symbol): Add is_forced_local 89 parameter. Adjust all callers. 90 * testsuite/Makefile.am (ver_test_8.sh): New test case. 91 * testsuite/Makefile.in: Regenerate. 92 * ver_test_8.sh: New test script. 93 942016-12-21 Cary Coutant <ccoutant@gmail.com> 95 96 * output.cc (Output_segment::first_section): Return NULL if there are 97 no sections in the segment. 98 * output.h (Output_segment::first_section_load_address): Assert that 99 first section is not NULL. 100 * symtab.cc (Symbol_table::sized_write_globals): Attach linker-created 101 segment-relative symbols to first section of the segment. 102 1032016-12-21 Alan Modra <amodra@gmail.com> 104 105 * arm.cc: Fix comment chars with high bit set. 106 1072016-12-20 Cary Coutant <ccoutant@gmail.com> 108 109 * testsuite/Makefile.am: Add missing dependencies on gcctestdir/ld 110 or ../ld-new. 111 * testsuite/Makefile.in: Regenerate. 112 1132016-12-19 Cary Coutant <ccoutant@gmail.com> 114 115 PR gold/20949 116 * script.cc (Lex::get_token): Don't look ahead past NUL characters. 117 1182016-12-19 Cary Coutant <ccoutant@gmail.com> 119 120 PR gold/14676 121 PR gold/20983 122 * layout.h (Layout::choose_output_section): Add match_input_spec 123 parameter. Adjust all callers. 124 * layout.cc (Layout::choose_output_section): Likewise. Pass 125 match_input_spec to Script_sections::output_section_name(). 126 (Layout::create_note): Pass true for match_input_spec. 127 * script-sections.h (Script_sections::output_section_name): Add 128 match_input_spec parameter. 129 * script-sections.cc (Sections_element::output_section_name): Likewise. 130 (Output_section_definition::output_section_name): Likewise. 131 (Script_sections::output_section_name): Likewise. 132 1332016-12-19 Igor Kudrin <ikudrin@accesssoftek.com> 134 135 * arm.cc (Target_arm::Target_arm): Move initialization code ... 136 (Target_arm::do_select_as_default_target): ... to here. 137 * testsuite/Makefile.am (arm_target_lazy_init): New test case. 138 * testsuite/Makefile.in: Regenerate. 139 * testsuite/arm_target_lazy_init.s: New source file. 140 * testsuite/arm_target_lazy_init.t: New linker script. 141 1422016-12-19 Cary Coutant <ccoutant@gmail.com> 143 144 PR gold/20976 145 * symtab.cc (Symbol_table::sized_write_globals): Use address of 146 output section, not input section. 147 * testsuite/Makefile.am (pr20976): New test case. 148 * testsuite/Makefile.in: Regenerate. 149 * testsuite/pr20976.c: New source file. 150 1512016-12-13 Cary Coutant <ccoutant@gmail.com> 152 153 PR gold/20749 154 * options.h (--orphan-handling): New option. 155 (General_options::Orphan_handling): New enum. 156 (General_options::orphan_handling_enum): New method. 157 (General_options::set_orphan_handling_enum): New method. 158 (General_options::orphan_handling_enum_): New data member. 159 * options.cc (General_options::General_options): Initialize new member. 160 (General_options::finalize): Convert --orphan-handling argument to enum. 161 * script-sections.cc (Script_sections::output_section_name): Check it. 162 1632016-12-13 Cary Coutant <ccoutant@gmail.com> 164 165 PR gold/20522 166 * layout.cc (Layout::choose_output_section): Add is_reloc parameter. 167 Adjust all callers. Do not use linker script for is_reloc sections. 168 (Layout::layout_reloc): Pass is_reloc == true. 169 * layout.h (Layout::choose_output_section): Add is_reloc parameter. 170 1712016-12-12 Igor Kudrin <ikudrin@accesssoftek.com> 172 Cary Coutant <ccoutant@gmail.com> 173 174 PR gold/14676 175 * script-sections.cc (Output_section_definition::output_section_name): 176 For linker-generated sections, compare with output section name. 177 * testsuite/Makefile.am (script_test_13): New test. 178 * testsuite/Makefile.in: Regenerate. 179 * testsuite/script_test_13.c: New source file. 180 * testsuite/script_test_13.sh: New script. 181 * testsuite/script_test_13.t: New linker script. 182 1832016-12-12 Cary Coutant <ccoutant@gmail.com> 184 185 * script-sections.cc (Orphan_section_placement::update_last_alloc): 186 New method. 187 (Orphan_section_placement::find_place): Place orphan .data section 188 after either RODATA or TEXT. 189 (Script_sections::place_orphan): Call update_last_alloc for allocated 190 sections. 191 (Script_sections::create_segments): Improve handling of BSS. 192 1932016-12-13 Alan Modra <amodra@gmail.com> 194 195 PR gold/16711 196 * testsuite/script_test_15a.sh: Allows larger p_filesz. 197 * testsuite/script_test_15b.sh: Likewise. 198 * testsuite/script_test_15c.sh: Likewise. 199 2002016-12-13 Alan Modra <amodra@gmail.com> 201 202 PR gold/20717 203 * testsuite/pr20717.t: Add .got output section containing .toc. 204 2052016-12-11 Igor Kudrin <ikudrin@accesssoftek.com> 206 207 PR gold/20717 208 * testsuite/Makefile.am (pr20717): New test. 209 * testsuite/Makefile.in: Regenerate. 210 * testsuite/pr20717.c: New test source file. 211 * testsuite/pr20717.sh: New test script. 212 * testsuite/pr20717.t: New test linker script. 213 2142016-12-11 Cary Coutant <ccoutant@gmail.com> 215 216 PR gold/16711 217 * output.cc (Output_section::set_final_data_size): Calculate data size 218 based on relative offset rather than file offset. 219 (Output_segment::set_section_addresses): Track file offset separately 220 from address offset. 221 (Output_segment::set_section_list_addresses): Add pfoff parameter. 222 Track file offset separately. Don't move file offset for BSS 223 sections. 224 * output.h (Output_segment::set_section_list_addresses): Add pfoff 225 parameter. 226 * script-sections.cc (Orphan_section_placement): Add PLACE_LAST_ALLOC. 227 (Orphan_section_placement::Orphan_section_placement): Initialize it. 228 (Orphan_section_placement::output_section_init): Track last allocated 229 section. 230 (Orphan_section_placement::find_place): Place BSS after last allocated 231 section. 232 (Output_section_element_input::set_section_addresses): Always override 233 input section alignment when SUBALIGN is specified. 234 (Output_section_definition::set_section_addresses): Override alignment 235 of output section when SUBALIGN is specified. 236 237 * testsuite/Makefile.am (script_test_15a, script_test_15b) 238 (script_test_15c): New test cases. 239 * testsuite/Makefile.in: Regenerate. 240 * testsuite/script_test_2.cc: Adjust expected layout. 241 * testsuite/script_test_15.c: New source file. 242 * testsuite/script_test_15a.sh: New shell script. 243 * testsuite/script_test_15a.t: New linker script. 244 * testsuite/script_test_15b.sh: New shell script. 245 * testsuite/script_test_15b.t: New linker script. 246 * testsuite/script_test_15c.sh: New shell script. 247 * testsuite/script_test_15c.t: New linker script. 248 2492016-12-08 Alan Modra <amodra@gmail.com> 250 251 * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather 252 then asserting. 253 2542016-12-08 Alan Modra <amodra@gmail.com> 255 256 * options.h (--stub-group-multi): Fix typo. 257 2582016-12-07 Alan Modra <amodra@gmail.com> 259 260 * options.h (--stub-group-multi): New PowerPC option. 261 * powerpc.cc (Stub_control): Add multi_os_ var and param 262 to constructor. Sort start_ var later. Comment State. 263 (Stub_control::can_add_to_stub_group): Heed multi_os_. 264 (Target_powerpc::group_sections): Update. 265 2662016-12-07 Alan Modra <amodra@gmail.com> 267 268 PR gold/20878 269 * powerpc.cc (Stub_control): Replace stubs_always_before_branch_ 270 with stubs_always_after_branch_, group_end_addr_ with 271 group_start_addr_. 272 (Stub_control::can_add_to_stub_group): Rewrite to suit scanning 273 sections by increasing address. 274 (Target_powerpc::group_sections): Scan that way. Delete corner 275 case. 276 * options.h (--stub-group-size): Update help string. 277 2782016-12-07 Alan Modra <amodra@gmail.com> 279 280 * powerpc.cc (Stub_table_owner): Provide constructor. 281 (Powerpc_relobj::set_stub_table): Resize fill with -1. 282 (Target_powerpc::Branch_info::make_stub): Provide target debug 283 output on returning false. 284 2852016-12-05 Cary Coutant <ccoutant@gmail.com> 286 Tristan Gingold <gingold@adacore.com> 287 288 * object.cc (Sized_relobj_file::do_count_local_symbols): Check 289 is_ordinary before using shndx. 290 * testsuite/Makefile.am (file_in_many_sections_test.sh): New test case. 291 * testsuite/Makefile.in: Regenerate. 292 * testsuite/file_in_many_sections.c: New source file. 293 * testsuite/file_in_many_sections_test.sh: New script. 294 2952016-12-01 Cary Coutant <ccoutant@gmail.com> 296 Igor Kudrin <ikudrin@accesssoftek.com> 297 298 PR gold/20717 299 * script-sections.cc (Script_sections): Set *keep to false when 300 no match. 301 3022016-12-01 Cary Coutant <ccoutant@gmail.com> 303 304 PR gold/20834 305 * target.h (Target::default_text_segment_address): Bump default 306 start address up to ABI page size. 307 3082016-12-01 Cary Coutant <ccoutant@gmail.com> 309 310 PR gold/18989 311 * options.cc (General_options::object_format_to_string): New function. 312 (General_options::copy_from_posdep_options): New function. 313 (General_options::parse_push_state): New function. 314 (General_options::parse_pop_state): New function. 315 * options.h (--push-state, --pop-state): New options. 316 (General_options::object_format_to_string): New method. 317 (General_options::set_incremental_disposition): New method. 318 (General_options::copy_from_posdep_options): New method. 319 (General_options::options_stack_): New data member. 320 3212016-12-01 Cary Coutant <ccoutant@gmail.com> 322 323 PR gold/20807 324 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle 325 section symbols correctly. 326 * arm.cc (Target_arm): Likewise. 327 * powerpc.cc (Target_powerpc): Likewise. 328 3292016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com> 330 331 * aarch64-reloc.def: Fix spelling in comments. 332 3332016-11-27 Ambrogino Modigliani <ambrogino.modigliani@gmail.com> 334 335 * aarch64.cc: Fix spelling in comments. 336 * arm.cc: Fix spelling in comments. 337 * icf.cc: Fix spelling in comments. 338 * layout.cc: Fix spelling in comments. 339 * layout.h: Fix spelling in comments. 340 * mips.cc: Fix spelling in comments. 341 * output.h: Fix spelling in comments. 342 * plugin.h: Fix spelling in comments. 343 * script-sections.h: Fix spelling in comments. 344 * script.h: Fix spelling in comments. 345 * stringpool.h: Fix spelling in comments. 346 * tilegx.cc: Fix spelling in comments. 347 3482016-11-22 Cary Coutant <ccoutant@gmail.com> 349 350 PR gold/20346 351 * options.cc (One_option::print): Print "(default)" when appropriate. 352 * options.h: Clean up and re-sort options. 353 (One_option::is_default): New data member. 354 (One_option::One_option): Add is_default parameter; adjust all calls. 355 (DEFINE_var): Add is_default__ parameter; adjust all calls. 356 (DEFINE_bool): Set is_default based on default_value__. 357 (DEFINE_bool_ignore): New macro. 358 (--no-eh-frame-hdr): New option. 359 (--enable-new-dtags): Remove mention of DT_FLAGS. 360 3612016-11-22 Ambrogino Modigliani <ambrogino.modigliani@gmail.com> 362 363 * configure: Regenerate. 364 3652016-11-21 Cary Coutant <ccoutant@gmail.com> 366 367 PR gold/20693 368 * gold.cc (queue_middle_tasks): Force valid target earlier. 369 3702016-11-21 Igor Kudrin <ikudrin@accesssoftek.com> 371 372 * layout.cc: Include windows.h and rpcdce.h (for MinGW32). 373 (Layout::create_build_id): Generate uuid using UuidCreate(). 374 3752016-11-04 Loïc Yhuel <loic.yhuel@softathome.com> 376 377 * configure.ac: add missing '$'. 378 * configure: Regenerate. 379 3802016-10-21 Gergely Nagy <ngg@tresorit.com> 381 382 PR gold/17704 383 * icf.cc (match_sections): Add new parameter section_addraligns. 384 Check section alignment and keep the section with the strictest 385 alignment. 386 (find_identical_sections): New local variable section_addraligns. 387 Store each section's alignment. 388 * testsuite/pr17704a_test.s: New file. 389 * testsuite/Makefile.am (pr17704a_test): New test. 390 * testsuite/Makefile.in: Regenerate. 391 3922016-10-06 Alan Modra <amodra@gmail.com> 393 394 * powerpc.cc (Target_powerpc::Relocate::relocate): Add fall 395 through comment. 396 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise. 397 3982016-10-06 Alan Modra <amodra@gmail.com> 399 400 * aarch64.cc: Spell fall through comments as "// Fall through.". 401 * arm.cc: Likewise. 402 * mips.cc: Likewise. 403 * powerpc.cc: Likewise. 404 * s390.cc: Likewise. 405 * sparc.cc: Likewise. 406 * x86_64.cc: Likewise. 407 * powerpc.cc (Target_powerpc::Relocate::relocate): Add missing 408 fall through comments. 409 * sparc.cc: (Target_sparc::Scan::global): Likewise. 410 (Target_sparc::Relocate::relocate): Likewise. 411 * tilegx.cc (Target_tilegx::Relocate::relocate): Likewise. 412 * resolve.cc (symbol_to_bits): Add missing break. 413 4142016-09-26 Cary Coutant <ccoutant@gmail.com> 415 416 PR gold/20238 417 * symtab.cc (Symbol_table::define_default_version): Check that 418 unversioned symbol is defined. 419 4202016-09-26 Vlad Zakharov <vzakhar@synopsys.com> 421 422 * Makefile.in: Regenerate. 423 * configure: Likewise. 424 * testsuite/Makefile.in: Likewise. 425 4262016-09-26 Alan Modra <amodra@gmail.com> 427 428 * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid 429 compiler warning. 430 * output.cc (Output_segment::set_section_addresses): Likewise. 431 * testsuite/Makefile.in: Regenerate. 432 4332016-09-02 Doug Kwan <dougkwan@google.com> 434 435 * arm.cc (Target_arm::Target_arm): Move method definition outside of 436 class definition. Add code to handle --target1-rel, --target1-abs 437 and --target2= options. 438 (Target_arm::get_reloc_reloc_type): Change method to be non-static 439 and const. 440 (Target_arm::target1_is_rel_, Target_arm::target2_reloc_): New data 441 member declaration. 442 (Target_arm::Scan::local, Target_arm::Scan::global, 443 Target_arm::Relocate::relocate, 444 Target_arm::Relocatable_size_for_reloc::get_size_for_reloc): Adjust 445 call to Target_arm::get_real_reloc_type. 446 (Target_arm::get_real_reloc_type): Use command line options to 447 determine real types of R_ARM_TARGET1 and R_ARM_TARGET2. 448 * options.h (--target1-rel, --target1-abs, --target2): New ARM-only 449 options. 450 4512016-08-31 Alan Modra <amodra@gmail.com> 452 453 * powerpc.cc (class Stub_control): Delete stub14_group_size_ 454 and has14_. Add group_size_. 455 (Stub_control::can_add_to_stub_group): Adjust to suit. Print 456 debug info when switching to adding sections before stubs. 457 4582016-08-31 Alan Modra <amodra@gmail.com> 459 460 * debug.h (DEBUG_TARGET): New. 461 (DEBUG_ALL): Add DEBUG_TARGET. 462 (gold_debug): Delete FORMAT param. 463 * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput. 464 4652016-08-30 Alan Modra <amodra@gmail.com> 466 467 PR 20523 468 * powerpc.cc (class Stub_control): Add has14_. Comment owner_. 469 (Stub_control::can_add_to_stub_group): Correct grouping of 470 sections containing 14-bit external branches. When returning 471 false, set state_ to reflect the fact that we have one section 472 for the next group. Rewrite most of function for clarity. 473 Add and expand comments. 474 (Target_powerpc::do_relax): Print stub group size retry in hex. 475 4762016-08-26 Han Shen <shenhan@google.com> 477 478 PR gold/20529 - relaxing loop never ends. 479 480 * powerpc.cc (Stub_table::min_size_threshold_): New member to 481 limit size. 482 (Stub_table::set_min_size_threshold): New member function. 483 (Stub_table::set_address_and_size): Add code to only allow size 484 increase. 485 (Target_powerpc::do_relax): Add code to record last size. 486 4872016-08-23 Roland McGrath <roland@hack.frob.com> 488 489 * options.h (General_options): Grok -z stack-size. 490 * output.h (Output_segment::set_size): New method. 491 * layout.cc (Layout::create_executable_stack_info): Renamed to ... 492 (Layout::create_stack_segment): ... this. Always create the 493 segment if -z stack-size was used. 494 (Layout::set_segment_offsets): Don't call ->set_offset on the 495 PT_GNU_STACK segment. 496 4972016-08-15 Bharathi Seshadri <bseshadr@cisco.com> 498 499 * options.h (General_options): Add --be8 option. 500 * arm.cc (Arm_relobj::do_relocate_sections): Add code to swap for be8. 501 (Output_data_plt_arm_standard::do_fill_first_plt_entry): Likewise. 502 (Output_data_plt_arm_short::do_fill_plt_entry): Likewise. 503 (Output_data_plt_arm_long::do_fill_plt_entry): Likewise. 504 (Target_arm::do_adjust_elf_header): Do EF_ARM_BE8 adjustment. 505 5062016-08-17 Cary Coutant <ccoutant@gmail.com> 507 508 * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing 509 error message. 510 * testsuite/Makefile.am (pr20216a): Add missing dependencies. 511 (pr20308a): Add -Bgcctestdir/ to compile rules. 512 * testsuite/Makefile.in: Regenerate. 513 5142016-08-12 Roland McGrath <roland@hack.frob.com> 515 516 PR gold/20462 517 * script-sections.cc (Script_sections::release_segments): 518 Reset this->segments_created_. 519 5202016-08-12 Roland McGrath <roland@hack.frob.com> 521 522 * yyscript.y (HIDDEN): New %token. 523 (assignment): Handle HIDDEN(string = expr) syntax. 524 * script.cc (script_keyword_parsecodes): Add HIDDEN. 525 5262016-08-10 Cary Coutant <ccoutant@gmail.com> 527 528 PR gold/20216 529 * x86_64.cc (Target_x86_64::Relocate::relocate): Add check for 530 R_X86_64_GOTPCREL. Reset skip_call_tls_get_addr_ after printing 531 error message. 532 * testsuite/Makefile.am (pr20216_gd.o): Add -Bgcctestdir/. 533 (pr20216_ld.o): Likewise. 534 * testsuite/Makefile.in: Regenerate. 535 5362016-08-10 James Clarke <jrtc27@jrtc27.com> 537 538 PR gold/20443 539 * symtab.cc (Symbol_table::add_from_relobj): Handle NULL symbols, 540 which will be present for STT_SPARC_REGISTER. 541 (Symbol_table::add_from_pluginobj): Likewise. 542 (Symbol_table::add_from_dynobj): Likewise. 543 (Symbol_table::add_from_incrobj): Removed dead code. 544 5452016-08-10 James Clarke <jrtc27@jrtc27.com> 546 547 PR gold/20442 548 * sparc.cc (Target_sparc::Relocate::relocate): R_SPARC_GOTDATA_OP_LOX10 549 should fall back on R_SPARC_GOT10, not R_SPARC_GOT13. 550 5512016-08-10 James Clarke <jrtc27@jrtc27.com> 552 553 PR gold/20441 554 * sparc.cc (Target_sparc::Scan::check_non_pic): Allow R_SPARC_32 on 555 sparc64. 556 5572016-06-29 Cary Coutant <ccoutant@gmail.com> 558 559 PR gold/20310 560 * testsuite/dynamic_list.sh: Remove check for _ZdlPv. 561 5622016-06-29 Cary Coutant <ccoutant@gmail.com> 563 564 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add eh_test_2. 565 * testsuite/Makefile.in: Regenerate. 566 5672016-06-30 Alan Modra <amodra@gmail.com> 568 569 * testsuite/Makefile.am (memory_test, memory_test_2): Pass 570 -Wl,-z to gcc, not plain -z. 571 * testsuite/Makefile.in: Regenerate. 572 5732016-06-29 H.J. Lu <hongjiu.lu@intel.com> 574 575 PR gold/20308 576 * i386.cc (Target_i386::Relocate::relocate): Allow 577 R_386_GOT32X relocation against ___tls_get_addr. 578 (Target_i386::Relocate::tls_gd_to_ie): Support indirect 579 call to __tls_get_addr. 580 (Target_i386::Relocate::tls_gd_to_le): Likewise. 581 (Target_i386::Relocate::tls_ld_to_le): Likewise. 582 * testsuite/Makefile.am (check_PROGRAMS): Add pr20308a_test, 583 pr20308b_test, pr20308c_test, pr20308d_test, pr20308e_test. 584 (pr20308a_test_SOURCES): New. 585 (pr20308a_test_DEPENDENCIES): Likewise. 586 (pr20308a_test_CFLAGS): Likewise. 587 (pr20308a_test_LDFLAGS): Likewise. 588 (pr20308a_test_LDADD): Likewise. 589 (pr20308b_test_SOURCES): Likewise. 590 (pr20308b_test_DEPENDENCIES): Likewise. 591 (pr20308b_test_CFLAGS): Likewise. 592 (pr20308b_test_LDFLAGS): Likewise. 593 (pr20308b_test_LDADD): Likewise. 594 (pr20308c_test_SOURCES): Likewise. 595 (pr20308c_test_DEPENDENCIES): Likewise. 596 (pr20308c_test_CFLAGS): Likewise. 597 (pr20308c_test_LDFLAGS): Likewise. 598 (pr20308c_test_LDADD): Likewise. 599 (pr20308d_test_SOURCES): Likewise. 600 (pr20308d_test_DEPENDENCIES): Likewise. 601 (pr20308d_test_CFLAGS): Likewise. 602 (pr20308d_test_LDFLAGS): Likewise. 603 (pr20308d_test_LDADD): Likewise. 604 (pr20308e_test_SOURCES): Likewise. 605 (pr20308e_test_DEPENDENCIES): Likewise. 606 (pr20308e_test_CFLAGS): Likewise. 607 (pr20308e_test_LDFLAGS): Likewise. 608 (pr20308e_test_LDADD): Likewise. 609 (pr20308a.so): Likewise. 610 (pr20308b.so): Likewise. 611 (pr20308_gd.o): Likewise. 612 (pr20308_ld.o): Likewise. 613 (MOSTLYCLEANFILES): Add pr20308a.so pr20308b.so. 614 * testsuite/Makefile.in: Regenerated. 615 * testsuite/pr20308_def.c: New file. 616 * testsuite/pr20308_gd.S: Likewise. 617 * testsuite/pr20308_ld.S: Likewise. 618 * testsuite/pr20308_main.c: Likewise. 619 6202016-06-29 H.J. Lu <hongjiu.lu@intel.com> 621 622 PR gold/20216 623 * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New 624 AM_CONDITIONAL. 625 * configure: Regenerated. 626 * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow 627 R_X86_64_GOTPCRELX relocation against __tls_get_addr. 628 (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect 629 call to __tls_get_addr. 630 (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise. 631 (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise. 632 * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test, 633 pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test. 634 (pr20216a_test_SOURCES): New. 635 (pr20216a_test_DEPENDENCIES): Likewise. 636 (pr20216a_test_CFLAGS): Likewise. 637 (pr20216a_test_LDFLAGS): Likewise. 638 (pr20216a_test_LDADD): Likewise. 639 (pr20216b_test_SOURCES): Likewise. 640 (pr20216b_test_DEPENDENCIES): Likewise. 641 (pr20216b_test_CFLAGS): Likewise. 642 (pr20216b_test_LDFLAGS): Likewise. 643 (pr20216b_test_LDADD): Likewise. 644 (pr20216c_test_SOURCES): Likewise. 645 (pr20216c_test_DEPENDENCIES): Likewise. 646 (pr20216c_test_CFLAGS): Likewise. 647 (pr20216c_test_LDFLAGS): Likewise. 648 (pr20216c_test_LDADD): Likewise. 649 (pr20216d_test_SOURCES): Likewise. 650 (pr20216d_test_DEPENDENCIES): Likewise. 651 (pr20216d_test_CFLAGS): Likewise. 652 (pr20216d_test_LDFLAGS): Likewise. 653 (pr20216d_test_LDADD): Likewise. 654 (pr20216e_test_SOURCES): Likewise. 655 (pr20216e_test_DEPENDENCIES): Likewise. 656 (pr20216e_test_CFLAGS): Likewise. 657 (pr20216e_test_LDFLAGS): Likewise. 658 (pr20216e_test_LDADD): Likewise. 659 (pr20216a.so): Likewise. 660 (pr20216b.so): Likewise. 661 (pr20216_gd.o): Likewise. 662 (pr20216_ld.o): Likewise. 663 (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so. 664 * testsuite/Makefile.in: Regenerated. 665 * testsuite/pr20216_def.c: New file. 666 * testsuite/pr20216_gd.S: Likewise. 667 * testsuite/pr20216_ld.S: Likewise. 668 * testsuite/pr20216_main.c: Likewise. 669 6702016-06-29 Alan Modra <amodra@gmail.com> 671 672 * script_test_12.t: Delete .plt, specify 64k page size. 673 * script_test_12i.t: Likewise. 674 6752016-06-29 Alan Modra <amodra@gmail.com> 676 677 * testsuite/plugin_layout_with_alignment.c: Explicitly align all 678 variables. 679 6802016-06-29 Alan Modra <amodra@gmail.com> 681 682 * testsuite/Makefile.am (copy_test_protected): Disable for powerpc. 683 * testsuite/Makefile.in: Regenerate. 684 6852016-06-28 Igor Kudrin <ikudrin@accesssoftek.com> 686 687 * aarch64-reloc.def (NONE): New relocation. 688 * aarch64.cc (Target_aarch64::Scan::local): Handle R_AARCH64_NONE. 689 (Target_aarch64::Scan::global): Likewise. 690 * testsuite/Makefile.am (aarch64_reloc_none): New test. 691 * testsuite/Makefile.in: Regenerate. 692 * testsuite/aarch64_reloc_none.s: New test source file. 693 * testsuite/aarch64_reloc_none.sh: New test script. 694 6952016-06-28 Sriraman Tallam <tmsriram@google.com> 696 697 * x86_64.cc (Lazy_view): New class. 698 (can_convert_mov_to_lea): Templatize function. Make the function 699 check for appropriate relocation types and use the view parameter 700 to get section contents. 701 (can_convert_callq_to_direct): New function. 702 (Target_x86_64<size>::Scan::global): Refactor. 703 (Target_x86_64<size>::Relocate::relocate): Refactor. Change any indirect 704 call via GOT that can be converted. 705 * testsuite/Makefile.am (x86_64_indirect_call_to_direct.sh): New test. 706 * testsuite/Makefile.in: Regenerate. 707 * testsuite/x86_64_indirect_call_to_direct1.s: New file. 708 * testsuite/x86_64_indirect_jump_to_direct1.s: New file. 709 7102016-06-28 Igor Kudrin <ikudrin@accesssoftek.com> 711 712 * aarch64.cc (Target_aarch64::Scan::local): Move the call to got_section 713 from the top level to the places of its use. 714 7152016-06-28 Igor Kudrin <ikudrin@accesssoftek.com> 716 717 PR gold/18098 718 * script-c.h (Sort_wildcard): Add SORT_WILDCARD_BY_INIT_PRIORITY. 719 * script-sections.cc (Input_section_sorter::get_init_priority): New method. 720 (Input_section_sorter::operator()): Handle SORT_WILDCARD_BY_INIT_PRIORITY. 721 (Output_section_element_input::print): Likewise. 722 * script.cc (script_keyword_parsecodes): Add entry SORT_BY_INIT_PRIORITY. 723 * yyscript.y (SORT_BY_INIT_PRIORITY): New token. 724 (wildcard_section): Handle SORT_BY_INIT_PRIORITY. 725 726 * testsuite/Makefile.am (script_test_14): New test. 727 * testsuite/Makefile.in: Regenerate. 728 * testsuite/script_test_14.s: New test source file. 729 * testsuite/script_test_14.sh: New test script. 730 * testsuite/script_test_14.t: New test linker script. 731 7322016-06-28 James Clarke <jrtc27@jrtc27.com> 733 734 * sparc.cc (Target_sparc::Scan::local): Don't convert R_SPARC_32 735 to R_SPARC_RELATIVE if class is ELFCLASS64. 736 (Target_sparc::Scan::global): Likewise. 737 7382016-06-23 Cary Coutant <ccoutant@gmail.com> 739 Igor Kudrin <ikudrin@accesssoftek.com> 740 741 PR gold/15370 742 * script-sections.cc 743 (Output_section_element_input::set_section_addresses): Keep bin_count 744 separate from input_pattern_count. 745 * testsuite/script_test_12.t: Add another section .x4. 746 * testsuite/script_test_12i.t: Likewise. 747 * testsuite/script_test_12a.c: Likewise. 748 * testsuite/script_test_12b.c: Likewise. 749 7502016-06-23 Igor Kudrin <ikudrin@accesssoftek.com> 751 752 * gold-threads.cc (impl_threads::Lock_impl_threads): Fix typos. 753 7542016-06-22 H.J. Lu <hongjiu.lu@intel.com> 755 756 PR ld/20283 757 * NEWS: Mention --enable-relro. 758 * configure.ac: Add --enable-relro. 759 (DEFAULT_LD_Z_RELRO): New. Set by --enable-relro and default 760 to 1. 761 * config.in: Regenerated. 762 * configure: Likewise. 763 * options.h (General_options::relro): Default to 764 DEFAULT_LD_Z_RELRO. 765 7662016-06-20 Cary Coutant <ccoutant@gmail.com> 767 768 * NEWS: Add new features in 1.12. 769 * version.cc (version_string): Bump to 1.12. 770 7712016-06-20 H.J. Lu <hongjiu.lu@intel.com> 772 773 PR gold/20245 774 * i386.cc (Target_i386::first_plt_entry_offset): Return 0 if 775 plt_ is NULL. 776 (Target_i386::plt_entry_size): Likewise. 777 (Target_x86_64<size>::first_plt_entry_offset): Likewise. 778 (Target_x86_64<size>::plt_entry_size): Likewise. 779 7802016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> 781 782 * mips.cc (Target_mips::Target_mips): Initialize rld_map_. 783 (Target_mips::rld_map_): New data member. 784 (Target_mips::do_finalize_sections): Add support for 785 DT_MIPS_RLD_MAP and DT_MIPS_RLD_MAP_REL dynamic tags, 786 .rld_map section, and __RLD_MAP symbol. 787 (Target_mips::do_dynamic_tag_custom_value): Add support for 788 DT_MIPS_RLD_MAP_REL dynamic tag. 789 * output.cc (Output_data_dynamic::get_entry_offset): New method 790 definition. 791 * output.h (Output_data_dynamic::get_entry_offset): New method 792 declaration. 793 7942016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> 795 796 * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check. 797 7982016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> 799 800 * mips.cc (relocation_needs_la25_stub): Add support for relocs: 801 R_MIPS_PC21_S2 and R_MIPS_PC26_S2. 802 (hi16_reloc): Add support for R_MIPS_PCHI16 relocation. 803 (is_matching_lo16_reloc): Likewise. 804 (lo16_reloc): Add support for R_MIPS_PCLO16 relocation. 805 (Mips_output_data_plt::plt_entry_r6): New static data member for 806 R6 PLT entry. 807 (Target_mips::is_output_r6): New method. 808 (Target_mips::Mips_mach): Add new enum constants. 809 (Mips_relocate_functions::Status): Likewise. 810 (Mips_relocate_functions::pchi16_relocs): New static data member. 811 (Mips_relocate_functions::relpc21): New method. 812 (Mips_relocate_functions::relpc26): Likewise. 813 (Mips_relocate_functions::relpc18): Likewise. 814 (Mips_relocate_functions::relpc19): Likewise. 815 (Mips_relocate_functions::relpchi16): Likewise. 816 (Mips_relocate_functions::do_relpchi16): Likewise. 817 (Mips_relocate_functions::relpclo16): Likewise. 818 (Mips_output_data_plt::do_write): Add support for Mips r6 plt 819 entry. 820 (Target_mips::mips_32bit_flags): Add E_MIPS_ARCH_32R6 support. 821 (Target_mips::elf_mips_mach): Add E_MIPS_ARCH_32R6 and 822 E_MIPS_ARCH_64R6 support. 823 (Target_mips::update_abiflags_isa): Likewise. 824 (mips_get_size_for_reloc): Add support for relocs: R_MIPS_PCHI16, 825 R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3 and 826 R_MIPS_PC19_S2. 827 (Target_mips::Scan::local): Add support for relocs: R_MIPS_PCHI16 828 and R_MIPS_PCLO16. 829 (Target_mips::Scan::global): Add support for relocs: 830 R_MIPS_PC21_S2 and R_MIPS_PC26_S2. 831 (Target_mips::Relocate::relocate): Call functions for resolving 832 Mips32r6 and Mips64r6 relocations, and print error message for 833 STATUS_PCREL_UNALIGNED. 834 (Target_mips::Scan::get_reference_flags): Add support for relocs: 835 R_MIPS_PCHI16, R_MIPS_PCLO16, R_MIPS_PC21_S2, R_MIPS_PC26_S2, 836 R_MIPS_PC18_S3 and R_MIPS_PC19_S2. 837 (Target_mips::elf_mips_mach_name): Add E_MIPS_ARCH_32R6 and 838 E_MIPS_ARCH_64R6 support. 839 8402016-06-13 H.J. Lu <hongjiu.lu@intel.com> 841 842 PR gold/20246 843 * testsuite/script_test_2.t: Add .got.plt after .got. 844 8452016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> 846 847 * mips.cc (struct Mips_abiflags): New struct. 848 (Mips_relobj::Mips_relobj): Initialize attributes_section_data_ 849 and abiflags_. 850 (Mips_relobj::~Mips_relobj): Delete object pointed by 851 attributes_section_data_. 852 (Mips_relobj::abiflags): New method. 853 (Mips_relobj::attributes_section_data): Likewise. 854 (Mips_relobj::attributes_section_data_): New data member. 855 (Mips_relobj::abiflags_): Likewise. 856 (class Mips_output_section_abiflags): New class. 857 (Target_mips::Target_mips): Initialize attributes_section_data_, 858 abiflags_ and has_abiflags_section_. 859 (Target_mips::do_should_include_section): Don't emit input 860 .MIPS.abiflags sections to output .MIPS.abiflags. 861 (Target_mips::Mips_mach): Add new enum constants. 862 (Target_mips::mips_isa_ext_mach): New method. 863 (Target_mips::mips_isa_ext): Likewise. 864 (Target_mips::update_abiflags_isa): Likewise. 865 (Target_mips::infer_abiflags): Likewise. 866 (Target_mips::create_abiflags): Likewise. 867 (Target_mips::fp_abi_string): Likewise. 868 (Target_mips::select_fp_abi): Likewise. 869 (Target_mips::merge_obj_attributes): Likewise. 870 (Target_mips::merge_obj_abiflags): Likewise. 871 (Target_mips::level_rev): Likewise. 872 (Target_mips::merge_obj_e_flags): Rename from 873 merge_processor_specific_flags. Remove dyn_obj argument, 874 call update_abiflags_isa when needed, compare NaN encodings and 875 compare FP64 state. 876 (Target_mips::add_machine_extensions): Add two machine extensions 877 and fix one. 878 (Target_mips::attributes_section_data_): New data member. 879 (Target_mips::abiflags_): Likewise. 880 (Target_mips::has_abiflags_section_): Likewise. 881 (Mips_relobj::do_read_symbols): Read .gnu.attributes and 882 .MIPS.abiflags sections if they exists. 883 (Target_mips::elf_mips_mach): Add E_MIPS_MACH_5900 and 884 E_MIPS_MACH_OCTEON3 support. 885 (Target_mips::do_adjust_elf_header): Setup EI_ABIVERSION flag. 886 (Target_mips::do_finalize_sections): Merge .gnu.attributes and 887 .MIPS.abiflags sections from input. Create these sections if 888 needed. 889 (Target_mips::elf_mips_mach_name): Add E_MIPS_MACH_5900 and 890 E_MIPS_MACH_OCTEON3 support, and change strings for 891 E_MIPS_MACH_LS2E, E_MIPS_MACH_LS2F and E_MIPS_MACH_LS3A just 892 to match bfd. 893 8942016-06-10 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com> 895 896 * mips.cc (Mips_relobj::Mips_relobj): Initialize 897 has_reginfo_section_. 898 (Mips_relobj::has_reginfo_section_): New data member. 899 (Mips_relobj::has_reginfo_section): New method. 900 (class Mips_output_section_reginfo): Change base class to 901 Output_section_data, and set masks of the output .reginfo section 902 in constructor. 903 (Mips_output_section_reginfo::as_mips_output_section_reginfo): 904 Remove. 905 (Mips_output_section_reginfo::set_masks): Likewise. 906 (Mips_output_section_reginfo::set_final_data_size): Likewise. 907 (Mips_output_section_reginfo::do_print_to_mapfile): New method. 908 (Target_mips::do_make_output_section): Remove. 909 (Mips_relobj::do_read_symbols): Set has_reginfo_section_ to true 910 if the object contains a .reginfo section. 911 (Target_mips::do_finalize_sections): Create a .reginfo output 912 section if needed. 913 9142016-06-09 Artemiy Volkov <artemiyv@acm.org> 915 916 * mips.cc (Mips_output_data_got::do_write): Add missing template 917 args via typedef. 918 9192016-05-30 Marcin Kościelnicki <koriakin@0x04.net> 920 921 PR/19960 922 * s390.cc (Target_s390::ss_code_st_r14): Removed. 923 (Target_s390::ss_code_l_r14): Removed. 924 (Target_s390::ss_code_ear): Removed. 925 (Target_s390::ss_code_c): Removed. 926 (Target_s390::ss_match_st_r14): New function. 927 (Target_s390::ss_match_l_r14): New function. 928 (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead 929 of matching code directly. 930 (Target_s390::ss_match_ear): New function. 931 (Target_s390::ss_match_c): New function. 932 (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead 933 of matching code directly. 934 9352016-05-19 Cary Coutant <ccoutant@gmail.com> 936 937 PR gold/19823 938 * copy-relocs.cc (Copy_relocs::make_copy_reloc): Add object 939 parameter; check for protected symbol. 940 * copy-relocs.h (Copy_relocs::make_copy_reloc): Add object parameter. 941 * mips.cc (Mips_copy_relocs): Adjust call to make_copy_reloc. 942 * symtab.cc (Symbol::init_fields): Initialize is_protected_. 943 (Symbol_table::add_from_dynobj): Mark protected symbols. 944 * symtab.h (Symbol::is_protected): New method. 945 (Symbol::set_is_protected): New method. 946 (Symbol::is_protected_): New data member. 947 948 * testsuite/Makefile.am (copy_test_protected): New test. 949 * testsuite/Makefile.in: Regenerate. 950 * testsuite/copy_test.cc (main): Add legal reference to protected 951 symbol. 952 * testsuite/copy_test_v1.cc (main): Likewise. 953 * testsuite/copy_test_2.cc (ip): Add protected symbol. 954 * testsuite/copy_test_protected.cc: New test source file. 955 * testsuite/copy_test_protected.sh: New test script. 956 9572016-05-19 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com> 958 959 * mips.cc (Mips_got_entry::Mips_got_entry): Remove object argument 960 for global got symbols, and set addend to 0. 961 (Mips_got_entry::hash): Change hash algorithm. 962 (Mips_got_entry::equals): Refactor. 963 (Mips_got_entry::object): Return input object for local got symbols 964 from union d. 965 (Mips_got_entry::addend): Change return of the relocation addend. 966 (Mips_got_entry::addend_): Move from union d. 967 (Mips_got_entry::object_): Move into union d. 968 (class Mips_symbol_hash): New class. 969 (Mips_got_info::Global_got_entry_set): New type. 970 (Mips_got_info::global_got_symbols): Change return type to 971 Global_got_entry_set. 972 (Mips_got_info::global_got_symbols_): Change type to 973 Global_got_entry_set. 974 (Mips_symbol::hash): New method. 975 (Mips_output_data_la25_stub::symbols_): Change type to std::vector. 976 (Mips_output_data_mips_stubs::Mips_stubs_entry_set): New type. 977 (Mips_output_data_mips_stubs::symbols_): Change type to 978 Mips_stubs_entry_set. 979 (Mips_got_info::record_global_got_symbol): Don't pass object 980 argument when creating global got symbol. 981 (Mips_got_info::record_got_entry): Remove find before inserting 982 got entries. 983 (Mips_got_info::add_reloc_only_entries): Change type of iterator 984 to Global_got_entry_set. 985 (Mips_got_info::count_got_symbols): Likewise. 986 (Mips_output_data_la25_stub::create_la25_stub): Use push_back 987 for adding entries to symbols_. 988 (Mips_output_data_la25_stub::do_write): Change type of iterator 989 to std::vector. 990 (Mips_output_data_mips_stubs::set_lazy_stub_offsets): Change type 991 of iterator to Mips_stubs_entry_set. 992 (Mips_output_data_mips_stubs::set_needs_dynsym_value): Likewise. 993 (Mips_output_data_mips_stubs::do_write): Likewise. 994 9952016-05-06 Han Shen <shenhan@google.com> 996 997 PR gold/19987. 998 999 * aarch64-reloc.def: New relocation type. 1000 * aarch64.cc (AArch64_relocate_functions::Page): Changed to public. 1001 (Target_aarch64::Scan::local): Add R_AARCH64_LD64_GOTPAGE_LO15. 1002 (Target_aarch64::Scan::global): Add R_AARCH64_LD64_GOTPAGE_LO15. 1003 (Target_aarch64::Relocate::relocate): Implement R_AARCH64_LD64_GOTPAGE_LO15. 1004 10052016-04-28 Nick Clifton <nickc@redhat.com> 1006 1007 * po/zh_CN.po: Updated Chinese (simplified) translation. 1008 10092016-04-15 H.J. Lu <hongjiu.lu@intel.com> 1010 1011 * Makefile.in: Regenerated with automake 1.11.6. 1012 * aclocal.m4: Likewise. 1013 * testsuite/Makefile.in: Likewise. 1014 10152016-03-30 Cary Coutant <ccoutant@gmail.com> 1016 1017 PR gold/16979 1018 * symtab.cc (Symbol_table::define_default_version): Check for case 1019 where symbols are both in different shared objects. 1020 10212016-03-27 Cary Coutant <ccoutant@gmail.com> 1022 1023 PR gold/16111 1024 * i386.cc (Target_i386): Add check for fully-resolved symbol for 1025 R_386_GOTOFF. 1026 10272016-03-22 Nick Clifton <nickc@redhat.com> 1028 1029 * configure: Regenerate. 1030 10312016-03-21 Cary Coutant <ccoutant@gmail.com> 1032 1033 PR gold/19842 1034 * errors.cc (Errors::undefined_symbol): Add info message when 1035 symbol should have been provided by a plugin. 1036 * target-reloc.h (issue_undefined_symbol_error): Check for 1037 placeholder symbols defined in discarded sections. 1038 * testsuite/Makefile.am (plugin_test_9b): New test case. 1039 * testsuite/Makefile.in: Regenerate. 1040 * testsuite/plugin_test_9b_elf.cc: New test source file. 1041 * testsuite/plugin_test_9b_ir.cc: New test source file. 1042 10432016-03-20 Cary Coutant <ccoutant@gmail.com> 1044 1045 PR gold/19002 1046 * ehframe.cc (Eh_frame::read_fde): Check for dropped functions. 1047 * testsuite/Makefile.am (eh_test_2): New test. 1048 * testsuite/Makefile.in: Regenerate. 1049 * testsuite/eh_test_2.sh: New test script. 1050 * testsuite/eh_test_a.cc (bar): Make it comdat. 1051 * testsuite/eh_test_b.cc (bar): Add a duplicate copy. 1052 10532016-03-18 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com> 1054 1055 * mips.cc (Mips_relobj::is_n64_): Remove. 1056 (Target_mips::ei_class_): Likewise. 1057 (Mips_relobj::is_newabi): Call methods. 1058 (Mips_relobj::is_n64): Change checking for N64 ABI. 1059 (Target_mips::is_output_n64): Likewise. 1060 (Target_mips::merge_processor_specific_flags): Remove ei_class 1061 argument, and remove comparing ei_class. 1062 (Target_mips::do_adjust_elf_header): Remove setting EI_CLASS field 1063 of the ELF header. 1064 (Target_mips::do_finalize_sections): Don't pass ei_class argument 1065 to merge_processor_specific_flags. 1066 (Target_mips::elf_mips_abi_name): Remove ei_class argument, and 1067 change checking for N64 ABI. 1068 10692016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com> 1070 1071 * mips.cc (enum Special_relocation_symbol): New enum type. 1072 (is_readonly_section): New function. 1073 (eh_reloc): Likewise. 1074 (Mips_got_entry::is_section_symbol_): New member. 1075 (Mips_got_entry::is_section_symbol): New method. 1076 (Mips_got_info::record_local_got_symbol): Add is_section_symbol 1077 argument. 1078 (Mips_relobj::mips_elf_options_section_name): New method. 1079 (Mips_output_data_got::record_local_got_symbol): Add 1080 is_section_symbol argument, and pass it to 1081 Mips_got_info::record_local_got_symbol. 1082 (Mips_output_data_got::got_offset): Add addend argument, and pass 1083 it to Relobj::local_got_offset. 1084 (struct Mips_output_reloc_writer): New type. 1085 (class Mips_output_data_reloc): New class. 1086 (Mips_output_data_plt::Reloc_section): Change type to 1087 Mips_output_data_reloc. 1088 (Target_mips::Reloc_section): Likewise. 1089 (Mips_reloc_types::get_r_addend): Remove unsigned from return type. 1090 (Mips_classify_reloc::get_r_type2): New method. 1091 (Mips_classify_reloc::get_r_type3): Likewise. 1092 (Mips_classify_reloc::get_r_ssym): Likewise. 1093 (Target_mips::Reloca_section): Remove. 1094 (Relocate::should_apply_static_reloc): Rename from 1095 should_apply_r_mips_32_reloc. 1096 (Target_mips::copy_reloc): Replace Reltype parameter with r_type 1097 and r_offset. 1098 (Mips_relocate_functions::Valtype): New type. 1099 (Mips_relocate_functions::Valtype64): New type. 1100 (Mips_relocate_functions::check_overflow): New method. 1101 (Mips_relocate_functions::mips_reloc_unshuffle): Move to public 1102 interface. 1103 (Mips_relocate_functions::mips_reloc_shuffle): Likewise. 1104 (Mips_relocate_functions::rel16): Add support for resolving 1105 relocations for Mips64. 1106 (Mips_relocate_functions::rel32): Likewise. 1107 (Mips_relocate_functions::reljalr): Likewise. 1108 (Mips_relocate_functions::relpc32): Likewise. 1109 (Mips_relocate_functions::rel26): Likewise. 1110 (Mips_relocate_functions::relpc16): Likewise. 1111 (Mips_relocate_functions::relmicromips_pc7_s1): Likewise. 1112 (Mips_relocate_functions::relmicromips_pc10_s1): Likewise. 1113 (Mips_relocate_functions::relmicromips_pc16_s1): Likewise. 1114 (Mips_relocate_functions::do_relhi16): Likewise. 1115 (Mips_relocate_functions::do_relgot16_local): Likewise. 1116 (Mips_relocate_functions::rello16): Likewise. 1117 (Mips_relocate_functions::relgot): Likewise. 1118 (Mips_relocate_functions::relgotpage): Likewise. 1119 (Mips_relocate_functions::relgotofst): Likewise. 1120 (Mips_relocate_functions::relgot_hi16): Likewise. 1121 (Mips_relocate_functions::relgot_lo16): Likewise. 1122 (Mips_relocate_functions::relgprel): Likewise. 1123 (Mips_relocate_functions::relgprel32): Likewise. 1124 (Mips_relocate_functions::tlsrelhi16): Likewise. 1125 (Mips_relocate_functions::tlsrello16): Likewise. 1126 (Mips_relocate_functions::tlsrel32): Likewise. 1127 (Mips_relocate_functions::relsub): Likewise. 1128 (Mips_relocate_functions::releh): New method. 1129 (Mips_relocate_functions::rel64): Likewise. 1130 (Mips_got_info::record_local_got_symbol): Add is_section_symbol and 1131 pass it to Mips_got_entry. 1132 (Mips_got_info::add_local_entries): Pass addend argument 1133 to code functions, and for STT_SECTION symbols call 1134 add_symbolless_local_addend. 1135 (Mips_got_info::add_tls_entries): Pass addend argument to code 1136 functions. 1137 (Mips_relobj::do_read_symbols): Read gp value that was used to 1138 create object. 1139 (Mips_output_data_plt::plt_entry): Remove opcode from l[wd] 1140 instruction. Opcode for instruction will be selected later. 1141 (Target_mips::gc_process_relocs): Add case for SHT_RELA. 1142 (Target_mips::scan_relocatable_relocs): Likewise. 1143 (Target_mips::emit_relocs_scan): Likewise. 1144 (Target_mips::relocate_relocs): Likewise. 1145 (Target_mips::do_finalize_sections): Skip objects for merging 1146 processor specific flags in which all input sections will be 1147 discarded. 1148 (mips_get_size_for_reloc): Add case for R_MIPS_EH. 1149 (Target_mips::Scan::get_reference_flags): Likewise. 1150 (Target_mips::relocate_special_relocatable): Call rel26 method with 1151 calculate_only and calculated_value arguments. 1152 (Target_mips::Scan::local): Add case for R_MIPS_EH. Don't create a 1153 dynamic relocation against a readonly sections, and pass 1154 is_section_symbol to Mips_got_info::record_local_got_symbol. 1155 (Target_mips::Scan::global): Add case for R_MIPS_EH. Don't create a 1156 dynamic relocation against a readonly sections, and pass r_type 1157 and r_offset to Target_mips::copy_reloc. 1158 (Target_mips::Relocate::relocate): Add support for resolving 1159 relocations for Mips64. 1160 (Target_mips::mips_info): Add case for Mips64 default dynamic 1161 linker name. 1162 (Target_selector_mips): Correct emulation names. 1163 11642016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com> 1165 1166 * mips.cc (class Mips_output_data_la25_stub): Add 1167 do_print_to_mapfile function. 1168 11692016-03-17 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com> 1170 1171 * mips.cc (Mips_classify_reloc::put_r_info): Call 32bit version of 1172 elf_r_info. 1173 11742016-03-09 H.J. Lu <hongjiu.lu@intel.com> 1175 1176 * testsuite/plugin_layout_with_alignment.cc: Renamed to .. 1177 * testsuite/plugin_layout_with_alignment.c: This. 1178 * testsuite/Makefile.am (plugin_layout_with_alignment.o): Updated. 1179 (plugin_layout_with_alignment): Likewise. 1180 * testsuite/Makefile.in: Regenerated. 1181 11822016-03-08 Cary Coutant <ccoutant@gmail.com> 1183 1184 PR 19751 1185 * testsuite/Makefile.am (retain_symbols_file_test): Remove check 1186 for constructor. 1187 * testsuite/Makefile.in: Regenerate. 1188 * testsuite/dynamic_list.sh: Likewise. 1189 * testsuite/retain_symbols_file_test.sh: Likewise. 1190 11912016-03-08 Cary Coutant <ccoutant@gmail.com> 1192 1193 PR 19751 1194 * arm.cc (Reloc_stub::Key::name): Add unused attribute. 1195 * dirsearch.cc (Dir_caches::~Dir_caches): Likewise. 1196 11972016-03-08 Cary Coutant <ccoutant@gmail.com> 1198 Vladimir Radosavljevic <vladimir.radosavljevic@imgtec.com> 1199 1200 * output.cc (Output_reloc_writer): New type. 1201 (Output_data_reloc_base::do_write): Move implementation to template 1202 in output.h and replace with invocation of template. 1203 * output.h (Output_file): Move to top of file. 1204 (Output_reloc::get_symbol_index): Move to public interface. 1205 (Output_reloc::get_address): Likewise. 1206 (Output_data_reloc_base::do_write_generic): New function template. 1207 12082016-03-04 Cary Coutant <ccoutant@gmail.com> 1209 1210 PR gold/19019 1211 PR gold/19763 1212 * symtab.cc: Instantiate Sized_symbol::init_constant and 1213 Sized_symbol::init_undefined. 1214 12152016-03-03 Cary Coutant <ccoutant@gmail.com> 1216 1217 PR gold/19019 1218 * layout.h (Layout::add_target_specific_dynamic_tag): New function. 1219 * layout.cc (Layout::add_target_specific_dynamic_tag): New function. 1220 * mips.cc (Target_mips::make_symbol): Adjust function signature. 1221 * sparc.cc (Target_sparc::Target_sparc): Initialize register_syms_. 1222 (Target_sparc::do_is_defined_by_abi): Remove test for 1223 STT_SPARC_REGISTER. 1224 (Target_sparc::Register_symbol): New struct type. 1225 (Target_sparc::register_syms_): New data member. 1226 (Target_sparc<64, true>::sparc_info): Set has_make_symbol to true. 1227 (Target_sparc::make_symbol): New function. 1228 (Target_sparc::do_finalize_sections): Add register symbols and new 1229 dynamic table entries. 1230 * symtab.h (Sized_symbol::init_undefined): Add value parameter. 1231 (Symbol_table::add_target_global_symbol): New function. 1232 (Symbol_table::target_symbols_): New data member. 1233 * symtab.cc (Sized_symbol::init_undefined): Add value parameter. 1234 (Symbol_table::Symbol_table): Initialize target_symbols_. 1235 (Symbol_table::add_from_object): Pass additional parameters to 1236 Target::make_symbol. 1237 (Symbol_table::define_special_symbol): Likewise. 1238 (Symbol_table::add_undefined_symbol_from_command_line): Pass 0 for 1239 undefined symbol value. 1240 (Symbol_table::set_dynsym_indexes): Process target-specific symbols. 1241 (Symbol_table::sized_finalize): Likewise. 1242 (Symbol_table::sized_write_globals): Likewise. 1243 * target.h (Sized_target::make_symbol): Add name, st_type, object, 1244 st_shndx, and value parameters. 1245 12462016-03-03 Rafael Ávila de Espíndola <rafael.espindola@gmail.com> 1247 1248 * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and 1249 LDPK_WEAKUNDEF symbols. 1250 12512016-03-03 Than McIntosh <thanm@google.com> 1252 1253 * plugin.cc (Plugin::load): Include hooks for get_input_section_size 1254 and get_input_section_alignment in transfer vector. 1255 (get_input_section_alignment): New function. 1256 (get_input_section_size): New function. 1257 * testsuite/Makefile.am: Add plugin_layout_with_alignment.sh test. 1258 * testsuite/Makefile.in: [Regenerate.] 1259 * testsuite/plugin_section_alignment.cc: New test file. 1260 * testsuite/plugin_layout_with_alignment.cc: New test file. 1261 * testsuite/plugin_layout_with_alignment.sh: New test file. 1262 12632016-03-03 Evgenii Stepanov <eugenis@google.com> 1264 1265 * plugin.h (Pluginobj::get_symbol_resolution_info): Add version 1266 parameter. 1267 * plugin.cc (get_symbols_v3): New function. 1268 (Plugin::load): Add LDPT_GET_SYMBOLS_V3. 1269 (Pluginobj::get_symbol_resolution_info): Return LDPS_NO_SYMS when using 1270 new version. 1271 12722016-02-26 Egor Kochetov <egor.kochetov@intel.com> 1273 Cary Coutant <ccoutant@gmail.com> 1274 1275 PR gold/19735 1276 * ehframe.h (Cie::fde_encoding): New method. 1277 * ehframe.cc (Eh_frame::read_fde): Discard FDEs for zero-length 1278 address ranges. 1279 12802016-02-15 H.J. Lu <hongjiu.lu@intel.com> 1281 1282 * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass 1283 -mrelax-relocations=yes to $(TEST_AS). 1284 (x86_64_mov_to_lea6.o): Likewise. 1285 (x86_64_overflow_pc32.o): Remove duplicated target. 1286 * testsuite/Makefile.in: Regenerated. 1287 12882016-02-15 Marcin Kościelnicki <koriakin@0x04.net> 1289 1290 * s390.cc (Target_s390::match_view_u): New helper method. 1291 (Target_s390::do_is_call_to_non_split): New method. 1292 (Target_s390::ss_code_st_r14): New const. 1293 (Target_s390::ss_code_l_r14): New const. 1294 (Target_s390::ss_code_bras_8): New const. 1295 (Target_s390::ss_code_l_basr): New const. 1296 (Target_s390::ss_code_a_basr): New const. 1297 (Target_s390::ss_code_ear): New const. 1298 (Target_s390::ss_code_c): New const. 1299 (Target_s390::ss_code_larl): New const. 1300 (Target_s390::ss_code_brasl): New const. 1301 (Target_s390::ss_code_jg): New const. 1302 (Target_s390::ss_code_jgl): New const. 1303 (Target_s390::ss_match_mcount): New helper method. 1304 (Target_s390::ss_match_l): New helper method. 1305 (Target_s390::ss_match_ahi): New helper method. 1306 (Target_s390::ss_match_alfi): New helper method. 1307 (Target_s390::ss_match_cr): New helper method. 1308 (Target_s390::do_calls_non_split): New method. 1309 * testsuite/Makefile.am: Added new tests. 1310 * testsuite/Makefile.in: Regenerate. 1311 * testsuite/split_s390.sh: New test. 1312 * testsuite/split_s390_1_a1.s: New test. 1313 * testsuite/split_s390_1_a2.s: New test. 1314 * testsuite/split_s390_1_n1.s: New test. 1315 * testsuite/split_s390_1_n2.s: New test. 1316 * testsuite/split_s390_1_z1.s: New test. 1317 * testsuite/split_s390_1_z2.s: New test. 1318 * testsuite/split_s390_1_z3.s: New test. 1319 * testsuite/split_s390_1_z4.s: New test. 1320 * testsuite/split_s390_2_ns.s: New test. 1321 * testsuite/split_s390_2_s.s: New test. 1322 * testsuite/split_s390x_1_a1.s: New test. 1323 * testsuite/split_s390x_1_a2.s: New test. 1324 * testsuite/split_s390x_1_n1.s: New test. 1325 * testsuite/split_s390x_1_n2.s: New test. 1326 * testsuite/split_s390x_1_z1.s: New test. 1327 * testsuite/split_s390x_1_z2.s: New test. 1328 * testsuite/split_s390x_1_z3.s: New test. 1329 * testsuite/split_s390x_1_z4.s: New test. 1330 * testsuite/split_s390x_2_ns.s: New test. 1331 * testsuite/split_s390x_2_s.s: New test. 1332 13332016-02-11 Rahul Chaudhry <rahulchaudhry@google.com> 1334 1335 * aarch64.cc (Target_aarch64::scan_erratum_843419_span): Remove 1336 info message for every erratum 843419 found and fixed. 1337 13382016-02-07 Cary Coutant <ccoutant@gmail.com> 1339 1340 PR gold/18695 1341 * x86_64.cc (Target_x86_64::Relocate::relocate): Add additional 1342 information to relocation overflow errors. 1343 13442016-02-06 Cary Coutant <ccoutant@gmail.com> 1345 1346 PR gold/18695 1347 * x86_64.cc (X86_64_relocate_functions::pcrela32_check): Fix x32 1348 overflow checking when symbol value + addend < 0. 1349 13502016-02-06 Cary Coutant <ccoutant@gmail.com> 1351 1352 PR gold/19577 1353 * reloc.h (Limits): New class. 1354 (Bits::has_overflow32): Use min/max values from Limits. 1355 (Bits::has_unsigned_overflow32): Likewise. 1356 (Bits::has_signed_unsigned_overflow32): Likewise. 1357 (Bits::has_overflow): Likewise. 1358 (Bits::has_unsigned_overflow): Likewise. 1359 (Bits::has_signed_unsigned_overflow64): Likewise. 1360 13612016-02-06 Cary Coutant <ccoutant@gmail.com> 1362 1363 PR gold/19567 1364 * reloc.h (Relocate_functions::Overflow_check): Add comments. 1365 * x86_64.cc (X86_64_relocate_functions): New class. 1366 (Target_x86_64::Relocate::relocate): Use the new class. 1367 * testsuite/Makefile.am (x86_64_overflow_pc32): Add -Tdata option. 1368 (x32_overflow_pc32): New test case. 1369 * testsuite/Makefile.in: Regenerate. 1370 * testsuite/x32_overflow_pc32.sh: New script. 1371 * testsuite/x86_64_overflow_pc32.s: Remove .space directive. 1372 13732016-02-06 Cary Coutant <ccoutant@gmail.com> 1374 1375 PR gold/19577 1376 * reloc.h (Bits::has_unsigned_overflow32): Fix static_cast. 1377 (Bits::has_unsigned_overflow): Remove unnecessary static_cast. 1378 13792016-02-06 Cary Coutant <ccoutant@gmail.com> 1380 1381 PR gold/19577 1382 * reloc.h (Bits::has_unsigned_overflow32): Fix unsigned/signed 1383 comparison. 1384 (Bits::has_unsigned_overflow): Likewise. 1385 13862016-02-06 Marcin Kościelnicki <koriakin@0x04.net> 1387 1388 * i386.cc (Target_i386::is_call_to_non_split): Add view and view_size 1389 parameters. 1390 * reloc.cc (Sized_relobj_file::split_stack_adjust_reltype): Pass view 1391 and view_size to is_call_to_non_split. 1392 * target.cc (Target::is_call_to_non_split): Add view and view_size 1393 parameters. 1394 * target.h (class Target): Likewise. 1395 13962016-02-05 Sriraman Tallam <tmsriram@google.com> 1397 1398 * icf.cc (get_rel_addend): New function. 1399 (get_section_contents): Move merge section addend computation to a 1400 new function. Ignore negative values for SHT_REL and SHT_RELA addends. 1401 Fix bug to not read past the length of the section. 1402 14032016-02-05 Cary Coutant <ccoutant@gmail.com> 1404 Andrew Senkevich <andrew.senkevich@intel.com> 1405 1406 PR gold/18695 1407 * x86_64.cc (Target_x86_64::Relocate::relocate): Add overflow 1408 checking for R_X86_64_32, R_X86_64_32S, R_X86_64_PC32, and 1409 R_X86_64_PLT32. 1410 * testsuite/Makefile.am (x86_64_overflow_pc32): New test. 1411 * testsuite/x86_64_overflow_pc32.sh: New test script. 1412 * testsuite/x86_64_overflow_pc32.s: New source file. 1413 14142016-02-05 Cary Coutant <ccoutant@gmail.com> 1415 1416 PR gold/18695 1417 * reloc.h (Relocate_functions::Address): New typedef. 1418 (Relocate_functions::Addendtype): New typedef. 1419 (Relocate_functions::Overflow_check): New enum type. 1420 (Relocate_functions::Reloc_status): New enum type. 1421 (Relocate_functions::check_overflow): New function template. 1422 (Relocate_functions::rel): Add check parameter; check for overflow. 1423 (Relocate_functions::rel_unaligned): Likewise. 1424 (Relocate_functions::rela): Likewise. 1425 (Relocate_functions::pcrel): Likewise. 1426 (Relocate_functions::pcrel_unaligned): Likewise. 1427 (Relocate_functions::pcrela): Likewise. 1428 (Relocate_functions::rel8): Adjust parameter types. 1429 (Relocate_functions::rela8): Likewise. 1430 (Relocate_functions::pcrel8): Likewise. 1431 (Relocate_functions::pcrela8): Likewise. 1432 (Relocate_functions::rel16): Likewise. 1433 (Relocate_functions::rela168): Likewise. 1434 (Relocate_functions::pcrel16): Likewise. 1435 (Relocate_functions::pcrela16): Likewise. 1436 (Relocate_functions::rel32): Likewise. 1437 (Relocate_functions::rel32_unaligned): Likewise. 1438 (Relocate_functions::rela32): Likewise. 1439 (Relocate_functions::pcrel32): Likewise. 1440 (Relocate_functions::pcrel32_unaligned): Likewise. 1441 (Relocate_functions::pcrela32): Likewise. 1442 (Relocate_functions::rel8_check): New function. 1443 (Relocate_functions::rela8_check): New function. 1444 (Relocate_functions::pcrel8_check): New function. 1445 (Relocate_functions::pcrela8_check): New function. 1446 (Relocate_functions::rel16_check): New function. 1447 (Relocate_functions::rela168_check): New function. 1448 (Relocate_functions::pcrel16_check): New function. 1449 (Relocate_functions::pcrela16_check): New function. 1450 (Relocate_functions::rel32_check): New function. 1451 (Relocate_functions::rel32_unaligned_check): New function. 1452 (Relocate_functions::rela32_check): New function. 1453 (Relocate_functions::pcrel32_check): New function. 1454 (Relocate_functions::pcrel32_unaligned_check): New function. 1455 (Relocate_functions::pcrela32_check): New function. 1456 (Bits::has_unsigned_overflow32): New function. 1457 (Bits::has_unsigned_overflow): New function. 1458 * testsuite/Makefile.am (overflow_unittest): New test. 1459 * testsuite/Makefile.in: Regenerate. 1460 * testsuite/overflow_unittest.cc: New source file. 1461 14622016-02-04 Alan Modra <amodra@gmail.com> 1463 1464 * powerpc.cc (relocate): Adjust last patch for big-endian. 1465 14662016-02-02 Alan Modra <amodra@gmail.com> 1467 1468 * powerpc.cc (relocate): Further restrict ELFv2 entry optimization. 1469 14702016-01-15 Han Shen <shenhan@google.com> 1471 1472 PR gold/19472 - need pc-relative stubs. 1473 1474 * aarch64.cc (Reloc_stub::stub_type_for_reloc): Return PC-relative 1475 stub type for DSOs and pie executables. 1476 14772016-01-12 H.J. Lu <hongjiu.lu@intel.com> 1478 1479 * i386.cc (Target_i386::Classify_reloc::get_r_addend): Remove 1480 'typename'. 1481 14822016-01-12 Cary Coutant <ccoutant@gmail.com> 1483 1484 * arm.cc (Target_arm::Classify_reloc::get_r_addend): New method. 1485 * i386.cc (Target_i386::Classify_reloc::get_r_addend): New method. 1486 * mips.cc (Target_arm::Mips_classify_reloc::get_r_addend): (Both 1487 specializations) New method. 1488 14892016-01-11 Cary Coutant <ccoutant@gmail.com> 1490 1491 PR gold/19353 1492 * aarch64.cc (Target_aarch64::relocate_tls): Don't insist that 1493 we have a TLS segment for GD-to-IE optimization. 1494 * i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter. 1495 Adjust all calls. 1496 (Target_i386::tls_desc_gd_to_ie): Likewise. 1497 (Target_i386::relocate_tls): Don't insist that we have a TLS segment 1498 for TLSDESC GD-to-IE optimizations. 1499 * x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter. 1500 Adjust all calls. 1501 (Target_x86_64::tls_desc_gd_to_ie): Likewise. 1502 (Target_x86_64::relocate_tls): Don't insist that we have a TLS segment 1503 for TLSDESC GD-to-IE optimizations. 1504 15052016-01-11 Cary Coutant <ccoutant@gmail.com> 1506 1507 Refactor gold to enable support for MIPS-64 relocation format. 1508 1509 * gc.h (get_embedded_addend_size): Remove sh_type parameter. 1510 (gc_process_relocs): Remove sh_type template parameter. 1511 Use Classify_reloc to access r_sym, r_type, and r_addend fields. 1512 * object.h (Sized_relobj_file::split_stack_adjust): Add target 1513 parameter. 1514 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. 1515 * reloc-types.h (Reloc_types::copy_reloc_addend): (SHT_REL and SHT_RELA 1516 specializations) Remove. 1517 * reloc.cc (Emit_relocs_strategy): Rename and move to target-reloc.h. 1518 (Sized_relobj_file::emit_relocs_scan): Call Target::emit_relocs_scan(). 1519 (Sized_relobj_file::emit_relocs_scan_reltype): Remove. 1520 (Sized_relobj_file::split_stack_adjust): Add target parameter. 1521 Adjust all callers. 1522 (Sized_relobj_file::split_stack_adjust_reltype): Likewise. Call 1523 Target::get_r_sym() to get r_sym field from relocations. 1524 (Track_relocs::next_symndx): Call Target::get_r_sym(). 1525 * target-reloc.h (scan_relocs): Remove sh_type template parameter; 1526 add Classify_reloc template parameter. Use for accessing r_sym and 1527 r_type. 1528 (relocate_section): Likewise. 1529 (Default_classify_reloc): New class (renamed and moved from reloc.cc). 1530 (Default_scan_relocatable_relocs): Remove sh_type template parameter. 1531 (Default_scan_relocatable_relocs::Reltype): New typedef. 1532 (Default_scan_relocatable_relocs::reloc_size): New const. 1533 (Default_scan_relocatable_relocs::sh_type): New const. 1534 (Default_scan_relocatable_relocs::get_r_sym): New method. 1535 (Default_scan_relocatable_relocs::get_r_type): New method. 1536 (Default_emit_relocs_strategy): New class. 1537 (scan_relocatable_relocs): Replace sh_type template parameter with 1538 Scan_relocatable_relocs class. Use it to access r_sym and r_type 1539 fields. 1540 (relocate_relocs): Replace sh_type template parameter with 1541 Classify_reloc class. Use it to access r_sym and r_type fields. 1542 * target.h (Target::is_call_to_non_split): Replace r_type parameter 1543 with pointer to relocation. Adjust all callers. 1544 (Target::do_is_call_to_non_split): Likewise. 1545 (Target::emit_relocs_scan): New virtual method. 1546 (Sized_target::get_r_sym): New virtual method. 1547 * target.cc (Target::do_is_call_to_non_split): Replace r_type parameter 1548 with pointer to relocation. 1549 1550 * aarch64.cc (Target_aarch64::emit_relocs_scan): New method. 1551 (Target_aarch64::Relocatable_size_for_reloc): Remove. 1552 (Target_aarch64::gc_process_relocs): Use Default_classify_reloc. 1553 (Target_aarch64::scan_relocs): Likewise. 1554 (Target_aarch64::relocate_section): Likewise. 1555 (Target_aarch64::Relocatable_size_for_reloc::get_size_for_reloc): 1556 Remove. 1557 (Target_aarch64::scan_relocatable_relocs): Use Default_classify_reloc. 1558 (Target_aarch64::relocate_relocs): Use Default_classify_reloc. 1559 * arm.cc (Target_arm::Arm_scan_relocatable_relocs): Remove sh_type 1560 template parameter. 1561 (Target_arm::emit_relocs_scan): New method. 1562 (Target_arm::Relocatable_size_for_reloc): Replace with... 1563 (Target_arm::Classify_reloc): ...this. 1564 (Target_arm::gc_process_relocs): Use Classify_reloc. 1565 (Target_arm::scan_relocs): Likewise. 1566 (Target_arm::relocate_section): Likewise. 1567 (Target_arm::scan_relocatable_relocs): Likewise. 1568 (Target_arm::relocate_relocs): Likewise. 1569 * i386.cc (Target_i386::emit_relocs_scan): New method. 1570 (Target_i386::Relocatable_size_for_reloc): Replace with... 1571 (Target_i386::Classify_reloc): ...this. 1572 (Target_i386::gc_process_relocs): Use Classify_reloc. 1573 (Target_i386::scan_relocs): Likewise. 1574 (Target_i386::relocate_section): Likewise. 1575 (Target_i386::scan_relocatable_relocs): Likewise. 1576 (Target_i386::relocate_relocs): Likewise. 1577 * mips.cc (Mips_scan_relocatable_relocs): Remove sh_type template 1578 parameter. 1579 (Mips_reloc_types): New class template. 1580 (Mips_classify_reloc): New class template. 1581 (Target_mips::Reltype): New typedef. 1582 (Target_mips::Relatype): New typedef. 1583 (Target_mips::emit_relocs_scan): New method. 1584 (Target_mips::get_r_sym): New method. 1585 (Target_mips::Relocatable_size_for_reloc): Replace with 1586 Mips_classify_reloc. 1587 (Target_mips::copy_reloc): Use Mips_classify_reloc. 1588 (Target_mips::gc_process_relocs): Likewise. 1589 (Target_mips::scan_relocs): Likewise. 1590 (Target_mips::relocate_section): Likewise. 1591 (Target_mips::scan_relocatable_relocs): Likewise. 1592 (Target_mips::relocate_relocs): Likewise. 1593 (mips_get_size_for_reloc): New function, factored out from 1594 Relocatable_size_for_reloc::get_size_for_reloc. 1595 (Target_mips::Scan::local): Use Mips_classify_reloc. 1596 (Target_mips::Scan::global): Likewise. 1597 (Target_mips::Relocate::relocate): Likewise. 1598 * powerpc.cc (Target_powerpc::emit_relocs_scan): New method. 1599 (Target_powerpc::Relocatable_size_for_reloc): Remove. 1600 (Target_powerpc::gc_process_relocs): Use Default_classify_reloc. 1601 (Target_powerpc::scan_relocs): Likewise. 1602 (Target_powerpc::relocate_section): Likewise. 1603 (Powerpc_scan_relocatable_reloc): Convert to class template. 1604 (Powerpc_scan_relocatable_reloc::Reltype): New typedef. 1605 (Powerpc_scan_relocatable_reloc::reloc_size): New const. 1606 (Powerpc_scan_relocatable_reloc::sh_type): New const. 1607 (Powerpc_scan_relocatable_reloc::get_r_sym): New method. 1608 (Powerpc_scan_relocatable_reloc::get_r_type): New method. 1609 (Target_powerpc::scan_relocatable_relocs): Use 1610 Powerpc_scan_relocatable_reloc. 1611 (Target_powerpc::relocate_relocs): Use Default_classify_reloc. 1612 * s390.cc (Target_s390::emit_relocs_scan): New method. 1613 (Target_s390::Relocatable_size_for_reloc): Remove. 1614 (Target_s390::gc_process_relocs): Use Default_classify_reloc. 1615 (Target_s390::scan_relocs): Likewise. 1616 (Target_s390::relocate_section): Likewise. 1617 (Target_s390::Relocatable_size_for_reloc::get_size_for_reloc): 1618 Remove. 1619 (Target_s390::scan_relocatable_relocs): Use Default_classify_reloc. 1620 (Target_s390::relocate_relocs): Use Default_classify_reloc. 1621 * sparc.cc (Target_sparc::emit_relocs_scan): New method. 1622 (Target_sparc::Relocatable_size_for_reloc): Remove. 1623 (Target_sparc::gc_process_relocs): Use Default_classify_reloc. 1624 (Target_sparc::scan_relocs): Likewise. 1625 (Target_sparc::relocate_section): Likewise. 1626 (Target_sparc::Relocatable_size_for_reloc::get_size_for_reloc): 1627 Remove. 1628 (Target_sparc::scan_relocatable_relocs): Use Default_classify_reloc. 1629 (Target_sparc::relocate_relocs): Use Default_classify_reloc. 1630 * tilegx.cc (Target_tilegx::emit_relocs_scan): New method. 1631 (Target_tilegx::Relocatable_size_for_reloc): Remove. 1632 (Target_tilegx::gc_process_relocs): Use Default_classify_reloc. 1633 (Target_tilegx::scan_relocs): Likewise. 1634 (Target_tilegx::relocate_section): Likewise. 1635 (Target_tilegx::Relocatable_size_for_reloc::get_size_for_reloc): 1636 Remove. 1637 (Target_tilegx::scan_relocatable_relocs): Use Default_classify_reloc. 1638 (Target_tilegx::relocate_relocs): Use Default_classify_reloc. 1639 * x86_64.cc (Target_x86_64::emit_relocs_scan): New method. 1640 (Target_x86_64::Relocatable_size_for_reloc): Remove. 1641 (Target_x86_64::gc_process_relocs): Use Default_classify_reloc. 1642 (Target_x86_64::scan_relocs): Likewise. 1643 (Target_x86_64::relocate_section): Likewise. 1644 (Target_x86_64::Relocatable_size_for_reloc::get_size_for_reloc): 1645 Remove. 1646 (Target_x86_64::scan_relocatable_relocs): Use Default_classify_reloc. 1647 (Target_x86_64::relocate_relocs): Use Default_classify_reloc. 1648 1649 * testsuite/testfile.cc (Target_test::emit_relocs_scan): New method. 1650 16512016-01-01 Alan Modra <amodra@gmail.com> 1652 1653 Update year range in copyright notice of all files. 1654 1655For older changes see ChangeLog-0815 1656 1657Copyright (C) 2016 Free Software Foundation, Inc. 1658 1659Copying and distribution of this file, with or without modification, 1660are permitted in any medium without royalty provided the copyright 1661notice and this notice are preserved. 1662 1663Local Variables: 1664mode: change-log 1665left-margin: 8 1666fill-column: 74 1667version-control: never 1668End: 1669