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