* som.c (som_bfd_print_private_bfd_data): New function.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2
3 * som.c (som_bfd_print_private_bfd_data): New function.
4 (som_object_setup): Save the auxiliary header. Don't assume that
5 zero is an invalid entry point for a shared library.
6 (som_object_p): Allocate the auxiliary header on the heap.
7
8 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
9 declaration.
10 (elf32_arm_symbian_modify_segment_map): Likewise.
11
12 2004-11-09 Daniel Jacobowitz <dan@debian.org>
13
14 From David Poole <daveml@mbuf.com>:
15 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
16 (elf32_arm_size_dynamic_sections): Call it.
17
18 2004-11-09 Alan Modra <amodra@bigpond.net.au>
19
20 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
21 (ALL_MACHINES_CFILES): Fix typo.
22 * Makefile.in: Regenerate.
23 * po/SRC-POTFILES.in: Regenerate.
24
25 2004-11-08 Mark Mitchell <mark@codesourcery.com>
26
27 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
28 R_ARM_RELATIVE relocation for Symbian OS, mention the section
29 symbol in the relocation.
30
31 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
32 Vineet Sharma <vineets@noida.hcltech.com>
33
34 * coff-maxq.c: New File.
35 * cpu-maxq.c: New File.
36 * coffcode.h: Likewise.
37 * config.bfd: Likewise.
38 * configure.in (maxqcoff_vec): New target vector.
39 * Makefile.am: Add support for maxq target.
40 * configure.in: Likewise.
41 * archures.c:. Likewise.
42 * targets.c: Likewise.
43 * bfd_in2.h : Regenerated.
44 * Makefile.in: Regenerated.
45 * configure: Regenerated.
46 * doc/Makefile.in: Regenerated.
47
48 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
49
50 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
51 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
52 C_NT_WEAK aux entries.
53 (_bfd_coff_generic_relocate_section): Handle undefined
54 aliases.
55
56 2004-11-07 Andreas Schwab <schwab@suse.de>
57
58 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
59 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
60 non-default visibility.
61
62 2004-11-01 Mark Mitchell <mark@codesourcery.com>
63
64 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
65 D_PAGED.
66 (elf32_arm_symbian_modify_segment_map): Don't
67 reset includes_filehdr and includes_phdrs here.
68
69 2004-11-04 Daniel Jacobowitz <dan@debian.org>
70
71 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
72 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
73 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
74 dependency.
75 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
76 to a new removed list. Remove normal configuration stanzas.
77 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
78 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
79 elfarm-nabi.lo with elf32-arm.lo.
80 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
81 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
82 * elf32-arm.h: Remove.
83 * elfarm-oabi.c: Remove.
84 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
85 and bfd_elf32_littlearm_oabi_vec.
86 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
87
88 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
89
90 * config.bfd: Support crisv32-*-* like cris-*-*.
91 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
92 (bfd_mach_cris_v10_v32): New macros.
93 * cpu-cris.c: Tweak formatting.
94 (get_compatible): New function.
95 (N): New macro.
96 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
97 bfd_arch_info_type:s.
98 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
99 get_compatible for member compatible and link bfd_cris_arch_v32 as
100 next.
101 * elf32-cris.c (cris_elf_pcrel_reloc)
102 (cris_elf_set_mach_from_flags): New functions.
103 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
104 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
105 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
106 numbers for bfd_mach_cris_v32.
107 (PLT_ENTRY_SIZE_V32): New macro.
108 (elf_cris_plt0_entry): Drop last comma in initializer.
109 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
110 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
111 PLT initializers.
112 (cris_elf_relocate_section): Change all "%B(%A)" messages to
113 "%B, section %A".
114 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
115 (elf_cris_finish_dynamic_sections): Similar.
116 (elf_cris_adjust_dynamic_symbol): Similar.
117 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
118 section %A".
119 <switch with PIC relocs>: Emit error and return FALSE for
120 bfd_mach_cris_v10_v32.
121 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
122 Emit warning when generating textrel reloc.
123 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
124 (cris_elf_final_write_processing): Set flags according to mach.
125 (cris_elf_print_private_bfd_data): Display
126 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
127 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
128 new_flags. Don't call cris_elf_final_write_processing. Don't
129 look at the actual elf header flags at all; use
130 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
131 in bfd_get_mach for ibfd and obfd and handle merging of compatible
132 objects.
133 (bfd_elf32_bfd_copy_private_bfd_data): Define.
134 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
135 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
136 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
137 * bfd-in2.h, libbfd.h: Regenerate.
138
139 2004-11-04 Alan Modra <amodra@bigpond.net.au>
140
141 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
142 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
143 comment.
144 (struct adjust_toc_info): New.
145 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
146
147 2004-11-03 Bob Wilson <bob.wilson@acm.org>
148
149 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
150 if there are no segments.
151
152 2004-11-02 Daniel Jacobowitz <dan@debian.org>
153
154 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
155
156 2004-11-02 Nick Clifton <nickc@redhat.com>
157
158 * elf32-iq2000.c: Convert to ISO C90 formatting.
159
160 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
161
162 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
163
164 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
165
166 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
167 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
168 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
169
170 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
171
172 * elf32-sh.c (tpoff): Take alignment into account.
173
174 2004-10-28 Nick Clifton <nickc@redhat.com>
175
176 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
177 performing a relocatable link.
178 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
179 for MIPS ports under Irix.
180
181 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
182
183 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
184 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
185 (elf32_arm_final_link_relocate): Ditto.
186 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
187 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
188 (elf32_arm_adjust_dynamic_symbol): Ditto.
189 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
190 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
191 (elf32_arm_r_howto): ... To here.
192 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
193
194 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
195
196 PR 475
197 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
198 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
199 and R_IA64_SECREL64LSB.
200
201 2004-10-26 Paul Brook <paul@codesourcery.com>
202
203 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
204 (bfd_elf_size_dynamic_sections): Create default version definition.
205 (elf_link_output_extsym): Adjust for default symbol version.
206
207 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
208
209 * mmo.c: Adjust to ISO C.
210
211 * mmo.c (mmo_write_section_description): New function broken out
212 of mmo_internal_write_section.
213 (mmo_internal_write_section): For each of .text and .data, call
214 mmo_write_section_description before outputting contents if it has
215 nontrivially deducible vma or contents.
216 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
217 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
218 symbols if found within the .data address range.
219
220 2004-10-24 Daniel Jacobowitz <dan@debian.org>
221
222 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
223
224 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
225
226 * mmo.c (File Layout): Correct place of misplaced blurb about
227 special data.
228
229 2004-10-22 Mark Kettenis <kettenis@gnu.org>
230
231 * config.bfd: Add mips64*-*-openbsd.
232
233 2004-10-21 Bob Wilson <bob.wilson@acm.org>
234
235 * elf32-xtensa.c (ebb_propose_action): Put declarations before
236 statements.
237
238 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
239
240 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
241 * configure: Regenerate.
242
243 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
244
245 PR 463
246 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
247 to linker reloc_overflow callback.
248 (aout_link_input_section_ext): Likewise.
249 (aout_link_reloc_link_order): Likewise.
250 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
251 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
252 Likewise.
253 (alpha_relocate_section): Likewise.
254 * coff-arm.c (coff_arm_relocate_section): Likewise.
255 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
256 * coff-h8500.c (extra_case): Likewise.
257 * coff-i960.c (coff_i960_relocate_section): Likewise.
258 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
259 * coff-mips.c (mips_relocate_section): Likewise.
260 * coff-or32.c (coff_or32_relocate_section): Likewise.
261 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
262 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
263 * coff-sh.c (sh_relocate_section): Likewise.
264 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
265 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
266 * coff-z8k.c (extra_case): Likewise.
267 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
268 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
269 (_bfd_coff_generic_relocate_section): Likewise.
270 * ecoff.c (ecoff_reloc_link_order): Likewise.
271 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
272 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
273 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
274 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
275 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
276 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
277 * elf32-cris.c (cris_elf_relocate_section): Likewise.
278 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
279 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
280 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
281 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
282 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
283 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
284 * elf32-i370.c (i370_elf_relocate_section): Likewise.
285 * elf32-i386.c (elf_i386_relocate_section): Likewise.
286 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
287 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
288 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
289 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
290 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
291 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
292 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
293 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
294 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
295 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
296 * elf32-s390.c (elf_s390_relocate_section): Likewise.
297 * elf32-sh.c (sh_elf_relocate_section): Likewise.
298 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
299 * elf32-v850.c (v850_elf_relocate_section): Likewise.
300 * elf32-vax.c (elf_vax_relocate_section): Likewise.
301 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
302 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
303 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
304 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
305 * elf64-s390.c (elf_s390_relocate_section): Likewise.
306 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
307 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
308 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
309 * elflink.c (elf_reloc_link_order): Likewise.
310 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
311 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
312 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
313 * linker.c (_bfd_generic_reloc_link_order): Likewise.
314 * pdp11.c (pdp11_aout_link_input_section): Likewise.
315 (aout_link_reloc_link_order): Likewise.
316 * reloc.c (bfd_generic_get_relocated_section_contents):
317 Likewise.
318 * xcofflink.c (xcoff_reloc_link_order): Likewise.
319 * simple.c (simple_dummy_reloc_overflow): Updated.
320
321 2004-10-20 Andreas Schwab <schwab@suse.de>
322
323 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
324 (elf_backend_plt_sym_val): Define.
325
326 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
327
328 * config.bfd: Set targ_underscore=yes for PE COFF targets
329
330 2004-10-19 Alan Modra <amodra@bigpond.net.au>
331
332 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
333 (ppc64_elf_edit_opd): Likewise.
334
335 2004-10-18 Mark Mitchell <mark@codesourcery.com>
336
337 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
338 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
339 set SEC_ALLOC and SEC_LOAD.
340
341 2004-10-18 Nick Clifton <nickc@redhat.com>
342
343 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
344 'name' for relocs against both local and global symbols.
345
346 2004-10-16 Daniel Jacobowitz <dan@debian.org>
347
348 * bfd-in2.h: Regenerate.
349 * bfd.c (struct bfd): Add no_export.
350 * elflink.c (elf_link_add_object_symbols): Handle no_export.
351
352 2004-10-15 Alan Modra <amodra@bigpond.net.au>
353
354 * config.bfd: Whitespace cleanup.
355 * Makefile.am: Run "make dep-am"
356 * Makefile.in: Regenerate.
357
358 2004-10-15 Jakub Jelinek <jakub@redhat.com>
359
360 * elflink.c (struct already_linked_section): Removed.
361 (try_match_symbols_in_sections, already_linked): Removed.
362 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
363 prefix of section names when finding already_linked_table
364 chain. Compare section names. Instead of calling already_linked,
365 do it inline and only for sections in the same already_linked_list.
366
367 2004-10-15 Alan Modra <amodra@bigpond.net.au>
368
369 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
370 parameter. If called after _bfd_elf_write_section_eh_frame,
371 don't allow a -2 return unless need_* bit is already set, and
372 handle offsets adjusted for output_offset.
373 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
374 * elf.c (_bfd_elf_section_offset): Update call.
375
376 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
377
378 PR 440
379 * coffcode.h (coff_compute_section_file_positions): Cast to
380 bfd_vma when computing page alignment.
381
382 2004-10-13 Mark Mitchell <mark@codesourcery.com>
383
384 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
385 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
386
387 2004-10-12 Mark Mitchell <mark@codesourcery.com>
388
389 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
390 relocations use a virtual address, not a section offset.
391
392 2004-10-12 Bob Wilson <bob.wilson@acm.org>
393
394 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
395 (narrow_instruction, widen_instruction): Remove unnecessary calls to
396 xtensa_format_encode.
397 (ebb_propose_action): Inline call to ebb_add_proposed_action.
398 (ebb_add_proposed_action): Delete.
399
400 2004-10-12 Bob Wilson <bob.wilson@acm.org>
401
402 * elf32-xtensa.c: Use ISO C90 formatting.
403
404 2004-10-12 Paul Brook <paul@codesourcery.com>
405
406 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
407 message.
408
409 2004-10-12 Paul Brook <paul@codesourcery.com>
410
411 * elf32-arm.h: Support EABI version 4 objects.
412
413 2004-10-12 Alan Modra <amodra@bigpond.net.au>
414
415 PR 325
416 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
417 Don't mark as default.
418 (bfd_x86_64_arch): Don't mark as default.
419
420 2004-10-12 Alan Modra <amodra@bigpond.net.au>
421
422 * elflink.c (enum action_discarded): New.
423 (elf_section_complain_discarded): Delete.
424 (elf_action_discarded): New function subsuming the above and also
425 controlling reloc behaviour.
426 (elf_link_input_bfd): Use it.
427
428 2004-10-11 Jakub Jelinek <jakub@redhat.com>
429
430 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
431 (special_sections): Add .gnu.liblist and .gnu.conflict.
432 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
433
434 2004-10-11 Alan Modra <amodra@bigpond.net.au>
435
436 PR 233
437 * elflink.c (elf_link_input_bfd): Try harder to support
438 relocations against symbols in removed linkonce sections.
439
440 2004-10-11 Alan Modra <amodra@bigpond.net.au>
441
442 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
443
444 PR 354
445 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
446 sections do not reference symbols in non-SEC_ALLOC sections.
447
448 2004-10-11 Alan Modra <amodra@bigpond.net.au>
449
450 PR 437
451 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
452 (_bfd_elf_link_omit_section_dynsym): Formatting.
453
454 2004-10-10 Alan Modra <amodra@bigpond.net.au>
455
456 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
457 * libbfd.h: Regnerate.
458 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
459 * elf32-frv.c: Likewise.
460 * elf32-m32r.c: Likewise.
461 * elf32-ppc.c: Likewise.
462 * elf64-hppa.c: Likewise.
463 * elfxx-ia64.c: Likewise.
464 * opncls.c: Likewise.
465
466 2004-10-10 Alan Modra <amodra@bigpond.net.au>
467
468 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
469 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
470 offsets stored in struct eh_cie_fde entries before doing other
471 work.
472
473 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
474 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
475 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
476 setting offsets for removed CIEs. Don't set "sec", instead set
477 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
478 CIE in hdr_info. Only set make_relative and make_lsda_relative
479 for CIEs. Use pointers rather than array indices.
480 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
481 make_lsda_relative, need_* on cie_inf for FDEs.
482 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
483 section output_offset. Delete cie_offset, instead use cie_inf
484 pointer to CIE entry. Use need_relative and need_lsda_relative on
485 CIE entry for FDEs. Use pointers rather than array indices.
486
487 2004-10-09 Alan Modra <amodra@bigpond.net.au>
488
489 * coff-rs6000.c (rs6000coff_vec): Add initializer for
490 bfd_is_target_special_symbol.
491 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
492 * som.c (som_bfd_is_target_special_symbol): Define.
493
494 2004-10-08 Nick Clifton <nickc@redhat.com>
495
496 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
497 * configure: Regenerate.
498 * bfd-in2.h: Regenerate.
499 * syms.c (bfd_is_target_special_symbol): New interface function.
500 Returns true when a symbol should be considered to be special.
501 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
502 the symbol jump table.
503 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
504 Return true iff the symbol is a mapping symbol.
505 (bfd_elf32_bfd_is_target_special_symbol): Define.
506 * elfxx-target.h: Provide a default definition for
507 bfd_is_target_special_symbol.
508 * aout-target.h: Likewise.
509 * aout-tic30.c: Likewise.
510 * binary.c: Likewise.
511 * coffcode.h: Likewise.
512 * i386msdos.c: Likewise.
513 * ieee.c: Likewise.
514 * ihex.c: Likewise.
515 * libaout.h: Likewise.
516 * libbfd-in.h: Likewise
517 * libecoff.h: Likewise.
518 * mach-o.c: Likewise.
519 * mmo.c: Likewise.
520 * nlm-target.h: Likewise.
521 * oasys.c: Likewise.
522 * pef.c: Likewise.
523 * ppcboot.c: Likewise.
524 * srec.c: Likewise.
525 * tekhex.c: Likewise.
526 * versados.c: Likewise.
527 * vms.c: Likewise.
528 * xcoff-target.h: Likewise.
529 * xsym.c: Likewise.
530 * libbfd.h: Regenerate.
531
532 2004-10-08 Daniel Jacobowitz <dan@debian.org>
533
534 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
535 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
536 (elf_backend_section_from_shdr): Define.
537
538 2004-10-08 Alan Modra <amodra@bigpond.net.au>
539
540 * syms.c (bfd_is_local_label): Return false for file symbols.
541
542 2004-10-07 Bob Wilson <bob.wilson@acm.org>
543 David Heine <dlheine@tensilica.com>
544
545 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
546 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
547 (elf32xtensa_no_literal_movement): New global variable.
548 (elf_howto_table): Add entries for new relocations.
549 (elf_xtensa_reloc_type_lookup): Handle new relocations.
550 (property_table_compare): When addresses are equal, compare sizes and
551 various property flags.
552 (property_table_matches): New.
553 (xtensa_read_table_entries): Extend to read new property tables. Add
554 output_addr parameter to indicate that output addresses should be used.
555 Use bfd_get_section_limit.
556 (elf_xtensa_find_property_entry): New.
557 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
558 (elf_xtensa_check_relocs): Handle new relocations.
559 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
560 relocations. Use new xtensa-isa.h functions.
561 (build_encoding_error_message): Remove encode_result parameter. Add
562 new target_address parameter used to detect alignment errors.
563 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
564 error handling. Use new is_operand_relocation function.
565 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
566 Use underbar macro for error messages. Formatting.
567 (get_const16_opcode): New.
568 (get_l32r_opcode): Add a separate flag for initialization.
569 (get_relocation_opnd): Operand number is no longer explicit in the
570 relocation. Change to decode the opcode and analyze its operands.
571 (get_relocation_slot): New.
572 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
573 Use new xtensa-isa.h functions to handle multislot instructions.
574 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
575 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
576 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
577 check_loop_aligned, check_branch_target_aligned_address, narrowable,
578 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
579 get_single_format, init_op_single_format_table): New.
580 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
581 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
582 (contract_asm_expansion): Add error_message parameter and pass it to
583 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
584 with R_XTENSA_SLOT0_OP.
585 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
586 instructions. Use new xtensa-isa.h functions.
587 (r_reloc struct): Add new virtual_offset field.
588 (r_reloc_init): Add contents and content_length parameters. Set
589 virtual_offset field to zero. Add contents to target_offset field for
590 partial_inplace relocations.
591 (r_reloc_is_defined): Check for null.
592 (print_r_reloc): New debug function.
593 (source_reloc struct): Replace xtensa_operand field with pair of the
594 opcode and the operand position. Add is_abs_literal field.
595 (init_source_reloc): Specify operand by opcode/position pair. Set
596 is_abs_literal field.
597 (source_reloc_compare): When target_offsets are equal, compare other
598 fields to make sorting predictable.
599 (literal_value struct): Add is_abs_literal field.
600 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
601 (init_literal_value): New.
602 (is_same_value): Replace with ...
603 (literal_value_equal): ... this function. Add comparisons of
604 virtual_offset and is_abs_literal fields.
605 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
606 failure. Initialize has_last_loc field.
607 (value_map_hash_table_delete): New.
608 (hash_literal_value): Rename to ...
609 (literal_value_hash): ... this. Include is_abs_literal flag and
610 virtual_offset field in the hash value.
611 (get_cached_value): Rename to ...
612 (value_map_get_cached_value): ... this. Update calls to
613 literal_value_hash and literal_value_equal.
614 (add_value_map): Check for allocation failure. Update calls to
615 value_map_get_cached_value and literal_value_hash.
616 (text_action, text_action_list, text_action_t): New types.
617 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
618 text_action_add, text_action_add_literal, offset_with_removed_text,
619 offset_with_removed_text_before_fill, find_insn_action,
620 print_action_list, print_removed_literals): New.
621 (offset_with_removed_literals): Delete.
622 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
623 fix_array, fix_array_count, allocated_relocs, relocs_count, and
624 allocated_relocs_count fields.
625 (init_xtensa_relax_info): Initialize new fields.
626 (reloc_bfd_fix struct): Add new translated field.
627 (reloc_bfd_fix_init): Add translated parameter and use it to set the
628 translated field.
629 (fix_compare, cache_fix_array): New.
630 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
631 section via get_xtensa_relax_info. Use cache_fix_array to set up
632 sorted fix_array and use bsearch instead of linear search.
633 (section_cache_t): New struct.
634 (init_section_cache, section_cache_section, clear_section_cache): New.
635 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
636 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
637 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
638 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
639 New.
640 (retrieve_contents): Use bfd_get_section_limit.
641 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
642 to compute_removed_literals. Free value_map_hash_table when no longer
643 needed.
644 (analyze_relocations): Check is_relaxable_asm_section flag. Call
645 compute_text_actions for all sections.
646 (find_relaxable_sections): Mark sections as relaxable if they contain
647 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
648 call. Increment relax_info src_count field only for appropriate
649 relocation types. Remove is_literal_section check.
650 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
651 r_reloc_init and find_associated_l32r_irel. Check
652 is_relaxable_asm_section flag. Handle L32R instructions with absolute
653 literals. Pass is_abs_literal flag to init_source_reloc.
654 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
655 CONST16 instructions. Adjust calls to r_reloc_init and
656 pcrel_reloc_fits. Handle weak symbols conservatively.
657 (find_associated_l32r_irel): Add bfd parameter and pass it to
658 is_l32r_relocation.
659 (compute_text_actions, compute_ebb_proposed_actions,
660 compute_ebb_actions, check_section_ebb_pcrels_fit,
661 check_section_ebb_reduces, text_action_add_proposed,
662 compute_fill_extra_space): New.
663 (remove_literals): Replace with ...
664 (compute_removed_literals): ... this function. Call
665 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
666 Call xtensa_read_table_entries to get the property table. Skip
667 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
668 is_removable_literal, remove_dead_literal, and
669 identify_literal_placement functions.
670 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
671 instead of linear search.
672 (is_removable_literal, remove_dead_literal,
673 identify_literal_placement): New.
674 (relocations_reach): Update check for literal not referenced by any
675 PC-relative relocations. Adjust call to pcrel_reloc_fits.
676 (coalesce_shared_literal, move_shared_literal): New.
677 (relax_section): Use bfd_get_section_limit. Call
678 translate_section_fixes. Update calls to r_reloc_init and
679 offset_with_removed_text. Check new is_relaxable_asm_section flag.
680 Add call to pin_internal_relocs. Add special handling for
681 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
682 info to calculate new addend_displacement variable. Replace code for
683 deleting literals with more general code to perform the actions
684 determined by the action_list for the section.
685 (translate_section_fixes, translate_reloc_bfd_fix): New.
686 (translate_reloc): Check new is_relaxable_asm_section flag. Call
687 find_removed_literal only if is_operand_relocation. Update call to
688 offset_with_removed_text. Use new target_offset and removed_bytes
689 variables.
690 (move_literal): New.
691 (relax_property_section): Use bfd_get_section_limit. Set new
692 is_full_prop_section flag and handle new property tables. Update calls
693 to r_reloc_init and offset_with_removed_text. Check
694 is_relaxable_asm_section flag. Handle expansion of zero-sized
695 unreachable entries, with use of offset_with_removed_text_before_fill.
696 For relocatable links, combine entries only for literal tables.
697 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
698 calls to offset_with_removed_text. Translate st_size field for
699 function symbols.
700 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
701 failure. Add contents parameter. Update call to get_bfd_fix. Update
702 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
703 R_XTENSA_ASM_EXPAND relocs.
704 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
705 call to get_bfd_fix. Include offset from contents for partial_inplace
706 relocations.
707 (is_reloc_sym_weak): New.
708 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
709 (prop_sec_len): New.
710 (xtensa_is_property_section): Handle new property sections.
711 (is_literal_section): Delete.
712 (internal_reloc_compare): When r_offset matches, compare r_info and
713 r_addend to make sorting predictable.
714 (internal_reloc_matches): New.
715 (xtensa_get_property_section_name): Handle new property sections.
716 (xtensa_get_property_predef_flags): New.
717 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
718 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
719 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
720 (xtisa_errno, xtisa_error_msg): New variables.
721 (xtensa_isa_errno, xtensa_isa_error_msg): New.
722 (xtensa_insnbuf_alloc): Add error handling.
723 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
724 use xtensa_format_decode. Add error handling.
725 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
726 instruction length to find the number of bytes to copy.
727 (xtensa_isa_init): Add error handling. Replace calls to
728 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
729 tables in the xtensa_modules structure.
730 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
731 xtensa_extend_isa): Delete.
732 (xtensa_isa_free): Change to only free lookup tables.
733 (opname_lookup_compare): Replace with ...
734 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
735 (xtensa_insn_maxlength): Rename to ...
736 (xtensa_isa_maxlength): ... this.
737 (xtensa_insn_length): Delete.
738 (xtensa_insn_length_from_first_byte): Replace with ...
739 (xtensa_isa_length_from_chars): ... this function.
740 (xtensa_num_opcodes): Rename to ...
741 (xtensa_isa_num_opcodes): ... this.
742 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
743 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
744 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
745 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
746 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
747 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
748 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
749 (xtensa_opcode_lookup): Add error handling.
750 (xtensa_decode_insn): Replace with ...
751 (xtensa_opcode_decode): ... this function, with new format and
752 slot parameters. Add error handling.
753 (xtensa_encode_insn): Replace with ...
754 (xtensa_opcode_encode): ... this function, which does the encoding via
755 one of the entries in the "encode_fns" array. Add error handling.
756 (xtensa_opcode_name): Add error handling.
757 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
758 xtensa_opcode_is_call): New.
759 (xtensa_num_operands): Replace with ...
760 (xtensa_opcode_num_operands): ... this function. Add error handling.
761 (xtensa_opcode_num_stateOperands,
762 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
763 xtensa_opcode_funcUnit_use, xtensa_operand_name,
764 xtensa_operand_is_visible): New.
765 (xtensa_get_operand, xtensa_operand_kind): Delete.
766 (xtensa_operand_inout): Add error handling and special-case for
767 "sout" operands.
768 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
769 operate on one slot of an instruction. Added error handling.
770 (xtensa_operand_encode): Handle default operands with no encoding
771 functions. Check for success by comparing against decoded value.
772 Add error handling.
773 (xtensa_operand_decode): Handle default operands. Return decoded value
774 through argument pointer. Add error handling.
775 (xtensa_operand_is_register, xtensa_operand_regfile,
776 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
777 (xtensa_operand_isPCRelative): Rename to ...
778 (xtensa_operand_is_PCrelative): ... this. Add error handling.
779 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
780 through argument pointer. Add error handling.
781 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
782 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
783 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
784 xtensa_regfile_shortname, xtensa_regfile_view_parent,
785 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
786 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
787 xtensa_state_is_exported, xtensa_sysreg_lookup,
788 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
789 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
790 xtensa_interface_num_bits, xtensa_interface_inout,
791 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
792 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
793 * xtensa-modules.c: Rewrite to use new data structures.
794 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
795 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
796 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
797 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
798 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
799 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
800 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
801 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
802 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
803 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
804 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
805 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
806 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
807 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
808 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
809 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
810 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
811 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
812 * Makefile.in: Regenerate.
813 * bfd-in2.h: Likewise.
814 * libbfd.h: Likewise.
815
816 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
817
818 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
819 against the absolute section.
820 (mips_elf64_write_rela): Likewise.
821
822 2004-10-07 Jan Beulich <jbeulich@novell.com>
823
824 * elf.c (elf_find_function): Don't generally check for matching
825 section, just for non-file symbols. Remove redunant comparison
826 for the latter.
827 * elf32-arm.h (arm_elf_find_function): Likewise.
828
829 2004-10-07 Jeff Baker <jbaker@qnx.com>
830
831 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
832 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
833 was specified.
834
835 2004-10-04 Roland McGrath <roland@redhat.com>
836
837 * hash.c (bfd_hash_set_default_size): Use const for table.
838 Use size_t instead of int for variable compared to sizeof results.
839
840 2004-10-05 Alan Modra <amodra@bigpond.net.au>
841
842 PR 425
843 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
844
845 2004-10-01 Paul Brook <paul@codesourcery.com>
846
847 * elf32-arm.h (elf32_arm_fake_sections,
848 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
849 functions.
850 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
851
852 2004-10-01 Alan Modra <amodra@bigpond.net.au>
853
854 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
855 need_lsda_relative.
856 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
857 need_relative or need_lsda_relative if we are processing an
858 offset for a reloc on a FDE initial loc or LSDA field
859 respectively.
860 (_bfd_elf_write_section_eh_frame): Test need_relative and
861 need_lsda_relative in place of corresponding make_* field
862 when deciding to use pc-relative encodings.
863
864 2004-09-30 Paul Brook <paul@codesourcery.com>
865
866 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
867 target2 relocation type.
868
869 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
870
871 PR 414
872 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
873
874 2004-09-30 Paul Brook <paul@codesourcery.com>
875
876 * reloc.c: Add BFD_RELOC_ARM_SMI.
877 * bfd-in2.h: Regenerate.
878 * libbfd.h: Ditto.
879
880 2004-09-24 Alan Modra <amodra@bigpond.net.au>
881
882 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
883 vma and output offset to address.
884 * simple.c (simple_save_output_info): Only set output section
885 and offset for debug sections, or those not already set up by
886 the linker.
887 (bfd_simple_get_relocated_section_contents): Update comment.
888
889 2004-09-24 Alan Modra <amodra@bigpond.net.au>
890
891 * elf.c (IS_LOADED): Delete.
892 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
893 Restore SEC_HAS_CONTENTS test to the one place it was used prior
894 to 2004-09-22.
895
896 2004-09-23 Alan Modra <amodra@bigpond.net.au>
897
898 PR gas/396
899 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
900 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
901 redundant assignment of EM_SPARC.
902
903 2004-09-22 Brian Ford <ford@vss.fsi.com>
904
905 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
906 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
907 constants.
908 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
909
910 2004-09-22 Alan Modra <amodra@bigpond.net.au>
911
912 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
913 (elf_backend_modify_segment_map): Don't define.
914
915 2004-09-22 Alan Modra <amodra@bigpond.net.au>
916
917 * elf.c (IS_LOADED): Define.
918 (assign_file_positions_for_segments): Don't round up file offset of
919 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
920 Delete code handling link script adjustment of lma. Do the adjust
921 in later code handling similar ajustments. Remove dead code error
922 check. Warn if section lma would require a negative offset
923 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
924 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
925 update voff in section loop. Change voff in segment loop to be an
926 adjustment on top of "off". Set sec->filepos and update "off" later.
927 Test for loadable sections consistently using IS_LOADED. Similarly,
928 test for alloc-only sections other than .tbss consistently.
929 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
930 Tidy PT_NOTE handling. Use %B and %A in error messages.
931 (assign_file_positions_except_relocs): Use %B in error message.
932
933 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
934
935 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
936 (CONFIG_STATUS_DEPENDENCIES): New.
937 (Makefile): Removed.
938 (config.status): Likewise.
939 * Makefile.in: Regenerated.
940
941 2004-09-17 Paul Brook <paul@codesourcery.com>
942
943 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
944 (bfd_elf32_arm_process_before_allocation): Update prototype.
945 * bfd-in2.h: Regenerate.
946 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
947 (elf32_arm_link_hash_table_create): Set it.
948 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
949 (bfd_elf32_arm_set_target_relocs): New function.
950 (arm_real_reloc_type): New function.
951 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
952 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
953 (elf32_arm_gc_sweep_hook): Ditto.
954 (elf32_arm_check_relocs): Ditto.
955 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
956 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
957 R_ARM_GOT_TARGET2.
958 (elf32_arm_got_prel): New variable.
959 (elf32_arm_howto_from_type): New function.
960 (elf32_arm_info_to_howto): Use it.
961 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
962 BFD_RELOC_ARM_TARGET2.
963 * libbfd.h: Regenerate.
964 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
965
966 2004-09-17 Alan Modra <amodra@bigpond.net.au>
967
968 * ecoff.c: Update u.undef.next refs.
969 * elf64-ppc.c: Likewise.
970 * elflink.c: Likewise.
971 * linker.c: Likewise.
972 * xcofflink.c: Likewise.
973
974 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
975 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
976 fields to indirect struct.
977 * elf-m10300.c: Update u.weakdef refs.
978 * elf32-arm.h: Likewise.
979 * elf32-cris.c: Likewise.
980 * elf32-frv.c: Likewise.
981 * elf32-hppa.c: Likewise.
982 * elf32-i370.c: Likewise.
983 * elf32-i386.c: Likewise.
984 * elf32-m32r.c: Likewise.
985 * elf32-m68k.c: Likewise.
986 * elf32-ppc.c: Likewise.
987 * elf32-s390.c: Likewise.
988 * elf32-sh.c: Likewise.
989 * elf32-sparc.c: Likewise.
990 * elf32-vax.c: Likewise.
991 * elf32-xtensa.c: Likewise.
992 * elf64-alpha.c: Likewise.
993 * elf64-hppa.c: Likewise.
994 * elf64-ppc.c: Likewise.
995 * elf64-s390.c: Likewise.
996 * elf64-sh64.c: Likewise.
997 * elf64-sparc.c: Likewise.
998 * elf64-x86-64.c: Likewise.
999 * elfxx-ia64.c: Likewise.
1000 * elfxx-mips.c: Likewise.
1001 * elflink.c: Likewise. Also u.elf_hash_value.
1002 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
1003 indirection.
1004 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1005 (bfd_elf_gc_record_vtinherit): Alloc vtable.
1006 (bfd_elf_gc_record_vtentry): Likewise.
1007 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
1008
1009 2004-09-17 Alan Modra <amodra@bigpond.net.au>
1010
1011 * Makefile.am: Run "make dep-am".
1012 * Makefile.in: Regenerate.
1013 * bfd-in2.h: Regenerate.
1014 * po/SRC-POTFILES.in: Regenerate.
1015 * po/bfd.pot: Regenerate.
1016
1017 2004-09-16 Alan Modra <amodra@bigpond.net.au>
1018
1019 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
1020 with bitfields. Make "type" and "other" bitfields too.
1021 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
1022 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
1023 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
1024 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
1025 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
1026 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
1027 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
1028 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
1029 * elf-hppa.h: Update all uses of elf_link_hash_flags.
1030 * elf-m10300.c: Likewise.
1031 * elf.c: Likewise.
1032 * elf32-arm.h: Likewise.
1033 * elf32-cris.c: Likewise.
1034 * elf32-frv.c: Likewise.
1035 * elf32-hppa.c: Likewise.
1036 * elf32-i370.c: Likewise.
1037 * elf32-i386.c: Likewise.
1038 * elf32-m32r.c: Likewise.
1039 * elf32-m68k.c: Likewise.
1040 * elf32-ppc.c: Likewise.
1041 * elf32-s390.c: Likewise.
1042 * elf32-sh-symbian.c: Likewise.
1043 * elf32-sh.c: Likewise.
1044 * elf32-sh64.c: Likewise.
1045 * elf32-sparc.c: Likewise.
1046 * elf32-vax.c: Likewise.
1047 * elf32-xtensa.c: Likewise.
1048 * elf64-alpha.c: Likewise.
1049 * elf64-hppa.c: Likewise.
1050 * elf64-ppc.c: Likewise.
1051 * elf64-s390.c: Likewise.
1052 * elf64-sh64.c: Likewise.
1053 * elf64-sparc.c: Likewise.
1054 * elf64-x86-64.c: Likewise.
1055 * elflink.c: Likewise.
1056 * elfxx-ia64.c: Likewise.
1057 * elfxx-mips.c: Likewise.
1058 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
1059 * configure: Regenerate.
1060 * aclocal.m4: Regenerate.
1061
1062 2004-09-16 Alan Modra <amodra@bigpond.net.au>
1063
1064 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
1065 around uses of R_ARM_TARGET1.
1066 (elf32_arm_check_relocs): Likewise.
1067
1068 2004-09-13 Paul Brook <paul@codesourcery.com>
1069
1070 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
1071 prototype.
1072 * bfd-in2.h: Regenerate.
1073 * libbfd.h: Regenerate.
1074 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
1075 (elf32_arm_link_hash_table_create): Set target1_is_rel.
1076 (bfd_elf32_arm_process_before_allocation): Ditto.
1077 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
1078 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
1079 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
1080 * reloc.c: Ditto.
1081
1082 2004-09-10 Joel Brobecker <brobecker@gnat.com>
1083
1084 * hpux-core.c (thread_section_p): New function.
1085 (hpux_core_core_file_p): Fix computation of offset in call
1086 to bfd_seek. Create a ".reg" section from an arbitrary
1087 ".reg/<id>" section if none was created after having read
1088 all sections.
1089
1090 2004-09-11 Andreas Schwab <schwab@suse.de>
1091
1092 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
1093 * aclocal.m4: Rebuild.
1094 * configure: Rebuild.
1095
1096 2004-09-10 Joel Brobecker <brobecker@gnat.com>
1097
1098 * section.c (bfd_sections_find_if): Fix parameter name in
1099 comment to match code.
1100
1101 2004-09-10 Alan Modra <amodra@bigpond.net.au>
1102
1103 * elf.c (assign_file_positions_except_relocs): Assign relocs
1104 stored in a bfd section.
1105
1106 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
1107
1108 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
1109 h->gotplt_refcount to 0, not -1.
1110
1111 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
1112
1113 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
1114 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
1115 symname.
1116 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
1117 handle symbol visibility here.
1118
1119 2004-09-07 Alan Modra <amodra@bigpond.net.au>
1120
1121 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
1122 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
1123 callers.
1124 (ppc_stub_name): Remove trailing "+0" on stub name.
1125 (create_linkage_sections): Create relocations for
1126 branch lookup table when --emit-relocs as well as when --shared.
1127 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
1128 relbrlt test. For --emit-stub-syms, always output a sym even when
1129 one already exists on a plt call stub. Put stub type in the stub
1130 symbol name.
1131 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
1132 test.
1133 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
1134 reloc_count in stub sections. Adjust relbrlt test.
1135 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
1136 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
1137 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
1138 for relocs against discarded symbols. Fix comments.
1139
1140 2004-09-06 Mark Mitchell <mark@codesourcery.com>
1141
1142 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
1143 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
1144 from ...
1145 (map_sections_to_segments): ... here. Use it. Assign a file
1146 position to the .dynamic section if it is not loadable, but part
1147 of the PT_DYNAMIC segment.
1148 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
1149 offsets, not VMAs, for the BPABI. Do not fill in the header in
1150 the .got.plt section for the BPABI.
1151 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
1152 PT_DYNAMIC segment.
1153 (elf_backend_want_got_plt): Define to zero for Symbian OS.
1154
1155 2004-09-06 Nick Clifton <nickc@redhat.com>
1156
1157 * elflink.c (elf_link_add_object_symbols): Set the error code to
1158 bfd_error_wrong_format when the input format does not match the
1159 output format.
1160
1161 2004-09-06 Alan Modra <amodra@bigpond.net.au>
1162
1163 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
1164 (ppc64_elf_check_directives): ..here.
1165 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
1166 before accessing ppc64_elf_tdata.
1167 (ppc64_elf_finish_dynamic_sections): And here too.
1168
1169 2004-09-04 Alan Modra <amodra@bigpond.net.au>
1170
1171 * bfd.c (_bfd_default_error_handler): Correct loop exit.
1172
1173 2004-09-03 Mark Mitchell <mark@codesourcery.com>
1174
1175 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
1176 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
1177 (bfd_elf32_littlearm_symbian_vec): Likewise.
1178 * configure: Regenerated.
1179 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
1180 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
1181 (PLT_ENTRY_SIZE): Likewise.
1182 (bfd_vma_elf32_arm_symbian_plt_entry): New
1183 variable.
1184 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
1185 and symbian_p.
1186 (create_got_section): Don't create sections when generating BPABI
1187 objects.
1188 (elf32_arm_create_dynamic_sections): Tidy.
1189 (elf32_arm_link_hash_table_create): Set plt_header_size,
1190 plt_entry_size, and symbian_p.
1191 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
1192 generating BPABI objects.
1193 (allocate_dynrelocs): Use htab->plt_header_size, not
1194 PLT_HEADER_SIZE. Do not add to .got.plt when
1195 generating BPABI objects.
1196 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
1197 * elfarm-nabi.c: Add SymbianOS target vectors.
1198 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
1199 (_bfd_elf_link_create_dynamic_sections): Likewise.
1200 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
1201 (elfNN_bed): Use it.
1202 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
1203 (bfd_elf32_littlearm_symbian_vec): Likewise.
1204 (_bfd_target_vector): Add them.
1205
1206 2004-09-03 Nick Clifton <nickc@redhat.com>
1207
1208 PR 360
1209 * coffcode.h (handle_COMDAT): Replace abort with an warning
1210 message and allow the scan to continue.
1211
1212 2004-09-02 Alan Modra <amodra@bigpond.net.au>
1213
1214 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
1215 in when reading relocs, not our sorted syms. Remove unnecessary
1216 var.
1217
1218 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1219
1220 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
1221
1222 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
1223
1224 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
1225 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
1226 replace uses of *_alias with *_noncanonical.
1227 * aclocal.m4: Rebuild with aclocal 1.4p6.
1228 * Makefile.in: Rebuild with automake 1.4p6.
1229 * doc/Makefile.in: Rebuild with automake 1.4p6.
1230 * configure.in: Autoupdate with autoupdate 2.59.
1231 * config.in: Regenerate with autoheader 2.59.
1232 * configure: Regnerate with autoconf 2.59.
1233
1234 2004-08-28 Alan Modra <amodra@bigpond.net.au>
1235
1236 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
1237 symbol pointer arrays before modifying.
1238
1239 2004-08-28 Alan Modra <amodra@bigpond.net.au>
1240
1241 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
1242 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
1243 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
1244 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
1245 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
1246 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
1247 Use both symbol tables on non-relocatable objects. Use a common
1248 error exit. Fix "mid" warning.
1249 * libbfd.h: Regenerate.
1250 * bfd-in2.h: Regenerate.
1251
1252 2004-08-28 Alan Modra <amodra@bigpond.net.au>
1253
1254 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
1255 object file.
1256 (struct sfpr_def_parms): Save some space.
1257 (sfpr_define): Here too.
1258
1259 * elf64-ppc.c (compare_symbols): Put section syms first.
1260 (sym_exists_at): New function.
1261 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
1262 points only for relocatable files. Use .opd section contents
1263 otherwise. Generally clean up the code.
1264
1265 2004-08-27 Alan Modra <amodra@bigpond.net.au>
1266
1267 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
1268 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
1269 (struct sfpr_def_parms): New.
1270 (sfpr_define): New function.
1271 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
1272 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
1273 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
1274 (savefpr1_tail, restfpr1_tail): New functions.
1275 (savevr, savevr_tail, restvr, restvr_tail): New functions.
1276 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
1277 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
1278 code. Define all ABI mandated _save and _rest functions.
1279
1280 2004-08-26 Paul Brook <paul@codesourcery.com>
1281
1282 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
1283
1284 2004-08-26 Alan Modra <amodra@bigpond.net.au>
1285
1286 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
1287 TRUE or FALSE.
1288
1289 2004-08-26 Alan Modra <amodra@bigpond.net.au>
1290
1291 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
1292 that pcrel correction is applied for R_386_PC32.
1293
1294 2004-08-25 Alan Modra <amodra@bigpond.net.au>
1295
1296 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
1297 for R_386_32 and R_386_PC32 relocs against symbols defined in
1298 discarded sections.
1299
1300 2004-08-25 Dmitry Diky <diwil@spec.ru>
1301
1302 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
1303 Add new relocations.
1304 * bfd-in2.h: Regenerate.
1305 * libbfd.h: Regenerate.
1306 * elf32-msp430.c: Clean-up code.
1307 (elf_msp430_howto_table): Add new relocation entries.
1308 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
1309 (msp430_elf_relax_section): New function.
1310 (msp430_elf_relax_delete_bytes): New function.
1311 (msp430_elf_symbol_address_p): New function.
1312
1313 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1314
1315 * elf32-m32r.c (m32r_elf_relocate_section): Handle
1316 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
1317
1318 2004-08-20 Daniel Jacobowitz <dan@debian.org>
1319
1320 * elflink.c (_bfd_elf_section_already_linked): Handle
1321 SEC_LINK_DUPLICATES_SAME_CONTENTS.
1322
1323 2004-08-19 Mark Mitchell <mark@codesourcery.com>
1324
1325 * config.bfd (arm*-*-symbianelf*): New target.
1326 (arm*-*-eabi*): Likewise.
1327
1328 2004-08-19 Alan Modra <amodra@bigpond.net.au>
1329
1330 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
1331 "struct ppc_link_hash_entry *".
1332 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
1333 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
1334
1335 2004-08-19 Jakub Jelinek <jakub@redhat.com>
1336
1337 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
1338 entries (where fd_aux overlaps next entry's fd_func).
1339 Add non_overlapping argument, use it.
1340 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
1341 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
1342 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
1343 as indexes into opd_sym_map/opd_adjust array.
1344 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
1345
1346 2004-08-18 Alan Modra <amodra@bigpond.net.au>
1347
1348 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
1349 if we can look up their function descriptor in a regular file.
1350
1351 2004-08-18 Nick Clifton <nickc@redhat.com>
1352
1353 PR 324
1354 * cofflink.c (coff_link_add_symbols): Check that the comdat
1355 pointer in the coff_section_data structure has been initialised
1356 before using it.
1357
1358 2004-08-18 Alan Modra <amodra@bigpond.net.au>
1359
1360 PR 338
1361 * elflink.c (bfd_elf_record_link_assignment): Add comment about
1362 changing bfd_link_hash_undefined to bfd_link_hash_new.
1363
1364 2004-08-17 Jakub Jelinek <jakub@redhat.com>
1365
1366 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
1367 if not yet defined.
1368 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
1369 (synthetic_opd, synthetic_relocatable): New variables.
1370 (compare_symbols, compare_relocs): New helper routines.
1371 (ppc64_elf_get_synthetic_symtab): New function.
1372 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
1373 to relsyms.
1374 * bfd-in2.h: Regenerated.
1375 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
1376 to relsyms. Return 0 if abfd is relocatable.
1377
1378 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1379
1380 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
1381
1382 2004-08-17 Nick Clifton <nickc@redhat.com>
1383
1384 * (is_arm_mapping_symbol_name): New function - return true
1385 when a symbol name matches the requirements for an ARM mapping
1386 symbol name.
1387 (arm_elf_find_function): New function based on
1388 elf_find_function in elf.c but skipping ARM mapping symbols
1389 and including thumb function symbols.
1390 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
1391 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
1392
1393 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1394
1395 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
1396 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
1397 (ppc64_elf_brtaken_reloc): Here too.
1398
1399 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1400
1401 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
1402 symbol visibility.
1403 (ppc64_elf_check_directives): Check that we have the right hash
1404 table before proceeding.
1405
1406 2004-08-17 Alan Modra <amodra@bigpond.net.au>
1407
1408 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
1409 (adjust_opd_syms): Attach opd syms for deleted entries to one of
1410 the sections that will be discarded.
1411
1412 2004-08-16 Alan Modra <amodra@bigpond.net.au>
1413
1414 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
1415
1416 2004-08-16 Alan Modra <amodra@bigpond.net.au>
1417
1418 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
1419 free space available.
1420
1421 2004-08-16 Alan Modra <amodra@bigpond.net.au>
1422
1423 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
1424 occurrences with bfd_byte * thoughout file.
1425
1426 * coff-rs6000.c (do_shared_object_padding): Warning fix.
1427 (xcoff_write_armap_big): Likewise.
1428 (xcoff_write_archive_contents_old): Likewise.
1429 (xcoff_write_archive_contents_big): Likewise.
1430
1431 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
1432
1433 2004-08-13 Nick Clifton <nickc@redhat.com>
1434
1435 * elf32-arm.h: Convert to ISO C90.
1436
1437 2004-08-13 Alan Modra <amodra@bigpond.net.au>
1438
1439 PR 293
1440 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
1441 zero the plt field.
1442
1443 2004-08-13 Alan Modra <amodra@bigpond.net.au>
1444
1445 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
1446 (bfd_archive_filename, bfd_get_section_ident): Delete.
1447 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
1448 bfd_archive_filename.
1449 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
1450 to warn about symbols in discarded sections. Use _bfd_error_handler.
1451 * aout-adobe.c (aout_adobe_callback): See below.
1452 * aout-cris.c (swap_ext_reloc_in): ..
1453 * coff-arm.c (find_thumb_glue, find_arm_glue,
1454 coff_arm_relocate_section, bfd_arm_process_before_allocation,
1455 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
1456 coff_arm_copy_private_bfd_data): ..
1457 * coff-i860.c (i860_reloc_processing): ..
1458 * coff-mcore.c (mcore_coff_unsupported_reloc,
1459 coff_mcore_relocate_section): ..
1460 * coff-ppc.c (coff_ppc_relocate_section): ..
1461 * coff-rs6000.c (xcoff_create_csect_from_smclas
1462 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
1463 sh_swap_insns, sh_relocate_section): ..
1464 * coff-tic54x.c (tic54x_reloc_processing): ..
1465 * coff-tic80.c (coff_tic80_relocate_section): ..
1466 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
1467 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
1468 coff_slurp_symbol_table, coff_classify_symbol,
1469 coff_slurp_reloc_table): ..
1470 * coffgen.c (_bfd_coff_read_string_table): ..
1471 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
1472 _bfd_coff_generic_relocate_section): ..
1473 * cpu-arm.c (bfd_arm_merge_machines): ..
1474 * cpu-sh.c (sh_merge_bfd_arch): ..
1475 * elf-hppa.h (elf_hppa_relocate_section): ..
1476 * elf.c (bfd_elf_string_from_elf_section, setup_group,
1477 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
1478 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
1479 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
1480 * elf32-arm.h (find_thumb_glue, find_arm_glue,
1481 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
1482 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
1483 elf32_arm_relocate_section, elf32_arm_set_private_flags,
1484 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
1485 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
1486 cris_elf_merge_private_bfd_data
1487 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
1488 * elf32-gen.c (elf32_generic_link_add_symbols): ..
1489 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
1490 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
1491 elf32_hppa_relocate_section): ..
1492 * elf32-i370.c (i370_elf_merge_private_bfd_data,
1493 i370_elf_check_relocs, i370_elf_relocate_section): ..
1494 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
1495 elf_i386_relocate_section): ..
1496 * elf32-m32r.c (m32r_elf_relocate_section,
1497 m32r_elf_merge_private_bfd_data): ..
1498 * elf32-m68hc1x.c (m68hc12_add_stub,
1499 _bfd_m68hc11_elf_merge_private_bfd_data): ..
1500 * elf32-m68k.c (elf_m68k_relocate_section): ..
1501 * elf32-mcore.c (mcore_elf_unsupported_reloc,
1502 mcore_elf_relocate_section): ..
1503 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
1504 ppc_elf_check_relocs, ppc_elf_relocate_section,
1505 ppc_elf_begin_write_processing): ..
1506 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
1507 elf_s390_relocate_section): ..
1508 * elf32-sh-symbian.c (sh_symbian_import_as,
1509 sh_symbian_process_embedded_commands,
1510 sh_symbian_relocate_section): ..
1511 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
1512 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
1513 sh_elf_merge_private_data): ..
1514 * elf32-sparc.c (elf32_sparc_check_relocs,
1515 elf32_sparc_relocate_section,
1516 elf32_sparc_merge_private_bfd_data): ..
1517 * elf32-v850.c (v850_elf_check_relocs,
1518 v850_elf_merge_private_bfd_data): ..
1519 * elf32-xtensa.c (elf_xtensa_check_relocs,
1520 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
1521 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
1522 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
1523 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
1524 * elf64-gen.c (elf64_generic_link_add_symbols): ..
1525 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
1526 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
1527 ppc64_elf_relocate_section): ..
1528 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
1529 elf_s390_relocate_section): ..
1530 * elf64-sh64.c (sh_elf64_relocate_section): ..
1531 * elf64-sparc.c (sparc64_elf_check_relocs,
1532 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
1533 sparc64_elf_merge_private_bfd_data): ..
1534 * elf64-x86-64.c (elf64_x86_64_check_relocs,
1535 elf64_x86_64_relocate_section): ..
1536 * elflink.c (_bfd_elf_add_default_symbol,
1537 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
1538 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
1539 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
1540 elf_get_linked_section_vma, elf_fixup_link_order,
1541 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
1542 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
1543 * elfxx-ia64.c (elfNN_ia64_relax_section,
1544 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
1545 * elfxx-mips.c (mips_elf_perform_relocation,
1546 _bfd_mips_elf_check_relocs,
1547 _bfd_mips_elf_merge_private_bfd_data): ..
1548 * ieee.c (ieee_slurp_external_symbols): ..
1549 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
1550 * libbfd.c (_bfd_generic_verify_endian_match): ..
1551 * linker.c (_bfd_generic_link_add_one_symbol,
1552 _bfd_generic_section_already_linked): ..
1553 * pdp11.c (translate_to_native_sym_flags): ..
1554 * pe-mips.c (coff_pe_mips_relocate_section): ..
1555 * peicode.h (pe_ILF_build_a_bfd): ..
1556 * srec.c (srec_bad_byte): ..
1557 * stabs.c (_bfd_link_section_stabs): ..
1558 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
1559 Replace all uses of bfd_archive_filename and bfd_get_section_ident
1560 with corresponding %B and %A in _bfd_error_handler format string.
1561 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
1562 calls to use %A and %B. Fix "against symbol .. from section" and
1563 similar error messages. Combine multiple _bfd_error_handler calls
1564 where they were separated due to bfd_archive_filename deficiencies.
1565 * bfd-in2.h: Regenerate.
1566
1567 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
1568
1569 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
1570 relocation.
1571
1572 2004-08-10 Alan Modra <amodra@bigpond.net.au>
1573
1574 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
1575 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
1576 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
1577 Add twiddled_syms.
1578 (link_hash_newfunc): Init was_undefined.
1579 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
1580 Use undefweak instead.
1581 (ppc64_elf_check_directives): Fix undefs chain.
1582 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
1583 references.
1584 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
1585 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
1586 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
1587
1588 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1589
1590 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
1591 error, test input_section flags rather than sec.
1592
1593 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1594
1595 * elf-bfd.h (struct elf_backend_data): Add
1596 elf_backend_archive_symbol_lookup.
1597 (_bfd_elf_archive_symbol_lookup): Declare.
1598 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
1599 (elf_link_add_archive_symbols): ..extracted from here. Call the
1600 backend version.
1601 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
1602 (elfNN_bed): Init new field.
1603 * elf64-ppc.c (elf_backend_check_directives): Define.
1604 (elf_backend_archive_symbol_lookup): Define.
1605 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
1606 a ppc_link_hash_entry pointer.
1607 (get_fdh): Move.
1608 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
1609 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
1610 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
1611 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
1612 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
1613 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
1614 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
1615 descriptor symbols.
1616
1617 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1618
1619 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
1620 (ppc64_elf_add_symbol_hook): Test for NULL section.
1621 (get_sym_h): Formatting.
1622 (ppc64_elf_size_stubs): Include reloc addend in value stored as
1623 stub target_value.
1624
1625 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
1626 long branch stubs with code handling plt and r2off branch stubs.
1627
1628 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1629
1630 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
1631 * elflink.c (elf_link_input_bfd): Formatting.
1632 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
1633 all callers.
1634 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
1635 (link_hash_newfunc): Don't set it.
1636 (ppc64_elf_copy_indirect_symbol): Nor copy it.
1637 (ppc64_elf_mark_entry_syms): Delete.
1638 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
1639 sections. Use get_opd_info.
1640 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
1641
1642 2004-08-09 Alan Modra <amodra@bigpond.net.au>
1643
1644 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
1645
1646 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
1647 (func_desc_adjust): Don't set have_undefweak.
1648 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
1649 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
1650
1651 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
1652 "struct ppc_link_hash_entry *". Adjust all references.
1653 (ppc64_elf_hide_symbol): Correct a comment.
1654
1655 * elf64-ppc.c (get_opd_info): New function.
1656 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
1657 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
1658 before calling get_fdh. Test fdh rather than h before dereferencing
1659 fdh. Mark removed symbols in opd_adjust.
1660 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
1661 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
1662 opd symbols.
1663 (ppc64_elf_output_symbol_hook): Likewise.
1664
1665 2004-08-06 Paul Brook <paul@codesourcery.com>
1666
1667 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
1668 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
1669 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
1670 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
1671 and BFD_RELOC_ARM_SBREL32.
1672 * bfd-in2.h, bbfd.h: Regenerate.
1673
1674 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1675
1676 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
1677 the dynamic link symbol actually in use.
1678
1679 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
1680
1681 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
1682
1683 2004-07-31 Joel Brobecker <brobecker@gnat.com>
1684 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1685
1686 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
1687 SHN_MIPS_TEXT and SHN_MIPS_DATA.
1688
1689 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
1690 Nick Clifton <nickc@redhat.com>
1691
1692 PR 290
1693 * bfd.c (_bfd_default_error_handler): Make it global.
1694
1695 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
1696
1697 * elf.c (assign_section_numbers): Cope gracefully with sections
1698 which have SHF_LINK_ORDER set but no sh_link set up.
1699 * elflink.c (elf_get_linked_section_vma): Likewise.
1700
1701 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
1702 it to NULL.
1703
1704 * elfxx-target.h (elf_backend_link_order_error_handler): New.
1705 Set it to _bfd_default_error_handler.
1706 (elfNN_bed): Add elf_backend_link_order_error_handler.
1707
1708 * libbfd-in.h (_bfd_default_error_handler): New.
1709
1710 * libbfd.h: Regenerated.
1711
1712 2004-07-30 Jakub Jelinek <jakub@redhat.com>
1713
1714 * archures.c (bfd_mach_sparc_64bit_p): Define.
1715 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
1716 * bfd-in2.h: Rebuilt.
1717
1718 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
1719
1720 Introduce SH2a support.
1721 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
1722 * archures.c (bfd_mach_sh2a_nofpu): New.
1723 * bfd-in2.h: Rebuilt.
1724 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
1725 (arch_info_struct): Add sh2a_nofpu.
1726 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
1727 2003-12-29 DJ Delorie <dj@redhat.com>
1728 * reloc.c: Add relocs for sh2a.
1729 * bfd-in2.h: Regenerate.
1730 * libbfd.hh: Regenerate.
1731 2003-12-01 Michael Snyder <msnyder@redhat.com>
1732 * archures.c (bfd_mach_sh2a): New.
1733 * bfd-in2.h: Rebuilt.
1734 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
1735 (SH2A_NEXT): New.
1736 (arch_info_struct): Add sh2a.
1737 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
1738
1739 2004-07-28 Nick Clifton <nickc@redhat.com>
1740 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1741
1742 PR 273
1743 * som.c (setup_sections): Improve estimation of space sizes in
1744 relocatable objects.
1745
1746 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
1747 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
1748 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
1749 to targ_selvecs.
1750 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
1751 * configure: Regenerate.
1752 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
1753 case that accepts OSABI=NetBSD and OSABI=SysV.
1754 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
1755 the base of .got or .data (if .got does not exist).
1756 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
1757 set OSABI=NetBSD.
1758 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
1759 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
1760 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
1761 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
1762
1763 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
1764
1765 PR 161/251
1766 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
1767 (elf_sec_group): Defined.
1768 (bfd_elf_match_symbols_in_sections): New prototype.
1769 (_bfd_elf_setup_group_pointers): Likewise.
1770
1771 * elf.c (bfd_elf_discard_group): Abort.
1772 (bfd_elf_set_group_contents): Also include relocation sections.
1773 Remove zero-fill for ld -r.
1774 (_bfd_elf_setup_group_pointers): New function.
1775 (elf_sort_elf_symbol): Likewise.
1776 (elf_sym_name_compare): Likewise.
1777 (bfd_elf_match_symbols_in_sections): Likewise.
1778
1779 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
1780
1781 * elflink.c (match_group_member): New.
1782 (elf_link_input_bfd): Check group member for discarded section.
1783 (try_match_symbols_in_sections): New function.
1784 (already_linked): Likewise.
1785 (_bfd_elf_section_already_linked): Support mixing comdat group
1786 and linkonce section.
1787
1788 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
1789 * linker.c (bfd_section_already_linked_table_traverse): New.
1790
1791 * libbfd.h: Regenerated.
1792
1793 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
1794
1795 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
1796 BFD_RELOC_CRX_SWITCH32.
1797 * bfd-in2.h: Regenerate.
1798 * libbfd.h: Regenerate.
1799 * elf32-crx.c: Support relocation/relaxation of
1800 BFD_RELOC_CRX_SWITCH* types.
1801
1802 2004-07-27 Alan Modra <amodra@bigpond.net.au>
1803
1804 * elf64-ppc.c: Correct "Linker stubs" comment.
1805
1806 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
1807
1808 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
1809 linked-to section.
1810 (elf_linked_to_section): New.
1811
1812 * elf.c (assign_section_numbers): Set up sh_link for
1813 SHF_LINK_ORDER.
1814
1815 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
1816 to sh_link for SHT_IA_64_UNWIND sections.
1817
1818 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
1819
1820 * elflink.c (elf_fixup_link_order): Add _() to error message.
1821
1822 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
1823
1824 * elflink.c (elf_fixup_link_order): Issue a warning and flag
1825 an error if failed.
1826
1827 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
1828
1829 * aout-adobe.c (aout_32_section_already_linked): Defined.
1830 * aout-target.h (MY_section_already_linked): Likewise.
1831 * aout-tic30.c (MY_section_already_linked): Likewise.
1832 * binary.c (binary_section_already_linked): Likewise.
1833 * bout.c (b_out_section_already_linked): Likewise.
1834 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
1835 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
1836 * coffcode.h (coff_section_already_linked): Likewise.
1837 * i386msdos.c (msdos_section_already_linked): Likewise.
1838 * i386os9k.c (os9k_section_already_linked): Likewise.
1839 * ieee.c (ieee_section_already_linked): Likewise.
1840 * ihex.c (ihex_section_already_linked): Likewise.
1841 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
1842 * mmo.c (mmo_section_already_linked): Likewise.
1843 * nlm-target.h (nlm_section_already_linked): Likewise.
1844 * oasys.c (oasys_section_already_linked): Likewise.
1845 * pef.c (bfd_pef_section_already_linked): Likewise.
1846 * ppcboot.c (ppcboot_section_already_linked): Likewise.
1847 * som.c (som_bfd_discard_group): Likewise.
1848 * srec.c (srec_section_already_linked): Likewise.
1849 * tekhex.c (tekhex_section_already_linked): Likewise.
1850 * versados.c (versados_section_already_linked): Likewise.
1851 * vms.c (vms_section_already_linked): Likewise.
1852 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
1853 * xsym.c (bfd_sym_section_already_linked): Likewise.
1854
1855 * bfd-in.h (bfd_section_already_linked_table_init): New.
1856 (bfd_section_already_linked_table_free): Likewise.
1857
1858 * coff-rs6000.c (rs6000coff_vec): Add
1859 _bfd_generic_section_already_linked.
1860 (pmac_xcoff_vec): Likewise.
1861 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1862 (aix5coff64_vec): Likewise.
1863
1864 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
1865 * elflink.c (_bfd_elf_section_already_linked): New function.
1866
1867 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
1868
1869 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
1870 (_bfd_generic_section_already_linked): New.
1871 (bfd_section_already_linked_hash_entry): Likewise.
1872 (bfd_section_already_linked): Likewise.
1873 (bfd_section_already_linked_table_lookup): Likewise.
1874 (bfd_section_already_linked_table_insert): Likewise.
1875
1876 * linker.c (bfd_section_already_linked): New.
1877 (_bfd_section_already_linked_table): Likewise.
1878 (bfd_section_already_linked_table_lookup): Likewise.
1879 (bfd_section_already_linked_table_insert): Likewise.
1880 (already_linked_newfunc): Likewise.
1881 (bfd_section_already_linked_table_init): Likewise.
1882 (bfd_section_already_linked_table_free): Likewise.
1883 (_bfd_generic_section_already_linked): Likewise.
1884
1885 * section.c (bfd_section): Remove comdat.
1886 (bfd_comdat_info): Moved to ...
1887 * bfd-in.h (coff_comdat_info): Here.
1888 (bfd_coff_get_comdat_section): New.
1889 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
1890 * libcoff-in.h (coff_section_tdata): Add comdat.
1891 * coffcode.h (handle_COMDAT): Updated.
1892 * cofflink.c (coff_link_add_symbols): Likewise.
1893 * ecoff.c (bfd_debug_section): Likewise.
1894
1895 * targets.c (bfd_target): Add _section_already_linked.
1896 (BFD_JUMP_TABLE_LINK): Updated.
1897
1898 * bfd-in2.h: Regenerated.
1899 * libbfd.h: Likewise.
1900 * libcoff.h: Likewise.
1901
1902 2003-07-21 Paul Brook <paul@codesourcery.com>
1903
1904 * elflink.c (elf_get_linked_section_vma, compare_link_order,
1905 elf_fixup_link_order): New functions.
1906 (bfd_elf_final_link): Call elf_fixup_link_order.
1907
1908 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
1909
1910 * elf-bfd.h (ELF_COMMON_DEF_P): New.
1911 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
1912 common definitions.
1913 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
1914 _bfd_elf_symbol_refs_local_p.
1915 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
1916 symbols.
1917
1918 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
1919
1920 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
1921 DYN_NO_NEEDED.
1922 (bfd_elf_get_dyn_lib_class): New prototype.
1923 * elf.c (bfd_elf_get_dyn_lib_class): New function.
1924
1925 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
1926 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
1927 entry is needed. Issue an error if a DT_NEEDED entry is needed
1928 for a file marked DYN_NO_NEEDED.
1929 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
1930 for DT_NEEDED tags.
1931
1932 * bfd-in2.h: Regenerated.
1933
1934 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1935
1936 * elflink.c (elf_section_complain_discarded): Don't complain in
1937 .PARISC.unwind.
1938
1939 2004-07-10 James E Wilson <wilson@specifixinc.com>
1940
1941 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
1942 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
1943 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
1944 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
1945 Fix callers.
1946 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
1947 bfd_put_64 to bfd_putl64.
1948 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
1949
1950 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
1951
1952 PR 240
1953 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
1954 .init/.fini sections when trying to relax it.
1955
1956 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
1957
1958 * elf.c (assign_file_positions_for_segments): Make sure the
1959 .dynamic section is the first section in the PT_DYNAMIC segment.
1960
1961 2004-07-09 Nick Clifton <nickc@redhat.com>
1962
1963 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
1964 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
1965 sh_elf_get_flags_from_mach functions so that they do not conflict
1966 when this target is built with other sh-elf targets.
1967 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
1968 suppression of this function.
1969 (sh_elf_find_flags): Likewise.
1970
1971 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
1972
1973 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
1974 (ALL_MACHINES_CFILES): Add cpu-crx.c.
1975 (BFD32_BACKENDS): Add elf32-crx.lo.
1976 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
1977 (cpu-crx.lo): New target.
1978 (elf32-crx.lo): New target.
1979 * Makefile.in: Regenerate.
1980 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
1981 (bfd_archures_list): Add bfd_crx_arch.
1982 * bfd-in2.h: Regenerate.
1983 * config.bfd: Handle crx-*-elf*, crx*.
1984 * configure.in: Handle bfd_elf32_crx_vec.
1985 * configure: Regenerate.
1986 * cpu-crx.c: New file.
1987 * elf32-crx.c: Likewise.
1988 * libbfd.h: Regenerate.
1989 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
1990 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
1991 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
1992 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
1993 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
1994 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
1995 * targets.c (bfd_elf32_crx_vec): Declare.
1996 (bfd_target_vector): Add bfd_elf32_crx_vec.
1997
1998 2004-07-06 Nick Clifton <nickc@redhat.com>
1999
2000 * config.bfd: Add sh-symbian-elf target.
2001 * configure.in: Add bfd_elf32_shl_symbian_vec.
2002 * configure: Regenerate.
2003 * elf-bfd.h (struct elf_backend_data): Add new field
2004 'check_directives'.
2005 * elflink.c (elf_link_add_object_symbols): Invoke the
2006 check_directives function, if defined.
2007 * elfxx-target.h: Provide a default, NULL definition for
2008 check_directives.
2009 * targets.c: Add bfd_elf32_shl_symbian_vec.
2010 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
2011 definition.
2012 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
2013 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
2014 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
2015 not already been defined.
2016 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
2017 * sh-symbian.c: New file. Provide functions to support the
2018 * sh-symbian-elf target.
2019 * Makefile.am: Add elf32-sh-symbian.c
2020 * Makefile.in: Regenerate.
2021
2022 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
2023
2024 * elf32-sh.c: Include ../opcodes/sh-opc.h.
2025 * Makefile.am: Ran make dep-am.
2026 * Makefile.in: Ran make dep-in.
2027
2028 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2029
2030 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
2031 externals properly.
2032
2033 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
2034
2035 * config.bfd: Add want64 to configuration target s390-*-linux*.
2036
2037 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
2038
2039 * bfd.c (bfd_get_section_ident): New.
2040
2041 * elflink.c (elf_link_read_relocs_from_section): Call
2042 bfd_get_section_ident to identify the section when reporting
2043 error.
2044 (_bfd_elf_link_output_relocs): Likewise.
2045 (elf_link_output_extsym): Likewise.
2046 (elf_link_input_bfd): Likewise.
2047 (bfd_elf_gc_record_vtinherit): Likewise.
2048
2049 * bfd-in2.h: Regenerated.
2050
2051 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
2052 Nick Clifton <nickc@redhat.com>
2053
2054 PR 204
2055 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
2056 of section symbols to mips_elf_sort_hash_table ().
2057
2058 2004-07-01 Alan Modra <amodra@bigpond.net.au>
2059
2060 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
2061 change. Comment.
2062 (elf_section_complain_discarded): New function. Handle
2063 .gcc_except_table too.
2064 (elf_link_input_bfd): Rewrite handling of relocs against symbols
2065 in discarded sections.
2066 * elf-bfd.h (elf_discarded_section): Protect macro arg.
2067
2068 2004-06-30 James E Wilson <wilson@specifixinc.com>
2069
2070 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
2071 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
2072
2073 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
2074
2075 PR 233
2076 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
2077 local references to discarded sections and report their
2078 locations.
2079
2080 2004-06-30 Alan Modra <amodra@bigpond.net.au>
2081
2082 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
2083 sec_info_type, test section name instead.
2084
2085 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
2086
2087 PR 240
2088 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
2089 in .init/.fini sections.
2090
2091 2004-06-29 Bob Wilson <bob.wilson@acm.org>
2092
2093 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
2094 bfd_get_section_limit.
2095
2096 2004-06-29 Bob Wilson <bob.wilson@acm.org>
2097
2098 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
2099 output section size.
2100
2101 2004-06-29 Alan Modra <amodra@bigpond.net.au>
2102
2103 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
2104 rawsize.
2105 (mmix_elf_perform_relocation): Adjust for above change.
2106 (mmix_elf_relocate_section): Likewise.
2107 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
2108 (mmix_elf_get_section_contents): Delete.
2109 (bfd_elf64_get_section_contents): Delete.
2110 (mmix_elf_relocate_section): Zero stub area.
2111 * linker.c (default_indirect_link_order): Alloc max of section size
2112 and rawsize.
2113 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
2114 * section.c (bfd_malloc_and_get_section): Likewise.
2115 (struct bfd_section): Update rawsize comment.
2116 * bfd-in2.h: Regenerate.
2117
2118 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
2119
2120 2004-06-29 Alan Modra <amodra@bigpond.net.au>
2121
2122 * bfd-in.h (bfd_get_section_limit): Define.
2123 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
2124 (_bfd_final_link_relocate): Use bfd_get_section_limit.
2125 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
2126 * coff-arm.c (coff_arm_relocate_section): Likewise.
2127 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
2128 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
2129 (bfd_ns32k_final_link_relocate): Likewise.
2130 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
2131 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
2132 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
2133 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
2134 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
2135 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
2136 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
2137 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
2138 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
2139 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
2140 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
2141 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
2142 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
2143 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
2144 * elf32-v850.c (v850_elf_reloc): Likewise.
2145 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
2146 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
2147 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
2148 * elf64-mips.c (mips_elf64_gprel32_reloc)
2149 (mips16_gprel_reloc): Likewise.
2150 * elf64-mmix.c (mmix_elf_reloc): Likewise.
2151 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
2152 * elf64-sparc.c (init_insn_reloc): Likewise.
2153 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
2154 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
2155 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
2156 (_bfd_mips_elf_generic_reloc): Likewise.
2157 * bfd-in2.h: Regenerate.
2158
2159 2004-06-28 Alan Modra <amodra@bigpond.net.au>
2160
2161 * bfd-in.h (struct stab_info): Move from stabs.c.
2162 * stabs.c (struct stab_link_includes_table): Delete.
2163 (stab_link_includes_lookup): Delete.
2164 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
2165 level of indirection from sinfo parm.
2166 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
2167 stabstr section. Adjust hash table accesses.
2168 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
2169 alloc. Adjust stab_info test.
2170 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
2171 (_bfd_coff_final_link): Adjust stab_info test.
2172 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
2173 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
2174 in place.
2175 * libcoff-in.h (struct coff_link_hash_table): Likewise.
2176 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
2177 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
2178 stabstr section. Adjust stab_info test.
2179 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
2180 (_bfd_write_stab_strings): Adjust prototypes.
2181 * libbfd.h: Regenerate.
2182 * libcoff.h: Regenerate.
2183 * bfd-in2.h: Regenerate.
2184
2185 2004-06-27 Mark Kettenis <kettenis@gnu.org>
2186
2187 From Miod Vallat <miod@online.fr>:
2188 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
2189
2190 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
2191
2192 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
2193 (struct elf32_mn10300_link_hash_entry): Remove
2194 pcrel_relocs_copied.
2195 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
2196 R_MN10300_32. Don't adjust pcrel_relocs_copied.
2197 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
2198 and gotoff relocations if the symbol doesn't bind locally. Use
2199 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
2200 relocation for PCREL32.
2201 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
2202 to test whether a symbol binds locally.
2203 (elf32_mn10300_link_hash_newfunc): Don't initialize
2204 pcrel_relocs_copied.
2205 (_bfd_mn10300_elf_discard_copies): Delete.
2206 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
2207
2208 2004-06-26 Mark Kettenis <kettenis@gnu.org>
2209
2210 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
2211
2212 2004-06-25 Joel Brobecker <brobecker@gnat.com>
2213
2214 * som.c (som_set_reloc_info): Correct small typo.
2215
2216 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2217
2218 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
2219 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
2220 (m32r_elf_gcsweep_hook): Likewise.
2221 (m32r_elf_check_relocs): Likewise.
2222 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
2223 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
2224 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
2225 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
2226 * bfd-in2.h: Regenerated.
2227 * libbfd.h: Regenerated.
2228
2229 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
2230
2231 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
2232 relocation symbol.
2233 (elf64_x86_64_relocate_section): Issue an error for
2234 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
2235 against global symbols when building shared library.
2236
2237 2004-06-24 Alan Modra <amodra@bigpond.net.au>
2238
2239 * section.c (struct sec): Rename "_cooked_size" to "size".
2240 Rename "_raw_size" to "rawsize".
2241 (STD_SECTION): Adjust comments.
2242 (bfd_set_section_size, bfd_get_section_contents): Use size.
2243 (bfd_malloc_and_get_section): New function.
2244 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
2245 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
2246 Correctly free reloc and contents memory.
2247 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
2248 and fake CIE now that we can shink section size to zero.
2249 (_bfd_elf_write_section_eh_frame): Likewise..
2250 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
2251 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
2252 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
2253 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
2254 unneeded indirection.
2255 * elf.c (_bfd_elf_section_offset): .. and update call.
2256 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
2257 * libbfd.h: Regenerate.
2258 * bfd-in2.h: Regenerate.
2259
2260 Replace occurrences of "_raw_size" and "_cooked_size" in most places
2261 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
2262 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
2263 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
2264 Similarly use "rawsize", if non-zero, in reloc functions to validate
2265 reloc addresses. Use new bfd_malloc_and_get_section in most places
2266 where bfd_get_section_contents was called. Expand all occurrences of
2267 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
2268 grok_prstatus and similar functions to "size".
2269 * aix386-core.c (aix386_core_file_p): ..
2270 * aix5ppc-core.c (xcoff64_core_p): ..
2271 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
2272 aout_adobe_set_section_contents): ..
2273 * aout-target.h (callback): ..
2274 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
2275 MY_bfd_final_link): ..
2276 * aoutf1.h (sunos4_core_file_p): ..
2277 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
2278 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
2279 final_link, aout_link_input_section): ..
2280 * binary.c (binary_object_p, binary_canonicalize_symtab,
2281 binary_set_section_contents): ..
2282 * bout.c (b_out_callback, b_out_write_object_contents,
2283 b_out_set_section_contents, b_out_bfd_relax_section,
2284 b_out_bfd_get_relocated_section_contents): ..
2285 * cisco-core.c (cisco_core_file_validate): ..
2286 * coff-alpha.c (alpha_ecoff_object_p,
2287 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
2288 * coff-arm.c (coff_arm_relocate_section,
2289 bfd_arm_allocate_interworking_sections): ..
2290 * coff-h8300.c (h8300_reloc16_extra_cases,
2291 h8300_bfd_link_add_symbols): ..
2292 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
2293 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
2294 ppc_bfd_coff_final_link): ..
2295 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
2296 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
2297 sh_align_loads, sh_coff_get_relocated_section_contents): ..
2298 * coff64-rs6000.c (xcoff64_write_object_contents,
2299 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
2300 * coffcode.h (coff_compute_section_file_positions,
2301 coff_write_object_contents): ..
2302 * coffgen.c (make_a_section_from_file, coff_write_symbols,
2303 coff_section_symbol, build_debug_section): ..
2304 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
2305 process_embedded_commands, _bfd_coff_link_input_bfd,
2306 _bfd_coff_write_global_sym): ..
2307 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
2308 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
2309 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
2310 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2311 _bfd_dwarf2_find_nearest_line): ..
2312 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
2313 ecoff_compute_section_file_positions,
2314 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
2315 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
2316 _bfd_elf_discard_section_eh_frame_hdr,
2317 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
2318 _bfd_elf_write_section_eh_frame,
2319 _bfd_elf_write_section_eh_frame_hdr): ..
2320 * elf-hppa.h (elf_hppa_sort_unwind): ..
2321 * elf-m10200.c (mn10200_elf_relax_section,
2322 mn10200_elf_relax_delete_bytes,
2323 mn10200_elf_get_relocated_section_contents): ..
2324 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
2325 mn10300_elf_check_relocs, mn10300_elf_relax_section,
2326 mn10300_elf_relax_delete_bytes,
2327 mn10300_elf_get_relocated_section_contents,
2328 _bfd_mn10300_elf_adjust_dynamic_symbol,
2329 _bfd_mn10300_elf_discard_copies,
2330 _bfd_mn10300_elf_size_dynamic_sections,
2331 _bfd_mn10300_elf_finish_dynamic_sections): ..
2332 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
2333 _bfd_elf_make_section_from_phdr, elf_fake_sections,
2334 bfd_elf_set_group_contents, map_sections_to_segments,
2335 elf_sort_sections, assign_file_positions_for_segments,
2336 SECTION_SIZE, copy_private_bfd_data,
2337 _bfd_elf_get_dynamic_reloc_upper_bound,
2338 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
2339 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
2340 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
2341 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
2342 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
2343 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
2344 bfd_elf32_arm_process_before_allocation,
2345 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
2346 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
2347 elf32_arm_write_section): ..
2348 * elf32-cris.c (cris_elf_grok_prstatus,
2349 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
2350 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
2351 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
2352 elf_cris_discard_excess_dso_dynamics,
2353 elf_cris_discard_excess_program_dynamics): ..
2354 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
2355 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
2356 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
2357 _frv_create_got_section, _frvfdpic_assign_plt_entries,
2358 elf32_frvfdpic_size_dynamic_sections,
2359 elf32_frvfdpic_modify_segment_map,
2360 elf32_frvfdpic_finish_dynamic_sections): ..
2361 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
2362 elf32_h8_get_relocated_section_contents): ..
2363 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
2364 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
2365 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
2366 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
2367 elf32_hppa_finish_dynamic_sections): ..
2368 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
2369 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
2370 i370_elf_finish_dynamic_sections): ..
2371 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
2372 allocate_dynrelocs, elf_i386_size_dynamic_sections,
2373 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
2374 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
2375 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
2376 * elf32-ip2k.c (ip2k_is_switch_table_128,
2377 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
2378 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
2379 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
2380 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
2381 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
2382 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
2383 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
2384 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
2385 m32r_elf_get_relocated_section_contents): ..
2386 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
2387 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
2388 m68hc11_elf_relax_delete_bytes): ..
2389 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
2390 m68hc12_elf_size_one_stub): ..
2391 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
2392 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
2393 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
2394 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
2395 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
2396 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
2397 elf32_mips_grok_prstatus): ..
2398 * elf32-or32.c (or32_elf_consth_reloc): ..
2399 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
2400 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
2401 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
2402 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
2403 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
2404 ppc_elf_final_write_processing): ..
2405 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
2406 allocate_dynrelocs, elf_s390_size_dynamic_sections,
2407 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
2408 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
2409 sh_elf_relax_delete_bytes, sh_elf_align_loads,
2410 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
2411 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
2412 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
2413 * elf32-sh64-com.c (sh64_address_in_cranges,
2414 sh64_get_contents_type): ..
2415 * elf32-sh64.c (sh64_find_section_for_address,
2416 sh64_elf_final_write_processing): ..
2417 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
2418 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
2419 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
2420 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
2421 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
2422 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
2423 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
2424 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
2425 elf_vax_finish_dynamic_sections): ..
2426 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
2427 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
2428 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
2429 xstormy16_elf_finish_dynamic_sections): ..
2430 * elf32-xtensa.c (xtensa_read_table_entries,
2431 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
2432 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
2433 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
2434 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
2435 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
2436 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
2437 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
2438 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
2439 xtensa_callback_required_dependence): ..
2440 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
2441 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
2442 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
2443 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
2444 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
2445 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
2446 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
2447 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
2448 * elf64-hppa.c (allocate_dynrel_entries,
2449 elf64_hppa_size_dynamic_sections,
2450 elf64_hppa_finish_dynamic_sections): ..
2451 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
2452 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
2453 elf64_mips_grok_prstatus): ..
2454 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
2455 mmix_elf_relocate_section, mmix_elf_final_link,
2456 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
2457 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
2458 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
2459 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
2460 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
2461 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
2462 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
2463 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
2464 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
2465 ppc64_elf_finish_dynamic_sections): ..
2466 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
2467 allocate_dynrelocs, elf_s390_size_dynamic_sections,
2468 elf_s390_finish_dynamic_sections): ..
2469 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
2470 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
2471 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
2472 sh64_elf64_finish_dynamic_sections): ..
2473 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
2474 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
2475 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
2476 sparc64_elf_finish_dynamic_symbol,
2477 sparc64_elf_finish_dynamic_sections): ..
2478 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
2479 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
2480 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
2481 elf64_x86_64_finish_dynamic_sections): ..
2482 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
2483 * elfcode.h (elf_slurp_reloc_table): ..
2484 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
2485 elf_finalize_dynstr, elf_link_add_object_symbols,
2486 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
2487 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
2488 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
2489 elf32_mips_grok_prstatus): ..
2490 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
2491 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
2492 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
2493 elfNN_ia64_finish_dynamic_sections): ..
2494 * elfxx-mips.c (mips_elf_create_procedure_table,
2495 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
2496 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
2497 mips_elf_global_got_index, mips_elf_multi_got,
2498 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
2499 mips_elf_allocate_dynamic_relocations,
2500 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
2501 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
2502 _bfd_mips_elf_always_size_sections,
2503 _bfd_mips_elf_size_dynamic_sections,
2504 _bfd_mips_elf_finish_dynamic_symbol,
2505 _bfd_mips_elf_finish_dynamic_sections,
2506 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
2507 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
2508 _bfd_elf_mips_get_relocated_section_contents,
2509 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
2510 * hp300hpux.c (callback): ..
2511 * hppabsd-core.c (make_bfd_asection): ..
2512 * hpux-core.c (make_bfd_asection): ..
2513 * i386linux.c (linux_link_create_dynamic_sections,
2514 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
2515 * i386msdos.c (msdos_write_object_contents): ..
2516 * i386os9k.c (os9k_callback, os9k_write_object_contents,
2517 os9k_set_section_contents): ..
2518 * ieee.c (parse_expression, ieee_slurp_external_symbols,
2519 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
2520 ieee_write_section_part, do_with_relocs, do_as_repeat,
2521 do_without_relocs, ieee_write_debug_part, init_for_output,
2522 ieee_set_section_contents): ..
2523 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
2524 * irix-core.c (do_sections, make_bfd_asection): ..
2525 * libaout.h (aout_section_merge_with_text_p): ..
2526 * libbfd.c (_bfd_generic_get_section_contents,
2527 _bfd_generic_get_section_contents_in_window): ..
2528 * linker.c (default_indirect_link_order): ..
2529 * lynx-core.c (make_bfd_asection): ..
2530 * m68klinux.c (linux_link_create_dynamic_sections,
2531 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
2532 * mach-o.c (bfd_mach_o_make_bfd_section,
2533 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
2534 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
2535 bfd_mach_o_scan_read_segment): ..
2536 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
2537 _bfd_merge_sections): ..
2538 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
2539 mmo_map_set_sizes, mmo_canonicalize_symtab,
2540 mmo_internal_write_section, mmo_write_object_contents): ..
2541 * netbsd-core.c (netbsd_core_file_p): ..
2542 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
2543 nlm_alpha_set_public_section): ..
2544 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
2545 * nlm32-sparc.c (nlm_sparc_write_import): ..
2546 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
2547 nlm_compute_section_file_positions): ..
2548 * oasys.c (oasys_object_p, oasys_slurp_section_data,
2549 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
2550 * opncls.c (get_debug_link_info): ..
2551 * osf-core.c (make_bfd_asection): ..
2552 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
2553 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
2554 final_link, aout_link_input_section): ..
2555 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
2556 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
2557 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
2558 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
2559 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
2560 * ptrace-core.c (ptrace_unix_core_file_p): ..
2561 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
2562 _bfd_final_link_relocate, bfd_generic_relax_section,
2563 bfd_generic_get_relocated_section_contents): ..
2564 * reloc16.c (bfd_coff_reloc16_relax_section,
2565 bfd_coff_reloc16_get_relocated_section_c): ..
2566 * riscix.c (riscix_some_aout_object_p): ..
2567 * rs6000-core.c (read_hdr, make_bfd_asection): ..
2568 * sco5-core.c (make_bfd_asection): ..
2569 * simple.c (bfd_simple_get_relocated_section_contents): ..
2570 * som.c (som_object_setup, setup_sections, som_prep_headers,
2571 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
2572 som_set_reloc_info, som_get_section_contents,
2573 som_bfd_link_split_section): ..
2574 * sparclinux.c (linux_link_create_dynamic_sections,
2575 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
2576 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
2577 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
2578 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
2579 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
2580 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
2581 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
2582 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
2583 sunos_finish_dynamic_link): ..
2584 * syms.c (_bfd_stab_section_find_nearest_line): ..
2585 * tekhex.c (first_phase, tekhex_set_section_contents,
2586 tekhex_write_object_contents): ..
2587 * trad-core.c (trad_unix_core_file_p): ..
2588 * versados.c (process_esd, process_otr, process_otr): ..
2589 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
2590 * vms-misc.c (add_new_contents): ..
2591 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
2592 * vms.c (vms_set_section_contents): ..
2593 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
2594 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
2595 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
2596 * xsym.c (bfd_sym_scan): .. See above.
2597
2598 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
2599
2600 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
2601 calling _bfd_merged_section_offset only for section symbols.
2602
2603 2004-06-22 Alan Modra <amodra@bigpond.net.au>
2604
2605 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
2606 for handling SEC_MERGE symbols in relax_section.
2607
2608 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
2609
2610 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
2611 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
2612 linked together. Mark the result as h8300sx code.
2613
2614 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
2615
2616 * elf-bfd.h (struct elf_backend_data): Added
2617 elf_backend_omit_section_dynsym.
2618 (_bfd_elf_link_omit_section_dynsym): Declare.
2619 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
2620 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
2621 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
2622 (_bfd_elf_link_renumber_dynsyms): ... this function.
2623 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
2624 _bfd_elf_link_omit_section_dynsym).
2625 (elfNN_bed): Added elf_backend_omit_section_dynsym.
2626
2627 2004-06-21 Nick Clifton <nickc@redhat.com>
2628
2629 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
2630 flags.
2631
2632 2004-06-17 Jerome Guitton <guitton@gnat.com>
2633
2634 * bfd-in.h (bfd_cache_close_all): New function declaration.
2635 * bfd-in2.h: Regenerate.
2636 * cache.c (bfd_cache_close_all): New function definition.
2637
2638 2004-06-16 Mark Kettenis <kettenis@gnu.org>
2639
2640 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
2641 4.10 and beyond.
2642 * configure: Regenerate.
2643
2644 2004-06-16 Daniel Jacobowitz <dan@debian.org>
2645
2646 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
2647 the pre-existing section.
2648
2649 2004-06-15 Alan Modra <amodra@bigpond.net.au>
2650
2651 * section.c (struct sec): Remove usused flags. Reorganize a little.
2652 (bfd_get_section_size_before_reloc): Delete.
2653 (bfd_get_section_size_after_reloc): Delete.
2654 (STD_SECTION): Update.
2655 (bfd_get_section_size_now): Delete.
2656 (bfd_set_section_contents): Don't referece reloc_done.
2657 (bfd_get_section_contents): Remove reloc_done comment.
2658 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
2659 reloc_done.
2660 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
2661 * ecoff.c (bfd_debug_section): Update initializer.
2662 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
2663 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
2664 * bfd-in.h (bfd_section_size): Expand.
2665 (bfd_get_section_size): New macro.
2666 * bfd-in2.h: Regenerate.
2667 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
2668 bfd_get_section_size_before_reloc with bfd_get_section_size.
2669 * coffcode.h (coff_write_object_contents): Likewise.
2670 * coffgen.c (build_debug_section): Likewise.
2671 * dwarf1.c (parse_line_table): Likewise.
2672 (_bfd_dwarf1_find_nearest_line): Likewise.
2673 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2674 * i386msdos.c (msdos_write_object_contents): Likewise.
2675 * pdp11.c (squirt_out_relocs): Likewise.
2676 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
2677 * elf64-mmix.c (mmix_elf_final_link): Update comment.
2678
2679 2004-06-14 Chris Demetriou <cgd@broadcom.com>
2680
2681 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
2682 removal) with updated comment.
2683 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
2684 BFD_RELOC_32_PCREL.
2685 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
2686 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
2687
2688 2004-06-12 Alan Modra <amodra@bigpond.net.au>
2689
2690 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
2691 overflow on branches to undefweaks.
2692
2693 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2694
2695 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
2696 as ecoff_section_data() does not return a valid lvalue.
2697
2698 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
2699
2700 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
2701 (elf_link_add_object_symbols): Likewise.
2702
2703 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
2704 (elf_backend_reloc_type_class): New.
2705
2706 2004-06-08 Mark Kettenis <kettenis@gnu.org>
2707
2708 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
2709 netbsd-core.lo.
2710 * configure: Regenerate.
2711
2712 2004-06-07 Daniel Jacobowitz <dan@debian.org>
2713
2714 From: Albert Chin-A-Young <china@thewrittenword.com>
2715 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
2716 to unsigned int.
2717
2718 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
2719
2720 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
2721 change.
2722
2723 2004-05-28 DJ Delorie <dj@redhat.com>
2724
2725 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
2726 for linking, but otherwise adjust reloc for merged sections.
2727
2728 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
2729
2730 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
2731 _bfd_merged_section_offset for local symbols.
2732
2733 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
2734
2735 * Makefile.am: Regenerate dependencies.
2736 * Makefile.in: Regenerate.
2737 * archures.c: Add bfd_mach_sh3_nommu .
2738 * bfd-in2.h: Regenerate.
2739 * cpu-sh.c: Add sh3-nommu architecture.
2740 (bfd_to_arch_table): Create new table.
2741 (sh_get_arch_from_bfd_mach): Create new function.
2742 (sh_get_arch_up_from_bfd_mach): Create new function.
2743 (sh_merge_bfd_arch): Create new function.
2744 * elf32-sh.c (sh_ef_bfd_table): Add table.
2745 (sh_elf_check_relocs): Replace switch statement with
2746 use of sh_ef_bfd_table .
2747 (sh_elf_get_flags_from_mach): Add new function.
2748 (sh_find_elf_flags): Likewise.
2749 (sh_elf_copy_private_data): Replace most of non-elf contents
2750 with a call to sh_merge_bfd_arch() .
2751
2752 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
2753
2754 * Makefile.am (bfdver.h): Use explicit filename, not $< .
2755 * Makefile.in: Regenerate.
2756
2757 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
2758
2759 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
2760 custom calling conventions for dynamic symbols.
2761 (mn10300_elf_relax_section): Avoid relaxing a function as a local
2762 symbol if it's an alias to a global one.
2763
2764 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
2765
2766 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
2767 change.
2768
2769 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
2770
2771 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
2772 loop over hashes.
2773
2774 2004-05-26 Alan Modra <amodra@bigpond.net.au>
2775
2776 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
2777 for SHT_GROUP sections.
2778
2779 2004-05-25 Alan Modra <amodra@bigpond.net.au>
2780
2781 * elflink.c (elf_link_add_object_symbols): Don't set up merge
2782 section data here..
2783 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
2784 * merge.c: Formatting. Remove unnecessary casts. Expand
2785 bfd_get_section_alignment macro.
2786 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
2787 use throughout file.
2788 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
2789 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
2790 section name to determine sinfo group, instead test output section
2791 and alignment.
2792 (_bfd_merge_sections): Add struct bfd_link_info param. Call
2793 _bfd_strip_section_from_output rather than just twiddling flags.
2794 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
2795 (_bfd_merge_sections): Update prototype.
2796 * libbfd.h: Regenerate.
2797
2798 2004-05-24 Mark Kettenis <kettenis@gnu.org>
2799
2800 * netbsd-core.c: Correctly indent section that sets architecture
2801 from machine ID.
2802
2803 From Miod Vallat <miod@online.fr>:
2804 * m88kopenbsd.c: New file.
2805 * targets.c (m88k_openbsd_vec): New.
2806 * config.bfd: Add m88k-*-openbsd*.
2807 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
2808 (m88kopenbsd_vec): New.
2809 * configure: Regenerate.
2810 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
2811 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
2812 Run "make dep-am".
2813 * Makefile.in: Regenerate.
2814 * po/SRC-POTFILES.in: Regenerate.
2815
2816 2004-05-24 Nick Clifton <nickc@redhat.com>
2817
2818 * hash.c: Remove bogus node "Changing the default Hash Table Size"
2819 introduced by hash table size patch.
2820
2821 2004-05-22 Ben Elliston <bje@au.ibm.com>
2822
2823 * configure.in (is_release): Remove.
2824 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
2825 (AC_OUTPUT): Don't output bfdver.h from version.h.
2826 * configure: Regenerate.
2827 * Makefile.am (RELEASE): New variable.
2828 (bfdver.h): New target.
2829 * Makefile.in: Regenerate.
2830 * doc/Makefile.in: Likewise.
2831
2832 2004-05-22 Ben Elliston <bje@au.ibm.com>
2833
2834 * Makefile.am (config.status): Don't depend on version.h.
2835 * Makefile.in: Regenerate.
2836
2837 2004-05-22 Alan Modra <amodra@bigpond.net.au>
2838
2839 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
2840 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
2841 * libbfd.h: Regenerate.
2842 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
2843 (_bfd_elf_rel_local_sym): Likewise.
2844 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
2845 (elf_link_input_bfd): Likewise.
2846 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
2847 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2848 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2849 (elfNN_ia64_relocate_section): Likewise.
2850
2851 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
2852
2853 * hash.c (bfd_default_hash_table_size): New variable.
2854 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
2855 (bfd_hash_set_default_size): New function. Set the default size
2856 to a selected prime number close to the argument. Document new
2857 function.
2858 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
2859 * bfd-in2.h: Regenerate.
2860 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
2861 * Makefile.in: Regenerate.
2862
2863 2004-05-21 Mark Kettenis <kettenis@gnu.org>
2864
2865 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
2866 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
2867 arm, m68k, m88k and hppa core files.
2868
2869 2004-05-21 Nick Clifton <nickc@redhat.com>
2870
2871 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
2872 (bfd_bwrite): Likewise.
2873 (bfd_tell): Likewise.
2874 (bfd_flush): Likewise.
2875 (bfd_stat): Likewise.
2876 (bfd_seek): Likewise.
2877 (bfd_get_mtime): Likewise.
2878 (bfd_get_size): Likewise.
2879
2880 2004-05-19 Ben Elliston <bje@au.ibm.com>
2881
2882 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
2883
2884 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
2885
2886 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
2887 (bfd_generic_openr_next_archived_file): Likewise.
2888
2889 2004-05-17 Bob Wilson <bob.wilson@acm.org>
2890
2891 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
2892 section names by inserting a new substring after .gnu.linkonce, except
2893 for .gnu.linkonce.t.* where the "t." is replaced.
2894
2895 2004-05-17 Adam Nemet <anemet@lnxw.com>
2896
2897 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
2898 (m68-*-lynxos* case): Likewise.
2899 (powerpc-*-lyxnos* case): New case.
2900 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
2901
2902 2004-05-17 David Heine <dlheine@tensilica.com>
2903
2904 * aout-target.h (MY_bfd_copy_private_header_data): Define.
2905 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
2906 * bfd.c (bfd_copy_private_header_data): Define.
2907 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
2908 interface.
2909 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2910 * coffcode.h (coff_bfd_copy_private_header_data): Define.
2911 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
2912 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
2913 segments by calling copy_private_bfd_data.
2914 (_bfd_elf_copy_private_header_data): Define.
2915 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
2916 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
2917 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
2918 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
2919 * mmo.c (mmo_bfd_copy_private_header_data): Define.
2920 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
2921 * som.c (som_bfd_copy_private_header_data): Define.
2922 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
2923 * vms.c (vms_bfd_copy_private_header_data): Define.
2924 * bfd-in2.h: Regenerate.
2925 * libbfd.h: Regenerate.
2926
2927 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2928
2929 * elfxx-mips.c (MINUS_TWO): Define.
2930 (mips_elf_higher, mips_elf_highest,
2931 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
2932 some bfd_vma values.
2933 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
2934
2935 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2936
2937 * som.c (log2): Rename to exact_log2. Adjust all callers.
2938
2939 2004-05-13 Paul Brook <paul@codesourcery.com>
2940
2941 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
2942 dwarf3 format CIE entries. Remove comment about the size of the
2943 ra_column field. It is now correctly deduced.
2944
2945 2004-05-13 Joel Sherrill <joel@oarcorp.com>
2946
2947 * config.bfd (or32-*-rtems*): Switch to elf.
2948
2949 2004-05-13 Nick Clifton <nickc@redhat.com>
2950
2951 * po/fr.po: Updated French translation.
2952
2953 2004-05-11 Jakub Jelinek <jakub@redhat.com>
2954
2955 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
2956 into .dynsym if elf_section_data (sec)->dynindx <= 0.
2957 Adjust counting of last_local.
2958 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
2959 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
2960 created by the linker nor !SHF_ALLOC.
2961
2962 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
2963 DT_PLTGOT to the start of the .got.plt section instead of the
2964 .got output section. Set sh_entsize for .got section in addition
2965 to .got.plt.
2966 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
2967 is at sgot->output_section->vma.
2968 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
2969 DT_PLTGOT to the start of the .got.plt section instead of the
2970 .got output section.
2971 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
2972 is at sgot->output_section->vma. Set sh_entsize for .got section
2973 in addition to .got.plt.
2974 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
2975 (bfd_section_from_phdr): Likewise.
2976 (map_sections_to_segments): Likewise.
2977 (assign_file_positions_for_segments): Likewise.
2978 (get_program_header_size): Likewise.
2979 * elflink.c (bfd_elf_size_dynamic_sections): Set
2980 elf_tdata (output_bfd)->relro from info->relro.
2981 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
2982
2983 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
2984
2985 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
2986 a zero symndx for which we hadn't accounted a dynamic relocation.
2987 (_frvfdpic_add_rofixup): Likewise.
2988
2989 2004-05-07 Brian Ford <ford@vss.fsi.com>
2990 DJ Delorie <dj@redhat.com>
2991
2992 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
2993 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
2994 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
2995 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
2996
2997 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
2998
2999 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
3000 immediately if there's no link info.
3001 (elf32_frvfdpic_copy_private_bfd_data): New.
3002 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
3003
3004 2004-05-06 Zack Weinberg <zack@codesourcery.com>
3005
3006 * dwarf2.c (add_line_info): Also set info->filename to NULL if
3007 filename argument is null; do not call strlen on a null pointer.
3008
3009 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
3010
3011 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
3012 special case.
3013
3014 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
3015
3016 * configure.in (bfd_elf32_frvfdpic_vec): New.
3017 * configure: Rebuilt.
3018 * targets.c (bfd_elf32_frvfdpic_vec): New.
3019 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
3020 on the latter.
3021 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
3022 frvfdpic instead of frv. Rearrange elf-target macros such that
3023 the FDPIC-specific ones are only defined for this new target
3024 vector.
3025 (bfd_elf32_frvfdpic_vec): Declare.
3026 (IS_FDPIC): New.
3027 (elf32_frv_relocate_section): Use it to enable segment checking
3028 and to control rofixup emission. Add output section vma to
3029 applied relocation in non-LOAD non-ALLOC sections. Use
3030 _bfd_error_handler for errors.
3031 (_frv_create_got_section): Create .rel.got and .rofixup only in
3032 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
3033 linker script.
3034 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
3035 (elf32_frvfdpic_modify_segment_map): Likewise.
3036 (elf32_frv_finish_dynamic_sections): New, do-nothing.
3037 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
3038 error message if we miscompute the rofixup size.
3039 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
3040 (frvfdpic_elf_encode_eh_address): Likewise.
3041 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
3042 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
3043 relocs. Reject unknown relocation types.
3044 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
3045 (frv_elf_merge_private_bfd_data): Likewise.
3046 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
3047 0x4000 for newly-added elf32-frvfdpic.
3048
3049 2004-05-05 Nick Clifton <nickc@redhat.com>
3050
3051 PR/136
3052 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
3053 returning NULL as most users of this function do not check its
3054 return value.
3055 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
3056 of bfd_cache_lookup().
3057 * sco5-core.c (sco5_core_file_p): Likewise.
3058 * trad-core.c (trad_unix_core_file_p): Likewise.
3059
3060 2004-05-05 Nick Clifton <nickc@redhat.com>
3061
3062 * cache.c (bfd_cache_lookup): Improve formatting.
3063 * archive.c: Fix formatting.
3064
3065 2004-05-05 Peter Barada <peter@the-baradas.com>
3066
3067 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
3068 * cpu-m68k.c(bfd_m68k_arch): Likewise.
3069 * bfd-in2.h(bfd_architecture): Regenerate.
3070
3071 2004-05-03 Alan Modra <amodra@bigpond.net.au>
3072
3073 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
3074 SEC_MERGE sections.
3075 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
3076 those against discarded link-once and SEC_MERGE section symbols.
3077
3078 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
3079
3080 * section.c (bfd_get_section_by_name_if): New.
3081 * bfd-in2.h: Regenerated.
3082
3083 2004-05-02 Alan Modra <amodra@bigpond.net.au>
3084
3085 * som.c (som_bfd_is_group_section): Define.
3086
3087 2004-05-01 Alan Modra <amodra@bigpond.net.au>
3088
3089 * section.c (bfd_make_section_anyway): Copy the whole
3090 bfd_hash_entry, not just "next" from existing entry.
3091
3092 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
3093
3094 * elf.c (bfd_section_from_shdr): Maintain the section order in
3095 a section group.
3096 (special_sections): Add ".note.GNU-stack".
3097 (elf_fake_sections): Handle section group for relocatable
3098 link..
3099
3100 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
3101
3102 * section.c (bfd_sections_find_if): New.
3103 * bfd-in2.h: Regenerated.
3104
3105 2004-04-30 Alan Modra <amodra@bigpond.net.au>
3106
3107 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
3108
3109 * elf-bfd.h (bfd_elf_is_group_section): Declare.
3110 * elf.c (bfd_elf_is_group_section): New function.
3111 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
3112 * section.c (bfd_generic_is_group_section): New function.
3113 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
3114 (BFD_JUMP_TABLE_LINK): Adjust.
3115 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
3116 * aout-target.h (MY_bfd_is_group_section): Define.
3117 * aout-tic30.c (MY_bfd_is_group_section): Define.
3118 * bfd.c (bfd_is_group_section): Define.
3119 * binary.c (binary_bfd_is_group_section): Define.
3120 * bout.c (b_out_bfd_is_group_section): Define.
3121 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
3122 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
3123 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
3124 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
3125 * coffcode.h (coff_bfd_is_group_section): Define.
3126 * i386msdos.c (msdos_bfd_is_group_section): Define.
3127 * i386os9k.c (os9k_bfd_is_group_section): Define.
3128 * ieee.c (ieee_bfd_is_group_section): Define.
3129 * ihex.c (ihex_bfd_is_group_section): Define.
3130 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
3131 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
3132 * mmo.c (mmo_bfd_is_group_section): Define.
3133 * nlm-target.h (nlm_bfd_is_group_section): Define.
3134 * oasys.c (oasys_bfd_is_group_section): Define.
3135 * pef.c (bfd_pef_bfd_is_group_section): Define.
3136 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
3137 * srec.c (srec_bfd_is_group_section): Define.
3138 * tekhex.c (tekhex_bfd_is_group_section): Define.
3139 * versados.c (versados_bfd_is_group_section): Define.
3140 * vms.c (vms_bfd_is_group_section): Define.
3141 * xsym.c (bfd_sym_bfd_is_group_section): Define.
3142 * bfd-in2.h: Regenerate.
3143 * libbfd.h: Regenerate.
3144
3145 2004-04-30 Alan Modra <amodra@bigpond.net.au>
3146
3147 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
3148
3149 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
3150
3151 * configure.in: Update version to 2.15.91.
3152 * configure: Regenerate.
3153
3154 2004-04-29 Brian Ford <ford@vss.fsi.com>
3155
3156 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
3157 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
3158 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
3159 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
3160 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
3161 .gnu.linkonce.wi. sections.
3162 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
3163 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
3164 .gnu.linkonce.wi..
3165 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
3166 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3167
3168 2004-04-28 Chris Demetriou <cgd@broadcom.com>
3169
3170 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
3171 * bfd-in2.h: Regenerate.
3172 * libbfd.h: Likewise.
3173
3174 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3175
3176 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
3177 dup_common fields.
3178 (setup_sections): Use som_subspace_dictionary_record struct instead
3179 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
3180 is_comdat, is_common or dup_common.
3181 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
3182 is_comdat, is_common and dup_common in section subspace_dict from
3183 copy_data.
3184 (som_begin_writing): Use som_subspace_dictionary_record struct.
3185 (som_finish_writing): Likewise.
3186 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
3187 is_common and dup_common flags in info for symbol. Add comment
3188 regarding linker support for these fields. Slightly reorganize
3189 function.
3190 (som_build_and_write_symbol_table): Set is_comdat, is_common and
3191 dup_common fields in symbol table from symbol info.
3192 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
3193 arguments. Set corresponding fields in copy_data. Change all callers.
3194 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
3195 symbol table.
3196 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
3197 * som.h (som_subspace_dictionary_record): Define.
3198 (som_copyable_section_data_struct): Add is_comdat, is_common and
3199 dup_common fields.
3200 (som_section_data_struct): Use som_subspace_dictionary_record struct
3201 instead of subspace_dictionary_record.
3202 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
3203
3204 2004-04-27 Bob Wilson <bob.wilson@acm.org>
3205
3206 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
3207 if set. Check reloc_done flag before applying relocations. Use
3208 output addresses, both when applying relocations and when comparing
3209 against the specified section.
3210 (elf_xtensa_relocate_section): Use output address to check if dynamic
3211 reloc is in a literal pool. Set section's reloc_done flag.
3212
3213 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
3214
3215 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
3216 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
3217 section.
3218 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
3219 section.
3220
3221 2004-04-27 Alan Modra <amodra@bigpond.net.au>
3222
3223 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
3224 structure field removed in 2004-04-24 patch.
3225 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
3226
3227 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
3228 Constify hdr arg.
3229 * elf32-arm.h (elf32_arm_section_flags): Likewise.
3230 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
3231 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
3232 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
3233 field before calling elf_backend_section_flags.
3234
3235 2004-04-24 Chris Demetriou <cgd@broadcom.com>
3236
3237 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
3238 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
3239 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
3240 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
3241 and BFD_RELOC_32_PCREL.
3242 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
3243 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
3244 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
3245 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
3246 (mips_elf_next_relocation): Move comment about matching HI/LO
3247 relocations to...
3248 (_bfd_mips_elf_relocate_section): Here. Remove handling for
3249 R_MIPS_GNU_REL_HI16.
3250
3251 2004-04-23 Chris Demetriou <cgd@broadcom.com>
3252
3253 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
3254 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
3255 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
3256 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
3257 and update comments to reflect current usage.
3258 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
3259 and MIPS_R_SWITCH, as well as several empty entries. Update comment
3260 for MIPS_R_PCREL16.
3261 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
3262 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
3263 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
3264 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
3265 type number to be MIPS_R_PCREL16.
3266 (mips_relocate_section): Remove support for link-time relaxation
3267 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
3268 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
3269 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
3270 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
3271 relaxation of branches used by embedded-PIC.
3272 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
3273 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
3274 related members, update comment.
3275 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
3276 code related to embedded-PIC.
3277 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
3278 initialization of now-removed 'adjust' member of
3279 'struct ecoff_debug_info'.
3280
3281 2004-04-23 Chris Demetriou <cgd@broadcom.com>
3282
3283 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
3284
3285 2004-04-21 Philip Blundell <pb@nexus.co.uk>
3286
3287 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
3288 relocs for locally defined symbols during -shared final link.
3289 (elf32_arm_final_link_relocate): Likewise.
3290
3291 2004-04-22 Jakub Jelinek <jakub@redhat.com>
3292
3293 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
3294 ELF_LINK_POINTER_EQUALITY_NEEDED.
3295 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
3296 if r_type is not R_X86_64_PC32.
3297 (elf64_x86_64_finish_dynamic_symbol): If
3298 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
3299 SHN_UNDEF symbols.
3300
3301 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3302
3303 * elf32-sh.c (sh_elf_plt_sym_val): New function.
3304 (elf_backend_plt_sym_val): Define.
3305
3306 2004-04-22 Andrew Cagney <cagney@redhat.com>
3307
3308 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
3309
3310 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3311
3312 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
3313 make_bfd_asection.
3314 * som.c (som_set_section_contents): Constantify second argument.
3315 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
3316 (som_object_setup): Rework to avoid warning.
3317 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
3318 Likewise.
3319
3320 2004-04-22 Andrew Cagney <cagney@redhat.com>
3321
3322 * cache.c (bfd_cache_close): Check for a previously closed file.
3323
3324 2004-04-22 Jakub Jelinek <jakub@redhat.com>
3325
3326 * bfd.c (bfd_get_synthetic_symtab): Define.
3327 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
3328 NAME##_get_synthetic_symtab.
3329 (struct bfd_target): Add _bfd_get_synthetic_symtab.
3330 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
3331 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
3332 relplt_name fields.
3333 (_bfd_elf_get_synthetic_symtab): New prototype.
3334 * elfcode.h (elf_get_synthetic_symtab): Define.
3335 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
3336 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
3337 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
3338 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
3339 * bfd-in2.h: Rebuilt.
3340 * libbfd.h: Rebuilt.
3341 * elf32-i386.c (elf_i386_plt_sym_val): New function.
3342 (elf_backend_plt_sym_val): Define.
3343 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
3344 (elf_backend_plt_sym_val): Define.
3345 * elf32-s390.c (elf_s390_plt_sym_val): New function.
3346 (elf_backend_plt_sym_val): Define.
3347 * elf64-s390.c (elf_s390_plt_sym_val): New function.
3348 (elf_backend_plt_sym_val): Define.
3349 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
3350 (elf_backend_plt_sym_val): Define.
3351 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
3352 (elf_backend_plt_sym_val): Define.
3353 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
3354 (elf_backend_plt_sym_val): Define.
3355 * aout-target.h (MY_get_synthetic_symtab): Define.
3356 * aout-tic30.c (MY_get_synthetic_symtab): Define.
3357 * coff-rs6000.c (rs6000coff_vec): Add
3358 _bfd_nodynamic_get_synthetic_symtab.
3359 (pmac_xcoff_vec): Likewise.
3360 * coff64-rs6000.c (rs6000coff64_vec): Add
3361 _bfd_nodynamic_get_synthetic_symtab.
3362 (aix5coff64_vec): Likewise.
3363 * sunos.c (MY_get_synthetic_symtab): Define.
3364 * vms.c (vms_get_synthetic_symtab): Define.
3365
3366 2004-04-22 Nick Clifton <nickc@redhat.com>
3367
3368 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
3369
3370 2004-04-22 Peter Barada <peter@the-baradas.com>
3371
3372 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
3373 * bfd2-in.h: Regenerate.
3374 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
3375
3376 2004-04-21 Chris Demetriou <cgd@broadcom.com>
3377
3378 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
3379 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
3380 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
3381 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
3382 * bfd-in2.h: Regenerate.
3383
3384 2004-04-21 Bob Wilson <bob.wilson@acm.org>
3385
3386 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
3387 require relocations against a weak symbol to reference the same
3388 symbol hash entry if not a final, static link.
3389 (get_cached_value, add_value_map): Add final_static_link argument.
3390 (remove_literals): Pass final_static_link argument as needed.
3391
3392 2004-04-21 Andrew Cagney <cagney@redhat.com>
3393
3394 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
3395 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
3396 (opncls_bwrite, opncls_bclose, opncls_bflush)
3397 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
3398 bfd iovec that uses function callbacks.
3399 (bfd_close): Use the iovec's bclose.
3400 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
3401 (cache_bclose, cache_bflush, cache_bstat)
3402 (cache_iovec): New functions and global variable, implement a
3403 cache "iovec", where applicable set bfd_error.
3404 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
3405 * bfdio.c (struct bfd_iovec): Define.
3406 (real_read): Delete function.
3407 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
3408 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
3409 assume that bread and bwrite set bfd_error.
3410 * bfd.c (struct bfd): Add "iovec", update comments.
3411 * bfd-in2.h, libbfd.h: Re-generate.
3412
3413 2004-04-21 Andrew Cagney <cagney@redhat.com>
3414
3415 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
3416
3417 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
3418
3419 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
3420 (bfd_elf_gc_sections): Fail if a shared object is being created.
3421 Do not fail if dynamic sections have been created. Instead call
3422 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
3423 dynamically referenced symbols. Do not mark the whole graph
3424 rooted at .eh_frame, only the section proper.
3425
3426 2004-04-20 DJ Delorie <dj@redhat.com>
3427
3428 * reloc.c: Add BFD_RELOC_32_SECREL.
3429 * bfd-in2.h: Regenerate.
3430 * libbfd.h: Likewise.
3431 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
3432 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
3433 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
3434
3435 2004-04-19 Jakub Jelinek <jakub@redhat.com>
3436
3437 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
3438 relocs against hidden/protected undefweak symbols properly.
3439 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3440
3441 2004-04-18 Mark Kettenis <kettenis@gnu.org>
3442
3443 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
3444 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
3445 core files.
3446
3447 2004-04-17 Brian Ford <ford@vss.fsi.com>
3448
3449 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
3450 filepos for the SizeOfHeaders field.
3451 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
3452 overflow.
3453 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
3454
3455 2004-04-16 Alan Modra <amodra@bigpond.net.au>
3456
3457 * simple.c (bfd_simple_get_relocated_section_contents): Don't
3458 change reloc_done. Set and restore _cooked_size.
3459 (RETURN): Delete.
3460
3461 2004-04-15 Mark Kettenis <kettenis@gnu.org>
3462
3463 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
3464 core files.
3465
3466 2004-04-15 Nick Clifton <nickc@redhat.com>
3467
3468 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
3469
3470 2004-04-15 Alan Modra <amodra@bigpond.net.au>
3471
3472 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
3473
3474 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
3475
3476 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
3477 when it is a definition.
3478
3479 2004-04-14 Alan Modra <amodra@bigpond.net.au>
3480
3481 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
3482 when statically linking PIC code.
3483 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3484
3485 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3486
3487 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
3488 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
3489 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
3490 * configure: Regenerate.
3491
3492 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
3493
3494 * elflink.c: Include libiberty.h.
3495 * Makefile.am (elflink.lo): Depend on libiberty.h.
3496 * Makefile.in: Regenerate.
3497
3498 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
3499
3500 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
3501 ".MIPS.stubs".
3502
3503 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
3504
3505 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
3506 reserve the memory for dynamic linker
3507
3508 2004-04-05 Mark Kettenis <kettenis@gnu.org>
3509
3510 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
3511 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
3512
3513 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
3514
3515 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
3516 RELOC_FOR_GLOBAL_SYMBOL.
3517 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
3518
3519 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
3520
3521 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3522 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
3523
3524 2004-04-01 Paul Brook <paul@codesourcery.com>
3525
3526 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
3527 * elf32-arm.h (struct elf32_elf_section_map): New.
3528 (struct _arm_elf_section_data): New.
3529 (elf32_arm_section_data): Define.
3530 (struct elf32_arm_link_hash_table): Add byteswap_code.
3531 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
3532 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
3533 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
3534 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
3535 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
3536 (bfd_elf32_new_section_hook, elf_backend_write_section,
3537 elf_backend_link_output_symbol_hook): Define.
3538
3539 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
3540
3541 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
3542 that keeps the characters in a B_INCL..B_EINCL range.
3543 (_bfd_link_section_stabs): When computing the sum of the
3544 characters in a B_INCL..B_EINCL range also keep a copy of those
3545 characters. Use this information to distinguish between
3546 include sections that have the same sum and the same length
3547 but which are nevertheless unique.
3548
3549 2004-03-31 Paul Brook <paul@codesourcery.com>
3550
3551 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
3552 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
3553
3554 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
3555
3556 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
3557 to 'sum_chars' and add field 'num_chars'.
3558 (_bfd_link_section_stabs): When computing the sum of the
3559 characters in a B_INCL..B_EINCL range also keep a count of the
3560 number of characters. Use this information to help distinguish
3561 between include sections when have the same sum but which
3562 nevertheless are still unique.
3563
3564 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
3565
3566 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
3567
3568 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
3569 Tomer Levi <Tomer.Levi@nsc.com>
3570
3571 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
3572 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
3573 (BFD32_BACKENDS): Add elf32-cr16c.lo.
3574 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
3575 (cpu-cr16c.lo): New target.
3576 (elf32-cr16c.lo): Likewise.
3577 * Makefile.in: Regenerate.
3578 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
3579 (bfd_archures_list): Add bfd_cr16c_arch.
3580 * config.bfd: Handle cr16c-*-elf*.
3581 * configure.in: Handle bfd_elf32_cr16c_vec.
3582 * configure: Regenerate.
3583 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
3584 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
3585 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
3586 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
3587 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
3588 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
3589 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
3590 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
3591 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
3592 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
3593 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
3594 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
3595 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
3596 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
3597 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
3598 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
3599 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
3600 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
3601 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
3602 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
3603 * targets.c (bfd_elf32_cr16c_vec): Declare.
3604 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
3605 * cpu-cr16c.c: New file.
3606 * elf32-cr16c.c: Likewise.
3607 * libbfd.h: Regenerate.
3608 * bfd-in2.h: Likewise.
3609
3610 2004-03-30 Jakub Jelinek <jakub@redhat.com>
3611
3612 * elf.c (map_sections_to_segments): Fix handling of .tbss.
3613
3614 2004-03-27 Alan Modra <amodra@bigpond.net.au>
3615
3616 * Makefile.am: Remove all mention of elflink.h.
3617 * Makefile.in: Regenerate.
3618 * bfd-in.h (bfd_elf_discard_info): Declare.
3619 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
3620 * bfd-in2.h: Regenerate.
3621 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
3622 bfd_elf32_link_record_dynamic_symbol,
3623 bfd_elf64_link_record_dynamic_symbol,
3624 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
3625 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
3626 _bfd_elf32_link_record_local_dynamic_symbol,
3627 _bfd_elf64_link_record_local_dynamic_symbol,
3628 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
3629 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
3630 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
3631 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
3632 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
3633 _bfd_elf32_reloc_symbol_deleted_p,
3634 _bfd_elf64_reloc_symbol_deleted_p): Delete.
3635 (bfd_elf_link_record_dynamic_symbol,
3636 bfd_elf_link_record_local_dynamic_symbol,
3637 bfd_elf_final_link, bfd_elf_gc_sections,
3638 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
3639 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
3640 bfd_elf_reloc_symbol_deleted_p): Declare.
3641 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3642 * elf32-arm.h: Update for changed function names. Remove local
3643 WILL_CALL_FINISH_DYNAMIC_SECTION define.
3644 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
3645 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
3646 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
3647 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
3648 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3649 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
3650 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
3651 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
3652 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
3653 (bfd_elfNN_print_symbol): Define.
3654 * elfcode.h: Don't include elflink.h.
3655 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
3656 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
3657 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
3658 elf_gc_record_vtinherit, elf_gc_record_vtentry,
3659 elf_link_record_local_dynamic_symbol): Don't define.
3660 * elflink.c: Update for changed function names. Move elflink.h
3661 code here.
3662 * elflink.h: Delete file.
3663 * po/SRC-POTFILES.in: Regenerate.
3664 * po/bfd.pot: Regenerate.
3665
3666 2004-03-27 Alan Modra <amodra@bigpond.net.au>
3667
3668 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
3669 "name" for global syms accidentally removed in 2004-03-20 change.
3670
3671 2004-03-27 Alan Modra <amodra@bigpond.net.au>
3672
3673 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
3674 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
3675 where Elf_External_* is different for 64 and 32 bit, with
3676 corresponding elf_size_info field.
3677 (struct elf_final_link_info): Use "bfd_byte *" instead
3678 of "Elf_External_Sym *" for external_syms and symbuf.
3679 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
3680 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
3681 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
3682 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
3683 (elf_link_sort_cmp2): Adjust.
3684 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
3685 using ELF_R_SYM macro. Set u.sym_mask.
3686 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
3687 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
3688 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
3689 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
3690 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
3691 swap_syn_out functions. Rearrange dyn swap in/out switch.
3692 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
3693 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
3694 (elf_link_flush_output_syms): Add elf_backend_data arg.
3695 (elf_link_check_versioned_symbol): Likewise.
3696 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
3697 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
3698 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
3699 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
3700 ELF_R_TYPE and ELF_R_INFO macros.
3701 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
3702 based on size rather than using ELF_R_INFO.
3703 (elf_gc_mark): Set up r_sym_shift local var and use instead of
3704 ELF_R_SYM macro.
3705 (struct alloc_got_off_arg): New.
3706 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
3707 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
3708 (elf_gc_allocate_got_offsets): Adjust.
3709 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
3710 ELF_R_SYM. Use bfd_section_from_elf_index.
3711 (elf_bfd_discard_info): Set cookie.r_sym_shift.
3712 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
3713 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
3714
3715 2004-03-26 Stan Shebs <shebs@apple.com>
3716
3717 Remove MPW support, no longer used.
3718 * config.bfd (powerpc-*-mpw*): Remove configuration.
3719 * mpw-config.in, mpw-make.sed: Remove files.
3720 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
3721
3722 2004-03-26 Alan Modra <amodra@bigpond.net.au>
3723
3724 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
3725 (ppc64_elf_add_symbol_hook): New function.
3726 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
3727 const from Elf_Internal_Sym param.
3728 * elflink.c (elf_link_add_object_symbols): Adjust.
3729 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
3730 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
3731 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
3732 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
3733 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
3734 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
3735 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
3736 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
3737 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
3738 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
3739 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
3740 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
3741 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
3742 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
3743 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
3744 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
3745
3746 2004-03-26 Alan Modra <amodra@bigpond.net.au>
3747
3748 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
3749 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
3750 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
3751 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
3752 (bfd_elf64_bfd_link_add_symbols): Delete.
3753 (bfd_elf_link_add_symbols): Declare.
3754 * elfcode.h (elf_bfd_link_add_symbols): Delete.
3755 * elflink.c: Include safe-ctype.h.
3756 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
3757 make static.
3758 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
3759 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
3760 static.
3761 (elf_link_add_archive_symbols): Rename from
3762 _bfd_elf_link_add_archive_symbols, make static.
3763 (elf_link_add_object_symbols): New function. Corresponding
3764 elflink.h function converted to use elf_size_info.
3765 (bfd_elf_link_add_symbols): Likewise.
3766 (bfd_elf_size_dynamic_sections): Adjust.
3767 * elflink.h (elf_bfd_link_add_symbols): Delete.
3768 (elf_link_add_object_symbols): Delete.
3769 * elf32-gen.c (elf32_generic_link_add_symbols): Call
3770 bfd_elf_link_add_symbols.
3771 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
3772
3773 2004-03-25 Alan Modra <amodra@bigpond.net.au>
3774
3775 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
3776 and chained shared libs only if dynsym. Clear dynsym on forced-local.
3777
3778 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
3779 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
3780 (_bfd_elf_add_dt_needed_tag): Declare.
3781 (_bfd_elf_sort_symbol): Declare.
3782 (_bfd_elf_finalize_dynstr): Declare.
3783 (RELOC_FOR_GLOBAL_SYM): Formatting.
3784 * elfcode.h (elf_add_dynamic_entry): Delete.
3785 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
3786 elflink.h function converted to use elf_size_info.
3787 (_bfd_elf_add_dt_needed_tag): Likewise.
3788 (_bfd_elf_sort_symbol): Likewise.
3789 (_bfd_elf_finalize_dynstr): Likewise.
3790 (compute_bucket_count): Likewise.
3791 (bfd_elf_size_dynamic_sections): Likewise. Check result of
3792 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
3793 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
3794 * elflink.h: ..here.
3795 (sort_symbol, add_dt_needed_tag): Delete.
3796 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
3797 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
3798 Update all users.
3799 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
3800 * elf32-cris.c (add_dynamic_entry): Likewise.
3801 * elf32-hppa.c (add_dynamic_entry): Likewise.
3802 * elf32-i370.c (add_dynamic_entry): Likewise.
3803 * elf32-i386.c (add_dynamic_entry): Likewise.
3804 * elf32-m32r.c (add_dynamic_entry): Likewise.
3805 * elf32-m68k.c (add_dynamic_entry): Likewise.
3806 * elf32-ppc.c (add_dynamic_entry): Likewise.
3807 * elf32-s390.c (add_dynamic_entry): Likewise.
3808 * elf32-sh.c (add_dynamic_entry): Likewise.
3809 * elf32-sparc.c (add_dynamic_entry): Likewise.
3810 * elf32-vax.c (add_dynamic_entry): Likewise.
3811 * elf32-xtensa.c (add_dynamic_entry): Likewise.
3812 * elf64-alpha.c (add_dynamic_entry): Likewise.
3813 * elf64-hppa.c (add_dynamic_entry): Likewise.
3814 * elf64-ppc.c (add_dynamic_entry): Likewise.
3815 * elf64-s390.c (add_dynamic_entry): Likewise.
3816 * elf64-sparc.c (add_dynamic_entry): Likewise.
3817 * elf64-x86-64.c (add_dynamic_entry): Likewise.
3818 * elfxx-ia64.c (add_dynamic_entry): Likewise.
3819 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
3820 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
3821 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
3822 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3823
3824 2004-03-23 Paul Brook <paul@codesourcery.com>
3825
3826 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
3827
3828 2004-03-22 Bob Wilson <bob.wilson@acm.org>
3829
3830 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
3831 literal tables and check for relocs outside of literal pools.
3832 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
3833 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
3834 set DF_TEXTREL.
3835 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
3836 (elf_xtensa_relocate_section): Read literal tables and check for
3837 dynamic relocations in read-only sections and not in literal pools.
3838
3839 2004-03-23 Alan Modra <amodra@bigpond.net.au>
3840
3841 PR 51.
3842 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
3843
3844 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
3845
3846 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3847 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
3848 not defined by the executable, or defined in a DSO.
3849 <eliding run-time relocation of .got>: Initialize GOT entry for a
3850 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
3851 executable.
3852 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
3853 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
3854 a PLT reloc to GOT for an executable.
3855 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
3856 .got for a DSO and explain why.
3857 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
3858 and unreferenced symbols for which a PLT is defined. Adjust
3859 dynamic-symbol pruning correspondingly, to make sure we don't lose
3860 a dynamic symbol also defined by a DSO.
3861
3862 2004-03-22 Alan Modra <amodra@bigpond.net.au>
3863
3864 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
3865 and rel args. Group input and output args. Wrap to 80 columns.
3866 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
3867 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
3868 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
3869 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
3870 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
3871 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
3872 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
3873 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
3874 RELOC_FOR_GLOBAL_SYMBOL invocation.
3875
3876 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
3877
3878 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
3879 unresolved symbols in objects aren't allowed.
3880
3881 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
3882 unresolved symbols.
3883 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3884 (elf_hppa_unmark_useless_dynamic_symbols):
3885 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3886 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3887 (elf32_hppa_relocate_section): Likewise.
3888 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3889 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3890 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3891 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3892 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
3893
3894 * elf-m10200.c (mn10200_elf_relocate_section): Use
3895 RELOC_FOR_GLOBAL_SYMBOL.
3896 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3897 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3898 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3899 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3900 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3901 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
3902 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3903 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3904 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3905 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3906 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3907 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3908
3909 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3910
3911 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
3912 (final_link_relocate): Likewise.
3913 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
3914 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
3915
3916 2004-03-19 Alan Modra <amodra@bigpond.net.au>
3917
3918 * Makefile.am: Run "make dep-am".
3919 * Makefile.in: Regenerate.
3920 * aclocal.m4: Regenerate.
3921 * config.in: Regenerate.
3922 * po/bfd.pot: Regenerate.
3923
3924 2004-03-19 Alan Modra <amodra@bigpond.net.au>
3925 H.J. Lu <hongjiu.lu@intel.com>
3926
3927 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
3928 type and size change code to where it was previously. Remove
3929 dt_needed param. Treat old weak syms as strong if new sym is
3930 from a shared lib, even when old sym is from another shared
3931 lib. Remove unnecessary tests of oldweak and newweak. Correct
3932 comments.
3933 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
3934 _bfd_elf_merge_symbol calls.
3935 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
3936 dt_needed local var. Update comments.
3937 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
3938 (_bfd_elf_add_default_symbol): Likewise.
3939
3940 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
3941 strong syms in one shared object overriding weak syms in another.
3942
3943 2004-03-18 Alan Modra <amodra@bigpond.net.au>
3944
3945 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
3946 dyn_lib_class field. Rearrange for better packing.
3947 (elf_dt_soname): Delete.
3948 (elf_dyn_lib_class): Define.
3949 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
3950 (bfd_elf_set_dt_needed_soname): Delete.
3951 (bfd_elf_set_dyn_lib_class): New function.
3952 * elflink.h (add_dt_needed_tag): New function. Split out from..
3953 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
3954 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
3955 initialization of soname.
3956 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
3957 elf_dt_soname.
3958 * bfd-in.h (enum dynamic_lib_link_class): New.
3959 (bfd_elf_set_dt_needed_soname): Delete.
3960 (bfd_elf_set_dyn_lib_class): Declare.
3961 * bfd-in2.h: Regenerate.
3962
3963 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
3964 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
3965 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
3966 symbol loop. Instead use add_needed to flag tag as written.
3967
3968 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
3969
3970 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
3971 logic for null_input_bfd detection.
3972
3973 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
3974
3975 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
3976
3977 2004-03-16 Mark Kettenis <kettenis@gnu.org>
3978
3979 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
3980 code.
3981
3982 2004-03-16 Alan Modra <amodra@bigpond.net.au>
3983
3984 * elflink.c (elf_link_read_relocs_from_section): Don't use
3985 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
3986 (_bfd_elf_link_read_relocs): ..to here.
3987 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
3988
3989 2004-03-16 Alan Modra <amodra@bigpond.net.au>
3990
3991 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
3992 values selected in configure.host. Require both to be defined
3993 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
3994 corresponding BFD_HOST vars with quotes.
3995 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
3996 Always require BFD_HOST_64_BIT_DEFINED.
3997 <file_ptr type>: Find off_t size before emitting message. Combine
3998 off_t and ftello64 conditional.
3999 * configure: Regenerate.
4000
4001 2004-03-16 Alan Modra <amodra@bigpond.net.au>
4002
4003 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
4004 aliasing warning. Remove trailing whitespace throughout file.
4005
4006 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4007
4008 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
4009 input_section in calls to get_dyn_name.
4010 * 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
4011 local symbols.
4012 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
4013
4014 2004-03-15 Alan Modra <amodra@bigpond.net.au>
4015
4016 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
4017 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
4018 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
4019 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
4020 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
4021 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
4022 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
4023 when using long.
4024 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
4025 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
4026 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
4027 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
4028 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
4029 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
4030 (read_8_bytes, read_indirect_string, read_address): Likewise.
4031 (read_abbrevs, parse_comp_unit): Likewise.
4032 * targets.c (struct bfd_target): Likewise.
4033 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
4034 * hppabsd-core.c: Likewise. Formatting.
4035 * hpux-core.c: Likewise.
4036 * irix-core.c: Likewise.
4037 * netbsd-core.c: Likewise.
4038 * osf-core.c: Likewise.
4039 * ptrace-core.c: Likewise.
4040 * sco5-core.c: Likewise.
4041 * trad-core.c: Likewise.
4042 * configure: Regenerate.
4043 * bfd-in2.h: Regenerate.
4044
4045 2004-03-15 Alan Modra <amodra@bigpond.net.au>
4046
4047 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
4048 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
4049 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
4050 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
4051 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
4052 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
4053 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
4054 * libbfd.c: Likewise in function definitions.
4055 (bfd_put_8): Mask with 0xff rather than casting to char.
4056 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
4057 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
4058 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
4059 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
4060 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
4061 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
4062 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
4063 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
4064 (H_GET_64, H_GET_32, H_GET_16): Likewise.
4065 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
4066 * archive.c (do_slurp_coff_armap): Update swap prototype.
4067 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
4068 (tic54x_getl_signed_32): Likewise.
4069 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
4070 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
4071 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
4072 (bfd_getp_signed_32, bfd_putp32): Likewise.
4073 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
4074 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
4075 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
4076 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
4077 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
4078 bfd_h_getx_signed_16, bfd_h_putx16.
4079 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
4080 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
4081 * hpux-core.c: Likewise.
4082 * irix-core.c: Likewise.
4083 * netbsd-core.c: Likewise.
4084 * osf-core.c: Likewise.
4085 * ptrace-core.c: Likewise.
4086 * sco5-core.c: Likewise.
4087 * trad-core.c: Likewise.
4088 * bfd-in2.h: Regenerate.
4089
4090 2004-03-15 Matt Thomas <matt@3am-software.com>
4091
4092 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
4093 selected.
4094
4095 2004-03-13 Mark Kettenis <kettenis@gnu.org>
4096
4097 * config.bfd: Add x86_64-*-openbsd*.
4098 * configure.in (x86_64-*-openbsd*): Set COREFILE to
4099 netbsd-core.lo.
4100 * configure: Regenerate.
4101
4102 2004-03-12 Nick Clifton <nickc@redhat.com>
4103 Dave Murphy <wintermute2k4@ntlworld.com>
4104
4105 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
4106 if the input bfd does not contain any code.
4107
4108 2004-03-09 Steve Ellcey <sje@cup.hp.com>
4109
4110 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
4111
4112 2004-03-05 Fred Fish <fnf@redhat.com>
4113
4114 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
4115 mips16 symbols to be even rather than testing first for even/odd.
4116 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
4117
4118 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
4119
4120 * elf.c (map_sections_to_segments): Ignore .tbss sections for
4121 layout purposes.
4122
4123 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
4124
4125 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
4126 undefined symbols as hash_new.
4127
4128 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
4129
4130 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
4131 * cpu-sh.c: Ditto.
4132 * elf32-sh.c: Ditto.
4133 * bfd-in2.h: Regenerate.
4134
4135 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
4136
4137 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
4138 dynrelocs.
4139 (_frv_count_got_plt_entries): Initialize them.
4140 (frv_pic_relocs_info_find): Add insert argument. Adjust all
4141 callers.
4142 (frv_pic_relocs_info_for_global): Likewise.
4143 (frv_pic_relocs_info_for_local): Likewise.
4144 (frv_pic_merge_early_relocs_info): New.
4145 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
4146 another.
4147 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
4148 Check that we don't exceed the allocated count for entry.
4149 (_frv_add_rofixup): Likewise.
4150 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
4151 (elf32_frv_finish_dynamic_sections): Improve error message in case
4152 we emit too few rofixup entries.
4153
4154 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
4155
4156 * archures.c (bfd_mach_fr450): New.
4157 * bfd-in2.h: Regenerate.
4158 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
4159 (arch_info_500): Link to it.
4160 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
4161 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
4162 (frv_elf_arch_extension_p): New function.
4163 (frv_elf_merge_private_bfd_data): Use it.
4164
4165 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
4166
4167 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
4168
4169 * elflink.h (is_global_data_symbol_definition): Moved to
4170 elflink.c.
4171 (elf_link_is_defined_archive_symbol): Likewise.
4172 (elf_link_add_archive_symbols): Likewise. Renamed to
4173 _bfd_elf_link_add_archive_symbols.
4174
4175 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
4176 of ELF symbol table entry from backend.
4177 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
4178 instead of elf_link_add_object_symbols.
4179
4180 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
4181
4182 * elf-bfd.h (struct elf_backend_data): Added
4183 elf_backend_can_make_relative_eh_frame,
4184 elf_backend_can_make_lsda_relative_eh_frame and
4185 elf_backend_encode_eh_address.
4186 (_bfd_elf_encode_eh_address): Declare.
4187 (_bfd_elf_can_make_relative): Declare.
4188 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
4189 hooks to decide whether to attempt to make_relative and
4190 make_lsda_relative.
4191 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
4192 (_bfd_elf_can_make_relative): New.
4193 (_bfd_elf_encode_eh_address): New.
4194 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
4195 (frv_elf_encode_eh_address): New.
4196 (elf_backend_can_make_relative_eh_frame): Define.
4197 (elf_backend_can_make_lsda_relative_eh_frame): Define.
4198 (elf_backend_encode_eh_address): Define.
4199 * elfxx-target.h
4200 (elf_backend_can_make_relative_eh_frame): Define.
4201 (elf_backend_can_make_lsda_relative_eh_frame): Define.
4202 (elf_backend_encode_eh_address): Define.
4203 (elfNN_bed): Add them.
4204
4205 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
4206
4207 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
4208 complain_on_overflow to signed.
4209
4210 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
4211
4212 * elflink.h (sort_symbol): New.
4213 (elf_link_add_object_symbols): Use a sorted symbol array for
4214 weakdef.
4215
4216 2004-02-27 Jakub Jelinek <jakub@redhat.com>
4217
4218 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
4219 for pc relative relocs.
4220 (elf_s390_relocate_section): Likewise.
4221 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
4222 for pc relative relocs.
4223 (elf_s390_relocate_section): Likewise.
4224
4225 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
4226
4227 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
4228 count_dyn_reloc.
4229
4230 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
4231
4232 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
4233 field to track if a relocation is against readonly section.
4234 (count_dyn_reloc): Take a new argument for rent->reltext.
4235 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
4236 (get_reloc_section): Don't set ia64_info->reltext here.
4237 (allocate_dynrel_entries): Set ia64_info->reltext here.
4238
4239 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
4240
4241 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
4242 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
4243 function's descriptor to symbol+offset, and map local undefweak
4244 symbol to NULL function descriptor.
4245 (elf32_frv_relocate_section): Likewise.
4246
4247 2004-02-23 Mark Kettenis <kettenis@gnu.org>
4248
4249 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
4250 M_X86_64_NETBSD.
4251 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
4252 (netbsd_core_file_p): Set architecture from machine ID for
4253 selected machines.
4254
4255 2004-02-23 Jakub Jelinek <jakub@redhat.com>
4256
4257 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
4258 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
4259
4260 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
4261
4262 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
4263 symbols with non-default visibility.
4264
4265 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
4266
4267 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
4268 IMAGE_SCN_MEM_WRITE on known sections only.
4269
4270 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4271
4272 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
4273 symbols used in PIE relocs.
4274
4275 2004-02-19 Jakub Jelinek <jakub@redhat.com>
4276
4277 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
4278 .plt sh_entsize.
4279
4280 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
4281
4282 * configure.in: Update version to 2.15.90.
4283 * configure: Regenerate.
4284
4285 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
4286 Richard Sandiford <rsandifo@redhat.com>
4287
4288 * elfxx-mips.c (mips_elf_calculate_relocation): Use
4289 _bfd_elf_symbol_refs_local_p to decide whether to decay
4290 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
4291 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
4292 relocs if the symbol wasn't defined by a regular object file.
4293 Don't check the symbol's dynindx.
4294
4295 2004-02-16 Andrew Cagney <cagney@redhat.com>
4296
4297 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
4298 @bfd_file_ptr@.
4299 * bfd-in2.h: Re-generate.
4300
4301 2004-02-14 Andrew Cagney <cagney@redhat.com>
4302
4303 * configure.host (HDEFINES): When hppa*-*-hpux*, define
4304 _LARGEFILE64_SOURCE.
4305
4306 2004-02-13 Andrew Cagney <cagney@redhat.com>
4307
4308 * elf.c (vma_page_aligned_bias): New function.
4309 (assign_file_positions_except_relocs)
4310 (assign_file_positions_for_segments): Replace broken modulo
4311 arithmetic with call to vma_page_aligned_bias.
4312
4313 2004-02-11 Andrew Cagney <cagney@redhat.com>
4314
4315 * bfd-in.h: Update copyright.
4316 (bfd_tell): Change return type to file_ptr.
4317 * bfd-in2.h: Re-generate.
4318 * cache.c: Update copyright.
4319 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
4320 parameter.
4321 (close_one): Use real_ftell.
4322 * bfdio.c: Update copyright.
4323 (real_ftell, real_fseek): New functions.
4324 (bfd_tell): Use real_fseek and real_ftell, change return type to
4325 file_ptr.
4326 (bfd_seek): Use real_ftell and real_fseek, change type of
4327 file_position to a file_ptr.
4328 * libbfd-in.h: Update copyright.
4329 (real_ftell, real_fseek): Declare.
4330 * libbfd.h: Re-generate.
4331
4332 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
4333 fseeko and fseeko64. Determine bfd_file_ptr.
4334 * configure: Re-generate.
4335 * config.in: Re-generate.
4336
4337 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
4338
4339 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
4340 * elf32-h8300.c: Likewise.
4341
4342 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
4343 Nick Clifton <nickc@redhat.com>
4344
4345 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
4346 GOT entries with no associated GOT subsection.
4347
4348 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
4349
4350 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
4351 * elf.c (swap_out_syms): Use it to decide whether local section
4352 symbols should be named.
4353 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
4354 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
4355 (elf_backend_name_local_section_symbols): Define.
4356 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
4357
4358 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
4359
4360 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
4361 (elfNN_ia64_relax_section): Optimize brl to br during the relax
4362 finalize pass.
4363
4364 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
4365
4366 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
4367 to bfd_link_hash_entry passed by reference to
4368 _bfd_generic_link_add_one_symbol.
4369
4370 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
4371
4372 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
4373 relocations against dynamic symbols.
4374
4375 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
4376
4377 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
4378 change.
4379
4380 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
4381
4382 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
4383 * bfd-in2.h, libbfd.h: Rebuilt.
4384
4385 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
4386
4387 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
4388 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
4389 flag has been cleared.
4390
4391 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
4392
4393 * coff-h8300.c: Add and adjust comments about relaxation.
4394 * elf32-h8300.c: Likewise.
4395
4396 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
4397
4398 * coff-h8300.c: Fix comment typos.
4399 * elf32-h8300.c: Likewise.
4400
4401 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
4402
4403 * coff-h8300.c: Add comments about relaxation.
4404 * elf32-h8300.c: Likewise.
4405
4406 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4407
4408 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
4409 throughout.
4410 * aclocal.m4: Regenerate.
4411 * configure: Regenerate.
4412
4413 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
4414
4415 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
4416 mips_elf64_rtype_to_howto instead of using howto_table.
4417
4418 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
4419
4420 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
4421 the .plt section.
4422 (elf32_arm_check_relocs): Don't increment the PLT refcount for
4423 relocs which would not use the PLT.
4424
4425 2004-01-13 Alan Modra <amodra@bigpond.net.au>
4426
4427 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
4428 (ppc64_elf_gc_sweep_hook): Likewise.
4429 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
4430
4431 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
4432
4433 Adds linker relaxation support for bit manipulation insns like
4434 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
4435 bst, btst, bxor.
4436 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
4437 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
4438 * coff-h8300.c: Opcode for bit manipulation insn is checked in
4439 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
4440
4441 2004-01-12 Alan Modra <amodra@bigpond.net.au>
4442
4443 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
4444
4445 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
4446
4447 * elf32-h8300.c: Fix formatting.
4448
4449 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
4450
4451 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
4452 dynamic object is present. Declare r_symndx and h in an inner
4453 scope.
4454 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4455
4456 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
4457
4458 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
4459 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
4460 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
4461 identically. Do not emit PC24 relocations for shared libraries.
4462 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
4463 identically. Don't adjust pc_count.
4464 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
4465 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
4466 adjust count for branch relocations.
4467 (allocate_dynrelocs): Correct typo in call to
4468 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
4469 PC24 or PLT32 relocs when linking.
4470
4471 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
4472
4473 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
4474 relocation howto with ARM_26 one for consistency.
4475 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
4476 that will be converted to ARM_26D ones, since we always want 'done'
4477 relocations to be reflected in section's data.
4478 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
4479 offset.
4480 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
4481 requested.
4482
4483 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
4484
4485 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
4486 are not partial_inplace during a relocatable link.
4487
4488 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
4489
4490 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4491 if no dynamic object is present. Declare r_symndx and h in an
4492 inner scope.
4493
4494 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
4495
4496 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
4497 trampoline if it is known out of range.
4498
4499 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
4500
4501 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
4502 * elf32-frv.c (_frv_osec_readonly_p): New.
4503 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
4504 undefweak symbol.
4505 (_frv_count_got_plt_entries): Adjust expected count accordingly.
4506 (elf32_frv_relocate_section): Likewise. Error out if attempting
4507 to emit rofixups or dynamic relocs in read-only segments. Use
4508 _bfd_elf_section_offset to adjust r_offsets in rofixups and
4509 dynamic relocations.
4510 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
4511 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
4512 relocations or fixups involving merged sections correctly. Avoid
4513 crash when undefined symbol is referenced by R_FRV_32 or
4514 R_FRV_FUNCDESC_VALUE.
4515 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
4516 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
4517 input section holding local symbol to addend of R_FRV_32 or
4518 R_FRV_FUNCDESC_VALUE dynamic relocation.
4519 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
4520 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
4521 (elf32_frv_always_size_sections): Don't store pointer to
4522 __stacksize symbol in sec_info.
4523 (elf32_frv_modify_segment_map): Look it up here.
4524 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
4525 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
4526 of the lazy PLT entry, not only its offset, as the low word of a
4527 function descriptor.
4528 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
4529 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
4530 if a hash table entry already exists but is not a definition.
4531 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
4532 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
4533 (_frv_add_rofixup): Don't inline.
4534 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
4535 for undefweak symbols.
4536 (elf32_frv_relocate_section): Avoid crash while computing
4537 relocation when linking with shared library. Only emit rofixups
4538 and dynamic relocations for alloc&load sections. Mark binaries
4539 with inter-segment relocations for relocation as a unit.
4540 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
4541 (DEFAULT_STACK_SIZE): New.
4542 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
4543 emit rofixups or dynamic relocs when linking dynamic non-PIE
4544 executables.
4545 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
4546 shared libs too. Reserve the last entry for the GOT pointer.
4547 (elf32_frv_finish_dynamic_sections): Emit it.
4548 (elf32_frv_always_size_sections): New.
4549 (elf32_frv_modify_segment_map): New.
4550 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
4551 sections.
4552 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
4553 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
4554 (elf_backend_always_size_sections): New.
4555 (elf_backend_modify_segment_map): New.
4556 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
4557 * config.bfd: Added frv-*-*linux*.
4558 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
4559 ABS section, instead of crashing.
4560 (elf32_frv_relocate_section): Don't crash before warning about
4561 different segments in non-PIC relocation.
4562 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
4563 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
4564 relocs to undefweak symbols.
4565 (elf32_frv_relocate_section): Ditto for undefined symbols.
4566 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
4567 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
4568 gotfixup section was created.
4569 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
4570 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
4571 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
4572 complain_overflow_signed.
4573 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
4574 have not been allocated.
4575 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
4576 privfd only if dynamic sections were created.
4577 (elf32_frv_relocate_section): Compute gprel_segment, and use it
4578 for GPREL relocs. When linking relocatable FDPIC executables,
4579 emit warnings for relocations that would be illegal on PIE or
4580 shared libraries. Emit rofixup for R_FRV_32 only if input object
4581 is not FDPIC.
4582 (_frv_create_got_section): Define _gp symbol in the rofixup
4583 section.
4584 (elf32_frv_finish_dynamic_sections): If rofixups needed but
4585 dynamic sections missing, error out requesting -melf32frvfd.
4586 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
4587 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
4588 computation of addends from section and global or local symbol
4589 value. Change return type to bfd_boolean, and return a failure if
4590 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
4591 nonzero addend is required.
4592 (elf32_frv_relocate_section): Likewise. Print error for
4593 unsupported nonzero addends.
4594 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
4595 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
4596 force everything local.
4597 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
4598 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
4599 (frv_gotfixup_section): New.
4600 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
4601 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
4602 and relocsfdv.
4603 (_frv_add_rofixup): New.
4604 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
4605 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
4606 improve some ugly conditions.
4607 (elf32_frv_relocate_section): Likewise. Reject inter-segment
4608 relocations in fdpic.
4609 (_frv_create_got_section): Create .rofixup.got section.
4610 (struct _frv_dynamic_got_info): Added fixups.
4611 (_frv_count_got_plt_entries): Account in-GOT relocations into
4612 relocs32, relocsfd and relocsfdv. Account them into relocs or
4613 fixups, as appropriate.
4614 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
4615 sizing of gotrel.
4616 (elf32_frv_finish_dynamic_sections): Verify that the right number
4617 of relocations and fixups was generated.
4618 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
4619 relocsfdv.
4620 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
4621 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
4622 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
4623 descriptor of a (formerly-)global symbol is local.
4624 (struct frv_pic_relocs_info): Adjust comments.
4625 (_frv_emit_got_relocs_plt_entries): Adjust.
4626 (elf32_frv_relocate_section): Likewise.
4627 (_frv_count_got_plt_entries): Likewise.
4628 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
4629 symbol's value to addend in the common preamble. Decay dynamic
4630 symbols to section+offset if they bind or call locally, for GOT
4631 and FUNCDESC_VALUE, respectively.
4632 (elf32_frv_relocate_section): Likewise.
4633 (elf32_frv_check_relocs): Don't register as dynamic symbols of
4634 internal or hidden visibility.
4635 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
4636 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
4637 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
4638 (elf32_frv_relocate_section): Pass relocation addend in. Use
4639 original relocation addend to look up the got relocs/plt entries
4640 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
4641 processing relocations that reference .scommon symbols.
4642 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
4643 Introduce support for dynamic linking.
4644 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
4645 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
4646 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
4647 (frv_reloc_type_lookup): Return REL howtos for executables and
4648 dynamic libraries.
4649 (frv_info_to_howto_rel): New.
4650 (struct frv_elf_link_hash_table): New.
4651 (frv_hash_table, frv_got_section, frv_gotrel_section,
4652 frv_plt_section, frv_pltrel_section, frv_relocs_info,
4653 frv_got_initial_offset, frv_plt_initial_offset): New macros.
4654 (frv_elf_link_hash_table_create): New.
4655 (struct frv_pic_relocs_info): New.
4656 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
4657 (frv_pic_relocs_info_find): New.
4658 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
4659 New.
4660 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
4661 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
4662 (_frv_emit_got_relocs_plt_entries): New.
4663 (elf32_frv_relocate_section): Add support for dynamic linking.
4664 Handle new relocations.
4665 (_frv_create_got_section): New.
4666 (elf32_frv_create_dynamic_sections): New.
4667 (ELF_DYNAMIC_INTERPRETER): New.
4668 (struct _frv_dynamic_got_info): New.
4669 (_frv_count_got_plt_entries): New.
4670 (struct _frv_dynamic_got_plt_info): New.
4671 (_frv_compute_got_alloc_data): New.
4672 (_frv_get_got_entry, _frv_get_fd_entry): New.
4673 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
4674 (_frv_resolve_final_relocs_info): New.
4675 (elf32_frv_size_dynamic_sections): New.
4676 (elf32_frv_finish_dynamic_sections): New.
4677 (elf32_frv_adjust_dynamic_symbol): New.
4678 (elf32_frv_finish_dynamic_symbol): New.
4679 (elf32_frv_check_relocs): Handle new relocs. Explain how the
4680 whole thing works.
4681 (elf_info_to_howto_rel): Define.
4682 (bfd_elf32_bfd_link_hash_table_create): Define.
4683 (elf_backend_create_dynamic_sections): Define.
4684 (elf_backend_adjust_dynamic_symbol): Define.
4685 (elf_backend_size_dynamic_sections): Define.
4686 (elf_backend_finish_dynamic_symbol): Define.
4687 (elf_backend_finish_dynamic_sections): Define.
4688 (elf_backend_want_got_sym): Define.
4689 (elf_backend_got_header_size): Define.
4690 (elf_backend_want_got_plt): Define.
4691 (elf_backend_plt_readonly): Define.
4692 (elf_backend_want_plt_sym): Define.
4693 (elf_backend_plt_header_size): Define.
4694 (elf_backend_may_use_rel_p): Define.
4695 (elf_backend_may_use_rela_p): Define.
4696 (elf_backend_default_use_rela_p): Define.
4697 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
4698 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
4699 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
4700 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
4701 (frv_reloc_map): Map the corresponding BFD relocs to them.
4702 (frv_reloc_type_lookup): ... and back to BFD relocs.
4703 * reloc.c: New relocs.
4704 * bfd-in2.h, libbfd.h: Rebuilt.
4705 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
4706 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
4707 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
4708 R_FRV_FUNCDESC_GOTLO): New.
4709 (frv_reloc_map): Map the corresponding BFD relocs to them.
4710 (frv_reloc_type_lookup): ... and back to BFD relocs.
4711 * reloc.c: New relocs.
4712 * bfd-in2.h, libbfd.h: Rebuilt.
4713
4714 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4715
4716 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
4717 targets to support pages of up to 64kB.
4718 (elf32_bed): Redefine to get a separate backend data structure for
4719 traditional targets.
4720 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
4721 targets to support pages of up to 64kB.
4722 (elf64_bed): Redefine to get a separate backend data structure for
4723 traditional targets.
4724 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
4725 targets to support pages of up to 64kB.
4726 (elf32_bed): Redefine to get a separate backend data structure for
4727 traditional targets.
4728
4729 2004-01-04 Mark Kettenis <kettenis@gnu.org>
4730
4731 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
4732
4733 2004-01-02 Mark Kettenis <kettenis@gnu.org>
4734
4735 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
4736 (elf_i386_grok_psinfo): Likewise.
4737
4738 2004-01-02 Bernardo Innocenti <bernie@develer.com>
4739
4740 * config.bfd: Add m68k-uClinux target.
4741
4742 2004-01-01 Grant Edwards <grante@visi.com>
4743
4744 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
4745 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
4746 (elf32_h8_gc_sweep_hook): New function.
4747 (elf_backend_gc_mark_hook): Define.
4748 (elf_backend_gc_sweep_hook): Define.
4749 (elf_backend_can_gc_sections): Define.
4750
4751 For older changes see ChangeLog-0203
4752 \f
4753 Local Variables:
4754 mode: change-log
4755 left-margin: 8
4756 fill-column: 74
4757 version-control: never
4758 End:
This page took 0.137311 seconds and 4 git commands to generate.