Correct the definition of _gp and _GLOBAL_OFFSET_TABLE_ symbols for MIPS.
[external/binutils.git] / gold / ChangeLog
1 2017-03-15  Vladimir Radosavljevic  <Vladimir.Radosavljevic@imgtec.com>
2
3         * mips.cc (symbol_refs_local): Return false if a symbol
4         is from a dynamic object.
5         (Target_mips::got_section): Make _GLOBAL_OFFSET_TABLE_ STV_HIDDEN.
6         (Target_mips::set_gp): Refactor.  Make _gp STT_NOTYPE and
7         STB_LOCAL.
8         (Target_mips::do_finalize_sections): Set _gp after all the checks
9         for creating .got are done.
10         (Target_mips::Scan::global): Remove unused code.
11
12 2017-02-22  Alan Modra  <amodra@gmail.com>
13
14         * powerpc.cc (Target_powerpc::make_iplt_section): Check that
15         output_section exists before attempting add_output_section_data.
16         (Target_powerpc::make_brlt_section): Likewise.
17
18 2017-02-15  Vladimir Radosavljevic  <Vladimir.Radosavljevic@imgtec.com>
19
20         * mips.cc (Target_mips::Scan::get_reference_flags): Remove
21         gold_unreachable from default case.
22
23 2017-02-15  Vladimir Radosavljevic  <Vladimir.Radosavljevic@imgtec.com>
24
25         PR gold/21111
26         * mips.cc (Mips_relocate_functions::relhigher): New method.
27         (Mips_relocate_functions::relhighest): Likewise.
28         (mips_get_size_for_reloc): Add support for relocs: R_MIPS_HIGHER and
29         R_MIPS_HIGHEST.
30         (Target_mips::Scan::local): Add support for relocs: R_MIPS_HIGHER,
31         R_MIPS_HIGHEST, R_MICROMIPS_HIGHER and R_MICROMIPS_HIGHEST.
32         (Target_mips::Scan::global): Likewise.
33         (Target_mips::Scan::get_reference_flags): Likewise.
34         (Target_mips::Relocate::relocate): Call static methods for resolving
35         HIGHER and HIGHEST relocations.
36
37 2017-02-03  Rahul Chaudhry  <rahulchaudhry@google.com>
38
39         * x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
40         Return true even when building pie binaries.
41         (Target_x86_64::possible_function_pointer_reloc): Check opcode
42         for R_X86_64_PC32 relocations.
43         (Target_x86_64::local_reloc_may_be_function_pointer): Pass
44         extra arguments to local_reloc_may_be_function_pointer.
45         (Target_x86_64::global_reloc_may_be_function_pointer): Likewise.
46         * gc.h (gc_process_relocs): Add check for STT_FUNC.
47         * testsuite/Makefile.am (icf_safe_pie_test): New test case.
48         * testsuite/Makefile.in: Regenerate.
49         * testsuite/icf_safe_pie_test.sh: New shell script.
50
51 2017-02-03  Alan Modra  <amodra@gmail.com>
52
53         * powerpc.cc (Powerpc_relobj::make_toc_relative): Don't crash
54         when no .toc section exists.
55
56 2017-01-31  Cary Coutant  <ccoutant@gmail.com>
57
58         PR gold/21090
59         * x86_64.cc (Target_x86_64::can_convert_mov_to_lea): Add check
60         for predefined symbol.
61         (Target_x86_64::Relocate::relocate): Fix formatting.
62
63 2017-01-23  Rahul Chaudhry  <rahulchaudhry@google.com>
64
65         * testsuite/icf_safe_so_test.sh: Use "set -e".
66         * testsuite/icf_safe_test.sh: Likewise.
67         * testsuite/icf_test.sh: Likewise.
68
69 2017-01-23  Vladimir Radosavljevic  <Vladimir.Radosavljevic@imgtec.com>
70
71         * mips.cc (Mips_output_data_plt::rel_plt): Remove const from return
72         type.
73         (Target_mips::make_plt_entry): Make the sh_info field of .rel.plt
74         point to .plt.
75
76 2017-01-23  Vladimir Radosavljevic  <Vladimir.Radosavljevic@imgtec.com>
77
78         PR gold/21054
79         * mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
80         to the dynamic symbol table if it is forced to local visibility.
81         (Target_mips::do_finalize_sections): Don't add __RLD_MAP symbol to the
82         dynamic symbol table if it is forced to local visibility.
83
84 2017-01-20  Nick Clifton  <nickc@redhat.com>
85
86         * aarch64.cc (Stub_template_repertoire): Change ST_E_835769_INSNS
87         from a pointer to an array.
88
89 2017-01-13  H.J. Lu  <hongjiu.lu@intel.com>
90
91         PR gold/21040
92         * powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
93         Cast 0x80008000 to uint64_t.
94
95 2017-01-12  Cary Coutant  <ccoutant@gmail.com>
96
97         * object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
98
99 2017-01-11  Cary Coutant  <ccoutant@gmail.com>
100
101         PR gold/21040
102         * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
103         Remove unnecessary 'typename' keyword.
104         (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
105         (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
106         (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
107         (Output_data_plt_x86_64_bnd::do_write): Likewise.
108
109 2017-01-11  Cary Coutant  <ccoutant@gmail.com>
110
111         PR gold/21040
112         * x86_64.cc (Output_data_plt_x86_64_bnd::do_fill_first_plt_entry):
113         Remove unnecessary 'typename' keyword.
114         (Output_data_plt_x86_64_bnd::do_fill_plt_entry): Likewise.
115         (Output_data_plt_x86_64_bnd::do_fill_tlsdesc_entry): Likewise.
116         (Output_data_plt_x86_64_bnd::fill_aplt_entry): Likewise.
117         * testsuite/copy_test_relro_1.cc (p, b, c, q): Add separate extern
118         declarations.
119
120 2017-01-11  Cary Coutant  <ccoutant@gmail.com>
121
122         PR gold/21039
123         * testsuite/script_test_13.sh: Adjust patterns to work for i386.
124         * testsuite/script_test_15a.sh: Likewise.
125         * testsuite/script_test_15b.sh: Likewise.
126         * testsuite/script_test_15c.sh: Likewise.
127
128 2017-01-11  Alan Modra  <amodra@gmail.com>
129
130         * powerpc.cc (class Powerpc_copy_relocs): New.
131         (Powerpc_copy_relocs::emit): New function.
132         (Powerpc_relobj::relatoc_, toc_, no_toc_opt_): New variables.
133         (Powerpc_relobj::toc_shndx, set_no_toc_opt, no_toc_opt): New inlines.
134         (Powerpc_relobj::do_relocate_sections): New function.
135         (Powerpc_relobj::make_toc_relative): Likewise.
136         (Powerpc_relobj::do_find_special_sections): Stash away .rela.toc
137         and .toc too.
138         (ok_lo_toc_insn): Move earlier, and handle more insns.
139         (Target_powerpc::Scan::local): If optimizing toc accesses, set
140         no_toc_opt for entries we can't edit.  Check insn validity.
141         Emit "toc optimization is not supported" warning, downgraded
142         from error.
143         (Target_powerpc::Scan::global): Likewise.
144         (Target_powerpc::Relocate::relocate): Edit TOC indirect code
145         to TOC relative.  Don't emit "toc optimization is not supported"
146         error here.
147
148 2017-01-10  Cary Coutant  <ccoutant@gmail.com>
149
150         * aarch64.cc (AArch64_relobj::do_relocate_sections): Call
151         Sized_relobj_file::relocate_section_range().
152         * arm.cc (Arm_relobj::do_relocate_sections): Likewise.
153         * object.h (Sized_relobj_file::relocate_section_range): New method.
154         * reloc.cc (Sized_relobj_file::do_relocate_sections): Move
155         implementation...
156         (Sized_relobj_file::relocate_section_range): ...to new method.
157
158 2017-01-10  Alan Modra  <amodra@gmail.com>
159
160         * testsuite/ver_test_8.sh: Accept .TOC. in lieu of
161         _GLOBAL_OFFSET_TABLE_.  Allow zero count.
162         * testsuite/copy_test_relro_1.cc (c, q): New vars.
163         * testsuite/copy_test_relro.cc: Rewrite to test read-only
164         status of variables directly.  Reference new vars in
165         read-only data.
166
167 2017-01-10  Alan Modra  <amodra@gmail.com>
168
169         * options.h: Add --secure-plt option.
170         * powerpc.cc (Target_powerpc::Scan::local): Detect and error
171         on -fPIC -mbss-plt code.
172         (Target_powerpc::Scan::global): Likewise.
173
174 2017-01-09  Alan Modra  <amodra@gmail.com>
175
176         * powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of
177         ".rela.plt" at ".plt".
178
179 2017-01-07  Alan Modra  <amodra@gmail.com>
180
181         * powerpc.cc: Use shorter equivalent elfcpp typedef for
182         Reltype and reloc_size throughout.
183         (Target_powerpc::symval_for_branch): Exclude dynamic symbols.
184         (Target_powerpc::Scan::local): Use local var r_sym.
185         (Target_powerpc::Scan::global: Likewise.
186         (Target_powerpc::Relocate::relocate): Delete shadowing r_sym.
187
188 2017-01-02  Alan Modra  <amodra@gmail.com>
189
190         Update year range in copyright notice of all files.
191
192 For older changes see ChangeLog-2016
193 \f
194 Copyright (C) 2017 Free Software Foundation, Inc.
195
196 Copying and distribution of this file, with or without modification,
197 are permitted in any medium without royalty provided the copyright
198 notice and this notice are preserved.
199
200 Local Variables:
201 mode: change-log
202 left-margin: 8
203 fill-column: 74
204 version-control: never
205 End: