* symtab.cc (Symbol_table::add_from_object): If we don't use the
[deliverable/binutils-gdb.git] / gold / ChangeLog
CommitLineData
479f6503
ILT
12008-03-29 Ian Lance Taylor <iant@google.com>
2
3 * symtab.cc (Symbol_table::add_from_object): If we don't use the
4 new symbol when resolving, don't call set_is_default.
5 * testsuite/ver_test_7.cc: New file.
6 * testsuite/ver_test_7.sh: New file.
7 * testsuite/Makefile.am (ver_test_7.so): New target.
8 (ver_test_7.o): New target.
9 (check_SCRIPTS): Add ver_test_7.sh.
10 (check_DATA): Add ver_test_7.syms.
11 (ver_test_7.syms): New target.
12
2fd32231
ILT
132008-03-28 Ian Lance Taylor <iant@google.com>
14
15 * layout.cc (Layout::layout): If we see an input section with a
16 name that needs sorting, set the must_sort flag for the output
17 section.
18 (Layout::make_output_section): If the name of the output section
19 indicates that it might require sorting, set the may_sort flag.
20 * output.h (Output_section::may_sort_attached_input_sections): New
21 function.
22 (Output_section::set_may_sort_attached_input_sections): New
23 function.
24 (Output_section::must_sort_attached_input_sections): New
25 function.
26 (Output_section::set_must_sort_attached_input_sections): New
27 function.
28 (class Output_section): Declare Input_section_sort_entry. Define
29 Input_section_sort_compare. Declare
30 sort_attached_input_sections. Add new fields:
31 may_sort_attached_input_sections_,
32 must_sort_attached_input_sections_,
33 attached_input_sections_are_sorted_.
34 * output.cc (Output_section::Output_section): Initialize new
35 fields.
36 (Output_section::add_input_section): Add an entry to
37 input_sections_ if may_sort or must_sort are true.
38 (Output_section::set_final_data_size): Call
39 sort_attached_input_sections if necessary.
40 (Output_section::Input_section_sort_entry): Define new class.
41 (Output_section::Input_section_sort_compare::operator()): New
42 function.
43 (Output_section::sort_attached_input_sections): New function.
44 * configure.ac: Check whether the compiler supports constructor
45 priorities. Define a CONSTRUCTOR_PRIORITY automake conditional.
46 * testsuite/initpri1.c: New file.
47 * testsuite/Makefile.am (check_PROGRAMS): Add initpri1 if
48 CONSTRUCTOR_PRIORITY.
49 (initpri1_SOURCES, initpri1_DEPENDENCIES): New variables.
50 (initpri1_LDFLAGS): New variable.
51 * configure, Makefile.in, testsuite/Makefile.in: Rebuild.
52
18e6b24e
ILT
532008-03-27 Ian Lance Taylor <iant@google.com>
54
49bdd526
ILT
55 * common.cc (Sort_commons::operator): Correct sorting algorithm.
56 * testsuite/common_test_1.c: New file.
57 * testsuite/Makefile.am (check_PROGRAMS): Add common_test_1.
58 (common_test_1_SOURCES): New variable.
59 (common_test_1_DEPENDENCIES): New variable.
60 (common_test_1_LDFLAGS): New variable.
61
18e6b24e
ILT
62 * symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
63 and commons_ correctly when NAME/VERSION does not override
64 NAME/NULL.
65 * testsuite/ver_test_6.c: New file.
66 * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
67 (ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
68 (ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.
69
04bf7072
ILT
702008-03-26 Ian Lance Taylor <iant@google.com>
71
5871526f
ILT
72 * symtab.cc (Symbol_table::add_from_relobj): Don't set the version
73 of an undefined symbol from a version script.
74 * testsuite/Makefile.am (ver_test_5.so): New target.
75 (ver_test_5.o): New target.
76 (check_SCRIPTS): Add ver_test_5.sh.
77 (check_DATA): Add ver_test_5.syms.
78 (ver_test_5.syms): New target.
79 * testsuite/ver_test_5.cc: New file.
80 * testsuite/ver_test_5.script: New file.
81 * testsuite/ver_test_5.sh: New file.
82 * Makefile.in, testsuite/Makefile.in: Rebuild.
83
04bf7072
ILT
84 PR gold/5986
85 Fix problems building gold with gcc 4.3.0.
86 * gold.h (TEMPLATE_ATTRIBUTE_PRINTF_4): Define.
87 (gold_error_at_location, gold_warning_at_location): Use it.
88 * configure.ac: Check whether we can compile and use a template
89 function with a printf attribute.
90 * x86_64.cc (Target_x86_64::do_code_fill): Swap out a 32-bit value
91 when jumping over bytes.
92 * object.cc: Instantiate Object::read_section_data.
93 * debug.h: Include <cstring>
94 * dwarf_reader.cc: Include <algorithm>
95 * main.cc: Include <cstring>.
96 * options.cc: Include <cstring>.
97 * output.cc: Include <cstring>.
98 * script.cc: Include <cstring>.
99 * script.h: Include <string>.
100 * symtab.cc: Include <cstring> and <algorithm>.
101 * target-select.cc: Include <cstring>.
102 * version.cc: Include <string>.
103 * testsuite/testmain.cc: Include <cstdlib>.
104 * configure, config.in: Rebuild.
105
874c5b28
ILT
1062008-03-25 Ian Lance Taylor <iant@google.com>
107
819d6c3a
ILT
108 * options.cc: Include "../bfd/bfdver.h".
109 (options::help): Print bug reporting address.
110
f4b2c6f5
ILT
111 * version.cc (print_version): Adjust output for current value of
112 BFD_VERSION_STRING.
113
114 * NEWS: New file.
115
e96caa79
ILT
116 * options.cc (options::help): Print list of supported targets.
117 * target-select.h: Include <vector>.
118 (class Target_selector): Make machine_, size_, and is_big_endian_
119 fields const. Add bfd_name_ and instantiated_target_ fields.
120 (Target_selector::Target_selector): Add bfd_name parameter.
121 (Target_selector::recognize): Make non-virtual, call
122 do_recognize.
123 (Target_selector::recognize_by_name): Make non-virtual, call
124 do_recognize_by_name.
125 (Target_selector::supported_names): New function.
126 (Target_selector::bfd_name): New function.
127 (Target_selector::do_instantiate_target): New pure virtual
128 function.
129 (Target_selector::do_recognize): New virtual function.
130 (Target_selector::do_recognize_by_name): New virtual function.
131 (Target_selector::instantiate_target): New private function.
132 (supported_target_names): Declare.
133 * target-select.cc (Target_selector::Target_selector): Update for
134 new parameter and fields.
135 (select_target_by_name): Check that the name matches before
136 calling recognize_by_name.
137 (supported_target_names): New function.
138 * i386.cc (class Target_selector_i386): Update Target_selector
139 constructor call. Remove recognize and recognize_by_name. Add
140 do_instantiate_target.
141 * x86_64.cc (class Target_selector_x86_64): Likewise.
142 * testsuite/testfile.cc (class Target_selector_test): Update for
143 changes to Target_selector.
144
874c5b28
ILT
145 * README: Rewrite, with some notes on unsupported features.
146
0a65a3a7
CC
1472008-03-24 Cary Coutant <ccoutant@google.com>
148
149 * i386.cc (Target_i386::Got_type): New enum declaration.
150 (Target_i386::Scan::local): Updated callers of Output_data_got
151 member functions.
152 (Target_i386::Scan::global): Likewise.
153 (Target_i386::Relocate::relocate): Likewise.
154 (Target_i386::Relocate::relocate_tls): Likewise.
155 * object.h (Got_offset_list): New class.
156 (Sized_relobj::local_has_got_offset): Added got_type parameter.
157 (Sized_relobj::local_got_offset): Likewise.
158 (Sized_relobj::set_local_got_offset): Likewise.
159 (Sized_relobj::local_has_tls_got_offset): Removed.
160 (Sized_relobj::local_tls_got_offset): Removed.
161 (Sized_relobj::set_local_tls_got_offset): Removed.
162 (Sized_relobj::Local_got_offsets): Changed to store a list of offsets.
163 * output.cc (Output_data_got::add_global): Added got_type parameter.
164 (Output_data_got::add_global_with_rel): Likewise.
165 (Output_data_got::add_global_with_rela): Likewise.
166 (Output_data_got::add_global_pair_with_rel): New function.
167 (Output_data_got::add_global_pair_with_rela): New function.
168 (Output_data_got::add_local): Added got_type parameter.
169 (Output_data_got::add_local_with_rel): Likewise.
170 (Output_data_got::add_local_with_rela): Likewise.
171 (Output_data_got::add_local_pair_with_rel): New function.
172 (Output_data_got::add_local_pair_with_rela): New function.
173 (Output_data_got::add_global_tls): Removed.
174 (Output_data_got::add_global_tls_with_rel): Removed.
175 (Output_data_got::add_global_tls_with_rela): Removed.
176 (Output_data_got::add_local_tls): Removed.
177 (Output_data_got::add_local_tls_with_rel): Removed.
178 (Output_data_got::add_local_tls_with_rela): Removed.
179 * output.h (Output_data_got::add_global): Added got_type parameter.
180 (Output_data_got::add_global_with_rel): Likewise.
181 (Output_data_got::add_global_with_rela): Likewise.
182 (Output_data_got::add_global_pair_with_rel): New function.
183 (Output_data_got::add_global_pair_with_rela): New function.
184 (Output_data_got::add_local): Added got_type parameter.
185 (Output_data_got::add_local_with_rel): Likewise.
186 (Output_data_got::add_local_with_rela): Likewise.
187 (Output_data_got::add_local_pair_with_rel): New function.
188 (Output_data_got::add_local_pair_with_rela): New function.
189 (Output_data_got::add_global_tls): Removed.
190 (Output_data_got::add_global_tls_with_rel): Removed.
191 (Output_data_got::add_global_tls_with_rela): Removed.
192 (Output_data_got::add_local_tls): Removed.
193 (Output_data_got::add_local_tls_with_rel): Removed.
194 (Output_data_got::add_local_tls_with_rela): Removed.
195 * resolve.cc (Symbol::override_base_with_special): Removed
196 reference to has_got_offset_ field.
197 * symtab.cc (Symbol::init_fields): Replaced initialization
198 of got_offset_ with got_offsets_. Removed initialization
199 of has_got_offset_
53fcba31 200 * symtab.h (Symbol::has_got_offset): Aded got_type parameter.
0a65a3a7
CC
201 (Symbol::got_offset): Likewise.
202 (Symbol::set_got_offset): Likewise.
203 (Symbol::has_tls_got_offset): Removed.
204 (Symbol::tls_got_offset): Removed.
205 (Symbol::set_tls_got_offset): Removed.
206 (Symbol::got_offset_): Removed.
207 (Symbol::tls_mod_got_offset_): Removed.
208 (Symbol::tls_pair_got_offset_): Removed.
209 (Symbol::got_offsets_): New field.
210 (Symbol::has_got_offset): Removed.
211 (Symbol::has_tls_mod_got_offset): Removed.
212 (Symbol::has_tls_pair_got_offset): Removed.
213 * x86_64.cc (Target_x86_64::Got_type): New enum declaration.
214 (Target_x86_64::Scan::local): Updated callers of Output_data_got
215 member functions.
216 (Target_x86_64::Scan::global): Likewise.
217 (Target_x86_64::Relocate::relocate): Likewise.
218 (Target_x86_64::Relocate::relocate_tls): Likewise.
219
bd52eafb
BE
2202008-03-25 Ben Elliston <bje@au.ibm.com>
221
222 * yyscript.y: Fix spelling error in comment.
223
8b105e34
ILT
2242008-03-24 Ian Lance Taylor <iant@google.com>
225
8ed814a9
ILT
226 * options.h (class General_options): Define build_id option.
227 * layout.h (class Layout): Declare write_build_id, create_note,
228 create_build_id. Add build_id_note_ member.
229 * layout.cc: Include <cerrno>, <fcntl.h>, <unistd.h>,
230 "libiberty.h", "md5.h", "sha1.h".
231 (Layout::Layout): Initialize eh_frame_data_,
232 eh_frame_hdr_section_, and build_id_note_.
233 (Layout::finalize): Call create_build_id.
234 (Layout::create_note): New function, broken out of
235 Layout::create_gold_note.
236 (Layout::create_gold_note): Call create_note.
237 (Layout::create_build_id): New function.
238 (Layout::write_build_id): New function.
239 (Close_task_runner::run): Call write_build_id.
240
8b105e34
ILT
241 * x86_64.cc: Correct license to GPLv3.
242
086a1841
ILT
2432008-03-23 Ian Lance Taylor <iant@google.com>
244
245 * options.cc: Include "demangle.h".
246 (parse_optional_string): New function.
247 (parse_long_option): Handle takes_optional_argument.
248 (parse_short_option): Update dash_z initializer. Handle
249 takes_optional_argument.
250 (General_options::General_options): Initialize do_demangle_.
251 (General_options::finalize): Set do_demangle_. Handle demangling
252 style.
253 * options.h (parse_optional_string): Declare.
254 (struct One_option): Add optional_arg field. Update constructor.
255 Update call constructor calls. Add takes_optional_argument
256 function.
257 (DEFINE_var): Add optional_arg__ parameter. Change all callers.
258 (DEFINE_optional_string): Define.
259 (General_options::demangle): Change from DEFINE_bool to
260 DEFINE_optional_string.
261 (General_options::no_demangle): New function.
262 (General_options::do_demangle): New function.
263 (General_options::set_do_demangle): New function.
264 (General_options::execstack_status_): Move definition to end of
265 class definition.
266 (General_options::static_): Likewise.
267 (General_options::do_demangle_): New field.
268 * object.cc (big_endian>::get_symbol_location_info): Call
269 Options::do_demangle, not Options::demangle.
270 * symtab.cc (demangle): Likewise.
271
cbb93e63
ILT
2722008-03-22 Ian Lance Taylor <iant@google.com>
273
274 * gold.h: Include <cstddef> and <sys/types.h>
275 * options.h: Include <cstring>.
276
ec531623
ILT
2772008-03-21 Ian Lance Taylor <iant@google.com>
278
279 * Added source code to GNU binutils.
280
This page took 0.038125 seconds and 4 git commands to generate.