* elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
52cfded7
AM
12009-07-10 Alan Modra <amodra@bigpond.net.au>
2
3 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
4 data even when no stubs.
5 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
6
e054468f
AM
72009-07-10 Alan Modra <amodra@bigpond.net.au>
8
9 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
10 (ppc_elf_get_synthetic_symtab): Report addend.
11 (PLT_IFUNC): Define.
12 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
13 (ppc_elf_create_glink): New function.
14 (ppc_elf_create_dynamic_sections): Use it.
15 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
16 (update_local_sym_info): Allocate space for local_plt array.
17 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
18 entry pointer.
19 (is_branch_reloc): New function.
20 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
21 (ppc_elf_gc_sweep_hook): Likewise.
22 (ppc_elf_adjust_dynamic_symbol): Likewise.
23 (allocate_dynrelocs): Likewise.
24 (ppc_elf_size_dynamic_sections): Likewise.
25 (ppc_elf_relocate_section): Likewise.
26 (branch_reloc_hash_match): Use is_branch_reloc.
27 (ppc_elf_tls_optimize): Adjust for local_plt.
28 (write_glink_stub): New function, extracted from..
29 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
30 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
31 branch table when dynamic.
32 (elf_backend_post_process_headers): Define.
33 * elf64-ppc.c (elf_backend_post_process_headers): Define.
34 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
35 (ppc64_elf_get_synthetic_symtab): Report addend.
36 (struct ppc_stub_hash_entry): Add plt_ent.
37 (PLT_IFUNC): Define.
38 (struct ppc_link_hash_table): Add iplt and reliplt.
39 (create_linkage_sections): Make .iplt and .rela.iplt sections.
40 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
41 (update_local_sym_info): Allocate space for local_plt array.
42 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
43 entry pointer.
44 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
45 and don't change hash flags here.
46 (is_branch_reloc): New function.
47 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
48 (ppc64_elf_gc_sweep_hook): Likewise.
49 (ppc64_elf_adjust_dynamic_symbol): Likewise.
50 (allocate_dynrelocs): Likewise.
51 (ppc64_elf_size_dynamic_sections): Likewise.
52 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
53 (ppc64_elf_size_stubs): Likewise.
54 (ppc64_elf_relocate_section): Likewise.
55 (get_sym_h): Adjust for local_plt.
56 (branch_reloc_hash_match): Use is_branch_reloc.
57 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
58 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
59
041de40d
AM
602009-07-10 Alan Modra <amodra@bigpond.net.au>
61
62 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
63
7ae26bc1
AM
642009-07-10 Alan Modra <amodra@bigpond.net.au>
65
66 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
67 and ref_regular_nonweak comment.
68 * elflink.c (elf_link_output_extsym): Special case ifunc syms
69 when def_regular, not ref_regular.
70 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
71 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
72 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
73
9c4d0c1f
AM
742009-07-09 Alan Modra <amodra@bigpond.net.au>
75
76 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
77 of malloc'd struct call_info.
78 (pasted_function): Likewise, priority too.
79
2fc6d3b0
AM
802009-07-07 Alan Modra <amodra@bigpond.net.au>
81
82 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
83 alignment when packing sections into overlays.
84
9e1f7c0e
DK
852009-07-03 Cary Coutant <ccoutant@google.com>
86
87 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
88
4a768870
DK
892009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
90
91 * coffcode.h (sec_to_styp_flags): Partially revert (functional
92 changes only) earlier patch:-
93
94 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
95
96 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
97 give .debug and .reloc data characteristics.
98 (DOT_RELOC): New define for .reloc section string.
99 (coff_write_object_contents): Use DOT_RELOC instead of string.
100
848f5748
TT
1012009-07-02 Tom Tromey <tromey@redhat.com>
102
103 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
104 * bfdwin.c (bfd_free_window): Cast to unsigned long.
105
dda46a27
L
1062009-07-01 Nick Clifton <nickc@redhat.com>
107
108 * elf-m10300.c: Remove trailing white space.
109 * reloc.c: Likewise.
110
efde2f2c
NC
1112009-07-01 Douglas B Rupp <rupp@gnat.com>
112
dda46a27 113 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
efde2f2c 114 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
dda46a27
L
115 * configure.in: Use them.
116 * configure: Regenerate.
117 * config.in: Regnerate.
118 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
efde2f2c
NC
119 #define _BSD_SOURCE. Add comments.
120 (vms_file_stats_name): Calculate creation date based on available
121 runtime data. Return 1 for version instead of 0.
122
e1ec24c6
NC
1232009-07-01 Nick Clifton <nickc@redhat.com>
124
125 PR 10072
126 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
127 to R_ARM_THM_PC8 relocation.
128
2709f570
NC
1292009-06-29 Nick Clifton <nickc@redhat.com>
130
131 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
132 different uses of the relocations addend when a symbol is in a
133 merged section.
134
83b89087
L
1352009-06-27 H.J. Lu <hongjiu.lu@intel.com>
136
137 PR ld/10337
138 * elf.c (bfd_section_from_shdr): Don't change sh_link for
139 SHT_REL/SHT_RELA sections on executable nor shared library.
140 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
141 as a normal section.
142
be7035c6
NC
1432009-06-25 Nick Clifton <nickc@redhat.com>
144
145 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
146 symbols with SEC_MERGE flag.
147
bdeb4032
KT
1482009-06-25 Kai Tietz <kai.tietz@onevision.com>
149
150 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
151 give .debug and .reloc data characteristics.
152 (DOT_RELOC): New define for .reloc section string.
153 (coff_write_object_contents): Use DOT_RELOC instead of string.
154
b32e07d7
TG
1552009-06-25 Tristan Gingold <gingold@adacore.com>
156
157 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
158 (bfd_mach_o_canonicalize_dynamic_symtab)
159 (bfd_mach_o_get_synthetic_symtab): Defines.
160 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
161 (TARGET_NAME): Use Mach-O specific functions for dynamic.
162
163 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
164 for scattered relocations.
165 (bfd_mach_o_i386_print_thread): New function.
166 (bfd_mach_o_print_thread): Define.
167
168 * mach-o.c (text_section_names_xlat): Add an entry for __const.
169 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
170 New functions extracted from ...
171 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
172 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
173 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
174 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
175 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
176 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
177 Set name_str field.
178 (bfd_mach_o_scan_read_dylib): Ditto.
179 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
180 reindent.
181 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
182 decode isym and flags on little endian targets. Set dysymtab field.
183 (bfd_mach_o_scan_start_address): Adjust for enum names.
184 (bfd_mach_o_lookup_section): Do not look for segments anymore.
185 (bfd_mach_o_print_section): Display bfd section name.
186 (bfd_mach_o_print_segment): Display none if no name.
187 (bfd_mach_o_print_dysymtab): Display next index for local, external
188 and undefined symbols.
189 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
190 Display dylinker name. Display thread and unixthread commands content.
191 (bfd_mach_o_print_thread): New macro.
192
193 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
194 (bfd_mach_o_ppc_thread_flavour): Ditto.
195 (bfd_mach_o_i386_thread_flavour): Ditto.
196 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
197 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
198 BFD_MACH_O_THREAD_STATE_NONE.
199 (bfd_mach_o_segment_command): Remove segment field.
200 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
201 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
202 (bfd_mach_o_prebound_dylib_command): Ditto.
203 (bfd_mach_o_dylib_command): Ditto.
204 (bfd_mach_o_prebound_dylib_command): Remove section field.
205 (mach_o_data_struct): Add dysymtab field.
206 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
207 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
208 (bfd_mach_o_build_commands): Remove parameter names and attributes.
209 (bfd_mach_o_get_dynamic_reloc_upper_bound)
210 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
211
c41ba836
DK
2122009-06-25 Rafael Avila de Espindola <espindola@google.com>
213
214 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
215 field of struct dirent.
216
3188b070
TG
2172009-06-23 Tristan Gingold <gingold@adacore.com>
218
219 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
220 of this macro. Fix indentation.
221
022f8312
CL
2222009-06-22 Christophe Lyon <christophe.lyon@st.com>
223
224 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
225 destination for defined dynamic symbols when deciding whether to
226 insert a stub or not.
227 (allocate_dynrelocs): Make sure functions are not marked as Thumb
228 when actually accessed through a PLT, even when generating a
229 shared lib.
230
d297e807
TG
2312009-06-22 Tristan Gingold <gingold@adacore.com>
232
233 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
234 the relocs array.
235
ceaf50a2
AM
2362009-06-22 Alan Modra <amodra@bigpond.net.au>
237
238 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
239 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
240
983bddc8
AM
2412009-06-22 Alan Modra <amodra@bigpond.net.au>
242
243 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
244
f8703194
L
2452009-06-19 H.J. Lu <hongjiu.lu@intel.com>
246
247 * elflink.c (elf_link_add_object_symbols): Avoid warning
248 from -Wjump-misses-init in gcc 4.5.0.
249
09a24cbf
L
2502009-06-19 H.J. Lu <hongjiu.lu@intel.com>
251
252 * elf32-i386.c (elf_i386_check_relocs): Properly check local
253 symbol on error.
254 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
255
4c544807
L
2562009-06-19 H.J. Lu <hongjiu.lu@intel.com>
257
258 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
259 r_symndx. Report local symbol name on error.
260 (elf_i386_check_relocs): Updated. Report local symbol name on
261 error.
262 (elf_i386_gc_sweep_hook): Updated.
263 (elf_i386_relocate_section): Likewise.
264
265 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
266 r_symndx. Report local symbol name on error.
267 (elf64_x86_64_check_relocs): Updated. Report local symbol name
268 on error.
269 (elf64_x86_64_gc_sweep_hook): Updated.
270 (elf64_x86_64_relocate_section): Likewise.
271
b8674692
TG
2722009-06-19 Tristan Gingold <gingold@adacore.com>
273
274 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
275
046b007d
TG
2762009-06-19 Tristan Gingold <gingold@adacore.com>
277
278 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
279 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
280 (bfd_mach_o_valid): Ditto.
281 (bfd_mach_o_wide_p): Ditto.
282 (bfd_mach_o_canonicalize_reloc): Ditto.
283 (bfd_mach_o_build_commands): Ditto.
284 (bfd_mach_o_scan_read_thread): Ditto.
285 (bfd_mach_o_flatten_sections): Ditto.
286 (bfd_mach_o_scan_start_address): Ditto.
287 (bfd_mach_o_lookup_section): Ditto.
288 (bfd_mach_o_core_fetch_environment): Ditto.
289 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
290 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
291 (bfd_mach_o_scan_write_symtab): Ditto.
292 Use macros instead of hard-coded values.
293 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
294 Use bfd_mach_o_get_data instead of direct access. Use macros
295 instead of hard-coded values.
296 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
297 Remove sym argument and get section from mdata.
298 Move code into the else branch.
299 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
300 Remove sym argument and get section from mdata. Adjust code.
301 (bfd_mach_o_scan_read_dylib): Move assertion into the created
302 switch (which replaces consecutive if statements).
303 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
304 module table, table of content, indirect symbols and external
305 referenced symbols.
306 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
307 field.
308 (bfd_mach_o_scan_read_linkedit): New function.
309 (bfd_mach_o_scan_read_str): Ditto.
310 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
311 field of mdata.
312 (bfd_mach_o_get_symtab_upper_bound): Remove check as
313 bfd_mach_o_count_symbols never returns an error.
314 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
315 symtab field (there might be only one symtab).
316 (bfd_mach_o_scan_read_command): Handle reexported dylib.
317 Handle sub frameworks, sub umbrella, sub library and sub client.
318 Read code signature and segment split info commands.
319 (bfd_mach_o_scan): Reindent.
320 (bfd_mach_o_xlat_name): New type.
321 (bfd_mach_o_print_flags): New function.
322 (bfd_mach_o_get_name): Ditto.
323 (bfd_mach_o_cpu_name): New variable.
324 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
325 (bfd_mach_o_section_type_name)
326 (bfd_mach_o_section_attribute_name)
327 (bfd_mach_o_load_command_name): New variables.
328 (bfd_mach_o_print_private_header): New function.
329 (bfd_mach_o_print_section_map): New function extracted from
330 bfd_mach_o_print_private_bfd_data.
331 (bfd_mach_o_print_section): Ditto. Print more infos.
332 (bfd_mach_o_print_segment): Ditto.
333 (bfd_mach_o_print_dysymtab): Ditto.
334 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
335 load weak dylib, reexport dylib and id dylib.
336 Handle code signature and segment_split info.
337 Handle sub frameworks, sub umbrella, sub library and sub client.
338 (bfd_mach_o_section_get_nbr_indirect): New function.
339
340 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
341 (bfd_mach_o_header_flags): New enum to define header flags.
342 (bfd_mach_o_section_attribute): New enum to replace ...
343 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
344 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
345 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
346 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
347 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
348 these removed macros.
349 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
350 (bfd_mach_o_dylib_module): New type.
351 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
352 macros.
353 (bfd_mach_o_dylib_table_of_content): New type.
354 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
355 (bfd_mach_o_dylib_reference): New type.
356 (BFD_MACH_O_REFERENCE_SIZE): New macro.
357 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
358 modules, toc, references and indirect syms.
359 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
360 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
361 unused). Add comment.
362 (bfd_mach_o_dylib_command): Ditto.
363 (bfd_mach_o_prebound_dylib_command): Ditto.
364 (bfd_mach_o_linkedit_command): New type.
365 (bfd_mach_o_str_command): New type.
366 (bfd_mach_o_load_command): Add linkedit and str fields.
367 (mach_o_data_struct): Add symtab field.
368 (bfd_get_mach_o_data): Renamed to ...
369 (bfd_mach_o_get_data): ... this new macro.
370 (bfd_mach_o_scan_read_symtab_symbol,
371 bfd_mach_o_scan_read_symtab_strtab,
372 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
373
374 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
375 instead of direct access.
376
6d78d0b9
AM
3772009-06-19 Alan Modra <amodra@bigpond.net.au>
378
379 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
380 R_PPC_PLTREL24 relocs.
381 (ppc_elf_relocate_section): Likewise.
382
3ec01793
AM
3832009-06-19 Alan Modra <amodra@bigpond.net.au>
384
385 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
386 pointer to sym hash. Update all uses.
387 (update_plt_info): Likewise. Don't check addend here.
388
c2e61a4e
L
3892009-06-18 H.J. Lu <hongjiu.lu@intel.com>
390
391 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
392 bfd_sym_from_r_symndx.
393 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
394
87d72d41
AM
3952009-06-18 Alan Modra <amodra@bigpond.net.au>
396
397 * elf-bfd.h (struct sym_sec_cache): Delete.
398 (struct sym_cache): New.
399 (bfd_section_from_r_symndx): Delete prototype.
400 (bfd_sym_from_r_symndx): Define prototype.
401 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
402 (bfd_sym_from_r_symndx): ..new function.
403 * elf32-arm.c: Update all uses of struct sym_sec_cache and
404 bfd_section_from_r_symndx to new struct and function.
405 * elf32-bfin.c: Likewise.
406 * elf32-hppa.c: Likewise.
407 * elf32-i386.c: Likewise.
408 * elf32-m32r.c: Likewise.
409 * elf32-m68hc1x.c: Likewise.
410 * elf32-m68hc1x.h: Likewise.
411 * elf32-m68k.c: Likewise.
412 * elf32-ppc.c: Likewise.
413 * elf32-s390.c: Likewise.
414 * elf32-sh.c: Likewise.
415 * elf64-ppc.c: Likewise.
416 * elf64-s390.c: Likewise.
417 * elf64-x86-64.c: Likewise.
418 * elfxx-sparc.c: Likewise.
419 * elfxx-sparc.h: Likewise.
420
14aae723
L
4212009-06-18 H.J. Lu <hongjiu.lu@intel.com>
422
423 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
424 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
425
5e486aa1
NC
4262009-06-18 Nick Clifton <nickc@redhat.com>
427
428 * elflink.c (elf_link_sort_relocs): Return early if there are no
429 relocs to sort.
430
361dff73
DK
4312009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
432
32425da9
NC
433 Merge cegcc and mingw32ce target name changes from
434 CeGCC project:
361dff73 435
32425da9 436 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
437
438 * config.bfd: Add arm*-*-cegcc* target.
439
32425da9 440 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
441
442 * config.bfd: Add arm-*-mingw32ce* target.
443
e03a8ed8
L
4442009-06-17 H.J. Lu <hongjiu.lu@intel.com>
445
446 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
447 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
448 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
449 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
450
4512009-06-17 H.J. Lu <hongjiu.lu@intel.com>
452
453 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
454 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
455 * elf32-i386.c (elf_i386_check_relocs): Use it.
456 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
457
4582009-06-17 H.J. Lu <hongjiu.lu@intel.com>
459
460 * elf-bfd.h (elf_dyn_relocs): New.
461
462 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
463 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
464 elf_dyn_relocs.
465 (elf_i386_copy_indirect_symbol): Likewise.
466 (elf_i386_check_relocs): Likewise.
467 (elf_i386_gc_sweep_hook): Likewise.
468 (elf_i386_allocate_dynrelocs): Likewise.
469 (elf_i386_readonly_dynrelocs): Likewise.
470 (elf_i386_size_dynamic_sections): Likewise.
471
472 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
473 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
474 with elf_dyn_relocs.
475 (elf64_x86_64_copy_indirect_symbol): Updated.
476 (elf64_x86_64_check_relocs): Likewise.
477 (elf64_x86_64_gc_sweep_hook): Likewise.
478 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
479 (elf64_x86_64_allocate_dynrelocs): Likewise.
480 (elf64_x86_64_readonly_dynrelocs): Likewise.
481 (elf64_x86_64_size_dynamic_sections): Likewise.
482
64e77c6d
L
4832009-06-17 H.J. Lu <hongjiu.lu@intel.com>
484
485 * elf32-arm.c (create_got_section): Get existing .rela.got
486 section.
487 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
488 * elf32-lm32.c (create_got_section): Likewise.
489 * elf32-m32r.c (create_got_section): Likewise.
490 * elf32-ppc.c (ppc_elf_create_got): Likewise.
491 * elf32-s390.c (create_got_section): Likewise.
492 * elf32-sh.c (create_got_section): Likewise.
493 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
494 * elf64-s390.c (create_got_section): Likewise.
495 * elfxx-sparc.c (create_got_section): Likewise.
496
497 * elflink.c (_bfd_elf_create_got_section): Properly initialize
498 the GOT size.
499
d2149d72
L
5002009-06-16 H.J. Lu <hongjiu.lu@intel.com>
501
502 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
503
504 * elf32-i386.c (elf_i386_local_hash): Removed.
505 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
506 (elf_i386_get_local_sym_hash): Likewise.
507
508 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
509 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
510 (elf64_x86_64_get_local_sym_hash): Likewise.
511 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
512 (get_local_sym_hash): Likewise.
513
cc3bd654
L
5142009-06-16 H.J. Lu <hongjiu.lu@intel.com>
515
516 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
517 rel_got_sec and plt_sec.
518 (elfNN_ia64_relax_section): Updated.
519 (elfNN_ia64_create_dynamic_sections): Likewise.
520 (get_got): Likewise.
521 (allocate_dynrel_entries): Likewise.
522 (elfNN_ia64_size_dynamic_sections): Likewise.
523 (set_got_entry): Likewise.
524 (elfNN_ia64_choose_gp): Likewise.
525 (elfNN_ia64_relocate_section): Likewise.
526 (elfNN_ia64_finish_dynamic_symbol): Likewise.
527 (elfNN_ia64_finish_dynamic_sections): Likewise.
528
be3e406d
UW
5292009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
530
531 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
532 also for calls.
533
6de2ae4a
L
5342009-06-16 H.J. Lu <hongjiu.lu@intel.com>
535
536 * configure.in (elf): Add elf-ifunc.lo.
537
538 * configure: Regenerated.
539 * Makefile.in: Likewise.
540
541 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
542 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
543
544 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
545 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
546 irelifunc.
547 (elf_i386_link_hash_table_create): Likewise.
548 (elf_i386_create_dynamic_sections): Likewise.
549 (elf_i386_check_relocs): Likewise.
550 (elf_i386_allocate_dynrelocs): Likewise.
551 (elf_i386_size_dynamic_sections): Likewise.
552 (elf_i386_relocate_section): Likewise.
553 (elf_i386_finish_dynamic_symbol): Likewise.
554 (elf_i386_finish_dynamic_sections): Likewise.
555 (elf_i386_create_got_section): Removed.
556
557 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
558 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
559 irelifunc.
560 (elf64_x86_64_compute_jump_table_size): Updated.
561 (elf64_x86_64_link_hash_table_create): Likewise.
562 (elf64_x86_64_create_dynamic_sections): Likewise.
563 (elf64_x86_64_check_relocs): Likewise.
564 (elf64_x86_64_allocate_dynrelocs): Likewise.
565 (elf64_x86_64_size_dynamic_sections): Likewise.
566 (elf64_x86_64_relocate_section): Likewise.
567 (elf64_x86_64_finish_dynamic_symbol): Likewise.
568 (elf64_x86_64_finish_dynamic_sections): Likewise.
569 (elf64_x86_64_create_got_section): Removed.
570
571 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
572 for pointer alignment. Set up section pointers.
573 (_bfd_elf_create_dynamic_sections): Likewise.
574 (_bfd_elf_create_ifunc_sections): Moved to ...
575 * elf-ifunc.c: Here. New.
576
577 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
578 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
579 Run "make dep-am".
580
81694485
NC
5812009-06-16 Doug Kwan <dougkwan@google.com>
582
6de2ae4a
L
583 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
584 to bfd_signed_vma. Cast constant operands which are used in
585 offset related expressions to bfd_signed_vma type as appropriate.
81694485 586
6db7e006
MR
5872009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
588
589 * elf32-vax.c (elf_vax_plt_sym_val): New function.
590 (elf_backend_plt_sym_val): Define.
591
9b90d8fd
MR
5922009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
593
594 * elf32-vax.c (elf_vax_reloc_type_class): New function.
595 (elf_backend_reloc_type_class): Define.
596
04981bc1
MR
5972009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
598
599 * elf32-vax.c (elf_vax_relocate_section): For symbol references
600 from an executable to a shared library treat R_VAX_PC32
601 relocations as R_VAX_PLT32 ones.
602
886815b2
MR
6032009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
604
605 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
606 symbols in GOT space calculation.
607 (elf_vax_relocate_section): Adjust accordingly.
608
6c4fb25a
MR
6092009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
610
611 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
612 include <R11:R2>.
613
7b6021f1
MR
6142009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
615
616 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
617 attribute.
618 (elf_vax_relocate_section): Likewise.
619
188dbb07
L
6202009-06-15 H.J. Lu <hongjiu.lu@intel.com>
621
622 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
623 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
624
048cbda4
L
6252009-06-15 H.J. Lu <hongjiu.lu@intel.com>
626
627 * elf32-i386.c (elf_i386_check_relocs): Reformat.
628 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
629
482c6ce9
L
6302009-06-15 H.J. Lu <hongjiu.lu@intel.com>
631
632 * Makefile.am: Run "make dep-am".
633 * Makefile.in: Regenerated.
634
eba077f2
L
6352009-06-15 H.J. Lu <hongjiu.lu@intel.com>
636
637 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
638 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
639
ec68b083
NC
6402009-06-15 Nick Clifton <nickc@redhat.com>
641
642 * po/ru.po: New Russian translation.
643 * configure.in (ALL_LINGUAS): Add ru.
644 * configure: Regenerate.
645
b80ee1aa
L
6462009-06-14 H.J. Lu <hongjiu.lu@intel.com>
647
648 * elf32-i386.c: Remove duplicated comments.
649
44c4ea11
L
6502009-06-14 H.J. Lu <hongjiu.lu@intel.com>
651
652 PR ld/10270
653 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
654 dynamic IFUNC pointer in non-shared object. Use .got.plt
655 for IFUNC definition in PIE.
656 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
657 PIE locally.
658
659 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
660 dynamic IFUNC pointer in non-shared object. Use .got.plt
661 for IFUNC definition in PIE.
662 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
663 PIE locally.
664
8b7e2992
L
6652009-06-13 H.J. Lu <hongjiu.lu@intel.com>
666
667 * elf32-i386.c (elf_i386_check_relocs): Properly report
668 local symbol for unhandled relocation against STT_GNU_IFUNC
669 symbol.
637fa7af 670 (elf_i386_relocate_section): Likewise.
8b7e2992 671 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
637fa7af 672 (elf64_x86_64_relocate_section): Likewise.
8b7e2992 673
c25bc9fc
L
6742009-06-13 H.J. Lu <hongjiu.lu@intel.com>
675
676 PR ld/10269
677 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
678 (elf_i386_link_hash_table): Add loc_hash_table and
679 loc_hash_memory.
680 (elf_i386_local_hash): New.
681 (elf_i386_local_htab_hash): Likewise.
682 (elf_i386_local_htab_eq): Likewise.
683 (elf_i386_get_local_sym_hash): Likewise.
684 (elf_i386_link_hash_table_free): Likewise.
685 (elf_i386_allocate_local_dynrelocs): Likewise.
686 (elf_i386_finish_local_dynamic_symbol): Likewise.
687 (bfd_elf64_bfd_link_hash_table_free): Likewise.
688 (elf_i386_link_hash_table_create): Create loc_hash_table and
689 loc_hash_memory.
690 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
691 (elf_i386_size_dynamic_sections): Likewise.
692 (elf_i386_relocate_section): Likewise.
693 (elf_i386_finish_dynamic_sections): Likewise.
694 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
695 isn't NULL.
696
697 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
698 (elf64_x86_64_link_hash_table): Add loc_hash_table and
699 loc_hash_memory.
700 (elf64_x86_64_local_hash): New.
701 (elf64_x86_64_local_htab_hash): Likewise.
702 (elf64_x86_64_local_htab_eq): Likewise.
703 (elf64_x86_64_get_local_sym_hash): Likewise.
704 (elf64_x86_64_link_hash_table_free): Likewise.
705 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
706 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
707 (bfd_elf64_bfd_link_hash_table_free): Likewise.
708 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
709 and loc_hash_memory.
710 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
711 symbols.
712 (elf64_x86_64_size_dynamic_sections): Likewise.
713 (elf64_x86_64_relocate_section): Likewise.
714 (elf64_x86_64_finish_dynamic_sections): Likewise.
715 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
716 sym isn't NULL.
717
dec9d5df
PB
7182009-06-10 Philip Blundell <philb@gnu.org>
719
720 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
721 elf_sec->this_hdr == NULL.
722
92bc0e80
TG
7232009-06-12 Tristan Gingold <gingold@adacore.com>
724
725 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
726 * bfd-in2.h: Regenerated.
727 * libbfd.h: Regenerated.
728
729 * mach-o.c (FILE_ALIGN): New macro.
730 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
731 (bfd_mach_o_print_symbol): Ditto.
732 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
733 (bfd_mach_o_get_reloc_upper_bound): New function.
734 (bfd_mach_o_canonicalize_reloc): Ditto.
735 (bfd_mach_o_scan_write_relocs): Ditto.
736 (bfd_mach_o_scan_write_section_32): Remove offset argument.
737 (bfd_mach_o_scan_write_section_64): Ditto.
738 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
739 written for load command. Do not compute section file offset.
740 (bfd_mach_o_scan_write_segment_64): Ditto.
741 (bfd_mach_o_scan_write_symtab): Compute file offset first.
742 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
743 Mach-O to ...
744 (bfd_mach_o_mangle_symbols): ... this new function.
046b007d 745 (bfd_mach_o_write_contents): Be sure to have load commands built.
92bc0e80
TG
746 Call bfd_mach_o_mangle_symbols.
747 (bfd_mach_o_build_commands): Adjust for filelen field.
748 Use FILE_ALIGN macro. Clear section file offset if section is empty.
749 Do not set symtab file offset anymore here.
750 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
751 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
752 Set reloc_count and rel_filepos section fields.
753 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
754 unsigned int.
755 (bfd_mach_o_scan_read_section_64): Ditto.
756 (bfd_mach_o_scan_read_section): Ditto.
757 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
758 bfd_mach_o_asymbol. Use unsigned int for file offset type.
759 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
760 Handle weak-ref symbols.
761 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
762 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
763 (bfd_mach_o_scan): Remove assignment to removed field.
764 (bfd_mach_o_mkobject_init): Ditto.
765 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
766 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
767 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
768 (bfd_mach_o_swap_reloc_in): Ditto.
769 (bfd_mach_o_swap_reloc_out): Ditto.
770
771 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
772 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
773 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
774 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
775 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
776 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
777 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
778 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
779 (BFD_MACH_O_N_WEAK_DEF): New macros.
780 Add comments.
781 (bfd_mach_o_section_type): Add new enumeration values.
782 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
783 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
784 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
785 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
786 macros.
787 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
788 (BFD_MACH_O_GENERIC_RELOC_PAIR)
789 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
790 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
791 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
792 (BFD_MACH_O_RELENT_SIZE): Ditto.
793 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
794 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
795 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
796 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
797 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
798 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
799 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
800 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
801 (bfd_mach_o_reloc_info): New struct.
802 (bfd_mach_o_asymbol): New struct.
803 (bfd_mach_o_symtab_command): The symbols field is now of type
804 bfd_mach_o_asymbol.
805 (bfd_mach_o_load_command): The offset and len fields are now of type
806 unsigned int.
807 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
808 Add a filelen field. Add comments.
809 (bfd_mach_o_backend_data): New struct.
810 (bfd_mach_o_get_backend_data): New macro.
811 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
812 bfd_mach_o_asymbol.
813 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
814 (bfd_mach_o_get_reloc_upper_bound): New prototype.
815 (bfd_mach_o_canonicalize_reloc): Ditto.
816
817 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
818 duplicated macro. Now defined to _bfd_generic_is_local_label.
819 (TARGET_NAME_BACKEND): New macro...
820 (TARGET_NAME_BACKEND): ... used to name a new variable.
821 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
822 Mach-O backend data.
823
824 * mach-o-i386.c (i386_howto_table): New variable.
825 (bfd_mach_o_i386_swap_reloc_in): New function.
826 (bfd_mach_o_i386_swap_reloc_out): Ditto.
827 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
828 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
829 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
830 (bfd_mach_o_bfd_reloc_type_lookup)
831 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
832
8c7d38e8
NC
8332009-06-11 Eric Paris <eparis@redhat.com>
834 Nick Clifton <nickc@redhat.com>
835
836 * opncls.c (_maybe_make_executable): New function. Gives execute
837 permission to an executable bfd that was opened for writing
838 provided that it is a regular file. Replaces common code found in...
839 (bfd_close): here and ...
840 (bfd_close_all_done): here.
841
f865a31d
AG
8422009-06-11 Anthony Green <green@moxielogic.com>
843
844 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
845 * bfd-in2.h: Rebuilt.
846 * libbfd.h: Rebuilt.
847 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
848 relocation support.
849 (moxie_reloc_map): Ditto.
850 Clean up copyright notice.
851
25b88f33
PP
8522009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
853
1372b818 854 * bfd-in2.h: bfd_mmap prototype.
25b88f33
PP
855 * bfdio.c (bfd_mmap): New function.
856 * libbfd.h (bfd_iovec): Add bmmap.
1372b818 857 * cache.c (cache_bmmap): New function.
25b88f33
PP
858 (cache_iovec): Initialize bmmap member.
859 * opencls.c (opncls_bmmap): New function.
860 (opncls_iovec): Initialize bmmap member.
861
c2f09c75
TG
8622009-06-09 Tristan Gingold <gingold@adacore.com>
863
864 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
865 and stabstr_segment fields.
866 (mach_o_be_vec, mach_o_le_vec): Removed
867 (bfd_mach_o_version): New prototype.
868
869 * mach-o.c (bfd_mach_o_version): Make this function public.
870 (mach_o_wide_p): New function.
871 (bfd_mach_o_wide_p): Ditto.
872 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
873 weird names.
874 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
875 Search in the list only if the name starts with a dot.
876 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
877 test. Check bfd_seek status.
878 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
879 (bfd_mach_o_scan_write_section_32): Ditto.
880 (bfd_mach_o_scan_write_section_64): Ditto.
881 (bfd_mach_o_scan_write_section): Removed.
882 (bfd_mach_o_scan_write_segment): Split into ...
883 (bfd_mach_o_scan_write_segment_32): ... this and ...
884 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
885 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
886 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
887 symbol table. Now returns a boolean.
888 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
889 Adjust for status type.
890 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
891 test. Write symbol table. Numbers the sections.
892 (bfd_mach_o_read_header): Check bfd_seek status.
893 Use mach_o_wide_p instead of hard-coded test.
894 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
895 (bfd_mach_o_scan_read_section_64): Ditto.
896 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
897 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
898 handled common symbols.
899 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
900 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
901 (bfd_mach_o_scan_read_dylinker): Ditto.
902 (bfd_mach_o_scan_read_dylib): Ditto.
903 (bfd_mach_o_scan_read_thread): Ditto.
904 (bfd_mach_o_scan_read_symtab): Ditto.
905 Do not create a section for the stabs.
906 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
907 (bfd_mach_o_scan_read_segment): Ditto.
908 (bfd_mach_o_scan_read_command): Ditto.
909 (bfd_mach_o_scan_start_address): Ditto.
910 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
911 (bfd_mach_o_archive_p): Check bfd_seek status.
912 (bfd_mach_o_core_fetch_environment): Ditto.
913
914 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
915
2a81c24a
L
9162009-06-06 H.J. Lu <hongjiu.lu@intel.com>
917
918 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
919 (elf_i386_link_hash_table_create): Initialize irelifunc.
920 (elf_i386_check_relocs): Updated. Set up irelifunc for
921 shared objects.
922 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
923 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
924 shared objects.
925 (elf_i386_relocate_section): Likewise.
926
927 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
928 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
929 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
930 shared objects.
931 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
932 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
933 shared objects.
934 (elf64_x86_64_relocate_section): Likewise.
935
936 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
937 ...
938 (_bfd_elf_create_ifunc_sections): This.
939
c2f09c75 940 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2a81c24a
L
941 ...
942 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
943 for shared objects.
944
710ab287
L
9452009-06-06 H.J. Lu <hongjiu.lu@intel.com>
946
947 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
948 relocation for R_386_32 against STT_GNU_IFUNC symbol when
949 building shared object. Check info->executable instead of
950 !info->shared when setting non_got_ref.
951 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
952 for non-GOT reference of STT_GNU_IFUNC symbol in shared
953 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
954 symbol if needed.
955 (elf_i386_relocate_section): Output dynamic relocation for
956 R_386_32 against STT_GNU_IFUNC symbol to get the real
957 function address when building shared object.
958 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
959 relocation for STT_GNU_IFUNC symbol in shared object.
960
961 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
962 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
963 symbol when building shared object. Check info->executable
964 instead of !info->shared when setting non_got_ref.
965 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
966 for non-GOT reference of STT_GNU_IFUNC symbol in shared
967 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
968 if needed.
969 (elf64_x86_64_relocate_section): Output dynamic relocation
970 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
971 function address when building shared object.
972 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
973 relocation for STT_GNU_IFUNC symbol in shared object.
974
9e93c730
JK
9752009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
976
977 * Makefile.am: Run "make dep-am".
978 (BFD32_BACKENDS): Add mach-o-i386.lo.
979 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
980 * Makefile.in: Regenerate.
981
74681fc4
AM
9822009-06-06 Alan Modra <amodra@bigpond.net.au>
983
984 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
985 when looking for soft-icache stubs.
986
154a1ee5
TG
9872009-06-05 Tristan Gingold <gingold@adacore.com>
988
989 * mach-o.h: Update copyright year.
990 (bfd_mach_o_mach_header_magic): New enum.
991 (bfd_mach_o_cpu_subtype): Now an enum.
992 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
993 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
994 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
995 (bfd_mach_o_load_command): Field type_required is now a boolean.
996 Reindent prototypes.
997 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
998 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
999 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1000 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1001 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1002 (bfd_mach_o_canonicalize_symtab): Ditto.
1003 (bfd_mach_o_get_symbol_info): Ditto.
1004 (bfd_mach_o_print_symbol): Ditto.
1005 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1006 (bfd_mach_o_make_empty_symbol): Ditto.
1007 (bfd_mach_o_write_contents): Ditto.
1008
1009 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1010 bfd_mach_o_mkobject): Defines.
1011 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1012 Do not check with target vector but with flavour.
1013 (struct mach_o_section_name_xlat): New declaration.
1014 (dwarf_section_names_xlat): Ditto.
1015 (text_section_names_xlat): Ditto.
1016 (data_section_names_xlat): Ditto.
1017 (struct mach_o_segment_name_xlat): Ditto.
1018 (segsec_names_xlat): Ditto.
1019 (bfd_mach_o_convert_section_name_to_bfd): New function.
1020 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1021 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1022 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1023 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1024 Accept any input and output flavour. Do not share private data
1025 anymore.
1026 (bfd_mach_o_count_symbols): Add a comment.
1027 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1028 (bfd_mach_o_canonicalize_symtab): Ditto.
1029 (bfd_mach_o_get_symbol_info): Ditto.
1030 (bfd_mach_o_print_symbol): Ditto.
1031 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1032 Use constants instead of hard-coded values.
1033 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1034 values.
1035 (bfd_mach_o_scan_write_section_64): Ditto.
1036 (bfd_mach_o_scan_write_segment): Ditto.
1037 Do not copy sections anymore.
1038 (bfd_mach_o_write_contents): Make it public.
1039 Remove dead code. Rewrite typeflag assignment.
1040 (bfd_mach_o_build_commands): New function.
1041 (bfd_mach_o_set_section_contents): Ditto.
1042 (bfd_mach_o_make_empty_symbol): Make it public.
1043 (bfd_mach_o_read_header): Make it static.
1044 Convert to bfd_boolean.
1045 Use constants instead of hard-coded values.
1046 (bfd_mach_o_make_bfd_section): Call
1047 bfd_mach_o_convert_section_name_to_bfd to create name.
1048 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
1049 values.
1050 (bfd_mach_o_scan_read_section_64): Ditto.
1051 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
1052 a segment anymore. Use constants instead of hard-coded values.
1053 (bfd_mach_o_scan_read_command): Fix style.
1054 (bfd_mach_o_scan): Use constants instead of hard-coded values.
1055 Get rid of BFD_IO_FUNCS.
1056 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
1057 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
1058 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
1059 (bfd_mach_o_object_p): Removed.
1060 (bfd_mach_o_gen_core_p): New function, replaces ...
1061 (bfd_mach_o_core_p): ... deleted.
1062 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
1063
1064 * mach-o-i386.c: New file.
1065 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
1066 * configure.in (TDEFINES): Add mach_o_i386_vec.
1067 * configure: Regenerated.
1068 * targets.c: Add mach_o_i386_vec.
1069
1070 * mach-o.c: Update copyright years.
1071 (BFD_IO_FUNCS): Remove (was not used).
1072 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
1073 bfd_mach_o_slurp_extended_name_table,
1074 bfd_mach_o_construct_extended_name_table,
1075 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
1076 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
1077 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
1078 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
1079 bfd_mach_o_get_section_contents_in_window,
1080 bfd_mach_o_bfd_is_local_label_name,
1081 bfd_mach_o_bfd_is_target_special_symbol,
1082 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
1083 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
1084 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
1085 bfd_mach_o_minisymbol_to_symbol,
1086 bfd_mach_o_bfd_get_relocated_section_contents,
1087 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
1088 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
1089 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
1090 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
1091 bfd_mach_o_bfd_merge_private_bfd_data,
1092 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
1093 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
1094 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
1095 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
1096 bfd_mach_o_bfd_copy_private_header_data,
1097 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
1098 * mach-o-target.c: ... here.
1099 Update copyright years.
1100
a1ef399e
AM
11012009-06-04 Alan Modra <amodra@bigpond.net.au>
1102
1103 * dep-in.sed: Don't use \n in replacement part of s command.
1104 * Makefile.am (DEP1): LC_ALL for uniq.
1105 Run "make dep-am".
1106 * Makefile.in: Regenerate.
1107
2e75bb35
L
11082009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1109
1110 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
1111 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
1112 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1113
0018b0a3
L
11142009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1115
1116 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
1117 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1118 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
1119 against STT_GNU_IFUNC symbols for static executables.
1120 (elf_i386_finish_dynamic_symbol): Load GOT entry with
1121 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1122
1123 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
1124 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1125 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
1126 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1127
94313f36
RS
11282009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
1129
1130 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
1131 symbols to be left unimported when linking statically.
1132 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
1133 code when linking statically.
1134
7afd84dc
L
11352009-06-02 H.J. Lu <hongjiu.lu@intel.com>
1136
1137 * elf32-i386.c (elf_i386_check_relocs): Increment
1138 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
1139 against STT_GNU_IFUNC symbol.
1140 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
1141 local STT_GNU_IFUNC definition is used.
1142 (elf_i386_relocate_section): Handle got.offset != -1 for
1143 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
1144 symbol.
1145
1146 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
1147 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
1148 relocations against STT_GNU_IFUNC symbol.
1149 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
1150 local STT_GNU_IFUNC definition is used.
1151 (elf64_x86_64_relocate_section): Handle got.offset != -1
1152 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
1153 STT_GNU_IFUNC symbol.
1154
cbe950e9
L
11552009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1156
1157 PR ld/10205
1158 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
1159 (elf_i386_reloc_type_lookup): Likewise.
1160 (R_386_tls): Removed.
1161 (R_386_irelative): New.
1162 (R_386_vt_offset): Updated.
1163 (elf_i386_rtype_to_howto): Likewise.
1164 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
1165 (elf_i386_link_hash_table_create): Initialize igotplt,
1166 iplt and irelplt.
1167 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
1168 (elf_i386_adjust_dynamic_symbol): Likewise.
1169 (elf_i386_allocate_dynrelocs): Likewise.
1170 (elf_i386_relocate_section): Likewise.
1171 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
1172 sections.
1173 (elf_i386_finish_dynamic_symbol): When building a static
1174 executable, use .iplt, .igot.plt and .rel.iplt sections for
1175 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
1176 locally defined STT_GNU_IFUNC symbol.
1177
1178 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
1179 (x86_64_reloc_map): Likewise.
1180 (R_X86_64_standard): Updated.
1181 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
1182 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
1183 iplt and irelplt.
1184 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
1185 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1186 (elf64_x86_64_allocate_dynrelocs): Likewise.
1187 (elf64_x86_64_relocate_section): Likewise.
1188 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
1189 sections.
1190 (elf64_x86_64_finish_dynamic_symbol): When building a static
1191 executable, use .iplt, .igot.plt and .rela.iplt sections for
1192 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
1193 for locally defined STT_GNU_IFUNC symbol.
1194
1195 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
1196 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
1197
1198 * bfd-in2.h: Regenerated.
1199 * libbfd.h: Likewise.
1200
3aa14d16
L
12012009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1202
1203 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
1204 (_bfd_elf_make_ifunc_reloc_section): Removed.
1205 (_bfd_elf_is_ifunc_symbol): Likewise.
1206 (_bfd_elf_create_static_ifunc_sections): New.
1207
1208 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
1209 symbol check to ...
1210 (elf_link_add_object_symbols): Here.
1211 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
1212 STT_GNU_IFUNC symbol.
1213 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
1214 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
1215 (IFUNC_INFIX): Removed.
1216 (get_ifunc_reloc_section_name): Likewise.
1217 (_bfd_elf_make_ifunc_reloc_section): Likewise.
1218 (_bfd_elf_is_ifunc_symbol): Likewise.
1219 (_bfd_elf_create_static_ifunc_sections): New.
1220
eb4ff4d6
L
12212009-05-29 H.J. Lu <hongjiu.lu@intel.com>
1222
1223 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
1224 (create_got_section): Likewise.
1225 (allocate_dynrelocs): Likewise.
1226 (readonly_dynrelocs): Likewise.
1227 (set_tls_module_base): Likewise.
1228 (dtpoff_base): Likewise.
1229 (tpoff): Likewise.
1230 (elf_i386_link_hash_table_create): Updated.
1231 (elf_i386_create_dynamic_sections): Likewise.
1232 (elf_i386_check_relocs): Likewise.
1233 (elf_i386_size_dynamic_sections): Likewise.
1234 (elf_i386_relocate_section): Likewise.
1235
1236 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
1237 (create_got_section): Likewise.
1238 (allocate_dynrelocs): Likewise.
1239 (readonly_dynrelocs): Likewise.
1240 (set_tls_module_base): Likewise.
1241 (dtpoff_base): Likewise.
1242 (tpoff): Likewise.
1243 (elf64_x86_64_link_hash_table_create): Updated.
1244 (elf64_x86_64_create_dynamic_sections): Likewise.
1245 (elf64_x86_64_check_relocs): Likewise.
1246 (elf64_x86_64_size_dynamic_sections): Likewise.
1247 (elf64_x86_64_relocate_section): Likewise.
1248
fc579192
NC
12492009-05-28 Nick Clifton <nickc@redhat.com>
1250
1251 * targets.c (_bfd_target_vector): Only include plugin target in
1252 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
1253
5ebe2858
UW
12542009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1255
1256 * elf32-spu.c (struct call_info): New member broken_cycle.
1257 (remove_cycle): Instead of physically removing call_info structures
1258 to break call graph cycles, mark them using the broken_cycle flag.
1259 (mark_overlay_section): Respect broken_cycle flag.
1260 (unmark_overlay_section): Likewise.
1261 (collect_lib_sections): Likewise.
1262 (collect_overlays): Likewise.
1263 (sum_stack): Likewise.
1264
34ad4cb0
UW
12652009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1266
1267 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
1268 (mark_functions_via_relocs): Initialize callee->count to 1.
1269 (pasted_function): Likewise.
1270 (spu_elf_auto_overlay): Honor call counts when determining number
1271 of stubs required in software i-cache mode.
1272
fc579192
NC
12732009-05-27 Rafael Avila de Espindola <espindola@google.com>
1274
1275 * plugin.c (program_name): Remove.
1276 (plugin_program_name): New.
1277 (bfd_plugin_set_program_name): New.
1278 (try_load_plugin): Use plugin_program_name.
1279 * plugin.h (bfd_plugin_set_program_name): New.
1280
12812009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
1282
1283 * aclocal.m4: Include ../config/plugins.m4.
1284 * configure.in: Use AC_PLUGINS.
1285 * configure: Regenerate.
1286 * Makefile.in: Regenerate.
1287 * doc/Makefile.in: Regenerate.
1288
c8a1f254
NS
12892009-05-27 Nathan Sidwell <nathan@codesourcery.com>
1290
1291 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
1292 link.
1293 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
1294 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
1295 * elf32-avr.c (elf32_avr_relax_section): Likewise.
1296 * elf32-frv.c (elf32_avr_relax_section): Likewise.
1297 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
1298 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1299 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1300 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
1301 * reloc.c (bfd_generic_relax_section): Likewise.
1302 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
1303 * vms.c (vms_bfd_relax_section): Likewise.
1304
68d7e96a
L
13052009-05-26 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
1308
1309 * elf32-i386.c (is_indirect_symbol): Renamed to ...
1310 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
1311
1312 * elf32-i386.c (allocate_dynrelocs): Updated.
1313 (elf_i386_relocate_section): Likewise.
1314 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1315 (elf64_x86_64_relocate_section): Likewise.
1316
1317 * elf64-x86-64.c (is_indirect_symbol): Removed.
1318
f12e7348
NC
13192009-05-26 Nick Clifton <nickc@redhat.com>
1320
1321 * po/id.po: Updated Indonesian translation.
1322
ce3c775b
NC
13232009-05-26 Rafael Avila de Espindola <espindola@google.com>
1324
1325 * Makefile.am: Run "make dep-am".
1326 (AM_CPPFLAGS): New.
1327 (LIBDL): New.
1328 (ALL_MACHINES): Add cpu-plugin.lo.
1329 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
1330 (BFD32_BACKENDS): Add plugin.lo.
1331 (BFD32_BACKENDS_CFILES): Add plugin.c.
1332 (libbfd_la_LIBADD): Add LIBDL
1333 * archures.c (bfd_architecture): Add bfd_arch_plugin.
1334 (bfd_plugin_arch): Declare.
1335 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
1336 * bfd.c (bfd): Add plugin_data.
1337 * config.bfd: Handle the plugin target.
1338 * configure.in: Check for --enable-plugins.
1339 (LT_INIT): Use the dlopen option.
1340 * cpu-plugin.c: New.
1341 * plugin.c: New.
1342 * plugin.h: New.
1343 * targets.c (plugin_vec): Declare.
1344 (_bfd_target_vector): Add plugin_vec.
1345 * Makefile.in: Regenerate.
1346 * bfd-in2.h: Regenerate.
1347 * configure: Regenerate.
1348
9e097a72
AM
13492009-05-26 Alan Modra <amodra@bigpond.net.au>
1350
1351 * dep-in.sed: Don't modify .o to .lo here. Output one filename
1352 per line with all lines having continuation backslash. Prefix
1353 first line with "A", following lines with "B".
1354 * Makefile.am (DEP): Don't use dep.sed here.
1355 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
1356 dep.sed here on dependencies, sort and uniq.
1357 * Makefile.in: Regenerate.
1358
d5acff2f
TG
13592009-05-25 Tristan Gingold <gingold@adacore.com>
1360
1361 * makefile.vms: Add verilog.obj to object list OBJS.
1362
5c93f09b
AM
13632009-05-24 Alan Modra <amodra@bigpond.net.au>
1364
1365 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
1366 for BFD_IN_MEMORY is cleared.
1367 (bfd_bwrite): Zero excess memory allocated.
1368
48229727
JB
13692009-05-22 Julian Brown <julian@codesourcery.com>
1370
1371 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
1372 macros.
1373 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
1374 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
1375 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
1376 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
1377 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
1378 (a8_erratum_fix, a8_erratum_reloc): New structs.
1379 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
1380 num_a8_erratum_fixes, fix_cortex_a8 fields.
1381 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
1382 (elf32_arm_add_stub): Split into two parts, creating...
1383 (elf32_arm_create_or_find_stub_sec): New function.
1384 (elf32_arm_final_link_relocate): Add forward declaration.
1385 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
1386 relocations, multiple relocations per stub.
1387 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
1388 (arm_size_one_stub): Use find_stub_size_and_template.
1389 (a8_reloc_compare): New.
1390 (find_thumb_glue): Add forward declaration.
1391 (cortex_a8_erratum_scan): New.
1392 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
1393 (bfd_elf32_arm_set_cortex_a8_fix): New.
1394 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
1395 (arm_map_one_stub): Add THUMB32_TYPE support.
1396 (a8_branch_to_stub_data): New.
1397 (make_branch_to_a8_stub): New.
1398 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
1399 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
1400 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
1401 Cortex-A8 erratum workaround.
1402 * bfd-in2.h: Regenerate.
1403
2b3decb5
AM
14042009-05-22 Alan Modra <amodra@bigpond.net.au>
1405
1406 * Makefile.am: Run "make dep-am".
1407 * Makefile.in: Regenerate.
1408 * po/SRC-POTFILES.in: Regenerate.
1409
930e005c
AM
14102009-05-21 Alan Modra <amodra@bigpond.net.au>
1411
1412 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
1413 commit.
1414
6e0b88f1
AM
14152009-05-21 Alan Modra <amodra@bigpond.net.au>
1416
1417 * elf-bfd.h (struct elf_backend_data
1418 <elf_backend_link_output_symbol_hook>): Return an int.
1419 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
1420 symbols on deleted .opd entries.
1421 * elflink.c (elf_link_output_sym): Return without outputting sym
1422 if output_symbol_hook returns 2.
1423 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
1424 Abort if we must not discard sym.
1425 (elf_link_input_bfd): Similarly, don't set finfo->indices for
1426 local syms.
1427 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
1428 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
1429 elf_backend_link_output_symbol_hook return type change.
1430 * elf32-arm.c (output_arch_syminfo): Likewise.
1431 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
1432 (elf32_arm_output_arch_local_syms): Likewise.
1433 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
1434 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
1435 (bfd_score_elf_link_output_symbol_hook): Likewise.
1436 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1437 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1438 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
1439 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
1440 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
1441 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
1442 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
1443 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
1444 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
1445 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1446 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1447
5ef11c02
AM
14482009-05-21 Alan Modra <amodra@bigpond.net.au>
1449
1450 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
1451 out of range .opd symbols.
1452
ebf12fbe
DK
14532009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
1454
1455 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
1456 fprintf_vma directly.
1457 * peXXigen.c (pe_print_edata): Likewise.
1458 (pe_print_pdata): Likewise.
1459 (_bfd_XX_print_ce_compressed_pdata): Likewise.
1460 (_bfd_XX_print_private_bfd_data_common): Likewise.
1461
c1711530
DK
14622009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
1463
1464 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
1465
22a8f80e 14662009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 1467 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
1468
1469 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
1470 fix discarded sections.
1471
335bd8f2
UW
14722009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1473
1474 * elf32-spu.c (mark_overlay_section): Move .init and .fini
1475 sections into the software icache.
1476
cdc83fba
UW
14772009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1478
1479 * elf32-spu.c (build_stub): Always build "compact" sofware
1480 i-cache stubs.
1481
97fc8d84
UW
14822009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1483
1484 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
1485 (spu_elf_setup): Initialize it.
1486 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
1487 Update to new-sytle cache manager data structures.
1488 (spu_elf_build_stubs): Generate new-style cache manager data
1489 structures and symbols.
1490 (spu_elf_auto_overlay): Update size computation.
1491
452de53c
UW
14922009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1493
1494 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
1495 segments first amongst the program headers.
1496
d342a8b1
UW
14972009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1498
1499 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
1500 into addresses for relocation types that look at high bits. Remove
1501 special handling of relocation overflow warnings.
1502
cc210763
UW
15032009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1504
1505 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
1506 control flow graph between fragments of a function.
1507
c1ea05bb
UW
15082009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1509
1510 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
1511 generate only a 16-byte .toe section.
1512 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
1513
bbb0fc04
AM
15142009-05-14 Alan Modra <amodra@bigpond.net.au>
1515
1516 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
1517 (spu_elf_place_overlay_data): ..here. New function.
1518 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
1519
6e6718a3
AJ
15202009-05-13 Andrew Jenner <andrew@codesourcery.com>
1521
1522 * elf32-arm.c: Move sysdep.h to start of file.
1523
77ae44b0
AM
15242009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
1525
1526 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
1527 start of overlays.
1528 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
1529 __icache_tag_array and __icache_tag_array_size.
1530
51408ec2
AM
15312009-05-11 Masaki Muranaka <monaka@monami-software.com>
1532
1533 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
1534 ATTRIBUTE_UNUSED.
1535 (bfinfdpic_link_omit_section_dynsym): Likewise.
1536 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
1537
2468f9c9
PB
15382009-05-05 Paul Brook <paul@codesourcery.com>
1539
1540 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
1541 * bfd-in2.h: Regenerate.
1542 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
1543 (_arm_elf_section_data): Add text and exidx fields.
1544 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
1545 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
1546 copy_exidx_entry): New functions.
1547 (elf32_arm_write_section): Fixup .ARM.exidx contents.
1548
738a79f6
CL
15492009-05-05 Christophe lyon <christophe.lyon@st.com>
1550
1551 * elf32-arm.c (DEF_STUBS): New helper define.
1552 (DEF_STUB): Likewise.
1553 (stub_def): New type.
1554 (stub_definitions): New array, containing stub template pointers
1555 and sizes.
1556 (arm_size_one_stub): Make use of stub_definitions.
1557
09e2aba4
DK
15582009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
1559
1560 * elflink.c (find_version_for_sym): Remove from here, ...
1561 * linker.c (bfd_find_version_for_sym): ... rename, replace
1562 here, make public and update all callers.
1563 * bfd-in2.h: Regenerate.
1564
d8045f23
NC
15652009-04-30 Nick Clifton <nickc@redhat.com>
1566
1567 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
1568 section pointer.
1569 (struct elf_obj_data): Add has_ifunc_symbols boolean.
1570 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
1571 into a STT_GNU_IFUNC symbol type.
1572 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
1573 type.
1574 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
1575 the binary contains ifunc symbols.
1576 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
1577 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
1578 * elf32-i386.c (is_indirect_function): New function.
1579 (elf_i386_check_relocs): Create an ifunc output section.
1580 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
1581 section if necessary.
1582 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
1583 if necessary.
1584 (elf_i386_add_symbol_hook): New function. Set the
1585 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
1586 symbol is encountered.
1587 (elf_backend_post_process_headers): Define.
1588 (elf_backend_add_symbol_hook): Define.
1589 (elf_i386_post_process_headers): Rename to
1590 elf_i388_fbsd_post_process_headers.
1591 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
1592 (is_indirect_function): New function.
1593 (elf64_x86_64_check_relocs): Create an ifunc output section.
1594 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
1595 section if necessary.
1596 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
1597 symbol if necessary.
1598 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
1599 elf_obj_data structure if an ifunc symbol is encountered.
1600 (elf_backend_post_process_headers): Define.
1601 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
1602 if we have ifunc symbols to handle.
1603 (get_ifunc_reloc_section_name): New function. Computes the name
1604 for an ifunc section.
1605 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
1606 section to hold ifunc relocs.
1607 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
1608 (bfd_print_symbol_vandf): Handle ifunc symbols.
1609 (bfd_decode_symclass): Likewise.
1610 * bfd-in2.h: Regenerate.
1611
96c23d59
JM
16122009-04-30 Joseph Myers <joseph@codesourcery.com>
1613
1614 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
1615 MOVW and MOVT relocations in a shared library link.
1616
c067354b
NC
16172009-04-27 Anthony Green <green@moxielogic.com>
1618
1619 * verilog.c: New file.
1620 * Makefile.am (BFD32_LIBS): Add verilog.c.
1621 (BFD32_LIBS_CFILES): Add verilog.c.
1622 (verilog.lo): New build rule.
1623 * Makefile.in: Rebuilt.
1624 * targets.c: Add verilog support.
1625 * bfd.c (tdata union): Add Verilog private data field.
1626 * bfd-in2.h: Regenerate.
1627
325c681d
L
16282009-04-27 H.J. Lu <hongjiu.lu@intel.com>
1629
1630 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
1631 copy pe_opthdr.
1632
ba775898
DK
16332009-04-23 Matthias Klose <doko@ubuntu.com>
1634
2e28a5fc 1635 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 1636
155d87d7
CL
16372009-04-22 Christophe Lyon <christophe.lyon@st.com>
1638
1639 PR9743
1640 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
1641 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1642 (elf32_arm_size_stubs): Likewise.
1643 (record_thumb_to_arm_glue): Deleted unused function.
1644 (bfd_elf32_arm_process_before_allocation): No longer handle
1645 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
1646 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
1647 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1648
3e6b1042
DJ
16492009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
1650
1651 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
1652 (elf32_arm_write_section): Declare early.
1653 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
1654 (arm_allocate_glue_section_space): Exclude empty sections.
1655 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
1656 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
1657 BFD.
1658 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
1659 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
1660 (elf32_arm_size_dynamic_sections): Allocate interworking
1661 sections here.
1662 (bfd_elf32_bfd_final_link): Define.
1663
4f360784
L
16642009-04-21 H.J. Lu <hongjiu.lu@intel.com>
1665
1666 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 1667
4f360784
L
1668 * coffcode.h (coff_compute_section_file_positions): Clear
1669 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
1670
1671 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
1672 force_minimum_alignment.
1673
1674 * libcoff.h: Regenerated.
1675
1676 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
1677 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
1678
1679 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
1680 nor target_subsystem.
1681
1682 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
1683 force_minimum_alignment nor target_subsystem.
1684
e48570bb
DK
16852009-04-21 Kai Tietz <kai.tietz@onevision.com>
1686
1687 * coff-x86_64.c (PEI_HEADERS): Protect includes.
1688 (bfd_pe_print_pdata): Remove #ifdef PE variation.
1689 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
1690 include in coff-x86_64.c of headers.
1691 (PDATA_ROW_SIZE): New define.
1692 (pex_regs[]): New static array.
1693 (pex64_get_runtime_function): New static function.
1694 (pex64_get_unwind_info): Likewise.
1695 (pex64_get_scope_entry): Likewise.
1696 (pex64_xdata_print_uwd_codes): Likewise.
1697 (pex64_get_section_by_rva): Likewise.
1698 (pex64_dump_xdata): Likewise.
1699 (pex64_bfd_print_pdata): Likewise.
1700 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
1701 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
1702 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
1703
383c383f 17042009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
1705 Alan Modra <amodra@bigpond.net.au>
1706 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
1707
1708 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
1709 long names and non-NUL-terminated strings.
1710
b6b450f1
L
17112009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1712
1713 * bfd-in2.h: Regenerated.
1714
d9118602
L
17152009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1716
1717 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
1718 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
1719
92dd4511
L
17202009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1721
1722 PR binutils/10074
1723 * coffcode.h (bfd_pei_p): New.
1724
1725 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
1726 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
1727 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
1728 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
1729 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
1730 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
1731
1732 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
1733 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
1734 bfd_efi_rtdrv_x86_64_vec,
1735 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
1736 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
1737 * targets.c: Likewise.
1738
1739 * configure: Regenerated.
1740 * libcoff.h: Likewise.
1741 * Makefile.in: Likewise.
1742
1743 * efi-app-ia32.c: Removed.
1744 * efi-app-x86_64.c: Likewise.
1745 * efi-bsdrv-ia32.c: Likewise.
1746 * efi-bsdrv-ia64.c: Likewise.
1747 * efi-bsdrv-x86_64.c: Likewise.
1748 * efi-rtdrv-ia32.c: Likewise.
1749 * efi-rtdrv-ia64.c: Likewise.
1750 * efi-rtdrv-x86_64.c: Likewise.
1751 * efi-rtdrv-ia32.c: Likewise.
1752
1753 * efi-app-ia64.c: Moved to ...
1754 * pei-ia64.c: This.
1755 (TARGET_SYM): Set to bfd_pei_ia64_vec.
1756 (TARGET_NAME): Set to pei-ia64.
1757
1758 * libpei.h (bfd_target_pei_p): Removed.
1759 (bfd_target_pei_arch): Likewise.
1760 (bfd_target_efi_app_p): Likewise.
1761 (bfd_target_efi_app_arch): Likewise.
1762 (bfd_target_efi_bsdrv_p): Likewise.
1763 (bfd_target_efi_bsdrv_arch): Likewise.
1764 (bfd_target_efi_rtdrv_p): Likewise.
1765 (bfd_target_efi_rtdrv_arch): Likewise.
1766 (bfd_pe_executable_p): Likewise.
1767
1768 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
1769 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
1770 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
1771 and efi-rtdrv-ia32.c.
1772 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
1773 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
1774 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
1775 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
1776 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
1777 efi-rtdrv-x86_64.c. Add pei-ia64.c.
1778 (efi-app-ia64.lo): Removed.
1779 (efi-bsdrv-ia32.lo): Likewise.
1780 (efi-rtdrv-ia32.lo): Likewise.
1781 (efi-app-ia64.lo): Likewise.
1782 (efi-bsdrv-ia64.lo): Likewise.
1783 (efi-rtdrv-ia64.lo): Likewise.
1784 (efi-app-x86_64.lo): Likewise.
1785 (efi-bsdrv-x86_64.lo): Likewise.
1786 (efi-rtdrv-x86_64.lo): Likewise.
1787 (pei-ia64.lo): New.
1788
1789 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
1790 with bfd_pei_p.
1791 (arch_type): Removed.
1792 (pe_arch): Likewise.
1793 (pe_bfd_object_p): Just return coff_object_p.
1794
1795 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
1796 bfd_pe_executable_p with bfd_pei_p.
1797
69c5861e
CL
17982009-04-17 Christophe Lyon <christophe.lyon@st.com>
1799
1800 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
1801 PLT entries to an undefined symbol when generating a shared
1802 library.
1803
e9cd0660
NC
18042009-04-17 Nick Clifton <nickc@redhat.com>
1805
1806 PR 9909
1807 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
1808
3023e3f6
RS
18092009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
1810
1811 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
1812 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
1813 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
1814 * binary.c (binary_bfd_define_common_symbol): Likewise.
1815 * bout.c (b_out_bfd_define_common_symbol): Likewise.
1816 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
1817 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
1818 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
1819 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
1820 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
1821 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
1822 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
1823 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
1824 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
1825 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
1826 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
1827 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
1828 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
1829 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
1830 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
1831 * som.c (som_bfd_define_common_symbol): Likewise.
1832 * srec.c (srec_bfd_define_common_symbol): Likewise.
1833 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
1834 * versados.c (versados_bfd_define_common_symbol): Likewise.
1835 * vms.c (vms_bfd_define_common_symbol): Likewise.
1836 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
1837 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
1838 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
1839 (pmac_xcoff_vec): Likewise.
1840 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1841 (aix5coff64_vec): Likewise.
1842 * linker.c (bfd_generic_define_common_symbol): New function.
1843 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
1844 (_bfd_define_common_symbol): New field.
1845 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
1846 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
1847 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
1848 symbols here.
1849 * bfd-in2.h: Regenerate.
1850 * libbfd.h: Likewise.
1851 * libcoff.h: Likewise.
1852
20135e4c
NC
18532009-04-15 Anthony Green <green@moxielogic.com>
1854
1855 * targets.c: Add moxie support.
1856 * Makefile.am: Ditto.
1857 * Makefile.in: Rebuilt.
1858 * cpu-moxie.c, elf32-moxie.c: New files.
1859 * archures.c: Add moxie support.
1860 * configure.in: Add moxie support.
1861 * configure: Rebuilt.
1862 * config.bfd, archures.c: Add moxie support.
1863 * bfd-in2.h: Rebuilt.
1864
82b5c97a
CL
18652009-04-15 Christophe Lyon <christophe.lyon@st.com>
1866
1867 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
1868 branch to an undef weak symbol into a jump to next instruction if
1869 a PLT entry will be created.
1870
0408dee6
DK
18712009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
1872
1873 * coffgen.c (make_a_section_from_file): Set the backend long
1874 section names enable if long section names found on input.
1875 * coffcode.h: Extend long section names documentation to match.
1876
a0c402a5
L
18772009-04-08 H.J. Lu <hongjiu.lu@intel.com>
1878
1879 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
1880 machine code.
1881
4d28413b
DD
18822009-04-07 DJ Delorie <dj@redhat.com>
1883
1884 * archures.c: Add bfd_mach_mep_c5.
1885 * bfd-in2.h: Likewise.
1886 * cpu-mep.c: Add bfd_c5_arch.
1887 * elf32-mep.c: Support it.
1888
bb6198d2
L
18892009-04-07 H.J. Lu <hongjiu.lu@intel.com>
1890
1891 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
1892 info->callbacks->einfo.
1893 * linker.c (_bfd_generic_section_already_linked): Likewise.
1894
bcb012d3
DD
18952009-04-06 DJ Delorie <dj@redhat.com>
1896
1897 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
1898
db1fe6e9
L
18992009-04-06 H.J. Lu <hongjiu.lu@intel.com>
1900
1901 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
1902 _bfd_pex64_print_pdata only if PE is defined.
1903
1904 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
1905 (_bfd_pex64_print_pdata): This.
1906
1907 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
1908 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
1909 is defined.
1910
c7c7219d
KT
19112009-04-05 Kai Tietz <kai.tietz@onevision.com>
1912
1913 * coff-x86_64.c (bfd_pe_print_pdata): Define as
1914 _bfd_pep_print_x64_pdata.
1915 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
1916 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
1917
3df502ae
SA
19182009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
1919
154a1ee5 1920 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
1921 to zero.
1922
d3626fb0
CL
19232009-04-02 Christophe Lyon <christophe.lyon@st.com>
1924
1925 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
1926 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
1927 branch stubs.
1928 (elf32_arm_stub_type): New enum values for the two new stubs.
1929 (arm_type_of_stub): Make use of the two new stubs.
1930 (arm_size_one_stub): Handle the two new stubs.
1931
fe723c87
MT
19322009-04-01 Matt Thomas <matt@netbsd.org>
1933
1934 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
1935 hidden symbols into the GOT or PLT.GOT.
154a1ee5 1936 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
1937 into a shared object if it is against a hidden symbol.
1938
ee698300
RS
19392009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1940
1941 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
1942 and know_contains_shared_object_p.
1943 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
1944 Cache the result in the archive_info table.
1945 (xcoff_auto_export_p): Add an "info" parameter and update the
1946 call to xcoff_archive_contains_shared_object_p.
1947 (xcoff_mark_auto_exports): Update accordingly.
1948 (xcoff_post_gc_symbol): Likewise.
1949
54e2dbe0
RS
19502009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1951
1952 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
1953 rather than C_EXT.
1954
2e470849
RS
19552009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1956
1957 * coff-rs6000.c (member_layout): New structure.
1958 (archive_iterator): Likewise.
1959 (member_layout_init): New function.
1960 (archive_iterator_begin): Likewise.
1961 (archive_iterator_next): Likewise.
1962 (xcoff_write_armap_old): Use the new iterator functions.
1963 (do_shared_object_padding): Delete.
1964 (xcoff_write_armap_big): Use the new iterator functions. Simplify
1965 handling of arch_info.
1966 (xcoff_write_archive_contents_old): Allocate arelt_data in the
1967 first loop rather than the second. Allocate a member header if
1968 there isn't one, then work out the stat information and length
1969 in the first loop too. Use the new iterators for the second loop.
1970 (xcoff_write_archive_contents_big): Likewise.
1971
24c611d1
RS
19722009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1973
1974 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
1975 (bfd_xcoff_set_archive_import_path): Likewise.
1976 * bfd-in2.h: Regenerate.
1977 * xcofflink.c: Include libiberty.h.
1978 (xcoff_archive_info): New structure.
1979 (xcoff_archive_info_hash): New function.
1980 (xcoff_archive_info_eq): Likewise.
1981 (xcoff_get_archive_info): Likewise.
1982 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
1983 (bfd_xcoff_split_import_path): New function.
1984 (bfd_xcoff_set_archive_import_path): Likewise.
1985 (xcoff_set_import_path): Move earlier in file.
1986 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
1987 object to the the directory part of the bfd's filename. Get the
1988 import path and filename of an archive object from the archive's
1989 xcoff_tdata, initializing it if necessary. Update use of
1990 import_file_id.
1991 (bfd_link_input_bfd): Update use of import_file_id.
1992 (xcoff_write_global_symbol): Likewise.
1993
d286971a
RS
19942009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1995
1996 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
1997
19982009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1999
2000 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2001 a .loader section for relocatable links.
2002 (xcoff_need_ldrel_p): New function.
2003 (xcoff_mark): Use it.
2004 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2005 a loader section.
2006 (xcoff_build_ldsym): New function, split out from...
2007 (xcoff_build_ldsyms): ...here. Rename to...
2008 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2009 call xcoff_build_ldsym, if there's a loader section.
2010 (xcoff_build_loader_section): New function, extracted verbatim from...
2011 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2012 there's a loader section. Only add an __rtinit loader symbol
2013 if there's a loader section. Update after above name change.
2014 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2015 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2016 and xcoff_create_ldrel.
2017 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2018 (xcoff_reloc_link_order): Likewise, but only call it if there's
2019 a loader section. Use xcoff_symbol_section.
2020 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2021 if there's a loader section.
2022
8707bb87
RS
20232009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2024
2025 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2026
e780aef2
CL
20272009-04-01 Christophe Lyon <christophe.lyon@st.com>
2028
2029 * elf32-arm.c (group_sections): Rewrite loops for better
2030 readability.
2031
c301e700
DD
20322009-03-30 DJ Delorie <dj@redhat.com>
2033
2034 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2035 relocs when doing a relocatable link.
2036
3895f852
MM
20372009-03-28 Mark Mitchell <mark@codesourcery.com>
2038
2039 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
2040 "ERROR:", in error messages.
2041 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
2042 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
2043 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
2044 (elf32_arm_merge_eabi_attributes): Likewise.
2045 (elf32_arm_merge_private_bfd_data): Likewise.
2046
ea882e87
NC
20472009-03-27 Nick Clifton <nickc@redhat.com>
2048
2049 * section.c (bfd_get_section_contents): Detect and handle the case
2050 where a section has the SEC_IN_MEMORY flag set but no actual
2051 contents allocated.
2052
9433b9b1
AM
20532009-03-26 Alan Modra <amodra@bigpond.net.au>
2054
2055 PR 6494
2056 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
2057 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
2058 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
2059 if we don't find matching PT_LOAD when copying.
2060
dc1aa734
SR
20612009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
2062
2063 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
2064 the reloc descriptions.
2065
34d3d6b9
HPN
20662009-03-25 Hans-Peter Nilsson <hp@axis.com>
2067
2068 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2069 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
2070 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2071
34274ccc
L
20722009-03-24 H.J. Lu <hongjiu.lu@intel.com>
2073
2074 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
2075 (bfd_i386_arch_intel_syntax): Likewise.
2076 (i8086_arch): Likewise.
2077 (bfd_x86_64_arch): Likewise.
2078
019c5a2e
HPN
20792009-03-24 Hans-Peter Nilsson <hp@axis.com>
2080
6718f446
HPN
2081 * elf32-cris.c (cris_elf_relocate_section): <case
2082 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
2083 symbols for non-allocated sections. Don't check whether to
2084 generate R_CRIS_DTPMOD for non-allocated sections.
2085 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
2086 handle relocation GC:ing if applied to non-allocated section.
2087 (cris_elf_check_relocs): Similar.
2088
019c5a2e
HPN
2089 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2090 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
2091 when emitting a known TP offset in the GOT.
2092
ffcfec52
AM
20932009-03-23 Alan Modra <amodra@bigpond.net.au>
2094
2095 * elf64-ppc.c (synthetic_opd): Delete.
2096 (compare_symbols): Look for .opd name rather than section match.
2097 (ppc64_elf_get_synthetic_symtab): Likewise.
2098
c6dd29ce
AM
20992009-03-21 Alan Modra <amodra@bigpond.net.au>
2100
2101 * elf32-ppc.c (is_pic_glink_stub): Delete.
2102 (is_nonpic_glink_stub): New function.
2103 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
2104 than first pic one.
2105 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2106
8c21ca21
AK
21072009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2108 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2109
2110 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 2111 macros for visibilty and locality checks.
8c21ca21
AK
2112 (elf_s390_adjust_dynamic_symbol): Likewise.
2113 (allocate_dynrelocs): Likewise.
2114 (elf_s390_relocate_section): Likewise.
2115 (elf_s390_finish_dynamic_symbol): Likewise.
2116 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2117 (elf_s390_adjust_dynamic_symbol): Likewise.
2118 (allocate_dynrelocs): Likewise.
2119 (elf_s390_relocate_section): Likewise.
2120 (elf_s390_finish_dynamic_symbol): Likewise.
2121
156621f3
KT
21222009-03-19 Kai Tietz <kai.tietz@onevision.com>
2123
2124 * bfd-in2.h: Regenerated.
2125 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
2126 for debugging sections and map memory read/write dependent on
2127 SEC_COFF_NOREAD.
2128 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
2129 without memory read flags set.
2130 * section.c: Add SEC_COFF_NOREAD to section flags.
2131
d1fa68d3
AS
21322009-03-19 Andreas Schwab <schwab@linux-m68k.org>
2133
2134 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
2135 for format string.
2136
ad2adbc8
AM
21372009-03-19 Alan Modra <amodra@bigpond.net.au>
2138
2139 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
2140 "no overlays" return. If there are overlays, create overlay
2141 manager entry symbols here, so that..
2142 (spu_elf_build_stubs): ..we don't need to set them up here.
2143 Simplify entry symbol tests.
2144 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
2145
67cc5033
MK
21462009-03-18 Mark Kettenis <kettenis@gnu.org>
2147
d1fa68d3 2148 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
2149 (elfcore_grok_openbsd_note): New functions.
2150 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
2151
8d25cc3d
AM
21522009-03-18 Alan Modra <amodra@bigpond.net.au>
2153
3889c459 2154 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
2155 * elf32-m68hc1x.c: Include alloca-conf.h.
2156 * xsym.c: Likewise.
2157 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
2158 * som.c: Likewise.
2159 * Makefile.am: Run "make dep-am".
2160 * Makefile.in: Regenerate.
2161
a89e6478
DJ
21622009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2163
2164 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
2165
a7e11ee1
AM
21662009-03-17 Alan Modra <amodra@bigpond.net.au>
2167
2168 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
2169 Add compact_stub.
2170 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
2171 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
2172 ovly_return fields with ovly_entry[2]. Adjust all users.
2173 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
2174 when soft-icache.
2175 (spu_elf_build_stubs): Likewise.
2176 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
2177 ovly_flavour changes. Update all callers.
2178 (ovl_stub_size_log2): New function.
2179 (build_stub): Handle compact icache stubs. Use different manager
2180 entry point for stubs in non-icache area.
2181 (spu_elf_size_stubs): Don't allocate space for indirect branch
2182 descriptors.
2183 (spu_elf_build_stubs): And don't built them.
2184
607a83c9
AS
21852009-03-16 Andrew Stubbs <ams@codesourcery.com>
2186
2187 * dwarf2.c (read_section): Always use rawsize, if available.
2188
588f62fc
AM
21892009-03-16 Alan Modra <amodra@bigpond.net.au>
2190
2191 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
2192 of rawsize and size for buffer.
2193
a14c90c1
UW
21942009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2195
2196 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
2197 parameter just because fixed sections fit into local store.
2198 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
2199 generating overlays if fixed sections plus reserved stack
2200 and heap space fit into local store.
2201
30c665df
AM
22022009-03-15 Alan Modra <amodra@bigpond.net.au>
2203
2204 * elf32-spu.c (build_stub): Correct icache set_id.
2205 (spu_elf_relocate_section): Likewise.
2206
f95942a3
RS
22072009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2208
2209 * xcofflink.c (xcoff_link_check_archive_element): Only free the
2210 symbol table if it was created by the current call.
2211
670562e9
RS
22122009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2213
2214 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
2215 class XMC_DS rather than XMC_UA.
2216
b64232cc
RS
22172009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2218
2219 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
2220 bfd_boolean export_defineds parameter with an unsigned int
2221 auto_export_flags parameter.
2222 * bfd-in2.h: Regenerate.
2223 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
2224 split out from xcoff_build_ldsyms.
2225 (xcoff_covered_by_expall_p): New function.
2226 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
2227 but with extra code to handle -bexpfull and -bexpall.
2228 (xcoff_mark_auto_exports): New function.
2229 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
2230 a function should be automatically exported.
2231 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
2232 parameter with an auto_export_flags parameter. Update ldinfo
2233 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
2234 exported symbols.
2235
7d504122
RS
22362009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2237
2238 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
2239 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
2240 init and fini functions. Do garbage collection for objects
2241 without an entry point too.
2242
8602d4fe
RS
22432009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2244
2245 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
2246 check whether a symbol has csect information.
2247 (coff_print_aux): Likewise.
2248 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
2249 information for C_AIX_WEAKEXT too.
2250 (_bfd_xcoff_swap_aux_out): Likewise.
2251 (xcoff_reloc_type_br): Handle defweak symbols too.
2252 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
2253 information for C_AIX_WEAKEXT too.
2254 (_bfd_xcoff64_swap_aux_out): Likewise.
2255 (xcoff64_reloc_type_br): Handle defweak symbols too.
2256 * coffgen.c (coff_print_symbol): Handle auxillary function
2257 information for C_AIX_WEAKEXT too.
2258 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
2259 instead of BSF_GLOBAL if the L_WEAK flag is set.
2260 (xcoff_dynamic_definition_p): New function.
2261 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
2262 defines h. Don't change h if ldsym isn't the definition. Otherwise,
2263 always take the symbol class from the ldsym. Use weak bfd symbol
2264 types for weak ldsyms.
2265 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
2266 Fix the check for whether a definition is from a shared object.
2267 Allow redefinitions of weak symbols.
2268 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
2269 (xcoff_keep_symbol_p): Likewise.
2270 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
2271 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
2272 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
2273 but mark them as L_WEAK.
2274 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
2275 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
2276
5b49f6dc
RS
22772009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2278
2279 * xcofflink.c (xcoff_mark): When walking the relocations,
2280 only mark the target symbol or the target section, not both.
2281 (xcoff_final_definition_p): New function.
2282 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
2283 symbol is a valid definition of the associated output symbol.
2284 Use XCOFF_ALLOCATED to stop the same hash table entry having
2285 two output symbols.
2286 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
2287 keeping a symbol.
2288 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
2289
c4037431
RS
22902009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2291
2292 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
2293 symbols as XMC_XO.
2294
3df13c4a
RS
22952009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2296
2297 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
2298 * libcoff.h: Regenerate.
2299 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
2300 line-number counts in the bfd's lineno_counts field.
2301 Don't keep per-csect line-number counts.
2302 (xcoff_sweep): Don't update per-csect line-number counts.
2303 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
2304 entries in each output section.
2305 (xcoff_link_input_bfd): Get the number of line numbers from
2306 the bfd's lineno_counts field, rather than recalculating it
2307 from scratch. Fix the range check when updating C_BINCL and
2308 C_EINCL symbols.
2309 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
2310 here. Don't expect csects to have line-number counts.
2311
e450936a
RS
23122009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2313
2314 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
2315 * libcoff.h: Regenerate.
2316 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
2317 "skip" logic from xcoff_link_input_bfd.
2318 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
2319 objects in a dynamic link, rather than checking whether csectpp
2320 is null. Always allocate debug_index for other objects,
2321 and always go through the loop. Update the type of debug_index
2322 after the change above. Read the auxillary csect information
2323 and use xcoff_keep_symbol_p to decide whether a symbol should
2324 be kept. Set its debug_index to -2 if not.
2325 (xcoff_link_input_bfd): Update the type of debug_index after
2326 the change above and always expect it to be nonnull. Use it to
2327 test whether a symbol should be stripped, rather than making the
2328 decision here. Postpone all symbol creation to the second pass.
2329
47dfb2ca
RS
23302009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2331
2332 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
2333 creating a descriptor.
2334 (xcoff_sweep): Don't mark toc_section unless it's needed.
2335 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
2336 when marking every bfd.
2337 (xcoff_link_input_bfd): Skip all TOC anchors.
2338 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
2339 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
2340 to -1; call xcoff_find_tc0 instead.
2341
4cc02a02
RS
23422009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2343
2344 * libcoff-in.h (xcoff_section_tdata): Update commentary.
2345 * libcoff.h: Regenerate.
2346 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
2347 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
2348 the previous symbol's csect. Treat last_symndx as an inclusive value
2349 and simplify its handling.
2350 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
2351 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 2352 relocations against undefined or absolute sections.
4cc02a02
RS
2353 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
2354 of bfd_und_section_ptr.
2355 (xcoff_link_input_bfd): Likewise.
2356
858ef0ce
RS
23572009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2358
2359 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
2360 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
2361 flag is set. Assert that all undefined symbols are either
2362 imported or defined by a dynamic object.
2363 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2364 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
2365 handling to all relocations. Only set XCOFF_CALLED for function
2366 symbols.
2367 (xcoff_find_function): New function, split out from...
2368 (bfd_xcoff_export_symbol) ...here.
2369 (xcoff_set_import_path): New function, split out from...
2370 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
2371 meaning of XCOFF_CALLED.
2372 (xcoff_mark_symbol): If we mark an undefined and unimported
2373 symbol, find some way of defining it. If the symbol is a function
2374 descriptor, fill in its definition automatically. If the symbol
2375 is a function, mark its descriptor and allocate room for global
2376 linkage code. Otherwise mark the symbol as implicitly imported.
2377 Move the code for creating function descriptors from...
d1fa68d3 2378 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
2379 check for symbols that were implicitly defined.
2380 (xcoff_mark): Don't count any dynamic relocations against
2381 function symbols.
2382 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
2383 in the xcoff link info.
2384 (xcoff_link_input_bfd): Remove handling of undefined and
2385 unexported symbols.
2386
12b2cce9
RS
23872009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2388
2389 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
2390 if the target is absolute. Fix comment typo.
2391 (xcoff_ppc_relocate_section): Remove FIXME.
2392 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
2393 if the target is absolute.
2394
0e3212ad
RS
23952009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2396
2397 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
2398 R_POS and R_NEG relocations against absolute symbols to the
2399 .loader section.
2400
d19d97e9
RS
24012009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2402
2403 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
2404 to 2 for bfd_mach_ppc_620.
2405
e5231592
RS
24062009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2407
2408 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
2409 * configure.in: Likewise.
2410 * configure: Regenerate.
2411
3516e984
L
24122009-03-13 H.J. Lu <hongjiu.lu@intel.com>
2413
2414 PR binutils/9945
2415 * elf.c (assign_section_numbers): Generate symbol table if there
2416 is any relocation in output.
2417 (_bfd_elf_compute_section_file_positions): Likewise.
2418
ce98a316
NC
24192009-03-13 Nick Clifton <nickc@redhat.com>
2420
2421 PR 9934
2422 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
2423 * elflink.c (elf_link_read_relocs_from_section): Use
2424 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
2425 relocs but no symbol table.
2426 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2427
c4fb387b
L
24282009-03-12 H.J. Lu <hongjiu.lu@intel.com>
2429
2430 PR ld/9938
2431 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
2432 to check ___tls_get_addr.
2433
2434 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
2435 strncmp to check __tls_get_addr.
2436
53638231
AS
24372009-03-12 Andrew Stubbs <ams@codesourcery.com>
2438
2439 * dwarf2.c (read_section): Always check the offset, even when the
2440 section has been read before.
2441
09e8c3bf
L
24422009-03-11 H.J. Lu <hongjiu.lu@intel.com>
2443
2444 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
2445 comments.
2446
36e4dce6
CD
24472009-03-11 Chris Demetriou <cgd@google.com>
2448
2449 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
2450 * bfd-in2.h: Regenerate.
2451 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
2452 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
2453 mode.
2454 (bsd_write_armap): Likewise.
2455 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
2456 flag is set, do nothing.
2457 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
2458 for timestamp.
2459
9b175a76
UW
24602009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
2461
2462 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
2463 used to update stack pointer.
2464
f501de17
DA
24652009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2466
2467 PR binutils/9921
2468 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
2469 for unknown symbols in absolute section.
2470
d11fd249
NC
24712009-03-06 Nick Clifton <nickc@redhat.com>
2472
2473 * po/es.po: Updated Spanish translation.
2474
8cd931b7
CL
24752009-03-05 Christophe Lyon <christophe.lyon@st.com>
2476
2477 * elf32-arm.c (group_sections): Take next section size into
2478 account before accepting to group it.
2479
5fa9e92f
CL
24802009-03-05 Christophe Lyon <christophe.lyon@st.com>
2481
2482 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
2483 PLT entries.
2484 (elf32_arm_final_link_relocate): Likewise.
2485
b92997d6
AM
24862009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
2487
2488 PR 9923
2489 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
2490
727fc41e
AM
24912009-03-04 Alan Modra <amodra@bigpond.net.au>
2492
2493 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
2494 * section.c (struct bfd_section): Add has_tls_get_addr_call.
2495 (BFD_FAKE_SECTION): Init new flag.
2496 * ecoff.c (bfd_debug_section): Likewise.
2497 * bfd-in2.h: Regenerate.
2498 * libbfd.h: Regenerate.
2499 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
2500 (ppc_elf_reloc_type_lookup): Handle new relocs.
2501 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
2502 without marker relocs.
2503 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2504 if section has no old-style calls.
2505 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
2506 Don't try to optimize new-style __tls_get_addr call when handling
2507 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2508 relocs.
2509 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
2510 (ppc64_elf_reloc_type_lookup): Handle new relocs.
2511 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
2512 without marker relocs.
2513 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2514 if section has no old-style calls. Set toc_ref for new relocs as
2515 appropriate.
2516 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
2517 Don't try to optimize new-style __tls_get_addr call when handling
2518 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2519 relocs.
2520
51dec227
AM
25212009-03-04 Alan Modra <amodra@bigpond.net.au>
2522
2523 PR 6768
2524 * configure.in: Test for ld --as-needed support. Link shared
2525 libbfd against libm.
2526 * configure: Regenerate.
2527
a1f7ca36
AM
25282009-03-03 Alan Modra <amodra@bigpond.net.au>
2529
2530 * Makefile.am: Run "make dep-am".
2531 * Makefile.in: Regenerate.
2532
c3b7224a
NC
25332009-03-02 Qinwei <qinwei@sunnorth.com.cn>
2534
2535 * elf32-score7.c: New file.
2536 * elf32-score.h: New file.
2537 * elf32-score.c: Add code to support score 7. Set score7 as the
2538 default.
2539 * cpu-score.c: Add score7 architecure.
2540 (compatibile): New function.
2541 * Makefile.am: Add rules for building elf32-score7 object.
2542 * Makefile.in: Regenerate.
2543 * configure.in: Add elf32-score7 object to score vectors.
2544 * configure: Regenerate.
2545 * reloc.c: Add score7 relocs.
2546 * archures.c: Add score3 and score7 machine numbers.
2547 * bfd-in2.h: Regenerate.
2548 * libbfd.h: Regenerate.
2549
58e24671
RW
25502009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2551
2552 * configure: Regenerate.
2553
5887528b
DA
25542009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2555
d45b7d74
DA
2556 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
2557 (elf32_hppa_check_relocs): Use it.
2558
5887528b
DA
2559 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
2560 elf64-hppa.c.
2561 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2562 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2563 (elf_hppa_is_dynamic_loader_symbol): Likewise.
2564 (elf_hppa_record_segment_addrs): Likewise.
2565 (elf_hppa_final_link): Likewise.
2566 (elf_hppa_relocate_insn): Likewise.
2567 (elf_hppa_final_link_relocate): Likewise.
2568 (elf64_hppa_relocate_section): Likewise.
2569 * elf64-hppa.c: Insert above.
2570
a03bd320
DA
25712009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2572
2573 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
2574 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
2575 (elf_hppa_relocate_section): Likewise.
2576 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
2577 from struct elf_link_hash_entry. Add count field.
2578 (struct elf64_hppa_dyn_hash_table): Delete.
2579 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
2580 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
2581 (hppa_elf_hash_entry, eh_name): Define.
2582 (elf64_hppa_new_dyn_hash_entry): Delete.
2583 (elf64_hppa_dyn_hash_lookup): Delete.
2584 (elf64_hppa_dyn_hash_traverse): Delete.
2585 (get_dyn_name): Delete.
2586 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
2587 of struct elf64_hppa_dyn_hash_entry *.
2588 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
2589 allocate_global_data_plt, allocate_global_data_stub,
2590 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
2591 Likewise.
2592 (hppa64_link_hash_newfunc): New.
2593 (elf64_hppa_hash_table_create): Rework.
2594 (count_dyn_reloc): Likewise.
2595 (hppa64_elf_local_refcounts): New.
2596 (elf64_hppa_check_relocs): Rework using standard technique for recording
2597 local DLT, PLT and OPD reference counts.
2598 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
2599 elf_link_hash_entry *.
2600 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
2601 allocate_global_data_plt, allocate_global_data_stub,
2602 allocate_global_data_opd, allocate_dynrel_entries,
2603 elf64_hppa_adjust_dynamic_symbol,
2604 elf64_hppa_mark_milli_and_exported_functions): Likewise.
2605 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
2606 Use hppa_link_hash_table. Rework.
2607 (elf64_hppa_link_output_symbol_hook): Rework.
2608 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
2609 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
2610 elf64_hppa_finish_dynamic_sections): Likewise.
2611
ebe24dd4
CL
26122009-02-26 Christophe Lyon <christophe.lyon@st.com>
2613
2614 * elf32-arm.c (stub_reloc_type): Removed.
2615 (insn_sequence): Renamed reloc_type field to r_type.
2616 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
2617 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
2618 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
2619 (elf32_arm_stub_type): Add new enum entries for the new stubs.
2620 (arm_stub_is_thumb): Catch new stubs.
2621 (arm_type_of_stub): Handle new stubs.
2622 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
2623 (bfd_elf32_arm_process_before_allocation): Remove useless
2624 condition.
2625
b9d678e0
L
26262009-02-25 H.J. Lu <hongjiu.lu@intel.com>
2627
2628 * elf.c (elf_find_function): Use is_function_type to check
2629 function symbol.
2630
56fb3749
SA
26312009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2632
2633 * xtensa-modules.c: Revert to previous version 1.11 due
2634 to inadvertant commit.
2635
658ff993
SA
26362009-02-24 Sterling Augustine <sterling@tensilica.com>
2637
2638 * elf32-xtensa.c (text_action_add): Separate test for action
2639 type. Break if saved action is ta_widen_insn at same offset.
2640
cf3eccff
DJ
26412009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2642
2643 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
2644 to elf32_arm_stub_long_branch_any_arm_pic.
2645 (elf32_arm_stub_long_branch_any_thumb_pic): New.
2646 (enum elf32_arm_stub_type, arm_type_of_stub)
2647 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
2648 separately.
2649
07d72278
DJ
26502009-02-24 Joseph Myers <joseph@codesourcery.com>
2651
2652 * elf32-arm.c (PREV_SEC): Update comment.
2653 (group_sections): Rename argument to stubs_always_after_branch.
2654 Reverse the list and place stubs at the end of input sections.
2655 Undefine NEXT_SEC.
2656 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
2657
4e31c731
DJ
26582009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
2659
2660 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
2661 Fix formatting.
2662 (arm_size_one_stub): Remove unnecessary break.
2663 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
2664
26652009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
2666
2667 * elf32-arm.c (stub_insn_type): New type.
2668 (stub_reloc_type): Likewise.
2669 (insn_sequence): Likewise.
2670 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
2671 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
2672 (elf32_arm_stub_long_branch_thumb_only): Likewise.
2673 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
2674 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
2675 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
2676 (elf32_arm_stub_hash_entry): Add new helper fields.
2677 (stub_hash_newfunc): Initialize these new fields.
2678 (arm_build_one_stub): Encode Arm and Thumb instructions separately
2679 to take endianness into account.
2680 (arm_size_one_stub): Compute size of stubs using insn_sequence.
2681 (arm_map_one_stub): Code is now more generic, thanks to
2682 insn_sequence.
2683
c2b4a39d
CL
26842009-02-23 Christophe Lyon <christophe.lyon@st.com>
2685
2686 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
2687 code.
2688 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
2689 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
2690 BLX is not available. Fix typo in warning message. Add comments
2691 and improve formatting.
2692 (arm_build_one_stub): Adjust to new
2693 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
2694 (arm_map_one_stub): Likewise.
2695
0c376465 26962009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
2697 Eric Botcazou <ebotcazou@adacore.com>
2698 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
2699
2700 * vms.h: Update copyright year, fix comments, reorder declarations.
2701 (_bfd_save_vms_section): Remove the prototype.
2702 (EGPS_S_V_NO_SHIFT): New constant.
2703 (bfd_vms_set_section_flags): New prototype.
2704 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
2705 constants.
2706 (EGSY_S_W_FLAGS): Ditto.
2707 (EGSY_S_V_QUAD_VAL): Ditto.
2708 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
2709 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
2710 EGST_S_B_NAMLNG): Ditto.
2711 (ESRF_S_B_NAMLNG): Ditto.
2712 (ETIR_S_C_HEADER_SIZE): Ditto.
2713 (EGPS_S_V_ALLOC_64BIT): Ditto.
2714 (DST_S_C_EPILOG): Ditto.
2715 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
2716 (DST_S_C_SRC_INCRLNUM_B): Ditto.
2717 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
2718 (DST_S_L_PCLINE_UNSLONG): Ditto.
2719 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
2720 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
2721 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
2722 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
2723 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
2724 (DST_S_B_SRC_UNSBYTE): Ditto.
2725 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
2726 Add prototypes.
2727 (vms_section, vms_reloc): Remove types.
2728 (hdr_struc): Replaced by ...
2729 (hdr_struct): ... new type.
2730 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
2731 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
2732 (EMH_DATE_LENGTH): Ditto.
2733 (eom_struc): Replaced by ...
2734 (eom_struct): ... new type.
2735 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
2736 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
2737 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
2738 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
2739 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
2740 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
2741 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
2742 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
2743 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
2744 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
2745 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
2746 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
2747 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
2748 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
2749 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
2750 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
2751 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
2752 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
2753 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
2754 (enum file_type_enum): New type.
2755 (struct location_struct): Removed.
2756 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
2757 (struct funcinfo, struct module): Ditto.
2758 (struct vms_private_data_struct): Update fields.
2759 (struct vms_section_data_struct): New type.
2760
2761 * vms.c: Update copyright year, fix comments,
2762 Fix includes for DECC, add prototypes.
2763 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
2764 some initializers.
2765 Use flavour to set is_vax, location_stack is removed.
2766 (struct pair): Declare.
2767 (fill_section_ptr): Initialize variables at declaration.
2768 Add guard to set SECTION_SYM flag, handlde und section.
2769 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
2770 (_bfd_vms_slurp_object_records): New function, replaces previous
2771 vms_object_p.
2772 (vms_slurp_module): New function.
2773 (vms_slurp_image): Ditto.
2774 (vms_object_p): Complete rewrite.
2775 (vms_mkobject): Use is_vax field to slect architecture.
2776 (free_reloc_stream): New function.
2777 (vms_convert_to_var): Ditto.
2778 (vms_convert_to_var_1): Ditto.
2779 (vms_convert_to_var_unix_filename): Ditto.
2780 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
2781 VAR format on VMS.
2782 (vms_new_section_hook): Set alignment to 0, allocate private data.
2783 (vms_get_section_contents): Load content.
2784 (vms_get_symbol_info): Handle undefined section.
2785 (vms_find_nearest_line): Handle.
2786 (alloc_reloc_stream): New function.
2787 (vms_slurp_reloc_table): Ditto.
2788 (vms_get_reloc_upper_bound): Make it real.
2789 (vms_canonicalize_reloc): Do the real work.
2790 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
2791 ALPHA_R_BOH.
2792 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
2793 (vms_set_arch_mach): Check arch.
2794 (vms_set_section_contents): Copy the content after allocation.
2795 (vms_alpha_vec): Update object flags.
2796
2797 * vms-tir.c: Update copyright year, fix comments,
2798 add prototypes for new functions.
2799 (dst_define_location): New function.
2800 (dst_restore_location): New function.
2801 (dst_retrieve_location): New function.
2802 (dst_check_allocation): New function.
2803 (image_dump): Call dst_check_allocation.
2804 (image_write_b): Ditto.
2805 (image_write_w): Ditto.
2806 (image_write_l): Ditto.
2807 (image_write_q): Ditto.
2808 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
2809 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
2810 CTL_STKDL.
2811 Call error handler instead of abort if name is not known.
2812 (etir_sta): Add quarter_relocs argument and set it.
2813 Fix cast.
2814 (etir_sto): Ditto.
2815 (etir_opr): Ditto, return FALSE in case of error.
2816 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
2817 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
2818 (etir_stc): Add quarter_relocs argument and set it, fix cast.
2819 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
2820 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
2821 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
2822 Return FALSE in case of error.
2823 (tir_sta): Change sign of psect.
2824 (tir_ctl): Ditto.
2825 (tir_cmd): Fix cast. Makes tir_table static const.
2826 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
2827 add argument to explain.
2828 (analyze_etir): Initialize maxptr, add quarter_relocs
2829 declaration, move some declarations into inner scopes.
2830 Handle quarter_relocs and STO_IMM.
2831 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
2832 (_bfd_vms_slurp_relocs): New function.
2833 (_bfd_vms_decode_relocs): New function.
2834 (sto_imm): Rewritten.
2835 (start_first_etbt_record): New function.
2836 (start_another_etbt_record): Ditto.
2837 (etir_output_check): Ditto.
2838 (defer_reloc_p): Ditto.
2839 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
2840 a for-loop. Correctly deals with contents, deals with .vmsdebug,
2841 rewritte relocations handling.
2842 (_bfd_vms_write_tbt): Removed.
2843 (_bfd_vms_write_dbg): Ditto.
2844
2845 * vms-misc.c: Update copyright year, Fix comments.
2846 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
2847 (maybe_adjust_record_pointer_for_object): New function.
2848 (_bfd_vms_get_first_record): New function, replaces ...
2849 (_bfd_vms_get_record): .. removed.
2850 (_bfd_vms_get_object_record): New function.
2851 (_bfd_vms_get_object_record): New function.
2852 (vms_get_remaining_object_record): New function, replaces ...
2853 (_bfd_vms_get_next_record): ... removed.
2854 (add_new_contents): Removed.
2855 (_bfd_save_vms_section): Removed.
2856 (_bfd_get_vms_section): Removed.
2857 (_bfd_vms_output_flush): Write in VAR format.
2858 (new_symbol): Don't make UND section.
2859
2860 * vms-hdr.c: Update copyright year, update list of record handled.
2861 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
2862 (_bfd_vms_write_hdr): Strip vms and unix patches,
2863 add comments, truncate module name at 31 characters,
2864 use constants instead of hard-coded value,
2865 write BFD version instead of a fixed string.
2866 (_bfd_vms_slurp_ihd): New function.
2867 (_bfd_vms_slurp_isd): Ditto.
2868 (_bfd_vms_slurp_ihs): Ditto.
2869 (new_module): Ditto.
2870 (parse_module): Ditto
2871 (build_module_list): Ditto.
2872 (module_find_nearest_line): Ditto.
2873 (_bfd_vms_find_nearest_dst_line): Ditto.
2874 (vms_slurp_debug): Ditto.
2875 (_bfd_vms_slurp_dbg): Ditto.
2876 (_bfd_vms_slurp_tbt): Ditto.
2877 (_bfd_vms_write_dbg): Ditto.
2878 (_bfd_vms_write_tbt): Ditto.
2879
2880 * vms-gsd.c: Update copyright year, update list of records handled.
2881 (EVAX_LITERALS_NAME): New macro.
2882 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
2883 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
2884 (register_universal_symbol): New function and prototype.
2885 (_bfd_vms_slurp_gsd): Fix indentations and casts,
2886 improve debug messages,
2887 use constants instead of hard-coded value,
2888 fix missing endianness conversion,
2889 handle global symbol (SYMG).
2890 (bfd_vms_set_section_flags): New function.
2891 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
2892 handle section literals,
2893 fix indentation,
2894 handle section bfd and vms flags,
2895 don't output LIB$INITIALIZE symbol,
2896 fix handling of weak symbols,
2897 fix evax vs vax procedure descriptor,
2898 handle absolute symbols.
2899
2900 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
2901 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
2902
2903 * makefile.vms (DEFS): Fix flags for VMS.
2904
2905 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
2906
2907 * bfd-in2.h: Regenerated.
2908 * libbfd.h: Regenerated.
2909
47149254
CC
29102009-02-20 Cary Coutant <ccoutant@google.com>
2911
2912 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
2913 in struct stat.
2914
6b1cecf3
DK
29152009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
2916
2917 PR gas/7059
2918 * coffcode.h (coff_write_object_contents): Don't let the string
2919 table offset overflow the s_name field when using long section names.
2920
88183869
DK
29212009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
2922
2923 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
2924 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
2925 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2926 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
2927 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
2928 (bfd_pmac_xcoff_backend_data): Likewise.
2929 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
2930 (bfd_xcoff_aix5_backend_data): Likewise.
2931 (xcoff64_write_object_contents): Delete unused long_section_names
2932 local variable.
2933 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
2934 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
2935 struct non-const.
2936 * coffcode.h (documentation): Update to describe long section names.
2937 (COFFLONGSECTIONCATHELPER): New helper macro.
2938 (BLANKOR1TOODD): Likewise.
2939 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
2940 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
2941 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
2942 (bfd_coff_set_long_section_names_allowed): New function.
2943 (bfd_coff_set_long_section_names_disallowed): Likewise.
2944 (struct bfd_coff_backend_data): Add new backend hook function
2945 pointer _bfd_coff_set_long_section_names.
2946 (bfd_coff_set_long_section_names): New backend hook.
2947 (coff_write_object_contents): Only generate long section names if
2948 bfd_coff_long_section_names() indicates they are currently enabled.
2949 (bfd_coff_std_swap_table): Make non-const, and initialise long
2950 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
2951 (ticoff0_swap_table): Likewise to both.
2952 (ticoff1_swap_table): Again, likewise to both.
2953 * coffgen.c (make_a_section_from_file): Allow long section names
2954 as inputs even if not currently allowed for outputs.
2955 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
2956 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
2957 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
2958 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2959 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
2960 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
2961 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2962 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
2963 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
2964 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2965 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
2966 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
2967 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
2968 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
2969 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
2970 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
2971 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2972 * libcoff-in.h: Update copyright year to cause updated copyright
2973 year in generated libcoff.h, and fix typo.
2974 * libcoff.h: Regenerated.
2975 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
2976 (_bfd_ecoff_no_long_sections): Add prototype.
2977 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
2978 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
2979 defined by an including .c file.
2980 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
2981 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
2982 (ticoff1_swap_table): Likewise to both.
2983
90d8a22c
CL
29842009-02-18 Christophe Lyon <christophe.lyon@st.com>
2985
2986 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
2987 stub. Catch default case error.
2988 (arm_map_one_stub): Add missing Thumb mapping symbol.
2989
12123067
NC
29902009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
2991
2992 PR 9841
2993 * elf32-avr.c: Handle case where no local symbos exist correctly.
2994
fea2b4d6
CL
29952009-02-16 Christophe Lyon <christophe.lyon@st.com>
2996
2997 bfd/
2998 * elf32-arm.c (arm_long_branch_stub,
2999 arm_thumb_v4t_long_branch_stub,
3000 arm_thumb_thumb_long_branch_stub,
3001 arm_thumb_arm_v4t_long_branch_stub,
3002 arm_thumb_arm_v4t_short_branch_stub,
3003 arm_pic_long_branch_stub):
3004 Renamed to elf32_arm_stub_long_branch_any_any,
3005 elf32_arm_stub_long_branch_v4t_arm_thumb,
3006 elf32_arm_stub_long_branch_thumb_only,
3007 elf32_arm_stub_long_branch_v4t_thumb_arm,
3008 elf32_arm_stub_short_branch_v4t_thumb_arm,
3009 elf32_arm_stub_long_branch_any_any_pic.
3010 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3011 arm_thumb_thumb_stub_long_branch,
3012 arm_thumb_arm_v4t_stub_long_branch,
3013 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3014 Renamed to arm_stub_long_branch_any_any,
3015 arm_stub_long_branch_v4t_arm_thumb,
3016 arm_stub_long_branch_thumb_only,
3017 arm_stub_long_branch_v4t_thumb_arm,
3018 arm_stub_short_branch_v4t_thumb_arm,
3019 arm_stub_long_branch_any_any_pic.
3020
13e0a874
DA
30212009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3022
3023 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3024 in branch offset check.
3025
3a71aa26
AM
30262009-02-15 Alan Modra <amodra@bigpond.net.au>
3027
3028 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3029 add toc.symndx and toc.add.
3030 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3031 Set up toc.add.
3032 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3033 callers.
3034 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3035 (branch_reloc_hash_match): New function, extracted from..
3036 (ppc64_elf_tls_optimize): ..here.
3037 (ppc64_elf_relocate_section): Properly set addends when optimizing
3038 tls sequences. Avoid unnecessary reading and writing of insns.
3039 Only redo reloc when symbol changed. Bypass symbol checks when
3040 using tlsld_got.
3041 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
3042 (branch_reloc_hash_match): New function, extracted from..
3043 (ppc_elf_tls_optimize): ..here.
3044 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
3045 Don't clear addend on zapped __tls_get_addr reloc.
3046
2c2b4ed4
NC
30472009-02-12 Nick Clifton <nickc@redhat.com>
3048
3049 PR 9827
3050 * elflink.c (bfd_elf_final_link): When counting the relocations,
3051 if the header size has not been set yet then assume that it will
3052 match the output section's reloc type.
3053
453f5985
NS
30542009-02-12 Nathan Sidwell <nathan@codesourcery.com>
3055
3056 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
3057 relocatable link.
3058
3209bffa
AM
30592009-02-09 Alan Modra <amodra@bigpond.net.au>
3060
3061 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
3062 (find_function): Likewise.
3063 (pasted_function): Don't error if no prior function found.
3064 (discover_functions): Revert 2008-12-10 change. Extend first
3065 function range to start of section.
3066
813c8a3c
DA
30672009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3068
3069 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
3070 functions to C90.
3071 * elf64-hppa.h: Likewise.
3072
2d0f9ad9
JM
30732009-02-06 Joseph Myers <joseph@codesourcery.com>
3074
3075 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
3076 .sbss handling.
3077
50e00962
AM
30782009-02-04 Alan Modra <amodra@bigpond.net.au>
3079
3080 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
3081 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
3082
52b6b6b9
JM
30832009-02-03 Sandip Matte <sandip@rmicorp.com>
3084
3085 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3086 * archures.c (bfd_mach_mips_xlr): Define.
3087 * bfd-in2.h: Regenerate.
3088 * cpu-mips.c (I_xlr): Define.
3089 (arch_info_struct): Add XLR entry.
3090 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3091 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
3092 (mips_mach_extensions): Add XLR entry.
3093
654c3c9f
EW
30942009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
3095
3096 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
3097
31dd3154
JM
30982009-02-03 Carlos O'Donell <carlos@codesourcery.com>
3099
3100 * configure.in: AC_SUBST pdfdir.
d1fa68d3 3101 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
3102 and install-pdf-recursive targets. Define pdfdir.
3103 * doc/Makefile.am: Define pdf__strip_dir. Add
3104 install-pdf and install-pdf-am targets.
d1fa68d3 3105 * po/Make-in: Add install-pdf target.
31dd3154
JM
3106 * configure: Regenerate.
3107 * Makefile.in: Regenerate
3108 * doc/Makefile.in: Regenerate.
3109
cf869cce
NC
31102009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
3111
3112 * bfd-in2.h: Regenerate.
3113 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
3114 fields from n_entries to n_slots where appropriate, update comments.
3115 (HOWTO): Add TLS relocations.
3116 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
3117 (enum elf_m68k_got_offset_size): New enum.
3118 (struct elf_m68k_got_entry.type): Move field to ...
3119 (struct elf_m68k_got_entry_key): ... here. Update all uses.
3120 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
3121 functions.
3122 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
3123 functions.
3124 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
3125 fields into n_entries array. Update comments.
3126 (elf_m68k_init_got): Simplify, update all uses.
3127 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
3128 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
3129 GOT entries; update name, update all uses.
3130 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
3131 (elf_m68k_get_got_entry): Update.
3132 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
3133 simplify.
3134 (elf_m68k_remove_got_entry_type): Simplify.
3135 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
3136 (elf_m68k_can_merge_gots): Update.
3137 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
3138 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
3139 GOT entries, simplify.
3140 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
3141 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
3142 field, remove obsoleted local_n_entries field.
3143 (elf_m68k_partition_multi_got_2): New static function.
3144 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
3145 update.
3146 (elf_m68k_remove_got_entry_type): Update.
3147 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 3148 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
3149 update of sgot->size and srelgot->size.
3150 (elf_m68k_gc_sweep_hook): Update.
3151 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3152 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
3153 TLS relocations.
3154 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
3155 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
3156
c1a0a41f
DD
31572009-02-02 DJ Delorie <dj@redhat.com>
3158
3159 * elf32-mep.c (config_names): Regenerate configuration.
3160
72a80a16
AM
31612009-02-02 Alan Modra <amodra@bigpond.net.au>
3162
3163 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
3164 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
3165 * elf.c (bfd_elf_get_str_section): Make static.
3166 (bfd_elf_find_section): Delete.
3167 * libbfd.h: Regenerate.
3168
273f4430
JK
31692009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3170
3171 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
3172 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
3173
010e5ae2
AM
31742009-01-31 Alan Modra <amodra@bigpond.net.au>
3175
3176 * elflink.c (on_needed_list): New function.
3177 (elf_link_add_object_symbols): Link in --as-needed libs if they
3178 satisfy undefined symbols in other libs.
3179
33a7ffc2
JM
31802009-01-30 Julian Brown <julian@codesourcery.com>
3181
3182 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
3183 EXEC_P or DYNAMIC flags, and skip sections which are being linked
3184 with --just-symbols (-R).
3185
13d72a14
AN
31862009-01-29 Adam Nemet <anemet@caviumnetworks.com>
3187
3188 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
3189 high_pc in order to properly sign-extend VMAs.
3190
d334575b 31912009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
3192 Mark Shinwell <shinwell@codesourcery.com>
3193 Catherine Moore <clm@codesourcery.com>
d334575b
JM
3194
3195 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
3196
528aeb62
CM
31972009-01-28 Catherine Moore <clm@codesourcery.com>
3198
3199 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
3200 SEC_LOAD for dynamic relocation sections.
3201
f6f05983
HPN
32022009-01-27 Hans-Peter Nilsson <hp@axis.com>
3203
3204 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
3205 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
3206 the size of local TLS data.
3207
27cc28f9
AS
32082009-01-27 Andreas Schwab <schwab@suse.de>
3209
3210 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
3211 architectures in the archive.
3212
b3bf42d8
HPN
32132009-01-27 Hans-Peter Nilsson <hp@axis.com>
3214
f551b6f0
HPN
3215 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
3216 <R_CRIS_32_DTPREL>: Correct relocation value.
3217
b3bf42d8
HPN
3218 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
3219 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
3220 symbols with non-default visibility.
3221
9bc4e62b
NS
32222009-01-26 Nathan Sidwell <nathan@codesourcery.com>
3223
3224 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
3225 describing the trampolines.
3226 (ppc_elf_relocate_section): Update relocs to describe the
3227 trampolines.
3228
aeaf6540
DA
32292009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3230
3231 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
3232 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
3233 and R_PARISC_PCREL12F relocations.
3234
1e8fa21e
AM
32352009-01-24 Alan Modra <amodra@bigpond.net.au>
3236
3237 PR 6022
3238 * elflink.c (find_version_for_sym): New function split out from,
3239 but without export_dynamic test, ..
3240 (_bfd_elf_link_assign_sym_version): ..here.
3241 (_bfd_elf_export_symbol): Use it.
3242
28caa186
AM
32432009-01-23 Alan Modra <amodra@bigpond.net.au>
3244
3245 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
3246 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
3247 * elflink.c: ..here, somewhat modified.
3248 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
3249 _bfd_elf_link_find_version_dependencies,
3250 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
3251 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3252 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
3253 declare..
3254 * elflink.c: ..and make static here.
3255 (_bfd_elf_link_find_version_dependencies): Adjust for removal
3256 of output_bfd from struct elf_find_verdep_info.
3257 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
3258 struct elf_info_failed.
3259 (bfd_elf_size_dynamic_sections): Adjust.
3260
be04437d
AM
32612009-01-22 Alan Modra <amodra@bigpond.net.au>
3262
3263 PR 6832
3264 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
3265 after comp_unit_find_line call.
3266
58f9615c
NC
32672009-01-21 Nick Clifton <nickc@redhat.com>
3268
3269 PR 9769
3270 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
3271 tm_gmtoff field in struct tm.
3272
fb266b8b
AM
32732009-01-21 Alan Modra <amodra@bigpond.net.au>
3274
3275 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
3276 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
3277 sections in soft-icache lines unless non_ia_text. Don't add
3278 rodata if doing so would exceed line size.
3279
451ffe63
HPN
32802009-01-19 Hans-Peter Nilsson <hp@axis.com>
3281
3282 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
3283 types than bfd_link_hash_indirect, before early return, call
3284 _bfd_elf_link_hash_copy_indirect.
3285
5aa6ff7c
AS
32862009-01-19 Andrew Stubbs <ams@codesourcery.com>
3287
3288 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
3289 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
3290 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
3291 (elf_backend_obj_attrs_order): New define.
3292 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
3293 (elfNN_bed): Add elf_backend_obj_attrs_order.
3294
3483fe2e
AS
32952009-01-19 Andrew Stubbs <ams@codesourcery.com>
3296
3297 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
3298 (obj_attr_size): Likewise.
3299 (write_obj_attribute): Likewise.
3300 (_bfd_elf_copy_obj_attributes): Likewise.
3301 (_bfd_elf_parse_attributes): Likewise.
3302 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
3303 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
3304 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
3305 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
3306 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
3307 with macros.
3308
2d0bb761
AS
33092009-01-19 Andrew Stubbs <ams@codesourcery.com>
3310
3311 * elf-attrs.c (is_default_attr): Support defaultless attributes.
3312 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
3313 (bfd_elf_add_obj_attr_string): Likewise.
3314 (bfd_elf_add_obj_attr_int_string): Likewise.
3315 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
3316 * elf-bfd.h (struct obj_attribute): Document new flag bit.
3317 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
3318 Tag_nodefaults has no default value.
3319 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
3320 comment to reflect the new state.
3321
a77e83b7
AM
33222009-01-19 Alan Modra <amodra@bigpond.net.au>
3323
3324 PR 9695
3325 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
3326 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
3327 (adjust_z_magix): Delete dead code handling QMAGIC.
3328
f6d29e26
KT
33292009-01-16 Kai Tietz <kai.tietz@onevision.com>
3330
3331 * coffcode.h (styp_to_sec_flags): Correct interpretation of
3332 IMAGE_SCN_MEM_DISCARDABLE.
3333
29670fb9
AM
33342009-01-16 Alan Modra <amodra@bigpond.net.au>
3335
3336 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
3337 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
3338 * configure.in (commonbfdlib): Delete.
3339 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
3340 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
3341 is available, not just for linux.
3342 * po/SRC-POTFILES.in: Regenerate.
3343 * Makefile.in: Regenerate.
3344 * configure: Regenerate.
3345
91e22acd
AS
33462009-01-15 Andrew Stubbs <ams@codesourcery.com>
3347 Julian Brown <julian@codesourcery.com>
3348
3349 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
3350 ARM attributes in ABI 2.07.
3351 * elf32-arm.c (get_secondary_compatible_arch): New function.
3352 (set_secondary_compatible_arch): New function.
3353 (tag_cpu_arch_combine): New function.
3354 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
3355 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
3356 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
3357 make it fit with order_01243.
3358 Add support for Tag_also_compatible_with,
3359 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
3360 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
3361 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
3362 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
3363 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
3364 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
3365 Rework the way unknown attributes are handled.
3366 Defer errors until all attributes have been processed.
3367
7b86a9fa
AS
33682009-01-15 Andrew Stubbs <ams@codesourcery.com>
3369
3370 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
3371 bfd_elf_add_obj_attr_int_string.
3372 Read Tag_compatibility from its new location in the attribute array,
3373 rather than the attribute list.
3374 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
3375 bfd_elf_add_obj_attr_int_string.
3376 (_bfd_elf_parse_attributes): Likewise.
3377 (_bfd_elf_merge_object_attributes): There's now only one
3378 Tag_compatibility, and it's in the array, not the list.
3379 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
3380 Tag_compatibility.
3381 (bfd_elf_add_obj_attr_compat): Rename to
3382 bfd_elf_add_obj_attr_int_string.
3383 (bfd_elf_add_proc_attr_compat): Rename to
3384 bfd_elf_add_proc_attr_int_string.
3385 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
3386 Tag_compatibility.
3387
01e1a5bc
NC
33882009-01-15 Douglas B Rupp <rupp@gnat.com>
3389
3390 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
3391 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
3392 (vmsutil.lo): Add dependency rule.
3393 * Makefile.in: Regenerate.
3394 * config.bfd (ia64*-*-*vms*): Add case.
3395 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
3396 * configure: Regenerate.
3397 * vmsutil.c: New file.
3398 * vmsutil.h: New file.
3399 * elf-bfd.h (struct bfd_elf_special_section): Change type of
3400 attr to bfd_vma.
3401 * elfxx-ia64.c (elfNN_vms_post_process_headers,
3402 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
3403 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
3404 elfNN_vms_object_p): New functions
3405 * targets.c (bfd_elf64_ia64_vms_vec): New target.
3406
a33dafc3
L
34072009-01-14 H.J. Lu <hongjiu.lu@intel.com>
3408
3409 PR ld/9727
3410 * elflink.c (elf_gc_sweep): Exclude the group section if the
3411 first member of the section group is excluded.
3412
13c0e967
AM
34132009-01-14 Alan Modra <amodra@bigpond.net.au>
3414
3415 PR 9735
3416 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
3417 saved filename, use bfd_alloc rather than bfd_malloc for it.
3418
460e679b
AM
34192009-01-13 Alan Modra <amodra@bigpond.net.au>
3420
3421 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
3422
25076afa
AM
34232009-01-13 Alan Modra <amodra@bigpond.net.au>
3424
3425 * elf32-spu.c (remove_cycles): Always set call->max_depth.
3426
37107878
AM
34272009-01-12 Alan Modra <amodra@bigpond.net.au>
3428
3429 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
3430
cd4a7468
AM
34312009-01-12 Alan Modra <amodra@bigpond.net.au>
3432
3433 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
3434 num_lines_log2.
3435 (struct got_entry): Add br_addr.
3436 (struct call_info): Add priority.
3437 (struct function_info): Add lr_store and sp_adjust.
3438 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
3439 (spu_elf_find_overlays): For soft-icache, mark any section within cache
3440 area as an overlay, and check that no other overlays exist. Look up
3441 icache overlay manager entry sym.
3442 (BRA_STUBS, BRA, BRASL): Define.
3443 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
3444 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
3445 in branch insn.
3446 (count_stub, build_stub): Support soft-icache.
3447 (build_spuear_stubs, process_stubs): Adjust build_stub call.
3448 (spu_elf_size_stubs): Size soft-icache stubs.
3449 (overlay_index): New function.
3450 (spu_elf_build_stubs): Make static. Support soft-icache.
3451 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
3452 (find_function_stack_adjust): Save lr store and stack adjust insn
3453 offsets.
3454 (maybe_insert_function): Adjust find_function_stack_adjust call.
3455 (mark_functions_via_relocs): Retrieve priority.
3456 (remove_cycles): Only warn about pruned arcs when stack_analysis.
3457 (sort_calls): Sort by priority first.
3458 (mark_overlay_section): Ignore .ovl.init.
3459 (sum_stack): Only print when stack_analysis.
3460 (print_one_overlay_section): New function, extracted from..
3461 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
3462 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
3463 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
3464 analysis. Call spu_elf_build_stubs.
3465 (spu_elf_relocate_section): For soft-icache encode overlay index
3466 into addresses.
3467 (spu_elf_output_symbol_hook): Support soft-icache.
3468 (spu_elf_modify_program_headers: Likewise.
37107878 3469
cd4a7468
AM
3470 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
3471 num_regions to num_lines. Add line_size and max_branch.
3472 (enum _ovly_flavour): Add ovly_soft_icache.
3473 (spu_elf_build_stubs): Delete.
3474
80c29487
JK
34752009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3476
3477 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
3478 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
3479
1bc86aea
HPN
34802009-01-07 Hans-Peter Nilsson <hp@axis.com>
3481
3482 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3483 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
3484 the program, the known offset starts at the negative size of the
3485 TLS section.
3486 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
3487 Similar.
3488
3baa454d 34892009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 3490
3baa454d 3491 * config.bfd: Add lm32-*-rtems*.
75606e85 3492
9dbe8890
L
34932009-01-03 H.J. Lu <hongjiu.lu@intel.com>
3494
3495 * coff-ppc.c: Add 2009 to Copyright.
3496 * elf32-cris.c: Likewise.
3497 * elflink.c: Likewise.
3498
0bdf8d40
HPN
34992009-01-03 Hans-Peter Nilsson <hp@axis.com>
3500
3501 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
3502 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
3503
54ac0771
L
35042009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3505
3506 PR ld/9679
3507 * elflink.c (elf_merge_st_other): New.
3508 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
3509 hide them if needed.
3510 (elf_link_add_object_symbols): Updated.
3511
d8880531
L
35122009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3513
3514 PR ld/9676
3515 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
3516 ref_dynamic and dynamic_def fields when setting def_regular
3517 to 1.
3518
b70b5c14
NC
35192009-01-02 Curtis Mackie <curtmackevo@gmail.com>
3520
3521 PR 9682
3522 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
3523 literal.
3524
d8880531 3525For older changes see ChangeLog-2008
56882138
AM
3526\f
3527Local Variables:
3528mode: change-log
3529left-margin: 8
3530fill-column: 74
3531version-control: never
3532End:
This page took 0.604568 seconds and 4 git commands to generate.