* merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2
3 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
4 Write trailing padding.
5
6 * merge.c (merge_strings): Round up section size for alignment.
7
8 2005-04-14 David S. Miller <davem@davemloft.net>
9
10 Add TLS support for 64-bit Sparc ELF.
11 * elf64-sparc.c (sparc64_elf_dyn_relocs,
12 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
13 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
14 sparc64_elf_hash_entry, sparc64_elf_tdata,
15 sparc64_elf_local_got_tls_type): New defines.
16 (sparc64_elf_mkobject): New function.
17 (sparc64_elf_link_hash_table): Add members for dynamic linker
18 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
19 uion to track TLS GOT references. Add sym_sec to cache
20 mappings from local sym to section.
21 (link_hash_newfunc): New function.
22 (sparc64_elf_bfd_link_hash_table_create): Rename to
23 sparc64_elf_link_hash_table_create for consistency.
24 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
25 (sparc64_elf_create_dynamic_sections): Initialize new section
26 members of sparc64_elf_link_hash_table. Only init srelbss
27 if not-shared.
28 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
29 New functions.
30 (SPARC_NOP): Define.
31 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
32 sparc64_elf_plt_ptr_offset): Delete.
33 (sparc64_plt_entry_build): New function to build PLT entries
34 gradually instread of all at once at the end of linking.
35 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
36 local vars. Get them from sparc64_elf_hash_table instead.
37 Check early on if r_symndx is in bounds. Handle TLS transitions.
38 Account for TLS GOT references and DF_STATIC_TLS, as needed.
39 For TLS relocs, record the tls_type in either
40 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
41 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
42 to the __tls_get_addr symbol. For PLT relocs, track references
43 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
44 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
45 symbol references, count the number of relocations needed for
46 that symbol. For default switch case, don't error, this lets
47 the TLS relocs not explicitly handled by this function get
48 accepted.
49 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
50 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
51 it from sparc64_elf_hash_table. Store the real PLT offset
52 in h->plt.offset, and build PLT entries one at a time. Also
53 get .dynbss section pointer from htab.
54 (allocate_dynrelocs, readonly_dynrelocs,
55 sparc64_omit_section_dynsym): New functions.
56 (sparc64_elf_omit_section_dynsym): Use these new functions as
57 helpers.
58 (dtpoff_base, tpoff): New functions.
59 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
60 locals, get them from sparc64_elf_hash_table. Handle TLS
61 relocations and refcounting in main relocation loop.
62 (sparc64_elf_finish_dynamic_symbol): Use
63 sparc64_elf_link_hash_table. Build PLT entries as we see
64 them. Handle TLS GOT relocations.
65 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
66 from sparc64_elf_hash_table. Initialize only PLT header
67 not all entries since we not build PLT entries one by one.
68 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
69 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
70 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
71
72 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
73
74 * elflink.c (elf_link_input_bfd): Update check for removed
75 sections.
76
77 2005-04-12 Alan Modra <amodra@bigpond.net.au>
78
79 * Makefile.am: Run "make dep-am".
80 * Makefile.in: Regenerate.
81 * aclocal.m4: Regenerate.
82 * libcoff.h: Regenerate.
83
84 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
85
86 * linker.c (_bfd_generic_link_output_symbols): Also check if
87 the output section of an input section has been removed from
88 the output file.
89
90 * section.c (bfd_section_list_remove): Clear the next field
91 of the removed section.
92 (bfd_section_removed_from_list): New.
93 * bfd-in2.h: Regenerated.
94
95 2005-04-11 David S. Miller <davem@davemloft.net>
96
97 * elf32-sparc.c (elf32_sparc_relocate_section,
98 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
99 R_SPARC_TLS_LE_{HIX22,LOX10}.
100 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
101 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
102 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
103 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
104
105 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
106
107 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
108
109 2005-04-11 Nick Clifton <nickc@redhat.com>
110
111 * aout-target.h: Convert to ISO C.
112 * aoutf1.h: Convert to ISO C.
113 * aoutx.h: Convert to ISO C.
114 * bout.c: Convert to ISO C.
115 * dwarf1.c: Convert to ISO C.
116 * ecoffswap.h: Convert to ISO C.
117 * freebsd.h: Convert to ISO C.
118 * genlink.h: Convert to ISO C.
119 * ieee.c: Convert to ISO C.
120 * ihex.c: Convert to ISO C.
121 * libcoff-in.h: Convert to ISO C.
122 * mach-o.c: Convert to ISO C.
123 * mach-o.h: Convert to ISO C.
124 * netbsd.h: Convert to ISO C.
125 * ns32k.h: Convert to ISO C.
126 * ns32knetbsd.c: Convert to ISO C.
127 * oasys.c: Convert to ISO C.
128 * pdp11.c: Convert to ISO C.
129 * pef-traceback.h: Convert to ISO C.
130 * pef.c: Convert to ISO C.
131 * pef.h: Convert to ISO C.
132 * riscix.c: Convert to ISO C.
133 * som.c: Convert to ISO C.
134 * som.h: Convert to ISO C.
135 * srec.c: Convert to ISO C.
136 * stabs.c: Convert to ISO C.
137 * sunos.c: Convert to ISO C.
138 * tekhex.c: Convert to ISO C.
139 * versados.c: Convert to ISO C.
140 * version.h: Convert to ISO C.
141 * xcoff-target.h: Convert to ISO C.
142 * xcofflink.c: Convert to ISO C.
143 * xsym.c: Convert to ISO C.
144 * xsym.h: Convert to ISO C.
145
146 2005-04-08 Paul Brook <paul@codesourcery.com>
147
148 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
149 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
150 (ARM2THUMB_PIC_GLUE_SIZE): Define.
151 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
152 (elf32_arm_to_thumb_stub): Create PIC stubs.
153 (record_arm_to_thumb_glue): Use different stub size for relocatable
154 images.
155
156 2005-04-05 Alan Modra <amodra@bigpond.net.au>
157
158 * elf64-ppc.c (dec_dynrel_count): New function split out from
159 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
160 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
161 (ppc64_elf_tls_optimize): Likewise.
162
163 2005-04-05 Mark Kettenis <kettenis@gnu.org>
164
165 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
166 CORE_WCOOKIE_OFFSET.
167 (SPARC64_WCOOKIE_OFFSET): New.
168 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
169
170 2005-04-05 Nick Clifton <nickc@redhat.com>
171
172 * po/rw.po: New translation: Kinyarwanda
173 * configure.in (ALL_LINGUAS): Add rw
174 * configure: Regenerate.
175
176 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
177
178 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
179 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
180 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
181 section flags.
182 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
183 to check for SHT_MIPS_OPTIONS sections.
184 (_bfd_mips_elf_set_section_contents): Likewise.
185
186 2005-04-04 Eric Christopher <echristo@redhat.com>
187
188 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
189 Clean up gp handling code.
190
191 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
192
193 * elf.c (bfd_elf_set_group_contents): Ignore linker created
194 group section.
195 (assign_section_numbers): Accept link_info. Check SHT_GROUP
196 sections for relocatable files only. Remove the linker created
197 group sections.
198 (_bfd_elf_compute_section_file_positions): Pass link_info to
199 assign_section_numbers.
200
201 * elfxx-ia64.c (elfNN_ia64_object_p): New.
202 (elf_backend_object_p): Defined.
203
204 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
205
206 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
207
208 2005-04-03 Fred Fish <fnf@specifixinc.com>
209
210 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
211 dwarf_ranges_size members.
212 (struct comp_unit): Add base_address member.
213 (struct funcinfo): Replace low/high members with an arange.
214 (arange_add): Replace incoming "unit" parameter with "abfd" and
215 "first_arange" pointers. Reorganize/rewrite function body.
216 (decode_line_info): Change arange_add call to pass bfd and arange
217 pointers.
218 (lookup_address_in_line_info_table): Use arange list instead of
219 individual low/high members. Walk function's arange list to find
220 lowest PC in list, to test for overlapping functions.
221 (read_debug_ranges): New function, reads the debug_ranges section.
222 (lookup_address_in_function_table): Use arange list instead of
223 individual low/high members. Rewrite to find smallest range that
224 matches.
225 (read_rangelist): Read a given rangelist from debug_ranges.
226 (scan_unit_for_functions): Use arange list instead of individual
227 low/high members. Handle a DW_AT_ranges attribute.
228 (parse_comp_unit): Use arange list instead of individual low/high
229 members. Save comp unit base address. Handle a DW_AT_ranges
230 attribute.
231
232 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
233
234 * elf.c (assign_section_numbers): Really use the kept section.
235
236 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
237
238 * elf-bfd.h (_bfd_elf_check_kept_section): New.
239
240 * elf.c (assign_section_numbers): When sh_link points to a
241 discarded section, call _bfd_elf_check_kept_section to see if
242 the kept section can be used. Otherwise reject sh_link
243 pointing to discarded section.
244
245 * elflink.c (_bfd_elf_check_kept_section): New.
246 (elf_link_input_bfd): Use it.
247
248 2005-04-01 Alan Modra <amodra@bigpond.net.au>
249
250 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
251 that we no longer need.
252
253 2005-04-01 Alan Modra <amodra@bigpond.net.au>
254
255 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
256 rather than 0.
257 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
258
259 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
260
261 * elf.c (assign_section_numbers): Fix a typo.
262
263 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
264
265 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
266 error message.
267 (_bfd_elf_section_already_linked): Likewise.
268
269 2005-03-31 Jerome Guitton <guitton@gnat.com>
270
271 * config.in: Regenerate.
272
273 2005-03-31 Jerome Guitton <guitton@gnat.com>
274
275 * config.in (HAVE_DECL_BASENAME): New configure macro.
276 * configure.in: Check for basename.
277 * configure: Regenerate.
278
279 2005-03-30 Julian Brown <julian@codesourcery.com>
280
281 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
282 bfd_elf32_is_arm_mapping_symbol_name.
283 * bfd-in2.h: Regenerate.
284 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
285 bfd_elf32_is_arm_mapping_symbol_name.
286 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
287 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
288 (arm_elf_find_function): Likewise.
289 (elf32_arm_output_symbol_hook): Likewise.
290
291 2005-03-30 Julian Brown <julian@codesourcery.com>
292
293 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
294 * bfd-in2.h: Regenerate.
295 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
296 bfd_elf32_is_arm_mapping_symbol_name.
297 (elf32_arm_output_symbol_hook): Likewise.
298 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
299 mapping symbols.
300 (is_arm_mapping_symbol_name): Function moved from here...
301 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
302 and made global.
303
304 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
305
306 * configure.in: Check for ffs decl and alphabetize.
307 * config.in: Regenerate.
308 * configure: Regenerate.
309 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and
310 alphabetize.
311
312 2005-03-29 Fred Fish <fnf@specifixinc.com>
313
314 * dwarf2.c (struct comp_unit): Fix typo.
315 (scan_unit_for_functions): Remove unused local variable "name"
316 and dead code that set it.
317
318 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
319 Phil Blundell <philb@gnu.org>
320
321 * bfd-in2.h, libbfd.h: Regenerated.
322 * reloc.c: Add ARM TLS relocations.
323 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
324 relocations.
325 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
326 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
327 (elf32_arm_tls_ie32_howto): New.
328 (elf32_arm_howto_from_type): Support TLS relocations.
329 (elf32_arm_reloc_map): Likewise.
330 (elf32_arm_reloc_type_lookup): Likewise.
331 (TCB_SIZE): Define.
332 (struct elf32_arm_obj_tdata): New.
333 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
334 (elf32_arm_mkobject): New function.
335 (struct elf32_arm_relocs_copied): Add pc_count.
336 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
337 (GOT_TLS_IE): Define.
338 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
339 (elf32_arm_link_hash_newfunc): Initialize tls_type.
340 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
341 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
342 (dtpoff_base, tpoff): New functions.
343 (elf32_arm_final_link_relocate): Handle TLS relocations.
344 (IS_ARM_TLS_RELOC): Define.
345 (elf32_arm_relocate_section): Warn about TLS mismatches.
346 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
347 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
348 TLS relocations and pc_count.
349 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
350 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
351 calls.
352 (elf32_arm_size_dynamic_sections): Handle TLS.
353 (elf32_arm_finish_dynamic_symbol): Likewise.
354 (bfd_elf32_mkobject): Define.
355
356 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
357
358 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
359 relocation types. Don't count relocations which will use a PLT.
360
361 2005-03-29 Joel Brobecker <brobecker@gnat.com>
362
363 * elf.c (elfcore_grok_nto_status): Print tid as long.
364 (elfcore_grok_nto_regs): Likewise.
365
366 2005-03-29 Joel Brobecker <brobecker@gnat.com>
367
368 * irix-core.c: Remove some unnecessary prototypes.
369
370 2005-03-28 Joel Brobecker <brobecker@adacore.com>
371
372 * irix-core.c: Convert to ISO C.
373
374 2005-03-28 Joel Brobecker <brobecker@adacore.com>
375
376 * irix-core.c (do_sections): Replace + by | in expression.
377 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
378 to unused parameters to avoid a compiler warning.
379
380 2005-03-28 Mark Kettenis <kettenis@gnu.org>
381
382 * netbsd-core.c: Convert to ISO C. Fix formatting.
383
384 2005-03-24 Eric Christopher <echristo@redhat.com>
385
386 * elfxx-mips.c: Revert previous patch.
387
388 2005-03-24 Nick Clifton <nickc@redhat.com>
389
390 * targets.c (_bfd_target_vector): Only include the
391 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
392 all targets enabled.
393
394 2005-03-24 James E Wilson <wilson@specifixinc.com>
395
396 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
397 (BFD64_BACKENDS): Add elf32-ia64.lo.
398 * Makefile.in: Regenerate.
399
400 2005-03-23 Eric Christopher <echristo@redhat.com>
401
402 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
403 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
404 after emitting relocation.
405 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
406 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
407 and readonly_reloc.
408
409 2005-03-23 Mike Frysinger <vapier@gentoo.org>
410 Nick Clifton <nickc@redhat.com>
411
412 * config.bfd: Accept any C library to accompany a GNU Linux
413 implementation, not just the GNU C library.
414 * configure.in: Likewise.
415 * configure: Regenerate.
416
417 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
418
419 * bfd-in.h (_bfd_elf_provide_symbol): New.
420 * bfd-in2.h: Regenerated.
421
422 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
423 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
424 of set_linker_sym.
425
426 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
427 from elf32-ppc.c.
428
429 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
430
431 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
432
433 2005-03-22 Bob Wilson <bob.wilson@acm.org>
434
435 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
436 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
437 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
438 (xtensa_opcode_decode): Rearrange code.
439
440 2005-03-22 Nick Clifton <nickc@redhat.com>
441
442 * binary.c: Convert to ISO C90 formatting.
443 * coff-arm.c: Convert to ISO C90 formatting.
444 * coffgen.c: Convert to ISO C90 formatting.
445 * elf32-gen.c: Convert to ISO C90 formatting.
446 * elf64-gen.c: Convert to ISO C90 formatting.
447 * hash.c: Convert to ISO C90 formatting.
448 * ieee.c: Convert to ISO C90 formatting.
449
450 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
451
452 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
453 unresolved symbols in R_ARM_NONE relocations.
454
455 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
456
457 * elf32-arm.c (elf32_arm_final_link_relocate): Add
458 UNRESOLVED_RELOC_P argument. Set it appropriately.
459 (elf32_arm_relocate_section): Update call to
460 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
461 unresolved_reloc instead.
462
463 2005-03-23 Alan Modra <amodra@bigpond.net.au>
464
465 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
466 .gnu.warning.* sections.
467
468 2005-03-22 Alan Modra <amodra@bigpond.net.au>
469
470 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
471 written_address_p.
472 (ppc_elf_create_linker_section): Don't try to reuse existing section.
473 (elf_create_pointer_linker_section): Delete info parm. Don't make
474 h dynamic. Don't set written_address_p.
475 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
476 (bfd_put_ptr): Delete.
477 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
478 Always write section contents. Assert global sym is def_regular.
479 Use offset bottom bit as a written flag.
480 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
481 calls.
482
483 2005-03-22 Alan Modra <amodra@bigpond.net.au>
484
485 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
486 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
487 and end syms.
488
489 2005-03-21 Nick Clifton <nickc@redhat.com>
490
491 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
492 targets.
493 (t2a1_bx_pc_insn): Likewise.
494 (t2a2_noop_insn): Likewise.
495 (t2a3_b_insn): Likewise.
496 (t2a1_push_insn): Likewise.
497 (t2a2_ldr_insn): Likewise.
498 (t2a3_mov_insn): Likewise.
499 (t2a4_bx_insn): Likewise.
500 (t2a5_pop_insn): Likewise.
501 (t2a6_bx_insn): Likewise.
502 (coff_arm_relocate_section): Only declare the high_address
503 variable for non WINCE targets.
504
505 2005-03-22 Alan Modra <amodra@bigpond.net.au>
506
507 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
508 SEC_LINKER_CREATED. Attach to dynobj.
509 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
510
511 2005-03-21 Alan Modra <amodra@bigpond.net.au>
512
513 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
514 sym_offset. Add name, bss_name, sym_name, sym_val.
515 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
516 Add sdata array of elf_linker_section_t.
517 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
518 (enum elf_linker_section_enum): Delete.
519 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
520 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
521 the special sections are needed. Adjust htab->sdata refs.
522 Ensure dynobj is set in sreloc code.
523 (ppc_elf_size_dynamic_sections): Strip sdata sections.
524 (ppc_elf_set_sdata_syms): New function.
525 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
526 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
527 sym_val instead of sym_hash.
528 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
529
530 2005-03-21 Alan Modra <amodra@bigpond.net.au>
531
532 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
533 (ppc_elf_merge_private_bfd_data): Likewise.
534
535 2005-03-21 Alan Modra <amodra@bigpond.net.au>
536
537 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
538 (ppc_elf_create_linker_section): Don't create rel_section.
539 (elf_create_pointer_linker_section): Don't size relocs.
540 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
541 Don't generate relocs.
542 (ppc_elf_relocate_section): Adjust calls to
543 elf_finish_pointer_linker_section.
544
545 2005-03-21 Alan Modra <amodra@bigpond.net.au>
546
547 * elf32-ppc.c (is_ppc_elf_target): New function.
548 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
549 for bfd_target_elf_flavour. Do this test before endian check.
550 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
551 (ppc_elf_size_dynamic_sections): Likewise.
552
553 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
554
555 * elf-bfd.h (elf_backend_data): Add int to
556 elf_backend_section_from_shdr.
557 (bfd_elf_section_data): Update comment for this_idx.
558 (_bfd_elf_make_section_from_shdr): Add int.
559 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
560
561 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
562 and use it to set this_idx in bfd_elf_section_data.
563 (bfd_section_from_shdr): Pass shindex to
564 _bfd_elf_make_section_from_shdr.
565 (_bfd_elf_section_from_bfd_section): Use this_idx in
566 bfd_elf_section_data to find section index.
567
568 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
569 index and pass it to _bfd_elf_make_section_from_shdr.
570 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
571 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
572 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
573 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
574 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
575 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
576 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
577 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
578 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
579
580 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
581 Ross Ridge <rridge@csclub.uwaterloo.ca>
582
583 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
584 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
585 cases. Add comment.
586
587 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
588
589 * elflink.c (elf_mark_used_section): Remove check for special
590 sections.
591
592 2005-03-18 Andreas Schwab <schwab@suse.de>
593
594 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
595 from bfd_vma to ia64_insn, remove broken cast.
596
597 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
598
599 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
600 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
601 elf_m68k_finish_dynamic_sections): Use it.
602
603 2005-03-17 Paul Brook <paul@codesourcery.com>
604 Dan Jacobowitz <dan@codesourcery.com>
605 Mark Mitchell <mark@codesourcery.com>
606
607 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
608 (elf32_arm_additional_program_headers): Likewise.
609 (elf_backend_modify_segment_map): Define.
610 (elf_backend_additional_program_headers): Likewise.
611 (elf32_arm_symbian_modify_segment_map): Use
612 elf32_arm_modify_segment_map.
613
614 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
615
616 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
617 for special sections.
618
619 2005-03-18 Alan Modra <amodra@bigpond.net.au>
620
621 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
622 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
623 section_sym_count param, and return number of section symbols.
624 (bfd_elf_size_dynamic_sections): Clear section symbol area of
625 .dynsym contents. Don't bother calling swap_symbol_out on the
626 first all-zero dynsym.
627 (elf_mark_used_section): Formatting. Avoid twiddling flags in
628 special sections like bfd_abs_section.
629 (bfd_elf_gc_sections): Spelling fix.
630
631 2005-03-16 Fred Fish <fnf@specifixinc.com>
632
633 PR binutils/790
634 * dwarf2.c (read_indirect_string): Fix apparent typo, check
635 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
636
637 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
638
639 * elflink.c (elf_mark_used_section): New.
640 (bfd_elf_gc_sections): Call elf_gc_mark_section for
641 non-relocatable link if we don't do GC.
642
643 2005-03-16 Nick Clifton <nickc@redhat.com>
644 Ben Elliston <bje@au.ibm.com>
645
646 * configure.in (werror): New switch: Add -Werror to the
647 compiler command line. Enabled by default. Disable via
648 --disable-werror.
649 * configure: Regenerate.
650
651 2005-03-16 Nick Clifton <nickc@redhat.com>
652
653 * ecoff.c: Convert to ISO C90 formatting.
654
655 2005-03-16 Alan Modra <amodra@bigpond.net.au>
656
657 * elf32-ppc.c: Divide file into general and linker specific
658 functions. Sort linker functions into roughly the order in which
659 they are called by the ELF linker code.
660
661 2005-03-16 Alan Modra <amodra@bigpond.net.au>
662
663 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
664 on section. Correct comment, and add FIXME.
665 (ppc_elf_additional_program_headers): Don't bump header count for
666 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
667 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
668 do allocate memory if they need it.
669
670 2005-03-15 Mikkel Krautz <krautz@gmail.com>
671
672 * config.bfd (x86_64-elf): Add target.
673
674 2005-03-15 Alan Modra <amodra@bigpond.net.au>
675
676 * po/es.po: Commit new Spanish translation.
677
678 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
679
680 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
681 for global symbol when reporting overflow.
682
683 2005-03-11 Jakub Jelinek <jakub@redhat.com>
684
685 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
686 * libbfd.h: Rebuilt.
687 * archive.c (_bfd_ar_spacepad): New function.
688 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
689 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
690 coff_write_armap): Use it.
691 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
692 uid/gid support.
693 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
694
695 2005-03-10 Mark Kettenis <kettenis@gnu.org>
696
697 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
698 has_table to the start of the function.
699
700 2005-03-10 Ben Elliston <bje@au.ibm.com>
701
702 * archive.c: Include hashtab.h.
703 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
704 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
705 (hash_file_ptr): New function.
706 (eq_file_ptr): Likewise.
707 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
708 * libbfd-in.h: Include hashtab.h.
709 (struct artdata): Change `cache' member type to htab_t.
710 * libbfd.h: Rebuild.
711
712 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
713
714 * configure.in: Bump version to 2.16.90.
715 * configure: Regenerated.
716
717 2005-03-07 Jakub Jelinek <jakub@redhat.com>
718
719 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
720 close is a function like macro in system headers.
721
722 2005-03-07 Alan Modra <amodra@bigpond.net.au>
723
724 PR ld/778
725 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
726 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
727
728 2005-03-06 Alan Modra <amodra@bigpond.net.au>
729
730 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
731
732 2005-03-05 Alan Modra <amodra@bigpond.net.au>
733
734 * po/bfd.pot: Regenerate.
735
736 2005-03-05 Alan Modra <amodra@bigpond.net.au>
737
738 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
739 with is_func.
740 (func_desc_adjust): Force dot-syms local in executables as well
741 as shared libs.
742
743 2005-03-04 David Daney <ddaney@avtrex.com>
744
745 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
746 '__gnu_local_gp' symbol used by gas -mno-shared.
747
748 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
749
750 * elf-bfd.h (elf_backend_data): Add "const char *" to
751 elf_backend_section_from_phdr.
752
753 * elf.c (bfd_section_from_phdr): Pass "proc" to the
754 elf_backend_section_from_phdr hook.
755
756 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
757 Joseph Myers <joseph@codesourcery.com>
758
759 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
760 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
761 and tls_ldm_offset.
762 (struct mips_elf_got_per_bfd_arg): Add global_count.
763 (struct mips_elf_count_tls_arg): New.
764 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
765 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
766 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
767 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
768 (TLS_RELOC_P): Define.
769 (TP_OFFSET, DTP_OFFSET): Define.
770 (dtprel_base, tprel_base): New functions.
771 (mips_elf_link_hash_newfunc): Initialize tls_type.
772 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
773 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
774 TLS entries.
775 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
776 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
777 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
778 (mips_tls_got_index): New functions.
779 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
780 arguments. Pass them to mips_elf_create_local_got_entry. Use
781 mips_tls_got_index.
782 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
783 Handle TLS entries.
784 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
785 mips_elf_create_local_got_entry.
786 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
787 arguments. Handle TLS entries.
788 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
789 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
790 TLS entries.
791 (mips_elf_record_global_got_symbol): Likewise.
792 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
793 Count TLS entries.
794 (mips_elf_merge_gots): Handle TLS entries when merging.
795 (mips_elf_initialize_tls_index): New function.
796 (mips_elf_set_global_got_offset): Handle TLS entries.
797 (mips_elf_adjust_gp): Handle TLS.
798 (mips_elf_multi_got): Remove redundant call to
799 mips_elf_resolve_final_got_entries. Initialize global_count.
800 Correct a comment. Initialize new TLS members of mips_got_info.
801 Assign TLS GOT indexes for new GOTs.
802 (mips_elf_create_got_section): Initialize new TLS members of
803 mips_got_info.
804 (mips_elf_calculate_relocation): Handle TLS relocs.
805 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
806 functions.
807 (_bfd_mips_elf_always_size_sections): Handle TLS.
808 (_bfd_mips_elf_size_dynamic_sections): Likewise.
809 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
810 changed functions.
811 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
812 (_bfd_mips_elf_hide_symbol): Handle TLS.
813 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
814 (mips_reloc_map): Add TLS relocs.
815 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
816 * elf64-mips.c (mips_elf64_howto_table_rel)
817 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
818 * reloc.c: Define new MIPS TLS relocations.
819 * libbfd.h, bfd-in2.h: Regenerated.
820
821 2005-03-02 Jan Beulich <jbeulich@novell.com>
822
823 * Makefile.am: Add dependency of cache.o on libiberty.h.
824 * cache.c: Include libiberty.h.
825 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
826
827 2005-03-01 Zack Weinberg <zack@codesourcery.com>
828
829 * elf.c (bfd_section_from_shdr <default case>): Call
830 elf_backend_section_from_shdr hook unconditionally, and return
831 what it returns.
832 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
833 * elfxx-target.h (elf_backend_section_from_shdr)
834 (elf_backend_section_from_phdr): Default to
835 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
836 respectively.
837
838 2005-03-01 Alan Modra <amodra@bigpond.net.au>
839
840 * targets.h: Typo fix.
841 * bfd-in2.h: Regenerate.
842
843 * bout.c (b_out_write_object_contents): Don't use sizeof on host
844 structs to size on-disk structures.
845 (b_out_set_section_contents): Size the external struct, not the
846 internal one for on-disk size.
847 (b_out_sizeof_headers): Likewise.
848
849 2005-03-01 Alan Modra <amodra@bigpond.net.au>
850
851 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
852 entry points with the func descriptor as well as undefweak.
853
854 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
855
856 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
857 present when IMPORT_NAME_UNDOECRATE is used.
858
859 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
860
861 PR 757
862 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
863 int.
864
865 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
866 to _bfd_elf_merge_symbol.
867
868 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
869 unsigned int to return the alignment of the old common symbol
870 in the dynamic object.
871 (_bfd_elf_add_default_symbol): Pass NULL to
872 _bfd_elf_merge_symbol.
873 (elf_link_add_object_symbols): Pass &old_alignment to
874 _bfd_elf_merge_symbol. Get the alignment of the new common
875 symbol in the dynamic object.
876
877 2005-02-24 Ben Elliston <bje@au.ibm.com>
878
879 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
880 * format.c (bfd_check_format_matches): Likewise.
881 * archive.c (BFD_GNU960_ARMAG): Likewise.
882 (bfd_generic_archive_p): Likewise.
883 (_bfd_write_archive_contents): Likewise.
884
885 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
886
887 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
888 * configure: Regenerate.
889
890 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
891
892 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
893 COMDAT group sections to have default visibility.
894
895 2005-02-24 Alan Modra <amodra@bigpond.net.au>
896
897 * coffcode.h (coff_print_aux): Warning fix.
898 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
899 instead of section pointer to identify.
900 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
901 the correct size buffer for local sym mangling too.
902 (h8300_bfd_link_add_symbols): Likewise.
903 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
904 warning.
905 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
906 * elf32-xtensa.c (literal_value_hash): Warning fix.
907 * versados.c (process_otr): Warning fix.
908 (versados_canonicalize_reloc): Likewise.
909 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
910 * vms.c (fill_section_ptr): Warning fix.
911
912 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
913
914 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
915 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
916
917 2005-02-23 Nick Clifton <nickc@redhat.com>
918
919 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
920 the relvaddr field of the Elf32_crinfo structure.
921
922 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
923 variables that are passed by reference to
924 m68hc11_get_relocation_value in case that function does not
925 initialise them.
926
927 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
928 return statements and replace with a single return at the end of
929 the function. This helps pacify the flow analysis code in gcc 4.0.
930
931 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
932 strtab to avoid compile time warning.
933
934 2005-02-23 Ben Elliston <bje@au.ibm.com>
935
936 * opncls.c (bfd_zalloc): Document this function.
937
938 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
939
940 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
941 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
942 Replace SEC_SHARED with SEC_COFF_SHARED.
943 (styp_to_sec_flags): Likewise.
944
945 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
946 (TARGET_LITTLE_SYM): Likewise.
947
948 * section.c (SEC_ARCH_BIT_0): Removed.
949 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
950 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
951 (SEC_SHARED): Renamed to ...
952 (SEC_COFF_SHARED): This.
953 (SEC_BLOCK): Renamed to ...
954 (SEC_TIC54X_BLOCK): This.
955 (SEC_CLINK): Renamed to ...
956 (SEC_TIC54X_CLINK): This.
957 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
958 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
959 end.
960 * bfd-in2.h: Regenerated.
961
962 2005-02-21 Fred Fish <fnf@specifixinc.com>
963
964 * dwarf2.c (find_abstract_instance_name): Call recursively
965 to handle a DW_AT_specification.
966
967 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
968
969 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
970 mips_elf_create_dynamic_relocation,
971 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
972 Remove #if 0'd code.
973
974 2005-02-21 Alan Modra <amodra@bigpond.net.au>
975
976 * Makefile.am: Run "make dep-am"
977 * Makefile.in: Regenerate.
978
979 2005-02-21 Alan Modra <amodra@bigpond.net.au>
980
981 * coffgen.c (bfd_coff_get_comdat_section): Check that
982 coff_section_data isn't NULL.
983
984 2005-02-21 Alan Modra <amodra@bigpond.net.au>
985
986 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
987 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
988 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
989 useless assignments.
990 (xcoff_write_archive_contents_big): Likewise.
991 (_bfd_xcoff_put_ldsymbol_name): Likewise.
992 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
993 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
994 * cofflink.c (process_embedded_commands): Warning fixes.
995 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
996 Warning fixes.
997 * dwarf2.c: Warning fixes.
998 * elf-bfd.h: Likewise.
999 * elf-eh-frame.c: Likewise.
1000 * elf-strtab.c: Likewise.
1001 * elf.c: Likewise.
1002 * elf32-m68k.c: Likewise.
1003 * elf32-ppc.c: Likewise.
1004 * elf32-sh-symbian.c: Likewise.
1005 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
1006 * elf64-sh64.c: Likewise.
1007 * peicode.h: Likewise.
1008 * elf64-mmix.c: Warning fixes.
1009 * elfcode.h: Likewise.
1010 * elfxx-mips.c: Likewise.
1011 * libbfd-in.h: Likewise.
1012 * libbfd.c: Likewise.
1013 * mach-o.c: Likewise.
1014 * merge.c: Likewise.
1015 * mmo.c: Likewise.
1016 * opncls.c: Likewise.
1017 * pef.c: Likewise.
1018 * srec.c: Likewise.
1019 * vms-hdr.c: Likewise.
1020 * vms-tir.c: Likewise.
1021 * xtensa-isa.c: Likewise.
1022 * xtensa-modules.c: Likewise.
1023 * xsym.c: Likewise.
1024 (pstrcmp): Use correct choice of string lengths. Fix return value.
1025 (bfd_sym_module_name): Correct string length.
1026 * bfd-in2.h: Regenerate.
1027 * libbfd.h: Regenerate.
1028
1029 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1030
1031 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
1032 uninitialized check_segment[1] in TLSMOFF case.
1033 Reported by Alan Modra.
1034 (elf32_frv_relocate_section): Improve errors and warnings.
1035
1036 2005-02-17 Alan Modra <amodra@bigpond.net.au>
1037
1038 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
1039
1040 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1041
1042 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
1043 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
1044 * pef.c (bfd_pef_scan): Don't ignore return value of
1045 bfd_pef_scan_start_address.
1046 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
1047 bfd_mach_o_scan_start_address.
1048 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
1049 * elfxx-mips.c: Remove unnecessary prototypes.
1050 (sort_dynamic_relocs_64): Abort if not BFD64.
1051
1052 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1053
1054 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
1055 Skip toc reloc adjust if reloc_count is zero.
1056
1057 2005-02-15 Nigel Stephens <nigel@mips.com>
1058 Maciej W. Rozycki <macro@mips.com>
1059
1060 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1061 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1062 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1063 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1064 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1065 dst_mask.
1066 (mips16_gprel_reloc): Remove bit shuffling; call
1067 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1068 and _bfd_mips16_elf_reloc_shuffle() instead.
1069 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1070 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1071 relocs.
1072 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
1073 elf_mips16_howto_table_rel.
1074 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
1075 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
1076 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1077 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
1078 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1079 dst_mask.
1080 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
1081 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
1082 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
1083 placeholders.
1084 (mips16_gprel_reloc): Remove bit shuffling; call
1085 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1086 and _bfd_mips16_elf_reloc_shuffle() instead.
1087 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1088 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1089 relocs.
1090 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
1091 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
1092 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1093 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1094 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1095 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1096 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1097 dst_mask.
1098 (mips16_gprel_reloc): Remove bit shuffling; call
1099 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1100 and _bfd_mips16_elf_reloc_shuffle() instead.
1101 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1102 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1103 relocs.
1104 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
1105 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
1106 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
1107 handle bit shuffling for MIPS16 relocs.
1108 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1109 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
1110 and _bfd_mips16_elf_reloc_shuffle().
1111 (_bfd_mips_elf_generic_reloc): Likewise.
1112 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
1113 and R_MIPS16_LO16.
1114 (mips_elf_obtain_contents): Remove bit shuffling.
1115 (mips_elf_perform_relocation): Likewise; call
1116 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
1117 instead.
1118 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
1119 and R_MIPS16_LO16.
1120 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
1121 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1122 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
1123 (BFD_RELOC_MIPS16_HI16_S): Likewise.
1124 (BFD_RELOC_MIPS16_LO16): Likewise.
1125 * bfd-in2.h: Regenerate.
1126 * libbfd.h: Regenerate.
1127
1128 2005-02-15 Jan Beulich <jbeulich@novell.com>
1129
1130 * elfxx-ia64.c (ia64_howto_table): Correct strings for
1131 R_IA64_DTPMOD64[LM]SB.
1132
1133 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
1134
1135 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
1136 backward branch in the same section.
1137 (elfNN_ia64_relocate_section): Inform users that the input
1138 section is too big to relax br instruction when overflow
1139 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
1140 and R_IA64_PCREL21F.
1141
1142 2005-02-14 Orjan Friberg <orjanf@axis.com>
1143
1144 * elfcore.h (elf_core_file_p): Move the call to
1145 elf_backend_object_p to allow the correct machine to be set before
1146 processing the program headers.
1147
1148 2005-02-14 Nick Clifton <nickc@redhat.com>
1149
1150 PR binutils/716
1151 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
1152 aware flag from the input bfd to the output bfd.
1153
1154 2005-02-11 Maciej W. Rozycki <macro@mips.com>
1155
1156 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
1157 R_MIPS_LITERAL relocations for external symbols.
1158 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
1159 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
1160
1161 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 * bfd-in2.h: Rebuilt.
1164
1165 2005-02-11 Paul Brook <paul@codesourcery.com>
1166
1167 * elf-bfd.h (struct elf_link_hash_table): Add
1168 is_relocatable_executable.
1169 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
1170 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
1171 symbols in relocatable executables.
1172 (bfd_elf_record_link_assignment): Create dynamic section symbols in
1173 relocatable executables.
1174 (_bfd_elf_link_renumber_dynsyms): Ditto.
1175 (bfd_elf_final_link): Ditto.
1176 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
1177 relocations into relocatable executables.
1178 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
1179 executables. Also copy absolute relocations.
1180 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
1181 in relocatable executables.
1182 (allocate_dynrelocs): Copy relocations for relocatable executables.
1183 Output dynamic symbols for symbols defined in linker scripts.
1184
1185 2005-02-11 Nick Clifton <nickc@redhat.com>
1186
1187 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
1188 to avoid a compile time warning.
1189
1190 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
1191 BFD_ASSERT.
1192
1193 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
1194 inclusion of coffcode.h so that it is actually picked up.
1195
1196 * coffcode.h (coff_std_swap_table): Add an unused attribute in
1197 case it is not used.
1198
1199 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
1200 structure and macro.
1201
1202 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
1203 array.
1204
1205 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
1206 to protect the declaration of this array.
1207
1208 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
1209 Avoid call to memcpy with a size of 0.
1210
1211 2005-02-12 Alan Modra <amodra@bigpond.net.au>
1212
1213 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
1214 old-style branches to undefined dot-symbols which will be
1215 satisfied by a plt call.
1216
1217 2005-02-11 Alan Modra <amodra@bigpond.net.au>
1218
1219 * elf64-ppc.c (move_plt_plist): New function, extracted from..
1220 (ppc64_elf_copy_indirect_symbol): ..here.
1221 (func_desc_adjust): Use move_plt_plist.
1222
1223 2005-02-10 Paul Brook <paul@codesourcery.com>
1224
1225 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
1226
1227 2005-02-10 Paul Brook <paul@codesourcery.com>
1228
1229 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
1230 symbols local.
1231 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
1232 (elf_link_renumber_local_hash_table_dynsyms): New function.
1233 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
1234
1235 2005-02-10 Jakub Jelinek <jakub@redhat.com>
1236
1237 * bfd-in.h (BFD_LINKER_CREATED): Define.
1238 * bfd-in2.h: Rebuilt.
1239 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
1240 BFD_LINKER_CREATED bfds when determining input bfds without
1241 .note.GNU-stack section.
1242
1243 2005-02-10 Maciej W. Rozycki <macro@mips.com>
1244
1245 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
1246 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
1247 relocations against external symbols unchanged.
1248
1249 2005-02-08 Paul Brook <paul@codesourcery.com>
1250
1251 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
1252 sections.
1253
1254 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
1255
1256 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
1257 prefix here.
1258
1259 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1260
1261 * elf64-mips.c: Fix formatting throughout.
1262
1263 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1264
1265 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
1266
1267 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
1268
1269 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
1270 *ABS*/*UND* sections.
1271 (elf32_frv_relocate_section): Move zero-addend-required error...
1272 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
1273 missing needed TLS section.
1274
1275 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
1276
1277 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
1278 being the last symbol.
1279 (aout_link_add_symbols): Just return TRUE if a warning
1280 symbol was last.
1281
1282 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1283
1284 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
1285 R_MIPS_GPREL32 relocations against external symbols.
1286 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
1287 comment.
1288
1289 2005-02-07 Alan Modra <amodra@bigpond.net.au>
1290
1291 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
1292 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
1293 elf_string_from_elf_strtab.
1294 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
1295 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
1296 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
1297 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
1298 looking at cached symtab info first, before iterating over headers.
1299 For SHT_REL and SHT_RELA, load dynsymtab if needed.
1300 * elfcode.h (elf_object_p): Don't load section header stringtab
1301 specially.
1302
1303 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
1306 against protected function when building shared library.
1307
1308 PR 584
1309 * elf64-x86-64.c (is_32bit_relative_branch): New.
1310 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
1311 protected function symbol when building shared library for
1312 32bit relative branch instruction.
1313
1314 2005-02-06 Alan Modra <amodra@bigpond.net.au>
1315
1316 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
1317 syms when doing a relocatable link.
1318 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
1319 at u.def.section.
1320 (ppc64_elf_tls_setup): Likewise.
1321 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
1322
1323 2005-02-04 Alan Modra <amodra@bigpond.net.au>
1324
1325 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
1326 (link_hash_newfunc): Clear all locals using memset.
1327 (make_fdh): Remove flags param. Always create fake func desc
1328 weak. Link the descriptor with the code entry sym.
1329 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
1330 (add_symbol_adjust): Adjust make_fdh call.
1331 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
1332 descriptor to strong undefined if code entry is strong.
1333
1334 2005-02-04 Alan Modra <amodra@bigpond.net.au>
1335
1336 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
1337 lookup here. Set to new before calling bfd_link_repair_undef_list.
1338 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
1339
1340 2005-02-03 Alan Modra <amodra@bigpond.net.au>
1341
1342 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
1343
1344 2005-02-03 Alan Modra <amodra@bigpond.net.au>
1345
1346 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
1347 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
1348 before the as-needed lib was loaded. Abort on unexpected refs.
1349
1350 2005-02-02 Alan Modra <amodra@bigpond.net.au>
1351
1352 * elflink.c (elf_smash_syms): Expand comments.
1353 (elf_link_add_object_symbols): Only call elf_smash_syms for
1354 as-needed dynamic objects.
1355
1356 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
1357 everything, just the field specific to ia64.
1358 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
1359
1360 2005-02-01 Alan Modra <amodra@bigpond.net.au>
1361
1362 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
1363 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
1364 undefined syms.
1365 (struct add_symbol_adjust_data): New.
1366 (add_symbol_adjust): Make an undefweak func desc for old ABI
1367 objects to link with --as-needed shared libs. Return fail status.
1368 Don't adjust old ABI func entry sym to weak if func desc syms
1369 isn't defined.
1370 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
1371 and return status.
1372
1373 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
1374
1375 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
1376 for clarity.
1377
1378 2005-02-01 Alan Modra <amodra@bigpond.net.au>
1379
1380 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
1381 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
1382 remove anything but new and undefweak.
1383 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
1384 existing _DYNAMIC.
1385 (_bfd_elf_create_dynamic_sections): Formatting.
1386 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
1387 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
1388 (struct elf_smash_data): New.
1389 (elf_smash_syms): New function.
1390 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
1391 unneeded dynamic objects to loaded list.
1392 (elf_link_output_extsym): Don't handle as-needed here. Strip
1393 bfd_link_hash_new symbols.
1394 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1395 delref when dynindx is already -1.
1396 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
1397 symbols.
1398 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
1399
1400 2005-02-01 Ben Elliston <bje@au.ibm.com>
1401
1402 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
1403
1404 2005-02-01 Ben Elliston <bje@au.ibm.com>
1405
1406 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
1407 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
1408 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
1409 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
1410 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
1411 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
1412 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
1413 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
1414 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
1415 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
1416 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
1417 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
1418 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
1419 throughout. Similarly, collapse #if 1'd code.
1420
1421 2005-02-01 Ben Elliston <bje@au.ibm.com>
1422
1423 * elf-bfd.h (bfd_elf_discard_group): Remove.
1424 * elf.c (bfd_elf_discard_group): Likewise.
1425 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
1426
1427 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
1428
1429 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
1430 (_bfd_elf_eh_frame_address_size): Declare.
1431 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
1432 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
1433 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
1434 (elf_backend_eh_frame_address_size): Define.
1435 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
1436 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
1437 size from the new backend hook.
1438 (_bfd_elf_write_section_eh_frame): Likewise.
1439 (_bfd_elf_eh_frame_address_size): New function.
1440
1441 2005-01-31 Andrew Cagney <cagney@gnu.org>
1442
1443 * configure: Regenerate to track ../gettext.m4.
1444
1445 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1446
1447 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
1448 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
1449
1450 2005-01-31 Nick Clifton <nickc@redhat.com>
1451
1452 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
1453 sparc-lynxos, vax-vms) be obsolete.
1454
1455 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
1456
1457 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
1458 * elf32-arm.c (ELF_MINPAGESIZE): Define.
1459 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
1460 * elfcode.h (elf_object_p): Use minpagesize instead of
1461 maxpagesize.
1462 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
1463 (elfNN_bed): Include ELF_MINPAGESIZE.
1464
1465 2005-01-28 Julian Brown <julian@codesourcery.com>
1466
1467 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1468 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1469 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
1470 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
1471 passing flag value from ld. Set flag value in global hash table entry.
1472 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
1473 relocation.
1474
1475 2005-01-27 Andrew Cagney <cagney@gnu.org>
1476
1477 * configure: Regenerate to track ../gettext.m4 change.
1478
1479 2005-01-25 Mark Mitchell <mark@codesourcery.com>
1480
1481 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
1482 SymbianOS.
1483
1484 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
1485
1486 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
1487 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
1488 for TLSMOFF.
1489 * reloc.c: Add R_FRV_TLSMOFF.
1490 * elf32-frv.c (elf32_frv_howto_table): Likewise.
1491 (frv_reloc_map, frv_reloc_type_lookup): Map it.
1492 (elf32_frv_relocate_section): Handle it.
1493 (elf32_frv_check_relocs): Likewise.
1494 * libbfd.h, bfd-in2.h: Rebuilt.
1495 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
1496 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
1497 when given an undefweak TLS symbol. Fix constant TLS PLT entries
1498 such that they return the constant in gr9.
1499 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
1500 symbols.
1501 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
1502 too, such that they shrink on relaxation.
1503 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
1504 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
1505 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
1506 if we can guarantee the use of 16-bit constants.
1507 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
1508 Introduce TLS support for FR-V FDPIC.
1509 * reloc.c: Add TLS relocations.
1510 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
1511 (elf32_frv_rel_tlsdesc_value_howto): New.
1512 (elf32_frv_rel_tlsoff_howto): New.
1513 (frv_reloc_map): Add new mappings.
1514 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
1515 reloc information.
1516 (frvfdpic_dynamic_got_plt_info): New.
1517 (frvfdpic_plt_tls_ret_offset): New.
1518 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
1519 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
1520 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
1521 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
1522 section as local.
1523 (struct frvfdpic_relocs_info): Add TLS fields.
1524 (frvfdpic_relocs_info_hash): Warning clean up.
1525 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
1526 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
1527 (FRVFDPIC_TLS_BIAS): Define.
1528 (tls_biased_base): New.
1529 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
1530 relocations.
1531 (frv_reloc_type_lookup): Likewise.
1532 (frvfdpic_info_to_howto_rel): Likewise.
1533 (elf32_frv_relocate_section): Likewise.
1534 (_frv_create_got_section): Create the PLT section here.
1535 (elf32_frvfdpic_create_dynamic_sections): Not here.
1536 (_frvfdpic_count_nontls_entries): Move out of...
1537 (_frvfdpic_count_got_plt_entries): ... here.
1538 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
1539 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
1540 support.
1541 (_frvfdpic_relax_tls_entries): New.
1542 (_frvfdpic_compute_got_alloc_data): Add TLS support.
1543 (_frvfdpic_get_tlsdesc_entry): New.
1544 (_frvfdpic_assign_got_entries): Add TLS support.
1545 (_frvfdpic_assign_plt_entries): Likewise.
1546 (_frvfdpic_reset_got_plt_entries): New.
1547 (_frvfdpic_size_got_plt): Move out of...
1548 (elf32_frvfdpic_size_dynamic_sections): ... here.
1549 (_frvfdpic_relax_got_plt_entries): New.
1550 (elf32_frvfdpic_relax_section): New.
1551 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
1552 (elf32_frv_check_relocs): Add TLS support.
1553 (bfd_elf32_bfd_relax_section): Define for FDPIC.
1554 * libbfd.h, bfd-in2.h: Rebuilt.
1555
1556 2005-01-25 Alan Modra <amodra@bigpond.net.au>
1557
1558 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
1559 loadable reloc sections.
1560 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
1561 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
1562
1563 2005-01-25 Alan Modra <amodra@bigpond.net.au>
1564
1565 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
1566 sections immediately when linking shared libs. Instead, wait until
1567 we know a lib is needed.
1568 (_bfd_elf_link_create_dynstrtab): Extract from..
1569 (_bfd_elf_link_create_dynamic_sections_): ..here.
1570 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
1571 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
1572 for non-existent .dynamic.
1573 (elf_link_output_extsym): Don't complain about undefined symbols
1574 in as-needed dynamic libs that aren't actually linked.
1575
1576 2005-01-24 Andrew Cagney <cagney@gnu.org>
1577
1578 * configure: Regenerate, ../gettext.m4 was updated.
1579
1580 2005-01-21 Ben Elliston <bje@au.ibm.com>
1581
1582 * aout-encap.c: Remove unused file.
1583
1584 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
1585
1586 PR 679
1587 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
1588 non-function symbols are local.
1589 (_bfd_elf_symbol_refs_local_p): Likewise.
1590
1591 2005-01-18 Alan Modra <amodra@bigpond.net.au>
1592
1593 * bfd.c (bfd_link_just_syms): Add abfd param.
1594 * bfd-in2.h: Regenerate.
1595
1596 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
1597
1598 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
1599 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
1600 instructions. If the amount of padding is known, reduce the size
1601 of the CIE or FDE by that amount.
1602
1603 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
1604
1605 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
1606 augmentation_size. Use bfd_signed_vmas for data_align.
1607 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
1608 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
1609 functions. Don't read past the end of the enclosing CIE or FDE.
1610 (skip_bytes): New utility function.
1611 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
1612 sanity checking.
1613 (_bfd_elf_write_section_eh_frame): Use new functions.
1614
1615 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
1616
1617 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
1618 assert-style REQUIRE() macro to handle sanity checks.
1619
1620 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
1621
1622 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
1623 (comp_unit): Here.
1624 (read_unsigned_leb128): Removed.
1625 (read_signed_leb128): Removed.
1626 (find_abstract_instance_name): Updated.
1627 (parse_comp_unit): Accept info_ptr_unit.
1628 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
1629 comp unit and pass it to parse_comp_unit.
1630
1631 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
1632 (read_signed_leb128): Moved to ...
1633 * libbfd.c: Here.
1634
1635 * libbfd-in.h (read_unsigned_leb128): New prototype.
1636 (read_signed_leb128): Likewise.
1637 * libbfd.h: Regenerated.
1638
1639 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
1640 Nick Clifton <nickc@redhat.com>
1641
1642 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
1643 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
1644 arch_sh4a_nofpu_up in order to match the external names and make the
1645 testsuite's job easier.
1646 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
1647 names.
1648 * bfd-in2.h: Regenerate.
1649
1650 2005-01-15 Andrew Cagney <cagney@gnu.org>
1651
1652 * bfd.m4: New file.
1653 * acinclude.m4: Move BFD_NEED_DECLARATION,
1654 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
1655 the new file bfd.m4. Include ../bfd/bfd.m4.
1656 * configure: Re-generate.
1657
1658 2005-01-12 Alan Modra <amodra@bigpond.net.au>
1659
1660 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
1661 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
1662 reaching PLT.
1663 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
1664 R_PPC_RELAX32PC_PLT.
1665
1666 2005-01-11 Alan Modra <amodra@bigpond.net.au>
1667
1668 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
1669 symbols.
1670 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1671 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1672 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1673 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1674 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1675 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1676 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
1677 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1678 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1679 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
1680 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1681 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1682 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1683 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1684
1685 2005-01-11 Alan Modra <amodra@bigpond.net.au>
1686
1687 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
1688 .dynsbss flags.
1689
1690 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
1691
1692 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
1693 * bfd-in2.h: Regenerate.
1694 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
1695 to support these new machine values.
1696 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
1697 the maxq10.
1698 (bfd_maxq_arch): Update values for the maxq20.
1699
1700 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
1701
1702 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
1703 non-shared object, do not reserve space in .plt and .rela.plt for
1704 regular symbols neither defined nor referenced in shared objects.
1705
1706 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
1707
1708 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
1709 to zero the structure.
1710 (create_got_section): Use BFD_ASSERT instead of abort.
1711 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
1712 'srelgot' fields.
1713 (create_got_section): New function.
1714 (sparc64_elf_create_dynamic_sections): Likewise.
1715 (sparc64_elf_check_relocs): Invoke create_got_section instead of
1716 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
1717 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
1718 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
1719 (sparc64_elf_finish_dynamic_symbol): Likewise.
1720 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
1721 (elf_backend_create_dynamic_sections): Define to
1722 sparc64_elf_create_dynamic_sections.
1723
1724 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
1725
1726 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
1727 (elf_backend_omit_section_dynsym): Define to it.
1728 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
1729 (elf_backend_omit_section_dynsym): Define to it.
1730
1731 2005-01-07 Jakub Jelinek <jakub@redhat.com>
1732
1733 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
1734 PT_DYNAMIC segment, unless .dynamic.
1735
1736 2005-01-06 Paul Brook <paul@codesourcery.com>
1737
1738 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
1739 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
1740 * configure: Regenerate.
1741 * elf32-arm.c: Add VxWorks target bfd.
1742 (USE_REL): Remove.
1743 (elf32_arm_link_hash_table): Add use_rel.
1744 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
1745 elf32_arm_relocate_section): Replace USE_REL with runtime check.
1746 Correct offset calculation for RELA case.
1747 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
1748 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
1749 (elf32_arm_vxworks_link_hash_table_create): New function.
1750 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
1751 (bfd_elf32_littlearm_vxworks_vec): Ditto.
1752 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
1753
1754 2005-01-06 Alan Modra <amodra@bigpond.net.au>
1755
1756 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
1757 multi_toc_needed.
1758 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
1759 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
1760 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
1761 (ppc64_elf_next_toc_section): Heed no_multi_toc.
1762 (ppc64_elf_reinit_toc): Set multi_toc_needed.
1763 (toc_adjusting_stub_needed): Rewrite.
1764 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
1765 toc tests. Adjust for toc_adjusting_stub_needed changes.
1766 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
1767 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
1768 * section.c: Expand comment on backend bits.
1769 * bfd-in2.h: Regenerate.
1770 * libbfd.h: Regenerate.
1771
1772 2005-01-06 Alan Modra <amodra@bigpond.net.au>
1773
1774 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
1775 toc adjusting stub, do not test source section flags.
1776
1777 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
1778
1779 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1780 from STABS debugging sections again.
1781
1782 2005-01-05 Fred Fish <fnf@specifixinc.com>
1783
1784 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
1785 (find_abstract_instance_name): New function.
1786 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
1787 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
1788 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
1789
1790 2004-12-31 Paul Brook <paul@copdesourcery.com>
1791
1792 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
1793
1794 2004-12-31 Alan Modra <amodra@bigpond.net.au>
1795
1796 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
1797 Commit missing changes from 2004-12-22.
1798 * bfd-in2.h: Regenerate.
1799
1800 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
1801
1802 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
1803
1804 2004-12-21 Kris Warkentin <kewarken@qnx.com>
1805
1806 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
1807 Add 'base' argument for constructing register sections. Reformat.
1808 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
1809 gp and fp regs. Reformat.
1810
1811 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
1812
1813 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
1814 * bfd-in2.h: Regenerate.
1815 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
1816 (avr_reloc_map): Likewise.
1817 (avr_final_link_relocate): Likewise.
1818
1819 2004-12-22 Alan Modra <amodra@bigpond.net.au>
1820
1821 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
1822 as-needed dynamic libs as undefined.
1823 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
1824 libs when finding they are needed.
1825
1826 2004-12-20 Alan Modra <amodra@bigpond.net.au>
1827
1828 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
1829 (opd_entry_value): Use opd_relocs if available.
1830 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
1831 copy .opd relocations to opd_relocs.
1832 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
1833
1834 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
1835
1836 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
1837 * elf32-v850.c (v850_elf_howto_table): Add entry for
1838 R_V850_LO16_SPLIT_OFFSET.
1839 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
1840 (v850_elf_perform_lo16_relocation): New function, extracted from...
1841 (v850_elf_perform_relocation): ...here. Use it to handle
1842 R_V850_LO16_SPLIT_OFFSET.
1843 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
1844 R_V850_LO16_SPLIT_OFFSET.
1845 * libbfd.h, bfd-in2.h: Regenerate.
1846
1847 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
1848
1849 * config.bfd: Add s390x-ibm-tpf support.
1850
1851 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
1852
1853 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
1854 to prototype, to make hash info available.
1855 Prevent wrapped symbols from being adjusted twice.
1856
1857 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
1858
1859 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
1860 overflow for calls to undefined weak symbols.
1861
1862 2004-12-11 Alan Modra <amodra@bigpond.net.au>
1863
1864 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
1865 canonical sections syms have a name.
1866
1867 2004-12-11 Alan Modra <amodra@bigpond.net.au>
1868
1869 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
1870 have been adjusted for output.
1871 (ppc64_elf_relocate_section): Mark sections with reloc_done.
1872
1873 2004-12-10 Alan Modra <amodra@bigpond.net.au>
1874
1875 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
1876 add symtab_hdr param.
1877 (group_signature): Update calls.
1878 * elf-bfd.h (bfd_elf_sym_name): Update.
1879 * elf32-ppc.c (ppc_elf_relocate_section): Update.
1880 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
1881 (ppc64_elf_relocate_section): Update.
1882 * elflink.c (elf_link_input_bfd): Update.
1883
1884 2004-12-10 Jakub Jelinek <jakub@redhat.com>
1885
1886 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
1887 st_shndx on STT_SECTION sections.
1888
1889 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
1890
1891 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
1892 ELF section symbols.
1893
1894 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
1895
1896 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
1897 return a real value, unless it is a PLT symbol.
1898 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
1899 bal if possible.
1900
1901 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
1902 R_MIPS_JALR entry to 0.
1903
1904 * archures.c: Define bfd_mach_mips9000.
1905 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
1906 (mips_set_isa_flags): Handle bfd_mach_mips9000.
1907 * cpu-mips.c (I_mips9000): Define.
1908 (arch_info_struct): Add case for bfd_mach_mips9000.
1909 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
1910 * bfd-in2.h: Regenerate.
1911
1912 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
1913
1914 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
1915 overflow.
1916
1917 2004-12-07 Ben Elliston <bje@gnu.org>
1918
1919 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
1920
1921 2004-12-06 Daniel Jacobowitz <dan@debian.org>
1922
1923 Suggested by Fergal Daly <fergal@esatclear.ie>:
1924 * simple.c (simple_dummy_multiple_definition): New function.
1925 (bfd_simple_get_relocated_section_contents): Use it.
1926
1927 2004-12-03 Jan Beulich <jbeulich@novell.com>
1928
1929 * elf.c (elf_find_function): Don't use the last file symbol ever,
1930 seen, but the last one seen prior to the symbol being reported.
1931 Don't report a filename at all for global symbols when that might
1932 be ambiguous/wrong.
1933
1934 2004-12-01 Paul Brook <paul@codesourcery.com>
1935
1936 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
1937 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
1938 version.
1939
1940 2004-12-01 Paul Brook <paul@codesourcery.com>
1941
1942 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
1943 sections undefined.
1944
1945 2004-11-30 Paul Brook <paul@codesourcery.com>
1946
1947 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
1948 no_pipeline_knowledge
1949 (elf32_arm_link_hash_table_create): Ditto.
1950 (bfd_elf32_arm_process_before_allocation): Ditto.
1951 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
1952 handling.
1953 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
1954 prototype.
1955 * bfd-in2.h: Regenerate.
1956
1957 2004-11-30 Randolph Chung <tausq@debian.org>
1958
1959 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
1960 (elf32_hppa_grok_psinfo): New function.
1961 (elf_backend_grok_prstatus): Define.
1962 (elf_backend_grok_psinfo): Define.
1963
1964 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
1965
1966 PR 574:
1967 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
1968
1969 2004-11-24 Paul Brook <paul@codesourcery.com>
1970
1971 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
1972
1973 2004-11-24 Paul Brook <paul@codesourcery.com>
1974
1975 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
1976 (elf32_arm_swap_symbol_out): New function.
1977 (elf32_arm_size_info): Add.
1978 (elf_backend_size_info): Define.
1979
1980 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1981
1982 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
1983 make_bfd_asection.
1984
1985 2004-11-19 Alan Modra <amodra@bigpond.net.au>
1986
1987 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
1988 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
1989 * nlmcode.h (nlm_write_object_contents): Warning fix.
1990
1991 2004-11-18 Bob Wilson <bob.wilson@acm.org>
1992
1993 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
1994
1995 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1996
1997 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
1998 (elf32_arm_plt_thumb_stub): New.
1999 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2000 and plt_got_offset.
2001 (elf32_arm_link_hash_traverse): Fix typo.
2002 (elf32_arm_link_hash_table): Add obfd.
2003 (elf32_arm_link_hash_newfunc): Initialize new fields.
2004 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2005 (elf32_arm_link_hash_table_create): Initialize obfd.
2006 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2007 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2008 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2009 interworking BFD is not dynamic.
2010 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
2011 not emit glue for PLT references.
2012 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
2013 emit glue for PLT references. Support the Thumb PLT prefix.
2014 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
2015 plt_thumb_refcount.
2016 (elf32_arm_check_relocs): Likewise.
2017 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
2018 plt_thumb_refcount.
2019 (allocate_dynrelocs): Handle Thumb PLT references.
2020 (elf32_arm_finish_dynamic_symbol): Likewise.
2021 (elf32_arm_symbol_processing): New function.
2022 (elf_backend_symbol_processing): Define.
2023
2024 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2025
2026 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
2027 add_fde_encoding. Remove need_relative.
2028 * elf-eh-frame.c (extra_augmentation_string_bytes)
2029 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
2030 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
2031 in cases where the CIE has no existing 'R' augmentation. Use
2032 size_of_output_cie_fde when assigning offsets. Use the final offset
2033 as the new section size.
2034 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
2035 Account for any extra augmentation bytes in the returned offset.
2036 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
2037 moved before being modified. Pad growing entries with DW_CFA_nops.
2038 Add 'z' and 'R' augmentations as directed by add_augmentation_size
2039 and add_fde_encoding.
2040
2041 2004-11-15 Mark Mitchell <mark@codesourcery.com>
2042
2043 * elf32-arm.c (elf32_arm_relocate_section): Use
2044 arm_real_reloc_type.
2045
2046 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2047
2048 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
2049 for discard relocations; don't add an R_MIPS_NONE to the main body
2050 of .rel.dyn.
2051
2052 2004-11-04 Paul Brook <paul@codesourcery.com>
2053
2054 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
2055 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
2056 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
2057 default version definition for unversioned symbols.
2058 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
2059 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
2060 _bfd_elf_slurp_version_tables. Set default version for unversioned
2061 imported symbols.
2062
2063 2004-11-15 Paul Brook <paul@codesourcery.com>
2064
2065 * elflink.c (elf_link_add_object_symbols): Don't assume version
2066 indices are consecutive.
2067
2068 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
2069
2070 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
2071 composite relocations against the personality data.
2072
2073 2004-11-13 Paul Brook <paul@codesourcery.com>
2074
2075 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
2076 R_ARM_PREL31 relocations to PLT entries.
2077 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
2078 (elf32_arm_check_relocs): Ditto.
2079
2080 2004-11-12 Bob Wilson <bob.wilson@acm.org>
2081
2082 * xtensa-isa.c (xtensa_interface_class_id): New.
2083
2084 2004-11-11 Bob Wilson <bob.wilson@acm.org>
2085
2086 * elf32-xtensa.c (property_table_compare): Remove assertion about
2087 entries with the same address and non-zero size.
2088 (xtensa_read_table_entries): Report such entries as errors.
2089
2090 2004-11-11 Mark Mitchell <mark@codesourcery.com>
2091
2092 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
2093 R_ARM_RELATIVE on Symbian OS.
2094
2095 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2096
2097 * som.c (som_bfd_print_private_bfd_data): New function.
2098 (som_object_setup): Save the auxiliary header. Don't assume that
2099 zero is an invalid entry point for a shared library.
2100 (som_object_p): Allocate the auxiliary header on the heap.
2101
2102 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
2103 declaration.
2104 (elf32_arm_symbian_modify_segment_map): Likewise.
2105
2106 2004-11-09 Daniel Jacobowitz <dan@debian.org>
2107
2108 From David Poole <daveml@mbuf.com>:
2109 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
2110 (elf32_arm_size_dynamic_sections): Call it.
2111
2112 2004-11-09 Alan Modra <amodra@bigpond.net.au>
2113
2114 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
2115 (ALL_MACHINES_CFILES): Fix typo.
2116 * Makefile.in: Regenerate.
2117 * po/SRC-POTFILES.in: Regenerate.
2118
2119 2004-11-08 Mark Mitchell <mark@codesourcery.com>
2120
2121 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
2122 R_ARM_RELATIVE relocation for Symbian OS, mention the section
2123 symbol in the relocation.
2124
2125 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
2126 Vineet Sharma <vineets@noida.hcltech.com>
2127
2128 * coff-maxq.c: New File.
2129 * cpu-maxq.c: New File.
2130 * coffcode.h: Likewise.
2131 * config.bfd: Likewise.
2132 * configure.in (maxqcoff_vec): New target vector.
2133 * Makefile.am: Add support for maxq target.
2134 * configure.in: Likewise.
2135 * archures.c:. Likewise.
2136 * targets.c: Likewise.
2137 * bfd_in2.h : Regenerated.
2138 * Makefile.in: Regenerated.
2139 * configure: Regenerated.
2140 * doc/Makefile.in: Regenerated.
2141
2142 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2143
2144 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
2145 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
2146 C_NT_WEAK aux entries.
2147 (_bfd_coff_generic_relocate_section): Handle undefined
2148 aliases.
2149
2150 2004-11-07 Andreas Schwab <schwab@suse.de>
2151
2152 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
2153 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
2154 non-default visibility.
2155
2156 2004-11-01 Mark Mitchell <mark@codesourcery.com>
2157
2158 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
2159 D_PAGED.
2160 (elf32_arm_symbian_modify_segment_map): Don't
2161 reset includes_filehdr and includes_phdrs here.
2162
2163 2004-11-04 Daniel Jacobowitz <dan@debian.org>
2164
2165 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
2166 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
2167 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
2168 dependency.
2169 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
2170 to a new removed list. Remove normal configuration stanzas.
2171 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
2172 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
2173 elfarm-nabi.lo with elf32-arm.lo.
2174 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
2175 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
2176 * elf32-arm.h: Remove.
2177 * elfarm-oabi.c: Remove.
2178 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
2179 and bfd_elf32_littlearm_oabi_vec.
2180 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
2181
2182 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
2183
2184 * config.bfd: Support crisv32-*-* like cris-*-*.
2185 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
2186 (bfd_mach_cris_v10_v32): New macros.
2187 * cpu-cris.c: Tweak formatting.
2188 (get_compatible): New function.
2189 (N): New macro.
2190 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
2191 bfd_arch_info_type:s.
2192 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
2193 get_compatible for member compatible and link bfd_cris_arch_v32 as
2194 next.
2195 * elf32-cris.c (cris_elf_pcrel_reloc)
2196 (cris_elf_set_mach_from_flags): New functions.
2197 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
2198 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
2199 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
2200 numbers for bfd_mach_cris_v32.
2201 (PLT_ENTRY_SIZE_V32): New macro.
2202 (elf_cris_plt0_entry): Drop last comma in initializer.
2203 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
2204 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
2205 PLT initializers.
2206 (cris_elf_relocate_section): Change all "%B(%A)" messages to
2207 "%B, section %A".
2208 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
2209 (elf_cris_finish_dynamic_sections): Similar.
2210 (elf_cris_adjust_dynamic_symbol): Similar.
2211 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
2212 section %A".
2213 <switch with PIC relocs>: Emit error and return FALSE for
2214 bfd_mach_cris_v10_v32.
2215 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2216 Emit warning when generating textrel reloc.
2217 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
2218 (cris_elf_final_write_processing): Set flags according to mach.
2219 (cris_elf_print_private_bfd_data): Display
2220 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
2221 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
2222 new_flags. Don't call cris_elf_final_write_processing. Don't
2223 look at the actual elf header flags at all; use
2224 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
2225 in bfd_get_mach for ibfd and obfd and handle merging of compatible
2226 objects.
2227 (bfd_elf32_bfd_copy_private_bfd_data): Define.
2228 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
2229 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
2230 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
2231 * bfd-in2.h, libbfd.h: Regenerate.
2232
2233 2004-11-04 Alan Modra <amodra@bigpond.net.au>
2234
2235 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
2236 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
2237 comment.
2238 (struct adjust_toc_info): New.
2239 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
2240
2241 2004-11-03 Bob Wilson <bob.wilson@acm.org>
2242
2243 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
2244 if there are no segments.
2245
2246 2004-11-02 Daniel Jacobowitz <dan@debian.org>
2247
2248 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
2249
2250 2004-11-02 Nick Clifton <nickc@redhat.com>
2251
2252 * elf32-iq2000.c: Convert to ISO C90 formatting.
2253
2254 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
2255
2256 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
2257
2258 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
2259
2260 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
2261 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
2262 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2263
2264 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2265
2266 * elf32-sh.c (tpoff): Take alignment into account.
2267
2268 2004-10-28 Nick Clifton <nickc@redhat.com>
2269
2270 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
2271 performing a relocatable link.
2272 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
2273 for MIPS ports under Irix.
2274
2275 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
2276
2277 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
2278 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
2279 (elf32_arm_final_link_relocate): Ditto.
2280 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
2281 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
2282 (elf32_arm_adjust_dynamic_symbol): Ditto.
2283 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
2284 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
2285 (elf32_arm_r_howto): ... To here.
2286 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
2287
2288 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
2289
2290 PR 475
2291 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
2292 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
2293 and R_IA64_SECREL64LSB.
2294
2295 2004-10-26 Paul Brook <paul@codesourcery.com>
2296
2297 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
2298 (bfd_elf_size_dynamic_sections): Create default version definition.
2299 (elf_link_output_extsym): Adjust for default symbol version.
2300
2301 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2302
2303 * mmo.c: Adjust to ISO C.
2304
2305 * mmo.c (mmo_write_section_description): New function broken out
2306 of mmo_internal_write_section.
2307 (mmo_internal_write_section): For each of .text and .data, call
2308 mmo_write_section_description before outputting contents if it has
2309 nontrivially deducible vma or contents.
2310 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
2311 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
2312 symbols if found within the .data address range.
2313
2314 2004-10-24 Daniel Jacobowitz <dan@debian.org>
2315
2316 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
2317
2318 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2319
2320 * mmo.c (File Layout): Correct place of misplaced blurb about
2321 special data.
2322
2323 2004-10-22 Mark Kettenis <kettenis@gnu.org>
2324
2325 * config.bfd: Add mips64*-*-openbsd.
2326
2327 2004-10-21 Bob Wilson <bob.wilson@acm.org>
2328
2329 * elf32-xtensa.c (ebb_propose_action): Put declarations before
2330 statements.
2331
2332 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
2333
2334 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
2335 * configure: Regenerate.
2336
2337 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
2338
2339 PR 463
2340 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
2341 to linker reloc_overflow callback.
2342 (aout_link_input_section_ext): Likewise.
2343 (aout_link_reloc_link_order): Likewise.
2344 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2345 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2346 Likewise.
2347 (alpha_relocate_section): Likewise.
2348 * coff-arm.c (coff_arm_relocate_section): Likewise.
2349 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
2350 * coff-h8500.c (extra_case): Likewise.
2351 * coff-i960.c (coff_i960_relocate_section): Likewise.
2352 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2353 * coff-mips.c (mips_relocate_section): Likewise.
2354 * coff-or32.c (coff_or32_relocate_section): Likewise.
2355 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2356 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
2357 * coff-sh.c (sh_relocate_section): Likewise.
2358 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2359 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
2360 * coff-z8k.c (extra_case): Likewise.
2361 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2362 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2363 (_bfd_coff_generic_relocate_section): Likewise.
2364 * ecoff.c (ecoff_reloc_link_order): Likewise.
2365 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2366 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2367 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2368 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2369 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2370 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2371 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2372 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2373 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2374 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2375 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2376 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2377 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2378 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2379 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2380 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2381 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2382 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2383 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2384 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2385 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2386 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2387 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2388 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2389 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2390 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2391 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2392 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2393 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2394 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2395 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2396 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2397 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2398 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2399 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2400 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2401 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2402 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2403 * elflink.c (elf_reloc_link_order): Likewise.
2404 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2405 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2406 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
2407 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2408 * pdp11.c (pdp11_aout_link_input_section): Likewise.
2409 (aout_link_reloc_link_order): Likewise.
2410 * reloc.c (bfd_generic_get_relocated_section_contents):
2411 Likewise.
2412 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2413 * simple.c (simple_dummy_reloc_overflow): Updated.
2414
2415 2004-10-20 Andreas Schwab <schwab@suse.de>
2416
2417 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
2418 (elf_backend_plt_sym_val): Define.
2419
2420 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
2421
2422 * config.bfd: Set targ_underscore=yes for PE COFF targets
2423
2424 2004-10-19 Alan Modra <amodra@bigpond.net.au>
2425
2426 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
2427 (ppc64_elf_edit_opd): Likewise.
2428
2429 2004-10-18 Mark Mitchell <mark@codesourcery.com>
2430
2431 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
2432 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
2433 set SEC_ALLOC and SEC_LOAD.
2434
2435 2004-10-18 Nick Clifton <nickc@redhat.com>
2436
2437 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
2438 'name' for relocs against both local and global symbols.
2439
2440 2004-10-16 Daniel Jacobowitz <dan@debian.org>
2441
2442 * bfd-in2.h: Regenerate.
2443 * bfd.c (struct bfd): Add no_export.
2444 * elflink.c (elf_link_add_object_symbols): Handle no_export.
2445
2446 2004-10-15 Alan Modra <amodra@bigpond.net.au>
2447
2448 * config.bfd: Whitespace cleanup.
2449 * Makefile.am: Run "make dep-am"
2450 * Makefile.in: Regenerate.
2451
2452 2004-10-15 Jakub Jelinek <jakub@redhat.com>
2453
2454 * elflink.c (struct already_linked_section): Removed.
2455 (try_match_symbols_in_sections, already_linked): Removed.
2456 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
2457 prefix of section names when finding already_linked_table
2458 chain. Compare section names. Instead of calling already_linked,
2459 do it inline and only for sections in the same already_linked_list.
2460
2461 2004-10-15 Alan Modra <amodra@bigpond.net.au>
2462
2463 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
2464 parameter. If called after _bfd_elf_write_section_eh_frame,
2465 don't allow a -2 return unless need_* bit is already set, and
2466 handle offsets adjusted for output_offset.
2467 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
2468 * elf.c (_bfd_elf_section_offset): Update call.
2469
2470 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
2471
2472 PR 440
2473 * coffcode.h (coff_compute_section_file_positions): Cast to
2474 bfd_vma when computing page alignment.
2475
2476 2004-10-13 Mark Mitchell <mark@codesourcery.com>
2477
2478 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2479 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
2480
2481 2004-10-12 Mark Mitchell <mark@codesourcery.com>
2482
2483 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
2484 relocations use a virtual address, not a section offset.
2485
2486 2004-10-12 Bob Wilson <bob.wilson@acm.org>
2487
2488 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
2489 (narrow_instruction, widen_instruction): Remove unnecessary calls to
2490 xtensa_format_encode.
2491 (ebb_propose_action): Inline call to ebb_add_proposed_action.
2492 (ebb_add_proposed_action): Delete.
2493
2494 2004-10-12 Bob Wilson <bob.wilson@acm.org>
2495
2496 * elf32-xtensa.c: Use ISO C90 formatting.
2497
2498 2004-10-12 Paul Brook <paul@codesourcery.com>
2499
2500 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
2501 message.
2502
2503 2004-10-12 Paul Brook <paul@codesourcery.com>
2504
2505 * elf32-arm.h: Support EABI version 4 objects.
2506
2507 2004-10-12 Alan Modra <amodra@bigpond.net.au>
2508
2509 PR 325
2510 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
2511 Don't mark as default.
2512 (bfd_x86_64_arch): Don't mark as default.
2513
2514 2004-10-12 Alan Modra <amodra@bigpond.net.au>
2515
2516 * elflink.c (enum action_discarded): New.
2517 (elf_section_complain_discarded): Delete.
2518 (elf_action_discarded): New function subsuming the above and also
2519 controlling reloc behaviour.
2520 (elf_link_input_bfd): Use it.
2521
2522 2004-10-11 Jakub Jelinek <jakub@redhat.com>
2523
2524 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
2525 (special_sections): Add .gnu.liblist and .gnu.conflict.
2526 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
2527
2528 2004-10-11 Alan Modra <amodra@bigpond.net.au>
2529
2530 PR 233
2531 * elflink.c (elf_link_input_bfd): Try harder to support
2532 relocations against symbols in removed linkonce sections.
2533
2534 2004-10-11 Alan Modra <amodra@bigpond.net.au>
2535
2536 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
2537
2538 PR 354
2539 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
2540 sections do not reference symbols in non-SEC_ALLOC sections.
2541
2542 2004-10-11 Alan Modra <amodra@bigpond.net.au>
2543
2544 PR 437
2545 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
2546 (_bfd_elf_link_omit_section_dynsym): Formatting.
2547
2548 2004-10-10 Alan Modra <amodra@bigpond.net.au>
2549
2550 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
2551 * libbfd.h: Regnerate.
2552 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
2553 * elf32-frv.c: Likewise.
2554 * elf32-m32r.c: Likewise.
2555 * elf32-ppc.c: Likewise.
2556 * elf64-hppa.c: Likewise.
2557 * elfxx-ia64.c: Likewise.
2558 * opncls.c: Likewise.
2559
2560 2004-10-10 Alan Modra <amodra@bigpond.net.au>
2561
2562 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
2563 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
2564 offsets stored in struct eh_cie_fde entries before doing other
2565 work.
2566
2567 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
2568 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
2569 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
2570 setting offsets for removed CIEs. Don't set "sec", instead set
2571 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
2572 CIE in hdr_info. Only set make_relative and make_lsda_relative
2573 for CIEs. Use pointers rather than array indices.
2574 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
2575 make_lsda_relative, need_* on cie_inf for FDEs.
2576 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
2577 section output_offset. Delete cie_offset, instead use cie_inf
2578 pointer to CIE entry. Use need_relative and need_lsda_relative on
2579 CIE entry for FDEs. Use pointers rather than array indices.
2580
2581 2004-10-09 Alan Modra <amodra@bigpond.net.au>
2582
2583 * coff-rs6000.c (rs6000coff_vec): Add initializer for
2584 bfd_is_target_special_symbol.
2585 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2586 * som.c (som_bfd_is_target_special_symbol): Define.
2587
2588 2004-10-08 Nick Clifton <nickc@redhat.com>
2589
2590 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
2591 * configure: Regenerate.
2592 * bfd-in2.h: Regenerate.
2593 * syms.c (bfd_is_target_special_symbol): New interface function.
2594 Returns true when a symbol should be considered to be special.
2595 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
2596 the symbol jump table.
2597 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
2598 Return true iff the symbol is a mapping symbol.
2599 (bfd_elf32_bfd_is_target_special_symbol): Define.
2600 * elfxx-target.h: Provide a default definition for
2601 bfd_is_target_special_symbol.
2602 * aout-target.h: Likewise.
2603 * aout-tic30.c: Likewise.
2604 * binary.c: Likewise.
2605 * coffcode.h: Likewise.
2606 * i386msdos.c: Likewise.
2607 * ieee.c: Likewise.
2608 * ihex.c: Likewise.
2609 * libaout.h: Likewise.
2610 * libbfd-in.h: Likewise
2611 * libecoff.h: Likewise.
2612 * mach-o.c: Likewise.
2613 * mmo.c: Likewise.
2614 * nlm-target.h: Likewise.
2615 * oasys.c: Likewise.
2616 * pef.c: Likewise.
2617 * ppcboot.c: Likewise.
2618 * srec.c: Likewise.
2619 * tekhex.c: Likewise.
2620 * versados.c: Likewise.
2621 * vms.c: Likewise.
2622 * xcoff-target.h: Likewise.
2623 * xsym.c: Likewise.
2624 * libbfd.h: Regenerate.
2625
2626 2004-10-08 Daniel Jacobowitz <dan@debian.org>
2627
2628 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
2629 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
2630 (elf_backend_section_from_shdr): Define.
2631
2632 2004-10-08 Alan Modra <amodra@bigpond.net.au>
2633
2634 * syms.c (bfd_is_local_label): Return false for file symbols.
2635
2636 2004-10-07 Bob Wilson <bob.wilson@acm.org>
2637 David Heine <dlheine@tensilica.com>
2638
2639 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
2640 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
2641 (elf32xtensa_no_literal_movement): New global variable.
2642 (elf_howto_table): Add entries for new relocations.
2643 (elf_xtensa_reloc_type_lookup): Handle new relocations.
2644 (property_table_compare): When addresses are equal, compare sizes and
2645 various property flags.
2646 (property_table_matches): New.
2647 (xtensa_read_table_entries): Extend to read new property tables. Add
2648 output_addr parameter to indicate that output addresses should be used.
2649 Use bfd_get_section_limit.
2650 (elf_xtensa_find_property_entry): New.
2651 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
2652 (elf_xtensa_check_relocs): Handle new relocations.
2653 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
2654 relocations. Use new xtensa-isa.h functions.
2655 (build_encoding_error_message): Remove encode_result parameter. Add
2656 new target_address parameter used to detect alignment errors.
2657 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
2658 error handling. Use new is_operand_relocation function.
2659 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
2660 Use underbar macro for error messages. Formatting.
2661 (get_const16_opcode): New.
2662 (get_l32r_opcode): Add a separate flag for initialization.
2663 (get_relocation_opnd): Operand number is no longer explicit in the
2664 relocation. Change to decode the opcode and analyze its operands.
2665 (get_relocation_slot): New.
2666 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
2667 Use new xtensa-isa.h functions to handle multislot instructions.
2668 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
2669 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
2670 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
2671 check_loop_aligned, check_branch_target_aligned_address, narrowable,
2672 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
2673 get_single_format, init_op_single_format_table): New.
2674 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
2675 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
2676 (contract_asm_expansion): Add error_message parameter and pass it to
2677 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
2678 with R_XTENSA_SLOT0_OP.
2679 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
2680 instructions. Use new xtensa-isa.h functions.
2681 (r_reloc struct): Add new virtual_offset field.
2682 (r_reloc_init): Add contents and content_length parameters. Set
2683 virtual_offset field to zero. Add contents to target_offset field for
2684 partial_inplace relocations.
2685 (r_reloc_is_defined): Check for null.
2686 (print_r_reloc): New debug function.
2687 (source_reloc struct): Replace xtensa_operand field with pair of the
2688 opcode and the operand position. Add is_abs_literal field.
2689 (init_source_reloc): Specify operand by opcode/position pair. Set
2690 is_abs_literal field.
2691 (source_reloc_compare): When target_offsets are equal, compare other
2692 fields to make sorting predictable.
2693 (literal_value struct): Add is_abs_literal field.
2694 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
2695 (init_literal_value): New.
2696 (is_same_value): Replace with ...
2697 (literal_value_equal): ... this function. Add comparisons of
2698 virtual_offset and is_abs_literal fields.
2699 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
2700 failure. Initialize has_last_loc field.
2701 (value_map_hash_table_delete): New.
2702 (hash_literal_value): Rename to ...
2703 (literal_value_hash): ... this. Include is_abs_literal flag and
2704 virtual_offset field in the hash value.
2705 (get_cached_value): Rename to ...
2706 (value_map_get_cached_value): ... this. Update calls to
2707 literal_value_hash and literal_value_equal.
2708 (add_value_map): Check for allocation failure. Update calls to
2709 value_map_get_cached_value and literal_value_hash.
2710 (text_action, text_action_list, text_action_t): New types.
2711 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
2712 text_action_add, text_action_add_literal, offset_with_removed_text,
2713 offset_with_removed_text_before_fill, find_insn_action,
2714 print_action_list, print_removed_literals): New.
2715 (offset_with_removed_literals): Delete.
2716 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
2717 fix_array, fix_array_count, allocated_relocs, relocs_count, and
2718 allocated_relocs_count fields.
2719 (init_xtensa_relax_info): Initialize new fields.
2720 (reloc_bfd_fix struct): Add new translated field.
2721 (reloc_bfd_fix_init): Add translated parameter and use it to set the
2722 translated field.
2723 (fix_compare, cache_fix_array): New.
2724 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
2725 section via get_xtensa_relax_info. Use cache_fix_array to set up
2726 sorted fix_array and use bsearch instead of linear search.
2727 (section_cache_t): New struct.
2728 (init_section_cache, section_cache_section, clear_section_cache): New.
2729 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
2730 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
2731 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
2732 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
2733 New.
2734 (retrieve_contents): Use bfd_get_section_limit.
2735 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
2736 to compute_removed_literals. Free value_map_hash_table when no longer
2737 needed.
2738 (analyze_relocations): Check is_relaxable_asm_section flag. Call
2739 compute_text_actions for all sections.
2740 (find_relaxable_sections): Mark sections as relaxable if they contain
2741 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
2742 call. Increment relax_info src_count field only for appropriate
2743 relocation types. Remove is_literal_section check.
2744 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
2745 r_reloc_init and find_associated_l32r_irel. Check
2746 is_relaxable_asm_section flag. Handle L32R instructions with absolute
2747 literals. Pass is_abs_literal flag to init_source_reloc.
2748 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
2749 CONST16 instructions. Adjust calls to r_reloc_init and
2750 pcrel_reloc_fits. Handle weak symbols conservatively.
2751 (find_associated_l32r_irel): Add bfd parameter and pass it to
2752 is_l32r_relocation.
2753 (compute_text_actions, compute_ebb_proposed_actions,
2754 compute_ebb_actions, check_section_ebb_pcrels_fit,
2755 check_section_ebb_reduces, text_action_add_proposed,
2756 compute_fill_extra_space): New.
2757 (remove_literals): Replace with ...
2758 (compute_removed_literals): ... this function. Call
2759 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
2760 Call xtensa_read_table_entries to get the property table. Skip
2761 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
2762 is_removable_literal, remove_dead_literal, and
2763 identify_literal_placement functions.
2764 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
2765 instead of linear search.
2766 (is_removable_literal, remove_dead_literal,
2767 identify_literal_placement): New.
2768 (relocations_reach): Update check for literal not referenced by any
2769 PC-relative relocations. Adjust call to pcrel_reloc_fits.
2770 (coalesce_shared_literal, move_shared_literal): New.
2771 (relax_section): Use bfd_get_section_limit. Call
2772 translate_section_fixes. Update calls to r_reloc_init and
2773 offset_with_removed_text. Check new is_relaxable_asm_section flag.
2774 Add call to pin_internal_relocs. Add special handling for
2775 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
2776 info to calculate new addend_displacement variable. Replace code for
2777 deleting literals with more general code to perform the actions
2778 determined by the action_list for the section.
2779 (translate_section_fixes, translate_reloc_bfd_fix): New.
2780 (translate_reloc): Check new is_relaxable_asm_section flag. Call
2781 find_removed_literal only if is_operand_relocation. Update call to
2782 offset_with_removed_text. Use new target_offset and removed_bytes
2783 variables.
2784 (move_literal): New.
2785 (relax_property_section): Use bfd_get_section_limit. Set new
2786 is_full_prop_section flag and handle new property tables. Update calls
2787 to r_reloc_init and offset_with_removed_text. Check
2788 is_relaxable_asm_section flag. Handle expansion of zero-sized
2789 unreachable entries, with use of offset_with_removed_text_before_fill.
2790 For relocatable links, combine entries only for literal tables.
2791 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
2792 calls to offset_with_removed_text. Translate st_size field for
2793 function symbols.
2794 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
2795 failure. Add contents parameter. Update call to get_bfd_fix. Update
2796 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
2797 R_XTENSA_ASM_EXPAND relocs.
2798 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
2799 call to get_bfd_fix. Include offset from contents for partial_inplace
2800 relocations.
2801 (is_reloc_sym_weak): New.
2802 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
2803 (prop_sec_len): New.
2804 (xtensa_is_property_section): Handle new property sections.
2805 (is_literal_section): Delete.
2806 (internal_reloc_compare): When r_offset matches, compare r_info and
2807 r_addend to make sorting predictable.
2808 (internal_reloc_matches): New.
2809 (xtensa_get_property_section_name): Handle new property sections.
2810 (xtensa_get_property_predef_flags): New.
2811 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
2812 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
2813 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
2814 (xtisa_errno, xtisa_error_msg): New variables.
2815 (xtensa_isa_errno, xtensa_isa_error_msg): New.
2816 (xtensa_insnbuf_alloc): Add error handling.
2817 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
2818 use xtensa_format_decode. Add error handling.
2819 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
2820 instruction length to find the number of bytes to copy.
2821 (xtensa_isa_init): Add error handling. Replace calls to
2822 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
2823 tables in the xtensa_modules structure.
2824 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
2825 xtensa_extend_isa): Delete.
2826 (xtensa_isa_free): Change to only free lookup tables.
2827 (opname_lookup_compare): Replace with ...
2828 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
2829 (xtensa_insn_maxlength): Rename to ...
2830 (xtensa_isa_maxlength): ... this.
2831 (xtensa_insn_length): Delete.
2832 (xtensa_insn_length_from_first_byte): Replace with ...
2833 (xtensa_isa_length_from_chars): ... this function.
2834 (xtensa_num_opcodes): Rename to ...
2835 (xtensa_isa_num_opcodes): ... this.
2836 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
2837 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
2838 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
2839 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
2840 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
2841 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
2842 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
2843 (xtensa_opcode_lookup): Add error handling.
2844 (xtensa_decode_insn): Replace with ...
2845 (xtensa_opcode_decode): ... this function, with new format and
2846 slot parameters. Add error handling.
2847 (xtensa_encode_insn): Replace with ...
2848 (xtensa_opcode_encode): ... this function, which does the encoding via
2849 one of the entries in the "encode_fns" array. Add error handling.
2850 (xtensa_opcode_name): Add error handling.
2851 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
2852 xtensa_opcode_is_call): New.
2853 (xtensa_num_operands): Replace with ...
2854 (xtensa_opcode_num_operands): ... this function. Add error handling.
2855 (xtensa_opcode_num_stateOperands,
2856 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
2857 xtensa_opcode_funcUnit_use, xtensa_operand_name,
2858 xtensa_operand_is_visible): New.
2859 (xtensa_get_operand, xtensa_operand_kind): Delete.
2860 (xtensa_operand_inout): Add error handling and special-case for
2861 "sout" operands.
2862 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
2863 operate on one slot of an instruction. Added error handling.
2864 (xtensa_operand_encode): Handle default operands with no encoding
2865 functions. Check for success by comparing against decoded value.
2866 Add error handling.
2867 (xtensa_operand_decode): Handle default operands. Return decoded value
2868 through argument pointer. Add error handling.
2869 (xtensa_operand_is_register, xtensa_operand_regfile,
2870 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
2871 (xtensa_operand_isPCRelative): Rename to ...
2872 (xtensa_operand_is_PCrelative): ... this. Add error handling.
2873 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
2874 through argument pointer. Add error handling.
2875 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
2876 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
2877 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
2878 xtensa_regfile_shortname, xtensa_regfile_view_parent,
2879 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
2880 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
2881 xtensa_state_is_exported, xtensa_sysreg_lookup,
2882 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
2883 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
2884 xtensa_interface_num_bits, xtensa_interface_inout,
2885 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
2886 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
2887 * xtensa-modules.c: Rewrite to use new data structures.
2888 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
2889 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
2890 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
2891 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
2892 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
2893 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
2894 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
2895 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
2896 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
2897 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
2898 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
2899 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
2900 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
2901 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
2902 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
2903 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
2904 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
2905 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
2906 * Makefile.in: Regenerate.
2907 * bfd-in2.h: Likewise.
2908 * libbfd.h: Likewise.
2909
2910 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
2911
2912 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
2913 against the absolute section.
2914 (mips_elf64_write_rela): Likewise.
2915
2916 2004-10-07 Jan Beulich <jbeulich@novell.com>
2917
2918 * elf.c (elf_find_function): Don't generally check for matching
2919 section, just for non-file symbols. Remove redunant comparison
2920 for the latter.
2921 * elf32-arm.h (arm_elf_find_function): Likewise.
2922
2923 2004-10-07 Jeff Baker <jbaker@qnx.com>
2924
2925 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
2926 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
2927 was specified.
2928
2929 2004-10-04 Roland McGrath <roland@redhat.com>
2930
2931 * hash.c (bfd_hash_set_default_size): Use const for table.
2932 Use size_t instead of int for variable compared to sizeof results.
2933
2934 2004-10-05 Alan Modra <amodra@bigpond.net.au>
2935
2936 PR 425
2937 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
2938
2939 2004-10-01 Paul Brook <paul@codesourcery.com>
2940
2941 * elf32-arm.h (elf32_arm_fake_sections,
2942 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
2943 functions.
2944 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
2945
2946 2004-10-01 Alan Modra <amodra@bigpond.net.au>
2947
2948 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
2949 need_lsda_relative.
2950 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
2951 need_relative or need_lsda_relative if we are processing an
2952 offset for a reloc on a FDE initial loc or LSDA field
2953 respectively.
2954 (_bfd_elf_write_section_eh_frame): Test need_relative and
2955 need_lsda_relative in place of corresponding make_* field
2956 when deciding to use pc-relative encodings.
2957
2958 2004-09-30 Paul Brook <paul@codesourcery.com>
2959
2960 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
2961 target2 relocation type.
2962
2963 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
2964
2965 PR 414
2966 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
2967
2968 2004-09-30 Paul Brook <paul@codesourcery.com>
2969
2970 * reloc.c: Add BFD_RELOC_ARM_SMI.
2971 * bfd-in2.h: Regenerate.
2972 * libbfd.h: Ditto.
2973
2974 2004-09-24 Alan Modra <amodra@bigpond.net.au>
2975
2976 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
2977 vma and output offset to address.
2978 * simple.c (simple_save_output_info): Only set output section
2979 and offset for debug sections, or those not already set up by
2980 the linker.
2981 (bfd_simple_get_relocated_section_contents): Update comment.
2982
2983 2004-09-24 Alan Modra <amodra@bigpond.net.au>
2984
2985 * elf.c (IS_LOADED): Delete.
2986 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
2987 Restore SEC_HAS_CONTENTS test to the one place it was used prior
2988 to 2004-09-22.
2989
2990 2004-09-23 Alan Modra <amodra@bigpond.net.au>
2991
2992 PR gas/396
2993 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2994 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
2995 redundant assignment of EM_SPARC.
2996
2997 2004-09-22 Brian Ford <ford@vss.fsi.com>
2998
2999 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3000 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3001 constants.
3002 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3003
3004 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3005
3006 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3007 (elf_backend_modify_segment_map): Don't define.
3008
3009 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3010
3011 * elf.c (IS_LOADED): Define.
3012 (assign_file_positions_for_segments): Don't round up file offset of
3013 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
3014 Delete code handling link script adjustment of lma. Do the adjust
3015 in later code handling similar ajustments. Remove dead code error
3016 check. Warn if section lma would require a negative offset
3017 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
3018 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
3019 update voff in section loop. Change voff in segment loop to be an
3020 adjustment on top of "off". Set sec->filepos and update "off" later.
3021 Test for loadable sections consistently using IS_LOADED. Similarly,
3022 test for alloc-only sections other than .tbss consistently.
3023 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
3024 Tidy PT_NOTE handling. Use %B and %A in error messages.
3025 (assign_file_positions_except_relocs): Use %B in error message.
3026
3027 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
3028
3029 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
3030 (CONFIG_STATUS_DEPENDENCIES): New.
3031 (Makefile): Removed.
3032 (config.status): Likewise.
3033 * Makefile.in: Regenerated.
3034
3035 2004-09-17 Paul Brook <paul@codesourcery.com>
3036
3037 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
3038 (bfd_elf32_arm_process_before_allocation): Update prototype.
3039 * bfd-in2.h: Regenerate.
3040 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
3041 (elf32_arm_link_hash_table_create): Set it.
3042 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
3043 (bfd_elf32_arm_set_target_relocs): New function.
3044 (arm_real_reloc_type): New function.
3045 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
3046 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
3047 (elf32_arm_gc_sweep_hook): Ditto.
3048 (elf32_arm_check_relocs): Ditto.
3049 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
3050 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
3051 R_ARM_GOT_TARGET2.
3052 (elf32_arm_got_prel): New variable.
3053 (elf32_arm_howto_from_type): New function.
3054 (elf32_arm_info_to_howto): Use it.
3055 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
3056 BFD_RELOC_ARM_TARGET2.
3057 * libbfd.h: Regenerate.
3058 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
3059
3060 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3061
3062 * ecoff.c: Update u.undef.next refs.
3063 * elf64-ppc.c: Likewise.
3064 * elflink.c: Likewise.
3065 * linker.c: Likewise.
3066 * xcofflink.c: Likewise.
3067
3068 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
3069 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
3070 fields to indirect struct.
3071 * elf-m10300.c: Update u.weakdef refs.
3072 * elf32-arm.h: Likewise.
3073 * elf32-cris.c: Likewise.
3074 * elf32-frv.c: Likewise.
3075 * elf32-hppa.c: Likewise.
3076 * elf32-i370.c: Likewise.
3077 * elf32-i386.c: Likewise.
3078 * elf32-m32r.c: Likewise.
3079 * elf32-m68k.c: Likewise.
3080 * elf32-ppc.c: Likewise.
3081 * elf32-s390.c: Likewise.
3082 * elf32-sh.c: Likewise.
3083 * elf32-sparc.c: Likewise.
3084 * elf32-vax.c: Likewise.
3085 * elf32-xtensa.c: Likewise.
3086 * elf64-alpha.c: Likewise.
3087 * elf64-hppa.c: Likewise.
3088 * elf64-ppc.c: Likewise.
3089 * elf64-s390.c: Likewise.
3090 * elf64-sh64.c: Likewise.
3091 * elf64-sparc.c: Likewise.
3092 * elf64-x86-64.c: Likewise.
3093 * elfxx-ia64.c: Likewise.
3094 * elfxx-mips.c: Likewise.
3095 * elflink.c: Likewise. Also u.elf_hash_value.
3096 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
3097 indirection.
3098 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3099 (bfd_elf_gc_record_vtinherit): Alloc vtable.
3100 (bfd_elf_gc_record_vtentry): Likewise.
3101 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
3102
3103 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3104
3105 * Makefile.am: Run "make dep-am".
3106 * Makefile.in: Regenerate.
3107 * bfd-in2.h: Regenerate.
3108 * po/SRC-POTFILES.in: Regenerate.
3109 * po/bfd.pot: Regenerate.
3110
3111 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3112
3113 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
3114 with bitfields. Make "type" and "other" bitfields too.
3115 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
3116 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
3117 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
3118 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
3119 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
3120 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
3121 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
3122 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
3123 * elf-hppa.h: Update all uses of elf_link_hash_flags.
3124 * elf-m10300.c: Likewise.
3125 * elf.c: Likewise.
3126 * elf32-arm.h: Likewise.
3127 * elf32-cris.c: Likewise.
3128 * elf32-frv.c: Likewise.
3129 * elf32-hppa.c: Likewise.
3130 * elf32-i370.c: Likewise.
3131 * elf32-i386.c: Likewise.
3132 * elf32-m32r.c: Likewise.
3133 * elf32-m68k.c: Likewise.
3134 * elf32-ppc.c: Likewise.
3135 * elf32-s390.c: Likewise.
3136 * elf32-sh-symbian.c: Likewise.
3137 * elf32-sh.c: Likewise.
3138 * elf32-sh64.c: Likewise.
3139 * elf32-sparc.c: Likewise.
3140 * elf32-vax.c: Likewise.
3141 * elf32-xtensa.c: Likewise.
3142 * elf64-alpha.c: Likewise.
3143 * elf64-hppa.c: Likewise.
3144 * elf64-ppc.c: Likewise.
3145 * elf64-s390.c: Likewise.
3146 * elf64-sh64.c: Likewise.
3147 * elf64-sparc.c: Likewise.
3148 * elf64-x86-64.c: Likewise.
3149 * elflink.c: Likewise.
3150 * elfxx-ia64.c: Likewise.
3151 * elfxx-mips.c: Likewise.
3152 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
3153 * configure: Regenerate.
3154 * aclocal.m4: Regenerate.
3155
3156 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3157
3158 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
3159 around uses of R_ARM_TARGET1.
3160 (elf32_arm_check_relocs): Likewise.
3161
3162 2004-09-13 Paul Brook <paul@codesourcery.com>
3163
3164 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3165 prototype.
3166 * bfd-in2.h: Regenerate.
3167 * libbfd.h: Regenerate.
3168 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
3169 (elf32_arm_link_hash_table_create): Set target1_is_rel.
3170 (bfd_elf32_arm_process_before_allocation): Ditto.
3171 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
3172 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
3173 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
3174 * reloc.c: Ditto.
3175
3176 2004-09-10 Joel Brobecker <brobecker@gnat.com>
3177
3178 * hpux-core.c (thread_section_p): New function.
3179 (hpux_core_core_file_p): Fix computation of offset in call
3180 to bfd_seek. Create a ".reg" section from an arbitrary
3181 ".reg/<id>" section if none was created after having read
3182 all sections.
3183
3184 2004-09-11 Andreas Schwab <schwab@suse.de>
3185
3186 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
3187 * aclocal.m4: Rebuild.
3188 * configure: Rebuild.
3189
3190 2004-09-10 Joel Brobecker <brobecker@gnat.com>
3191
3192 * section.c (bfd_sections_find_if): Fix parameter name in
3193 comment to match code.
3194
3195 2004-09-10 Alan Modra <amodra@bigpond.net.au>
3196
3197 * elf.c (assign_file_positions_except_relocs): Assign relocs
3198 stored in a bfd section.
3199
3200 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
3201
3202 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
3203 h->gotplt_refcount to 0, not -1.
3204
3205 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
3206
3207 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3208 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
3209 symname.
3210 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
3211 handle symbol visibility here.
3212
3213 2004-09-07 Alan Modra <amodra@bigpond.net.au>
3214
3215 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
3216 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
3217 callers.
3218 (ppc_stub_name): Remove trailing "+0" on stub name.
3219 (create_linkage_sections): Create relocations for
3220 branch lookup table when --emit-relocs as well as when --shared.
3221 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
3222 relbrlt test. For --emit-stub-syms, always output a sym even when
3223 one already exists on a plt call stub. Put stub type in the stub
3224 symbol name.
3225 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
3226 test.
3227 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
3228 reloc_count in stub sections. Adjust relbrlt test.
3229 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
3230 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
3231 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
3232 for relocs against discarded symbols. Fix comments.
3233
3234 2004-09-06 Mark Mitchell <mark@codesourcery.com>
3235
3236 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
3237 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
3238 from ...
3239 (map_sections_to_segments): ... here. Use it. Assign a file
3240 position to the .dynamic section if it is not loadable, but part
3241 of the PT_DYNAMIC segment.
3242 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3243 offsets, not VMAs, for the BPABI. Do not fill in the header in
3244 the .got.plt section for the BPABI.
3245 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
3246 PT_DYNAMIC segment.
3247 (elf_backend_want_got_plt): Define to zero for Symbian OS.
3248
3249 2004-09-06 Nick Clifton <nickc@redhat.com>
3250
3251 * elflink.c (elf_link_add_object_symbols): Set the error code to
3252 bfd_error_wrong_format when the input format does not match the
3253 output format.
3254
3255 2004-09-06 Alan Modra <amodra@bigpond.net.au>
3256
3257 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
3258 (ppc64_elf_check_directives): ..here.
3259 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
3260 before accessing ppc64_elf_tdata.
3261 (ppc64_elf_finish_dynamic_sections): And here too.
3262
3263 2004-09-04 Alan Modra <amodra@bigpond.net.au>
3264
3265 * bfd.c (_bfd_default_error_handler): Correct loop exit.
3266
3267 2004-09-03 Mark Mitchell <mark@codesourcery.com>
3268
3269 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
3270 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
3271 (bfd_elf32_littlearm_symbian_vec): Likewise.
3272 * configure: Regenerated.
3273 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
3274 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
3275 (PLT_ENTRY_SIZE): Likewise.
3276 (bfd_vma_elf32_arm_symbian_plt_entry): New
3277 variable.
3278 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
3279 and symbian_p.
3280 (create_got_section): Don't create sections when generating BPABI
3281 objects.
3282 (elf32_arm_create_dynamic_sections): Tidy.
3283 (elf32_arm_link_hash_table_create): Set plt_header_size,
3284 plt_entry_size, and symbian_p.
3285 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
3286 generating BPABI objects.
3287 (allocate_dynrelocs): Use htab->plt_header_size, not
3288 PLT_HEADER_SIZE. Do not add to .got.plt when
3289 generating BPABI objects.
3290 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
3291 * elfarm-nabi.c: Add SymbianOS target vectors.
3292 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
3293 (_bfd_elf_link_create_dynamic_sections): Likewise.
3294 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
3295 (elfNN_bed): Use it.
3296 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
3297 (bfd_elf32_littlearm_symbian_vec): Likewise.
3298 (_bfd_target_vector): Add them.
3299
3300 2004-09-03 Nick Clifton <nickc@redhat.com>
3301
3302 PR 360
3303 * coffcode.h (handle_COMDAT): Replace abort with an warning
3304 message and allow the scan to continue.
3305
3306 2004-09-02 Alan Modra <amodra@bigpond.net.au>
3307
3308 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
3309 in when reading relocs, not our sorted syms. Remove unnecessary
3310 var.
3311
3312 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3313
3314 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
3315
3316 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
3317
3318 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
3319 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
3320 replace uses of *_alias with *_noncanonical.
3321 * aclocal.m4: Rebuild with aclocal 1.4p6.
3322 * Makefile.in: Rebuild with automake 1.4p6.
3323 * doc/Makefile.in: Rebuild with automake 1.4p6.
3324 * configure.in: Autoupdate with autoupdate 2.59.
3325 * config.in: Regenerate with autoheader 2.59.
3326 * configure: Regnerate with autoconf 2.59.
3327
3328 2004-08-28 Alan Modra <amodra@bigpond.net.au>
3329
3330 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
3331 symbol pointer arrays before modifying.
3332
3333 2004-08-28 Alan Modra <amodra@bigpond.net.au>
3334
3335 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
3336 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
3337 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
3338 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
3339 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
3340 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
3341 Use both symbol tables on non-relocatable objects. Use a common
3342 error exit. Fix "mid" warning.
3343 * libbfd.h: Regenerate.
3344 * bfd-in2.h: Regenerate.
3345
3346 2004-08-28 Alan Modra <amodra@bigpond.net.au>
3347
3348 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
3349 object file.
3350 (struct sfpr_def_parms): Save some space.
3351 (sfpr_define): Here too.
3352
3353 * elf64-ppc.c (compare_symbols): Put section syms first.
3354 (sym_exists_at): New function.
3355 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
3356 points only for relocatable files. Use .opd section contents
3357 otherwise. Generally clean up the code.
3358
3359 2004-08-27 Alan Modra <amodra@bigpond.net.au>
3360
3361 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
3362 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
3363 (struct sfpr_def_parms): New.
3364 (sfpr_define): New function.
3365 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
3366 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
3367 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
3368 (savefpr1_tail, restfpr1_tail): New functions.
3369 (savevr, savevr_tail, restvr, restvr_tail): New functions.
3370 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
3371 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
3372 code. Define all ABI mandated _save and _rest functions.
3373
3374 2004-08-26 Paul Brook <paul@codesourcery.com>
3375
3376 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
3377
3378 2004-08-26 Alan Modra <amodra@bigpond.net.au>
3379
3380 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
3381 TRUE or FALSE.
3382
3383 2004-08-26 Alan Modra <amodra@bigpond.net.au>
3384
3385 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
3386 that pcrel correction is applied for R_386_PC32.
3387
3388 2004-08-25 Alan Modra <amodra@bigpond.net.au>
3389
3390 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
3391 for R_386_32 and R_386_PC32 relocs against symbols defined in
3392 discarded sections.
3393
3394 2004-08-25 Dmitry Diky <diwil@spec.ru>
3395
3396 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
3397 Add new relocations.
3398 * bfd-in2.h: Regenerate.
3399 * libbfd.h: Regenerate.
3400 * elf32-msp430.c: Clean-up code.
3401 (elf_msp430_howto_table): Add new relocation entries.
3402 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
3403 (msp430_elf_relax_section): New function.
3404 (msp430_elf_relax_delete_bytes): New function.
3405 (msp430_elf_symbol_address_p): New function.
3406
3407 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3408
3409 * elf32-m32r.c (m32r_elf_relocate_section): Handle
3410 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
3411
3412 2004-08-20 Daniel Jacobowitz <dan@debian.org>
3413
3414 * elflink.c (_bfd_elf_section_already_linked): Handle
3415 SEC_LINK_DUPLICATES_SAME_CONTENTS.
3416
3417 2004-08-19 Mark Mitchell <mark@codesourcery.com>
3418
3419 * config.bfd (arm*-*-symbianelf*): New target.
3420 (arm*-*-eabi*): Likewise.
3421
3422 2004-08-19 Alan Modra <amodra@bigpond.net.au>
3423
3424 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
3425 "struct ppc_link_hash_entry *".
3426 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
3427 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
3428
3429 2004-08-19 Jakub Jelinek <jakub@redhat.com>
3430
3431 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
3432 entries (where fd_aux overlaps next entry's fd_func).
3433 Add non_overlapping argument, use it.
3434 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
3435 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3436 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
3437 as indexes into opd_sym_map/opd_adjust array.
3438 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
3439
3440 2004-08-18 Alan Modra <amodra@bigpond.net.au>
3441
3442 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
3443 if we can look up their function descriptor in a regular file.
3444
3445 2004-08-18 Nick Clifton <nickc@redhat.com>
3446
3447 PR 324
3448 * cofflink.c (coff_link_add_symbols): Check that the comdat
3449 pointer in the coff_section_data structure has been initialised
3450 before using it.
3451
3452 2004-08-18 Alan Modra <amodra@bigpond.net.au>
3453
3454 PR 338
3455 * elflink.c (bfd_elf_record_link_assignment): Add comment about
3456 changing bfd_link_hash_undefined to bfd_link_hash_new.
3457
3458 2004-08-17 Jakub Jelinek <jakub@redhat.com>
3459
3460 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
3461 if not yet defined.
3462 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
3463 (synthetic_opd, synthetic_relocatable): New variables.
3464 (compare_symbols, compare_relocs): New helper routines.
3465 (ppc64_elf_get_synthetic_symtab): New function.
3466 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
3467 to relsyms.
3468 * bfd-in2.h: Regenerated.
3469 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
3470 to relsyms. Return 0 if abfd is relocatable.
3471
3472 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3473
3474 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
3475
3476 2004-08-17 Nick Clifton <nickc@redhat.com>
3477
3478 * (is_arm_mapping_symbol_name): New function - return true
3479 when a symbol name matches the requirements for an ARM mapping
3480 symbol name.
3481 (arm_elf_find_function): New function based on
3482 elf_find_function in elf.c but skipping ARM mapping symbols
3483 and including thumb function symbols.
3484 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
3485 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
3486
3487 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3488
3489 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
3490 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
3491 (ppc64_elf_brtaken_reloc): Here too.
3492
3493 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3494
3495 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
3496 symbol visibility.
3497 (ppc64_elf_check_directives): Check that we have the right hash
3498 table before proceeding.
3499
3500 2004-08-17 Alan Modra <amodra@bigpond.net.au>
3501
3502 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
3503 (adjust_opd_syms): Attach opd syms for deleted entries to one of
3504 the sections that will be discarded.
3505
3506 2004-08-16 Alan Modra <amodra@bigpond.net.au>
3507
3508 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
3509
3510 2004-08-16 Alan Modra <amodra@bigpond.net.au>
3511
3512 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
3513 free space available.
3514
3515 2004-08-16 Alan Modra <amodra@bigpond.net.au>
3516
3517 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
3518 occurrences with bfd_byte * thoughout file.
3519
3520 * coff-rs6000.c (do_shared_object_padding): Warning fix.
3521 (xcoff_write_armap_big): Likewise.
3522 (xcoff_write_archive_contents_old): Likewise.
3523 (xcoff_write_archive_contents_big): Likewise.
3524
3525 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
3526
3527 2004-08-13 Nick Clifton <nickc@redhat.com>
3528
3529 * elf32-arm.h: Convert to ISO C90.
3530
3531 2004-08-13 Alan Modra <amodra@bigpond.net.au>
3532
3533 PR 293
3534 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
3535 zero the plt field.
3536
3537 2004-08-13 Alan Modra <amodra@bigpond.net.au>
3538
3539 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
3540 (bfd_archive_filename, bfd_get_section_ident): Delete.
3541 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
3542 bfd_archive_filename.
3543 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
3544 to warn about symbols in discarded sections. Use _bfd_error_handler.
3545 * aout-adobe.c (aout_adobe_callback): See below.
3546 * aout-cris.c (swap_ext_reloc_in): ..
3547 * coff-arm.c (find_thumb_glue, find_arm_glue,
3548 coff_arm_relocate_section, bfd_arm_process_before_allocation,
3549 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
3550 coff_arm_copy_private_bfd_data): ..
3551 * coff-i860.c (i860_reloc_processing): ..
3552 * coff-mcore.c (mcore_coff_unsupported_reloc,
3553 coff_mcore_relocate_section): ..
3554 * coff-ppc.c (coff_ppc_relocate_section): ..
3555 * coff-rs6000.c (xcoff_create_csect_from_smclas
3556 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
3557 sh_swap_insns, sh_relocate_section): ..
3558 * coff-tic54x.c (tic54x_reloc_processing): ..
3559 * coff-tic80.c (coff_tic80_relocate_section): ..
3560 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
3561 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
3562 coff_slurp_symbol_table, coff_classify_symbol,
3563 coff_slurp_reloc_table): ..
3564 * coffgen.c (_bfd_coff_read_string_table): ..
3565 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
3566 _bfd_coff_generic_relocate_section): ..
3567 * cpu-arm.c (bfd_arm_merge_machines): ..
3568 * cpu-sh.c (sh_merge_bfd_arch): ..
3569 * elf-hppa.h (elf_hppa_relocate_section): ..
3570 * elf.c (bfd_elf_string_from_elf_section, setup_group,
3571 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
3572 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
3573 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
3574 * elf32-arm.h (find_thumb_glue, find_arm_glue,
3575 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
3576 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
3577 elf32_arm_relocate_section, elf32_arm_set_private_flags,
3578 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
3579 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
3580 cris_elf_merge_private_bfd_data
3581 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
3582 * elf32-gen.c (elf32_generic_link_add_symbols): ..
3583 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
3584 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
3585 elf32_hppa_relocate_section): ..
3586 * elf32-i370.c (i370_elf_merge_private_bfd_data,
3587 i370_elf_check_relocs, i370_elf_relocate_section): ..
3588 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
3589 elf_i386_relocate_section): ..
3590 * elf32-m32r.c (m32r_elf_relocate_section,
3591 m32r_elf_merge_private_bfd_data): ..
3592 * elf32-m68hc1x.c (m68hc12_add_stub,
3593 _bfd_m68hc11_elf_merge_private_bfd_data): ..
3594 * elf32-m68k.c (elf_m68k_relocate_section): ..
3595 * elf32-mcore.c (mcore_elf_unsupported_reloc,
3596 mcore_elf_relocate_section): ..
3597 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
3598 ppc_elf_check_relocs, ppc_elf_relocate_section,
3599 ppc_elf_begin_write_processing): ..
3600 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3601 elf_s390_relocate_section): ..
3602 * elf32-sh-symbian.c (sh_symbian_import_as,
3603 sh_symbian_process_embedded_commands,
3604 sh_symbian_relocate_section): ..
3605 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
3606 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
3607 sh_elf_merge_private_data): ..
3608 * elf32-sparc.c (elf32_sparc_check_relocs,
3609 elf32_sparc_relocate_section,
3610 elf32_sparc_merge_private_bfd_data): ..
3611 * elf32-v850.c (v850_elf_check_relocs,
3612 v850_elf_merge_private_bfd_data): ..
3613 * elf32-xtensa.c (elf_xtensa_check_relocs,
3614 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
3615 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
3616 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
3617 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
3618 * elf64-gen.c (elf64_generic_link_add_symbols): ..
3619 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
3620 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
3621 ppc64_elf_relocate_section): ..
3622 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3623 elf_s390_relocate_section): ..
3624 * elf64-sh64.c (sh_elf64_relocate_section): ..
3625 * elf64-sparc.c (sparc64_elf_check_relocs,
3626 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
3627 sparc64_elf_merge_private_bfd_data): ..
3628 * elf64-x86-64.c (elf64_x86_64_check_relocs,
3629 elf64_x86_64_relocate_section): ..
3630 * elflink.c (_bfd_elf_add_default_symbol,
3631 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
3632 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
3633 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
3634 elf_get_linked_section_vma, elf_fixup_link_order,
3635 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
3636 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
3637 * elfxx-ia64.c (elfNN_ia64_relax_section,
3638 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
3639 * elfxx-mips.c (mips_elf_perform_relocation,
3640 _bfd_mips_elf_check_relocs,
3641 _bfd_mips_elf_merge_private_bfd_data): ..
3642 * ieee.c (ieee_slurp_external_symbols): ..
3643 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
3644 * libbfd.c (_bfd_generic_verify_endian_match): ..
3645 * linker.c (_bfd_generic_link_add_one_symbol,
3646 _bfd_generic_section_already_linked): ..
3647 * pdp11.c (translate_to_native_sym_flags): ..
3648 * pe-mips.c (coff_pe_mips_relocate_section): ..
3649 * peicode.h (pe_ILF_build_a_bfd): ..
3650 * srec.c (srec_bad_byte): ..
3651 * stabs.c (_bfd_link_section_stabs): ..
3652 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
3653 Replace all uses of bfd_archive_filename and bfd_get_section_ident
3654 with corresponding %B and %A in _bfd_error_handler format string.
3655 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
3656 calls to use %A and %B. Fix "against symbol .. from section" and
3657 similar error messages. Combine multiple _bfd_error_handler calls
3658 where they were separated due to bfd_archive_filename deficiencies.
3659 * bfd-in2.h: Regenerate.
3660
3661 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
3662
3663 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
3664 relocation.
3665
3666 2004-08-10 Alan Modra <amodra@bigpond.net.au>
3667
3668 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
3669 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
3670 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
3671 Add twiddled_syms.
3672 (link_hash_newfunc): Init was_undefined.
3673 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
3674 Use undefweak instead.
3675 (ppc64_elf_check_directives): Fix undefs chain.
3676 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
3677 references.
3678 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
3679 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
3680 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
3681
3682 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3683
3684 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
3685 error, test input_section flags rather than sec.
3686
3687 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3688
3689 * elf-bfd.h (struct elf_backend_data): Add
3690 elf_backend_archive_symbol_lookup.
3691 (_bfd_elf_archive_symbol_lookup): Declare.
3692 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
3693 (elf_link_add_archive_symbols): ..extracted from here. Call the
3694 backend version.
3695 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
3696 (elfNN_bed): Init new field.
3697 * elf64-ppc.c (elf_backend_check_directives): Define.
3698 (elf_backend_archive_symbol_lookup): Define.
3699 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
3700 a ppc_link_hash_entry pointer.
3701 (get_fdh): Move.
3702 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
3703 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
3704 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
3705 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
3706 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
3707 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3708 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
3709 descriptor symbols.
3710
3711 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3712
3713 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
3714 (ppc64_elf_add_symbol_hook): Test for NULL section.
3715 (get_sym_h): Formatting.
3716 (ppc64_elf_size_stubs): Include reloc addend in value stored as
3717 stub target_value.
3718
3719 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
3720 long branch stubs with code handling plt and r2off branch stubs.
3721
3722 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3723
3724 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
3725 * elflink.c (elf_link_input_bfd): Formatting.
3726 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
3727 all callers.
3728 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
3729 (link_hash_newfunc): Don't set it.
3730 (ppc64_elf_copy_indirect_symbol): Nor copy it.
3731 (ppc64_elf_mark_entry_syms): Delete.
3732 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
3733 sections. Use get_opd_info.
3734 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
3735
3736 2004-08-09 Alan Modra <amodra@bigpond.net.au>
3737
3738 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
3739
3740 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
3741 (func_desc_adjust): Don't set have_undefweak.
3742 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
3743 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
3744
3745 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
3746 "struct ppc_link_hash_entry *". Adjust all references.
3747 (ppc64_elf_hide_symbol): Correct a comment.
3748
3749 * elf64-ppc.c (get_opd_info): New function.
3750 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
3751 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
3752 before calling get_fdh. Test fdh rather than h before dereferencing
3753 fdh. Mark removed symbols in opd_adjust.
3754 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
3755 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
3756 opd symbols.
3757 (ppc64_elf_output_symbol_hook): Likewise.
3758
3759 2004-08-06 Paul Brook <paul@codesourcery.com>
3760
3761 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
3762 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
3763 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
3764 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
3765 and BFD_RELOC_ARM_SBREL32.
3766 * bfd-in2.h, bbfd.h: Regenerate.
3767
3768 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3769
3770 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
3771 the dynamic link symbol actually in use.
3772
3773 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
3774
3775 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
3776
3777 2004-07-31 Joel Brobecker <brobecker@gnat.com>
3778 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3779
3780 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
3781 SHN_MIPS_TEXT and SHN_MIPS_DATA.
3782
3783 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
3784 Nick Clifton <nickc@redhat.com>
3785
3786 PR 290
3787 * bfd.c (_bfd_default_error_handler): Make it global.
3788
3789 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
3790
3791 * elf.c (assign_section_numbers): Cope gracefully with sections
3792 which have SHF_LINK_ORDER set but no sh_link set up.
3793 * elflink.c (elf_get_linked_section_vma): Likewise.
3794
3795 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
3796 it to NULL.
3797
3798 * elfxx-target.h (elf_backend_link_order_error_handler): New.
3799 Set it to _bfd_default_error_handler.
3800 (elfNN_bed): Add elf_backend_link_order_error_handler.
3801
3802 * libbfd-in.h (_bfd_default_error_handler): New.
3803
3804 * libbfd.h: Regenerated.
3805
3806 2004-07-30 Jakub Jelinek <jakub@redhat.com>
3807
3808 * archures.c (bfd_mach_sparc_64bit_p): Define.
3809 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
3810 * bfd-in2.h: Rebuilt.
3811
3812 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
3813
3814 Introduce SH2a support.
3815 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
3816 * archures.c (bfd_mach_sh2a_nofpu): New.
3817 * bfd-in2.h: Rebuilt.
3818 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
3819 (arch_info_struct): Add sh2a_nofpu.
3820 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
3821 2003-12-29 DJ Delorie <dj@redhat.com>
3822 * reloc.c: Add relocs for sh2a.
3823 * bfd-in2.h: Regenerate.
3824 * libbfd.hh: Regenerate.
3825 2003-12-01 Michael Snyder <msnyder@redhat.com>
3826 * archures.c (bfd_mach_sh2a): New.
3827 * bfd-in2.h: Rebuilt.
3828 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
3829 (SH2A_NEXT): New.
3830 (arch_info_struct): Add sh2a.
3831 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
3832
3833 2004-07-28 Nick Clifton <nickc@redhat.com>
3834 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3835
3836 PR 273
3837 * som.c (setup_sections): Improve estimation of space sizes in
3838 relocatable objects.
3839
3840 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
3841 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
3842 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
3843 to targ_selvecs.
3844 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
3845 * configure: Regenerate.
3846 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
3847 case that accepts OSABI=NetBSD and OSABI=SysV.
3848 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
3849 the base of .got or .data (if .got does not exist).
3850 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
3851 set OSABI=NetBSD.
3852 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
3853 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
3854 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
3855 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
3856
3857 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
3858
3859 PR 161/251
3860 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
3861 (elf_sec_group): Defined.
3862 (bfd_elf_match_symbols_in_sections): New prototype.
3863 (_bfd_elf_setup_group_pointers): Likewise.
3864
3865 * elf.c (bfd_elf_discard_group): Abort.
3866 (bfd_elf_set_group_contents): Also include relocation sections.
3867 Remove zero-fill for ld -r.
3868 (_bfd_elf_setup_group_pointers): New function.
3869 (elf_sort_elf_symbol): Likewise.
3870 (elf_sym_name_compare): Likewise.
3871 (bfd_elf_match_symbols_in_sections): Likewise.
3872
3873 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
3874
3875 * elflink.c (match_group_member): New.
3876 (elf_link_input_bfd): Check group member for discarded section.
3877 (try_match_symbols_in_sections): New function.
3878 (already_linked): Likewise.
3879 (_bfd_elf_section_already_linked): Support mixing comdat group
3880 and linkonce section.
3881
3882 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
3883 * linker.c (bfd_section_already_linked_table_traverse): New.
3884
3885 * libbfd.h: Regenerated.
3886
3887 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
3888
3889 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
3890 BFD_RELOC_CRX_SWITCH32.
3891 * bfd-in2.h: Regenerate.
3892 * libbfd.h: Regenerate.
3893 * elf32-crx.c: Support relocation/relaxation of
3894 BFD_RELOC_CRX_SWITCH* types.
3895
3896 2004-07-27 Alan Modra <amodra@bigpond.net.au>
3897
3898 * elf64-ppc.c: Correct "Linker stubs" comment.
3899
3900 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
3901
3902 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
3903 linked-to section.
3904 (elf_linked_to_section): New.
3905
3906 * elf.c (assign_section_numbers): Set up sh_link for
3907 SHF_LINK_ORDER.
3908
3909 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
3910 to sh_link for SHT_IA_64_UNWIND sections.
3911
3912 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
3913
3914 * elflink.c (elf_fixup_link_order): Add _() to error message.
3915
3916 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
3917
3918 * elflink.c (elf_fixup_link_order): Issue a warning and flag
3919 an error if failed.
3920
3921 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
3922
3923 * aout-adobe.c (aout_32_section_already_linked): Defined.
3924 * aout-target.h (MY_section_already_linked): Likewise.
3925 * aout-tic30.c (MY_section_already_linked): Likewise.
3926 * binary.c (binary_section_already_linked): Likewise.
3927 * bout.c (b_out_section_already_linked): Likewise.
3928 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
3929 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
3930 * coffcode.h (coff_section_already_linked): Likewise.
3931 * i386msdos.c (msdos_section_already_linked): Likewise.
3932 * i386os9k.c (os9k_section_already_linked): Likewise.
3933 * ieee.c (ieee_section_already_linked): Likewise.
3934 * ihex.c (ihex_section_already_linked): Likewise.
3935 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
3936 * mmo.c (mmo_section_already_linked): Likewise.
3937 * nlm-target.h (nlm_section_already_linked): Likewise.
3938 * oasys.c (oasys_section_already_linked): Likewise.
3939 * pef.c (bfd_pef_section_already_linked): Likewise.
3940 * ppcboot.c (ppcboot_section_already_linked): Likewise.
3941 * som.c (som_bfd_discard_group): Likewise.
3942 * srec.c (srec_section_already_linked): Likewise.
3943 * tekhex.c (tekhex_section_already_linked): Likewise.
3944 * versados.c (versados_section_already_linked): Likewise.
3945 * vms.c (vms_section_already_linked): Likewise.
3946 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
3947 * xsym.c (bfd_sym_section_already_linked): Likewise.
3948
3949 * bfd-in.h (bfd_section_already_linked_table_init): New.
3950 (bfd_section_already_linked_table_free): Likewise.
3951
3952 * coff-rs6000.c (rs6000coff_vec): Add
3953 _bfd_generic_section_already_linked.
3954 (pmac_xcoff_vec): Likewise.
3955 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3956 (aix5coff64_vec): Likewise.
3957
3958 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
3959 * elflink.c (_bfd_elf_section_already_linked): New function.
3960
3961 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
3962
3963 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
3964 (_bfd_generic_section_already_linked): New.
3965 (bfd_section_already_linked_hash_entry): Likewise.
3966 (bfd_section_already_linked): Likewise.
3967 (bfd_section_already_linked_table_lookup): Likewise.
3968 (bfd_section_already_linked_table_insert): Likewise.
3969
3970 * linker.c (bfd_section_already_linked): New.
3971 (_bfd_section_already_linked_table): Likewise.
3972 (bfd_section_already_linked_table_lookup): Likewise.
3973 (bfd_section_already_linked_table_insert): Likewise.
3974 (already_linked_newfunc): Likewise.
3975 (bfd_section_already_linked_table_init): Likewise.
3976 (bfd_section_already_linked_table_free): Likewise.
3977 (_bfd_generic_section_already_linked): Likewise.
3978
3979 * section.c (bfd_section): Remove comdat.
3980 (bfd_comdat_info): Moved to ...
3981 * bfd-in.h (coff_comdat_info): Here.
3982 (bfd_coff_get_comdat_section): New.
3983 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
3984 * libcoff-in.h (coff_section_tdata): Add comdat.
3985 * coffcode.h (handle_COMDAT): Updated.
3986 * cofflink.c (coff_link_add_symbols): Likewise.
3987 * ecoff.c (bfd_debug_section): Likewise.
3988
3989 * targets.c (bfd_target): Add _section_already_linked.
3990 (BFD_JUMP_TABLE_LINK): Updated.
3991
3992 * bfd-in2.h: Regenerated.
3993 * libbfd.h: Likewise.
3994 * libcoff.h: Likewise.
3995
3996 2003-07-21 Paul Brook <paul@codesourcery.com>
3997
3998 * elflink.c (elf_get_linked_section_vma, compare_link_order,
3999 elf_fixup_link_order): New functions.
4000 (bfd_elf_final_link): Call elf_fixup_link_order.
4001
4002 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
4003
4004 * elf-bfd.h (ELF_COMMON_DEF_P): New.
4005 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4006 common definitions.
4007 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4008 _bfd_elf_symbol_refs_local_p.
4009 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4010 symbols.
4011
4012 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
4013
4014 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
4015 DYN_NO_NEEDED.
4016 (bfd_elf_get_dyn_lib_class): New prototype.
4017 * elf.c (bfd_elf_get_dyn_lib_class): New function.
4018
4019 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
4020 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
4021 entry is needed. Issue an error if a DT_NEEDED entry is needed
4022 for a file marked DYN_NO_NEEDED.
4023 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
4024 for DT_NEEDED tags.
4025
4026 * bfd-in2.h: Regenerated.
4027
4028 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4029
4030 * elflink.c (elf_section_complain_discarded): Don't complain in
4031 .PARISC.unwind.
4032
4033 2004-07-10 James E Wilson <wilson@specifixinc.com>
4034
4035 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
4036 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
4037 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
4038 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
4039 Fix callers.
4040 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
4041 bfd_put_64 to bfd_putl64.
4042 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
4043
4044 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
4045
4046 PR 240
4047 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
4048 .init/.fini sections when trying to relax it.
4049
4050 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
4051
4052 * elf.c (assign_file_positions_for_segments): Make sure the
4053 .dynamic section is the first section in the PT_DYNAMIC segment.
4054
4055 2004-07-09 Nick Clifton <nickc@redhat.com>
4056
4057 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
4058 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
4059 sh_elf_get_flags_from_mach functions so that they do not conflict
4060 when this target is built with other sh-elf targets.
4061 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
4062 suppression of this function.
4063 (sh_elf_find_flags): Likewise.
4064
4065 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
4066
4067 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
4068 (ALL_MACHINES_CFILES): Add cpu-crx.c.
4069 (BFD32_BACKENDS): Add elf32-crx.lo.
4070 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
4071 (cpu-crx.lo): New target.
4072 (elf32-crx.lo): New target.
4073 * Makefile.in: Regenerate.
4074 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
4075 (bfd_archures_list): Add bfd_crx_arch.
4076 * bfd-in2.h: Regenerate.
4077 * config.bfd: Handle crx-*-elf*, crx*.
4078 * configure.in: Handle bfd_elf32_crx_vec.
4079 * configure: Regenerate.
4080 * cpu-crx.c: New file.
4081 * elf32-crx.c: Likewise.
4082 * libbfd.h: Regenerate.
4083 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
4084 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
4085 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
4086 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
4087 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
4088 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
4089 * targets.c (bfd_elf32_crx_vec): Declare.
4090 (bfd_target_vector): Add bfd_elf32_crx_vec.
4091
4092 2004-07-06 Nick Clifton <nickc@redhat.com>
4093
4094 * config.bfd: Add sh-symbian-elf target.
4095 * configure.in: Add bfd_elf32_shl_symbian_vec.
4096 * configure: Regenerate.
4097 * elf-bfd.h (struct elf_backend_data): Add new field
4098 'check_directives'.
4099 * elflink.c (elf_link_add_object_symbols): Invoke the
4100 check_directives function, if defined.
4101 * elfxx-target.h: Provide a default, NULL definition for
4102 check_directives.
4103 * targets.c: Add bfd_elf32_shl_symbian_vec.
4104 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
4105 definition.
4106 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
4107 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
4108 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
4109 not already been defined.
4110 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
4111 * sh-symbian.c: New file. Provide functions to support the
4112 * sh-symbian-elf target.
4113 * Makefile.am: Add elf32-sh-symbian.c
4114 * Makefile.in: Regenerate.
4115
4116 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
4117
4118 * elf32-sh.c: Include ../opcodes/sh-opc.h.
4119 * Makefile.am: Ran make dep-am.
4120 * Makefile.in: Ran make dep-in.
4121
4122 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4123
4124 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
4125 externals properly.
4126
4127 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4128
4129 * config.bfd: Add want64 to configuration target s390-*-linux*.
4130
4131 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
4132
4133 * bfd.c (bfd_get_section_ident): New.
4134
4135 * elflink.c (elf_link_read_relocs_from_section): Call
4136 bfd_get_section_ident to identify the section when reporting
4137 error.
4138 (_bfd_elf_link_output_relocs): Likewise.
4139 (elf_link_output_extsym): Likewise.
4140 (elf_link_input_bfd): Likewise.
4141 (bfd_elf_gc_record_vtinherit): Likewise.
4142
4143 * bfd-in2.h: Regenerated.
4144
4145 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
4146 Nick Clifton <nickc@redhat.com>
4147
4148 PR 204
4149 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
4150 of section symbols to mips_elf_sort_hash_table ().
4151
4152 2004-07-01 Alan Modra <amodra@bigpond.net.au>
4153
4154 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
4155 change. Comment.
4156 (elf_section_complain_discarded): New function. Handle
4157 .gcc_except_table too.
4158 (elf_link_input_bfd): Rewrite handling of relocs against symbols
4159 in discarded sections.
4160 * elf-bfd.h (elf_discarded_section): Protect macro arg.
4161
4162 2004-06-30 James E Wilson <wilson@specifixinc.com>
4163
4164 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
4165 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
4166
4167 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
4168
4169 PR 233
4170 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
4171 local references to discarded sections and report their
4172 locations.
4173
4174 2004-06-30 Alan Modra <amodra@bigpond.net.au>
4175
4176 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
4177 sec_info_type, test section name instead.
4178
4179 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
4180
4181 PR 240
4182 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
4183 in .init/.fini sections.
4184
4185 2004-06-29 Bob Wilson <bob.wilson@acm.org>
4186
4187 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
4188 bfd_get_section_limit.
4189
4190 2004-06-29 Bob Wilson <bob.wilson@acm.org>
4191
4192 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
4193 output section size.
4194
4195 2004-06-29 Alan Modra <amodra@bigpond.net.au>
4196
4197 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
4198 rawsize.
4199 (mmix_elf_perform_relocation): Adjust for above change.
4200 (mmix_elf_relocate_section): Likewise.
4201 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
4202 (mmix_elf_get_section_contents): Delete.
4203 (bfd_elf64_get_section_contents): Delete.
4204 (mmix_elf_relocate_section): Zero stub area.
4205 * linker.c (default_indirect_link_order): Alloc max of section size
4206 and rawsize.
4207 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
4208 * section.c (bfd_malloc_and_get_section): Likewise.
4209 (struct bfd_section): Update rawsize comment.
4210 * bfd-in2.h: Regenerate.
4211
4212 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
4213
4214 2004-06-29 Alan Modra <amodra@bigpond.net.au>
4215
4216 * bfd-in.h (bfd_get_section_limit): Define.
4217 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
4218 (_bfd_final_link_relocate): Use bfd_get_section_limit.
4219 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
4220 * coff-arm.c (coff_arm_relocate_section): Likewise.
4221 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
4222 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
4223 (bfd_ns32k_final_link_relocate): Likewise.
4224 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
4225 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
4226 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
4227 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
4228 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
4229 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
4230 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
4231 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4232 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
4233 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
4234 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
4235 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
4236 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
4237 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
4238 * elf32-v850.c (v850_elf_reloc): Likewise.
4239 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
4240 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
4241 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
4242 * elf64-mips.c (mips_elf64_gprel32_reloc)
4243 (mips16_gprel_reloc): Likewise.
4244 * elf64-mmix.c (mmix_elf_reloc): Likewise.
4245 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
4246 * elf64-sparc.c (init_insn_reloc): Likewise.
4247 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4248 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
4249 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
4250 (_bfd_mips_elf_generic_reloc): Likewise.
4251 * bfd-in2.h: Regenerate.
4252
4253 2004-06-28 Alan Modra <amodra@bigpond.net.au>
4254
4255 * bfd-in.h (struct stab_info): Move from stabs.c.
4256 * stabs.c (struct stab_link_includes_table): Delete.
4257 (stab_link_includes_lookup): Delete.
4258 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
4259 level of indirection from sinfo parm.
4260 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
4261 stabstr section. Adjust hash table accesses.
4262 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
4263 alloc. Adjust stab_info test.
4264 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
4265 (_bfd_coff_final_link): Adjust stab_info test.
4266 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
4267 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
4268 in place.
4269 * libcoff-in.h (struct coff_link_hash_table): Likewise.
4270 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
4271 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
4272 stabstr section. Adjust stab_info test.
4273 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
4274 (_bfd_write_stab_strings): Adjust prototypes.
4275 * libbfd.h: Regenerate.
4276 * libcoff.h: Regenerate.
4277 * bfd-in2.h: Regenerate.
4278
4279 2004-06-27 Mark Kettenis <kettenis@gnu.org>
4280
4281 From Miod Vallat <miod@online.fr>:
4282 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
4283
4284 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
4285
4286 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
4287 (struct elf32_mn10300_link_hash_entry): Remove
4288 pcrel_relocs_copied.
4289 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
4290 R_MN10300_32. Don't adjust pcrel_relocs_copied.
4291 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
4292 and gotoff relocations if the symbol doesn't bind locally. Use
4293 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
4294 relocation for PCREL32.
4295 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
4296 to test whether a symbol binds locally.
4297 (elf32_mn10300_link_hash_newfunc): Don't initialize
4298 pcrel_relocs_copied.
4299 (_bfd_mn10300_elf_discard_copies): Delete.
4300 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
4301
4302 2004-06-26 Mark Kettenis <kettenis@gnu.org>
4303
4304 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
4305
4306 2004-06-25 Joel Brobecker <brobecker@gnat.com>
4307
4308 * som.c (som_set_reloc_info): Correct small typo.
4309
4310 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4311
4312 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
4313 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
4314 (m32r_elf_gcsweep_hook): Likewise.
4315 (m32r_elf_check_relocs): Likewise.
4316 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
4317 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
4318 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
4319 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
4320 * bfd-in2.h: Regenerated.
4321 * libbfd.h: Regenerated.
4322
4323 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
4324
4325 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
4326 relocation symbol.
4327 (elf64_x86_64_relocate_section): Issue an error for
4328 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
4329 against global symbols when building shared library.
4330
4331 2004-06-24 Alan Modra <amodra@bigpond.net.au>
4332
4333 * section.c (struct sec): Rename "_cooked_size" to "size".
4334 Rename "_raw_size" to "rawsize".
4335 (STD_SECTION): Adjust comments.
4336 (bfd_set_section_size, bfd_get_section_contents): Use size.
4337 (bfd_malloc_and_get_section): New function.
4338 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
4339 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
4340 Correctly free reloc and contents memory.
4341 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
4342 and fake CIE now that we can shink section size to zero.
4343 (_bfd_elf_write_section_eh_frame): Likewise..
4344 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
4345 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
4346 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
4347 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
4348 unneeded indirection.
4349 * elf.c (_bfd_elf_section_offset): .. and update call.
4350 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
4351 * libbfd.h: Regenerate.
4352 * bfd-in2.h: Regenerate.
4353
4354 Replace occurrences of "_raw_size" and "_cooked_size" in most places
4355 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
4356 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
4357 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
4358 Similarly use "rawsize", if non-zero, in reloc functions to validate
4359 reloc addresses. Use new bfd_malloc_and_get_section in most places
4360 where bfd_get_section_contents was called. Expand all occurrences of
4361 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
4362 grok_prstatus and similar functions to "size".
4363 * aix386-core.c (aix386_core_file_p): ..
4364 * aix5ppc-core.c (xcoff64_core_p): ..
4365 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
4366 aout_adobe_set_section_contents): ..
4367 * aout-target.h (callback): ..
4368 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
4369 MY_bfd_final_link): ..
4370 * aoutf1.h (sunos4_core_file_p): ..
4371 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4372 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
4373 final_link, aout_link_input_section): ..
4374 * binary.c (binary_object_p, binary_canonicalize_symtab,
4375 binary_set_section_contents): ..
4376 * bout.c (b_out_callback, b_out_write_object_contents,
4377 b_out_set_section_contents, b_out_bfd_relax_section,
4378 b_out_bfd_get_relocated_section_contents): ..
4379 * cisco-core.c (cisco_core_file_validate): ..
4380 * coff-alpha.c (alpha_ecoff_object_p,
4381 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
4382 * coff-arm.c (coff_arm_relocate_section,
4383 bfd_arm_allocate_interworking_sections): ..
4384 * coff-h8300.c (h8300_reloc16_extra_cases,
4385 h8300_bfd_link_add_symbols): ..
4386 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
4387 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
4388 ppc_bfd_coff_final_link): ..
4389 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
4390 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4391 sh_align_loads, sh_coff_get_relocated_section_contents): ..
4392 * coff64-rs6000.c (xcoff64_write_object_contents,
4393 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
4394 * coffcode.h (coff_compute_section_file_positions,
4395 coff_write_object_contents): ..
4396 * coffgen.c (make_a_section_from_file, coff_write_symbols,
4397 coff_section_symbol, build_debug_section): ..
4398 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
4399 process_embedded_commands, _bfd_coff_link_input_bfd,
4400 _bfd_coff_write_global_sym): ..
4401 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
4402 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
4403 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
4404 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4405 _bfd_dwarf2_find_nearest_line): ..
4406 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
4407 ecoff_compute_section_file_positions,
4408 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
4409 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
4410 _bfd_elf_discard_section_eh_frame_hdr,
4411 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
4412 _bfd_elf_write_section_eh_frame,
4413 _bfd_elf_write_section_eh_frame_hdr): ..
4414 * elf-hppa.h (elf_hppa_sort_unwind): ..
4415 * elf-m10200.c (mn10200_elf_relax_section,
4416 mn10200_elf_relax_delete_bytes,
4417 mn10200_elf_get_relocated_section_contents): ..
4418 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
4419 mn10300_elf_check_relocs, mn10300_elf_relax_section,
4420 mn10300_elf_relax_delete_bytes,
4421 mn10300_elf_get_relocated_section_contents,
4422 _bfd_mn10300_elf_adjust_dynamic_symbol,
4423 _bfd_mn10300_elf_discard_copies,
4424 _bfd_mn10300_elf_size_dynamic_sections,
4425 _bfd_mn10300_elf_finish_dynamic_sections): ..
4426 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
4427 _bfd_elf_make_section_from_phdr, elf_fake_sections,
4428 bfd_elf_set_group_contents, map_sections_to_segments,
4429 elf_sort_sections, assign_file_positions_for_segments,
4430 SECTION_SIZE, copy_private_bfd_data,
4431 _bfd_elf_get_dynamic_reloc_upper_bound,
4432 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
4433 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
4434 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
4435 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
4436 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
4437 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
4438 bfd_elf32_arm_process_before_allocation,
4439 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
4440 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
4441 elf32_arm_write_section): ..
4442 * elf32-cris.c (cris_elf_grok_prstatus,
4443 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
4444 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
4445 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
4446 elf_cris_discard_excess_dso_dynamics,
4447 elf_cris_discard_excess_program_dynamics): ..
4448 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
4449 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
4450 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
4451 _frv_create_got_section, _frvfdpic_assign_plt_entries,
4452 elf32_frvfdpic_size_dynamic_sections,
4453 elf32_frvfdpic_modify_segment_map,
4454 elf32_frvfdpic_finish_dynamic_sections): ..
4455 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
4456 elf32_h8_get_relocated_section_contents): ..
4457 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
4458 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
4459 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
4460 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
4461 elf32_hppa_finish_dynamic_sections): ..
4462 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
4463 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
4464 i370_elf_finish_dynamic_sections): ..
4465 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
4466 allocate_dynrelocs, elf_i386_size_dynamic_sections,
4467 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
4468 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
4469 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
4470 * elf32-ip2k.c (ip2k_is_switch_table_128,
4471 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
4472 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
4473 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
4474 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
4475 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
4476 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
4477 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
4478 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
4479 m32r_elf_get_relocated_section_contents): ..
4480 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
4481 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
4482 m68hc11_elf_relax_delete_bytes): ..
4483 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
4484 m68hc12_elf_size_one_stub): ..
4485 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
4486 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
4487 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
4488 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
4489 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
4490 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4491 elf32_mips_grok_prstatus): ..
4492 * elf32-or32.c (or32_elf_consth_reloc): ..
4493 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
4494 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
4495 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
4496 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
4497 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
4498 ppc_elf_final_write_processing): ..
4499 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4500 allocate_dynrelocs, elf_s390_size_dynamic_sections,
4501 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
4502 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
4503 sh_elf_relax_delete_bytes, sh_elf_align_loads,
4504 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
4505 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
4506 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
4507 * elf32-sh64-com.c (sh64_address_in_cranges,
4508 sh64_get_contents_type): ..
4509 * elf32-sh64.c (sh64_find_section_for_address,
4510 sh64_elf_final_write_processing): ..
4511 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
4512 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
4513 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
4514 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
4515 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
4516 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
4517 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
4518 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
4519 elf_vax_finish_dynamic_sections): ..
4520 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
4521 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
4522 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
4523 xstormy16_elf_finish_dynamic_sections): ..
4524 * elf32-xtensa.c (xtensa_read_table_entries,
4525 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
4526 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
4527 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
4528 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
4529 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
4530 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
4531 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
4532 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
4533 xtensa_callback_required_dependence): ..
4534 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
4535 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
4536 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
4537 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
4538 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
4539 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
4540 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
4541 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
4542 * elf64-hppa.c (allocate_dynrel_entries,
4543 elf64_hppa_size_dynamic_sections,
4544 elf64_hppa_finish_dynamic_sections): ..
4545 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
4546 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
4547 elf64_mips_grok_prstatus): ..
4548 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
4549 mmix_elf_relocate_section, mmix_elf_final_link,
4550 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
4551 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
4552 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
4553 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
4554 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
4555 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
4556 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
4557 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
4558 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
4559 ppc64_elf_finish_dynamic_sections): ..
4560 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4561 allocate_dynrelocs, elf_s390_size_dynamic_sections,
4562 elf_s390_finish_dynamic_sections): ..
4563 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
4564 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
4565 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
4566 sh64_elf64_finish_dynamic_sections): ..
4567 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
4568 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
4569 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
4570 sparc64_elf_finish_dynamic_symbol,
4571 sparc64_elf_finish_dynamic_sections): ..
4572 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
4573 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
4574 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
4575 elf64_x86_64_finish_dynamic_sections): ..
4576 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
4577 * elfcode.h (elf_slurp_reloc_table): ..
4578 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
4579 elf_finalize_dynstr, elf_link_add_object_symbols,
4580 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
4581 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
4582 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4583 elf32_mips_grok_prstatus): ..
4584 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
4585 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
4586 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
4587 elfNN_ia64_finish_dynamic_sections): ..
4588 * elfxx-mips.c (mips_elf_create_procedure_table,
4589 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
4590 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
4591 mips_elf_global_got_index, mips_elf_multi_got,
4592 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
4593 mips_elf_allocate_dynamic_relocations,
4594 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
4595 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
4596 _bfd_mips_elf_always_size_sections,
4597 _bfd_mips_elf_size_dynamic_sections,
4598 _bfd_mips_elf_finish_dynamic_symbol,
4599 _bfd_mips_elf_finish_dynamic_sections,
4600 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
4601 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
4602 _bfd_elf_mips_get_relocated_section_contents,
4603 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
4604 * hp300hpux.c (callback): ..
4605 * hppabsd-core.c (make_bfd_asection): ..
4606 * hpux-core.c (make_bfd_asection): ..
4607 * i386linux.c (linux_link_create_dynamic_sections,
4608 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
4609 * i386msdos.c (msdos_write_object_contents): ..
4610 * i386os9k.c (os9k_callback, os9k_write_object_contents,
4611 os9k_set_section_contents): ..
4612 * ieee.c (parse_expression, ieee_slurp_external_symbols,
4613 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
4614 ieee_write_section_part, do_with_relocs, do_as_repeat,
4615 do_without_relocs, ieee_write_debug_part, init_for_output,
4616 ieee_set_section_contents): ..
4617 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
4618 * irix-core.c (do_sections, make_bfd_asection): ..
4619 * libaout.h (aout_section_merge_with_text_p): ..
4620 * libbfd.c (_bfd_generic_get_section_contents,
4621 _bfd_generic_get_section_contents_in_window): ..
4622 * linker.c (default_indirect_link_order): ..
4623 * lynx-core.c (make_bfd_asection): ..
4624 * m68klinux.c (linux_link_create_dynamic_sections,
4625 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4626 * mach-o.c (bfd_mach_o_make_bfd_section,
4627 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
4628 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
4629 bfd_mach_o_scan_read_segment): ..
4630 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
4631 _bfd_merge_sections): ..
4632 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
4633 mmo_map_set_sizes, mmo_canonicalize_symtab,
4634 mmo_internal_write_section, mmo_write_object_contents): ..
4635 * netbsd-core.c (netbsd_core_file_p): ..
4636 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
4637 nlm_alpha_set_public_section): ..
4638 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
4639 * nlm32-sparc.c (nlm_sparc_write_import): ..
4640 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
4641 nlm_compute_section_file_positions): ..
4642 * oasys.c (oasys_object_p, oasys_slurp_section_data,
4643 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
4644 * opncls.c (get_debug_link_info): ..
4645 * osf-core.c (make_bfd_asection): ..
4646 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4647 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
4648 final_link, aout_link_input_section): ..
4649 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
4650 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
4651 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
4652 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
4653 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
4654 * ptrace-core.c (ptrace_unix_core_file_p): ..
4655 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
4656 _bfd_final_link_relocate, bfd_generic_relax_section,
4657 bfd_generic_get_relocated_section_contents): ..
4658 * reloc16.c (bfd_coff_reloc16_relax_section,
4659 bfd_coff_reloc16_get_relocated_section_c): ..
4660 * riscix.c (riscix_some_aout_object_p): ..
4661 * rs6000-core.c (read_hdr, make_bfd_asection): ..
4662 * sco5-core.c (make_bfd_asection): ..
4663 * simple.c (bfd_simple_get_relocated_section_contents): ..
4664 * som.c (som_object_setup, setup_sections, som_prep_headers,
4665 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
4666 som_set_reloc_info, som_get_section_contents,
4667 som_bfd_link_split_section): ..
4668 * sparclinux.c (linux_link_create_dynamic_sections,
4669 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4670 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
4671 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
4672 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
4673 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
4674 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
4675 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
4676 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
4677 sunos_finish_dynamic_link): ..
4678 * syms.c (_bfd_stab_section_find_nearest_line): ..
4679 * tekhex.c (first_phase, tekhex_set_section_contents,
4680 tekhex_write_object_contents): ..
4681 * trad-core.c (trad_unix_core_file_p): ..
4682 * versados.c (process_esd, process_otr, process_otr): ..
4683 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
4684 * vms-misc.c (add_new_contents): ..
4685 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
4686 * vms.c (vms_set_section_contents): ..
4687 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
4688 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
4689 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
4690 * xsym.c (bfd_sym_scan): .. See above.
4691
4692 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
4693
4694 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
4695 calling _bfd_merged_section_offset only for section symbols.
4696
4697 2004-06-22 Alan Modra <amodra@bigpond.net.au>
4698
4699 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
4700 for handling SEC_MERGE symbols in relax_section.
4701
4702 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
4703
4704 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
4705 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
4706 linked together. Mark the result as h8300sx code.
4707
4708 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
4709
4710 * elf-bfd.h (struct elf_backend_data): Added
4711 elf_backend_omit_section_dynsym.
4712 (_bfd_elf_link_omit_section_dynsym): Declare.
4713 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
4714 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
4715 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
4716 (_bfd_elf_link_renumber_dynsyms): ... this function.
4717 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
4718 _bfd_elf_link_omit_section_dynsym).
4719 (elfNN_bed): Added elf_backend_omit_section_dynsym.
4720
4721 2004-06-21 Nick Clifton <nickc@redhat.com>
4722
4723 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
4724 flags.
4725
4726 2004-06-17 Jerome Guitton <guitton@gnat.com>
4727
4728 * bfd-in.h (bfd_cache_close_all): New function declaration.
4729 * bfd-in2.h: Regenerate.
4730 * cache.c (bfd_cache_close_all): New function definition.
4731
4732 2004-06-16 Mark Kettenis <kettenis@gnu.org>
4733
4734 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
4735 4.10 and beyond.
4736 * configure: Regenerate.
4737
4738 2004-06-16 Daniel Jacobowitz <dan@debian.org>
4739
4740 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
4741 the pre-existing section.
4742
4743 2004-06-15 Alan Modra <amodra@bigpond.net.au>
4744
4745 * section.c (struct sec): Remove usused flags. Reorganize a little.
4746 (bfd_get_section_size_before_reloc): Delete.
4747 (bfd_get_section_size_after_reloc): Delete.
4748 (STD_SECTION): Update.
4749 (bfd_get_section_size_now): Delete.
4750 (bfd_set_section_contents): Don't referece reloc_done.
4751 (bfd_get_section_contents): Remove reloc_done comment.
4752 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
4753 reloc_done.
4754 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
4755 * ecoff.c (bfd_debug_section): Update initializer.
4756 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
4757 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
4758 * bfd-in.h (bfd_section_size): Expand.
4759 (bfd_get_section_size): New macro.
4760 * bfd-in2.h: Regenerate.
4761 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
4762 bfd_get_section_size_before_reloc with bfd_get_section_size.
4763 * coffcode.h (coff_write_object_contents): Likewise.
4764 * coffgen.c (build_debug_section): Likewise.
4765 * dwarf1.c (parse_line_table): Likewise.
4766 (_bfd_dwarf1_find_nearest_line): Likewise.
4767 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
4768 * i386msdos.c (msdos_write_object_contents): Likewise.
4769 * pdp11.c (squirt_out_relocs): Likewise.
4770 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
4771 * elf64-mmix.c (mmix_elf_final_link): Update comment.
4772
4773 2004-06-14 Chris Demetriou <cgd@broadcom.com>
4774
4775 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
4776 removal) with updated comment.
4777 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
4778 BFD_RELOC_32_PCREL.
4779 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
4780 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4781
4782 2004-06-12 Alan Modra <amodra@bigpond.net.au>
4783
4784 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
4785 overflow on branches to undefweaks.
4786
4787 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4788
4789 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
4790 as ecoff_section_data() does not return a valid lvalue.
4791
4792 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
4793
4794 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
4795 (elf_link_add_object_symbols): Likewise.
4796
4797 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
4798 (elf_backend_reloc_type_class): New.
4799
4800 2004-06-08 Mark Kettenis <kettenis@gnu.org>
4801
4802 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
4803 netbsd-core.lo.
4804 * configure: Regenerate.
4805
4806 2004-06-07 Daniel Jacobowitz <dan@debian.org>
4807
4808 From: Albert Chin-A-Young <china@thewrittenword.com>
4809 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
4810 to unsigned int.
4811
4812 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
4813
4814 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
4815 change.
4816
4817 2004-05-28 DJ Delorie <dj@redhat.com>
4818
4819 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
4820 for linking, but otherwise adjust reloc for merged sections.
4821
4822 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
4823
4824 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
4825 _bfd_merged_section_offset for local symbols.
4826
4827 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
4828
4829 * Makefile.am: Regenerate dependencies.
4830 * Makefile.in: Regenerate.
4831 * archures.c: Add bfd_mach_sh3_nommu .
4832 * bfd-in2.h: Regenerate.
4833 * cpu-sh.c: Add sh3-nommu architecture.
4834 (bfd_to_arch_table): Create new table.
4835 (sh_get_arch_from_bfd_mach): Create new function.
4836 (sh_get_arch_up_from_bfd_mach): Create new function.
4837 (sh_merge_bfd_arch): Create new function.
4838 * elf32-sh.c (sh_ef_bfd_table): Add table.
4839 (sh_elf_check_relocs): Replace switch statement with
4840 use of sh_ef_bfd_table .
4841 (sh_elf_get_flags_from_mach): Add new function.
4842 (sh_find_elf_flags): Likewise.
4843 (sh_elf_copy_private_data): Replace most of non-elf contents
4844 with a call to sh_merge_bfd_arch() .
4845
4846 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
4847
4848 * Makefile.am (bfdver.h): Use explicit filename, not $< .
4849 * Makefile.in: Regenerate.
4850
4851 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
4852
4853 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
4854 custom calling conventions for dynamic symbols.
4855 (mn10300_elf_relax_section): Avoid relaxing a function as a local
4856 symbol if it's an alias to a global one.
4857
4858 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
4859
4860 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
4861 change.
4862
4863 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
4864
4865 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
4866 loop over hashes.
4867
4868 2004-05-26 Alan Modra <amodra@bigpond.net.au>
4869
4870 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
4871 for SHT_GROUP sections.
4872
4873 2004-05-25 Alan Modra <amodra@bigpond.net.au>
4874
4875 * elflink.c (elf_link_add_object_symbols): Don't set up merge
4876 section data here..
4877 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
4878 * merge.c: Formatting. Remove unnecessary casts. Expand
4879 bfd_get_section_alignment macro.
4880 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
4881 use throughout file.
4882 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
4883 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
4884 section name to determine sinfo group, instead test output section
4885 and alignment.
4886 (_bfd_merge_sections): Add struct bfd_link_info param. Call
4887 _bfd_strip_section_from_output rather than just twiddling flags.
4888 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
4889 (_bfd_merge_sections): Update prototype.
4890 * libbfd.h: Regenerate.
4891
4892 2004-05-24 Mark Kettenis <kettenis@gnu.org>
4893
4894 * netbsd-core.c: Correctly indent section that sets architecture
4895 from machine ID.
4896
4897 From Miod Vallat <miod@online.fr>:
4898 * m88kopenbsd.c: New file.
4899 * targets.c (m88k_openbsd_vec): New.
4900 * config.bfd: Add m88k-*-openbsd*.
4901 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
4902 (m88kopenbsd_vec): New.
4903 * configure: Regenerate.
4904 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
4905 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
4906 Run "make dep-am".
4907 * Makefile.in: Regenerate.
4908 * po/SRC-POTFILES.in: Regenerate.
4909
4910 2004-05-24 Nick Clifton <nickc@redhat.com>
4911
4912 * hash.c: Remove bogus node "Changing the default Hash Table Size"
4913 introduced by hash table size patch.
4914
4915 2004-05-22 Ben Elliston <bje@au.ibm.com>
4916
4917 * configure.in (is_release): Remove.
4918 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
4919 (AC_OUTPUT): Don't output bfdver.h from version.h.
4920 * configure: Regenerate.
4921 * Makefile.am (RELEASE): New variable.
4922 (bfdver.h): New target.
4923 * Makefile.in: Regenerate.
4924 * doc/Makefile.in: Likewise.
4925
4926 2004-05-22 Ben Elliston <bje@au.ibm.com>
4927
4928 * Makefile.am (config.status): Don't depend on version.h.
4929 * Makefile.in: Regenerate.
4930
4931 2004-05-22 Alan Modra <amodra@bigpond.net.au>
4932
4933 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
4934 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
4935 * libbfd.h: Regenerate.
4936 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
4937 (_bfd_elf_rel_local_sym): Likewise.
4938 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
4939 (elf_link_input_bfd): Likewise.
4940 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
4941 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4942 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4943 (elfNN_ia64_relocate_section): Likewise.
4944
4945 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
4946
4947 * hash.c (bfd_default_hash_table_size): New variable.
4948 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
4949 (bfd_hash_set_default_size): New function. Set the default size
4950 to a selected prime number close to the argument. Document new
4951 function.
4952 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
4953 * bfd-in2.h: Regenerate.
4954 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
4955 * Makefile.in: Regenerate.
4956
4957 2004-05-21 Mark Kettenis <kettenis@gnu.org>
4958
4959 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
4960 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
4961 arm, m68k, m88k and hppa core files.
4962
4963 2004-05-21 Nick Clifton <nickc@redhat.com>
4964
4965 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
4966 (bfd_bwrite): Likewise.
4967 (bfd_tell): Likewise.
4968 (bfd_flush): Likewise.
4969 (bfd_stat): Likewise.
4970 (bfd_seek): Likewise.
4971 (bfd_get_mtime): Likewise.
4972 (bfd_get_size): Likewise.
4973
4974 2004-05-19 Ben Elliston <bje@au.ibm.com>
4975
4976 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
4977
4978 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
4979
4980 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
4981 (bfd_generic_openr_next_archived_file): Likewise.
4982
4983 2004-05-17 Bob Wilson <bob.wilson@acm.org>
4984
4985 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
4986 section names by inserting a new substring after .gnu.linkonce, except
4987 for .gnu.linkonce.t.* where the "t." is replaced.
4988
4989 2004-05-17 Adam Nemet <anemet@lnxw.com>
4990
4991 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
4992 (m68-*-lynxos* case): Likewise.
4993 (powerpc-*-lyxnos* case): New case.
4994 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
4995
4996 2004-05-17 David Heine <dlheine@tensilica.com>
4997
4998 * aout-target.h (MY_bfd_copy_private_header_data): Define.
4999 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5000 * bfd.c (bfd_copy_private_header_data): Define.
5001 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5002 interface.
5003 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5004 * coffcode.h (coff_bfd_copy_private_header_data): Define.
5005 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5006 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5007 segments by calling copy_private_bfd_data.
5008 (_bfd_elf_copy_private_header_data): Define.
5009 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5010 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5011 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5012 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
5013 * mmo.c (mmo_bfd_copy_private_header_data): Define.
5014 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
5015 * som.c (som_bfd_copy_private_header_data): Define.
5016 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
5017 * vms.c (vms_bfd_copy_private_header_data): Define.
5018 * bfd-in2.h: Regenerate.
5019 * libbfd.h: Regenerate.
5020
5021 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5022
5023 * elfxx-mips.c (MINUS_TWO): Define.
5024 (mips_elf_higher, mips_elf_highest,
5025 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
5026 some bfd_vma values.
5027 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
5028
5029 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5030
5031 * som.c (log2): Rename to exact_log2. Adjust all callers.
5032
5033 2004-05-13 Paul Brook <paul@codesourcery.com>
5034
5035 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
5036 dwarf3 format CIE entries. Remove comment about the size of the
5037 ra_column field. It is now correctly deduced.
5038
5039 2004-05-13 Joel Sherrill <joel@oarcorp.com>
5040
5041 * config.bfd (or32-*-rtems*): Switch to elf.
5042
5043 2004-05-13 Nick Clifton <nickc@redhat.com>
5044
5045 * po/fr.po: Updated French translation.
5046
5047 2004-05-11 Jakub Jelinek <jakub@redhat.com>
5048
5049 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
5050 into .dynsym if elf_section_data (sec)->dynindx <= 0.
5051 Adjust counting of last_local.
5052 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
5053 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
5054 created by the linker nor !SHF_ALLOC.
5055
5056 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
5057 DT_PLTGOT to the start of the .got.plt section instead of the
5058 .got output section. Set sh_entsize for .got section in addition
5059 to .got.plt.
5060 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5061 is at sgot->output_section->vma.
5062 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
5063 DT_PLTGOT to the start of the .got.plt section instead of the
5064 .got output section.
5065 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5066 is at sgot->output_section->vma. Set sh_entsize for .got section
5067 in addition to .got.plt.
5068 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
5069 (bfd_section_from_phdr): Likewise.
5070 (map_sections_to_segments): Likewise.
5071 (assign_file_positions_for_segments): Likewise.
5072 (get_program_header_size): Likewise.
5073 * elflink.c (bfd_elf_size_dynamic_sections): Set
5074 elf_tdata (output_bfd)->relro from info->relro.
5075 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
5076
5077 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
5078
5079 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
5080 a zero symndx for which we hadn't accounted a dynamic relocation.
5081 (_frvfdpic_add_rofixup): Likewise.
5082
5083 2004-05-07 Brian Ford <ford@vss.fsi.com>
5084 DJ Delorie <dj@redhat.com>
5085
5086 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
5087 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
5088 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
5089 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
5090
5091 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
5092
5093 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
5094 immediately if there's no link info.
5095 (elf32_frvfdpic_copy_private_bfd_data): New.
5096 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
5097
5098 2004-05-06 Zack Weinberg <zack@codesourcery.com>
5099
5100 * dwarf2.c (add_line_info): Also set info->filename to NULL if
5101 filename argument is null; do not call strlen on a null pointer.
5102
5103 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
5104
5105 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
5106 special case.
5107
5108 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
5109
5110 * configure.in (bfd_elf32_frvfdpic_vec): New.
5111 * configure: Rebuilt.
5112 * targets.c (bfd_elf32_frvfdpic_vec): New.
5113 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
5114 on the latter.
5115 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
5116 frvfdpic instead of frv. Rearrange elf-target macros such that
5117 the FDPIC-specific ones are only defined for this new target
5118 vector.
5119 (bfd_elf32_frvfdpic_vec): Declare.
5120 (IS_FDPIC): New.
5121 (elf32_frv_relocate_section): Use it to enable segment checking
5122 and to control rofixup emission. Add output section vma to
5123 applied relocation in non-LOAD non-ALLOC sections. Use
5124 _bfd_error_handler for errors.
5125 (_frv_create_got_section): Create .rel.got and .rofixup only in
5126 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
5127 linker script.
5128 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
5129 (elf32_frvfdpic_modify_segment_map): Likewise.
5130 (elf32_frv_finish_dynamic_sections): New, do-nothing.
5131 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
5132 error message if we miscompute the rofixup size.
5133 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
5134 (frvfdpic_elf_encode_eh_address): Likewise.
5135 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
5136 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
5137 relocs. Reject unknown relocation types.
5138 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
5139 (frv_elf_merge_private_bfd_data): Likewise.
5140 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
5141 0x4000 for newly-added elf32-frvfdpic.
5142
5143 2004-05-05 Nick Clifton <nickc@redhat.com>
5144
5145 PR/136
5146 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
5147 returning NULL as most users of this function do not check its
5148 return value.
5149 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
5150 of bfd_cache_lookup().
5151 * sco5-core.c (sco5_core_file_p): Likewise.
5152 * trad-core.c (trad_unix_core_file_p): Likewise.
5153
5154 2004-05-05 Nick Clifton <nickc@redhat.com>
5155
5156 * cache.c (bfd_cache_lookup): Improve formatting.
5157 * archive.c: Fix formatting.
5158
5159 2004-05-05 Peter Barada <peter@the-baradas.com>
5160
5161 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
5162 * cpu-m68k.c(bfd_m68k_arch): Likewise.
5163 * bfd-in2.h(bfd_architecture): Regenerate.
5164
5165 2004-05-03 Alan Modra <amodra@bigpond.net.au>
5166
5167 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
5168 SEC_MERGE sections.
5169 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
5170 those against discarded link-once and SEC_MERGE section symbols.
5171
5172 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
5173
5174 * section.c (bfd_get_section_by_name_if): New.
5175 * bfd-in2.h: Regenerated.
5176
5177 2004-05-02 Alan Modra <amodra@bigpond.net.au>
5178
5179 * som.c (som_bfd_is_group_section): Define.
5180
5181 2004-05-01 Alan Modra <amodra@bigpond.net.au>
5182
5183 * section.c (bfd_make_section_anyway): Copy the whole
5184 bfd_hash_entry, not just "next" from existing entry.
5185
5186 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5187
5188 * elf.c (bfd_section_from_shdr): Maintain the section order in
5189 a section group.
5190 (special_sections): Add ".note.GNU-stack".
5191 (elf_fake_sections): Handle section group for relocatable
5192 link..
5193
5194 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5195
5196 * section.c (bfd_sections_find_if): New.
5197 * bfd-in2.h: Regenerated.
5198
5199 2004-04-30 Alan Modra <amodra@bigpond.net.au>
5200
5201 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
5202
5203 * elf-bfd.h (bfd_elf_is_group_section): Declare.
5204 * elf.c (bfd_elf_is_group_section): New function.
5205 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
5206 * section.c (bfd_generic_is_group_section): New function.
5207 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
5208 (BFD_JUMP_TABLE_LINK): Adjust.
5209 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
5210 * aout-target.h (MY_bfd_is_group_section): Define.
5211 * aout-tic30.c (MY_bfd_is_group_section): Define.
5212 * bfd.c (bfd_is_group_section): Define.
5213 * binary.c (binary_bfd_is_group_section): Define.
5214 * bout.c (b_out_bfd_is_group_section): Define.
5215 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
5216 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
5217 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
5218 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
5219 * coffcode.h (coff_bfd_is_group_section): Define.
5220 * i386msdos.c (msdos_bfd_is_group_section): Define.
5221 * i386os9k.c (os9k_bfd_is_group_section): Define.
5222 * ieee.c (ieee_bfd_is_group_section): Define.
5223 * ihex.c (ihex_bfd_is_group_section): Define.
5224 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
5225 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
5226 * mmo.c (mmo_bfd_is_group_section): Define.
5227 * nlm-target.h (nlm_bfd_is_group_section): Define.
5228 * oasys.c (oasys_bfd_is_group_section): Define.
5229 * pef.c (bfd_pef_bfd_is_group_section): Define.
5230 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
5231 * srec.c (srec_bfd_is_group_section): Define.
5232 * tekhex.c (tekhex_bfd_is_group_section): Define.
5233 * versados.c (versados_bfd_is_group_section): Define.
5234 * vms.c (vms_bfd_is_group_section): Define.
5235 * xsym.c (bfd_sym_bfd_is_group_section): Define.
5236 * bfd-in2.h: Regenerate.
5237 * libbfd.h: Regenerate.
5238
5239 2004-04-30 Alan Modra <amodra@bigpond.net.au>
5240
5241 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
5242
5243 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
5244
5245 * configure.in: Update version to 2.15.91.
5246 * configure: Regenerate.
5247
5248 2004-04-29 Brian Ford <ford@vss.fsi.com>
5249
5250 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
5251 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
5252 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
5253 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
5254 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
5255 .gnu.linkonce.wi. sections.
5256 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
5257 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
5258 .gnu.linkonce.wi..
5259 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
5260 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5261
5262 2004-04-28 Chris Demetriou <cgd@broadcom.com>
5263
5264 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
5265 * bfd-in2.h: Regenerate.
5266 * libbfd.h: Likewise.
5267
5268 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5269
5270 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
5271 dup_common fields.
5272 (setup_sections): Use som_subspace_dictionary_record struct instead
5273 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
5274 is_comdat, is_common or dup_common.
5275 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
5276 is_comdat, is_common and dup_common in section subspace_dict from
5277 copy_data.
5278 (som_begin_writing): Use som_subspace_dictionary_record struct.
5279 (som_finish_writing): Likewise.
5280 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
5281 is_common and dup_common flags in info for symbol. Add comment
5282 regarding linker support for these fields. Slightly reorganize
5283 function.
5284 (som_build_and_write_symbol_table): Set is_comdat, is_common and
5285 dup_common fields in symbol table from symbol info.
5286 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
5287 arguments. Set corresponding fields in copy_data. Change all callers.
5288 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
5289 symbol table.
5290 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
5291 * som.h (som_subspace_dictionary_record): Define.
5292 (som_copyable_section_data_struct): Add is_comdat, is_common and
5293 dup_common fields.
5294 (som_section_data_struct): Use som_subspace_dictionary_record struct
5295 instead of subspace_dictionary_record.
5296 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
5297
5298 2004-04-27 Bob Wilson <bob.wilson@acm.org>
5299
5300 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
5301 if set. Check reloc_done flag before applying relocations. Use
5302 output addresses, both when applying relocations and when comparing
5303 against the specified section.
5304 (elf_xtensa_relocate_section): Use output address to check if dynamic
5305 reloc is in a literal pool. Set section's reloc_done flag.
5306
5307 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
5308
5309 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
5310 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5311 section.
5312 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
5313 section.
5314
5315 2004-04-27 Alan Modra <amodra@bigpond.net.au>
5316
5317 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
5318 structure field removed in 2004-04-24 patch.
5319 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
5320
5321 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
5322 Constify hdr arg.
5323 * elf32-arm.h (elf32_arm_section_flags): Likewise.
5324 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
5325 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
5326 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
5327 field before calling elf_backend_section_flags.
5328
5329 2004-04-24 Chris Demetriou <cgd@broadcom.com>
5330
5331 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
5332 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
5333 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
5334 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
5335 and BFD_RELOC_32_PCREL.
5336 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
5337 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
5338 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5339 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
5340 (mips_elf_next_relocation): Move comment about matching HI/LO
5341 relocations to...
5342 (_bfd_mips_elf_relocate_section): Here. Remove handling for
5343 R_MIPS_GNU_REL_HI16.
5344
5345 2004-04-23 Chris Demetriou <cgd@broadcom.com>
5346
5347 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
5348 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
5349 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
5350 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
5351 and update comments to reflect current usage.
5352 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
5353 and MIPS_R_SWITCH, as well as several empty entries. Update comment
5354 for MIPS_R_PCREL16.
5355 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
5356 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
5357 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5358 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
5359 type number to be MIPS_R_PCREL16.
5360 (mips_relocate_section): Remove support for link-time relaxation
5361 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
5362 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5363 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
5364 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
5365 relaxation of branches used by embedded-PIC.
5366 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
5367 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
5368 related members, update comment.
5369 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
5370 code related to embedded-PIC.
5371 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
5372 initialization of now-removed 'adjust' member of
5373 'struct ecoff_debug_info'.
5374
5375 2004-04-23 Chris Demetriou <cgd@broadcom.com>
5376
5377 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
5378
5379 2004-04-21 Philip Blundell <pb@nexus.co.uk>
5380
5381 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
5382 relocs for locally defined symbols during -shared final link.
5383 (elf32_arm_final_link_relocate): Likewise.
5384
5385 2004-04-22 Jakub Jelinek <jakub@redhat.com>
5386
5387 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
5388 ELF_LINK_POINTER_EQUALITY_NEEDED.
5389 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
5390 if r_type is not R_X86_64_PC32.
5391 (elf64_x86_64_finish_dynamic_symbol): If
5392 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
5393 SHN_UNDEF symbols.
5394
5395 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5396
5397 * elf32-sh.c (sh_elf_plt_sym_val): New function.
5398 (elf_backend_plt_sym_val): Define.
5399
5400 2004-04-22 Andrew Cagney <cagney@redhat.com>
5401
5402 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
5403
5404 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5405
5406 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5407 make_bfd_asection.
5408 * som.c (som_set_section_contents): Constantify second argument.
5409 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
5410 (som_object_setup): Rework to avoid warning.
5411 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
5412 Likewise.
5413
5414 2004-04-22 Andrew Cagney <cagney@redhat.com>
5415
5416 * cache.c (bfd_cache_close): Check for a previously closed file.
5417
5418 2004-04-22 Jakub Jelinek <jakub@redhat.com>
5419
5420 * bfd.c (bfd_get_synthetic_symtab): Define.
5421 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
5422 NAME##_get_synthetic_symtab.
5423 (struct bfd_target): Add _bfd_get_synthetic_symtab.
5424 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
5425 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
5426 relplt_name fields.
5427 (_bfd_elf_get_synthetic_symtab): New prototype.
5428 * elfcode.h (elf_get_synthetic_symtab): Define.
5429 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
5430 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
5431 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
5432 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
5433 * bfd-in2.h: Rebuilt.
5434 * libbfd.h: Rebuilt.
5435 * elf32-i386.c (elf_i386_plt_sym_val): New function.
5436 (elf_backend_plt_sym_val): Define.
5437 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
5438 (elf_backend_plt_sym_val): Define.
5439 * elf32-s390.c (elf_s390_plt_sym_val): New function.
5440 (elf_backend_plt_sym_val): Define.
5441 * elf64-s390.c (elf_s390_plt_sym_val): New function.
5442 (elf_backend_plt_sym_val): Define.
5443 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
5444 (elf_backend_plt_sym_val): Define.
5445 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
5446 (elf_backend_plt_sym_val): Define.
5447 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
5448 (elf_backend_plt_sym_val): Define.
5449 * aout-target.h (MY_get_synthetic_symtab): Define.
5450 * aout-tic30.c (MY_get_synthetic_symtab): Define.
5451 * coff-rs6000.c (rs6000coff_vec): Add
5452 _bfd_nodynamic_get_synthetic_symtab.
5453 (pmac_xcoff_vec): Likewise.
5454 * coff64-rs6000.c (rs6000coff64_vec): Add
5455 _bfd_nodynamic_get_synthetic_symtab.
5456 (aix5coff64_vec): Likewise.
5457 * sunos.c (MY_get_synthetic_symtab): Define.
5458 * vms.c (vms_get_synthetic_symtab): Define.
5459
5460 2004-04-22 Nick Clifton <nickc@redhat.com>
5461
5462 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
5463
5464 2004-04-22 Peter Barada <peter@the-baradas.com>
5465
5466 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
5467 * bfd2-in.h: Regenerate.
5468 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
5469
5470 2004-04-21 Chris Demetriou <cgd@broadcom.com>
5471
5472 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
5473 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
5474 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
5475 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
5476 * bfd-in2.h: Regenerate.
5477
5478 2004-04-21 Bob Wilson <bob.wilson@acm.org>
5479
5480 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
5481 require relocations against a weak symbol to reference the same
5482 symbol hash entry if not a final, static link.
5483 (get_cached_value, add_value_map): Add final_static_link argument.
5484 (remove_literals): Pass final_static_link argument as needed.
5485
5486 2004-04-21 Andrew Cagney <cagney@redhat.com>
5487
5488 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
5489 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
5490 (opncls_bwrite, opncls_bclose, opncls_bflush)
5491 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
5492 bfd iovec that uses function callbacks.
5493 (bfd_close): Use the iovec's bclose.
5494 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
5495 (cache_bclose, cache_bflush, cache_bstat)
5496 (cache_iovec): New functions and global variable, implement a
5497 cache "iovec", where applicable set bfd_error.
5498 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
5499 * bfdio.c (struct bfd_iovec): Define.
5500 (real_read): Delete function.
5501 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
5502 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
5503 assume that bread and bwrite set bfd_error.
5504 * bfd.c (struct bfd): Add "iovec", update comments.
5505 * bfd-in2.h, libbfd.h: Re-generate.
5506
5507 2004-04-21 Andrew Cagney <cagney@redhat.com>
5508
5509 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5510
5511 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
5512
5513 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
5514 (bfd_elf_gc_sections): Fail if a shared object is being created.
5515 Do not fail if dynamic sections have been created. Instead call
5516 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
5517 dynamically referenced symbols. Do not mark the whole graph
5518 rooted at .eh_frame, only the section proper.
5519
5520 2004-04-20 DJ Delorie <dj@redhat.com>
5521
5522 * reloc.c: Add BFD_RELOC_32_SECREL.
5523 * bfd-in2.h: Regenerate.
5524 * libbfd.h: Likewise.
5525 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
5526 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
5527 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
5528
5529 2004-04-19 Jakub Jelinek <jakub@redhat.com>
5530
5531 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
5532 relocs against hidden/protected undefweak symbols properly.
5533 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5534
5535 2004-04-18 Mark Kettenis <kettenis@gnu.org>
5536
5537 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5538 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
5539 core files.
5540
5541 2004-04-17 Brian Ford <ford@vss.fsi.com>
5542
5543 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
5544 filepos for the SizeOfHeaders field.
5545 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
5546 overflow.
5547 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
5548
5549 2004-04-16 Alan Modra <amodra@bigpond.net.au>
5550
5551 * simple.c (bfd_simple_get_relocated_section_contents): Don't
5552 change reloc_done. Set and restore _cooked_size.
5553 (RETURN): Delete.
5554
5555 2004-04-15 Mark Kettenis <kettenis@gnu.org>
5556
5557 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
5558 core files.
5559
5560 2004-04-15 Nick Clifton <nickc@redhat.com>
5561
5562 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
5563
5564 2004-04-15 Alan Modra <amodra@bigpond.net.au>
5565
5566 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
5567
5568 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
5569
5570 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
5571 when it is a definition.
5572
5573 2004-04-14 Alan Modra <amodra@bigpond.net.au>
5574
5575 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
5576 when statically linking PIC code.
5577 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5578
5579 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5580
5581 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
5582 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
5583 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
5584 * configure: Regenerate.
5585
5586 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
5587
5588 * elflink.c: Include libiberty.h.
5589 * Makefile.am (elflink.lo): Depend on libiberty.h.
5590 * Makefile.in: Regenerate.
5591
5592 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
5593
5594 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
5595 ".MIPS.stubs".
5596
5597 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
5598
5599 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
5600 reserve the memory for dynamic linker
5601
5602 2004-04-05 Mark Kettenis <kettenis@gnu.org>
5603
5604 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
5605 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
5606
5607 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
5608
5609 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
5610 RELOC_FOR_GLOBAL_SYMBOL.
5611 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
5612
5613 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
5614
5615 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5616 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
5617
5618 2004-04-01 Paul Brook <paul@codesourcery.com>
5619
5620 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
5621 * elf32-arm.h (struct elf32_elf_section_map): New.
5622 (struct _arm_elf_section_data): New.
5623 (elf32_arm_section_data): Define.
5624 (struct elf32_arm_link_hash_table): Add byteswap_code.
5625 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
5626 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
5627 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
5628 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
5629 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
5630 (bfd_elf32_new_section_hook, elf_backend_write_section,
5631 elf_backend_link_output_symbol_hook): Define.
5632
5633 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
5634
5635 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
5636 that keeps the characters in a B_INCL..B_EINCL range.
5637 (_bfd_link_section_stabs): When computing the sum of the
5638 characters in a B_INCL..B_EINCL range also keep a copy of those
5639 characters. Use this information to distinguish between
5640 include sections that have the same sum and the same length
5641 but which are nevertheless unique.
5642
5643 2004-03-31 Paul Brook <paul@codesourcery.com>
5644
5645 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
5646 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
5647
5648 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
5649
5650 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
5651 to 'sum_chars' and add field 'num_chars'.
5652 (_bfd_link_section_stabs): When computing the sum of the
5653 characters in a B_INCL..B_EINCL range also keep a count of the
5654 number of characters. Use this information to help distinguish
5655 between include sections when have the same sum but which
5656 nevertheless are still unique.
5657
5658 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
5659
5660 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
5661
5662 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
5663 Tomer Levi <Tomer.Levi@nsc.com>
5664
5665 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
5666 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
5667 (BFD32_BACKENDS): Add elf32-cr16c.lo.
5668 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
5669 (cpu-cr16c.lo): New target.
5670 (elf32-cr16c.lo): Likewise.
5671 * Makefile.in: Regenerate.
5672 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
5673 (bfd_archures_list): Add bfd_cr16c_arch.
5674 * config.bfd: Handle cr16c-*-elf*.
5675 * configure.in: Handle bfd_elf32_cr16c_vec.
5676 * configure: Regenerate.
5677 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
5678 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
5679 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
5680 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
5681 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
5682 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
5683 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
5684 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
5685 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
5686 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
5687 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
5688 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
5689 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
5690 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
5691 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
5692 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
5693 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
5694 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
5695 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
5696 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
5697 * targets.c (bfd_elf32_cr16c_vec): Declare.
5698 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
5699 * cpu-cr16c.c: New file.
5700 * elf32-cr16c.c: Likewise.
5701 * libbfd.h: Regenerate.
5702 * bfd-in2.h: Likewise.
5703
5704 2004-03-30 Jakub Jelinek <jakub@redhat.com>
5705
5706 * elf.c (map_sections_to_segments): Fix handling of .tbss.
5707
5708 2004-03-27 Alan Modra <amodra@bigpond.net.au>
5709
5710 * Makefile.am: Remove all mention of elflink.h.
5711 * Makefile.in: Regenerate.
5712 * bfd-in.h (bfd_elf_discard_info): Declare.
5713 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
5714 * bfd-in2.h: Regenerate.
5715 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
5716 bfd_elf32_link_record_dynamic_symbol,
5717 bfd_elf64_link_record_dynamic_symbol,
5718 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
5719 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
5720 _bfd_elf32_link_record_local_dynamic_symbol,
5721 _bfd_elf64_link_record_local_dynamic_symbol,
5722 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
5723 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
5724 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
5725 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
5726 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
5727 _bfd_elf32_reloc_symbol_deleted_p,
5728 _bfd_elf64_reloc_symbol_deleted_p): Delete.
5729 (bfd_elf_link_record_dynamic_symbol,
5730 bfd_elf_link_record_local_dynamic_symbol,
5731 bfd_elf_final_link, bfd_elf_gc_sections,
5732 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
5733 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
5734 bfd_elf_reloc_symbol_deleted_p): Declare.
5735 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
5736 * elf32-arm.h: Update for changed function names. Remove local
5737 WILL_CALL_FINISH_DYNAMIC_SECTION define.
5738 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
5739 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
5740 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
5741 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5742 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5743 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
5744 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
5745 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
5746 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
5747 (bfd_elfNN_print_symbol): Define.
5748 * elfcode.h: Don't include elflink.h.
5749 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
5750 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
5751 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
5752 elf_gc_record_vtinherit, elf_gc_record_vtentry,
5753 elf_link_record_local_dynamic_symbol): Don't define.
5754 * elflink.c: Update for changed function names. Move elflink.h
5755 code here.
5756 * elflink.h: Delete file.
5757 * po/SRC-POTFILES.in: Regenerate.
5758 * po/bfd.pot: Regenerate.
5759
5760 2004-03-27 Alan Modra <amodra@bigpond.net.au>
5761
5762 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
5763 "name" for global syms accidentally removed in 2004-03-20 change.
5764
5765 2004-03-27 Alan Modra <amodra@bigpond.net.au>
5766
5767 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
5768 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
5769 where Elf_External_* is different for 64 and 32 bit, with
5770 corresponding elf_size_info field.
5771 (struct elf_final_link_info): Use "bfd_byte *" instead
5772 of "Elf_External_Sym *" for external_syms and symbuf.
5773 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
5774 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
5775 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
5776 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
5777 (elf_link_sort_cmp2): Adjust.
5778 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
5779 using ELF_R_SYM macro. Set u.sym_mask.
5780 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
5781 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
5782 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
5783 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
5784 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
5785 swap_syn_out functions. Rearrange dyn swap in/out switch.
5786 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
5787 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
5788 (elf_link_flush_output_syms): Add elf_backend_data arg.
5789 (elf_link_check_versioned_symbol): Likewise.
5790 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
5791 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
5792 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
5793 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
5794 ELF_R_TYPE and ELF_R_INFO macros.
5795 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
5796 based on size rather than using ELF_R_INFO.
5797 (elf_gc_mark): Set up r_sym_shift local var and use instead of
5798 ELF_R_SYM macro.
5799 (struct alloc_got_off_arg): New.
5800 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
5801 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
5802 (elf_gc_allocate_got_offsets): Adjust.
5803 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
5804 ELF_R_SYM. Use bfd_section_from_elf_index.
5805 (elf_bfd_discard_info): Set cookie.r_sym_shift.
5806 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
5807 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
5808
5809 2004-03-26 Stan Shebs <shebs@apple.com>
5810
5811 Remove MPW support, no longer used.
5812 * config.bfd (powerpc-*-mpw*): Remove configuration.
5813 * mpw-config.in, mpw-make.sed: Remove files.
5814 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
5815
5816 2004-03-26 Alan Modra <amodra@bigpond.net.au>
5817
5818 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
5819 (ppc64_elf_add_symbol_hook): New function.
5820 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
5821 const from Elf_Internal_Sym param.
5822 * elflink.c (elf_link_add_object_symbols): Adjust.
5823 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
5824 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
5825 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
5826 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
5827 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
5828 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
5829 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
5830 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
5831 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
5832 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
5833 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
5834 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
5835 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
5836 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
5837 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
5838 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
5839
5840 2004-03-26 Alan Modra <amodra@bigpond.net.au>
5841
5842 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
5843 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
5844 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
5845 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
5846 (bfd_elf64_bfd_link_add_symbols): Delete.
5847 (bfd_elf_link_add_symbols): Declare.
5848 * elfcode.h (elf_bfd_link_add_symbols): Delete.
5849 * elflink.c: Include safe-ctype.h.
5850 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
5851 make static.
5852 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
5853 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
5854 static.
5855 (elf_link_add_archive_symbols): Rename from
5856 _bfd_elf_link_add_archive_symbols, make static.
5857 (elf_link_add_object_symbols): New function. Corresponding
5858 elflink.h function converted to use elf_size_info.
5859 (bfd_elf_link_add_symbols): Likewise.
5860 (bfd_elf_size_dynamic_sections): Adjust.
5861 * elflink.h (elf_bfd_link_add_symbols): Delete.
5862 (elf_link_add_object_symbols): Delete.
5863 * elf32-gen.c (elf32_generic_link_add_symbols): Call
5864 bfd_elf_link_add_symbols.
5865 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
5866
5867 2004-03-25 Alan Modra <amodra@bigpond.net.au>
5868
5869 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
5870 and chained shared libs only if dynsym. Clear dynsym on forced-local.
5871
5872 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
5873 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
5874 (_bfd_elf_add_dt_needed_tag): Declare.
5875 (_bfd_elf_sort_symbol): Declare.
5876 (_bfd_elf_finalize_dynstr): Declare.
5877 (RELOC_FOR_GLOBAL_SYM): Formatting.
5878 * elfcode.h (elf_add_dynamic_entry): Delete.
5879 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
5880 elflink.h function converted to use elf_size_info.
5881 (_bfd_elf_add_dt_needed_tag): Likewise.
5882 (_bfd_elf_sort_symbol): Likewise.
5883 (_bfd_elf_finalize_dynstr): Likewise.
5884 (compute_bucket_count): Likewise.
5885 (bfd_elf_size_dynamic_sections): Likewise. Check result of
5886 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
5887 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
5888 * elflink.h: ..here.
5889 (sort_symbol, add_dt_needed_tag): Delete.
5890 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
5891 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
5892 Update all users.
5893 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
5894 * elf32-cris.c (add_dynamic_entry): Likewise.
5895 * elf32-hppa.c (add_dynamic_entry): Likewise.
5896 * elf32-i370.c (add_dynamic_entry): Likewise.
5897 * elf32-i386.c (add_dynamic_entry): Likewise.
5898 * elf32-m32r.c (add_dynamic_entry): Likewise.
5899 * elf32-m68k.c (add_dynamic_entry): Likewise.
5900 * elf32-ppc.c (add_dynamic_entry): Likewise.
5901 * elf32-s390.c (add_dynamic_entry): Likewise.
5902 * elf32-sh.c (add_dynamic_entry): Likewise.
5903 * elf32-sparc.c (add_dynamic_entry): Likewise.
5904 * elf32-vax.c (add_dynamic_entry): Likewise.
5905 * elf32-xtensa.c (add_dynamic_entry): Likewise.
5906 * elf64-alpha.c (add_dynamic_entry): Likewise.
5907 * elf64-hppa.c (add_dynamic_entry): Likewise.
5908 * elf64-ppc.c (add_dynamic_entry): Likewise.
5909 * elf64-s390.c (add_dynamic_entry): Likewise.
5910 * elf64-sparc.c (add_dynamic_entry): Likewise.
5911 * elf64-x86-64.c (add_dynamic_entry): Likewise.
5912 * elfxx-ia64.c (add_dynamic_entry): Likewise.
5913 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
5914 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
5915 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
5916 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5917
5918 2004-03-23 Paul Brook <paul@codesourcery.com>
5919
5920 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
5921
5922 2004-03-22 Bob Wilson <bob.wilson@acm.org>
5923
5924 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
5925 literal tables and check for relocs outside of literal pools.
5926 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
5927 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
5928 set DF_TEXTREL.
5929 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
5930 (elf_xtensa_relocate_section): Read literal tables and check for
5931 dynamic relocations in read-only sections and not in literal pools.
5932
5933 2004-03-23 Alan Modra <amodra@bigpond.net.au>
5934
5935 PR 51.
5936 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
5937
5938 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
5939
5940 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5941 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
5942 not defined by the executable, or defined in a DSO.
5943 <eliding run-time relocation of .got>: Initialize GOT entry for a
5944 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
5945 executable.
5946 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
5947 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
5948 a PLT reloc to GOT for an executable.
5949 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
5950 .got for a DSO and explain why.
5951 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
5952 and unreferenced symbols for which a PLT is defined. Adjust
5953 dynamic-symbol pruning correspondingly, to make sure we don't lose
5954 a dynamic symbol also defined by a DSO.
5955
5956 2004-03-22 Alan Modra <amodra@bigpond.net.au>
5957
5958 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
5959 and rel args. Group input and output args. Wrap to 80 columns.
5960 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
5961 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
5962 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
5963 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
5964 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5965 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
5966 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
5967 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
5968 RELOC_FOR_GLOBAL_SYMBOL invocation.
5969
5970 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
5971
5972 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
5973 unresolved symbols in objects aren't allowed.
5974
5975 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
5976 unresolved symbols.
5977 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
5978 (elf_hppa_unmark_useless_dynamic_symbols):
5979 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5980 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5981 (elf32_hppa_relocate_section): Likewise.
5982 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5983 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5984 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5985 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5986 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5987
5988 * elf-m10200.c (mn10200_elf_relocate_section): Use
5989 RELOC_FOR_GLOBAL_SYMBOL.
5990 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5991 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5992 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5993 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5994 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5995 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
5996 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5997 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5998 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5999 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6000 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6001 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6002
6003 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6004
6005 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6006 (final_link_relocate): Likewise.
6007 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6008 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6009
6010 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6011
6012 * Makefile.am: Run "make dep-am".
6013 * Makefile.in: Regenerate.
6014 * aclocal.m4: Regenerate.
6015 * config.in: Regenerate.
6016 * po/bfd.pot: Regenerate.
6017
6018 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6019 H.J. Lu <hongjiu.lu@intel.com>
6020
6021 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
6022 type and size change code to where it was previously. Remove
6023 dt_needed param. Treat old weak syms as strong if new sym is
6024 from a shared lib, even when old sym is from another shared
6025 lib. Remove unnecessary tests of oldweak and newweak. Correct
6026 comments.
6027 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
6028 _bfd_elf_merge_symbol calls.
6029 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
6030 dt_needed local var. Update comments.
6031 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
6032 (_bfd_elf_add_default_symbol): Likewise.
6033
6034 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
6035 strong syms in one shared object overriding weak syms in another.
6036
6037 2004-03-18 Alan Modra <amodra@bigpond.net.au>
6038
6039 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
6040 dyn_lib_class field. Rearrange for better packing.
6041 (elf_dt_soname): Delete.
6042 (elf_dyn_lib_class): Define.
6043 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
6044 (bfd_elf_set_dt_needed_soname): Delete.
6045 (bfd_elf_set_dyn_lib_class): New function.
6046 * elflink.h (add_dt_needed_tag): New function. Split out from..
6047 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
6048 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
6049 initialization of soname.
6050 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
6051 elf_dt_soname.
6052 * bfd-in.h (enum dynamic_lib_link_class): New.
6053 (bfd_elf_set_dt_needed_soname): Delete.
6054 (bfd_elf_set_dyn_lib_class): Declare.
6055 * bfd-in2.h: Regenerate.
6056
6057 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
6058 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
6059 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
6060 symbol loop. Instead use add_needed to flag tag as written.
6061
6062 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
6063
6064 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
6065 logic for null_input_bfd detection.
6066
6067 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6068
6069 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
6070
6071 2004-03-16 Mark Kettenis <kettenis@gnu.org>
6072
6073 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
6074 code.
6075
6076 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6077
6078 * elflink.c (elf_link_read_relocs_from_section): Don't use
6079 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
6080 (_bfd_elf_link_read_relocs): ..to here.
6081 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
6082
6083 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6084
6085 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
6086 values selected in configure.host. Require both to be defined
6087 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
6088 corresponding BFD_HOST vars with quotes.
6089 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
6090 Always require BFD_HOST_64_BIT_DEFINED.
6091 <file_ptr type>: Find off_t size before emitting message. Combine
6092 off_t and ftello64 conditional.
6093 * configure: Regenerate.
6094
6095 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6096
6097 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
6098 aliasing warning. Remove trailing whitespace throughout file.
6099
6100 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6101
6102 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
6103 input_section in calls to get_dyn_name.
6104 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
6105 local symbols.
6106 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
6107
6108 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6109
6110 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
6111 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
6112 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
6113 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
6114 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
6115 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
6116 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
6117 when using long.
6118 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
6119 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6120 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6121 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6122 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
6123 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
6124 (read_8_bytes, read_indirect_string, read_address): Likewise.
6125 (read_abbrevs, parse_comp_unit): Likewise.
6126 * targets.c (struct bfd_target): Likewise.
6127 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
6128 * hppabsd-core.c: Likewise. Formatting.
6129 * hpux-core.c: Likewise.
6130 * irix-core.c: Likewise.
6131 * netbsd-core.c: Likewise.
6132 * osf-core.c: Likewise.
6133 * ptrace-core.c: Likewise.
6134 * sco5-core.c: Likewise.
6135 * trad-core.c: Likewise.
6136 * configure: Regenerate.
6137 * bfd-in2.h: Regenerate.
6138
6139 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6140
6141 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
6142 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
6143 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6144 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6145 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
6146 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
6147 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
6148 * libbfd.c: Likewise in function definitions.
6149 (bfd_put_8): Mask with 0xff rather than casting to char.
6150 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
6151 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
6152 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
6153 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
6154 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
6155 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
6156 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
6157 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
6158 (H_GET_64, H_GET_32, H_GET_16): Likewise.
6159 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
6160 * archive.c (do_slurp_coff_armap): Update swap prototype.
6161 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
6162 (tic54x_getl_signed_32): Likewise.
6163 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
6164 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
6165 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
6166 (bfd_getp_signed_32, bfd_putp32): Likewise.
6167 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
6168 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
6169 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
6170 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
6171 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
6172 bfd_h_getx_signed_16, bfd_h_putx16.
6173 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
6174 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
6175 * hpux-core.c: Likewise.
6176 * irix-core.c: Likewise.
6177 * netbsd-core.c: Likewise.
6178 * osf-core.c: Likewise.
6179 * ptrace-core.c: Likewise.
6180 * sco5-core.c: Likewise.
6181 * trad-core.c: Likewise.
6182 * bfd-in2.h: Regenerate.
6183
6184 2004-03-15 Matt Thomas <matt@3am-software.com>
6185
6186 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
6187 selected.
6188
6189 2004-03-13 Mark Kettenis <kettenis@gnu.org>
6190
6191 * config.bfd: Add x86_64-*-openbsd*.
6192 * configure.in (x86_64-*-openbsd*): Set COREFILE to
6193 netbsd-core.lo.
6194 * configure: Regenerate.
6195
6196 2004-03-12 Nick Clifton <nickc@redhat.com>
6197 Dave Murphy <wintermute2k4@ntlworld.com>
6198
6199 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
6200 if the input bfd does not contain any code.
6201
6202 2004-03-09 Steve Ellcey <sje@cup.hp.com>
6203
6204 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
6205
6206 2004-03-05 Fred Fish <fnf@redhat.com>
6207
6208 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
6209 mips16 symbols to be even rather than testing first for even/odd.
6210 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
6211
6212 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
6213
6214 * elf.c (map_sections_to_segments): Ignore .tbss sections for
6215 layout purposes.
6216
6217 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
6218
6219 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
6220 undefined symbols as hash_new.
6221
6222 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
6223
6224 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
6225 * cpu-sh.c: Ditto.
6226 * elf32-sh.c: Ditto.
6227 * bfd-in2.h: Regenerate.
6228
6229 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
6230
6231 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
6232 dynrelocs.
6233 (_frv_count_got_plt_entries): Initialize them.
6234 (frv_pic_relocs_info_find): Add insert argument. Adjust all
6235 callers.
6236 (frv_pic_relocs_info_for_global): Likewise.
6237 (frv_pic_relocs_info_for_local): Likewise.
6238 (frv_pic_merge_early_relocs_info): New.
6239 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
6240 another.
6241 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
6242 Check that we don't exceed the allocated count for entry.
6243 (_frv_add_rofixup): Likewise.
6244 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
6245 (elf32_frv_finish_dynamic_sections): Improve error message in case
6246 we emit too few rofixup entries.
6247
6248 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
6249
6250 * archures.c (bfd_mach_fr450): New.
6251 * bfd-in2.h: Regenerate.
6252 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
6253 (arch_info_500): Link to it.
6254 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
6255 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
6256 (frv_elf_arch_extension_p): New function.
6257 (frv_elf_merge_private_bfd_data): Use it.
6258
6259 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
6260
6261 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
6262
6263 * elflink.h (is_global_data_symbol_definition): Moved to
6264 elflink.c.
6265 (elf_link_is_defined_archive_symbol): Likewise.
6266 (elf_link_add_archive_symbols): Likewise. Renamed to
6267 _bfd_elf_link_add_archive_symbols.
6268
6269 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
6270 of ELF symbol table entry from backend.
6271 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
6272 instead of elf_link_add_object_symbols.
6273
6274 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
6275
6276 * elf-bfd.h (struct elf_backend_data): Added
6277 elf_backend_can_make_relative_eh_frame,
6278 elf_backend_can_make_lsda_relative_eh_frame and
6279 elf_backend_encode_eh_address.
6280 (_bfd_elf_encode_eh_address): Declare.
6281 (_bfd_elf_can_make_relative): Declare.
6282 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
6283 hooks to decide whether to attempt to make_relative and
6284 make_lsda_relative.
6285 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
6286 (_bfd_elf_can_make_relative): New.
6287 (_bfd_elf_encode_eh_address): New.
6288 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
6289 (frv_elf_encode_eh_address): New.
6290 (elf_backend_can_make_relative_eh_frame): Define.
6291 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6292 (elf_backend_encode_eh_address): Define.
6293 * elfxx-target.h
6294 (elf_backend_can_make_relative_eh_frame): Define.
6295 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6296 (elf_backend_encode_eh_address): Define.
6297 (elfNN_bed): Add them.
6298
6299 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
6300
6301 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
6302 complain_on_overflow to signed.
6303
6304 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
6305
6306 * elflink.h (sort_symbol): New.
6307 (elf_link_add_object_symbols): Use a sorted symbol array for
6308 weakdef.
6309
6310 2004-02-27 Jakub Jelinek <jakub@redhat.com>
6311
6312 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6313 for pc relative relocs.
6314 (elf_s390_relocate_section): Likewise.
6315 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6316 for pc relative relocs.
6317 (elf_s390_relocate_section): Likewise.
6318
6319 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
6320
6321 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
6322 count_dyn_reloc.
6323
6324 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
6325
6326 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
6327 field to track if a relocation is against readonly section.
6328 (count_dyn_reloc): Take a new argument for rent->reltext.
6329 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
6330 (get_reloc_section): Don't set ia64_info->reltext here.
6331 (allocate_dynrel_entries): Set ia64_info->reltext here.
6332
6333 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
6334
6335 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
6336 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
6337 function's descriptor to symbol+offset, and map local undefweak
6338 symbol to NULL function descriptor.
6339 (elf32_frv_relocate_section): Likewise.
6340
6341 2004-02-23 Mark Kettenis <kettenis@gnu.org>
6342
6343 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
6344 M_X86_64_NETBSD.
6345 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
6346 (netbsd_core_file_p): Set architecture from machine ID for
6347 selected machines.
6348
6349 2004-02-23 Jakub Jelinek <jakub@redhat.com>
6350
6351 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
6352 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
6353
6354 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
6355
6356 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
6357 symbols with non-default visibility.
6358
6359 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
6360
6361 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
6362 IMAGE_SCN_MEM_WRITE on known sections only.
6363
6364 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6365
6366 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
6367 symbols used in PIE relocs.
6368
6369 2004-02-19 Jakub Jelinek <jakub@redhat.com>
6370
6371 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
6372 .plt sh_entsize.
6373
6374 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
6375
6376 * configure.in: Update version to 2.15.90.
6377 * configure: Regenerate.
6378
6379 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
6380 Richard Sandiford <rsandifo@redhat.com>
6381
6382 * elfxx-mips.c (mips_elf_calculate_relocation): Use
6383 _bfd_elf_symbol_refs_local_p to decide whether to decay
6384 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
6385 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
6386 relocs if the symbol wasn't defined by a regular object file.
6387 Don't check the symbol's dynindx.
6388
6389 2004-02-16 Andrew Cagney <cagney@redhat.com>
6390
6391 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
6392 @bfd_file_ptr@.
6393 * bfd-in2.h: Re-generate.
6394
6395 2004-02-14 Andrew Cagney <cagney@redhat.com>
6396
6397 * configure.host (HDEFINES): When hppa*-*-hpux*, define
6398 _LARGEFILE64_SOURCE.
6399
6400 2004-02-13 Andrew Cagney <cagney@redhat.com>
6401
6402 * elf.c (vma_page_aligned_bias): New function.
6403 (assign_file_positions_except_relocs)
6404 (assign_file_positions_for_segments): Replace broken modulo
6405 arithmetic with call to vma_page_aligned_bias.
6406
6407 2004-02-11 Andrew Cagney <cagney@redhat.com>
6408
6409 * bfd-in.h: Update copyright.
6410 (bfd_tell): Change return type to file_ptr.
6411 * bfd-in2.h: Re-generate.
6412 * cache.c: Update copyright.
6413 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
6414 parameter.
6415 (close_one): Use real_ftell.
6416 * bfdio.c: Update copyright.
6417 (real_ftell, real_fseek): New functions.
6418 (bfd_tell): Use real_fseek and real_ftell, change return type to
6419 file_ptr.
6420 (bfd_seek): Use real_ftell and real_fseek, change type of
6421 file_position to a file_ptr.
6422 * libbfd-in.h: Update copyright.
6423 (real_ftell, real_fseek): Declare.
6424 * libbfd.h: Re-generate.
6425
6426 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
6427 fseeko and fseeko64. Determine bfd_file_ptr.
6428 * configure: Re-generate.
6429 * config.in: Re-generate.
6430
6431 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
6432
6433 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
6434 * elf32-h8300.c: Likewise.
6435
6436 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
6437 Nick Clifton <nickc@redhat.com>
6438
6439 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
6440 GOT entries with no associated GOT subsection.
6441
6442 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
6443
6444 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
6445 * elf.c (swap_out_syms): Use it to decide whether local section
6446 symbols should be named.
6447 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
6448 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
6449 (elf_backend_name_local_section_symbols): Define.
6450 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
6451
6452 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
6453
6454 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
6455 (elfNN_ia64_relax_section): Optimize brl to br during the relax
6456 finalize pass.
6457
6458 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
6459
6460 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
6461 to bfd_link_hash_entry passed by reference to
6462 _bfd_generic_link_add_one_symbol.
6463
6464 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
6465
6466 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
6467 relocations against dynamic symbols.
6468
6469 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
6470
6471 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
6472 change.
6473
6474 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
6475
6476 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
6477 * bfd-in2.h, libbfd.h: Rebuilt.
6478
6479 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
6480
6481 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
6482 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
6483 flag has been cleared.
6484
6485 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
6486
6487 * coff-h8300.c: Add and adjust comments about relaxation.
6488 * elf32-h8300.c: Likewise.
6489
6490 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
6491
6492 * coff-h8300.c: Fix comment typos.
6493 * elf32-h8300.c: Likewise.
6494
6495 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
6496
6497 * coff-h8300.c: Add comments about relaxation.
6498 * elf32-h8300.c: Likewise.
6499
6500 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6501
6502 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
6503 throughout.
6504 * aclocal.m4: Regenerate.
6505 * configure: Regenerate.
6506
6507 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6508
6509 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
6510 mips_elf64_rtype_to_howto instead of using howto_table.
6511
6512 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
6513
6514 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
6515 the .plt section.
6516 (elf32_arm_check_relocs): Don't increment the PLT refcount for
6517 relocs which would not use the PLT.
6518
6519 2004-01-13 Alan Modra <amodra@bigpond.net.au>
6520
6521 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
6522 (ppc64_elf_gc_sweep_hook): Likewise.
6523 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
6524
6525 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
6526
6527 Adds linker relaxation support for bit manipulation insns like
6528 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
6529 bst, btst, bxor.
6530 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
6531 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
6532 * coff-h8300.c: Opcode for bit manipulation insn is checked in
6533 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
6534
6535 2004-01-12 Alan Modra <amodra@bigpond.net.au>
6536
6537 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
6538
6539 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
6540
6541 * elf32-h8300.c: Fix formatting.
6542
6543 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
6544
6545 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
6546 dynamic object is present. Declare r_symndx and h in an inner
6547 scope.
6548 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
6549
6550 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
6551
6552 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
6553 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
6554 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
6555 identically. Do not emit PC24 relocations for shared libraries.
6556 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
6557 identically. Don't adjust pc_count.
6558 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
6559 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
6560 adjust count for branch relocations.
6561 (allocate_dynrelocs): Correct typo in call to
6562 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
6563 PC24 or PLT32 relocs when linking.
6564
6565 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
6566
6567 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
6568 relocation howto with ARM_26 one for consistency.
6569 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
6570 that will be converted to ARM_26D ones, since we always want 'done'
6571 relocations to be reflected in section's data.
6572 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
6573 offset.
6574 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
6575 requested.
6576
6577 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
6578
6579 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
6580 are not partial_inplace during a relocatable link.
6581
6582 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
6583
6584 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
6585 if no dynamic object is present. Declare r_symndx and h in an
6586 inner scope.
6587
6588 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
6589
6590 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
6591 trampoline if it is known out of range.
6592
6593 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
6594
6595 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
6596 * elf32-frv.c (_frv_osec_readonly_p): New.
6597 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
6598 undefweak symbol.
6599 (_frv_count_got_plt_entries): Adjust expected count accordingly.
6600 (elf32_frv_relocate_section): Likewise. Error out if attempting
6601 to emit rofixups or dynamic relocs in read-only segments. Use
6602 _bfd_elf_section_offset to adjust r_offsets in rofixups and
6603 dynamic relocations.
6604 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
6605 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
6606 relocations or fixups involving merged sections correctly. Avoid
6607 crash when undefined symbol is referenced by R_FRV_32 or
6608 R_FRV_FUNCDESC_VALUE.
6609 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
6610 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
6611 input section holding local symbol to addend of R_FRV_32 or
6612 R_FRV_FUNCDESC_VALUE dynamic relocation.
6613 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
6614 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
6615 (elf32_frv_always_size_sections): Don't store pointer to
6616 __stacksize symbol in sec_info.
6617 (elf32_frv_modify_segment_map): Look it up here.
6618 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
6619 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
6620 of the lazy PLT entry, not only its offset, as the low word of a
6621 function descriptor.
6622 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
6623 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
6624 if a hash table entry already exists but is not a definition.
6625 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
6626 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
6627 (_frv_add_rofixup): Don't inline.
6628 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
6629 for undefweak symbols.
6630 (elf32_frv_relocate_section): Avoid crash while computing
6631 relocation when linking with shared library. Only emit rofixups
6632 and dynamic relocations for alloc&load sections. Mark binaries
6633 with inter-segment relocations for relocation as a unit.
6634 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
6635 (DEFAULT_STACK_SIZE): New.
6636 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
6637 emit rofixups or dynamic relocs when linking dynamic non-PIE
6638 executables.
6639 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
6640 shared libs too. Reserve the last entry for the GOT pointer.
6641 (elf32_frv_finish_dynamic_sections): Emit it.
6642 (elf32_frv_always_size_sections): New.
6643 (elf32_frv_modify_segment_map): New.
6644 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
6645 sections.
6646 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
6647 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
6648 (elf_backend_always_size_sections): New.
6649 (elf_backend_modify_segment_map): New.
6650 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
6651 * config.bfd: Added frv-*-*linux*.
6652 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
6653 ABS section, instead of crashing.
6654 (elf32_frv_relocate_section): Don't crash before warning about
6655 different segments in non-PIC relocation.
6656 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
6657 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
6658 relocs to undefweak symbols.
6659 (elf32_frv_relocate_section): Ditto for undefined symbols.
6660 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
6661 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
6662 gotfixup section was created.
6663 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
6664 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
6665 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
6666 complain_overflow_signed.
6667 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
6668 have not been allocated.
6669 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
6670 privfd only if dynamic sections were created.
6671 (elf32_frv_relocate_section): Compute gprel_segment, and use it
6672 for GPREL relocs. When linking relocatable FDPIC executables,
6673 emit warnings for relocations that would be illegal on PIE or
6674 shared libraries. Emit rofixup for R_FRV_32 only if input object
6675 is not FDPIC.
6676 (_frv_create_got_section): Define _gp symbol in the rofixup
6677 section.
6678 (elf32_frv_finish_dynamic_sections): If rofixups needed but
6679 dynamic sections missing, error out requesting -melf32frvfd.
6680 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
6681 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
6682 computation of addends from section and global or local symbol
6683 value. Change return type to bfd_boolean, and return a failure if
6684 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
6685 nonzero addend is required.
6686 (elf32_frv_relocate_section): Likewise. Print error for
6687 unsupported nonzero addends.
6688 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
6689 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
6690 force everything local.
6691 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
6692 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
6693 (frv_gotfixup_section): New.
6694 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
6695 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
6696 and relocsfdv.
6697 (_frv_add_rofixup): New.
6698 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
6699 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
6700 improve some ugly conditions.
6701 (elf32_frv_relocate_section): Likewise. Reject inter-segment
6702 relocations in fdpic.
6703 (_frv_create_got_section): Create .rofixup.got section.
6704 (struct _frv_dynamic_got_info): Added fixups.
6705 (_frv_count_got_plt_entries): Account in-GOT relocations into
6706 relocs32, relocsfd and relocsfdv. Account them into relocs or
6707 fixups, as appropriate.
6708 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
6709 sizing of gotrel.
6710 (elf32_frv_finish_dynamic_sections): Verify that the right number
6711 of relocations and fixups was generated.
6712 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
6713 relocsfdv.
6714 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
6715 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
6716 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
6717 descriptor of a (formerly-)global symbol is local.
6718 (struct frv_pic_relocs_info): Adjust comments.
6719 (_frv_emit_got_relocs_plt_entries): Adjust.
6720 (elf32_frv_relocate_section): Likewise.
6721 (_frv_count_got_plt_entries): Likewise.
6722 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
6723 symbol's value to addend in the common preamble. Decay dynamic
6724 symbols to section+offset if they bind or call locally, for GOT
6725 and FUNCDESC_VALUE, respectively.
6726 (elf32_frv_relocate_section): Likewise.
6727 (elf32_frv_check_relocs): Don't register as dynamic symbols of
6728 internal or hidden visibility.
6729 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
6730 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
6731 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
6732 (elf32_frv_relocate_section): Pass relocation addend in. Use
6733 original relocation addend to look up the got relocs/plt entries
6734 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
6735 processing relocations that reference .scommon symbols.
6736 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
6737 Introduce support for dynamic linking.
6738 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
6739 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
6740 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
6741 (frv_reloc_type_lookup): Return REL howtos for executables and
6742 dynamic libraries.
6743 (frv_info_to_howto_rel): New.
6744 (struct frv_elf_link_hash_table): New.
6745 (frv_hash_table, frv_got_section, frv_gotrel_section,
6746 frv_plt_section, frv_pltrel_section, frv_relocs_info,
6747 frv_got_initial_offset, frv_plt_initial_offset): New macros.
6748 (frv_elf_link_hash_table_create): New.
6749 (struct frv_pic_relocs_info): New.
6750 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
6751 (frv_pic_relocs_info_find): New.
6752 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
6753 New.
6754 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
6755 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
6756 (_frv_emit_got_relocs_plt_entries): New.
6757 (elf32_frv_relocate_section): Add support for dynamic linking.
6758 Handle new relocations.
6759 (_frv_create_got_section): New.
6760 (elf32_frv_create_dynamic_sections): New.
6761 (ELF_DYNAMIC_INTERPRETER): New.
6762 (struct _frv_dynamic_got_info): New.
6763 (_frv_count_got_plt_entries): New.
6764 (struct _frv_dynamic_got_plt_info): New.
6765 (_frv_compute_got_alloc_data): New.
6766 (_frv_get_got_entry, _frv_get_fd_entry): New.
6767 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
6768 (_frv_resolve_final_relocs_info): New.
6769 (elf32_frv_size_dynamic_sections): New.
6770 (elf32_frv_finish_dynamic_sections): New.
6771 (elf32_frv_adjust_dynamic_symbol): New.
6772 (elf32_frv_finish_dynamic_symbol): New.
6773 (elf32_frv_check_relocs): Handle new relocs. Explain how the
6774 whole thing works.
6775 (elf_info_to_howto_rel): Define.
6776 (bfd_elf32_bfd_link_hash_table_create): Define.
6777 (elf_backend_create_dynamic_sections): Define.
6778 (elf_backend_adjust_dynamic_symbol): Define.
6779 (elf_backend_size_dynamic_sections): Define.
6780 (elf_backend_finish_dynamic_symbol): Define.
6781 (elf_backend_finish_dynamic_sections): Define.
6782 (elf_backend_want_got_sym): Define.
6783 (elf_backend_got_header_size): Define.
6784 (elf_backend_want_got_plt): Define.
6785 (elf_backend_plt_readonly): Define.
6786 (elf_backend_want_plt_sym): Define.
6787 (elf_backend_plt_header_size): Define.
6788 (elf_backend_may_use_rel_p): Define.
6789 (elf_backend_may_use_rela_p): Define.
6790 (elf_backend_default_use_rela_p): Define.
6791 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
6792 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
6793 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
6794 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
6795 (frv_reloc_map): Map the corresponding BFD relocs to them.
6796 (frv_reloc_type_lookup): ... and back to BFD relocs.
6797 * reloc.c: New relocs.
6798 * bfd-in2.h, libbfd.h: Rebuilt.
6799 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
6800 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
6801 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
6802 R_FRV_FUNCDESC_GOTLO): New.
6803 (frv_reloc_map): Map the corresponding BFD relocs to them.
6804 (frv_reloc_type_lookup): ... and back to BFD relocs.
6805 * reloc.c: New relocs.
6806 * bfd-in2.h, libbfd.h: Rebuilt.
6807
6808 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6809
6810 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6811 targets to support pages of up to 64kB.
6812 (elf32_bed): Redefine to get a separate backend data structure for
6813 traditional targets.
6814 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6815 targets to support pages of up to 64kB.
6816 (elf64_bed): Redefine to get a separate backend data structure for
6817 traditional targets.
6818 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6819 targets to support pages of up to 64kB.
6820 (elf32_bed): Redefine to get a separate backend data structure for
6821 traditional targets.
6822
6823 2004-01-04 Mark Kettenis <kettenis@gnu.org>
6824
6825 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
6826
6827 2004-01-02 Mark Kettenis <kettenis@gnu.org>
6828
6829 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
6830 (elf_i386_grok_psinfo): Likewise.
6831
6832 2004-01-02 Bernardo Innocenti <bernie@develer.com>
6833
6834 * config.bfd: Add m68k-uClinux target.
6835
6836 2004-01-01 Grant Edwards <grante@visi.com>
6837
6838 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
6839 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
6840 (elf32_h8_gc_sweep_hook): New function.
6841 (elf_backend_gc_mark_hook): Define.
6842 (elf_backend_gc_sweep_hook): Define.
6843 (elf_backend_can_gc_sections): Define.
6844
6845 For older changes see ChangeLog-0203
6846 \f
6847 Local Variables:
6848 mode: change-log
6849 left-margin: 8
6850 fill-column: 74
6851 version-control: never
6852 End:
This page took 0.161048 seconds and 5 git commands to generate.