ChangeLog-2016 64 KB

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