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