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