[GOLD] PowerPC relocation signed overflow check
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2019-08-02 Alan Modra <amodra@gmail.com>
2
3 * powerpc.cc (Powerpc_relocate_functions::rela, rela_ua): Perform
4 signed right shift for signed overflow check.
5
6 2019-07-29 Martin Liska <mliska@suse.cz>
7
8 PR 24768
9 * layout.h (class Layout): Add is_lto_slim_object and
10 set_lto_slim_object.
11 * object.cc (struct lto_section): Add lto_slim_object_.
12 (big_endian>::do_layout): Parse content of
13 .gnu_lto_.lto section.
14 (big_endian>::do_add_symbols): Report error for a missing
15 LTO plugin.
16
17 2019-07-13 Alan Modra <amodra@gmail.com>
18
19 * powerpc.cc (xlate_pcrel_opt): New function.
20 (Target_powerpc::Relocate::relocate): Optimise PCREL34 and
21 GOT_PCREL34 sequences marked with PCREL_OPT.
22
23 2019-07-13 Alan Modra <amodra@gmail.com>
24
25 * powerpc.cc (Powerpc_relobj::make_got_relative): New function.
26 (relative_value_is_known): New functions.
27 (Target_powerpc::Relocate::relocate): Edit code using
28 GOT16_HA, GOT16_LO_DS, and GOT_PCREL34 relocs.
29
30 2019-07-13 Alan Modra <amodra@gmail.com>
31
32 * powerpc.cc (Target_powerpc): Add powerxx_stubs_ and accessor
33 functions.
34 (Target_powerpc::maybe_skip_tls_get_addr_call): Handle PLT_PCREL34
35 and PLT_PCREL34_NOTOC relocs.
36 (Powerpc_relocate_functions): Add addr34, addr34_hi, addr34_ha,
37 addr28, addr16_higher34, addr16_highera34, addr16_highest34,
38 addr16_highest34a functions.
39 (li_11_0, ori_11_11_0, sldi_11_11_34): Define.
40 (paddi_12_pc, pld_12_pc, pnop): Define.
41 (d34, ha34): New inline functions.
42 (Stub_table::add_plt_call_entry): Handle powerxx_stubs.
43 (Stub_table::add_eh_frame): Likewise.
44 (build_powerxx_offset): New function.
45 (Stub_table::plt_call_size): Handle powerxx_stubs.
46 (Stub_table::branch_stub_size): Likewise.
47 (Stub_table::do_write): Likewise.
48 (Target_powerpc::Scan::get_reference_flags): Handle new relocs.
49 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc: Likewise.
50 (Target_powerpc::Scan::local, global, relocate): Likewise.
51
52 2019-07-13 Alan Modra <amodra@gmail.com>
53
54 * ehframe.cc (Fde::operator==): Delete.
55 (Cie::remove_fde): Delete.
56 (Eh_frame::remove_ehframe_for_plt): Delete fde_data and fde_length
57 parameters. Remove all post-map plt FDEs.
58 * ehframe.h (Fde:post_map): Make const, add variant to compare plt.
59 (Fde::operator==): Delete.
60 (Cie::remove_fde): Implement here.
61 (Cie::last_fde): New accessor.
62 (Eh_frame::remove_ehframe_for_plt): Update prototype.
63 * layout.cc (Layout::remove_eh_frame_for_plt): Delete fde_data and
64 fde_length parameters.
65 * layout.h (Layout::remove_eh_frame_for_plt): Update prototype.
66 * powerpc.cc (Stub_table::tls_get_addr_opt_bctrl_): Delete.
67 (Stub_table::plt_fde_len_, plt_fde_, init_plt_fde): Delete.
68 (Stub_table::add_plt_call_entry): Don't set tls_get_addr_opt_bctrl_.
69 (eh_advance): New function.
70 (stub_sort): New function.
71 (Stub_table::add_eh_frame): Emit eh_frame for notoc plt calls and
72 branches as well as __tls_get_addr_opt plt call stub.
73 (Stub_table::remove_eh_frame): Update to suit.
74
75 2019-07-13 Alan Modra <amodra@gmail.com>
76
77 * powerpc.cc (Target_powerpc::maybe_skip_tls_get_addr_call): Handle
78 notoc calls.
79 (is_branch_reloc): Template on size. Return true for REL24_NOTOC.
80 Update all callers.
81 (max_branch_delta): Likewise.
82 (Target_powerpc::Branch_info::make_stub): Add a stub for notoc
83 calls to functions needing a valid toc pointer.
84 (Target_powerpc::do_relax): Layout stubs again if any need resize.
85 (add_12_11_12, addi_12_11, addis_12_11, ldx_12_11_12, ori_12_12_0),
86 (oris_12_12_0, sldi_12_12_32): Define.
87 (Stub_table::Plt_stub_ent): Add notoc_ and iter_ fields.
88 (Stub_table::Branch_stub_key, Branch_stub_key_hash): Rename from
89 Branch_stub_ent and Branch_stub_ent hash. Remove save_res_ from key.
90 (Stub_table::Branch_stub_ent): New struct.
91 (class Stub_table): Add need_resize and resizing vars.
92 (Stub_table::need_resize, branch_size): New accessors.
93 (Stub_table::set_resizing): New function.
94 (Stub_table::add_plt_call_entry): Handle notoc calls and resizing
95 on seeing such or a tocsave stubs after a normal stub using the
96 same sym.
97 (Stub_table::add_long_branch_entry): Similarly.
98 (Stub_table::find_long_branch_entry): Return a Branch_stub_ent*.
99 (Stub_table::define_stub_syms): Adjust
100 (Stub_table::build_tls_opt_head, build_tls_opt_tail): New functions.
101 (build_notoc_offset): New function.
102 (Stub_table::plt_call_size): Move out of line. Handle notoc calls.
103 (Stub_table::branch_stub_size): Similarly.
104 (Stub_table::do_write): Separate loop for ELFv2 stubs, handling
105 notoc calls. Simplify ELFv1 loop. Output notoc branch stubs.
106 Use build_tls_opt_head and build_tls_opt_tail.
107 (Target_powerpc::Scan::get_reference_flags): Handle REL24_NOTOC.
108 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Likewise,
109 and PLTSEQ_NOTOC and PLTCALL_NOTOC.
110 (Target_powerpc::Scan::local, global, relocate): Likewise.
111
112 2019-06-28 Alan Modra <amodra@gmail.com>
113
114 * powerpc.cc (Target_powerpc::Relocate::relocate): Don't look
115 at next/previous reloc when relnum is -1.
116
117 2019-06-28 Alan Modra <amodra@gmail.com>
118
119 * powerpc.cc (Stub_table::plt_error): New function.
120 (Stub_table::do_write): Use it.
121 (Output_data_glink::do_write): Don't segfault emitting linkage
122 table error.
123
124 2019-06-28 Alan Modra <amodra@gmail.com>
125
126 * powerpc.cc (Target_powerpc::Scan::get_reference_flags): Handle
127 REL16_HIGH* relocs.
128 (Target_powerpc::Scan::local): Likewise.
129 (Target_powerpc::Scan::global): Likewise.
130 (Target_powerpc::Relocate::relocate): Likewise.
131
132 2019-06-10 Martin Liska <mliska@suse.cz>
133
134 * errors.h: Include string.
135
136 2019-05-10 Joshua Oreman <oremanj@hudson-trading.com>
137
138 PR gold/21066
139 * gc.h (gc_process_relocs): Track relocations in .eh_frame sections
140 when ICF is enabled, even though the .eh_frame sections themselves
141 are not foldable.
142 * icf.cc (get_section_contents): Change arguments to permit operation
143 on just part of a section. Include extra identity regions in the
144 referring section's contents recursively.
145 (match_sections): Lock object here instead of in get_section_contents
146 so that get_section_contents can operate recursively.
147 (Icf::add_ehframe_links): New method.
148 (Icf::find_identical_sections): Pass .eh_frame sections to
149 add_ehframe_links(). Increase default iteration count from 2 to 3
150 because handling exception info typically requires one extra iteration.
151 * icf.h (Icf::extra_identity_list_): New data member with accessor.
152 (is_section_foldable_candidate): Include .gcc_except_table sections.
153 * options.h: Update documentation for new default ICF iteration count.
154 * testsuite/Makefile.am (icf_test_pr21066): New test case.
155 * testsuite/Makefile.in: Regenerate.
156 * testsuite/icf_test_pr21066.cc: New source file.
157 * testsuite/icf_test_pr21066.sh: New test script.
158
159 2019-02-19 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
160
161 PR gold/23870
162 * aarch64.cc (Target_aarch64::Scan::global): Check if a symbol with
163 R_AARCH64_MOVW_.ABS_* relocations requires a PLT entry.
164 * testsuite/Makefile.am: Add aarch64_pr23870 test case.
165 * testsuite/Makefile.in: Regenerate.
166 * testsuite/aarch64_pr23870_bar.c: New file.
167 * testsuite/aarch64_pr23870_foo.c: New file.
168 * testsuite/aarch64_pr23870_main.S: New file.
169
170 2019-02-12 Nick Clifton <nickc@redhat.com>
171
172 * po/fr.po: Updated French translation.
173
174 2019-01-21 Nick Clifton <nickc@redhat.com>
175
176 * po/uk.po: Updated Ukranian translation.
177
178 2019-01-19 Nick Clifton <nickc@redhat.com>
179
180 * po/gold.pot: Regenerate.
181
182 2018-06-24 Nick Clifton <nickc@redhat.com>
183
184 2.32 branch created.
185
186 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
187
188 * configure: Regenerate.
189
190 2019-01-01 Alan Modra <amodra@gmail.com>
191
192 Update year range in copyright notice of all files.
193
194 For older changes see ChangeLog-2018
195 \f
196 Copyright (C) 2019 Free Software Foundation, Inc.
197
198 Copying and distribution of this file, with or without modification,
199 are permitted in any medium without royalty provided the copyright
200 notice and this notice are preserved.
201
202 Local Variables:
203 mode: change-log
204 left-margin: 8
205 fill-column: 74
206 version-control: never
207 End:
This page took 0.063942 seconds and 5 git commands to generate.