0a3b2484c23daef895965e930624e5c5c709e2d9
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2005-10-27 Alan Modra <amodra@bigpond.net.au>
2
3 * cache.c: Reorganize file to avoid forward reference.
4
5 2005-10-26 Alan Modra <amodra@bigpond.net.au>
6
7 * cache.c (bfd_cache_lookup_worker): Don't abort on failing to
8 reopen file.
9 (cache_btell, cache_bseek, cache_bflush, cache_bstat): Return -1 on
10 bfd_cache_lookup failure.
11 (cache_bread, cache_bwrite): Return 0 on the same.
12 * bfdwin.c (bfd_get_file_window): Likewise.
13 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
14 * sco5-core.c (sco5_core_file_p): Likewise.
15 * trad-core.c (trad_unix_core_file_p): Likewise.
16
17 2005-10-26 Alan Modra <amodra@bigpond.net.au>
18
19 * cache.c (bfd_cache_lookup_worker): Use bfd_error_handler
20 rather than bfd_perror. Print file name. Internationalise.
21
22 2005-10-26 Alan Modra <amodra@bigpond.net.au>
23
24 * cache.c (bfd_open_file): Set bfd_error_system_call on failure
25 to open file.
26 (bfd_cache_lookup_worker): Remove check that file pos is in
27 unsigned long range. Print system error before aborting.
28
29 2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
30
31 * Makefile.am: Add rules for coff-z80 and cpu-z80.
32 * Makefile.in: Regenerated.
33 * archures.c: Add bfd_arch_z80 and support for it.
34 * coffcode.h(coff_set_arch_mach_hook): Add case Z80MAGIC.
35 (coff_set_flags): Add case bfd_arch_z80.
36 * config.bfd: Add z80coff_vec.
37 * configure.in: Add z80coff_vec.
38 * reloc.c: Add BFD_RELOC_Z80_DISP8
39 * targets.c: Add z80coff_vec.
40 * coff-z80.c: New file
41 * cpu-z80.c: New file
42 * configure: Regenerated.
43 * libbfd.h: Regenerated.
44 * bfd-in2.h: Regenerated.
45
46 2005-10-26 Alan Modra <amodra@bigpond.net.au>
47
48 PR ld/1540
49 * elf-bfd.h (elf_backend_copy_indirect_symbol): Replace pointer to
50 elf_backend_data with pointer to bfd_link_info.
51 (_bfd_elf_link_hash_copy_indirect): Likewise.
52 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Handle
53 direct and indirect symbols both having dynamic link info.
54 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Likewise.
55 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
56 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
57 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Likewise.
58 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
59 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
60 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
61 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
62 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
63 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
64 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
65 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
66 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
67 * elflink.c: Adjust all calls to bed->elf_backend_copy_indirect_symbol.
68 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Update prototype.
69 * elfxx-sparc.h (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
70
71 2005-10-25 Alan Modra <amodra@bigpond.net.au>
72
73 * po/SRC-POTFILES.in: Regenerate.
74 * po/bfd.pot: Regenerate.
75
76 2005-10-24 Jie Zhang <jie.zhang@analog.com>
77
78 * elf32-bfin.c (bfd_bfin_elf32_create_embedded_relocs): Fix signedness
79 warning.
80
81 2005-10-24 Bernd Schmidt <bernd.schmidt@analog.com>
82
83 * elf32-bfin.c (bfin_howto_table): Set src_mask to 0 for all relocs.
84 (bfin_imm16_reloc): Always add in the addend. Don't fetch existing
85 contents from section.
86 (bfin_relocate_section): Rework so as to not call special_functions.
87 Handle the relocation stack here. Treat pcrel24 relocs specially.
88
89 2005-10-24 Alan Modra <amodra@bigpond.net.au>
90
91 * elflink.c (elf_link_input_bfd): Don't use linker_mark and
92 SEC_EXCLUDE to test for sections dropped from output. Instead,
93 use bfd_section_removed_from_list on normal sections. Don't
94 attempt to handle symbols with unknown reserved section indices.
95 * linker.c (_bfd_generic_link_output_symbols): Don't use
96 linker_mark to test for symbols belonging to dropped sections.
97 Do allow absolute symbols.
98
99 2005-10-24 Alan Modra <amodra@bigpond.net.au>
100
101 * elf32-i370.c (i370_elf_fake_sections): Don't set SHF_EXCLUDE on
102 group sections.
103
104 2005-10-24 Jan Beulich <jbeulich@novell.com>
105
106 * cpu-ia64-opc.c (elf64_ia64_operands): Move memory operand out of
107 set of indirect operands.
108
109 2005-10-24 Alan Modra <amodra@bigpond.net.au>
110
111 * elf32-ppc.c (ppc_elf_fake_sections): Don't set SHF_EXCLUDE on
112 group sections.
113
114 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
115
116 * coff-rs6000.c (rs6000coff_vec): Initialize
117 _bfd_init_private_section_data with
118 _bfd_generic_init_private_section_data.
119 (pmac_xcoff_vec): Likewise.
120 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
121 (aix5coff64_vec): Likewise.
122
123 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
124
125 PR ld/1487
126 * elf-bfd.h (_bfd_generic_init_private_section_data): New.
127 (_bfd_elf_init_private_section_data): New.
128
129 * elf.c (elf_fake_sections): Don't set SHF_GROUP for
130 relocatable link.
131 (bfd_elf_set_group_contents): Don't handle relocatable link
132 specially.
133 (assign_section_numbers): If it isn't called by assembler,
134 use the output section of elf_linked_to_section for
135 SHF_LINK_ORDER.
136 (_bfd_elf_init_private_section_data): New.
137 (_bfd_elf_copy_private_section_data): Call it.
138
139 * libbfd-in.h (_bfd_generic_init_private_section_data): New.
140
141 * libbfd.c (_bfd_generic_init_private_section_data): New.
142
143 * targets.c (BFD_JUMP_TABLE_COPY): Add
144 _bfd_generic_init_private_section_data.
145 (bfd_init_private_section_data): Likewise.
146
147 * bfd-in2.h: Regenerated.
148 * libbfd.h: Likewise.
149
150 2005-10-23 Alan Modra <amodra@bigpond.net.au>
151
152 * elf64-ppc.c (dec_dynrel_count): Don't report errors for local
153 syms in gc'd sections.
154 (ppc64_elf_edit_opd): Don't adjust reloc counts when NO_OPD_RELOCS.
155 (elf_backend_action_discarded): Define.
156 (ppc64_elf_action_discarded): New function.
157
158 2005-10-19 Paul Brook <paul@codesourcery.com>
159
160 * elf32-arm.c (find_arm_elf_section_entry): New function.
161 (get_arm_elf_section_data): Use it.
162 (unrecord_section_with_arm_elf_section_data): Use it.
163
164 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
165
166 * coff-rs6000.c (rs6000coff_vec): Initialize
167 _bfd_match_sections_by_type with
168 _bfd_generic_match_sections_by_type.
169 (pmac_xcoff_vec): Likewise.
170 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
171 (aix5coff64_vec): Likewise.
172
173 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
174
175 PR ld/1467
176 * elf-bfd.h (_bfd_elf_match_sections_by_type): New.
177 (_bfd_generic_match_sections_by_type): New. Defined.
178
179 * elf.c (_bfd_elf_match_sections_by_type): New.
180
181 * libbfd-in.h (_bfd_generic_match_sections_by_type): New.
182
183 * bfd-in2.h: Regenerated.
184 * libbfd.h: Likewise.
185
186 * libbfd.c (_bfd_generic_match_sections_by_type): New.
187
188 * targets.c (BFD_JUMP_TABLE_LINK): Initialize
189 _bfd_match_sections_by_type with
190 _bfd_generic_match_sections_by_type.
191 (bfd_target): Add _bfd_match_sections_by_type.
192
193 2005-10-08 Paul Brook <paul@codesourcery.com>
194
195 * elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
196 (NUM_KNOWN_ATTRIBUTES): Define.
197 (aeabi_attribute, aeabi_attribute_list): Define.
198 (elf32_arm_obj_tdata): Add known_eabi_attributes and
199 other_eabi_attributes.
200 (uleb128_size, is_default_attr, eabi_attr_size,
201 elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
202 elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
203 elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
204 elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
205 elf32_arm_merge_eabi_attributes): New functions.
206 (elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
207 (elf32_arm_fake_sections): Handle .ARM.attributes.
208 (elf32_arm_parse_attributes): New function.
209 (elf32_arm_section_from_shdr): Use it.
210 (bfd_elf32_bfd_final_link): Define.
211
212 2005-10-06 Daniel Jacobowitz <dan@codesourcery.com>
213
214 * elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from
215 GCC.
216 (elf32_arm_size_dynamic_sections): Likewise.
217 * ecofflink.c (bfd_ecoff_debug_one_external): Likewise.
218 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
219 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
220 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
221 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
222 * elf32-s390.c (elf_s390_check_relocs): Likewise.
223 (elf_s390_size_dynamic_sections): Likewise.
224 * elf32-sh.c (sh_elf_check_relocs): Likewise.
225 * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count)
226 (ppc64_elf_size_dynamic_sections): Likewise.
227 * elf64-s390.c (elf_s390_check_relocs): Likewise.
228 (elf_s390_size_dynamic_sections): Likewise.
229 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
230 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
231 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
232 * ieee.c (ieee_slurp_section_data): Likewise.
233 * oasys.c (oasys_slurp_section_data): Likewise.
234
235 2005-10-04 Bob Wilson <bob.wilson@acm.org>
236
237 * archive.c: Add missing SUBSECTION for documentation.
238 * bfd.c: Likewise.
239 * cache.c: Likewise.
240 * corefile.c: Likewise.
241 * format.c: Likewise.
242 * init.c: Likewise.
243 * libbfd.c: Likewise.
244 * opncls.c: Likewise.
245 * elf.c: Remove blank line after SECTION heading.
246 * reloc.c: Change "howto manager" SECTION to a SUBSECTION.
247
248 2005-10-04 Nick Clifton <nickc@redhat.com>
249
250 * elf32-arm.c (get_arm_elf_section_data): Cache the last pointer
251 matched so that the typical case of scanning for the previous
252 section to last one can be handled quickly.
253
254 2005-10-03 David Heine <dlheine@tensilica.com>
255
256 * elf32-xtensa.c (relocations_reach): Skip range check for
257 absolute literals.
258
259 2005-10-03 Alan Modra <amodra@bigpond.net.au>
260
261 * elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
262 synthetic syms.
263
264 2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
265
266 * Makefile.am: Run "make dep-am".
267 * Makefile.in: Regenerated.
268 * aclocal.m4: Likewise.
269
270 2005-09-30 Catherine Moore <clm@cm00re.com>
271
272 * Makefile.am: Bfin support.
273 * Makefile.in: Regenerated.
274 * aclocal.m4: Regenerated.
275 * archures.c (bfd_mach_bfin): New.
276 (bfd_arch_bfin): New.
277 bfd-in.h (bfd_bfin_elf32_create_embedded_relocs): New.
278 * bfd-in2.h: Regenerated.
279 * config.bfd: Bfin support.
280 * configure: Regenerated.
281 * configure.in: Bfin support.
282 * libbfd.h: Regenerated.
283 * reloc.c: Add BFD relocations for Bfin.
284 * targets.c (bfd_elf32_bfin_vec): New.
285 * cpu-bfin.c: New file.
286 * elf32-bfin.c: New file.
287
288 2005-09-30 Alan Modra <amodra@bigpond.net.au>
289
290 * elf64-ppc.c (ppc_type_of_stub): Check both func desc and func
291 entry sym before deciding no stub is needed.
292 (ppc64_elf_size_stubs): When calculating branch destination,
293 don't use func desc sym for old ABI objects unless func entry
294 is undefined.
295
296 2005-09-28 H.J. Lu <hongjiu.lu@intel.com>
297
298 PR binutils/1321
299 * elf-bfd.h (_bfd_elf_setup_group_pointers): Renamed to ...
300 (_bfd_elf_setup_sections): This.
301 * elf.c: Likewise.
302 * elfcode.h (elf_object_p): Likewise.
303
304 * elf.c (_bfd_elf_setup_sections): Process SHF_LINK_ORDER.
305 (_bfd_elf_copy_private_section_data): Likewise.
306
307 2005-09-28 H.J. Lu <hongjiu.lu@intel.com>
308
309 * elflink.c (elf_fixup_link_order): Report locations for mixed
310 ordered and unordered input sections.
311
312 2005-09-22 James E. Wilson <wilson@specifix.com>
313
314 * dwarf2.c (struct funcinfo): Delete nesting_level field.
315 (lookup_address_in_function_table): Delete code to set funcinfo
316 caller_func field. Delete local curr_func.
317 (scan_unit_for_symbols): New locals nested_funcs, nested_funcs_size.
318 Delete code setting funcinfo nesting_level field. Add code to set
319 funcinfo caller_func field.
320
321 2005-09-20 James E. Wilson <wilson@specifix.com>
322
323 * dwarf2.c (find_abstract_instance_name): Don't early exit when name
324 set. For DW_AT_name case, only set name if not already set. Handle
325 DW_AT_MIPS_linkage_name.
326
327 2005-09-20 Alan Modra <amodra@bigpond.net.au>
328
329 * elflink.c (_bfd_elf_merge_symbol): Simplify.
330
331 2005-09-19 Alan Modra <amodra@bigpond.net.au>
332
333 * elf64-ppc.c (ppc_build_one_stub): Replace assertion that long
334 branch offset is in range with an error. Print full stub name on
335 errors.
336 (ppc_size_one_stub): Print full stub name on errors.
337 (group_sections): Warn if section size exceeds group size.
338 (ppc64_elf_size_stubs): Continue relaxing when stub types change.
339
340 2005-09-09 Kevin Buettner <kevinb@redhat.com>
341
342 * elf32-am33lin.c (bfd.h, sysdep.h, elf-bfd.h, elf/mn10300.h):
343 Include.
344 (elf32_am33lin_grok_prstatus, elf32_am33lin_grok_psinfo): New
345 functions.
346 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
347
348 2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
349
350 * elf32-arm.c (elf32_arm_section_from_shdr): Accept SHT_ARM_PREEMPTMAP
351 and SHT_ARM_ATTRIBUTES.
352
353 2005-09-08 H.J. Lu <hongjiu.lu@intel.com>
354
355 * elflink.c (elf_get_linked_section_vma): Fix a typo in comment.
356 * elfxx-ia64.c (elf_backend_link_order_error_handler): Likewise.
357
358 2005-09-08 H.J. Lu <hongjiu.lu@intel.com>
359
360 PR ld/1263
361 * elflink.c (elf_link_add_object_symbols): Abort for
362 --just-symbols on DSO.
363
364 2005-09-08 Paul Brook <paul@codesourcery.com>
365
366 * reloc.c: Rename BFD_RELOC_ARM_SMI to BFD_RELOC_ARM_SMC.
367 * bfd-in2.h: Regenerate.
368 * libbfd.h: Regenerate.
369
370 2005-09-06 H.J. Lu <hongjiu.lu@intel.com>
371
372 PR ld/1301
373 * elflink.c (_bfd_elf_merge_symbol): Don't check undefined
374 symbol introduced by "ld -u" for TLS.
375
376 2005-09-02 Paul Brook <paul@codesourcery.com>
377
378 * libbdf.h: Regenerate.
379 * bfd-in2.h: Regenerate.
380 * reloc.c: Add BFD_RELOC_ARM_T32_CP_OFF_IMM and
381 BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
382
383 2005-09-01 Dmitry Diky <diwil@spec.ru>
384
385 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Do not adjust
386 local symbols and move it to
387 (msp430_elf_relax_adjust_locals): New function - walk over the
388 sections in the bfd and adjust relocations as necessary.
389
390 2005-08-31 DJ Delorie <dj@redhat.com>
391
392 * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
393 address operator, as that breaks GCC's strict aliasing rules.
394 (elf_i386_size_dynamic_sections): Avoid the need for type
395 punning.
396 * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
397 & address operator, as that breaks GCC's strict aliasing
398 rules.
399 (elf_x86_64_size_dynamic_sections): Avoid the need for type
400 punning.
401
402 2005-08-30 Phil Edwards <phil@codesourcery.com>
403
404 * config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
405
406 2005-08-29 H.J. Lu <hongjiu.lu@intel.com>
407
408 PR ld/1247
409 * elfxx-ia64.c (allocate_fptr): Check undefined symbol.
410
411 2005-08-29 Steven J. Hill <sjhill@realitydiluted.com>
412
413 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Initialise
414 'value' to avoid compile time warning message.
415
416 2005-08-26 Christian Groessler <chris@groessler.org>
417
418 * coff-z8k.c: (r_jr, r_disp7, r_callr): Fix src_mask and dst_mask
419 of HOWTO.
420 (coff_z8k_select_reloc): Remove.
421 (SELECT_RELOC): Remove.
422 (coff_z8k_reloc_type_lookup): New function.
423 (coff_bfd_reloc_type_lookup): Define.
424 * configure.in: Add cofflink.lo to z8kcoff_vec.
425 * configure: Regenerate.
426 * reloc.c: (bfd_reloc_code_type): Add z8k relocations.
427 (bfd_install_relocation): Don't clear reloc_entry->addend for
428 coff-z8k target.
429 * bfd-in2.h: Regenerate.
430 * libbfd.h: Regenerate.
431
432 2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
433
434 * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
435
436 2005-08-24 H.J. Lu <hongjiu.lu@intel.com>
437
438 PR ld/1208
439 * elf-hppa.h (elf_hppa_relocate_section): Print out the name
440 of unresolvable relocation.
441 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
442 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
443 * elf32-i386.c (elf_i386_relocate_section): Likewise.
444 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
445 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
446 * elf32-s390.c (elf_s390_relocate_section): Likewise.
447 * elf32-sh.c (sh_elf_relocate_section): Likewise.
448 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
449 * elf64-s390.c (elf_s390_relocate_section): Likewise.
450 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
451 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
452 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
453
454 2005-08-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
455
456 * config.bfd: Add bfd_elf32_shnbsd_vec and bfd_elf32_shlnbsd_vec
457 to targ_selvecs for sh5*-*-netbsd* and sh64*-*-netbsd*.
458
459 2005-08-18 Alan Modra <amodra@bigpond.net.au>
460
461 * coff-a29k.c: Delete.
462 * cpu-a29k.c: Delete.
463 * Makefile.am: Remove mention of a29k files.
464 * aoutf1.h: Remove a29k support.
465 * aoutx.h: Likewise.
466 * archures.c: Likewise.
467 * coffcode.h: Likewise.
468 * config.bfd: Likewise.
469 * configure.in: Likewise.
470 * ieee.c: Likewise.
471 * mipsbsd.c: Likewise.
472 * pdp11.c: Likewise.
473 * sparclynx.c: Likewise.
474 * targets.c: Likewise.
475 * Makefile.in: Regenerate.
476 * configure: Regenerate.
477 * bfd-in2.h: Regenerate.
478 * po/SRC-POTFILES.in: Regenerate.
479
480 2005-08-18 Alan Modra <amodra@bigpond.net.au>
481
482 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
483 zero size dynamic variables.
484 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
485 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
486 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
487 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
488 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
489 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
490 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
491 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
492 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
493 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
494 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
495 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
496 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
497 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
498 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
499 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
500
501 2005-08-17 H.J. Lu <hongjiu.lu@intel.com>
502
503 PR binutils/1179
504 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section lma
505 instead of vma.
506 (_bfd_dwarf2_find_line): Likewise.
507
508 2005-08-17 Alan Modra <amodra@bigpond.net.au>
509
510 * elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
511 SEC_LINKER_CREATED.
512 (mmix_elf_final_link): Check that section hasn't already been
513 removed before removing.
514 * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
515 (mmo_canonicalize_symtab): Likewise for reg section.
516
517 2005-08-17 Alan Modra <amodra@bigpond.net.au>
518
519 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
520 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called
521 without any got section.
522
523 2005-08-17 Danny Smith <dannysmith@users.sourceforge.net>
524
525 * cofflink.c (_bfd_coff_generic_relocate_section): Correct
526 comment.
527
528 2005-08-17 Alan Modra <amodra@bigpond.net.au>
529
530 * elflink.c (_bfd_elf_define_linkage_sym): Don't call
531 bfd_elf_link_record_dynamic_symbol. Call elf_backend_hide_symbol.
532 (_bfd_elf_link_renumber_dynsyms): Formatting.
533 (struct elf_gc_sweep_symbol_info): New.
534 (elf_gc_sweep_symbol): Rewrite.
535 (elf_gc_sweep): Adjust params and elf_gc_sweep_symbol call.
536 Call _bfd_elf_link_renumber_dynsyms.
537 (bfd_elf_gc_sections): Adjust elf_gc_sweep call.
538
539 2005-08-16 Alan Modra <amodra@bigpond.net.au>
540
541 * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
542 when relocatable.
543
544 2005-08-15 Bob Wilson <bob.wilson@acm.org>
545
546 * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
547 of EM_XTENSA and EM_XTENSA_OLD.
548
549 2005-08-16 Alan Modra <amodra@bigpond.net.au>
550
551 * elf-bfd.h (_bfd_elf_define_linkage_sym): Declare.
552 * elflink.c (_bfd_elf_define_linkage_sym): New function, extracted
553 from..
554 (_bfd_elf_create_got_section): ..here.
555 (_bfd_elf_link_create_dynamic_sections): Call it for _DYNAMIC.
556 (_bfd_elf_create_dynamic_sections): ..and _PROCEDURE_LINKAGE_TABLE_.
557 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Use
558 _bfd_elf_define_linkage_sym.
559 * elf32-frv.c (_frv_create_got_section): Likewise.
560 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
561
562 2005-08-15 Paul Brook <paul@codesourcery.com>
563
564 * elf32-arm.c (elf32_arm_howto_table_1): Make R_ARM_PLT32 the same as
565 R_ARM_PC24.
566
567 2005-08-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
568
569 PR ld/1135
570 * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
571 .plt, .dlt, .sdata, .sbss and .tbss.
572
573 2005-08-12 Dmitry Diky <diwil@spec.ru>
574
575 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
576 referenced by .section + DISPLACEMENT.
577
578 2005-08-10 James E. Wilson <wilson@specifix.com>
579
580 * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
581 DW_OP_addr is only opcode in location before using it.
582
583 2005-08-09 H.J. Lu <hongjiu.lu@intel.com>
584
585 * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
586
587 2005-08-09 Rodney Brown <rbrown@bravurasolutions.com.au>
588 Nick Clifton <nickc@redhat.com>
589
590 * aix5ppc-core.c (xcoff64_core_p): Constify return_value
591 variable. Also, do not use core_hdr macro as it evaluates to a
592 cast of an lvalue which is no longer supported by GCC 4.0.
593
594 2005-08-08 Eric Dönges <Eric.Doenges@betty-tv.com>
595
596 * archures.c (bfd_mach_msp21): New MSP430 machine number.
597 * bfd-in2.h: Regenerate.
598 * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
599 variants.
600
601 2005-08-07 Nick Clifton <nickc@redhat.com>
602 Paul Brook <paul@codesourcery.com>
603
604 PR 1147
605 * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
606 (elf32_arm_close_and_cleanup): New function - walk over the
607 sections in the bfd that is being closed removing them from the
608 list of recorded sections.
609 (unrecord_section_via_map_over_sections): New helper function.
610 (record_section_with_arm_elf_section_data): Call bfd_malloc
611 instead of bfd_alloc. Remove unneeded abfd parameter.
612 (elf32_arm_new_section_hook): Do not pass bfd to
613 record_section_with_arm_elf_section_data.
614
615 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
616 already defined by the target.
617
618 2005-08-05 Fred Fish <fnf@specifix.com>
619
620 * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
621 to determine how many bytes to read from each rangelist entry.
622
623 2005-08-05 H.J. Lu <hongjiu.lu@intel.com>
624
625 * bfd.c (bfd_hide_symbol): New.
626 * bfd-in2.h: Regenerated.
627
628 2005-08-04 H.J. Lu <hongjiu.lu@intel.com>
629
630 * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
631 large common symbol and a normal common symbol, always turn
632 the large common symbol into a normal one.
633
634 2005-08-04 Alan Modra <amodra@bigpond.net.au>
635
636 * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
637 with sym.
638 (ppc_elf_relocate_section): Adjust for above.
639 (create_sdata_sym): New function.
640 (ppc_elf_create_linker_section): Call it.
641 (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
642 Create sdata syms for all SDA relocs.
643 (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
644 and _SDA2_BASE_.
645 (ppc_elf_set_sdata_syms): Delete.
646 * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
647 and DT_FINI tags unless associated section has input.
648 (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
649 (_bfd_elf_provide_section_bound_symbols): Delete.
650 * bfd-in.h (_bfd_elf_provide_symbol): Delete.
651 (_bfd_elf_provide_section_bound_symbols): Delete.
652 * bfd-in2.h: Regenerate.
653
654 2005-08-04 Alan Modra <amodra@bigpond.net.au>
655
656 * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
657 * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
658 * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
659 * bfd-in2.h: Regenerate.
660
661 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
662
663 * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
664 only if it isn't NULL.
665
666 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
667
668 * elf32-i386.c (elf_howto_table): Undo the overflow change for
669 R_386_PC16 made on 2005-07-18.
670
671 * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
672 change for R_X86_64_PC16 made on 2005-07-18.
673
674 2005-08-03 Alan Modra <amodra@bigpond.net.au>
675
676 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot. Use
677 elf.hgot throughout file.
678
679 2005-08-03 Alan Modra <amodra@bigpond.net.au>
680
681 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
682 _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
683
684 2005-08-02 Andreas Schwab <schwab@suse.de>
685
686 * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
687 (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
688 changed.
689 (allocate_dynrel_entries): Look only at GOT relocations when
690 only_got is true.
691 (elfNN_ia64_size_dynamic_sections): Set only_got to false before
692 calling allocate_dynrel_entries.
693
694 2005-08-02 Nick Clifton <nickc@redhat.com>
695
696 PR 1147
697 * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
698 and make the mapcount field unsigned.
699 (struct section_list): New: Used to keep track of which sections
700 have an _arm_elf_section_data structure.
701 (record_section_with_arm_elf_section_data): New function.
702 (get_arm_elf_section_data): New function.
703 (unrecord_section_with_arm_elf_section_data): New function.
704 (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
705 (elf32_arm_new_section_hook): Call
706 record_section_with_arm_elf_section_data.
707 (elf32_arm_write_section): Use get_arm_elf_section_data and
708 unrecord_section_with_arm_elf_section_data.
709
710 2005-08-01 Richard Sandiford <richard@codesourcery.com>
711
712 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
713 of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
714
715 2005-07-30 David Daney <ddaney@avtrex.com>
716
717 * elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
718
719 2005-07-29 David Daney <ddaney@avtrex.com>
720
721 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp
722 if it is in the *ABS* section.
723
724 2005-07-29 Paul Brook <paul@codesourcery.com>
725
726 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
727 * bfd-in2.h: Regenerate.
728 * libbfd.h: Regenerate.
729
730 2005-07-29 Paul Brook <paul@codesourcery.com>
731
732 * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
733 * bfd-in2.h: Regeenrate.
734 * libbfd.h: Regenerate.
735
736 2005-07-29 Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
737
738 * peXXigen.c (pe_print_edata): Compute the size of the export
739 table from the size field in the DataDictionary and not the size
740 of the section. Some linkers embed the export table inside a
741 larger section.
742
743 2005-07-29 Alan Modra <amodra@bigpond.net.au>
744
745 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
746 (enum action_discarded): Move from..
747 * elflink.c (enum action_discarded): ..here.
748 (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
749 Remove target specific section checks.
750 (elf_link_input_bfd): Adjust.
751 * elfxx-target.h (elf_backend_action_discarded): Define.
752 (elfNN_bed): Init new field.
753 * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
754 * bfd-in2.h: Regenerate.
755 * elf-hppa.h (elf_hppa_action_discarded): New function.
756 * elf32-hppa.c (elf_backend_action_discarded): Define.
757 * elf64-hppa.c (elf_backend_action_discarded): Define.
758 * elf32-ppc.c (ppc_elf_action_discarded): New function.
759 (elf_backend_action_discarded): Define.
760
761 2005-07-27 Alan Modra <amodra@bigpond.net.au>
762
763 * elflink.c (fix_syms): Handle symbols defined in input sections.
764
765 2005-07-27 Jan Beulich <jbeulich@novell.com>
766
767 * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
768 (elf64_x86_64_info_to_howto): Use them.
769
770 2005-07-27 Alan Modra <amodra@bigpond.net.au>
771
772 * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
773 regardless of strength of previous definition.
774
775 2005-07-26 Alan Modra <amodra@bigpond.net.au>
776
777 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
778 (bfd_elf_gc_sections): Allow -gc-sections when -shared.
779 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
780
781 2005-07-26 Alan Modra <amodra@bigpond.net.au>
782
783 * elflink.c (elf_gc_sweep): Move gcc_except_table code..
784 (bfd_elf_gc_sections): ..to here.
785
786 2005-07-25 DJ Delorie <dj@redhat.com>
787
788 * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
789 * libbfd.h: Regenerate.
790 * bfd-in2.h: Regenerate.
791
792 * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
793 R_M32C_HI8, R_M32C_HI16.
794 (m32c_reloc_map): Likewise.
795 (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
796
797 2005-07-25 Jan Hubicka <jh@suse.cz>
798 H.J. Lu <hongjiu.lu@intel.com>
799
800 * elf-bfd.h (_bfd_elf_large_com_section): New.
801 * elf.c (_bfd_elf_large_com_section): New. Defined.
802
803 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
804 (elf64_x86_64_elf_section_from_bfd_section): New.
805 (elf64_x86_64_symbol_processing): New.
806 (elf64_x86_64_common_definition): New.
807 (elf64_x86_64_common_section_index): New.
808 (elf64_x86_64_common_section): New.
809 (elf64_x86_64_merge_symbol): New.
810 (elf64_x86_64_additional_program_headers): New.
811 (elf64_x86_64_special_sections): New.
812 (elf_backend_section_from_bfd_section): New. Defined.
813 (elf_backend_add_symbol_hook): Likewise.
814 (elf_backend_common_section_index): Likewise.
815 (elf_backend_common_section): Likewise.
816 (elf_backend_common_definition): Likewise.
817 (elf_backend_merge_symbol): Likewise.
818 (elf_backend_special_sections): Likewise.
819 (elf_backend_additional_program_headers): Likewise.
820
821 2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
822
823 * elf-bfd.h (elf_backend_data): Add common_definition,
824 common_section_index, common_section, and merge_symbol.
825 (_bfd_elf_common_definition): New.
826 (_bfd_elf_common_section_index): New.
827 (_bfd_elf_common_section): New.
828
829 * elf.c (elf_fake_sections): Don't clear sh_flags.
830
831 * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
832 if it is available.
833 (is_global_data_symbol_definition): Call backend
834 common_definition instead of checking SHN_COMMON.
835 (elf_link_add_object_symbols): Likewise.
836 (elf_link_output_extsym): Call backend common_section_index
837 for common section index.
838 (_bfd_elf_common_definition): New.
839 (_bfd_elf_common_section_index): New.
840 (_bfd_elf_common_section): New.
841
842 * elfxx-target.h (elf_backend_common_definition): New.
843 (elf_backend_common_section_index): New.
844 (elf_backend_common_section): New.
845 (elf_backend_merge_symbol): New.
846 (elfNN_bed): Initialize common_definition, common_section_index,
847 common_section, and merge_symbol.
848
849 * section.c (BFD_FAKE_SECTION): New.
850 (STD_SECTION): Use it.
851 * bfd-in2.h: Regenerated.
852
853 2005-07-23 Olaf Hering <olh@suse.de>
854
855 * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
856 callback.
857
858 2005-07-21 Ralf Corsepius <ralf.corsepius@rtems.org>
859
860 * config.bfd: Remove i[3-7]86-*-rtemself*.
861 Remove sparc-*-rtemself*.
862
863 2005-07-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
864
865 * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
866 R_M32R_REL32.
867
868 2005-07-21 Ben Elliston <bje@gnu.org>
869
870 * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
871 (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
872 (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
873 (cf-m68klynx.lo, m68klynx.lo): Remove targets.
874 * Makefile.in: Regenerate.
875 * cf-m68klynx.c: Remove.
876 * m68klynx.c: Likewise.
877 * configure.in (m68klynx_aout_vec): Remove vector.
878 (m68klynx_coff_vec): Likewise.
879 * configure: Regenerate.
880 * targets.c (m68klynx_aout_vec): Remove extern.
881 (m68klynx_coff_vec): Likewise.
882 (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
883 * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
884
885 2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
886
887 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
888 (m32r_reloc_map): Likewise.
889 (m32r_elf_relocate_section): Likewise.
890 (m32r_elf_gc_sweep_hook): Likewise.
891 (m32r_elf_check_relocs): Likewise.
892
893 2005-07-18 Nick Clifton <nickc@redhat.com>
894
895 * reloc.c: Add M32C and MS1 relocs.
896 * bfd-in2.h: Regenerate.
897 * libbfd.h: Regenerate.
898
899 2005-07-18 Nick Clifton <nickc@redhat.com>
900
901 * config.bfd: Move m32c entry to correct location.
902 * archures.c: Likewise.
903 * configure.in: Likewise.
904 * configure: Regenerate.
905 * targets.c: Move ms1 vector to correct location.
906
907 2005-07-18 Jan Beulich <jbeulich@novell.com>
908
909 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
910 for R_386_PC16.
911 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
912 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
913
914 2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
915
916 PR ld/1021
917 PR ld/1031
918 * elflink.c (elf_link_add_object_symbols): Also append the version
919 name to non-hidden absolute symbols that are functions.
920
921 2005-07-16 Alan Modra <amodra@bigpond.net.au>
922
923 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
924 for zero size sections. Don't set .sbss syms here.
925 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
926
927 2005-07-16 Alan Modra <amodra@bigpond.net.au>
928
929 * Makefile.am: Run "make dep-am".
930 * Makefile.in: Regenerate.
931
932 2005-07-15 Bob Wilson <bob.wilson@acm.org>
933
934 * elf32-xtensa.c (vsprint_msg): Add prototype.
935 (build_encoding_error_message): Delete. Code moved into....
936 (elf_xtensa_do_reloc): ....here, and changed to give better
937 error messages for out of range literals.
938
939 2005-07-15 Alan Modra <amodra@bigpond.net.au>
940
941 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
942 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
943 defined in output sections. Call bfd_elf_record_link_assignment.
944 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
945 * bfd-in2.h: Regenerate.
946
947 2005-07-14 Jim Blandy <jimb@redhat.com>
948
949 Add support for m32c-*-elf (Renesas m32c and m16c).
950 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
951 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
952 (BFD32_BACKENDS): Add elf32-m32c.lo.
953 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
954 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
955 * Makefile.in: Regenerated.
956 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
957 arch and mach codes.
958 (bfd_m32c_arch): New arch info object.
959 (bfd_archures_list): List bfd_m32c_arch.
960 * bfd-in2.h: Regenerated.
961 * config.bfd: Add case for the m32c.
962 * configure.in: Add case for the m32c.
963 * configure: Regenerated.
964 * cpu-m32c.c, elf32-m32c.c: New files.
965 * libbfd.h: Regenerated.
966 * targets.c (bfd_elf32_m32c_vec): Declare.
967 (_bfd_target_vector): List bfd_elf32_m32c_vec.
968
969 2005-07-14 Alan Modra <amodra@bigpond.net.au>
970
971 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
972 (_bfd_elf_provide_section_bound_symbols): Remove param name.
973 Formatting.
974 * bfd-in2.h: Regenerate.
975 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
976 (_bfd_elf_provide_symbol): Formatting.
977 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
978 create section relative syms.
979 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
980 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
981 _bfd_elf_provide_section_bound_symbols.
982 * reloc.c (bfd_mark_used_section): Delete.
983 (bfd_generic_gc_sections): Don't call the above.
984
985 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
986
987 PR 1063
988 * cache.c (bfd_last_cache): Initialise to NULL.
989
990 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
991 Nick Clifton <nickc@redhat.com>
992
993 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
994 Alpha binaries and issue a helpful error message.
995 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
996 symbol index to 15 to allow for binaries produced by DEC
997 compilers.
998
999 2005-07-13 Steve Ellcey <sje@cup.hp.com>
1000
1001 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
1002
1003 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1004
1005 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
1006 when !can_plt_call.
1007
1008 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1009
1010 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
1011
1012 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1013
1014 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
1015
1016 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
1017
1018 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
1019 change.
1020
1021 2005-07-08 Paul Koning <pkoning@equallogic.com>
1022
1023 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
1024 where addresses are sign extended.
1025
1026 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
1027
1028 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
1029 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
1030 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
1031 sparc*-*-rtemsaout* as removed
1032
1033 2005-07-08 Alan Modra <amodra@bigpond.net.au>
1034
1035 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
1036 of the usual sections are found.
1037 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
1038 Strip .dynbss if it is zero size.
1039 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
1040 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1041 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1042 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
1043 .dynsbss.
1044 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
1045 when it is zero size.
1046 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
1047 of .dynbss and zero size sections.
1048 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
1049 it is zero size.
1050 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
1051 .dynbss if zero size.
1052 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
1053 too.
1054 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1055 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1056 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1057 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
1058 .plt.* and .got.plt.* if zero size.
1059 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
1060 .got* and .dynbss if zero size.
1061 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
1062 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
1063 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
1064 reloc section.
1065 (create_got_section): Always create new .got and .rela.got sections.
1066 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
1067 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1068 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1069 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
1070 dynamic bss sections correctly.
1071 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
1072 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
1073 .dynbss if zero size.
1074
1075 2005-07-08 Ben Elliston <bje@au.ibm.com>
1076
1077 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
1078 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
1079
1080 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
1081
1082 * elf-bfd.h (elf_backend_data): Add special_sections.
1083
1084 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
1085 first.
1086
1087 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
1088 (elf_backend_special_sections): New. Defined.
1089 * elf32-m32r.c: Likewise.
1090 * elf32-m68hc11.c: Likewise.
1091 * elf32-m68hc12.c: Likewise.
1092 * elf32-mcore.c: Likewise.
1093 * elf32-sh64.c: Likewise.
1094 * elf32-v850.c: Likewise.
1095 * elf32-xtensa.c: Likewise.
1096 * elf64-alpha.c: Likewise.
1097 * elf64-hppa.c: Likewise.
1098 * elf64-ppc.c: Likewise.
1099 * elf64-sh64.c: Likewise.
1100 * elfxx-ia64.c: Likewise.
1101 * elfxx-mips.c: Likewise.
1102 * elfxx-mips.h: Likewise.
1103
1104 * elfxx-target.h (elf_backend_special_sections): New.
1105 (elfNN_bed): Initialize special_sections.
1106
1107 2005-07-07 Bob Wilson <bob.wilson@acm.org>
1108
1109 * xtensa-modules.c: Update tables with Xtensa MMU features.
1110
1111 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1112
1113 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
1114 format bugs.
1115 * vms.h (_bfd_vms_debug): Add format attribute.
1116 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
1117
1118 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 PR 975
1121 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
1122 symbol with default visibility is local.
1123
1124 2005-07-07 Ben Elliston <bje@gnu.org>
1125
1126 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
1127
1128 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
1129
1130 * dwarf2.c (varinfo): Add addr.
1131 (lookup_symbol_in_variable_table): Also check addr.
1132 (scan_unit_for_symbols): Set addr for variable.
1133 (comp_unit_find_line): Updated.
1134
1135 2005-07-06 Nick Clifton <nickc@redhat.com>
1136
1137 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
1138 message if an unknown reloc is encountered.
1139 (alpha_relocate_section): Likewise.
1140
1141 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
1142 with a missing howto field.
1143
1144 2005-07-06 Alan Modra <amodra@bigpond.net.au>
1145
1146 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
1147 elfxx-sparc.c.
1148
1149 2005-07-05 Paul Brook <paul@codesourcery.com>
1150
1151 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
1152 (ppc_elf_vxworks_get_sec_type_attr): New function.
1153 (elf_backend_special_sections): Remove vxwords definition.
1154 (elf_backend_get_sec_type_attr): Define for vxworks.
1155
1156 2005-07-05 Nick Clifton <nickc@redhat.com>
1157
1158 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
1159
1160 2005-07-05 Paul Brook <paul@codesourcery.com>
1161
1162 * config.bfd: Add separate case for ppc-vxworks.
1163 * configure: Regenerate.
1164 * configure.in: Include elf-vxworks.lo on ppc targets.
1165 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
1166 .rela.plt.unloaded.
1167 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
1168 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
1169 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
1170 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
1171 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
1172 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
1173 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
1174 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
1175 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
1176 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
1177 (ppc_elf_create_got): Create .got.plt for VxWorks.
1178 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
1179 section for VxWorks.
1180 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
1181 (allocate_got): VxWorks does not need a got header.
1182 (allocate_dynrelocs): Handle VxWorks plt format.
1183 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
1184 VxWorks. Handle VxWorks plt/got.
1185 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
1186 (ppc_elf_vxworks_special_sections): New.
1187 (ppc_elf_vxworks_link_hash_table_create,
1188 ppc_elf_vxworks_add_symbol_hook,
1189 elf_i386_vxworks_link_output_symbol_hook,
1190 ppc_elf_vxworks_final_write_processing): New functions.
1191 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
1192 (_bfd_target_vector): Use it.
1193
1194 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1195
1196 * libbfd-in.h (struct artdata): Add extended_names_size field.
1197 * libbfd.h: Rebuilt.
1198 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
1199 allocated object by bfd_zalloc.
1200 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
1201 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
1202 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
1203 (get_extended_arelt_filename): Fail if index is bigger or equal to
1204 extended_names_size.
1205 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
1206 get_extended_arelt_filename already did that.
1207 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
1208 Allocate one extra byte and clear it, in case extended names table
1209 is not terminated.
1210
1211 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
1212 bfd_zalloc2): New prototypes.
1213 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
1214 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
1215 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
1216 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
1217 elf_map_symbols, map_sections_to_segments,
1218 assign_file_positions_for_segments, copy_private_bfd_data,
1219 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
1220 where appropriate.
1221 * bfd-in2.h: Rebuilt.
1222 * libbfd.h: Rebuilt.
1223
1224 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
1225 verdef or verneed section.
1226 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
1227 verneed sections gracefully.
1228 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
1229 bogus relocation values.
1230 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1231 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
1232 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1233 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
1234 * elfxx-ia64.c (lookup_howto): Likewise.
1235
1236 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
1237 the end of strtab and clear it.
1238 (elf_read): Remove.
1239
1240 2005-07-05 Nick Clifton <nickc@redhat.com>
1241
1242 * po/vi.po: New Vietnamese translation.
1243 * configure.in (ALL_LINGUAS): Add vi.
1244 * configure: Regenerate.
1245
1246 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
1247
1248 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
1249 touchup logic like i386/ppc.
1250
1251 2005-07-05 Alan Modra <amodra@bigpond.net.au>
1252
1253 * elf.c (special_sections): Move const qualifier.
1254 (special_sections_b..special_sections_t): Likewise.
1255 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
1256 const.
1257 (elf32_arm_symbian_special_sections): Move const qualifier.
1258 * elf32-m32r.c: Similarly.
1259 * elf32-m68hc11.c: Similarly.
1260 * elf32-m68hc12.c: Similarly.
1261 * elf32-mcore.c: Similarly.
1262 * elf32-ppc.c: Similarly.
1263 * elf32-sh64.c: Similarly.
1264 * elf32-v850.c: Similarly.
1265 * elf32-xtensa.c: Similarly.
1266 * elf64-alpha.c: Similarly.
1267 * elf64-hppa.c: Similarly.
1268 * elf64-ppc.c: Similarly.
1269 * elf64-sh64.c: Similarly.
1270 * elfxx-ia64.c: Similarly.
1271 * elfxx-mips.c: Similarly.
1272
1273 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1274
1275 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
1276 info->executable instead of !info->shared where appropriate.
1277
1278 2005-07-04 Alan Modra <amodra@bigpond.net.au>
1279
1280 PR 1042
1281 * elf.c (assign_file_positions_for_segments): Remove excluded
1282 sections from the segment map.
1283
1284 2005-07-04 Alan Modra <amodra@bigpond.net.au>
1285
1286 PR 1004
1287 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
1288 special_sections.
1289 (_bfd_elf_get_special_section): Declare.
1290 (bfd_elf_special_section): Update prototype.
1291 * elf.c (special_sections): Remove unused outer entries.
1292 (get_special_section): Delete.
1293 (_bfd_elf_get_special_section): New function.
1294 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
1295 special_sections indexing.
1296 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
1297 * elf32-arm.c (symbian_special_sections_d): Delete.
1298 (symbian_special_sections_g, symbian_special_sections_h): Delete.
1299 (symbian_special_sections_i, symbian_special_sections_f): Delete.
1300 (symbian_special_sections_p): Delete.
1301 (elf32_arm_symbian_special_sections): Merge above to here.
1302 (elf32_arm_symbian_get_sec_type_attr): New function.
1303 (elf_backend_special_sections): Don't define.
1304 (elf_backend_get_sec_type_attr): Define.
1305 * elf32-m32r.c: Similarly to elf32-arm.c.
1306 * elf32-m68hc11.c: Likewise.
1307 * elf32-m68hc12.c: Likewise.
1308 * elf32-mcore.c: Likewise.
1309 * elf32-sh64.c: Likewise.
1310 * elf32-v850.c: Likewise.
1311 * elf32-xtensa.c: Likewise.
1312 * elf64-alpha.c: Likewise.
1313 * elf64-hppa.c: Likewise.
1314 * elf64-ppc.c: Likewise.
1315 * elf64-sh64.c: Likewise.
1316 * elfxx-ia64.c: Likewise.
1317 * elfxx-mips.c: Likewise.
1318 * elf32-ppc.c: Likewise.
1319 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
1320 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
1321 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
1322 (elf_backend_get_sec_type_attr): Define.
1323 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
1324 (elf_backend_special_sections): Don't define.
1325 (elfNN_bed): Update.
1326
1327 2005-07-01 Nick Clifton <nickc@redhat.com>
1328
1329 * cpu-d10v.c: Update to ISO C90 style function declarations and
1330 fix formatting.
1331 * cpu-d30v.c: Likewsie.
1332 * cpu-i370.c: Likewsie.
1333 * cpu-xstormy16.c: Likewsie.
1334 * elf32-arc.c: Likewsie.
1335 * elf32-d10v.c: Likewsie.
1336 * elf32-d30v.c: Likewsie.
1337 * elf32-dlx.c: Likewsie.
1338 * elf32-i370.c: Likewsie.
1339 * elf32-i960.c: Likewsie.
1340 * elf32-ip2k.c: Likewsie.
1341 * elf32-m32r.c: Likewsie.
1342 * elf32-mcore.c: Likewsie.
1343 * elf32-openrisc.c: Likewsie.
1344 * elf32-or32.c: Likewsie.
1345 * elf32-pj.c: Likewsie.
1346 * elf32-v850.c: Likewsie.
1347 * elf32-xstormy16.c: Likewsie.
1348
1349 2005-07-01 Alan Modra <amodra@bigpond.net.au>
1350
1351 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
1352 a new .got section.
1353 (elf64_alpha_create_dynamic_sections): Always make new sections
1354 by using bfd_make_section_anyway_with_flags. Check that .got not
1355 already created.
1356 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
1357 instead.
1358
1359 2005-06-30 Alan Modra <amodra@bigpond.net.au>
1360
1361 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
1362 _SDA_BASE_ and _SDA2_BASE_ symbols.
1363 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
1364 sym if not def_regular.
1365 (_bfd_elf_provide_section_bound_symbols): Similarly.
1366
1367 2005-06-30 Ben Elliston <bje@gnu.org>
1368
1369 * config.bfd: Mark as obsolete:
1370 m68*-apollo-*
1371 m68*-apple-aux*
1372 m68*-bull-sysv*
1373
1374 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1375
1376 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
1377 .eh_frame specially..
1378 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
1379 Don't recheck sections we have already marked.
1380 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
1381 * section.c (struct bfd_section): Add gc_mark_from_eh.
1382 (STD_SECTION): Adjust.
1383 * ecoff.c (bfd_debug_section): Adjust.
1384 * bfd-in2.h: Regenerate.
1385
1386 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1387
1388 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
1389 not been processed by check_relocs.
1390
1391 2005-06-29 Paul Brook <paul@codesourcery.com>
1392
1393 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
1394 * bfd-in2.h: Regenerate.
1395 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
1396 relative.
1397 * elflink.c (bfd_elf_set_symbol): Add section argument.
1398 (_bfd_elf_provide_symbol): Ditto.
1399 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
1400
1401 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
1402
1403 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
1404 Use bh_root, and hh.
1405 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
1406 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
1407 (struct elf32_hppa_link_hash_table): Use etab and bstab.
1408 (stub_hash_newfunc): Use hh.
1409 (hppa_link_hash_newfunc): Use hsh_cache.
1410 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
1411 (elf32_hppa_link_hash_table_free): Use bstab.
1412 (hppa_stub_name): Use eh.
1413 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
1414 (hppa_add_stub): Use bstab.
1415 (hppa_type_of_stub): Use eh.
1416 (hppa_build_one_stub): Use hh and bh_root.
1417 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
1418 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
1419 (elf32_hppa_gc_sweep_hook): Use hdh_next.
1420 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
1421 (allocate_plt_static): Use etab.
1422 (allocate_dynrelocs): Use etab, and hdh_next.
1423 (readonly_dynrelocs): Use hdh_next.
1424 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
1425 (get_local_syms): Use eh, bstab, and hh.
1426 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
1427 (elf32_hppa_set_gp): Use etab.
1428 (elf32_hppa_build_stubs): Use bstab.
1429 (final_link_relocate): Use eh, bh_root.
1430 (elf32_hppa_relocate_section): Use elf, etab.
1431 (elf32_hppa_finish_dynamic_sections): Use etab.
1432
1433 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
1434
1435 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
1436 the extra `;'.
1437
1438 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
1439
1440 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
1441 (hppa_stub_hash_entry): Define.
1442 (stub_hash_newfunc): Rename variables.
1443 (hppa_link_hash_newfunc): Likewise.
1444 (elf32_hppa_link_hash_table_free): Likewise.
1445 (hppa_stub_name): Likewise.
1446 (hppa_get_stub_entry): Likewise.
1447 (hppa_add_stub): Likewise.
1448 (hppa_type_of_stub): Likewise.
1449 (hppa_build_one_stub): Likewise.
1450 (hppa_size_one_stub): Likewise.
1451 (elf32_hppa_create_dynamic_sections): Likewise.
1452 (elf32_hppa_copy_indirect_symbol): Likewise.
1453 (elf32_hppa_check_relocs): Likewise.
1454 (elf32_hppa_gc_mark_hook): Likewise.
1455 (elf32_hppa_gc_sweep_hook): Likewise.
1456 (elf32_hppa_grok_psinfo): Likewise.
1457 (elf32_hppa_hide_symbol): Likewise.
1458 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1459 (allocate_dynrelocs): Likewise.
1460 (clobber_millicode_symbols): Likewise.
1461 (readonly_dynrelocs): Likewise.
1462 (elf32_hppa_size_dynamic_sections): Likewise.
1463 (get_local_syms): Likewise.
1464 (elf32_hppa_size_stubs): Likewise.
1465 (hppa_record_segment_addr): Likewise.
1466 (final_link_relocate): Likewise.
1467 (elf32_hppa_relocate_section): Likewise.
1468 (elf32_hppa_finish_dynamic_symbol): Likewise.
1469
1470 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1471
1472 PR 1025
1473 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
1474 symbol.
1475 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1476 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
1477 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1478 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1479 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1480 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1481 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1482 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1483 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1484 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1485 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1486 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1487 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1488 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
1489 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1490 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1491 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1492 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1493 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1494 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1495 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1496 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1497 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1498 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1499 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1500 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1501 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1502
1503 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1504
1505 PR 1022
1506 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
1507 symbol.
1508
1509 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1510
1511 PR 1025
1512 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
1513 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1514
1515 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
1516
1517 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
1518 BFD_RELOC_X86_64_GOTPC32.
1519 * bfd-in2.h: Regenerated.
1520
1521 2005-06-17 Jakub Jelinek <jakub@redhat.com>
1522
1523 * elf.c (bfd_section_from_shdr): Kill bogus warning.
1524
1525 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
1526 symbol, relocation, group or versym sections.
1527
1528 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
1529 is NULL.
1530 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
1531 doesn't point into the section.
1532
1533 2005-06-17 Jan Beulich <jbeulich@novell.com>
1534
1535 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
1536 and BFD_RELOC_X86_64_GOTPC32.
1537 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1538 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
1539 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1540 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
1541 and R_X86_64_GOTPC32.
1542 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
1543 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
1544 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1545 (elf64_x86_64_relocate_section): Likewise.
1546 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
1547
1548 2005-06-15 Mark Kettenis <kettenis@gnu.org>
1549
1550 * archive.c: Include "libiberty.h".
1551
1552 2005-06-15 Nick Clifton <nickc@redhat.com>
1553
1554 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
1555 produced by the GreenHills toolchain can be assimilated.
1556
1557 2005-06-14 Steve Ellcey <sje@cup.hp.com>
1558
1559 * som.c (som_find_inliner_info): New.
1560
1561 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
1562
1563 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
1564
1565 2005-06-14 Jakub Jelinek <jakub@redhat.com>
1566
1567 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1568 Prevent endless recursion on broken objects.
1569
1570 * archive.c (do_slurp_coff_armap): Check for overflows.
1571
1572 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
1573
1574 * elfcode.h (elf_write_relocs): Do nothing if there are no
1575 relocations.
1576
1577 2005-06-10 Alan Modra <amodra@bigpond.net.au>
1578
1579 * dwarf2.c (decode_line_info): Revert last change. Instead set
1580 initial low_pc to -1 to avoid need to test whether loc_pc has
1581 been set.
1582
1583 2005-06-09 Christopher Faylor <cgf@timesys.com>
1584
1585 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1586 either SEC_ALLOC OR SEC_LOAD.
1587
1588 2005-06-09 Christopher Faylor <cgf@timesys.com>
1589
1590 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1591 section header. Do not add STYP_NOLOAD since it does not appear to be
1592 a valid PE flag.
1593
1594 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 PR 1000
1597 * dwarf2.c (lookup_address_in_line_info_table): Restore code
1598 handling NULL function info, removed with 2005-04-03 change.
1599
1600 2005-06-08 Mark Mitchell <mark@codesourcery.com>
1601
1602 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1603
1604 2005-06-09 Alan Modra <amodra@bigpond.net.au>
1605
1606 * elflink.c (elf_mark_used_section): Delete.
1607 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1608 * reloc.c (bfd_mark_used_section): New function.
1609 (bfd_generic_gc_sections): Call bfd_mark_used_section.
1610
1611 2005-06-08 Alan Modra <amodra@bigpond.net.au>
1612
1613 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1614 (bfd_fdopenr): Same.
1615
1616 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1617
1618 * opncls.c (bfd_fdopenr): Add missing break statements.
1619
1620 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1621
1622 * opncls.c (bfd_fopen): New API.
1623 (bfd_openr): Use it.
1624 (bfd_fdopenr): Likewise.
1625 * bfd-in2.h: Regenerated.
1626
1627 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
1628 Michael Snyder <msnyder@redhat.com>
1629 Stan Cox <scox@redhat.com>
1630
1631 * Makefile.am (ALL_MACHINES): Add ms1 support.
1632 (ALL_MACHINES_CFILES): Same.
1633 (BFD32_BACKENDS): Same.
1634 (BFD32_BACKENDS_CFILES): Same.
1635
1636 * Makefile.in: Regenerate.
1637
1638 * archures.c (bfd_architecture): Add ms1 entries.
1639 Externalize bfd_ms1_arch.
1640 (bfd_archures_list): Add bfd_ms1_arch.
1641
1642 * bfd-in2.h: Regenerate.
1643
1644 * cpu-ms1.c: New file.
1645
1646 * elf32-ms1.c: New file.
1647
1648 * targets.c: Define extern of bfd_elf32_ms1_vec.
1649 Add bfd_elf32_ms1_vec to _bfd_target_vector.
1650
1651 * configure.in: Add bfd_elf32_ms1_vec case.
1652
1653 * configure: Regenerate.
1654
1655 * config.bfd: Add ms1-*-elf to table.
1656
1657 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1658
1659 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1660
1661 2005-06-07 Alan Modra <amodra@bigpond.net.au>
1662
1663 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1664 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1665
1666 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1667
1668 PR 990
1669 * bfd.c (bfd_find_line): New.
1670
1671 * dwarf2.c (comp_unit): Add variable_table.
1672 (funcinfo): Add file, line, and sec.
1673 (varinfo): New.
1674 (lookup_symbol_in_function_table): New.
1675 (lookup_symbol_in_variable_table): New.
1676 (scan_unit_for_functions): Renamed to ...
1677 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1678 DW_TAG_variable.
1679 (comp_unit_find_nearest_line): Updated.
1680 (comp_unit_find_line): New.
1681 (_bfd_dwarf2_find_line): New.
1682
1683 * elf-bfd.h (_bfd_elf_find_line): New.
1684 (_bfd_generic_find_line): New. Defined.
1685
1686 * elf.c (_bfd_elf_find_line): New.
1687
1688 * libbfd-in.h (_bfd_dwarf2_find_line): New.
1689 (_bfd_generic_find_line): New.
1690
1691 * bfd-in2.h: Regenerated.
1692 * libbfd.h: Likewise.
1693
1694 * libbfd.c (_bfd_generic_find_line): New.
1695
1696 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1697 with _bfd_generic_find_line.
1698 (bfd_target): Add _bfd_find_line.
1699
1700 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1701
1702 * dwarf2.c (decode_line_info): Properly set low_pc.
1703
1704 2005-06-06 Alan Modra <amodra@bigpond.net.au>
1705
1706 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1707 case, include addend when indexing .opd section map.
1708 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
1709 clear opd_adjust array if no_opd_opt set. Tidy code.
1710 Ignore zero size .opd. Check bfd_alloc return value.
1711 (ppc_stub_name): Return immediately on bfd_malloc fail.
1712 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1713
1714 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
1715
1716 * dwarf2.c (comp_unit): Fix a typo in comment.
1717
1718 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1719
1720 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1721 (reloc_type_lookup): Dito.
1722 (elf_vax_discard_copies): Dito.
1723 (elf_vax_instantiate_got_entries): Dito.
1724 (elf_vax_link_hash_traverse): Dito.
1725 (elf_vax_link_hash_newfunc): Dito.
1726 (elf_vax_link_hash_table_create): Dito.
1727 (elf32_vax_set_private_flags): Dito.
1728 (elf32_vax_merge_private_bfd_data): Dito.
1729 (elf32_vax_print_private_bfd_data): Dito.
1730 (elf_vax_check_relocs): Dito.
1731 (elf_vax_gc_mark_hook): Dito.
1732 (elf_vax_gc_sweep_hook): Dito.
1733 (elf_vax_size_dynamic_sections): Dito.
1734 (elf_vax_discard_copies): Dito.
1735 (elf_vax_instantiate_got_entries): Dito.
1736 (elf_vax_relocate_section): Dito.
1737 (elf_vax_finish_dynamic_symbol): Dito.
1738 (elf_vax_finish_dynamic_sections): Dito.
1739 (elf_vax_hash_table): Break-up of line isn't needed.
1740 (elf_vax_check_relocs): Remove leading whitespace
1741 (elf_vax_relocate_section): Remove redundant whitespace
1742 (elf_vax_link_hash_newfunc): Don't cast NULL.
1743 (elf_vax_link_hash_table_create): Dito.
1744 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1745
1746 2005-06-03 Alan Modra <amodra@bigpond.net.au>
1747
1748 PR 568
1749 * configure.in: Bump version
1750 * configure: Regenerate.
1751 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1752 discarded section sym refs and kill linker output.
1753 * simple.c (simple_dummy_einfo): New function.
1754 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1755
1756 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1757 for all reloc types.
1758
1759 2005-06-02 Alan Modra <amodra@bigpond.net.au>
1760
1761 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1762 restrictive of func code and func descr for undefined syms as well
1763 as defined.
1764
1765 2005-05-31 Jim Blandy <jimb@redhat.com>
1766
1767 * Makefile.am: Regenerate dependencies with 'make dep-am'.
1768 * Makefile.in: Regenerate.
1769
1770 2005-05-31 Richard Henderson <rth@redhat.com>
1771
1772 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1773 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1774 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1775 (elf64_alpha_want_plt): Update to match.
1776 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1777 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
1778
1779 2005-05-31 Zack Weinberg <zack@codesourcery.com>
1780
1781 * elf32-arm.c (elf32_arm_reloc_type_lookup)
1782 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1783 Use ISO C90 function declaration style.
1784
1785 2005-05-31 James E Wilson <wilson@specifixinc.com>
1786
1787 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1788 header PF_R flag on PT_LOAD segments.
1789
1790 2005-05-30 Richard Henderson <rth@redhat.com>
1791
1792 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1793 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1794
1795 2005-05-29 Richard Henderson <rth@redhat.com>
1796
1797 * configure.in (--enable-secureplt): New.
1798 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1799 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1800 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1801 (elf64_alpha_use_secureplt): New.
1802 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1803 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1804 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1805 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1806 (struct alpha_elf_link_hash_entry): Add plt_offset.
1807 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1808 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1809 (PLT_ENTRY_WORD3): Remove.
1810 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1811 on .plt and create .got.plt.
1812 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1813 (get_got_entry): Initialize plt_offset.
1814 (elf64_alpha_want_plt): New.
1815 (elf64_alpha_check_relocs): Use it.
1816 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
1817 plt entries here.
1818 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1819 error as user error.
1820 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1821 got subsection.
1822 (elf64_alpha_size_plt_section): Size .got.plt section.
1823 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1824 plt entries used.
1825 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1826 Add PLTRO DYNAMIC entry.
1827 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1828 (elf64_alpha_finish_dynamic_sections): Likewise.
1829
1830 2005-05-28 David Daney <ddaney@avtrex.com>
1831
1832 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
1833 calculation of DT_RELSZ to occur after all dynamic relocations
1834 are created.
1835
1836 2005-05-28 Eli Zaretskii <eliz@gnu.org>
1837
1838 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1839 * config.in, configure: Regenerate.
1840
1841 2005-05-26 Mark Kettenis <kettenis@gnu.org>
1842 Maciej W. Rozycki <macro@linux-mips.org>
1843
1844 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1845 stop processing of options if one of invalid size is
1846 encountered.
1847 (_bfd_mips_elf_section_from_shdr): Likewise.
1848 (_bfd_mips_elf_fake_sections): Reset the type of empty special
1849 sections.
1850
1851 2005-05-26 Richard Henderson <rth@redhat.com>
1852
1853 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
1854 plt_old_section, plt_old_value.
1855 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1856 (elf64_alpha_size_plt_section_1): Don't use it.
1857
1858 2005-05-26 Jakub Jelinek <jakub@redhat.com>
1859
1860 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1861 first shdr has sh_size == 0. Fail if e_shnum is large to cause
1862 arithmetic overflow when allocating the i_shdr array.
1863 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
1864
1865 2005-05-25 Richard Henderson <rth@redhat.com>
1866
1867 * elf64-alpha.c: Update all function definitions to ISO C. Remove
1868 all function prototypes; rearrange functions into def-use order.
1869
1870 2005-05-25 Richard Henderson <rth@redhat.com>
1871
1872 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1873 in the presence of deleting elements.
1874 (elf64_alpha_size_got_sections): Zero dead got section size.
1875
1876 2005-05-23 Fred Fish <fnf@specifixinc.com>
1877
1878 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1879 (struct funcinfo): Add caller_func, caller_file, caller_line.
1880 tag, and nesting_level members.
1881 (lookup_address_in_function_table): Change first passed parameter
1882 from "struct funcinfo *" to "struct comp_unit *".
1883 (lookup_address_in_function_table): Dereference unit to find function
1884 table.
1885 (lookup_address_in_function_table): Traverse the function list to
1886 create a chain of inlined functions back to the first non inlined
1887 function.
1888 (scan_unit_for_functions): Remember tag and nesting level. Handle
1889 DW_AT_call_file and DW_AT_call_line.
1890 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1891 call to pass unit pointer instead of function table pointer. For
1892 inlined functions, save pointer to the inliner chain.
1893 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1894 (_bfd_dwarf2_find_inliner_info): New function that returns information
1895 from the inliner chain after a call to bfd_find_nearest_line.
1896
1897 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1898 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1899 NAME##_find_inliner_info.
1900 (bfd_target): Add _bfd_find_inliner_info.
1901 * bfd-in2.h: Regenerate.
1902
1903 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1904 macro that always returns bfd_false.
1905 (_bfd_dwarf2_find_inliner_info): Declare.
1906 * libbfd.h: Regenerate.
1907
1908 * elf32-arm.c (elf32_arm_find_inliner_info): New function
1909 that calls _bfd_dwarf2_find_inliner_info.
1910 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1911
1912 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1913 that calls _bfd_dwarf2_find_inliner_info.
1914 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1915 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1916 _bfd_mips_elf_find_inliner_info.
1917 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1918 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1919
1920 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1921 _bfd_dwarf2_find_inliner_info.
1922 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1923 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1924 _bfd_elf_find_inliner_info.
1925
1926 * coffgen.c (coff_find_inliner_info): New function that
1927 calls _bfd_dwarf2_find_inliner_info.
1928 * libcoff-in.h (coff_find_inliner_info): Declare.
1929 * libcoff.h: Regenerate.
1930 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1931 (pmac_xcoff_vec) Ditto.
1932 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1933 (aix5coff64_vec): Ditto.
1934
1935 * aout-target.h (MY_find_inliner_info): Define as
1936 _bfd_nosymbols_find_inliner_info.
1937 * aout-tic30.c (MY_find_inliner_info): Ditto.
1938 * binary.c (binary_find_inliner_info): Ditto.
1939 * i386msdos.c (msdos_find_inliner_info): Ditto.
1940 * ihex.c (ihex_find_inliner_info): Ditto.
1941 * libaout.h (aout_32_find_inliner_info): Ditto.
1942 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1943 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1944 * mmo.c (mmo_find_inliner_info): Ditto.
1945 * nlm-target.h (nlm_find_inliner_info): Ditto.
1946 * pef.c (bfd_pef_find_inliner_info): Ditto.
1947 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1948 * srec.c (srec_find_inliner_info): Ditto.
1949 * tekhex.c (tekhex_find_inliner_info): Ditto.
1950 * versados.c (versados_find_inliner_info): Ditto.
1951 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1952
1953 * ieee.c (ieee_find_inliner_info): New function that always
1954 returns FALSE.
1955 * oasys.c (oasys_find_inliner_info): Ditto.
1956 * vms.c (vms_find_inliner_info): Ditto.
1957
1958 2005-05-24 Alan Modra <amodra@bigpond.net.au>
1959
1960 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1961 force old plt layout.
1962
1963 2005-05-22 Richard Henderson <rth@redhat.com>
1964
1965 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1966 sections.
1967 (elf64_alpha_check_relocs): Likewise.
1968 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1969 non-allocated sections.
1970
1971 2005-05-22 Richard Henderson <rth@redhat.com>
1972
1973 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1974 undefweak to use zero register. Call elf64_alpha_relax_got_load
1975 if not all uses removed.
1976 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1977 (elf64_alpha_relax_section): Handle undefweak symbols.
1978 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1979 (elf64_alpha_size_rela_got_1): Likewise.
1980 (elf64_alpha_relocate_section): Likewise.
1981
1982 2005-05-22 Richard Henderson <rth@redhat.com>
1983
1984 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1985 on SEC_CODE sections.
1986
1987 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1988
1989 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1990 unsigned int *.
1991 (som_write_space_strings): Change type of tmp_space and p to char *.
1992 (som_write_symbol_strings): Likewise. Also change type of comp to
1993 char *comp[4].
1994 (som_begin_writing): Change type of strings_size to unsigned int.
1995 (som_finish_writing): Likewise.
1996 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1997 char *.
1998 * som.h (struct som_section_data_struct): Change type of reloc_stream
1999 field to unsigned char *.
2000
2001 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
2002
2003 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
2004 copy relocations for VxWorks.
2005
2006 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
2007
2008 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
2009 has_sda_refs.
2010 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
2011 (ppc_elf_check_relocs): Set has_sda_refs.
2012 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
2013 copy relocations. Use has_sda_refs to place variables in .sbss.
2014 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
2015 .sbss.
2016
2017 2005-05-20 Bob Wilson <bob.wilson@acm.org>
2018
2019 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
2020 xtensa_default_isa is initialized.
2021
2022 2005-05-20 Alan Modra <amodra@bigpond.net.au>
2023
2024 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
2025 for second and subsequent list entries. Only allocate multiple
2026 glink stubs when shared or pie.
2027 (ppc_elf_finish_dynamic_symbol): Break out early when only one
2028 glink stub is needed.
2029
2030 2005-05-19 Zack Weinberg <zack@codesourcery.com>
2031
2032 * Makefile.am: Have 'all' depend on 'info'.
2033 * Makefile.in: Regenerate.
2034
2035 2005-05-19 Alan Modra <amodra@bigpond.net.au>
2036
2037 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
2038 init_offset. Add init_got_refcount, init_plt_refcount,
2039 init_got_offset and init_plt_offset.
2040 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
2041 (_bfd_elf_link_hash_hide_symbol): Likewise.
2042 (_bfd_elf_link_hash_table_init): Likewise.
2043 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2044 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2045 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
2046 (bfd_elf_size_dynamic_sections): Likewise.
2047 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
2048 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
2049 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
2050 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
2051 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
2052 (struct plt_entry): New.
2053 (ppc_elf_link_hash_table_create): Set new init_plt fields.
2054 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
2055 use _bfd_elf_link_hash_copy_indirect.
2056 (update_plt_info, find_plt_ent): New functions.
2057 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
2058 and adjust for use of plt list rather than refcount.
2059 (ppc_elf_gc_sweep_hook): Likewise.
2060 (ppc_elf_tls_optimize): Likewise.
2061 (ppc_elf_adjust_dynamic_symbol): Likewise.
2062 (allocate_dynrelocs): Likewise.
2063 (ppc_elf_relax_section): Likewise.
2064 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
2065 when performing a relocatable link.
2066 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
2067 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
2068 pic resolver stub.
2069
2070 2005-05-19 Alan Modra <amodra@bigpond.net.au>
2071
2072 * elf.c (assign_file_positions_for_segments): Use maximum of
2073 maxpagesize and section alignment when adjusting initial
2074 segment offset and section offsets.
2075
2076 2005-05-18 Zack Weinberg <zack@codesourcery.com>
2077
2078 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
2079 unconditional.
2080
2081 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
2082
2083 * elf.c (group_signature): Undo the last change. Check if the
2084 symbol table section is correct.
2085
2086 2005-05-17 Zack Weinberg <zack@codesourcery.com>
2087
2088 * elf32-arm.c: Wherever possible, use official reloc names
2089 from AAELF.
2090 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
2091 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
2092 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
2093 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
2094 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
2095 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
2096 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
2097 Add many new relocations from AAELF.
2098 (elf32_arm_howto_from_type): Update to match.
2099 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
2100 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
2101 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
2102 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
2103 (elf32_arm_final_link_relocate): Add support for
2104 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
2105 case entries redundant with default.
2106
2107 * reloc.c: Reorganize ARM relocations. Add Thumb
2108 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
2109 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
2110 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
2111 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
2112 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
2113 * bfd-in2.h, libbfd.h: Regenerate.
2114
2115 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
2116
2117 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
2118 elf_shstrtab.
2119 * format.c (bfd_check_format_matches): Set output_has_begun
2120 for both_direction.
2121 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
2122 special case for both_direction.
2123
2124 2005-05-17 Nick Clifton <nickc@redhat.com>
2125
2126 * elf.c (group_signature): Check for a group section which is
2127 actually a (corrupt) symbol table section in disguise and prevent
2128 an infinite loop from occurring.
2129
2130 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2131
2132 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
2133 2005-02-16.
2134
2135 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2136
2137 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
2138 predicate on slot 0 only if slot 0 isn't br.
2139
2140 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2141
2142 PR 797
2143 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
2144 empty sdynbss section.
2145 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
2146
2147 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
2148
2149 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
2150 dynamic sections.
2151
2152 2005-05-17 Alan Modra <amodra@bigpond.net.au>
2153
2154 * elf32-ppc.c (LIS_11. LIS_12): Define.
2155 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
2156 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
2157 for --data-plt when building non-pie executables.
2158
2159 2005-05-17 Nick Clifton <nickc@redhat.com>
2160
2161 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
2162 the situation where a symbols's section is not known but a section
2163 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
2164 OS.
2165
2166 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
2167 the presence of a symbol table to just before the symbol table is
2168 actually used.
2169
2170 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
2171
2172 PR 834
2173 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
2174 (elfNN_ia64_relax_section): Use it.
2175
2176 2005-05-14 Mark Kettenis <kettenis@gnu.org>
2177
2178 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
2179 of basename.
2180
2181 2005-05-14 Alan Modra <amodra@bigpond.net.au>
2182
2183 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
2184 not DT_PPC_GLINK.
2185 (ppc_elf_finish_dynamic_sections): Likewise.
2186
2187 2005-05-13 Fred Fish <fnf@specifixinc.com>
2188
2189 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
2190 * libbfd.h: Rebuilt.
2191
2192 2005-05-13 Bob Wilson <bob.wilson@acm.org>
2193
2194 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
2195 periods in linkonce_kind values.
2196
2197 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
2198
2199 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
2200 against protected function when building executable.
2201
2202 2005-05-12 Alan Modra <amodra@bigpond.net.au>
2203
2204 * elf32-ppc.c (LWZU_0_X_11): Delete.
2205 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
2206 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
2207 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
2208 table.
2209 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
2210 table.
2211 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
2212 Generate .glink branch table and updated stubs.
2213
2214 2005-05-11 Alan Modra <amodra@bigpond.net.au>
2215
2216 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
2217 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
2218 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
2219 (CROR_151515, CROR_313131): Delete.
2220 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
2221 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
2222 LWZU_0_X_11): Define.
2223 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
2224 and R_PPC_REL16_HA entries.
2225 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
2226 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
2227 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
2228 new_plt, and old_plt.
2229 (ppc_elf_create_dynamic_sections): Create .glink section.
2230 (ppc_elf_check_relocs): Set new_plt and old_plt.
2231 (ppc_elf_select_plt_layout): New function.
2232 (ppc_elf_tls_setup): Set plt output section elf type and flags.
2233 (allocate_got): Handle differences between old and new got layout.
2234 (allocate_dynrelocs): Likewise for plt.
2235 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
2236 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
2237 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
2238 destination of R_PPC_PLTREL24 relocs.
2239 (ppc_elf_relocate_section): Handle new relocs and changed destination
2240 of R_PPC_PLTREL24.
2241 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
2242 differences in layout.
2243 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
2244 put a blrl in new got. Write glink contents.
2245 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
2246 * libbfd.h: Regenerate.
2247 * bfd-in2.h: Regenerate.
2248
2249 2005-05-11 Andreas Schwab <schwab@suse.de>
2250
2251 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
2252 warning.
2253
2254 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
2255
2256 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
2257 section if SEC_ALLOC isn't set.
2258
2259 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
2260
2261 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
2262 * acinclude.m4: Don't sinclude accross.m4.
2263 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
2264
2265 2005-05-09 Alan Modra <amodra@bigpond.net.au>
2266
2267 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
2268 (ppc64_elf_add_symbol_hook): Set has_dotsym.
2269 (ppc64_elf_check_directives): Only process syms when has_dotsym.
2270 (func_desc_adjust): Hide fake function descriptors when function
2271 code entry is defined.
2272 (adjust_opd_syms): Adjust for deleted_section becoming union field.
2273
2274 2005-05-09 Alan Modra <amodra@bigpond.net.au>
2275
2276 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
2277
2278 2005-05-08 Dave Korn <dave.korn@artimi.com>
2279
2280 * coff-tic80.c: Undefine _CONST after system headers to prevent
2281 clash with tic80-specific definition in include/coff/tic80.h
2282
2283 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
2284
2285 PR 939
2286 * elflink.c (elf_link_output_extsym): Use output_bfd if
2287 h->root.u.def.section is bfd_abs_section_ptr when reporting
2288 error.
2289
2290 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
2291
2292 * elf-bfd.h (elf_backend_data): Update special_sections to
2293 array of pointer to bfd_elf_special_section.
2294 * elf.c (special_sections): Likewise.
2295 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
2296 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
2297 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
2298 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
2299 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
2300 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
2301 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
2302 * elf32-v850.c (v850_elf_special_sections): Likewise.
2303 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
2304 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
2305 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
2306 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
2307 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
2308 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
2309 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
2310 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
2311
2312 * elf.c (get_special_section): Updated.
2313
2314 2005-05-07 Alan Modra <amodra@bigpond.net.au>
2315
2316 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
2317 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
2318 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
2319 got_symbol_offset.
2320 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2321 * elf32-frv.c (_frv_create_got_section): Likewise.
2322 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
2323 (elf_backend_got_symbol_offset): Don't define.
2324 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
2325 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
2326 and got_gap.
2327 (ppc_elf_create_got): Tidy.
2328 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
2329 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
2330 (ppc_elf_gc_sweep_hook): Likewise.
2331 (ppc_elf_relocate_section): Likewise.
2332 (ppc_elf_finish_dynamic_symbol): Likewise.
2333 (allocate_got): New function.
2334 (allocate_dynrelocs): Use allocate_got.
2335 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
2336 so that local got can refcount it. Set got_header_size.
2337 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
2338 coded 4.
2339 (ppc_elf_finish_dynamic_sections): Likewise.
2340 (elf_backend_got_symbol_offset): Don't define.
2341 (elf_backend_got_header_size): Ditto.
2342
2343 2005-05-05 Steve Ellcey <sje@cup.hp.com>
2344
2345 * configure.in (ACX_HEADER_STRING): New.
2346 * configure: Regenerate.
2347 * config.in: Regenerate.
2348 * sysdep.h (STRING_WITH_STRINGS): Use.
2349
2350 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2351
2352 * elf.c (_bfd_elf_close_and_cleanup): Only call
2353 _bfd_dwarf2_cleanup_debug_info on bfd_object.
2354
2355 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2356
2357 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
2358 "__bss_start" instead of "_edata" as fallback.
2359
2360 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2361
2362 * bfd-in2.h: Regenerated.
2363
2364 2005-05-05 Paul Brook <paul@codesourcery.com>
2365
2366 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
2367 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
2368 elf-vxworks.lo.
2369 * configure: Regenerate.
2370 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
2371 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
2372 (elf32-i386.lo): Depend on elf-vxworks.h.
2373 (elf-vxworks.lo): New rule.
2374 * Makefile.in: Regenerate.
2375 * elf-bfd.h (elf_backend_data): Update type of
2376 elf_backend_emit_relocs.
2377 (_bfd_elf_link_output_relocs): Update prototype.
2378 * elflink.c (_bfd_elf_link_output_relocs): Always use
2379 bed->elf_backend_emit_relocs when outputting relocations.
2380 * elfxx-target.h (elf_backend_emit_relocs): Default to
2381 _bfd_elf_link_output_relocs.
2382 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
2383 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
2384 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
2385 (elf_i386_plt0_entry): Remove padding.
2386 (elf_i386_pic_plt0_entry): Ditto.
2387 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
2388 (PLT_NON_JUMP_SLOT_RELOCS): Define.
2389 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
2390 plt0_pad_byte fields.
2391 (elf_i386_link_hash_table_create): Zero them.
2392 (elf_i386_create_dynamic_sections): Create static relocation section.
2393 (allocate_dynrelocs): Allocate space for static PLT relocations.
2394 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
2395 symbols. Give PLT symbols function type. Don't strip PLT sections
2396 if we have exported symbols from them.
2397 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
2398 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
2399 VxWorks.
2400 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
2401 Add relocation for GOT location. Fill in PLT static relocations.
2402 (elf_i386_vxworks_link_hash_table_create): New function.
2403 (elf_i386_vxworks_link_output_symbol_hook): New function.
2404 * elf-vxworks.h: New file.
2405
2406 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * section.c (bfd_make_section_anyway_with_flags): New.
2409 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
2410 (bfd_make_section_with_flags): New.
2411 (bfd_make_section): Call bfd_make_section_with_flags.
2412
2413 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
2414 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
2415 instead of bfd_make_section/bfd_make_section and don't call
2416 bfd_set_section_flags.
2417 (mn10300_elf_check_relocs): Likewise.
2418 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
2419 * elf32-arm.c (create_got_section): Likewise.
2420 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
2421 (elf32_arm_check_relocs): Likewise.
2422 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2423 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
2424 (_frv_create_got_section): Likewise.
2425 (elf32_frvfdpic_create_dynamic_sections): Likewise.
2426 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2427 (elf32_hppa_check_relocs): Likewise.
2428 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
2429 (i370_elf_check_relocs): Likewise.
2430 * elf32-i386.c (create_got_section): Likewise.
2431 (elf_i386_check_relocs): Likewise.
2432 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2433 (create_got_section): Likewise.
2434 (m32r_elf_create_dynamic_sections): Likewise.
2435 (m32r_elf_check_relocs): Likewise.
2436 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2437 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2438 (ppc_elf_create_dynamic_sections): Likewise.
2439 (ppc_elf_add_symbol_hook): Likewise.
2440 (ppc_elf_check_relocs): Likewise.
2441 * elf32-s390.c (create_got_section): Likewise.
2442 (elf_s390_check_relocs): Likewise.
2443 * elf32-sh.c (create_got_section): Likewise.
2444 (sh_elf_create_dynamic_sections): Likewise.
2445 (sh_elf_check_relocs): Likewise.
2446 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2447 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2448 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2449 (add_extra_plt_sections): Likewise.
2450 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2451 (elf64_alpha_create_got_section): Likewise.
2452 (elf64_alpha_create_dynamic_sections): Likewise.
2453 (elf64_alpha_check_relocs): Likewise.
2454 * elf64-hppa.c (get_reloc_section): Likewise.
2455 (get_opd): Likewise.
2456 (get_plt): Likewise.
2457 (get_dlt): Likewise.
2458 (get_stub): Likewise.
2459 (elf64_hppa_create_dynamic_sectionso): Likewise.
2460 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
2461 * elf64-ppc.c (create_linkage_sections): Likewise.
2462 (ppc64_elf_check_relocs): Likewise.
2463 * elf64-s390.c (create_got_section): Likewise.
2464 (elf_s390_check_relocs): Likewise.
2465 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
2466 (sh64_elf64_create_dynamic_sections): Likewise.
2467 * elf64-x86-64.c (create_got_section): Likewise.
2468 (elf64_x86_64_check_relocs): Likewise.
2469 * elflink.c (_bfd_elf_create_got_section): Likewise.
2470 (_bfd_elf_link_create_dynamic_sections): Likewise.
2471 (elf_link_add_object_symbols): Likewise.
2472 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2473 (elfNN_ia64_create_dynamic_sections): Likewise.
2474 (get_fptr): Likewise.
2475 (get_pltoff): Likewise.
2476 (get_reloc_section): Likewise.
2477 (elfNN_ia64_object_p): Likewise.
2478 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
2479 (mips_elf_create_compact_rel_section): Likewise.
2480 (mips_elf_create_got_section): Likewise.
2481 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2482 * elfxx-sparc.c (create_got_section): Likewise.
2483 (_bfd_sparc_elf_check_relocs): Likewise.
2484
2485 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
2486 on linker created sections.
2487
2488 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2489
2490 PR 882
2491 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
2492 script on executable.
2493
2494 2005-05-05 John Levon <levon@movementarian.org>
2495
2496 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
2497 allocated memory before returning.
2498 (decode_line_info): Likewise.
2499 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
2500 allocated by functions in this file.
2501 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
2502 * elf.c (_bfd_elf_close_and_cleanup): Call
2503 _bfd_dwarf2_cleanup_debug_info.
2504
2505 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2506
2507 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
2508 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
2509 * configure, config.in, Makefile.in: Regenerate.
2510 * sysdep.h (stpcpy): Revert last change.
2511
2512 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2513
2514 * sysdep.h (stpcpy): Wrap declaration in parentheses.
2515
2516 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2517
2518 * elfxx-ia64.c (ARCH_SIZE): New.
2519 (LOG_SECTION_ALIGN): Likewise.
2520 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
2521 align relocation sections.
2522 (get_fptr): Likewise.
2523 (get_reloc_section): Likewise.
2524 (elfNN_ia64_tprel_base): Likewise.
2525 (elfNN_ia64_check_relocs): Support 32bit relocations.
2526 (allocate_global_fptr_got): Likewise.
2527 (allocate_dynrel_entries): Likewise.
2528 (set_got_entry): Likewise.
2529 (set_pltoff_entry): Likewise.
2530 (elfNN_ia64_relocate_section): Likewise.
2531
2532 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2533
2534 * configure.in: Add AC_CHECK_DECLS(stpcpy).
2535 * configure: Regenerate.
2536 * config.in: Likewise.
2537
2538 * sysdep.h (stpcpy): New.
2539
2540 2005-05-04 Nick Clifton <nickc@redhat.com>
2541
2542 * Update the address and phone number of the FSF organization in
2543 the GPL notices in the following files:
2544 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
2545 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
2546 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
2547 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
2548 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
2549 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
2550 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
2551 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
2552 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
2553 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
2554 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
2555 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
2556 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
2557 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
2558 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
2559 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
2560 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
2561 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
2562 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
2563 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
2564 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
2565 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2566 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2567 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2568 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2569 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2570 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2571 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2572 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2573 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2574 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2575 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2576 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2577 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2578 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2579 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2580 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2581 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2582 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2583 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2584 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2585 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2586 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2587 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2588 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2589 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2590 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2591 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2592 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2593 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2594 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2595 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2596 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2597 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2598 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2599 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2600 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2601 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2602 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2603 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2604 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2605 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2606 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2607 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2608 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2609 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2610 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2611 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2612 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2613 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2614 hosts/alphavms.h
2615
2616 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2617
2618 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2619 * bfd-in2.h: Regenerated.
2620
2621 * elflink.c (bfd_elf_set_symbol): New.
2622 (_bfd_elf_provide_symbol): Call it.
2623 (_bfd_elf_provide_section_bound_symbols): New.
2624
2625 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2626
2627 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2628 at the end, if a strong definition has already been seen.
2629
2630 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2631
2632 * section.c (struct bfd_section): Replace link_order_head and
2633 link_order_tail with map_head and map_tail union.
2634 (STD_SECTION): Update.
2635 (_bfd_strip_section_from_output): Delete.
2636 * aoutx.h: Update throughout for above changes.
2637 * coff-ppc.c: Likewise.
2638 * cofflink.c: Likewise.
2639 * ecoff.c: Likewise.
2640 * elf-eh-frame.c: Likewise.
2641 * elf-m10300.c: Likewise.
2642 * elf.c: Likewise.
2643 * elf32-arm.c: Likewise.
2644 * elf32-cris.c: Likewise.
2645 * elf32-hppa.c: Likewise.
2646 * elf32-i386.c: Likewise.
2647 * elf32-m32r.c: Likewise.
2648 * elf32-m68hc1x.c: Likewise.
2649 * elf32-m68k.c: Likewise.
2650 * elf32-ppc.c: Likewise.
2651 * elf32-s390.c: Likewise.
2652 * elf32-sh.c: Likewise.
2653 * elf32-vax.c: Likewise.
2654 * elf32-xtensa.c: Likewise.
2655 * elf64-alpha.c: Likewise.
2656 * elf64-hppa.c: Likewise.
2657 * elf64-ppc.c: Likewise.
2658 * elf64-s390.c: Likewise.
2659 * elf64-sh64.c: Likewise.
2660 * elf64-x86-64.c: Likewise.
2661 * elflink.c: Likewise.
2662 * elfxx-ia64.c: Likewise.
2663 * elfxx-mips.c: Likewise.
2664 * elfxx-sparc.c: Likewise.
2665 * linker.c: Likewise.
2666 * merge.c: Likewise.
2667 * pdp11.c: Likewise.
2668 * xcofflink.c: Likewise.
2669 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2670 out from bfd_elf_size_dynamic_sections.
2671 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2672 * bfd-in2.h: Regenerate.
2673
2674 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2675
2676 * section.c (bfd_section_list_remove): Don't clear s->next.
2677 (bfd_section_list_append): Always init s->prev.
2678 (bfd_section_list_prepend): Define.
2679 (bfd_section_list_insert_after): Minor optimization.
2680 (bfd_section_removed_from_list): Rewrite.
2681 * elf.c (assign_section_numbers): Simplify list traversal now that
2682 bfd_section_list_remove doesn't destroy removed section next ptr.
2683 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2684 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2685 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2686 * bfd-in2.h: Regenerate.
2687
2688 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2689
2690 * bfd.c (bfd): Remove section_tail and add section_last.
2691 (bfd_preserve): Likewise.
2692 (bfd_preserve_save): Likewise.
2693 (bfd_preserve_restore): Likewise.
2694 * opncls.c (_bfd_new_bfd): Likewise.
2695
2696 * coffcode.h (coff_compute_section_file_positions): Updated.
2697 (coff_compute_section_file_positions): Likewise.
2698 * elf.c (assign_section_numbers): Likewise.
2699 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2700 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2701 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2702 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2703 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2704 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2705
2706 * ecoff.c (bfd_debug_section): Initialize prev.
2707
2708 * section.c (bfd_section): Add prev.
2709 (bfd_section_list_remove): Updated.
2710 (bfd_section_list_append): New.
2711 (bfd_section_list_insert_after): New.
2712 (bfd_section_list_insert_before): New.
2713 (bfd_section_list_insert): Removed.
2714 (bfd_section_removed_from_list): Updated.
2715 (STD_SECTION): Initialize prev.
2716 (bfd_section_init): Updated.
2717 (bfd_section_list_clear): Updated.
2718
2719 * bfd-in2.h: Regenerated.
2720
2721 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2722
2723 * elf.c (_bfd_elf_new_section_hook): Don't call
2724 _bfd_elf_get_sec_type_attr on sections from input files.
2725
2726 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2727
2728 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2729 hash table size 16699 instead of bfd_hash_table_init.
2730
2731 2005-05-01 Paul Brook <paul@codesourcery.com>
2732
2733 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2734 definition has already been seen.
2735
2736 2005-05-01 Paul Brook <paul@codesourcery.com>
2737
2738 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2739 R_ARM_PLT32 the same as R_ARM_PC24.
2740 (arm_add_to_rel): Ditto.
2741
2742 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
2743
2744 * config.bfd: Add h8300*-*-rtemscoff.
2745 Switch h8300*-*-rtems* to elf.
2746
2747 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2748
2749 * aclocal.m4, Makefile.in: Regnerated.
2750
2751 2005-04-28 Paul Brook <paul@codesourcery.com>
2752
2753 Merge changes only applied to Makefile.in.
2754 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2755 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2756 (elfxx-sparc.lo): New rule.
2757 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2758 (elf64-sparc.lo): Likewise.
2759
2760 2005-04-28 Julian Brown <julian@codesourcery.com>
2761
2762 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2763 import.
2764
2765 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
2766
2767 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2768
2769 * elf.c (bfd_elf_sym_name): Updated.
2770 (group_signature): Likewise.
2771 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2772 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2773 (ppc64_elf_edit_toc): Likewise.
2774 (ppc64_elf_relocate_section): Likewise.
2775 * elfcode.h (elf_slurp_symbol_table): Likewise.
2776 * elflink.c (elf_link_input_bfd): Likewise.
2777
2778 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2779 bfd_elf_sym_name to get local symbol name when reporting errors.
2780
2781 2005-04-27 Nick Clifton <nickc@redhat.com>
2782
2783 * elflink.c (elf_link_input_bfd): Handle the case where a badly
2784 formatted input file results in a reloc which has no associated
2785 global symbol.
2786
2787 2005-04-26 Jerome Guitton <guitton@gnat.com>
2788
2789 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2790
2791 2005-04-25 David S. Miller <davem@davemloft.net>
2792
2793 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2794 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2795 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2796 Likewise.
2797
2798 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
2799
2800 PR 858
2801 * elflink.c (elf_link_input_bfd): Make non-debugging reference
2802 to discarded section an error.
2803
2804 2005-04-21 Jerome Guitton <guitton@gnat.com>
2805
2806 * configure.in: Replace BFD_NEED_DECLARATION checks by the
2807 corresponding AC_CHECK_DECLS.
2808 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2809 HAVE_DECL_*.
2810 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2811 * configure: Regenerate.
2812 * config.in: Ditto.
2813
2814 2005-04-21 Andreas Schwab <schwab@suse.de>
2815
2816 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2817 unsigned from type of dynamic_interpreter.
2818 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2819 casts again.
2820
2821 * elf.c (assign_section_numbers): Fix comment.
2822
2823 2005-04-21 Jerome Guitton <guitton@gnat.com>
2824
2825 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2826 for struct som_exec_auxhdr fields.
2827
2828 2005-04-21 Nick Clifton <nickc@redhat.com>
2829
2830 * aout-adobe.c: Convert to ISO C and fix formatting.
2831 * aout-arm.c: Convert to ISO C and fix formatting.
2832 * aout-cris.c: Convert to ISO C and fix formatting.
2833 * aout-ns32k.c: Convert to ISO C and fix formatting.
2834 * aout-tic30.c: Convert to ISO C and fix formatting.
2835 * coffcode.h: Convert to ISO C and fix formatting.
2836 * coffswap.h: Convert to ISO C and fix formatting.
2837 * i386aout.c: Convert to ISO C and fix formatting.
2838 * libaout.h: Convert to ISO C and fix formatting.
2839 * libcoff-in.h: Convert to ISO C and fix formatting.
2840 * libcoff.h: Convert to ISO C and fix formatting.
2841 * libecoff.h: Convert to ISO C and fix formatting.
2842 * libnlm.h: Convert to ISO C and fix formatting.
2843 * libpei.h: Convert to ISO C and fix formatting.
2844 * libxcoff.h: Convert to ISO C and fix formatting.
2845 * nlm-target.h: Convert to ISO C and fix formatting.
2846 * nlm.c: Convert to ISO C and fix formatting.
2847 * nlm32-alpha.c: Convert to ISO C and fix formatting.
2848 * nlm32-i386.c: Convert to ISO C and fix formatting.
2849 * nlm32-ppc.c: Convert to ISO C and fix formatting.
2850 * nlm32-sparc.c: Convert to ISO C and fix formatting.
2851 * nlmcode.h: Convert to ISO C and fix formatting.
2852 * nlmswap.h: Convert to ISO C and fix formatting.
2853 * pe-mips.c: Convert to ISO C and fix formatting.
2854 * peXXigen.c: Convert to ISO C and fix formatting.
2855 * peicode.h: Convert to ISO C and fix formatting.
2856 * vms-gsd.c: Convert to ISO C and fix formatting.
2857 * vms-hdr.c: Convert to ISO C and fix formatting.
2858 * vms-misc.c: Convert to ISO C and fix formatting.
2859 * vms-tir.c: Convert to ISO C and fix formatting.
2860 * vms.c: Convert to ISO C and fix formatting.
2861 * vms.h: Convert to ISO C and fix formatting.
2862
2863 * coffgen.c (coff_print_symbol): Restore correct formatting of
2864 output.
2865
2866 2005-04-20 David S. Miller <davem@davemloft.net>
2867
2868 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2869 (_bfd_sparc_elf_link_hash_table_create): Likewise.
2870 (allocate_dynrelocs): Likewise.
2871
2872 2005-04-20 Jerome Guitton <guitton@gnat.com>
2873
2874 * configure.in: Fix the check for basename declaration. Add check
2875 for declarations of ftello, ftello64, fseeko, fseeko64.
2876 * configure: Regenerate.
2877 * config.in: Ditto.
2878 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2879
2880 2005-04-19 David S. Miller <davem@davemloft.net>
2881
2882 * elfxx-sparc.c: New file.
2883 * elfxx-sparc.h: New file.
2884 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2885 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2886 (elfxx-sparc.lo): New rule.
2887 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2888 (elf64-sparc.lo): Likewise.
2889 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2890 (bfd_elf64_sparc_vec): Likewise.
2891 * configure: Regenerate.
2892 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2893 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2894 which is more consistent with elf32-sparc.c
2895
2896 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
2897
2898 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2899 (mips_elf_create_local_got_entry): Check h->root.forced_local.
2900
2901 2005-04-19 Alan Modra <amodra@bigpond.net.au>
2902
2903 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2904 dynamic relocs in non-SEC_ALLOC sections.
2905 (ppc_elf_gc_sweep_hook): Likewise.
2906 (ppc_elf_relax_section): Likewise.
2907 (ppc_elf_relocate_section): Likewise.
2908
2909 2005-04-18 Nick Clifton <nickc@redhat.com>
2910
2911 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2912 assigning a value to return_value.
2913
2914 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2915
2916 PR 855
2917 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2918 created group data.
2919
2920 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2921
2922 PR 855
2923 * elf.c (setup_group): Properly handle zero group count.
2924
2925 2005-04-17 Mark Kettenis <kettenis@gnu.org>
2926
2927 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2928 (som_is_subspace, compare_subspaces, som_compute_checksum)
2929 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2930 protoypes.
2931 (hppa_som_reloc, compare_syms, compare_subspaces)
2932 (som_print_symbol, som_get_section_contents)
2933 (som_set_section_contents): Remove space after 'void *'.
2934 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2935 (som_bfd_merge_private_bfd_data)
2936 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2937 defines.
2938
2939 2004-04-15 Julian Brown <julian@codesourcery.com>
2940
2941 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2942 * bfd-in2.h: Regenerate.
2943 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2944 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2945 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2946 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2947 relocations if requested to.
2948 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2949 use_blx rather than symbian_p.
2950 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2951 use_blx is in effect.
2952 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2953 for SymbianOS.
2954
2955 2005-04-15 Nick Clifton <nickc@redhat.com>
2956
2957 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2958 values.
2959
2960 2005-04-15 Alan Modra <amodra@bigpond.net.au>
2961
2962 PR ld/815
2963 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2964 used as a list pointer.
2965
2966 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2967
2968 * Makefile.am (NO_WERROR): Define.
2969 * warning.m4: New file
2970 * acinclude.m4: Include warning.m4.
2971 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2972 * Makefile.in: Regenerate.
2973 * configure: Regenerate.
2974
2975 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2976
2977 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2978 Write trailing padding.
2979
2980 * merge.c (merge_strings): Round up section size for alignment.
2981
2982 2005-04-14 David S. Miller <davem@davemloft.net>
2983
2984 Add TLS support for 64-bit Sparc ELF.
2985 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2986 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2987 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2988 sparc64_elf_hash_entry, sparc64_elf_tdata,
2989 sparc64_elf_local_got_tls_type): New defines.
2990 (sparc64_elf_mkobject): New function.
2991 (sparc64_elf_link_hash_table): Add members for dynamic linker
2992 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2993 uion to track TLS GOT references. Add sym_sec to cache
2994 mappings from local sym to section.
2995 (link_hash_newfunc): New function.
2996 (sparc64_elf_bfd_link_hash_table_create): Rename to
2997 sparc64_elf_link_hash_table_create for consistency.
2998 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2999 (sparc64_elf_create_dynamic_sections): Initialize new section
3000 members of sparc64_elf_link_hash_table. Only init srelbss
3001 if not-shared.
3002 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
3003 New functions.
3004 (SPARC_NOP): Define.
3005 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
3006 sparc64_elf_plt_ptr_offset): Delete.
3007 (sparc64_plt_entry_build): New function to build PLT entries
3008 gradually instread of all at once at the end of linking.
3009 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
3010 local vars. Get them from sparc64_elf_hash_table instead.
3011 Check early on if r_symndx is in bounds. Handle TLS transitions.
3012 Account for TLS GOT references and DF_STATIC_TLS, as needed.
3013 For TLS relocs, record the tls_type in either
3014 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
3015 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
3016 to the __tls_get_addr symbol. For PLT relocs, track references
3017 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
3018 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
3019 symbol references, count the number of relocations needed for
3020 that symbol. For default switch case, don't error, this lets
3021 the TLS relocs not explicitly handled by this function get
3022 accepted.
3023 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
3024 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
3025 it from sparc64_elf_hash_table. Store the real PLT offset
3026 in h->plt.offset, and build PLT entries one at a time. Also
3027 get .dynbss section pointer from htab.
3028 (allocate_dynrelocs, readonly_dynrelocs,
3029 sparc64_omit_section_dynsym): New functions.
3030 (sparc64_elf_omit_section_dynsym): Use these new functions as
3031 helpers.
3032 (dtpoff_base, tpoff): New functions.
3033 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
3034 locals, get them from sparc64_elf_hash_table. Handle TLS
3035 relocations and refcounting in main relocation loop.
3036 (sparc64_elf_finish_dynamic_symbol): Use
3037 sparc64_elf_link_hash_table. Build PLT entries as we see
3038 them. Handle TLS GOT relocations.
3039 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
3040 from sparc64_elf_hash_table. Initialize only PLT header
3041 not all entries since we not build PLT entries one by one.
3042 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
3043 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
3044 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
3045
3046 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
3047
3048 * elflink.c (elf_link_input_bfd): Update check for removed
3049 sections.
3050
3051 2005-04-12 Alan Modra <amodra@bigpond.net.au>
3052
3053 * Makefile.am: Run "make dep-am".
3054 * Makefile.in: Regenerate.
3055 * aclocal.m4: Regenerate.
3056 * libcoff.h: Regenerate.
3057
3058 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
3059
3060 * linker.c (_bfd_generic_link_output_symbols): Also check if
3061 the output section of an input section has been removed from
3062 the output file.
3063
3064 * section.c (bfd_section_list_remove): Clear the next field
3065 of the removed section.
3066 (bfd_section_removed_from_list): New.
3067 * bfd-in2.h: Regenerated.
3068
3069 2005-04-11 David S. Miller <davem@davemloft.net>
3070
3071 * elf32-sparc.c (elf32_sparc_relocate_section,
3072 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
3073 R_SPARC_TLS_LE_{HIX22,LOX10}.
3074 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
3075 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
3076 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
3077 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
3078
3079 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
3080
3081 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
3082
3083 2005-04-11 Nick Clifton <nickc@redhat.com>
3084
3085 * aout-target.h: Convert to ISO C.
3086 * aoutf1.h: Convert to ISO C.
3087 * aoutx.h: Convert to ISO C.
3088 * bout.c: Convert to ISO C.
3089 * dwarf1.c: Convert to ISO C.
3090 * ecoffswap.h: Convert to ISO C.
3091 * freebsd.h: Convert to ISO C.
3092 * genlink.h: Convert to ISO C.
3093 * ieee.c: Convert to ISO C.
3094 * ihex.c: Convert to ISO C.
3095 * libcoff-in.h: Convert to ISO C.
3096 * mach-o.c: Convert to ISO C.
3097 * mach-o.h: Convert to ISO C.
3098 * netbsd.h: Convert to ISO C.
3099 * ns32k.h: Convert to ISO C.
3100 * ns32knetbsd.c: Convert to ISO C.
3101 * oasys.c: Convert to ISO C.
3102 * pdp11.c: Convert to ISO C.
3103 * pef-traceback.h: Convert to ISO C.
3104 * pef.c: Convert to ISO C.
3105 * pef.h: Convert to ISO C.
3106 * riscix.c: Convert to ISO C.
3107 * som.c: Convert to ISO C.
3108 * som.h: Convert to ISO C.
3109 * srec.c: Convert to ISO C.
3110 * stabs.c: Convert to ISO C.
3111 * sunos.c: Convert to ISO C.
3112 * tekhex.c: Convert to ISO C.
3113 * versados.c: Convert to ISO C.
3114 * version.h: Convert to ISO C.
3115 * xcoff-target.h: Convert to ISO C.
3116 * xcofflink.c: Convert to ISO C.
3117 * xsym.c: Convert to ISO C.
3118 * xsym.h: Convert to ISO C.
3119
3120 2005-04-08 Paul Brook <paul@codesourcery.com>
3121
3122 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
3123 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
3124 (ARM2THUMB_PIC_GLUE_SIZE): Define.
3125 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
3126 (elf32_arm_to_thumb_stub): Create PIC stubs.
3127 (record_arm_to_thumb_glue): Use different stub size for relocatable
3128 images.
3129
3130 2005-04-05 Alan Modra <amodra@bigpond.net.au>
3131
3132 * elf64-ppc.c (dec_dynrel_count): New function split out from
3133 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
3134 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
3135 (ppc64_elf_tls_optimize): Likewise.
3136
3137 2005-04-05 Mark Kettenis <kettenis@gnu.org>
3138
3139 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
3140 CORE_WCOOKIE_OFFSET.
3141 (SPARC64_WCOOKIE_OFFSET): New.
3142 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
3143
3144 2005-04-05 Nick Clifton <nickc@redhat.com>
3145
3146 * po/rw.po: New translation: Kinyarwanda
3147 * configure.in (ALL_LINGUAS): Add rw
3148 * configure: Regenerate.
3149
3150 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
3151
3152 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
3153 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
3154 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
3155 section flags.
3156 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
3157 to check for SHT_MIPS_OPTIONS sections.
3158 (_bfd_mips_elf_set_section_contents): Likewise.
3159
3160 2005-04-04 Eric Christopher <echristo@redhat.com>
3161
3162 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
3163 Clean up gp handling code.
3164
3165 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
3166
3167 * elf.c (bfd_elf_set_group_contents): Ignore linker created
3168 group section.
3169 (assign_section_numbers): Accept link_info. Check SHT_GROUP
3170 sections for relocatable files only. Remove the linker created
3171 group sections.
3172 (_bfd_elf_compute_section_file_positions): Pass link_info to
3173 assign_section_numbers.
3174
3175 * elfxx-ia64.c (elfNN_ia64_object_p): New.
3176 (elf_backend_object_p): Defined.
3177
3178 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
3179
3180 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
3181
3182 2005-04-03 Fred Fish <fnf@specifixinc.com>
3183
3184 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
3185 dwarf_ranges_size members.
3186 (struct comp_unit): Add base_address member.
3187 (struct funcinfo): Replace low/high members with an arange.
3188 (arange_add): Replace incoming "unit" parameter with "abfd" and
3189 "first_arange" pointers. Reorganize/rewrite function body.
3190 (decode_line_info): Change arange_add call to pass bfd and arange
3191 pointers.
3192 (lookup_address_in_line_info_table): Use arange list instead of
3193 individual low/high members. Walk function's arange list to find
3194 lowest PC in list, to test for overlapping functions.
3195 (read_debug_ranges): New function, reads the debug_ranges section.
3196 (lookup_address_in_function_table): Use arange list instead of
3197 individual low/high members. Rewrite to find smallest range that
3198 matches.
3199 (read_rangelist): Read a given rangelist from debug_ranges.
3200 (scan_unit_for_functions): Use arange list instead of individual
3201 low/high members. Handle a DW_AT_ranges attribute.
3202 (parse_comp_unit): Use arange list instead of individual low/high
3203 members. Save comp unit base address. Handle a DW_AT_ranges
3204 attribute.
3205
3206 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
3207
3208 * elf.c (assign_section_numbers): Really use the kept section.
3209
3210 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3211
3212 * elf-bfd.h (_bfd_elf_check_kept_section): New.
3213
3214 * elf.c (assign_section_numbers): When sh_link points to a
3215 discarded section, call _bfd_elf_check_kept_section to see if
3216 the kept section can be used. Otherwise reject sh_link
3217 pointing to discarded section.
3218
3219 * elflink.c (_bfd_elf_check_kept_section): New.
3220 (elf_link_input_bfd): Use it.
3221
3222 2005-04-01 Alan Modra <amodra@bigpond.net.au>
3223
3224 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
3225 that we no longer need.
3226
3227 2005-04-01 Alan Modra <amodra@bigpond.net.au>
3228
3229 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
3230 rather than 0.
3231 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
3232
3233 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3234
3235 * elf.c (assign_section_numbers): Fix a typo.
3236
3237 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3238
3239 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
3240 error message.
3241 (_bfd_elf_section_already_linked): Likewise.
3242
3243 2005-03-31 Jerome Guitton <guitton@gnat.com>
3244
3245 * config.in: Regenerate.
3246
3247 2005-03-31 Jerome Guitton <guitton@gnat.com>
3248
3249 * config.in (HAVE_DECL_BASENAME): New configure macro.
3250 * configure.in: Check for basename.
3251 * configure: Regenerate.
3252
3253 2005-03-30 Julian Brown <julian@codesourcery.com>
3254
3255 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
3256 bfd_elf32_is_arm_mapping_symbol_name.
3257 * bfd-in2.h: Regenerate.
3258 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
3259 bfd_elf32_is_arm_mapping_symbol_name.
3260 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
3261 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
3262 (arm_elf_find_function): Likewise.
3263 (elf32_arm_output_symbol_hook): Likewise.
3264
3265 2005-03-30 Julian Brown <julian@codesourcery.com>
3266
3267 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
3268 * bfd-in2.h: Regenerate.
3269 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
3270 bfd_elf32_is_arm_mapping_symbol_name.
3271 (elf32_arm_output_symbol_hook): Likewise.
3272 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
3273 mapping symbols.
3274 (is_arm_mapping_symbol_name): Function moved from here...
3275 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
3276 and made global.
3277
3278 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3279
3280 * configure.in: Check for ffs decl and alphabetize.
3281 * config.in: Regenerate.
3282 * configure: Regenerate.
3283 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
3284
3285 2005-03-29 Fred Fish <fnf@specifixinc.com>
3286
3287 * dwarf2.c (struct comp_unit): Fix typo.
3288 (scan_unit_for_functions): Remove unused local variable "name"
3289 and dead code that set it.
3290
3291 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3292 Phil Blundell <philb@gnu.org>
3293
3294 * bfd-in2.h, libbfd.h: Regenerated.
3295 * reloc.c: Add ARM TLS relocations.
3296 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
3297 relocations.
3298 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
3299 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
3300 (elf32_arm_tls_ie32_howto): New.
3301 (elf32_arm_howto_from_type): Support TLS relocations.
3302 (elf32_arm_reloc_map): Likewise.
3303 (elf32_arm_reloc_type_lookup): Likewise.
3304 (TCB_SIZE): Define.
3305 (struct elf32_arm_obj_tdata): New.
3306 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
3307 (elf32_arm_mkobject): New function.
3308 (struct elf32_arm_relocs_copied): Add pc_count.
3309 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
3310 (GOT_TLS_IE): Define.
3311 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
3312 (elf32_arm_link_hash_newfunc): Initialize tls_type.
3313 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
3314 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
3315 (dtpoff_base, tpoff): New functions.
3316 (elf32_arm_final_link_relocate): Handle TLS relocations.
3317 (IS_ARM_TLS_RELOC): Define.
3318 (elf32_arm_relocate_section): Warn about TLS mismatches.
3319 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
3320 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
3321 TLS relocations and pc_count.
3322 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
3323 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
3324 calls.
3325 (elf32_arm_size_dynamic_sections): Handle TLS.
3326 (elf32_arm_finish_dynamic_symbol): Likewise.
3327 (bfd_elf32_mkobject): Define.
3328
3329 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3330
3331 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
3332 relocation types. Don't count relocations which will use a PLT.
3333
3334 2005-03-29 Joel Brobecker <brobecker@gnat.com>
3335
3336 * elf.c (elfcore_grok_nto_status): Print tid as long.
3337 (elfcore_grok_nto_regs): Likewise.
3338
3339 2005-03-29 Joel Brobecker <brobecker@gnat.com>
3340
3341 * irix-core.c: Remove some unnecessary prototypes.
3342
3343 2005-03-28 Joel Brobecker <brobecker@adacore.com>
3344
3345 * irix-core.c: Convert to ISO C.
3346
3347 2005-03-28 Joel Brobecker <brobecker@adacore.com>
3348
3349 * irix-core.c (do_sections): Replace + by | in expression.
3350 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
3351 to unused parameters to avoid a compiler warning.
3352
3353 2005-03-28 Mark Kettenis <kettenis@gnu.org>
3354
3355 * netbsd-core.c: Convert to ISO C. Fix formatting.
3356
3357 2005-03-24 Eric Christopher <echristo@redhat.com>
3358
3359 * elfxx-mips.c: Revert previous patch.
3360
3361 2005-03-24 Nick Clifton <nickc@redhat.com>
3362
3363 * targets.c (_bfd_target_vector): Only include the
3364 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
3365 all targets enabled.
3366
3367 2005-03-24 James E Wilson <wilson@specifixinc.com>
3368
3369 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
3370 (BFD64_BACKENDS): Add elf32-ia64.lo.
3371 * Makefile.in: Regenerate.
3372
3373 2005-03-23 Eric Christopher <echristo@redhat.com>
3374
3375 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
3376 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
3377 after emitting relocation.
3378 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
3379 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
3380 and readonly_reloc.
3381
3382 2005-03-23 Mike Frysinger <vapier@gentoo.org>
3383 Nick Clifton <nickc@redhat.com>
3384
3385 * config.bfd: Accept any C library to accompany a GNU Linux
3386 implementation, not just the GNU C library.
3387 * configure.in: Likewise.
3388 * configure: Regenerate.
3389
3390 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
3391
3392 * bfd-in.h (_bfd_elf_provide_symbol): New.
3393 * bfd-in2.h: Regenerated.
3394
3395 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
3396 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
3397 of set_linker_sym.
3398
3399 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
3400 from elf32-ppc.c.
3401
3402 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
3403
3404 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
3405
3406 2005-03-22 Bob Wilson <bob.wilson@acm.org>
3407
3408 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
3409 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
3410 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
3411 (xtensa_opcode_decode): Rearrange code.
3412
3413 2005-03-22 Nick Clifton <nickc@redhat.com>
3414
3415 * binary.c: Convert to ISO C90 formatting.
3416 * coff-arm.c: Convert to ISO C90 formatting.
3417 * coffgen.c: Convert to ISO C90 formatting.
3418 * elf32-gen.c: Convert to ISO C90 formatting.
3419 * elf64-gen.c: Convert to ISO C90 formatting.
3420 * hash.c: Convert to ISO C90 formatting.
3421 * ieee.c: Convert to ISO C90 formatting.
3422
3423 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3424
3425 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
3426 unresolved symbols in R_ARM_NONE relocations.
3427
3428 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3429
3430 * elf32-arm.c (elf32_arm_final_link_relocate): Add
3431 UNRESOLVED_RELOC_P argument. Set it appropriately.
3432 (elf32_arm_relocate_section): Update call to
3433 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
3434 unresolved_reloc instead.
3435
3436 2005-03-23 Alan Modra <amodra@bigpond.net.au>
3437
3438 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
3439 .gnu.warning.* sections.
3440
3441 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3442
3443 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
3444 written_address_p.
3445 (ppc_elf_create_linker_section): Don't try to reuse existing section.
3446 (elf_create_pointer_linker_section): Delete info parm. Don't make
3447 h dynamic. Don't set written_address_p.
3448 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
3449 (bfd_put_ptr): Delete.
3450 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
3451 Always write section contents. Assert global sym is def_regular.
3452 Use offset bottom bit as a written flag.
3453 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
3454 calls.
3455
3456 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3457
3458 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
3459 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
3460 and end syms.
3461
3462 2005-03-21 Nick Clifton <nickc@redhat.com>
3463
3464 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
3465 targets.
3466 (t2a1_bx_pc_insn): Likewise.
3467 (t2a2_noop_insn): Likewise.
3468 (t2a3_b_insn): Likewise.
3469 (t2a1_push_insn): Likewise.
3470 (t2a2_ldr_insn): Likewise.
3471 (t2a3_mov_insn): Likewise.
3472 (t2a4_bx_insn): Likewise.
3473 (t2a5_pop_insn): Likewise.
3474 (t2a6_bx_insn): Likewise.
3475 (coff_arm_relocate_section): Only declare the high_address
3476 variable for non WINCE targets.
3477
3478 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3479
3480 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
3481 SEC_LINKER_CREATED. Attach to dynobj.
3482 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
3483
3484 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3485
3486 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
3487 sym_offset. Add name, bss_name, sym_name, sym_val.
3488 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
3489 Add sdata array of elf_linker_section_t.
3490 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
3491 (enum elf_linker_section_enum): Delete.
3492 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
3493 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
3494 the special sections are needed. Adjust htab->sdata refs.
3495 Ensure dynobj is set in sreloc code.
3496 (ppc_elf_size_dynamic_sections): Strip sdata sections.
3497 (ppc_elf_set_sdata_syms): New function.
3498 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
3499 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
3500 sym_val instead of sym_hash.
3501 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
3502
3503 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3504
3505 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
3506 (ppc_elf_merge_private_bfd_data): Likewise.
3507
3508 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3509
3510 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
3511 (ppc_elf_create_linker_section): Don't create rel_section.
3512 (elf_create_pointer_linker_section): Don't size relocs.
3513 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
3514 Don't generate relocs.
3515 (ppc_elf_relocate_section): Adjust calls to
3516 elf_finish_pointer_linker_section.
3517
3518 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3519
3520 * elf32-ppc.c (is_ppc_elf_target): New function.
3521 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
3522 for bfd_target_elf_flavour. Do this test before endian check.
3523 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
3524 (ppc_elf_size_dynamic_sections): Likewise.
3525
3526 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
3527
3528 * elf-bfd.h (elf_backend_data): Add int to
3529 elf_backend_section_from_shdr.
3530 (bfd_elf_section_data): Update comment for this_idx.
3531 (_bfd_elf_make_section_from_shdr): Add int.
3532 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3533
3534 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
3535 and use it to set this_idx in bfd_elf_section_data.
3536 (bfd_section_from_shdr): Pass shindex to
3537 _bfd_elf_make_section_from_shdr.
3538 (_bfd_elf_section_from_bfd_section): Use this_idx in
3539 bfd_elf_section_data to find section index.
3540
3541 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
3542 index and pass it to _bfd_elf_make_section_from_shdr.
3543 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
3544 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3545 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3546 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3547 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3548 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3549 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
3550 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3551 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3552
3553 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
3554 Ross Ridge <rridge@csclub.uwaterloo.ca>
3555
3556 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
3557 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
3558 cases. Add comment.
3559
3560 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3561
3562 * elflink.c (elf_mark_used_section): Remove check for special
3563 sections.
3564
3565 2005-03-18 Andreas Schwab <schwab@suse.de>
3566
3567 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3568 from bfd_vma to ia64_insn, remove broken cast.
3569
3570 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
3571
3572 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
3573 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3574 elf_m68k_finish_dynamic_sections): Use it.
3575
3576 2005-03-17 Paul Brook <paul@codesourcery.com>
3577 Dan Jacobowitz <dan@codesourcery.com>
3578 Mark Mitchell <mark@codesourcery.com>
3579
3580 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3581 (elf32_arm_additional_program_headers): Likewise.
3582 (elf_backend_modify_segment_map): Define.
3583 (elf_backend_additional_program_headers): Likewise.
3584 (elf32_arm_symbian_modify_segment_map): Use
3585 elf32_arm_modify_segment_map.
3586
3587 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3588
3589 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3590 for special sections.
3591
3592 2005-03-18 Alan Modra <amodra@bigpond.net.au>
3593
3594 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3595 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3596 section_sym_count param, and return number of section symbols.
3597 (bfd_elf_size_dynamic_sections): Clear section symbol area of
3598 .dynsym contents. Don't bother calling swap_symbol_out on the
3599 first all-zero dynsym.
3600 (elf_mark_used_section): Formatting. Avoid twiddling flags in
3601 special sections like bfd_abs_section.
3602 (bfd_elf_gc_sections): Spelling fix.
3603
3604 2005-03-16 Fred Fish <fnf@specifixinc.com>
3605
3606 PR binutils/790
3607 * dwarf2.c (read_indirect_string): Fix apparent typo, check
3608 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3609
3610 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
3611
3612 * elflink.c (elf_mark_used_section): New.
3613 (bfd_elf_gc_sections): Call elf_gc_mark_section for
3614 non-relocatable link if we don't do GC.
3615
3616 2005-03-16 Nick Clifton <nickc@redhat.com>
3617 Ben Elliston <bje@au.ibm.com>
3618
3619 * configure.in (werror): New switch: Add -Werror to the
3620 compiler command line. Enabled by default. Disable via
3621 --disable-werror.
3622 * configure: Regenerate.
3623
3624 2005-03-16 Nick Clifton <nickc@redhat.com>
3625
3626 * ecoff.c: Convert to ISO C90 formatting.
3627
3628 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3629
3630 * elf32-ppc.c: Divide file into general and linker specific
3631 functions. Sort linker functions into roughly the order in which
3632 they are called by the ELF linker code.
3633
3634 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3635
3636 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3637 on section. Correct comment, and add FIXME.
3638 (ppc_elf_additional_program_headers): Don't bump header count for
3639 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3640 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3641 do allocate memory if they need it.
3642
3643 2005-03-15 Mikkel Krautz <krautz@gmail.com>
3644
3645 * config.bfd (x86_64-elf): Add target.
3646
3647 2005-03-15 Alan Modra <amodra@bigpond.net.au>
3648
3649 * po/es.po: Commit new Spanish translation.
3650
3651 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
3652
3653 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3654 for global symbol when reporting overflow.
3655
3656 2005-03-11 Jakub Jelinek <jakub@redhat.com>
3657
3658 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3659 * libbfd.h: Rebuilt.
3660 * archive.c (_bfd_ar_spacepad): New function.
3661 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3662 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3663 coff_write_armap): Use it.
3664 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
3665 uid/gid support.
3666 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3667
3668 2005-03-10 Mark Kettenis <kettenis@gnu.org>
3669
3670 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3671 has_table to the start of the function.
3672
3673 2005-03-10 Ben Elliston <bje@au.ibm.com>
3674
3675 * archive.c: Include hashtab.h.
3676 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3677 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3678 (hash_file_ptr): New function.
3679 (eq_file_ptr): Likewise.
3680 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3681 * libbfd-in.h: Include hashtab.h.
3682 (struct artdata): Change `cache' member type to htab_t.
3683 * libbfd.h: Rebuild.
3684
3685 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
3686
3687 * configure.in: Bump version to 2.16.90.
3688 * configure: Regenerated.
3689
3690 2005-03-07 Jakub Jelinek <jakub@redhat.com>
3691
3692 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3693 close is a function like macro in system headers.
3694
3695 2005-03-07 Alan Modra <amodra@bigpond.net.au>
3696
3697 PR ld/778
3698 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3699 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3700
3701 2005-03-06 Alan Modra <amodra@bigpond.net.au>
3702
3703 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3704
3705 2005-03-05 Alan Modra <amodra@bigpond.net.au>
3706
3707 * po/bfd.pot: Regenerate.
3708
3709 2005-03-05 Alan Modra <amodra@bigpond.net.au>
3710
3711 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3712 with is_func.
3713 (func_desc_adjust): Force dot-syms local in executables as well
3714 as shared libs.
3715
3716 2005-03-04 David Daney <ddaney@avtrex.com>
3717
3718 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3719 '__gnu_local_gp' symbol used by gas -mno-shared.
3720
3721 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
3722
3723 * elf-bfd.h (elf_backend_data): Add "const char *" to
3724 elf_backend_section_from_phdr.
3725
3726 * elf.c (bfd_section_from_phdr): Pass "proc" to the
3727 elf_backend_section_from_phdr hook.
3728
3729 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
3730 Joseph Myers <joseph@codesourcery.com>
3731
3732 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3733 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3734 and tls_ldm_offset.
3735 (struct mips_elf_got_per_bfd_arg): Add global_count.
3736 (struct mips_elf_count_tls_arg): New.
3737 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3738 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3739 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3740 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3741 (TLS_RELOC_P): Define.
3742 (TP_OFFSET, DTP_OFFSET): Define.
3743 (dtprel_base, tprel_base): New functions.
3744 (mips_elf_link_hash_newfunc): Initialize tls_type.
3745 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3746 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3747 TLS entries.
3748 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3749 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3750 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3751 (mips_tls_got_index): New functions.
3752 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3753 arguments. Pass them to mips_elf_create_local_got_entry. Use
3754 mips_tls_got_index.
3755 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3756 Handle TLS entries.
3757 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3758 mips_elf_create_local_got_entry.
3759 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3760 arguments. Handle TLS entries.
3761 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3762 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
3763 TLS entries.
3764 (mips_elf_record_global_got_symbol): Likewise.
3765 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3766 Count TLS entries.
3767 (mips_elf_merge_gots): Handle TLS entries when merging.
3768 (mips_elf_initialize_tls_index): New function.
3769 (mips_elf_set_global_got_offset): Handle TLS entries.
3770 (mips_elf_adjust_gp): Handle TLS.
3771 (mips_elf_multi_got): Remove redundant call to
3772 mips_elf_resolve_final_got_entries. Initialize global_count.
3773 Correct a comment. Initialize new TLS members of mips_got_info.
3774 Assign TLS GOT indexes for new GOTs.
3775 (mips_elf_create_got_section): Initialize new TLS members of
3776 mips_got_info.
3777 (mips_elf_calculate_relocation): Handle TLS relocs.
3778 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
3779 functions.
3780 (_bfd_mips_elf_always_size_sections): Handle TLS.
3781 (_bfd_mips_elf_size_dynamic_sections): Likewise.
3782 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
3783 changed functions.
3784 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3785 (_bfd_mips_elf_hide_symbol): Handle TLS.
3786 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3787 (mips_reloc_map): Add TLS relocs.
3788 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3789 * elf64-mips.c (mips_elf64_howto_table_rel)
3790 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3791 * reloc.c: Define new MIPS TLS relocations.
3792 * libbfd.h, bfd-in2.h: Regenerated.
3793
3794 2005-03-02 Jan Beulich <jbeulich@novell.com>
3795
3796 * Makefile.am: Add dependency of cache.o on libiberty.h.
3797 * cache.c: Include libiberty.h.
3798 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3799
3800 2005-03-01 Zack Weinberg <zack@codesourcery.com>
3801
3802 * elf.c (bfd_section_from_shdr <default case>): Call
3803 elf_backend_section_from_shdr hook unconditionally, and return
3804 what it returns.
3805 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3806 * elfxx-target.h (elf_backend_section_from_shdr)
3807 (elf_backend_section_from_phdr): Default to
3808 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3809 respectively.
3810
3811 2005-03-01 Alan Modra <amodra@bigpond.net.au>
3812
3813 * targets.h: Typo fix.
3814 * bfd-in2.h: Regenerate.
3815
3816 * bout.c (b_out_write_object_contents): Don't use sizeof on host
3817 structs to size on-disk structures.
3818 (b_out_set_section_contents): Size the external struct, not the
3819 internal one for on-disk size.
3820 (b_out_sizeof_headers): Likewise.
3821
3822 2005-03-01 Alan Modra <amodra@bigpond.net.au>
3823
3824 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3825 entry points with the func descriptor as well as undefweak.
3826
3827 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
3828
3829 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3830 present when IMPORT_NAME_UNDOECRATE is used.
3831
3832 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
3833
3834 PR 757
3835 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3836 int.
3837
3838 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3839 to _bfd_elf_merge_symbol.
3840
3841 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3842 unsigned int to return the alignment of the old common symbol
3843 in the dynamic object.
3844 (_bfd_elf_add_default_symbol): Pass NULL to
3845 _bfd_elf_merge_symbol.
3846 (elf_link_add_object_symbols): Pass &old_alignment to
3847 _bfd_elf_merge_symbol. Get the alignment of the new common
3848 symbol in the dynamic object.
3849
3850 2005-02-24 Ben Elliston <bje@au.ibm.com>
3851
3852 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3853 * format.c (bfd_check_format_matches): Likewise.
3854 * archive.c (BFD_GNU960_ARMAG): Likewise.
3855 (bfd_generic_archive_p): Likewise.
3856 (_bfd_write_archive_contents): Likewise.
3857
3858 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
3859
3860 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3861 * configure: Regenerate.
3862
3863 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
3864
3865 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3866 COMDAT group sections to have default visibility.
3867
3868 2005-02-24 Alan Modra <amodra@bigpond.net.au>
3869
3870 * coffcode.h (coff_print_aux): Warning fix.
3871 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3872 instead of section pointer to identify.
3873 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
3874 the correct size buffer for local sym mangling too.
3875 (h8300_bfd_link_add_symbols): Likewise.
3876 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3877 warning.
3878 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3879 * elf32-xtensa.c (literal_value_hash): Warning fix.
3880 * versados.c (process_otr): Warning fix.
3881 (versados_canonicalize_reloc): Likewise.
3882 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3883 * vms.c (fill_section_ptr): Warning fix.
3884
3885 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
3886
3887 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3888 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3889
3890 2005-02-23 Nick Clifton <nickc@redhat.com>
3891
3892 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3893 the relvaddr field of the Elf32_crinfo structure.
3894
3895 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3896 variables that are passed by reference to
3897 m68hc11_get_relocation_value in case that function does not
3898 initialise them.
3899
3900 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3901 return statements and replace with a single return at the end of
3902 the function. This helps pacify the flow analysis code in gcc 4.0.
3903
3904 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3905 strtab to avoid compile time warning.
3906
3907 2005-02-23 Ben Elliston <bje@au.ibm.com>
3908
3909 * opncls.c (bfd_zalloc): Document this function.
3910
3911 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
3912
3913 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3914 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3915 Replace SEC_SHARED with SEC_COFF_SHARED.
3916 (styp_to_sec_flags): Likewise.
3917
3918 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3919 (TARGET_LITTLE_SYM): Likewise.
3920
3921 * section.c (SEC_ARCH_BIT_0): Removed.
3922 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3923 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3924 (SEC_SHARED): Renamed to ...
3925 (SEC_COFF_SHARED): This.
3926 (SEC_BLOCK): Renamed to ...
3927 (SEC_TIC54X_BLOCK): This.
3928 (SEC_CLINK): Renamed to ...
3929 (SEC_TIC54X_CLINK): This.
3930 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3931 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3932 end.
3933 * bfd-in2.h: Regenerated.
3934
3935 2005-02-21 Fred Fish <fnf@specifixinc.com>
3936
3937 * dwarf2.c (find_abstract_instance_name): Call recursively
3938 to handle a DW_AT_specification.
3939
3940 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3941
3942 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3943 mips_elf_create_dynamic_relocation,
3944 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3945 Remove #if 0'd code.
3946
3947 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3948
3949 * Makefile.am: Run "make dep-am"
3950 * Makefile.in: Regenerate.
3951
3952 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3953
3954 * coffgen.c (bfd_coff_get_comdat_section): Check that
3955 coff_section_data isn't NULL.
3956
3957 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3958
3959 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3960 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3961 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3962 useless assignments.
3963 (xcoff_write_archive_contents_big): Likewise.
3964 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3965 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3966 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3967 * cofflink.c (process_embedded_commands): Warning fixes.
3968 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3969 Warning fixes.
3970 * dwarf2.c: Warning fixes.
3971 * elf-bfd.h: Likewise.
3972 * elf-eh-frame.c: Likewise.
3973 * elf-strtab.c: Likewise.
3974 * elf.c: Likewise.
3975 * elf32-m68k.c: Likewise.
3976 * elf32-ppc.c: Likewise.
3977 * elf32-sh-symbian.c: Likewise.
3978 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3979 * elf64-sh64.c: Likewise.
3980 * peicode.h: Likewise.
3981 * elf64-mmix.c: Warning fixes.
3982 * elfcode.h: Likewise.
3983 * elfxx-mips.c: Likewise.
3984 * libbfd-in.h: Likewise.
3985 * libbfd.c: Likewise.
3986 * mach-o.c: Likewise.
3987 * merge.c: Likewise.
3988 * mmo.c: Likewise.
3989 * opncls.c: Likewise.
3990 * pef.c: Likewise.
3991 * srec.c: Likewise.
3992 * vms-hdr.c: Likewise.
3993 * vms-tir.c: Likewise.
3994 * xtensa-isa.c: Likewise.
3995 * xtensa-modules.c: Likewise.
3996 * xsym.c: Likewise.
3997 (pstrcmp): Use correct choice of string lengths. Fix return value.
3998 (bfd_sym_module_name): Correct string length.
3999 * bfd-in2.h: Regenerate.
4000 * libbfd.h: Regenerate.
4001
4002 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
4003
4004 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
4005 uninitialized check_segment[1] in TLSMOFF case.
4006 Reported by Alan Modra.
4007 (elf32_frv_relocate_section): Improve errors and warnings.
4008
4009 2005-02-17 Alan Modra <amodra@bigpond.net.au>
4010
4011 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
4012
4013 2005-02-16 Alan Modra <amodra@bigpond.net.au>
4014
4015 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
4016 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
4017 * pef.c (bfd_pef_scan): Don't ignore return value of
4018 bfd_pef_scan_start_address.
4019 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
4020 bfd_mach_o_scan_start_address.
4021 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
4022 * elfxx-mips.c: Remove unnecessary prototypes.
4023 (sort_dynamic_relocs_64): Abort if not BFD64.
4024
4025 2005-02-16 Alan Modra <amodra@bigpond.net.au>
4026
4027 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
4028 Skip toc reloc adjust if reloc_count is zero.
4029
4030 2005-02-15 Nigel Stephens <nigel@mips.com>
4031 Maciej W. Rozycki <macro@mips.com>
4032
4033 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
4034 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
4035 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4036 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
4037 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4038 dst_mask.
4039 (mips16_gprel_reloc): Remove bit shuffling; call
4040 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4041 and _bfd_mips16_elf_reloc_shuffle() instead.
4042 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4043 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4044 relocs.
4045 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
4046 elf_mips16_howto_table_rel.
4047 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
4048 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
4049 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4050 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
4051 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4052 dst_mask.
4053 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
4054 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
4055 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
4056 placeholders.
4057 (mips16_gprel_reloc): Remove bit shuffling; call
4058 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4059 and _bfd_mips16_elf_reloc_shuffle() instead.
4060 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4061 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4062 relocs.
4063 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
4064 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
4065 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
4066 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
4067 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4068 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
4069 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4070 dst_mask.
4071 (mips16_gprel_reloc): Remove bit shuffling; call
4072 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4073 and _bfd_mips16_elf_reloc_shuffle() instead.
4074 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4075 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4076 relocs.
4077 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
4078 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
4079 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
4080 handle bit shuffling for MIPS16 relocs.
4081 (_bfd_mips16_elf_reloc_shuffle): Likewise.
4082 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
4083 and _bfd_mips16_elf_reloc_shuffle().
4084 (_bfd_mips_elf_generic_reloc): Likewise.
4085 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
4086 and R_MIPS16_LO16.
4087 (mips_elf_obtain_contents): Remove bit shuffling.
4088 (mips_elf_perform_relocation): Likewise; call
4089 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
4090 instead.
4091 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
4092 and R_MIPS16_LO16.
4093 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
4094 (_bfd_mips16_elf_reloc_shuffle): Likewise.
4095 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
4096 (BFD_RELOC_MIPS16_HI16_S): Likewise.
4097 (BFD_RELOC_MIPS16_LO16): Likewise.
4098 * bfd-in2.h: Regenerate.
4099 * libbfd.h: Regenerate.
4100
4101 2005-02-15 Jan Beulich <jbeulich@novell.com>
4102
4103 * elfxx-ia64.c (ia64_howto_table): Correct strings for
4104 R_IA64_DTPMOD64[LM]SB.
4105
4106 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
4107
4108 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
4109 backward branch in the same section.
4110 (elfNN_ia64_relocate_section): Inform users that the input
4111 section is too big to relax br instruction when overflow
4112 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
4113 and R_IA64_PCREL21F.
4114
4115 2005-02-14 Orjan Friberg <orjanf@axis.com>
4116
4117 * elfcore.h (elf_core_file_p): Move the call to
4118 elf_backend_object_p to allow the correct machine to be set before
4119 processing the program headers.
4120
4121 2005-02-14 Nick Clifton <nickc@redhat.com>
4122
4123 PR binutils/716
4124 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
4125 aware flag from the input bfd to the output bfd.
4126
4127 2005-02-11 Maciej W. Rozycki <macro@mips.com>
4128
4129 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
4130 R_MIPS_LITERAL relocations for external symbols.
4131 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
4132 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
4133
4134 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
4135
4136 * bfd-in2.h: Rebuilt.
4137
4138 2005-02-11 Paul Brook <paul@codesourcery.com>
4139
4140 * elf-bfd.h (struct elf_link_hash_table): Add
4141 is_relocatable_executable.
4142 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
4143 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
4144 symbols in relocatable executables.
4145 (bfd_elf_record_link_assignment): Create dynamic section symbols in
4146 relocatable executables.
4147 (_bfd_elf_link_renumber_dynsyms): Ditto.
4148 (bfd_elf_final_link): Ditto.
4149 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
4150 relocations into relocatable executables.
4151 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
4152 executables. Also copy absolute relocations.
4153 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
4154 in relocatable executables.
4155 (allocate_dynrelocs): Copy relocations for relocatable executables.
4156 Output dynamic symbols for symbols defined in linker scripts.
4157
4158 2005-02-11 Nick Clifton <nickc@redhat.com>
4159
4160 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
4161 to avoid a compile time warning.
4162
4163 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
4164 BFD_ASSERT.
4165
4166 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
4167 inclusion of coffcode.h so that it is actually picked up.
4168
4169 * coffcode.h (coff_std_swap_table): Add an unused attribute in
4170 case it is not used.
4171
4172 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
4173 structure and macro.
4174
4175 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
4176 array.
4177
4178 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
4179 to protect the declaration of this array.
4180
4181 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
4182 Avoid call to memcpy with a size of 0.
4183
4184 2005-02-12 Alan Modra <amodra@bigpond.net.au>
4185
4186 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
4187 old-style branches to undefined dot-symbols which will be
4188 satisfied by a plt call.
4189
4190 2005-02-11 Alan Modra <amodra@bigpond.net.au>
4191
4192 * elf64-ppc.c (move_plt_plist): New function, extracted from..
4193 (ppc64_elf_copy_indirect_symbol): ..here.
4194 (func_desc_adjust): Use move_plt_plist.
4195
4196 2005-02-10 Paul Brook <paul@codesourcery.com>
4197
4198 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
4199
4200 2005-02-10 Paul Brook <paul@codesourcery.com>
4201
4202 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
4203 symbols local.
4204 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
4205 (elf_link_renumber_local_hash_table_dynsyms): New function.
4206 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
4207
4208 2005-02-10 Jakub Jelinek <jakub@redhat.com>
4209
4210 * bfd-in.h (BFD_LINKER_CREATED): Define.
4211 * bfd-in2.h: Rebuilt.
4212 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
4213 BFD_LINKER_CREATED bfds when determining input bfds without
4214 .note.GNU-stack section.
4215
4216 2005-02-10 Maciej W. Rozycki <macro@mips.com>
4217
4218 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
4219 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
4220 relocations against external symbols unchanged.
4221
4222 2005-02-08 Paul Brook <paul@codesourcery.com>
4223
4224 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
4225 sections.
4226
4227 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
4228
4229 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
4230 prefix here.
4231
4232 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4233
4234 * elf64-mips.c: Fix formatting throughout.
4235
4236 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4237
4238 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
4239
4240 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
4241
4242 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
4243 *ABS*/*UND* sections.
4244 (elf32_frv_relocate_section): Move zero-addend-required error...
4245 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
4246 missing needed TLS section.
4247
4248 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
4249
4250 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
4251 being the last symbol.
4252 (aout_link_add_symbols): Just return TRUE if a warning
4253 symbol was last.
4254
4255 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4256
4257 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
4258 R_MIPS_GPREL32 relocations against external symbols.
4259 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
4260 comment.
4261
4262 2005-02-07 Alan Modra <amodra@bigpond.net.au>
4263
4264 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
4265 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
4266 elf_string_from_elf_strtab.
4267 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
4268 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
4269 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
4270 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
4271 looking at cached symtab info first, before iterating over headers.
4272 For SHT_REL and SHT_RELA, load dynsymtab if needed.
4273 * elfcode.h (elf_object_p): Don't load section header stringtab
4274 specially.
4275
4276 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
4277
4278 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
4279 against protected function when building shared library.
4280
4281 PR 584
4282 * elf64-x86-64.c (is_32bit_relative_branch): New.
4283 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
4284 protected function symbol when building shared library for
4285 32bit relative branch instruction.
4286
4287 2005-02-06 Alan Modra <amodra@bigpond.net.au>
4288
4289 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
4290 syms when doing a relocatable link.
4291 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
4292 at u.def.section.
4293 (ppc64_elf_tls_setup): Likewise.
4294 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
4295
4296 2005-02-04 Alan Modra <amodra@bigpond.net.au>
4297
4298 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
4299 (link_hash_newfunc): Clear all locals using memset.
4300 (make_fdh): Remove flags param. Always create fake func desc
4301 weak. Link the descriptor with the code entry sym.
4302 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
4303 (add_symbol_adjust): Adjust make_fdh call.
4304 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
4305 descriptor to strong undefined if code entry is strong.
4306
4307 2005-02-04 Alan Modra <amodra@bigpond.net.au>
4308
4309 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
4310 lookup here. Set to new before calling bfd_link_repair_undef_list.
4311 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
4312
4313 2005-02-03 Alan Modra <amodra@bigpond.net.au>
4314
4315 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
4316
4317 2005-02-03 Alan Modra <amodra@bigpond.net.au>
4318
4319 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
4320 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
4321 before the as-needed lib was loaded. Abort on unexpected refs.
4322
4323 2005-02-02 Alan Modra <amodra@bigpond.net.au>
4324
4325 * elflink.c (elf_smash_syms): Expand comments.
4326 (elf_link_add_object_symbols): Only call elf_smash_syms for
4327 as-needed dynamic objects.
4328
4329 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
4330 everything, just the field specific to ia64.
4331 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4332
4333 2005-02-01 Alan Modra <amodra@bigpond.net.au>
4334
4335 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
4336 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
4337 undefined syms.
4338 (struct add_symbol_adjust_data): New.
4339 (add_symbol_adjust): Make an undefweak func desc for old ABI
4340 objects to link with --as-needed shared libs. Return fail status.
4341 Don't adjust old ABI func entry sym to weak if func desc syms
4342 isn't defined.
4343 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
4344 and return status.
4345
4346 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
4347
4348 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
4349 for clarity.
4350
4351 2005-02-01 Alan Modra <amodra@bigpond.net.au>
4352
4353 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
4354 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
4355 remove anything but new and undefweak.
4356 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
4357 existing _DYNAMIC.
4358 (_bfd_elf_create_dynamic_sections): Formatting.
4359 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
4360 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
4361 (struct elf_smash_data): New.
4362 (elf_smash_syms): New function.
4363 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
4364 unneeded dynamic objects to loaded list.
4365 (elf_link_output_extsym): Don't handle as-needed here. Strip
4366 bfd_link_hash_new symbols.
4367 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4368 delref when dynindx is already -1.
4369 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
4370 symbols.
4371 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
4372
4373 2005-02-01 Ben Elliston <bje@au.ibm.com>
4374
4375 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
4376
4377 2005-02-01 Ben Elliston <bje@au.ibm.com>
4378
4379 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
4380 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
4381 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
4382 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
4383 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
4384 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
4385 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
4386 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
4387 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
4388 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
4389 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
4390 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
4391 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
4392 throughout. Similarly, collapse #if 1'd code.
4393
4394 2005-02-01 Ben Elliston <bje@au.ibm.com>
4395
4396 * elf-bfd.h (bfd_elf_discard_group): Remove.
4397 * elf.c (bfd_elf_discard_group): Likewise.
4398 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
4399
4400 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
4401
4402 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
4403 (_bfd_elf_eh_frame_address_size): Declare.
4404 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
4405 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
4406 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
4407 (elf_backend_eh_frame_address_size): Define.
4408 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
4409 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
4410 size from the new backend hook.
4411 (_bfd_elf_write_section_eh_frame): Likewise.
4412 (_bfd_elf_eh_frame_address_size): New function.
4413
4414 2005-01-31 Andrew Cagney <cagney@gnu.org>
4415
4416 * configure: Regenerate to track ../gettext.m4.
4417
4418 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4419
4420 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
4421 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
4422
4423 2005-01-31 Nick Clifton <nickc@redhat.com>
4424
4425 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
4426 sparc-lynxos, vax-vms) be obsolete.
4427
4428 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
4429
4430 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
4431 * elf32-arm.c (ELF_MINPAGESIZE): Define.
4432 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
4433 * elfcode.h (elf_object_p): Use minpagesize instead of
4434 maxpagesize.
4435 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
4436 (elfNN_bed): Include ELF_MINPAGESIZE.
4437
4438 2005-01-28 Julian Brown <julian@codesourcery.com>
4439
4440 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4441 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4442 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
4443 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
4444 passing flag value from ld. Set flag value in global hash table entry.
4445 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
4446 relocation.
4447
4448 2005-01-27 Andrew Cagney <cagney@gnu.org>
4449
4450 * configure: Regenerate to track ../gettext.m4 change.
4451
4452 2005-01-25 Mark Mitchell <mark@codesourcery.com>
4453
4454 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
4455 SymbianOS.
4456
4457 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
4458
4459 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
4460 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
4461 for TLSMOFF.
4462 * reloc.c: Add R_FRV_TLSMOFF.
4463 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4464 (frv_reloc_map, frv_reloc_type_lookup): Map it.
4465 (elf32_frv_relocate_section): Handle it.
4466 (elf32_frv_check_relocs): Likewise.
4467 * libbfd.h, bfd-in2.h: Rebuilt.
4468 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
4469 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
4470 when given an undefweak TLS symbol. Fix constant TLS PLT entries
4471 such that they return the constant in gr9.
4472 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
4473 symbols.
4474 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
4475 too, such that they shrink on relaxation.
4476 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
4477 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
4478 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
4479 if we can guarantee the use of 16-bit constants.
4480 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
4481 Introduce TLS support for FR-V FDPIC.
4482 * reloc.c: Add TLS relocations.
4483 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
4484 (elf32_frv_rel_tlsdesc_value_howto): New.
4485 (elf32_frv_rel_tlsoff_howto): New.
4486 (frv_reloc_map): Add new mappings.
4487 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
4488 reloc information.
4489 (frvfdpic_dynamic_got_plt_info): New.
4490 (frvfdpic_plt_tls_ret_offset): New.
4491 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
4492 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
4493 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
4494 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
4495 section as local.
4496 (struct frvfdpic_relocs_info): Add TLS fields.
4497 (frvfdpic_relocs_info_hash): Warning clean up.
4498 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
4499 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
4500 (FRVFDPIC_TLS_BIAS): Define.
4501 (tls_biased_base): New.
4502 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
4503 relocations.
4504 (frv_reloc_type_lookup): Likewise.
4505 (frvfdpic_info_to_howto_rel): Likewise.
4506 (elf32_frv_relocate_section): Likewise.
4507 (_frv_create_got_section): Create the PLT section here.
4508 (elf32_frvfdpic_create_dynamic_sections): Not here.
4509 (_frvfdpic_count_nontls_entries): Move out of...
4510 (_frvfdpic_count_got_plt_entries): ... here.
4511 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
4512 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
4513 support.
4514 (_frvfdpic_relax_tls_entries): New.
4515 (_frvfdpic_compute_got_alloc_data): Add TLS support.
4516 (_frvfdpic_get_tlsdesc_entry): New.
4517 (_frvfdpic_assign_got_entries): Add TLS support.
4518 (_frvfdpic_assign_plt_entries): Likewise.
4519 (_frvfdpic_reset_got_plt_entries): New.
4520 (_frvfdpic_size_got_plt): Move out of...
4521 (elf32_frvfdpic_size_dynamic_sections): ... here.
4522 (_frvfdpic_relax_got_plt_entries): New.
4523 (elf32_frvfdpic_relax_section): New.
4524 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
4525 (elf32_frv_check_relocs): Add TLS support.
4526 (bfd_elf32_bfd_relax_section): Define for FDPIC.
4527 * libbfd.h, bfd-in2.h: Rebuilt.
4528
4529 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4530
4531 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
4532 loadable reloc sections.
4533 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
4534 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
4535
4536 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4537
4538 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
4539 sections immediately when linking shared libs. Instead, wait until
4540 we know a lib is needed.
4541 (_bfd_elf_link_create_dynstrtab): Extract from..
4542 (_bfd_elf_link_create_dynamic_sections_): ..here.
4543 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
4544 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
4545 for non-existent .dynamic.
4546 (elf_link_output_extsym): Don't complain about undefined symbols
4547 in as-needed dynamic libs that aren't actually linked.
4548
4549 2005-01-24 Andrew Cagney <cagney@gnu.org>
4550
4551 * configure: Regenerate, ../gettext.m4 was updated.
4552
4553 2005-01-21 Ben Elliston <bje@au.ibm.com>
4554
4555 * aout-encap.c: Remove unused file.
4556
4557 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
4558
4559 PR 679
4560 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
4561 non-function symbols are local.
4562 (_bfd_elf_symbol_refs_local_p): Likewise.
4563
4564 2005-01-18 Alan Modra <amodra@bigpond.net.au>
4565
4566 * bfd.c (bfd_link_just_syms): Add abfd param.
4567 * bfd-in2.h: Regenerate.
4568
4569 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4570
4571 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4572 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4573 instructions. If the amount of padding is known, reduce the size
4574 of the CIE or FDE by that amount.
4575
4576 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4577
4578 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4579 augmentation_size. Use bfd_signed_vmas for data_align.
4580 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4581 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4582 functions. Don't read past the end of the enclosing CIE or FDE.
4583 (skip_bytes): New utility function.
4584 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4585 sanity checking.
4586 (_bfd_elf_write_section_eh_frame): Use new functions.
4587
4588 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4589
4590 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4591 assert-style REQUIRE() macro to handle sanity checks.
4592
4593 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
4594
4595 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4596 (comp_unit): Here.
4597 (read_unsigned_leb128): Removed.
4598 (read_signed_leb128): Removed.
4599 (find_abstract_instance_name): Updated.
4600 (parse_comp_unit): Accept info_ptr_unit.
4601 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4602 comp unit and pass it to parse_comp_unit.
4603
4604 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4605 (read_signed_leb128): Moved to ...
4606 * libbfd.c: Here.
4607
4608 * libbfd-in.h (read_unsigned_leb128): New prototype.
4609 (read_signed_leb128): Likewise.
4610 * libbfd.h: Regenerated.
4611
4612 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
4613 Nick Clifton <nickc@redhat.com>
4614
4615 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4616 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4617 arch_sh4a_nofpu_up in order to match the external names and make the
4618 testsuite's job easier.
4619 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4620 names.
4621 * bfd-in2.h: Regenerate.
4622
4623 2005-01-15 Andrew Cagney <cagney@gnu.org>
4624
4625 * bfd.m4: New file.
4626 * acinclude.m4: Move BFD_NEED_DECLARATION,
4627 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4628 the new file bfd.m4. Include ../bfd/bfd.m4.
4629 * configure: Re-generate.
4630
4631 2005-01-12 Alan Modra <amodra@bigpond.net.au>
4632
4633 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4634 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4635 reaching PLT.
4636 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4637 R_PPC_RELAX32PC_PLT.
4638
4639 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4640
4641 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4642 symbols.
4643 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4644 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4645 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4646 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4647 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4648 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4649 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4650 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4651 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4652 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4653 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4654 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4655 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4656 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4657
4658 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4659
4660 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4661 .dynsbss flags.
4662
4663 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
4664
4665 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4666 * bfd-in2.h: Regenerate.
4667 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4668 to support these new machine values.
4669 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4670 the maxq10.
4671 (bfd_maxq_arch): Update values for the maxq20.
4672
4673 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
4674
4675 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4676 non-shared object, do not reserve space in .plt and .rela.plt for
4677 regular symbols neither defined nor referenced in shared objects.
4678
4679 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4680
4681 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4682 to zero the structure.
4683 (create_got_section): Use BFD_ASSERT instead of abort.
4684 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4685 'srelgot' fields.
4686 (create_got_section): New function.
4687 (sparc64_elf_create_dynamic_sections): Likewise.
4688 (sparc64_elf_check_relocs): Invoke create_got_section instead of
4689 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
4690 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4691 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4692 (sparc64_elf_finish_dynamic_symbol): Likewise.
4693 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4694 (elf_backend_create_dynamic_sections): Define to
4695 sparc64_elf_create_dynamic_sections.
4696
4697 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4698
4699 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4700 (elf_backend_omit_section_dynsym): Define to it.
4701 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4702 (elf_backend_omit_section_dynsym): Define to it.
4703
4704 2005-01-07 Jakub Jelinek <jakub@redhat.com>
4705
4706 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4707 PT_DYNAMIC segment, unless .dynamic.
4708
4709 2005-01-06 Paul Brook <paul@codesourcery.com>
4710
4711 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4712 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4713 * configure: Regenerate.
4714 * elf32-arm.c: Add VxWorks target bfd.
4715 (USE_REL): Remove.
4716 (elf32_arm_link_hash_table): Add use_rel.
4717 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4718 elf32_arm_relocate_section): Replace USE_REL with runtime check.
4719 Correct offset calculation for RELA case.
4720 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4721 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4722 (elf32_arm_vxworks_link_hash_table_create): New function.
4723 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4724 (bfd_elf32_littlearm_vxworks_vec): Ditto.
4725 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4726
4727 2005-01-06 Alan Modra <amodra@bigpond.net.au>
4728
4729 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4730 multi_toc_needed.
4731 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4732 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4733 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4734 (ppc64_elf_next_toc_section): Heed no_multi_toc.
4735 (ppc64_elf_reinit_toc): Set multi_toc_needed.
4736 (toc_adjusting_stub_needed): Rewrite.
4737 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4738 toc tests. Adjust for toc_adjusting_stub_needed changes.
4739 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4740 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4741 * section.c: Expand comment on backend bits.
4742 * bfd-in2.h: Regenerate.
4743 * libbfd.h: Regenerate.
4744
4745 2005-01-06 Alan Modra <amodra@bigpond.net.au>
4746
4747 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4748 toc adjusting stub, do not test source section flags.
4749
4750 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
4751
4752 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4753 from STABS debugging sections again.
4754
4755 2005-01-05 Fred Fish <fnf@specifixinc.com>
4756
4757 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4758 (find_abstract_instance_name): New function.
4759 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4760 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4761 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4762
4763 2004-12-31 Paul Brook <paul@copdesourcery.com>
4764
4765 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4766
4767 2004-12-31 Alan Modra <amodra@bigpond.net.au>
4768
4769 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4770 Commit missing changes from 2004-12-22.
4771 * bfd-in2.h: Regenerate.
4772
4773 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
4774
4775 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4776
4777 2004-12-21 Kris Warkentin <kewarken@qnx.com>
4778
4779 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4780 Add 'base' argument for constructing register sections. Reformat.
4781 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4782 gp and fp regs. Reformat.
4783
4784 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
4785
4786 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4787 * bfd-in2.h: Regenerate.
4788 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4789 (avr_reloc_map): Likewise.
4790 (avr_final_link_relocate): Likewise.
4791
4792 2004-12-22 Alan Modra <amodra@bigpond.net.au>
4793
4794 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4795 as-needed dynamic libs as undefined.
4796 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4797 libs when finding they are needed.
4798
4799 2004-12-20 Alan Modra <amodra@bigpond.net.au>
4800
4801 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4802 (opd_entry_value): Use opd_relocs if available.
4803 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
4804 copy .opd relocations to opd_relocs.
4805 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4806
4807 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
4808
4809 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4810 * elf32-v850.c (v850_elf_howto_table): Add entry for
4811 R_V850_LO16_SPLIT_OFFSET.
4812 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4813 (v850_elf_perform_lo16_relocation): New function, extracted from...
4814 (v850_elf_perform_relocation): ...here. Use it to handle
4815 R_V850_LO16_SPLIT_OFFSET.
4816 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4817 R_V850_LO16_SPLIT_OFFSET.
4818 * libbfd.h, bfd-in2.h: Regenerate.
4819
4820 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
4821
4822 * config.bfd: Add s390x-ibm-tpf support.
4823
4824 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
4825
4826 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
4827 to prototype, to make hash info available.
4828 Prevent wrapped symbols from being adjusted twice.
4829
4830 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
4831
4832 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4833 overflow for calls to undefined weak symbols.
4834
4835 2004-12-11 Alan Modra <amodra@bigpond.net.au>
4836
4837 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4838 canonical sections syms have a name.
4839
4840 2004-12-11 Alan Modra <amodra@bigpond.net.au>
4841
4842 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4843 have been adjusted for output.
4844 (ppc64_elf_relocate_section): Mark sections with reloc_done.
4845
4846 2004-12-10 Alan Modra <amodra@bigpond.net.au>
4847
4848 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4849 add symtab_hdr param.
4850 (group_signature): Update calls.
4851 * elf-bfd.h (bfd_elf_sym_name): Update.
4852 * elf32-ppc.c (ppc_elf_relocate_section): Update.
4853 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4854 (ppc64_elf_relocate_section): Update.
4855 * elflink.c (elf_link_input_bfd): Update.
4856
4857 2004-12-10 Jakub Jelinek <jakub@redhat.com>
4858
4859 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4860 st_shndx on STT_SECTION sections.
4861
4862 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
4863
4864 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4865 ELF section symbols.
4866
4867 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
4868
4869 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4870 return a real value, unless it is a PLT symbol.
4871 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4872 bal if possible.
4873
4874 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4875 R_MIPS_JALR entry to 0.
4876
4877 * archures.c: Define bfd_mach_mips9000.
4878 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4879 (mips_set_isa_flags): Handle bfd_mach_mips9000.
4880 * cpu-mips.c (I_mips9000): Define.
4881 (arch_info_struct): Add case for bfd_mach_mips9000.
4882 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4883 * bfd-in2.h: Regenerate.
4884
4885 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
4886
4887 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4888 overflow.
4889
4890 2004-12-07 Ben Elliston <bje@gnu.org>
4891
4892 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4893
4894 2004-12-06 Daniel Jacobowitz <dan@debian.org>
4895
4896 Suggested by Fergal Daly <fergal@esatclear.ie>:
4897 * simple.c (simple_dummy_multiple_definition): New function.
4898 (bfd_simple_get_relocated_section_contents): Use it.
4899
4900 2004-12-03 Jan Beulich <jbeulich@novell.com>
4901
4902 * elf.c (elf_find_function): Don't use the last file symbol ever,
4903 seen, but the last one seen prior to the symbol being reported.
4904 Don't report a filename at all for global symbols when that might
4905 be ambiguous/wrong.
4906
4907 2004-12-01 Paul Brook <paul@codesourcery.com>
4908
4909 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4910 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4911 version.
4912
4913 2004-12-01 Paul Brook <paul@codesourcery.com>
4914
4915 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4916 sections undefined.
4917
4918 2004-11-30 Paul Brook <paul@codesourcery.com>
4919
4920 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4921 no_pipeline_knowledge
4922 (elf32_arm_link_hash_table_create): Ditto.
4923 (bfd_elf32_arm_process_before_allocation): Ditto.
4924 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4925 handling.
4926 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4927 prototype.
4928 * bfd-in2.h: Regenerate.
4929
4930 2004-11-30 Randolph Chung <tausq@debian.org>
4931
4932 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4933 (elf32_hppa_grok_psinfo): New function.
4934 (elf_backend_grok_prstatus): Define.
4935 (elf_backend_grok_psinfo): Define.
4936
4937 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4938
4939 PR 574:
4940 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4941
4942 2004-11-24 Paul Brook <paul@codesourcery.com>
4943
4944 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4945
4946 2004-11-24 Paul Brook <paul@codesourcery.com>
4947
4948 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4949 (elf32_arm_swap_symbol_out): New function.
4950 (elf32_arm_size_info): Add.
4951 (elf_backend_size_info): Define.
4952
4953 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4954
4955 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4956 make_bfd_asection.
4957
4958 2004-11-19 Alan Modra <amodra@bigpond.net.au>
4959
4960 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4961 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4962 * nlmcode.h (nlm_write_object_contents): Warning fix.
4963
4964 2004-11-18 Bob Wilson <bob.wilson@acm.org>
4965
4966 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4967
4968 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4969
4970 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4971 (elf32_arm_plt_thumb_stub): New.
4972 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4973 and plt_got_offset.
4974 (elf32_arm_link_hash_traverse): Fix typo.
4975 (elf32_arm_link_hash_table): Add obfd.
4976 (elf32_arm_link_hash_newfunc): Initialize new fields.
4977 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4978 (elf32_arm_link_hash_table_create): Initialize obfd.
4979 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4980 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4981 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4982 interworking BFD is not dynamic.
4983 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4984 not emit glue for PLT references.
4985 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4986 emit glue for PLT references. Support the Thumb PLT prefix.
4987 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4988 plt_thumb_refcount.
4989 (elf32_arm_check_relocs): Likewise.
4990 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4991 plt_thumb_refcount.
4992 (allocate_dynrelocs): Handle Thumb PLT references.
4993 (elf32_arm_finish_dynamic_symbol): Likewise.
4994 (elf32_arm_symbol_processing): New function.
4995 (elf_backend_symbol_processing): Define.
4996
4997 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4998
4999 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
5000 add_fde_encoding. Remove need_relative.
5001 * elf-eh-frame.c (extra_augmentation_string_bytes)
5002 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
5003 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
5004 in cases where the CIE has no existing 'R' augmentation. Use
5005 size_of_output_cie_fde when assigning offsets. Use the final offset
5006 as the new section size.
5007 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
5008 Account for any extra augmentation bytes in the returned offset.
5009 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
5010 moved before being modified. Pad growing entries with DW_CFA_nops.
5011 Add 'z' and 'R' augmentations as directed by add_augmentation_size
5012 and add_fde_encoding.
5013
5014 2004-11-15 Mark Mitchell <mark@codesourcery.com>
5015
5016 * elf32-arm.c (elf32_arm_relocate_section): Use
5017 arm_real_reloc_type.
5018
5019 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
5020
5021 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
5022 for discard relocations; don't add an R_MIPS_NONE to the main body
5023 of .rel.dyn.
5024
5025 2004-11-04 Paul Brook <paul@codesourcery.com>
5026
5027 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
5028 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
5029 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
5030 default version definition for unversioned symbols.
5031 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
5032 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
5033 _bfd_elf_slurp_version_tables. Set default version for unversioned
5034 imported symbols.
5035
5036 2004-11-15 Paul Brook <paul@codesourcery.com>
5037
5038 * elflink.c (elf_link_add_object_symbols): Don't assume version
5039 indices are consecutive.
5040
5041 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
5042
5043 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
5044 composite relocations against the personality data.
5045
5046 2004-11-13 Paul Brook <paul@codesourcery.com>
5047
5048 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
5049 R_ARM_PREL31 relocations to PLT entries.
5050 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
5051 (elf32_arm_check_relocs): Ditto.
5052
5053 2004-11-12 Bob Wilson <bob.wilson@acm.org>
5054
5055 * xtensa-isa.c (xtensa_interface_class_id): New.
5056
5057 2004-11-11 Bob Wilson <bob.wilson@acm.org>
5058
5059 * elf32-xtensa.c (property_table_compare): Remove assertion about
5060 entries with the same address and non-zero size.
5061 (xtensa_read_table_entries): Report such entries as errors.
5062
5063 2004-11-11 Mark Mitchell <mark@codesourcery.com>
5064
5065 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
5066 R_ARM_RELATIVE on Symbian OS.
5067
5068 2004-11-09 Mark Mitchell <mark@codesourcery.com>
5069
5070 * som.c (som_bfd_print_private_bfd_data): New function.
5071 (som_object_setup): Save the auxiliary header. Don't assume that
5072 zero is an invalid entry point for a shared library.
5073 (som_object_p): Allocate the auxiliary header on the heap.
5074
5075 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
5076 declaration.
5077 (elf32_arm_symbian_modify_segment_map): Likewise.
5078
5079 2004-11-09 Daniel Jacobowitz <dan@debian.org>
5080
5081 From David Poole <daveml@mbuf.com>:
5082 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
5083 (elf32_arm_size_dynamic_sections): Call it.
5084
5085 2004-11-09 Alan Modra <amodra@bigpond.net.au>
5086
5087 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
5088 (ALL_MACHINES_CFILES): Fix typo.
5089 * Makefile.in: Regenerate.
5090 * po/SRC-POTFILES.in: Regenerate.
5091
5092 2004-11-08 Mark Mitchell <mark@codesourcery.com>
5093
5094 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
5095 R_ARM_RELATIVE relocation for Symbian OS, mention the section
5096 symbol in the relocation.
5097
5098 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
5099 Vineet Sharma <vineets@noida.hcltech.com>
5100
5101 * coff-maxq.c: New File.
5102 * cpu-maxq.c: New File.
5103 * coffcode.h: Likewise.
5104 * config.bfd: Likewise.
5105 * configure.in (maxqcoff_vec): New target vector.
5106 * Makefile.am: Add support for maxq target.
5107 * configure.in: Likewise.
5108 * archures.c:. Likewise.
5109 * targets.c: Likewise.
5110 * bfd_in2.h : Regenerated.
5111 * Makefile.in: Regenerated.
5112 * configure: Regenerated.
5113 * doc/Makefile.in: Regenerated.
5114
5115 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5116
5117 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
5118 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
5119 C_NT_WEAK aux entries.
5120 (_bfd_coff_generic_relocate_section): Handle undefined
5121 aliases.
5122
5123 2004-11-07 Andreas Schwab <schwab@suse.de>
5124
5125 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
5126 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
5127 non-default visibility.
5128
5129 2004-11-01 Mark Mitchell <mark@codesourcery.com>
5130
5131 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
5132 D_PAGED.
5133 (elf32_arm_symbian_modify_segment_map): Don't
5134 reset includes_filehdr and includes_phdrs here.
5135
5136 2004-11-04 Daniel Jacobowitz <dan@debian.org>
5137
5138 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
5139 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
5140 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
5141 dependency.
5142 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
5143 to a new removed list. Remove normal configuration stanzas.
5144 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
5145 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
5146 elfarm-nabi.lo with elf32-arm.lo.
5147 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
5148 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
5149 * elf32-arm.h: Remove.
5150 * elfarm-oabi.c: Remove.
5151 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
5152 and bfd_elf32_littlearm_oabi_vec.
5153 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
5154
5155 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
5156
5157 * config.bfd: Support crisv32-*-* like cris-*-*.
5158 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
5159 (bfd_mach_cris_v10_v32): New macros.
5160 * cpu-cris.c: Tweak formatting.
5161 (get_compatible): New function.
5162 (N): New macro.
5163 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
5164 bfd_arch_info_type:s.
5165 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
5166 get_compatible for member compatible and link bfd_cris_arch_v32 as
5167 next.
5168 * elf32-cris.c (cris_elf_pcrel_reloc)
5169 (cris_elf_set_mach_from_flags): New functions.
5170 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
5171 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
5172 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
5173 numbers for bfd_mach_cris_v32.
5174 (PLT_ENTRY_SIZE_V32): New macro.
5175 (elf_cris_plt0_entry): Drop last comma in initializer.
5176 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
5177 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
5178 PLT initializers.
5179 (cris_elf_relocate_section): Change all "%B(%A)" messages to
5180 "%B, section %A".
5181 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
5182 (elf_cris_finish_dynamic_sections): Similar.
5183 (elf_cris_adjust_dynamic_symbol): Similar.
5184 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
5185 section %A".
5186 <switch with PIC relocs>: Emit error and return FALSE for
5187 bfd_mach_cris_v10_v32.
5188 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5189 Emit warning when generating textrel reloc.
5190 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
5191 (cris_elf_final_write_processing): Set flags according to mach.
5192 (cris_elf_print_private_bfd_data): Display
5193 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
5194 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
5195 new_flags. Don't call cris_elf_final_write_processing. Don't
5196 look at the actual elf header flags at all; use
5197 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
5198 in bfd_get_mach for ibfd and obfd and handle merging of compatible
5199 objects.
5200 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5201 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
5202 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
5203 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
5204 * bfd-in2.h, libbfd.h: Regenerate.
5205
5206 2004-11-04 Alan Modra <amodra@bigpond.net.au>
5207
5208 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
5209 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
5210 comment.
5211 (struct adjust_toc_info): New.
5212 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
5213
5214 2004-11-03 Bob Wilson <bob.wilson@acm.org>
5215
5216 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
5217 if there are no segments.
5218
5219 2004-11-02 Daniel Jacobowitz <dan@debian.org>
5220
5221 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
5222
5223 2004-11-02 Nick Clifton <nickc@redhat.com>
5224
5225 * elf32-iq2000.c: Convert to ISO C90 formatting.
5226
5227 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
5228
5229 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
5230
5231 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
5232
5233 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
5234 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
5235 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
5236
5237 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5238
5239 * elf32-sh.c (tpoff): Take alignment into account.
5240
5241 2004-10-28 Nick Clifton <nickc@redhat.com>
5242
5243 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
5244 performing a relocatable link.
5245 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
5246 for MIPS ports under Irix.
5247
5248 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
5249
5250 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
5251 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
5252 (elf32_arm_final_link_relocate): Ditto.
5253 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
5254 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
5255 (elf32_arm_adjust_dynamic_symbol): Ditto.
5256 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
5257 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
5258 (elf32_arm_r_howto): ... To here.
5259 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
5260
5261 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
5262
5263 PR 475
5264 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
5265 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
5266 and R_IA64_SECREL64LSB.
5267
5268 2004-10-26 Paul Brook <paul@codesourcery.com>
5269
5270 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
5271 (bfd_elf_size_dynamic_sections): Create default version definition.
5272 (elf_link_output_extsym): Adjust for default symbol version.
5273
5274 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5275
5276 * mmo.c: Adjust to ISO C.
5277
5278 * mmo.c (mmo_write_section_description): New function broken out
5279 of mmo_internal_write_section.
5280 (mmo_internal_write_section): For each of .text and .data, call
5281 mmo_write_section_description before outputting contents if it has
5282 nontrivially deducible vma or contents.
5283 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
5284 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
5285 symbols if found within the .data address range.
5286
5287 2004-10-24 Daniel Jacobowitz <dan@debian.org>
5288
5289 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
5290
5291 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5292
5293 * mmo.c (File Layout): Correct place of misplaced blurb about
5294 special data.
5295
5296 2004-10-22 Mark Kettenis <kettenis@gnu.org>
5297
5298 * config.bfd: Add mips64*-*-openbsd.
5299
5300 2004-10-21 Bob Wilson <bob.wilson@acm.org>
5301
5302 * elf32-xtensa.c (ebb_propose_action): Put declarations before
5303 statements.
5304
5305 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5306
5307 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
5308 * configure: Regenerate.
5309
5310 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5311
5312 PR 463
5313 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
5314 to linker reloc_overflow callback.
5315 (aout_link_input_section_ext): Likewise.
5316 (aout_link_reloc_link_order): Likewise.
5317 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5318 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5319 Likewise.
5320 (alpha_relocate_section): Likewise.
5321 * coff-arm.c (coff_arm_relocate_section): Likewise.
5322 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
5323 * coff-h8500.c (extra_case): Likewise.
5324 * coff-i960.c (coff_i960_relocate_section): Likewise.
5325 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5326 * coff-mips.c (mips_relocate_section): Likewise.
5327 * coff-or32.c (coff_or32_relocate_section): Likewise.
5328 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5329 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
5330 * coff-sh.c (sh_relocate_section): Likewise.
5331 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5332 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
5333 * coff-z8k.c (extra_case): Likewise.
5334 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
5335 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5336 (_bfd_coff_generic_relocate_section): Likewise.
5337 * ecoff.c (ecoff_reloc_link_order): Likewise.
5338 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
5339 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5340 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5341 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5342 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5343 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
5344 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5345 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
5346 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5347 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5348 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5349 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5350 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5351 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5352 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5353 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5354 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5355 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
5356 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5357 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
5358 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5359 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5360 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5361 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5362 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5363 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5364 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5365 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5366 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5367 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5368 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5369 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5370 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5371 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5372 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5373 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5374 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5375 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5376 * elflink.c (elf_reloc_link_order): Likewise.
5377 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5378 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
5379 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
5380 * linker.c (_bfd_generic_reloc_link_order): Likewise.
5381 * pdp11.c (pdp11_aout_link_input_section): Likewise.
5382 (aout_link_reloc_link_order): Likewise.
5383 * reloc.c (bfd_generic_get_relocated_section_contents):
5384 Likewise.
5385 * xcofflink.c (xcoff_reloc_link_order): Likewise.
5386 * simple.c (simple_dummy_reloc_overflow): Updated.
5387
5388 2004-10-20 Andreas Schwab <schwab@suse.de>
5389
5390 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
5391 (elf_backend_plt_sym_val): Define.
5392
5393 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
5394
5395 * config.bfd: Set targ_underscore=yes for PE COFF targets
5396
5397 2004-10-19 Alan Modra <amodra@bigpond.net.au>
5398
5399 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
5400 (ppc64_elf_edit_opd): Likewise.
5401
5402 2004-10-18 Mark Mitchell <mark@codesourcery.com>
5403
5404 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
5405 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
5406 set SEC_ALLOC and SEC_LOAD.
5407
5408 2004-10-18 Nick Clifton <nickc@redhat.com>
5409
5410 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
5411 'name' for relocs against both local and global symbols.
5412
5413 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5414
5415 * bfd-in2.h: Regenerate.
5416 * bfd.c (struct bfd): Add no_export.
5417 * elflink.c (elf_link_add_object_symbols): Handle no_export.
5418
5419 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5420
5421 * config.bfd: Whitespace cleanup.
5422 * Makefile.am: Run "make dep-am"
5423 * Makefile.in: Regenerate.
5424
5425 2004-10-15 Jakub Jelinek <jakub@redhat.com>
5426
5427 * elflink.c (struct already_linked_section): Removed.
5428 (try_match_symbols_in_sections, already_linked): Removed.
5429 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
5430 prefix of section names when finding already_linked_table
5431 chain. Compare section names. Instead of calling already_linked,
5432 do it inline and only for sections in the same already_linked_list.
5433
5434 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5435
5436 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
5437 parameter. If called after _bfd_elf_write_section_eh_frame,
5438 don't allow a -2 return unless need_* bit is already set, and
5439 handle offsets adjusted for output_offset.
5440 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
5441 * elf.c (_bfd_elf_section_offset): Update call.
5442
5443 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
5444
5445 PR 440
5446 * coffcode.h (coff_compute_section_file_positions): Cast to
5447 bfd_vma when computing page alignment.
5448
5449 2004-10-13 Mark Mitchell <mark@codesourcery.com>
5450
5451 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5452 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
5453
5454 2004-10-12 Mark Mitchell <mark@codesourcery.com>
5455
5456 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
5457 relocations use a virtual address, not a section offset.
5458
5459 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5460
5461 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
5462 (narrow_instruction, widen_instruction): Remove unnecessary calls to
5463 xtensa_format_encode.
5464 (ebb_propose_action): Inline call to ebb_add_proposed_action.
5465 (ebb_add_proposed_action): Delete.
5466
5467 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5468
5469 * elf32-xtensa.c: Use ISO C90 formatting.
5470
5471 2004-10-12 Paul Brook <paul@codesourcery.com>
5472
5473 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
5474 message.
5475
5476 2004-10-12 Paul Brook <paul@codesourcery.com>
5477
5478 * elf32-arm.h: Support EABI version 4 objects.
5479
5480 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5481
5482 PR 325
5483 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
5484 Don't mark as default.
5485 (bfd_x86_64_arch): Don't mark as default.
5486
5487 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5488
5489 * elflink.c (enum action_discarded): New.
5490 (elf_section_complain_discarded): Delete.
5491 (elf_action_discarded): New function subsuming the above and also
5492 controlling reloc behaviour.
5493 (elf_link_input_bfd): Use it.
5494
5495 2004-10-11 Jakub Jelinek <jakub@redhat.com>
5496
5497 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
5498 (special_sections): Add .gnu.liblist and .gnu.conflict.
5499 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
5500
5501 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5502
5503 PR 233
5504 * elflink.c (elf_link_input_bfd): Try harder to support
5505 relocations against symbols in removed linkonce sections.
5506
5507 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5508
5509 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
5510
5511 PR 354
5512 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
5513 sections do not reference symbols in non-SEC_ALLOC sections.
5514
5515 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5516
5517 PR 437
5518 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
5519 (_bfd_elf_link_omit_section_dynsym): Formatting.
5520
5521 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5522
5523 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
5524 * libbfd.h: Regnerate.
5525 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
5526 * elf32-frv.c: Likewise.
5527 * elf32-m32r.c: Likewise.
5528 * elf32-ppc.c: Likewise.
5529 * elf64-hppa.c: Likewise.
5530 * elfxx-ia64.c: Likewise.
5531 * opncls.c: Likewise.
5532
5533 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5534
5535 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
5536 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
5537 offsets stored in struct eh_cie_fde entries before doing other
5538 work.
5539
5540 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
5541 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
5542 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
5543 setting offsets for removed CIEs. Don't set "sec", instead set
5544 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
5545 CIE in hdr_info. Only set make_relative and make_lsda_relative
5546 for CIEs. Use pointers rather than array indices.
5547 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
5548 make_lsda_relative, need_* on cie_inf for FDEs.
5549 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
5550 section output_offset. Delete cie_offset, instead use cie_inf
5551 pointer to CIE entry. Use need_relative and need_lsda_relative on
5552 CIE entry for FDEs. Use pointers rather than array indices.
5553
5554 2004-10-09 Alan Modra <amodra@bigpond.net.au>
5555
5556 * coff-rs6000.c (rs6000coff_vec): Add initializer for
5557 bfd_is_target_special_symbol.
5558 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5559 * som.c (som_bfd_is_target_special_symbol): Define.
5560
5561 2004-10-08 Nick Clifton <nickc@redhat.com>
5562
5563 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
5564 * configure: Regenerate.
5565 * bfd-in2.h: Regenerate.
5566 * syms.c (bfd_is_target_special_symbol): New interface function.
5567 Returns true when a symbol should be considered to be special.
5568 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
5569 the symbol jump table.
5570 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5571 Return true iff the symbol is a mapping symbol.
5572 (bfd_elf32_bfd_is_target_special_symbol): Define.
5573 * elfxx-target.h: Provide a default definition for
5574 bfd_is_target_special_symbol.
5575 * aout-target.h: Likewise.
5576 * aout-tic30.c: Likewise.
5577 * binary.c: Likewise.
5578 * coffcode.h: Likewise.
5579 * i386msdos.c: Likewise.
5580 * ieee.c: Likewise.
5581 * ihex.c: Likewise.
5582 * libaout.h: Likewise.
5583 * libbfd-in.h: Likewise
5584 * libecoff.h: Likewise.
5585 * mach-o.c: Likewise.
5586 * mmo.c: Likewise.
5587 * nlm-target.h: Likewise.
5588 * oasys.c: Likewise.
5589 * pef.c: Likewise.
5590 * ppcboot.c: Likewise.
5591 * srec.c: Likewise.
5592 * tekhex.c: Likewise.
5593 * versados.c: Likewise.
5594 * vms.c: Likewise.
5595 * xcoff-target.h: Likewise.
5596 * xsym.c: Likewise.
5597 * libbfd.h: Regenerate.
5598
5599 2004-10-08 Daniel Jacobowitz <dan@debian.org>
5600
5601 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5602 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5603 (elf_backend_section_from_shdr): Define.
5604
5605 2004-10-08 Alan Modra <amodra@bigpond.net.au>
5606
5607 * syms.c (bfd_is_local_label): Return false for file symbols.
5608
5609 2004-10-07 Bob Wilson <bob.wilson@acm.org>
5610 David Heine <dlheine@tensilica.com>
5611
5612 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5613 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5614 (elf32xtensa_no_literal_movement): New global variable.
5615 (elf_howto_table): Add entries for new relocations.
5616 (elf_xtensa_reloc_type_lookup): Handle new relocations.
5617 (property_table_compare): When addresses are equal, compare sizes and
5618 various property flags.
5619 (property_table_matches): New.
5620 (xtensa_read_table_entries): Extend to read new property tables. Add
5621 output_addr parameter to indicate that output addresses should be used.
5622 Use bfd_get_section_limit.
5623 (elf_xtensa_find_property_entry): New.
5624 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5625 (elf_xtensa_check_relocs): Handle new relocations.
5626 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
5627 relocations. Use new xtensa-isa.h functions.
5628 (build_encoding_error_message): Remove encode_result parameter. Add
5629 new target_address parameter used to detect alignment errors.
5630 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
5631 error handling. Use new is_operand_relocation function.
5632 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5633 Use underbar macro for error messages. Formatting.
5634 (get_const16_opcode): New.
5635 (get_l32r_opcode): Add a separate flag for initialization.
5636 (get_relocation_opnd): Operand number is no longer explicit in the
5637 relocation. Change to decode the opcode and analyze its operands.
5638 (get_relocation_slot): New.
5639 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
5640 Use new xtensa-isa.h functions to handle multislot instructions.
5641 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
5642 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5643 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5644 check_loop_aligned, check_branch_target_aligned_address, narrowable,
5645 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5646 get_single_format, init_op_single_format_table): New.
5647 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5648 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
5649 (contract_asm_expansion): Add error_message parameter and pass it to
5650 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
5651 with R_XTENSA_SLOT0_OP.
5652 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5653 instructions. Use new xtensa-isa.h functions.
5654 (r_reloc struct): Add new virtual_offset field.
5655 (r_reloc_init): Add contents and content_length parameters. Set
5656 virtual_offset field to zero. Add contents to target_offset field for
5657 partial_inplace relocations.
5658 (r_reloc_is_defined): Check for null.
5659 (print_r_reloc): New debug function.
5660 (source_reloc struct): Replace xtensa_operand field with pair of the
5661 opcode and the operand position. Add is_abs_literal field.
5662 (init_source_reloc): Specify operand by opcode/position pair. Set
5663 is_abs_literal field.
5664 (source_reloc_compare): When target_offsets are equal, compare other
5665 fields to make sorting predictable.
5666 (literal_value struct): Add is_abs_literal field.
5667 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5668 (init_literal_value): New.
5669 (is_same_value): Replace with ...
5670 (literal_value_equal): ... this function. Add comparisons of
5671 virtual_offset and is_abs_literal fields.
5672 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
5673 failure. Initialize has_last_loc field.
5674 (value_map_hash_table_delete): New.
5675 (hash_literal_value): Rename to ...
5676 (literal_value_hash): ... this. Include is_abs_literal flag and
5677 virtual_offset field in the hash value.
5678 (get_cached_value): Rename to ...
5679 (value_map_get_cached_value): ... this. Update calls to
5680 literal_value_hash and literal_value_equal.
5681 (add_value_map): Check for allocation failure. Update calls to
5682 value_map_get_cached_value and literal_value_hash.
5683 (text_action, text_action_list, text_action_t): New types.
5684 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5685 text_action_add, text_action_add_literal, offset_with_removed_text,
5686 offset_with_removed_text_before_fill, find_insn_action,
5687 print_action_list, print_removed_literals): New.
5688 (offset_with_removed_literals): Delete.
5689 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5690 fix_array, fix_array_count, allocated_relocs, relocs_count, and
5691 allocated_relocs_count fields.
5692 (init_xtensa_relax_info): Initialize new fields.
5693 (reloc_bfd_fix struct): Add new translated field.
5694 (reloc_bfd_fix_init): Add translated parameter and use it to set the
5695 translated field.
5696 (fix_compare, cache_fix_array): New.
5697 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5698 section via get_xtensa_relax_info. Use cache_fix_array to set up
5699 sorted fix_array and use bsearch instead of linear search.
5700 (section_cache_t): New struct.
5701 (init_section_cache, section_cache_section, clear_section_cache): New.
5702 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5703 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5704 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5705 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5706 New.
5707 (retrieve_contents): Use bfd_get_section_limit.
5708 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
5709 to compute_removed_literals. Free value_map_hash_table when no longer
5710 needed.
5711 (analyze_relocations): Check is_relaxable_asm_section flag. Call
5712 compute_text_actions for all sections.
5713 (find_relaxable_sections): Mark sections as relaxable if they contain
5714 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
5715 call. Increment relax_info src_count field only for appropriate
5716 relocation types. Remove is_literal_section check.
5717 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
5718 r_reloc_init and find_associated_l32r_irel. Check
5719 is_relaxable_asm_section flag. Handle L32R instructions with absolute
5720 literals. Pass is_abs_literal flag to init_source_reloc.
5721 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
5722 CONST16 instructions. Adjust calls to r_reloc_init and
5723 pcrel_reloc_fits. Handle weak symbols conservatively.
5724 (find_associated_l32r_irel): Add bfd parameter and pass it to
5725 is_l32r_relocation.
5726 (compute_text_actions, compute_ebb_proposed_actions,
5727 compute_ebb_actions, check_section_ebb_pcrels_fit,
5728 check_section_ebb_reduces, text_action_add_proposed,
5729 compute_fill_extra_space): New.
5730 (remove_literals): Replace with ...
5731 (compute_removed_literals): ... this function. Call
5732 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
5733 Call xtensa_read_table_entries to get the property table. Skip
5734 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
5735 is_removable_literal, remove_dead_literal, and
5736 identify_literal_placement functions.
5737 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5738 instead of linear search.
5739 (is_removable_literal, remove_dead_literal,
5740 identify_literal_placement): New.
5741 (relocations_reach): Update check for literal not referenced by any
5742 PC-relative relocations. Adjust call to pcrel_reloc_fits.
5743 (coalesce_shared_literal, move_shared_literal): New.
5744 (relax_section): Use bfd_get_section_limit. Call
5745 translate_section_fixes. Update calls to r_reloc_init and
5746 offset_with_removed_text. Check new is_relaxable_asm_section flag.
5747 Add call to pin_internal_relocs. Add special handling for
5748 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
5749 info to calculate new addend_displacement variable. Replace code for
5750 deleting literals with more general code to perform the actions
5751 determined by the action_list for the section.
5752 (translate_section_fixes, translate_reloc_bfd_fix): New.
5753 (translate_reloc): Check new is_relaxable_asm_section flag. Call
5754 find_removed_literal only if is_operand_relocation. Update call to
5755 offset_with_removed_text. Use new target_offset and removed_bytes
5756 variables.
5757 (move_literal): New.
5758 (relax_property_section): Use bfd_get_section_limit. Set new
5759 is_full_prop_section flag and handle new property tables. Update calls
5760 to r_reloc_init and offset_with_removed_text. Check
5761 is_relaxable_asm_section flag. Handle expansion of zero-sized
5762 unreachable entries, with use of offset_with_removed_text_before_fill.
5763 For relocatable links, combine entries only for literal tables.
5764 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
5765 calls to offset_with_removed_text. Translate st_size field for
5766 function symbols.
5767 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5768 failure. Add contents parameter. Update call to get_bfd_fix. Update
5769 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
5770 R_XTENSA_ASM_EXPAND relocs.
5771 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
5772 call to get_bfd_fix. Include offset from contents for partial_inplace
5773 relocations.
5774 (is_reloc_sym_weak): New.
5775 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5776 (prop_sec_len): New.
5777 (xtensa_is_property_section): Handle new property sections.
5778 (is_literal_section): Delete.
5779 (internal_reloc_compare): When r_offset matches, compare r_info and
5780 r_addend to make sorting predictable.
5781 (internal_reloc_matches): New.
5782 (xtensa_get_property_section_name): Handle new property sections.
5783 (xtensa_get_property_predef_flags): New.
5784 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5785 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5786 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5787 (xtisa_errno, xtisa_error_msg): New variables.
5788 (xtensa_isa_errno, xtensa_isa_error_msg): New.
5789 (xtensa_insnbuf_alloc): Add error handling.
5790 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
5791 use xtensa_format_decode. Add error handling.
5792 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
5793 instruction length to find the number of bytes to copy.
5794 (xtensa_isa_init): Add error handling. Replace calls to
5795 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5796 tables in the xtensa_modules structure.
5797 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5798 xtensa_extend_isa): Delete.
5799 (xtensa_isa_free): Change to only free lookup tables.
5800 (opname_lookup_compare): Replace with ...
5801 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
5802 (xtensa_insn_maxlength): Rename to ...
5803 (xtensa_isa_maxlength): ... this.
5804 (xtensa_insn_length): Delete.
5805 (xtensa_insn_length_from_first_byte): Replace with ...
5806 (xtensa_isa_length_from_chars): ... this function.
5807 (xtensa_num_opcodes): Rename to ...
5808 (xtensa_isa_num_opcodes): ... this.
5809 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5810 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5811 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5812 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5813 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5814 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5815 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5816 (xtensa_opcode_lookup): Add error handling.
5817 (xtensa_decode_insn): Replace with ...
5818 (xtensa_opcode_decode): ... this function, with new format and
5819 slot parameters. Add error handling.
5820 (xtensa_encode_insn): Replace with ...
5821 (xtensa_opcode_encode): ... this function, which does the encoding via
5822 one of the entries in the "encode_fns" array. Add error handling.
5823 (xtensa_opcode_name): Add error handling.
5824 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5825 xtensa_opcode_is_call): New.
5826 (xtensa_num_operands): Replace with ...
5827 (xtensa_opcode_num_operands): ... this function. Add error handling.
5828 (xtensa_opcode_num_stateOperands,
5829 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5830 xtensa_opcode_funcUnit_use, xtensa_operand_name,
5831 xtensa_operand_is_visible): New.
5832 (xtensa_get_operand, xtensa_operand_kind): Delete.
5833 (xtensa_operand_inout): Add error handling and special-case for
5834 "sout" operands.
5835 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5836 operate on one slot of an instruction. Added error handling.
5837 (xtensa_operand_encode): Handle default operands with no encoding
5838 functions. Check for success by comparing against decoded value.
5839 Add error handling.
5840 (xtensa_operand_decode): Handle default operands. Return decoded value
5841 through argument pointer. Add error handling.
5842 (xtensa_operand_is_register, xtensa_operand_regfile,
5843 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5844 (xtensa_operand_isPCRelative): Rename to ...
5845 (xtensa_operand_is_PCrelative): ... this. Add error handling.
5846 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5847 through argument pointer. Add error handling.
5848 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5849 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5850 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5851 xtensa_regfile_shortname, xtensa_regfile_view_parent,
5852 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5853 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5854 xtensa_state_is_exported, xtensa_sysreg_lookup,
5855 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5856 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5857 xtensa_interface_num_bits, xtensa_interface_inout,
5858 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5859 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5860 * xtensa-modules.c: Rewrite to use new data structures.
5861 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5862 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5863 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5864 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5865 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5866 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5867 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5868 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5869 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5870 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5871 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5872 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5873 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5874 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5875 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5876 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5877 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5878 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5879 * Makefile.in: Regenerate.
5880 * bfd-in2.h: Likewise.
5881 * libbfd.h: Likewise.
5882
5883 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
5884
5885 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5886 against the absolute section.
5887 (mips_elf64_write_rela): Likewise.
5888
5889 2004-10-07 Jan Beulich <jbeulich@novell.com>
5890
5891 * elf.c (elf_find_function): Don't generally check for matching
5892 section, just for non-file symbols. Remove redunant comparison
5893 for the latter.
5894 * elf32-arm.h (arm_elf_find_function): Likewise.
5895
5896 2004-10-07 Jeff Baker <jbaker@qnx.com>
5897
5898 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5899 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5900 was specified.
5901
5902 2004-10-04 Roland McGrath <roland@redhat.com>
5903
5904 * hash.c (bfd_hash_set_default_size): Use const for table.
5905 Use size_t instead of int for variable compared to sizeof results.
5906
5907 2004-10-05 Alan Modra <amodra@bigpond.net.au>
5908
5909 PR 425
5910 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5911
5912 2004-10-01 Paul Brook <paul@codesourcery.com>
5913
5914 * elf32-arm.h (elf32_arm_fake_sections,
5915 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5916 functions.
5917 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5918
5919 2004-10-01 Alan Modra <amodra@bigpond.net.au>
5920
5921 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5922 need_lsda_relative.
5923 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5924 need_relative or need_lsda_relative if we are processing an
5925 offset for a reloc on a FDE initial loc or LSDA field
5926 respectively.
5927 (_bfd_elf_write_section_eh_frame): Test need_relative and
5928 need_lsda_relative in place of corresponding make_* field
5929 when deciding to use pc-relative encodings.
5930
5931 2004-09-30 Paul Brook <paul@codesourcery.com>
5932
5933 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5934 target2 relocation type.
5935
5936 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5937
5938 PR 414
5939 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5940
5941 2004-09-30 Paul Brook <paul@codesourcery.com>
5942
5943 * reloc.c: Add BFD_RELOC_ARM_SMI.
5944 * bfd-in2.h: Regenerate.
5945 * libbfd.h: Ditto.
5946
5947 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5948
5949 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5950 vma and output offset to address.
5951 * simple.c (simple_save_output_info): Only set output section
5952 and offset for debug sections, or those not already set up by
5953 the linker.
5954 (bfd_simple_get_relocated_section_contents): Update comment.
5955
5956 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5957
5958 * elf.c (IS_LOADED): Delete.
5959 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5960 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5961 to 2004-09-22.
5962
5963 2004-09-23 Alan Modra <amodra@bigpond.net.au>
5964
5965 PR gas/396
5966 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5967 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5968 redundant assignment of EM_SPARC.
5969
5970 2004-09-22 Brian Ford <ford@vss.fsi.com>
5971
5972 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5973 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5974 constants.
5975 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5976
5977 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5978
5979 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5980 (elf_backend_modify_segment_map): Don't define.
5981
5982 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5983
5984 * elf.c (IS_LOADED): Define.
5985 (assign_file_positions_for_segments): Don't round up file offset of
5986 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5987 Delete code handling link script adjustment of lma. Do the adjust
5988 in later code handling similar ajustments. Remove dead code error
5989 check. Warn if section lma would require a negative offset
5990 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5991 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5992 update voff in section loop. Change voff in segment loop to be an
5993 adjustment on top of "off". Set sec->filepos and update "off" later.
5994 Test for loadable sections consistently using IS_LOADED. Similarly,
5995 test for alloc-only sections other than .tbss consistently.
5996 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5997 Tidy PT_NOTE handling. Use %B and %A in error messages.
5998 (assign_file_positions_except_relocs): Use %B in error message.
5999
6000 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
6001
6002 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
6003 (CONFIG_STATUS_DEPENDENCIES): New.
6004 (Makefile): Removed.
6005 (config.status): Likewise.
6006 * Makefile.in: Regenerated.
6007
6008 2004-09-17 Paul Brook <paul@codesourcery.com>
6009
6010 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
6011 (bfd_elf32_arm_process_before_allocation): Update prototype.
6012 * bfd-in2.h: Regenerate.
6013 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
6014 (elf32_arm_link_hash_table_create): Set it.
6015 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
6016 (bfd_elf32_arm_set_target_relocs): New function.
6017 (arm_real_reloc_type): New function.
6018 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
6019 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
6020 (elf32_arm_gc_sweep_hook): Ditto.
6021 (elf32_arm_check_relocs): Ditto.
6022 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
6023 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
6024 R_ARM_GOT_TARGET2.
6025 (elf32_arm_got_prel): New variable.
6026 (elf32_arm_howto_from_type): New function.
6027 (elf32_arm_info_to_howto): Use it.
6028 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
6029 BFD_RELOC_ARM_TARGET2.
6030 * libbfd.h: Regenerate.
6031 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
6032
6033 2004-09-17 Alan Modra <amodra@bigpond.net.au>
6034
6035 * ecoff.c: Update u.undef.next refs.
6036 * elf64-ppc.c: Likewise.
6037 * elflink.c: Likewise.
6038 * linker.c: Likewise.
6039 * xcofflink.c: Likewise.
6040
6041 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
6042 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
6043 fields to indirect struct.
6044 * elf-m10300.c: Update u.weakdef refs.
6045 * elf32-arm.h: Likewise.
6046 * elf32-cris.c: Likewise.
6047 * elf32-frv.c: Likewise.
6048 * elf32-hppa.c: Likewise.
6049 * elf32-i370.c: Likewise.
6050 * elf32-i386.c: Likewise.
6051 * elf32-m32r.c: Likewise.
6052 * elf32-m68k.c: Likewise.
6053 * elf32-ppc.c: Likewise.
6054 * elf32-s390.c: Likewise.
6055 * elf32-sh.c: Likewise.
6056 * elf32-sparc.c: Likewise.
6057 * elf32-vax.c: Likewise.
6058 * elf32-xtensa.c: Likewise.
6059 * elf64-alpha.c: Likewise.
6060 * elf64-hppa.c: Likewise.
6061 * elf64-ppc.c: Likewise.
6062 * elf64-s390.c: Likewise.
6063 * elf64-sh64.c: Likewise.
6064 * elf64-sparc.c: Likewise.
6065 * elf64-x86-64.c: Likewise.
6066 * elfxx-ia64.c: Likewise.
6067 * elfxx-mips.c: Likewise.
6068 * elflink.c: Likewise. Also u.elf_hash_value.
6069 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
6070 indirection.
6071 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6072 (bfd_elf_gc_record_vtinherit): Alloc vtable.
6073 (bfd_elf_gc_record_vtentry): Likewise.
6074 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
6075
6076 2004-09-17 Alan Modra <amodra@bigpond.net.au>
6077
6078 * Makefile.am: Run "make dep-am".
6079 * Makefile.in: Regenerate.
6080 * bfd-in2.h: Regenerate.
6081 * po/SRC-POTFILES.in: Regenerate.
6082 * po/bfd.pot: Regenerate.
6083
6084 2004-09-16 Alan Modra <amodra@bigpond.net.au>
6085
6086 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
6087 with bitfields. Make "type" and "other" bitfields too.
6088 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
6089 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
6090 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
6091 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
6092 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
6093 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
6094 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
6095 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
6096 * elf-hppa.h: Update all uses of elf_link_hash_flags.
6097 * elf-m10300.c: Likewise.
6098 * elf.c: Likewise.
6099 * elf32-arm.h: Likewise.
6100 * elf32-cris.c: Likewise.
6101 * elf32-frv.c: Likewise.
6102 * elf32-hppa.c: Likewise.
6103 * elf32-i370.c: Likewise.
6104 * elf32-i386.c: Likewise.
6105 * elf32-m32r.c: Likewise.
6106 * elf32-m68k.c: Likewise.
6107 * elf32-ppc.c: Likewise.
6108 * elf32-s390.c: Likewise.
6109 * elf32-sh-symbian.c: Likewise.
6110 * elf32-sh.c: Likewise.
6111 * elf32-sh64.c: Likewise.
6112 * elf32-sparc.c: Likewise.
6113 * elf32-vax.c: Likewise.
6114 * elf32-xtensa.c: Likewise.
6115 * elf64-alpha.c: Likewise.
6116 * elf64-hppa.c: Likewise.
6117 * elf64-ppc.c: Likewise.
6118 * elf64-s390.c: Likewise.
6119 * elf64-sh64.c: Likewise.
6120 * elf64-sparc.c: Likewise.
6121 * elf64-x86-64.c: Likewise.
6122 * elflink.c: Likewise.
6123 * elfxx-ia64.c: Likewise.
6124 * elfxx-mips.c: Likewise.
6125 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
6126 * configure: Regenerate.
6127 * aclocal.m4: Regenerate.
6128
6129 2004-09-16 Alan Modra <amodra@bigpond.net.au>
6130
6131 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
6132 around uses of R_ARM_TARGET1.
6133 (elf32_arm_check_relocs): Likewise.
6134
6135 2004-09-13 Paul Brook <paul@codesourcery.com>
6136
6137 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
6138 prototype.
6139 * bfd-in2.h: Regenerate.
6140 * libbfd.h: Regenerate.
6141 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
6142 (elf32_arm_link_hash_table_create): Set target1_is_rel.
6143 (bfd_elf32_arm_process_before_allocation): Ditto.
6144 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
6145 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
6146 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
6147 * reloc.c: Ditto.
6148
6149 2004-09-10 Joel Brobecker <brobecker@gnat.com>
6150
6151 * hpux-core.c (thread_section_p): New function.
6152 (hpux_core_core_file_p): Fix computation of offset in call
6153 to bfd_seek. Create a ".reg" section from an arbitrary
6154 ".reg/<id>" section if none was created after having read
6155 all sections.
6156
6157 2004-09-11 Andreas Schwab <schwab@suse.de>
6158
6159 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
6160 * aclocal.m4: Rebuild.
6161 * configure: Rebuild.
6162
6163 2004-09-10 Joel Brobecker <brobecker@gnat.com>
6164
6165 * section.c (bfd_sections_find_if): Fix parameter name in
6166 comment to match code.
6167
6168 2004-09-10 Alan Modra <amodra@bigpond.net.au>
6169
6170 * elf.c (assign_file_positions_except_relocs): Assign relocs
6171 stored in a bfd section.
6172
6173 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
6174
6175 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
6176 h->gotplt_refcount to 0, not -1.
6177
6178 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
6179
6180 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6181 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
6182 symname.
6183 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
6184 handle symbol visibility here.
6185
6186 2004-09-07 Alan Modra <amodra@bigpond.net.au>
6187
6188 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
6189 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
6190 callers.
6191 (ppc_stub_name): Remove trailing "+0" on stub name.
6192 (create_linkage_sections): Create relocations for
6193 branch lookup table when --emit-relocs as well as when --shared.
6194 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
6195 relbrlt test. For --emit-stub-syms, always output a sym even when
6196 one already exists on a plt call stub. Put stub type in the stub
6197 symbol name.
6198 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
6199 test.
6200 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
6201 reloc_count in stub sections. Adjust relbrlt test.
6202 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
6203 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
6204 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
6205 for relocs against discarded symbols. Fix comments.
6206
6207 2004-09-06 Mark Mitchell <mark@codesourcery.com>
6208
6209 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
6210 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
6211 from ...
6212 (map_sections_to_segments): ... here. Use it. Assign a file
6213 position to the .dynamic section if it is not loadable, but part
6214 of the PT_DYNAMIC segment.
6215 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
6216 offsets, not VMAs, for the BPABI. Do not fill in the header in
6217 the .got.plt section for the BPABI.
6218 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
6219 PT_DYNAMIC segment.
6220 (elf_backend_want_got_plt): Define to zero for Symbian OS.
6221
6222 2004-09-06 Nick Clifton <nickc@redhat.com>
6223
6224 * elflink.c (elf_link_add_object_symbols): Set the error code to
6225 bfd_error_wrong_format when the input format does not match the
6226 output format.
6227
6228 2004-09-06 Alan Modra <amodra@bigpond.net.au>
6229
6230 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
6231 (ppc64_elf_check_directives): ..here.
6232 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
6233 before accessing ppc64_elf_tdata.
6234 (ppc64_elf_finish_dynamic_sections): And here too.
6235
6236 2004-09-04 Alan Modra <amodra@bigpond.net.au>
6237
6238 * bfd.c (_bfd_default_error_handler): Correct loop exit.
6239
6240 2004-09-03 Mark Mitchell <mark@codesourcery.com>
6241
6242 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
6243 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
6244 (bfd_elf32_littlearm_symbian_vec): Likewise.
6245 * configure: Regenerated.
6246 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
6247 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
6248 (PLT_ENTRY_SIZE): Likewise.
6249 (bfd_vma_elf32_arm_symbian_plt_entry): New
6250 variable.
6251 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
6252 and symbian_p.
6253 (create_got_section): Don't create sections when generating BPABI
6254 objects.
6255 (elf32_arm_create_dynamic_sections): Tidy.
6256 (elf32_arm_link_hash_table_create): Set plt_header_size,
6257 plt_entry_size, and symbian_p.
6258 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
6259 generating BPABI objects.
6260 (allocate_dynrelocs): Use htab->plt_header_size, not
6261 PLT_HEADER_SIZE. Do not add to .got.plt when
6262 generating BPABI objects.
6263 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
6264 * elfarm-nabi.c: Add SymbianOS target vectors.
6265 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
6266 (_bfd_elf_link_create_dynamic_sections): Likewise.
6267 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
6268 (elfNN_bed): Use it.
6269 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
6270 (bfd_elf32_littlearm_symbian_vec): Likewise.
6271 (_bfd_target_vector): Add them.
6272
6273 2004-09-03 Nick Clifton <nickc@redhat.com>
6274
6275 PR 360
6276 * coffcode.h (handle_COMDAT): Replace abort with an warning
6277 message and allow the scan to continue.
6278
6279 2004-09-02 Alan Modra <amodra@bigpond.net.au>
6280
6281 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
6282 in when reading relocs, not our sorted syms. Remove unnecessary
6283 var.
6284
6285 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6286
6287 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
6288
6289 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
6290
6291 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
6292 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
6293 replace uses of *_alias with *_noncanonical.
6294 * aclocal.m4: Rebuild with aclocal 1.4p6.
6295 * Makefile.in: Rebuild with automake 1.4p6.
6296 * doc/Makefile.in: Rebuild with automake 1.4p6.
6297 * configure.in: Autoupdate with autoupdate 2.59.
6298 * config.in: Regenerate with autoheader 2.59.
6299 * configure: Regnerate with autoconf 2.59.
6300
6301 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6302
6303 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
6304 symbol pointer arrays before modifying.
6305
6306 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6307
6308 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
6309 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
6310 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
6311 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
6312 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
6313 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
6314 Use both symbol tables on non-relocatable objects. Use a common
6315 error exit. Fix "mid" warning.
6316 * libbfd.h: Regenerate.
6317 * bfd-in2.h: Regenerate.
6318
6319 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6320
6321 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
6322 object file.
6323 (struct sfpr_def_parms): Save some space.
6324 (sfpr_define): Here too.
6325
6326 * elf64-ppc.c (compare_symbols): Put section syms first.
6327 (sym_exists_at): New function.
6328 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
6329 points only for relocatable files. Use .opd section contents
6330 otherwise. Generally clean up the code.
6331
6332 2004-08-27 Alan Modra <amodra@bigpond.net.au>
6333
6334 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
6335 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
6336 (struct sfpr_def_parms): New.
6337 (sfpr_define): New function.
6338 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
6339 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
6340 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
6341 (savefpr1_tail, restfpr1_tail): New functions.
6342 (savevr, savevr_tail, restvr, restvr_tail): New functions.
6343 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
6344 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
6345 code. Define all ABI mandated _save and _rest functions.
6346
6347 2004-08-26 Paul Brook <paul@codesourcery.com>
6348
6349 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
6350
6351 2004-08-26 Alan Modra <amodra@bigpond.net.au>
6352
6353 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
6354 TRUE or FALSE.
6355
6356 2004-08-26 Alan Modra <amodra@bigpond.net.au>
6357
6358 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
6359 that pcrel correction is applied for R_386_PC32.
6360
6361 2004-08-25 Alan Modra <amodra@bigpond.net.au>
6362
6363 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
6364 for R_386_32 and R_386_PC32 relocs against symbols defined in
6365 discarded sections.
6366
6367 2004-08-25 Dmitry Diky <diwil@spec.ru>
6368
6369 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
6370 Add new relocations.
6371 * bfd-in2.h: Regenerate.
6372 * libbfd.h: Regenerate.
6373 * elf32-msp430.c: Clean-up code.
6374 (elf_msp430_howto_table): Add new relocation entries.
6375 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
6376 (msp430_elf_relax_section): New function.
6377 (msp430_elf_relax_delete_bytes): New function.
6378 (msp430_elf_symbol_address_p): New function.
6379
6380 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6381
6382 * elf32-m32r.c (m32r_elf_relocate_section): Handle
6383 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
6384
6385 2004-08-20 Daniel Jacobowitz <dan@debian.org>
6386
6387 * elflink.c (_bfd_elf_section_already_linked): Handle
6388 SEC_LINK_DUPLICATES_SAME_CONTENTS.
6389
6390 2004-08-19 Mark Mitchell <mark@codesourcery.com>
6391
6392 * config.bfd (arm*-*-symbianelf*): New target.
6393 (arm*-*-eabi*): Likewise.
6394
6395 2004-08-19 Alan Modra <amodra@bigpond.net.au>
6396
6397 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
6398 "struct ppc_link_hash_entry *".
6399 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
6400 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
6401
6402 2004-08-19 Jakub Jelinek <jakub@redhat.com>
6403
6404 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
6405 entries (where fd_aux overlaps next entry's fd_func).
6406 Add non_overlapping argument, use it.
6407 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
6408 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6409 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
6410 as indexes into opd_sym_map/opd_adjust array.
6411 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
6412
6413 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6414
6415 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
6416 if we can look up their function descriptor in a regular file.
6417
6418 2004-08-18 Nick Clifton <nickc@redhat.com>
6419
6420 PR 324
6421 * cofflink.c (coff_link_add_symbols): Check that the comdat
6422 pointer in the coff_section_data structure has been initialised
6423 before using it.
6424
6425 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6426
6427 PR 338
6428 * elflink.c (bfd_elf_record_link_assignment): Add comment about
6429 changing bfd_link_hash_undefined to bfd_link_hash_new.
6430
6431 2004-08-17 Jakub Jelinek <jakub@redhat.com>
6432
6433 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
6434 if not yet defined.
6435 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
6436 (synthetic_opd, synthetic_relocatable): New variables.
6437 (compare_symbols, compare_relocs): New helper routines.
6438 (ppc64_elf_get_synthetic_symtab): New function.
6439 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
6440 to relsyms.
6441 * bfd-in2.h: Regenerated.
6442 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
6443 to relsyms. Return 0 if abfd is relocatable.
6444
6445 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6446
6447 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
6448
6449 2004-08-17 Nick Clifton <nickc@redhat.com>
6450
6451 * (is_arm_mapping_symbol_name): New function - return true
6452 when a symbol name matches the requirements for an ARM mapping
6453 symbol name.
6454 (arm_elf_find_function): New function based on
6455 elf_find_function in elf.c but skipping ARM mapping symbols
6456 and including thumb function symbols.
6457 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
6458 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
6459
6460 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6461
6462 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
6463 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
6464 (ppc64_elf_brtaken_reloc): Here too.
6465
6466 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6467
6468 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
6469 symbol visibility.
6470 (ppc64_elf_check_directives): Check that we have the right hash
6471 table before proceeding.
6472
6473 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6474
6475 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
6476 (adjust_opd_syms): Attach opd syms for deleted entries to one of
6477 the sections that will be discarded.
6478
6479 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6480
6481 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
6482
6483 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6484
6485 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
6486 free space available.
6487
6488 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6489
6490 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
6491 occurrences with bfd_byte * thoughout file.
6492
6493 * coff-rs6000.c (do_shared_object_padding): Warning fix.
6494 (xcoff_write_armap_big): Likewise.
6495 (xcoff_write_archive_contents_old): Likewise.
6496 (xcoff_write_archive_contents_big): Likewise.
6497
6498 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
6499
6500 2004-08-13 Nick Clifton <nickc@redhat.com>
6501
6502 * elf32-arm.h: Convert to ISO C90.
6503
6504 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6505
6506 PR 293
6507 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
6508 zero the plt field.
6509
6510 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6511
6512 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
6513 (bfd_archive_filename, bfd_get_section_ident): Delete.
6514 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
6515 bfd_archive_filename.
6516 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
6517 to warn about symbols in discarded sections. Use _bfd_error_handler.
6518 * aout-adobe.c (aout_adobe_callback): See below.
6519 * aout-cris.c (swap_ext_reloc_in): ..
6520 * coff-arm.c (find_thumb_glue, find_arm_glue,
6521 coff_arm_relocate_section, bfd_arm_process_before_allocation,
6522 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
6523 coff_arm_copy_private_bfd_data): ..
6524 * coff-i860.c (i860_reloc_processing): ..
6525 * coff-mcore.c (mcore_coff_unsupported_reloc,
6526 coff_mcore_relocate_section): ..
6527 * coff-ppc.c (coff_ppc_relocate_section): ..
6528 * coff-rs6000.c (xcoff_create_csect_from_smclas
6529 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6530 sh_swap_insns, sh_relocate_section): ..
6531 * coff-tic54x.c (tic54x_reloc_processing): ..
6532 * coff-tic80.c (coff_tic80_relocate_section): ..
6533 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
6534 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
6535 coff_slurp_symbol_table, coff_classify_symbol,
6536 coff_slurp_reloc_table): ..
6537 * coffgen.c (_bfd_coff_read_string_table): ..
6538 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
6539 _bfd_coff_generic_relocate_section): ..
6540 * cpu-arm.c (bfd_arm_merge_machines): ..
6541 * cpu-sh.c (sh_merge_bfd_arch): ..
6542 * elf-hppa.h (elf_hppa_relocate_section): ..
6543 * elf.c (bfd_elf_string_from_elf_section, setup_group,
6544 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
6545 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
6546 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
6547 * elf32-arm.h (find_thumb_glue, find_arm_glue,
6548 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
6549 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
6550 elf32_arm_relocate_section, elf32_arm_set_private_flags,
6551 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
6552 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
6553 cris_elf_merge_private_bfd_data
6554 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
6555 * elf32-gen.c (elf32_generic_link_add_symbols): ..
6556 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
6557 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
6558 elf32_hppa_relocate_section): ..
6559 * elf32-i370.c (i370_elf_merge_private_bfd_data,
6560 i370_elf_check_relocs, i370_elf_relocate_section): ..
6561 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
6562 elf_i386_relocate_section): ..
6563 * elf32-m32r.c (m32r_elf_relocate_section,
6564 m32r_elf_merge_private_bfd_data): ..
6565 * elf32-m68hc1x.c (m68hc12_add_stub,
6566 _bfd_m68hc11_elf_merge_private_bfd_data): ..
6567 * elf32-m68k.c (elf_m68k_relocate_section): ..
6568 * elf32-mcore.c (mcore_elf_unsupported_reloc,
6569 mcore_elf_relocate_section): ..
6570 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6571 ppc_elf_check_relocs, ppc_elf_relocate_section,
6572 ppc_elf_begin_write_processing): ..
6573 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6574 elf_s390_relocate_section): ..
6575 * elf32-sh-symbian.c (sh_symbian_import_as,
6576 sh_symbian_process_embedded_commands,
6577 sh_symbian_relocate_section): ..
6578 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6579 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6580 sh_elf_merge_private_data): ..
6581 * elf32-sparc.c (elf32_sparc_check_relocs,
6582 elf32_sparc_relocate_section,
6583 elf32_sparc_merge_private_bfd_data): ..
6584 * elf32-v850.c (v850_elf_check_relocs,
6585 v850_elf_merge_private_bfd_data): ..
6586 * elf32-xtensa.c (elf_xtensa_check_relocs,
6587 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6588 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6589 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6590 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6591 * elf64-gen.c (elf64_generic_link_add_symbols): ..
6592 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6593 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6594 ppc64_elf_relocate_section): ..
6595 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6596 elf_s390_relocate_section): ..
6597 * elf64-sh64.c (sh_elf64_relocate_section): ..
6598 * elf64-sparc.c (sparc64_elf_check_relocs,
6599 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6600 sparc64_elf_merge_private_bfd_data): ..
6601 * elf64-x86-64.c (elf64_x86_64_check_relocs,
6602 elf64_x86_64_relocate_section): ..
6603 * elflink.c (_bfd_elf_add_default_symbol,
6604 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6605 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6606 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6607 elf_get_linked_section_vma, elf_fixup_link_order,
6608 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6609 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6610 * elfxx-ia64.c (elfNN_ia64_relax_section,
6611 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6612 * elfxx-mips.c (mips_elf_perform_relocation,
6613 _bfd_mips_elf_check_relocs,
6614 _bfd_mips_elf_merge_private_bfd_data): ..
6615 * ieee.c (ieee_slurp_external_symbols): ..
6616 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6617 * libbfd.c (_bfd_generic_verify_endian_match): ..
6618 * linker.c (_bfd_generic_link_add_one_symbol,
6619 _bfd_generic_section_already_linked): ..
6620 * pdp11.c (translate_to_native_sym_flags): ..
6621 * pe-mips.c (coff_pe_mips_relocate_section): ..
6622 * peicode.h (pe_ILF_build_a_bfd): ..
6623 * srec.c (srec_bad_byte): ..
6624 * stabs.c (_bfd_link_section_stabs): ..
6625 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6626 Replace all uses of bfd_archive_filename and bfd_get_section_ident
6627 with corresponding %B and %A in _bfd_error_handler format string.
6628 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6629 calls to use %A and %B. Fix "against symbol .. from section" and
6630 similar error messages. Combine multiple _bfd_error_handler calls
6631 where they were separated due to bfd_archive_filename deficiencies.
6632 * bfd-in2.h: Regenerate.
6633
6634 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
6635
6636 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6637 relocation.
6638
6639 2004-08-10 Alan Modra <amodra@bigpond.net.au>
6640
6641 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6642 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6643 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6644 Add twiddled_syms.
6645 (link_hash_newfunc): Init was_undefined.
6646 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6647 Use undefweak instead.
6648 (ppc64_elf_check_directives): Fix undefs chain.
6649 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6650 references.
6651 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6652 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6653 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6654
6655 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6656
6657 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6658 error, test input_section flags rather than sec.
6659
6660 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6661
6662 * elf-bfd.h (struct elf_backend_data): Add
6663 elf_backend_archive_symbol_lookup.
6664 (_bfd_elf_archive_symbol_lookup): Declare.
6665 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6666 (elf_link_add_archive_symbols): ..extracted from here. Call the
6667 backend version.
6668 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6669 (elfNN_bed): Init new field.
6670 * elf64-ppc.c (elf_backend_check_directives): Define.
6671 (elf_backend_archive_symbol_lookup): Define.
6672 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
6673 a ppc_link_hash_entry pointer.
6674 (get_fdh): Move.
6675 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6676 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6677 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6678 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6679 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6680 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6681 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6682 descriptor symbols.
6683
6684 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6685
6686 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6687 (ppc64_elf_add_symbol_hook): Test for NULL section.
6688 (get_sym_h): Formatting.
6689 (ppc64_elf_size_stubs): Include reloc addend in value stored as
6690 stub target_value.
6691
6692 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6693 long branch stubs with code handling plt and r2off branch stubs.
6694
6695 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6696
6697 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6698 * elflink.c (elf_link_input_bfd): Formatting.
6699 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
6700 all callers.
6701 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6702 (link_hash_newfunc): Don't set it.
6703 (ppc64_elf_copy_indirect_symbol): Nor copy it.
6704 (ppc64_elf_mark_entry_syms): Delete.
6705 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
6706 sections. Use get_opd_info.
6707 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6708
6709 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6710
6711 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6712
6713 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6714 (func_desc_adjust): Don't set have_undefweak.
6715 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6716 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6717
6718 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6719 "struct ppc_link_hash_entry *". Adjust all references.
6720 (ppc64_elf_hide_symbol): Correct a comment.
6721
6722 * elf64-ppc.c (get_opd_info): New function.
6723 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
6724 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
6725 before calling get_fdh. Test fdh rather than h before dereferencing
6726 fdh. Mark removed symbols in opd_adjust.
6727 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6728 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6729 opd symbols.
6730 (ppc64_elf_output_symbol_hook): Likewise.
6731
6732 2004-08-06 Paul Brook <paul@codesourcery.com>
6733
6734 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6735 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6736 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6737 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6738 and BFD_RELOC_ARM_SBREL32.
6739 * bfd-in2.h, bbfd.h: Regenerate.
6740
6741 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6742
6743 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6744 the dynamic link symbol actually in use.
6745
6746 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
6747
6748 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6749
6750 2004-07-31 Joel Brobecker <brobecker@gnat.com>
6751 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6752
6753 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6754 SHN_MIPS_TEXT and SHN_MIPS_DATA.
6755
6756 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
6757 Nick Clifton <nickc@redhat.com>
6758
6759 PR 290
6760 * bfd.c (_bfd_default_error_handler): Make it global.
6761
6762 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6763
6764 * elf.c (assign_section_numbers): Cope gracefully with sections
6765 which have SHF_LINK_ORDER set but no sh_link set up.
6766 * elflink.c (elf_get_linked_section_vma): Likewise.
6767
6768 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6769 it to NULL.
6770
6771 * elfxx-target.h (elf_backend_link_order_error_handler): New.
6772 Set it to _bfd_default_error_handler.
6773 (elfNN_bed): Add elf_backend_link_order_error_handler.
6774
6775 * libbfd-in.h (_bfd_default_error_handler): New.
6776
6777 * libbfd.h: Regenerated.
6778
6779 2004-07-30 Jakub Jelinek <jakub@redhat.com>
6780
6781 * archures.c (bfd_mach_sparc_64bit_p): Define.
6782 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6783 * bfd-in2.h: Rebuilt.
6784
6785 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
6786
6787 Introduce SH2a support.
6788 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
6789 * archures.c (bfd_mach_sh2a_nofpu): New.
6790 * bfd-in2.h: Rebuilt.
6791 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6792 (arch_info_struct): Add sh2a_nofpu.
6793 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6794 2003-12-29 DJ Delorie <dj@redhat.com>
6795 * reloc.c: Add relocs for sh2a.
6796 * bfd-in2.h: Regenerate.
6797 * libbfd.hh: Regenerate.
6798 2003-12-01 Michael Snyder <msnyder@redhat.com>
6799 * archures.c (bfd_mach_sh2a): New.
6800 * bfd-in2.h: Rebuilt.
6801 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6802 (SH2A_NEXT): New.
6803 (arch_info_struct): Add sh2a.
6804 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6805
6806 2004-07-28 Nick Clifton <nickc@redhat.com>
6807 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6808
6809 PR 273
6810 * som.c (setup_sections): Improve estimation of space sizes in
6811 relocatable objects.
6812
6813 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
6814 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6815 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
6816 to targ_selvecs.
6817 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6818 * configure: Regenerate.
6819 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6820 case that accepts OSABI=NetBSD and OSABI=SysV.
6821 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6822 the base of .got or .data (if .got does not exist).
6823 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6824 set OSABI=NetBSD.
6825 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6826 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6827 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6828 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6829
6830 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
6831
6832 PR 161/251
6833 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6834 (elf_sec_group): Defined.
6835 (bfd_elf_match_symbols_in_sections): New prototype.
6836 (_bfd_elf_setup_group_pointers): Likewise.
6837
6838 * elf.c (bfd_elf_discard_group): Abort.
6839 (bfd_elf_set_group_contents): Also include relocation sections.
6840 Remove zero-fill for ld -r.
6841 (_bfd_elf_setup_group_pointers): New function.
6842 (elf_sort_elf_symbol): Likewise.
6843 (elf_sym_name_compare): Likewise.
6844 (bfd_elf_match_symbols_in_sections): Likewise.
6845
6846 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6847
6848 * elflink.c (match_group_member): New.
6849 (elf_link_input_bfd): Check group member for discarded section.
6850 (try_match_symbols_in_sections): New function.
6851 (already_linked): Likewise.
6852 (_bfd_elf_section_already_linked): Support mixing comdat group
6853 and linkonce section.
6854
6855 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6856 * linker.c (bfd_section_already_linked_table_traverse): New.
6857
6858 * libbfd.h: Regenerated.
6859
6860 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
6861
6862 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6863 BFD_RELOC_CRX_SWITCH32.
6864 * bfd-in2.h: Regenerate.
6865 * libbfd.h: Regenerate.
6866 * elf32-crx.c: Support relocation/relaxation of
6867 BFD_RELOC_CRX_SWITCH* types.
6868
6869 2004-07-27 Alan Modra <amodra@bigpond.net.au>
6870
6871 * elf64-ppc.c: Correct "Linker stubs" comment.
6872
6873 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
6874
6875 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6876 linked-to section.
6877 (elf_linked_to_section): New.
6878
6879 * elf.c (assign_section_numbers): Set up sh_link for
6880 SHF_LINK_ORDER.
6881
6882 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6883 to sh_link for SHT_IA_64_UNWIND sections.
6884
6885 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6886
6887 * elflink.c (elf_fixup_link_order): Add _() to error message.
6888
6889 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6890
6891 * elflink.c (elf_fixup_link_order): Issue a warning and flag
6892 an error if failed.
6893
6894 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
6895
6896 * aout-adobe.c (aout_32_section_already_linked): Defined.
6897 * aout-target.h (MY_section_already_linked): Likewise.
6898 * aout-tic30.c (MY_section_already_linked): Likewise.
6899 * binary.c (binary_section_already_linked): Likewise.
6900 * bout.c (b_out_section_already_linked): Likewise.
6901 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6902 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6903 * coffcode.h (coff_section_already_linked): Likewise.
6904 * i386msdos.c (msdos_section_already_linked): Likewise.
6905 * i386os9k.c (os9k_section_already_linked): Likewise.
6906 * ieee.c (ieee_section_already_linked): Likewise.
6907 * ihex.c (ihex_section_already_linked): Likewise.
6908 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6909 * mmo.c (mmo_section_already_linked): Likewise.
6910 * nlm-target.h (nlm_section_already_linked): Likewise.
6911 * oasys.c (oasys_section_already_linked): Likewise.
6912 * pef.c (bfd_pef_section_already_linked): Likewise.
6913 * ppcboot.c (ppcboot_section_already_linked): Likewise.
6914 * som.c (som_bfd_discard_group): Likewise.
6915 * srec.c (srec_section_already_linked): Likewise.
6916 * tekhex.c (tekhex_section_already_linked): Likewise.
6917 * versados.c (versados_section_already_linked): Likewise.
6918 * vms.c (vms_section_already_linked): Likewise.
6919 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6920 * xsym.c (bfd_sym_section_already_linked): Likewise.
6921
6922 * bfd-in.h (bfd_section_already_linked_table_init): New.
6923 (bfd_section_already_linked_table_free): Likewise.
6924
6925 * coff-rs6000.c (rs6000coff_vec): Add
6926 _bfd_generic_section_already_linked.
6927 (pmac_xcoff_vec): Likewise.
6928 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6929 (aix5coff64_vec): Likewise.
6930
6931 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6932 * elflink.c (_bfd_elf_section_already_linked): New function.
6933
6934 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6935
6936 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6937 (_bfd_generic_section_already_linked): New.
6938 (bfd_section_already_linked_hash_entry): Likewise.
6939 (bfd_section_already_linked): Likewise.
6940 (bfd_section_already_linked_table_lookup): Likewise.
6941 (bfd_section_already_linked_table_insert): Likewise.
6942
6943 * linker.c (bfd_section_already_linked): New.
6944 (_bfd_section_already_linked_table): Likewise.
6945 (bfd_section_already_linked_table_lookup): Likewise.
6946 (bfd_section_already_linked_table_insert): Likewise.
6947 (already_linked_newfunc): Likewise.
6948 (bfd_section_already_linked_table_init): Likewise.
6949 (bfd_section_already_linked_table_free): Likewise.
6950 (_bfd_generic_section_already_linked): Likewise.
6951
6952 * section.c (bfd_section): Remove comdat.
6953 (bfd_comdat_info): Moved to ...
6954 * bfd-in.h (coff_comdat_info): Here.
6955 (bfd_coff_get_comdat_section): New.
6956 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6957 * libcoff-in.h (coff_section_tdata): Add comdat.
6958 * coffcode.h (handle_COMDAT): Updated.
6959 * cofflink.c (coff_link_add_symbols): Likewise.
6960 * ecoff.c (bfd_debug_section): Likewise.
6961
6962 * targets.c (bfd_target): Add _section_already_linked.
6963 (BFD_JUMP_TABLE_LINK): Updated.
6964
6965 * bfd-in2.h: Regenerated.
6966 * libbfd.h: Likewise.
6967 * libcoff.h: Likewise.
6968
6969 2003-07-21 Paul Brook <paul@codesourcery.com>
6970
6971 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6972 elf_fixup_link_order): New functions.
6973 (bfd_elf_final_link): Call elf_fixup_link_order.
6974
6975 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
6976
6977 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6978 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6979 common definitions.
6980 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6981 _bfd_elf_symbol_refs_local_p.
6982 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6983 symbols.
6984
6985 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6986
6987 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6988 DYN_NO_NEEDED.
6989 (bfd_elf_get_dyn_lib_class): New prototype.
6990 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6991
6992 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6993 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6994 entry is needed. Issue an error if a DT_NEEDED entry is needed
6995 for a file marked DYN_NO_NEEDED.
6996 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6997 for DT_NEEDED tags.
6998
6999 * bfd-in2.h: Regenerated.
7000
7001 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7002
7003 * elflink.c (elf_section_complain_discarded): Don't complain in
7004 .PARISC.unwind.
7005
7006 2004-07-10 James E Wilson <wilson@specifixinc.com>
7007
7008 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
7009 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
7010 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
7011 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
7012 Fix callers.
7013 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
7014 bfd_put_64 to bfd_putl64.
7015 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
7016
7017 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
7018
7019 PR 240
7020 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
7021 .init/.fini sections when trying to relax it.
7022
7023 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
7024
7025 * elf.c (assign_file_positions_for_segments): Make sure the
7026 .dynamic section is the first section in the PT_DYNAMIC segment.
7027
7028 2004-07-09 Nick Clifton <nickc@redhat.com>
7029
7030 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
7031 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
7032 sh_elf_get_flags_from_mach functions so that they do not conflict
7033 when this target is built with other sh-elf targets.
7034 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
7035 suppression of this function.
7036 (sh_elf_find_flags): Likewise.
7037
7038 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
7039
7040 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
7041 (ALL_MACHINES_CFILES): Add cpu-crx.c.
7042 (BFD32_BACKENDS): Add elf32-crx.lo.
7043 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
7044 (cpu-crx.lo): New target.
7045 (elf32-crx.lo): New target.
7046 * Makefile.in: Regenerate.
7047 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
7048 (bfd_archures_list): Add bfd_crx_arch.
7049 * bfd-in2.h: Regenerate.
7050 * config.bfd: Handle crx-*-elf*, crx*.
7051 * configure.in: Handle bfd_elf32_crx_vec.
7052 * configure: Regenerate.
7053 * cpu-crx.c: New file.
7054 * elf32-crx.c: Likewise.
7055 * libbfd.h: Regenerate.
7056 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
7057 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
7058 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
7059 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
7060 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
7061 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
7062 * targets.c (bfd_elf32_crx_vec): Declare.
7063 (bfd_target_vector): Add bfd_elf32_crx_vec.
7064
7065 2004-07-06 Nick Clifton <nickc@redhat.com>
7066
7067 * config.bfd: Add sh-symbian-elf target.
7068 * configure.in: Add bfd_elf32_shl_symbian_vec.
7069 * configure: Regenerate.
7070 * elf-bfd.h (struct elf_backend_data): Add new field
7071 'check_directives'.
7072 * elflink.c (elf_link_add_object_symbols): Invoke the
7073 check_directives function, if defined.
7074 * elfxx-target.h: Provide a default, NULL definition for
7075 check_directives.
7076 * targets.c: Add bfd_elf32_shl_symbian_vec.
7077 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
7078 definition.
7079 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
7080 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
7081 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
7082 not already been defined.
7083 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
7084 * sh-symbian.c: New file. Provide functions to support the
7085 * sh-symbian-elf target.
7086 * Makefile.am: Add elf32-sh-symbian.c
7087 * Makefile.in: Regenerate.
7088
7089 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
7090
7091 * elf32-sh.c: Include ../opcodes/sh-opc.h.
7092 * Makefile.am: Ran make dep-am.
7093 * Makefile.in: Ran make dep-in.
7094
7095 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
7096
7097 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
7098 externals properly.
7099
7100 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7101
7102 * config.bfd: Add want64 to configuration target s390-*-linux*.
7103
7104 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
7105
7106 * bfd.c (bfd_get_section_ident): New.
7107
7108 * elflink.c (elf_link_read_relocs_from_section): Call
7109 bfd_get_section_ident to identify the section when reporting
7110 error.
7111 (_bfd_elf_link_output_relocs): Likewise.
7112 (elf_link_output_extsym): Likewise.
7113 (elf_link_input_bfd): Likewise.
7114 (bfd_elf_gc_record_vtinherit): Likewise.
7115
7116 * bfd-in2.h: Regenerated.
7117
7118 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
7119 Nick Clifton <nickc@redhat.com>
7120
7121 PR 204
7122 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
7123 of section symbols to mips_elf_sort_hash_table ().
7124
7125 2004-07-01 Alan Modra <amodra@bigpond.net.au>
7126
7127 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
7128 change. Comment.
7129 (elf_section_complain_discarded): New function. Handle
7130 .gcc_except_table too.
7131 (elf_link_input_bfd): Rewrite handling of relocs against symbols
7132 in discarded sections.
7133 * elf-bfd.h (elf_discarded_section): Protect macro arg.
7134
7135 2004-06-30 James E Wilson <wilson@specifixinc.com>
7136
7137 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
7138 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
7139
7140 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
7141
7142 PR 233
7143 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
7144 local references to discarded sections and report their
7145 locations.
7146
7147 2004-06-30 Alan Modra <amodra@bigpond.net.au>
7148
7149 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
7150 sec_info_type, test section name instead.
7151
7152 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
7153
7154 PR 240
7155 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
7156 in .init/.fini sections.
7157
7158 2004-06-29 Bob Wilson <bob.wilson@acm.org>
7159
7160 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
7161 bfd_get_section_limit.
7162
7163 2004-06-29 Bob Wilson <bob.wilson@acm.org>
7164
7165 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
7166 output section size.
7167
7168 2004-06-29 Alan Modra <amodra@bigpond.net.au>
7169
7170 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
7171 rawsize.
7172 (mmix_elf_perform_relocation): Adjust for above change.
7173 (mmix_elf_relocate_section): Likewise.
7174 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
7175 (mmix_elf_get_section_contents): Delete.
7176 (bfd_elf64_get_section_contents): Delete.
7177 (mmix_elf_relocate_section): Zero stub area.
7178 * linker.c (default_indirect_link_order): Alloc max of section size
7179 and rawsize.
7180 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
7181 * section.c (bfd_malloc_and_get_section): Likewise.
7182 (struct bfd_section): Update rawsize comment.
7183 * bfd-in2.h: Regenerate.
7184
7185 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
7186
7187 2004-06-29 Alan Modra <amodra@bigpond.net.au>
7188
7189 * bfd-in.h (bfd_get_section_limit): Define.
7190 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
7191 (_bfd_final_link_relocate): Use bfd_get_section_limit.
7192 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
7193 * coff-arm.c (coff_arm_relocate_section): Likewise.
7194 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
7195 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
7196 (bfd_ns32k_final_link_relocate): Likewise.
7197 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
7198 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
7199 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
7200 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
7201 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
7202 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
7203 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
7204 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7205 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
7206 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
7207 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
7208 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
7209 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
7210 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
7211 * elf32-v850.c (v850_elf_reloc): Likewise.
7212 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
7213 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
7214 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
7215 * elf64-mips.c (mips_elf64_gprel32_reloc)
7216 (mips16_gprel_reloc): Likewise.
7217 * elf64-mmix.c (mmix_elf_reloc): Likewise.
7218 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
7219 * elf64-sparc.c (init_insn_reloc): Likewise.
7220 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7221 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
7222 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
7223 (_bfd_mips_elf_generic_reloc): Likewise.
7224 * bfd-in2.h: Regenerate.
7225
7226 2004-06-28 Alan Modra <amodra@bigpond.net.au>
7227
7228 * bfd-in.h (struct stab_info): Move from stabs.c.
7229 * stabs.c (struct stab_link_includes_table): Delete.
7230 (stab_link_includes_lookup): Delete.
7231 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
7232 level of indirection from sinfo parm.
7233 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
7234 stabstr section. Adjust hash table accesses.
7235 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
7236 alloc. Adjust stab_info test.
7237 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
7238 (_bfd_coff_final_link): Adjust stab_info test.
7239 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
7240 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
7241 in place.
7242 * libcoff-in.h (struct coff_link_hash_table): Likewise.
7243 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
7244 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
7245 stabstr section. Adjust stab_info test.
7246 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
7247 (_bfd_write_stab_strings): Adjust prototypes.
7248 * libbfd.h: Regenerate.
7249 * libcoff.h: Regenerate.
7250 * bfd-in2.h: Regenerate.
7251
7252 2004-06-27 Mark Kettenis <kettenis@gnu.org>
7253
7254 From Miod Vallat <miod@online.fr>:
7255 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
7256
7257 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
7258
7259 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
7260 (struct elf32_mn10300_link_hash_entry): Remove
7261 pcrel_relocs_copied.
7262 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
7263 R_MN10300_32. Don't adjust pcrel_relocs_copied.
7264 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
7265 and gotoff relocations if the symbol doesn't bind locally. Use
7266 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
7267 relocation for PCREL32.
7268 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
7269 to test whether a symbol binds locally.
7270 (elf32_mn10300_link_hash_newfunc): Don't initialize
7271 pcrel_relocs_copied.
7272 (_bfd_mn10300_elf_discard_copies): Delete.
7273 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
7274
7275 2004-06-26 Mark Kettenis <kettenis@gnu.org>
7276
7277 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
7278
7279 2004-06-25 Joel Brobecker <brobecker@gnat.com>
7280
7281 * som.c (som_set_reloc_info): Correct small typo.
7282
7283 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
7284
7285 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
7286 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
7287 (m32r_elf_gcsweep_hook): Likewise.
7288 (m32r_elf_check_relocs): Likewise.
7289 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
7290 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
7291 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
7292 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
7293 * bfd-in2.h: Regenerated.
7294 * libbfd.h: Regenerated.
7295
7296 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
7297
7298 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
7299 relocation symbol.
7300 (elf64_x86_64_relocate_section): Issue an error for
7301 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
7302 against global symbols when building shared library.
7303
7304 2004-06-24 Alan Modra <amodra@bigpond.net.au>
7305
7306 * section.c (struct sec): Rename "_cooked_size" to "size".
7307 Rename "_raw_size" to "rawsize".
7308 (STD_SECTION): Adjust comments.
7309 (bfd_set_section_size, bfd_get_section_contents): Use size.
7310 (bfd_malloc_and_get_section): New function.
7311 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
7312 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
7313 Correctly free reloc and contents memory.
7314 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
7315 and fake CIE now that we can shink section size to zero.
7316 (_bfd_elf_write_section_eh_frame): Likewise..
7317 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
7318 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
7319 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
7320 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
7321 unneeded indirection.
7322 * elf.c (_bfd_elf_section_offset): .. and update call.
7323 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
7324 * libbfd.h: Regenerate.
7325 * bfd-in2.h: Regenerate.
7326
7327 Replace occurrences of "_raw_size" and "_cooked_size" in most places
7328 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
7329 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
7330 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
7331 Similarly use "rawsize", if non-zero, in reloc functions to validate
7332 reloc addresses. Use new bfd_malloc_and_get_section in most places
7333 where bfd_get_section_contents was called. Expand all occurrences of
7334 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
7335 grok_prstatus and similar functions to "size".
7336 * aix386-core.c (aix386_core_file_p): ..
7337 * aix5ppc-core.c (xcoff64_core_p): ..
7338 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
7339 aout_adobe_set_section_contents): ..
7340 * aout-target.h (callback): ..
7341 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
7342 MY_bfd_final_link): ..
7343 * aoutf1.h (sunos4_core_file_p): ..
7344 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7345 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
7346 final_link, aout_link_input_section): ..
7347 * binary.c (binary_object_p, binary_canonicalize_symtab,
7348 binary_set_section_contents): ..
7349 * bout.c (b_out_callback, b_out_write_object_contents,
7350 b_out_set_section_contents, b_out_bfd_relax_section,
7351 b_out_bfd_get_relocated_section_contents): ..
7352 * cisco-core.c (cisco_core_file_validate): ..
7353 * coff-alpha.c (alpha_ecoff_object_p,
7354 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
7355 * coff-arm.c (coff_arm_relocate_section,
7356 bfd_arm_allocate_interworking_sections): ..
7357 * coff-h8300.c (h8300_reloc16_extra_cases,
7358 h8300_bfd_link_add_symbols): ..
7359 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
7360 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
7361 ppc_bfd_coff_final_link): ..
7362 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
7363 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
7364 sh_align_loads, sh_coff_get_relocated_section_contents): ..
7365 * coff64-rs6000.c (xcoff64_write_object_contents,
7366 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
7367 * coffcode.h (coff_compute_section_file_positions,
7368 coff_write_object_contents): ..
7369 * coffgen.c (make_a_section_from_file, coff_write_symbols,
7370 coff_section_symbol, build_debug_section): ..
7371 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
7372 process_embedded_commands, _bfd_coff_link_input_bfd,
7373 _bfd_coff_write_global_sym): ..
7374 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
7375 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
7376 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
7377 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
7378 _bfd_dwarf2_find_nearest_line): ..
7379 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
7380 ecoff_compute_section_file_positions,
7381 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
7382 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
7383 _bfd_elf_discard_section_eh_frame_hdr,
7384 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
7385 _bfd_elf_write_section_eh_frame,
7386 _bfd_elf_write_section_eh_frame_hdr): ..
7387 * elf-hppa.h (elf_hppa_sort_unwind): ..
7388 * elf-m10200.c (mn10200_elf_relax_section,
7389 mn10200_elf_relax_delete_bytes,
7390 mn10200_elf_get_relocated_section_contents): ..
7391 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
7392 mn10300_elf_check_relocs, mn10300_elf_relax_section,
7393 mn10300_elf_relax_delete_bytes,
7394 mn10300_elf_get_relocated_section_contents,
7395 _bfd_mn10300_elf_adjust_dynamic_symbol,
7396 _bfd_mn10300_elf_discard_copies,
7397 _bfd_mn10300_elf_size_dynamic_sections,
7398 _bfd_mn10300_elf_finish_dynamic_sections): ..
7399 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
7400 _bfd_elf_make_section_from_phdr, elf_fake_sections,
7401 bfd_elf_set_group_contents, map_sections_to_segments,
7402 elf_sort_sections, assign_file_positions_for_segments,
7403 SECTION_SIZE, copy_private_bfd_data,
7404 _bfd_elf_get_dynamic_reloc_upper_bound,
7405 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
7406 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
7407 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
7408 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
7409 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
7410 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
7411 bfd_elf32_arm_process_before_allocation,
7412 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
7413 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
7414 elf32_arm_write_section): ..
7415 * elf32-cris.c (cris_elf_grok_prstatus,
7416 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
7417 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
7418 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
7419 elf_cris_discard_excess_dso_dynamics,
7420 elf_cris_discard_excess_program_dynamics): ..
7421 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
7422 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
7423 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
7424 _frv_create_got_section, _frvfdpic_assign_plt_entries,
7425 elf32_frvfdpic_size_dynamic_sections,
7426 elf32_frvfdpic_modify_segment_map,
7427 elf32_frvfdpic_finish_dynamic_sections): ..
7428 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
7429 elf32_h8_get_relocated_section_contents): ..
7430 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
7431 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
7432 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
7433 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
7434 elf32_hppa_finish_dynamic_sections): ..
7435 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
7436 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
7437 i370_elf_finish_dynamic_sections): ..
7438 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
7439 allocate_dynrelocs, elf_i386_size_dynamic_sections,
7440 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
7441 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
7442 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
7443 * elf32-ip2k.c (ip2k_is_switch_table_128,
7444 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
7445 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
7446 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
7447 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
7448 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
7449 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
7450 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
7451 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
7452 m32r_elf_get_relocated_section_contents): ..
7453 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
7454 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
7455 m68hc11_elf_relax_delete_bytes): ..
7456 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
7457 m68hc12_elf_size_one_stub): ..
7458 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
7459 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
7460 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
7461 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
7462 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
7463 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7464 elf32_mips_grok_prstatus): ..
7465 * elf32-or32.c (or32_elf_consth_reloc): ..
7466 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
7467 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
7468 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
7469 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
7470 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
7471 ppc_elf_final_write_processing): ..
7472 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7473 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7474 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
7475 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
7476 sh_elf_relax_delete_bytes, sh_elf_align_loads,
7477 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
7478 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
7479 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
7480 * elf32-sh64-com.c (sh64_address_in_cranges,
7481 sh64_get_contents_type): ..
7482 * elf32-sh64.c (sh64_find_section_for_address,
7483 sh64_elf_final_write_processing): ..
7484 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
7485 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
7486 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
7487 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
7488 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
7489 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
7490 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
7491 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
7492 elf_vax_finish_dynamic_sections): ..
7493 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
7494 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
7495 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
7496 xstormy16_elf_finish_dynamic_sections): ..
7497 * elf32-xtensa.c (xtensa_read_table_entries,
7498 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
7499 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
7500 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
7501 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
7502 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
7503 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
7504 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
7505 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
7506 xtensa_callback_required_dependence): ..
7507 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
7508 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
7509 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
7510 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
7511 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
7512 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
7513 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
7514 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
7515 * elf64-hppa.c (allocate_dynrel_entries,
7516 elf64_hppa_size_dynamic_sections,
7517 elf64_hppa_finish_dynamic_sections): ..
7518 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
7519 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
7520 elf64_mips_grok_prstatus): ..
7521 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
7522 mmix_elf_relocate_section, mmix_elf_final_link,
7523 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
7524 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
7525 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
7526 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
7527 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
7528 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
7529 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
7530 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
7531 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
7532 ppc64_elf_finish_dynamic_sections): ..
7533 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7534 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7535 elf_s390_finish_dynamic_sections): ..
7536 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
7537 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
7538 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
7539 sh64_elf64_finish_dynamic_sections): ..
7540 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
7541 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
7542 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
7543 sparc64_elf_finish_dynamic_symbol,
7544 sparc64_elf_finish_dynamic_sections): ..
7545 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
7546 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
7547 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
7548 elf64_x86_64_finish_dynamic_sections): ..
7549 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
7550 * elfcode.h (elf_slurp_reloc_table): ..
7551 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
7552 elf_finalize_dynstr, elf_link_add_object_symbols,
7553 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
7554 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
7555 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7556 elf32_mips_grok_prstatus): ..
7557 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
7558 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
7559 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
7560 elfNN_ia64_finish_dynamic_sections): ..
7561 * elfxx-mips.c (mips_elf_create_procedure_table,
7562 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
7563 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
7564 mips_elf_global_got_index, mips_elf_multi_got,
7565 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7566 mips_elf_allocate_dynamic_relocations,
7567 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7568 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7569 _bfd_mips_elf_always_size_sections,
7570 _bfd_mips_elf_size_dynamic_sections,
7571 _bfd_mips_elf_finish_dynamic_symbol,
7572 _bfd_mips_elf_finish_dynamic_sections,
7573 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7574 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7575 _bfd_elf_mips_get_relocated_section_contents,
7576 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7577 * hp300hpux.c (callback): ..
7578 * hppabsd-core.c (make_bfd_asection): ..
7579 * hpux-core.c (make_bfd_asection): ..
7580 * i386linux.c (linux_link_create_dynamic_sections,
7581 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7582 * i386msdos.c (msdos_write_object_contents): ..
7583 * i386os9k.c (os9k_callback, os9k_write_object_contents,
7584 os9k_set_section_contents): ..
7585 * ieee.c (parse_expression, ieee_slurp_external_symbols,
7586 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7587 ieee_write_section_part, do_with_relocs, do_as_repeat,
7588 do_without_relocs, ieee_write_debug_part, init_for_output,
7589 ieee_set_section_contents): ..
7590 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7591 * irix-core.c (do_sections, make_bfd_asection): ..
7592 * libaout.h (aout_section_merge_with_text_p): ..
7593 * libbfd.c (_bfd_generic_get_section_contents,
7594 _bfd_generic_get_section_contents_in_window): ..
7595 * linker.c (default_indirect_link_order): ..
7596 * lynx-core.c (make_bfd_asection): ..
7597 * m68klinux.c (linux_link_create_dynamic_sections,
7598 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7599 * mach-o.c (bfd_mach_o_make_bfd_section,
7600 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7601 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7602 bfd_mach_o_scan_read_segment): ..
7603 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7604 _bfd_merge_sections): ..
7605 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7606 mmo_map_set_sizes, mmo_canonicalize_symtab,
7607 mmo_internal_write_section, mmo_write_object_contents): ..
7608 * netbsd-core.c (netbsd_core_file_p): ..
7609 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7610 nlm_alpha_set_public_section): ..
7611 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7612 * nlm32-sparc.c (nlm_sparc_write_import): ..
7613 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7614 nlm_compute_section_file_positions): ..
7615 * oasys.c (oasys_object_p, oasys_slurp_section_data,
7616 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7617 * opncls.c (get_debug_link_info): ..
7618 * osf-core.c (make_bfd_asection): ..
7619 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7620 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7621 final_link, aout_link_input_section): ..
7622 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7623 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7624 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7625 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7626 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7627 * ptrace-core.c (ptrace_unix_core_file_p): ..
7628 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7629 _bfd_final_link_relocate, bfd_generic_relax_section,
7630 bfd_generic_get_relocated_section_contents): ..
7631 * reloc16.c (bfd_coff_reloc16_relax_section,
7632 bfd_coff_reloc16_get_relocated_section_c): ..
7633 * riscix.c (riscix_some_aout_object_p): ..
7634 * rs6000-core.c (read_hdr, make_bfd_asection): ..
7635 * sco5-core.c (make_bfd_asection): ..
7636 * simple.c (bfd_simple_get_relocated_section_contents): ..
7637 * som.c (som_object_setup, setup_sections, som_prep_headers,
7638 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7639 som_set_reloc_info, som_get_section_contents,
7640 som_bfd_link_split_section): ..
7641 * sparclinux.c (linux_link_create_dynamic_sections,
7642 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7643 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7644 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7645 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7646 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7647 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7648 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7649 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7650 sunos_finish_dynamic_link): ..
7651 * syms.c (_bfd_stab_section_find_nearest_line): ..
7652 * tekhex.c (first_phase, tekhex_set_section_contents,
7653 tekhex_write_object_contents): ..
7654 * trad-core.c (trad_unix_core_file_p): ..
7655 * versados.c (process_esd, process_otr, process_otr): ..
7656 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7657 * vms-misc.c (add_new_contents): ..
7658 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7659 * vms.c (vms_set_section_contents): ..
7660 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7661 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7662 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7663 * xsym.c (bfd_sym_scan): .. See above.
7664
7665 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
7666
7667 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7668 calling _bfd_merged_section_offset only for section symbols.
7669
7670 2004-06-22 Alan Modra <amodra@bigpond.net.au>
7671
7672 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7673 for handling SEC_MERGE symbols in relax_section.
7674
7675 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
7676
7677 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
7678 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7679 linked together. Mark the result as h8300sx code.
7680
7681 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
7682
7683 * elf-bfd.h (struct elf_backend_data): Added
7684 elf_backend_omit_section_dynsym.
7685 (_bfd_elf_link_omit_section_dynsym): Declare.
7686 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7687 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7688 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7689 (_bfd_elf_link_renumber_dynsyms): ... this function.
7690 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7691 _bfd_elf_link_omit_section_dynsym).
7692 (elfNN_bed): Added elf_backend_omit_section_dynsym.
7693
7694 2004-06-21 Nick Clifton <nickc@redhat.com>
7695
7696 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7697 flags.
7698
7699 2004-06-17 Jerome Guitton <guitton@gnat.com>
7700
7701 * bfd-in.h (bfd_cache_close_all): New function declaration.
7702 * bfd-in2.h: Regenerate.
7703 * cache.c (bfd_cache_close_all): New function definition.
7704
7705 2004-06-16 Mark Kettenis <kettenis@gnu.org>
7706
7707 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7708 4.10 and beyond.
7709 * configure: Regenerate.
7710
7711 2004-06-16 Daniel Jacobowitz <dan@debian.org>
7712
7713 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7714 the pre-existing section.
7715
7716 2004-06-15 Alan Modra <amodra@bigpond.net.au>
7717
7718 * section.c (struct sec): Remove usused flags. Reorganize a little.
7719 (bfd_get_section_size_before_reloc): Delete.
7720 (bfd_get_section_size_after_reloc): Delete.
7721 (STD_SECTION): Update.
7722 (bfd_get_section_size_now): Delete.
7723 (bfd_set_section_contents): Don't referece reloc_done.
7724 (bfd_get_section_contents): Remove reloc_done comment.
7725 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7726 reloc_done.
7727 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7728 * ecoff.c (bfd_debug_section): Update initializer.
7729 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7730 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7731 * bfd-in.h (bfd_section_size): Expand.
7732 (bfd_get_section_size): New macro.
7733 * bfd-in2.h: Regenerate.
7734 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7735 bfd_get_section_size_before_reloc with bfd_get_section_size.
7736 * coffcode.h (coff_write_object_contents): Likewise.
7737 * coffgen.c (build_debug_section): Likewise.
7738 * dwarf1.c (parse_line_table): Likewise.
7739 (_bfd_dwarf1_find_nearest_line): Likewise.
7740 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7741 * i386msdos.c (msdos_write_object_contents): Likewise.
7742 * pdp11.c (squirt_out_relocs): Likewise.
7743 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7744 * elf64-mmix.c (mmix_elf_final_link): Update comment.
7745
7746 2004-06-14 Chris Demetriou <cgd@broadcom.com>
7747
7748 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7749 removal) with updated comment.
7750 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7751 BFD_RELOC_32_PCREL.
7752 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7753 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7754
7755 2004-06-12 Alan Modra <amodra@bigpond.net.au>
7756
7757 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7758 overflow on branches to undefweaks.
7759
7760 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7761
7762 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7763 as ecoff_section_data() does not return a valid lvalue.
7764
7765 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
7766
7767 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7768 (elf_link_add_object_symbols): Likewise.
7769
7770 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7771 (elf_backend_reloc_type_class): New.
7772
7773 2004-06-08 Mark Kettenis <kettenis@gnu.org>
7774
7775 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7776 netbsd-core.lo.
7777 * configure: Regenerate.
7778
7779 2004-06-07 Daniel Jacobowitz <dan@debian.org>
7780
7781 From: Albert Chin-A-Young <china@thewrittenword.com>
7782 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7783 to unsigned int.
7784
7785 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
7786
7787 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7788 change.
7789
7790 2004-05-28 DJ Delorie <dj@redhat.com>
7791
7792 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7793 for linking, but otherwise adjust reloc for merged sections.
7794
7795 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
7796
7797 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7798 _bfd_merged_section_offset for local symbols.
7799
7800 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
7801
7802 * Makefile.am: Regenerate dependencies.
7803 * Makefile.in: Regenerate.
7804 * archures.c: Add bfd_mach_sh3_nommu .
7805 * bfd-in2.h: Regenerate.
7806 * cpu-sh.c: Add sh3-nommu architecture.
7807 (bfd_to_arch_table): Create new table.
7808 (sh_get_arch_from_bfd_mach): Create new function.
7809 (sh_get_arch_up_from_bfd_mach): Create new function.
7810 (sh_merge_bfd_arch): Create new function.
7811 * elf32-sh.c (sh_ef_bfd_table): Add table.
7812 (sh_elf_check_relocs): Replace switch statement with
7813 use of sh_ef_bfd_table .
7814 (sh_elf_get_flags_from_mach): Add new function.
7815 (sh_find_elf_flags): Likewise.
7816 (sh_elf_copy_private_data): Replace most of non-elf contents
7817 with a call to sh_merge_bfd_arch() .
7818
7819 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
7820
7821 * Makefile.am (bfdver.h): Use explicit filename, not $< .
7822 * Makefile.in: Regenerate.
7823
7824 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
7825
7826 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7827 custom calling conventions for dynamic symbols.
7828 (mn10300_elf_relax_section): Avoid relaxing a function as a local
7829 symbol if it's an alias to a global one.
7830
7831 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
7832
7833 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7834 change.
7835
7836 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
7837
7838 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7839 loop over hashes.
7840
7841 2004-05-26 Alan Modra <amodra@bigpond.net.au>
7842
7843 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7844 for SHT_GROUP sections.
7845
7846 2004-05-25 Alan Modra <amodra@bigpond.net.au>
7847
7848 * elflink.c (elf_link_add_object_symbols): Don't set up merge
7849 section data here..
7850 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7851 * merge.c: Formatting. Remove unnecessary casts. Expand
7852 bfd_get_section_alignment macro.
7853 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
7854 use throughout file.
7855 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
7856 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
7857 section name to determine sinfo group, instead test output section
7858 and alignment.
7859 (_bfd_merge_sections): Add struct bfd_link_info param. Call
7860 _bfd_strip_section_from_output rather than just twiddling flags.
7861 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7862 (_bfd_merge_sections): Update prototype.
7863 * libbfd.h: Regenerate.
7864
7865 2004-05-24 Mark Kettenis <kettenis@gnu.org>
7866
7867 * netbsd-core.c: Correctly indent section that sets architecture
7868 from machine ID.
7869
7870 From Miod Vallat <miod@online.fr>:
7871 * m88kopenbsd.c: New file.
7872 * targets.c (m88k_openbsd_vec): New.
7873 * config.bfd: Add m88k-*-openbsd*.
7874 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7875 (m88kopenbsd_vec): New.
7876 * configure: Regenerate.
7877 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7878 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7879 Run "make dep-am".
7880 * Makefile.in: Regenerate.
7881 * po/SRC-POTFILES.in: Regenerate.
7882
7883 2004-05-24 Nick Clifton <nickc@redhat.com>
7884
7885 * hash.c: Remove bogus node "Changing the default Hash Table Size"
7886 introduced by hash table size patch.
7887
7888 2004-05-22 Ben Elliston <bje@au.ibm.com>
7889
7890 * configure.in (is_release): Remove.
7891 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7892 (AC_OUTPUT): Don't output bfdver.h from version.h.
7893 * configure: Regenerate.
7894 * Makefile.am (RELEASE): New variable.
7895 (bfdver.h): New target.
7896 * Makefile.in: Regenerate.
7897 * doc/Makefile.in: Likewise.
7898
7899 2004-05-22 Ben Elliston <bje@au.ibm.com>
7900
7901 * Makefile.am (config.status): Don't depend on version.h.
7902 * Makefile.in: Regenerate.
7903
7904 2004-05-22 Alan Modra <amodra@bigpond.net.au>
7905
7906 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7907 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7908 * libbfd.h: Regenerate.
7909 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7910 (_bfd_elf_rel_local_sym): Likewise.
7911 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7912 (elf_link_input_bfd): Likewise.
7913 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7914 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7915 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7916 (elfNN_ia64_relocate_section): Likewise.
7917
7918 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
7919
7920 * hash.c (bfd_default_hash_table_size): New variable.
7921 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7922 (bfd_hash_set_default_size): New function. Set the default size
7923 to a selected prime number close to the argument. Document new
7924 function.
7925 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7926 * bfd-in2.h: Regenerate.
7927 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7928 * Makefile.in: Regenerate.
7929
7930 2004-05-21 Mark Kettenis <kettenis@gnu.org>
7931
7932 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7933 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7934 arm, m68k, m88k and hppa core files.
7935
7936 2004-05-21 Nick Clifton <nickc@redhat.com>
7937
7938 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7939 (bfd_bwrite): Likewise.
7940 (bfd_tell): Likewise.
7941 (bfd_flush): Likewise.
7942 (bfd_stat): Likewise.
7943 (bfd_seek): Likewise.
7944 (bfd_get_mtime): Likewise.
7945 (bfd_get_size): Likewise.
7946
7947 2004-05-19 Ben Elliston <bje@au.ibm.com>
7948
7949 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7950
7951 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7952
7953 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7954 (bfd_generic_openr_next_archived_file): Likewise.
7955
7956 2004-05-17 Bob Wilson <bob.wilson@acm.org>
7957
7958 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7959 section names by inserting a new substring after .gnu.linkonce, except
7960 for .gnu.linkonce.t.* where the "t." is replaced.
7961
7962 2004-05-17 Adam Nemet <anemet@lnxw.com>
7963
7964 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7965 (m68-*-lynxos* case): Likewise.
7966 (powerpc-*-lyxnos* case): New case.
7967 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7968
7969 2004-05-17 David Heine <dlheine@tensilica.com>
7970
7971 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7972 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7973 * bfd.c (bfd_copy_private_header_data): Define.
7974 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7975 interface.
7976 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7977 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7978 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7979 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7980 segments by calling copy_private_bfd_data.
7981 (_bfd_elf_copy_private_header_data): Define.
7982 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7983 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7984 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7985 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7986 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7987 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7988 * som.c (som_bfd_copy_private_header_data): Define.
7989 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7990 * vms.c (vms_bfd_copy_private_header_data): Define.
7991 * bfd-in2.h: Regenerate.
7992 * libbfd.h: Regenerate.
7993
7994 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7995
7996 * elfxx-mips.c (MINUS_TWO): Define.
7997 (mips_elf_higher, mips_elf_highest,
7998 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7999 some bfd_vma values.
8000 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
8001
8002 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8003
8004 * som.c (log2): Rename to exact_log2. Adjust all callers.
8005
8006 2004-05-13 Paul Brook <paul@codesourcery.com>
8007
8008 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
8009 dwarf3 format CIE entries. Remove comment about the size of the
8010 ra_column field. It is now correctly deduced.
8011
8012 2004-05-13 Joel Sherrill <joel@oarcorp.com>
8013
8014 * config.bfd (or32-*-rtems*): Switch to elf.
8015
8016 2004-05-13 Nick Clifton <nickc@redhat.com>
8017
8018 * po/fr.po: Updated French translation.
8019
8020 2004-05-11 Jakub Jelinek <jakub@redhat.com>
8021
8022 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8023 into .dynsym if elf_section_data (sec)->dynindx <= 0.
8024 Adjust counting of last_local.
8025 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
8026 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
8027 created by the linker nor !SHF_ALLOC.
8028
8029 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
8030 DT_PLTGOT to the start of the .got.plt section instead of the
8031 .got output section. Set sh_entsize for .got section in addition
8032 to .got.plt.
8033 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
8034 is at sgot->output_section->vma.
8035 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
8036 DT_PLTGOT to the start of the .got.plt section instead of the
8037 .got output section.
8038 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
8039 is at sgot->output_section->vma. Set sh_entsize for .got section
8040 in addition to .got.plt.
8041 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
8042 (bfd_section_from_phdr): Likewise.
8043 (map_sections_to_segments): Likewise.
8044 (assign_file_positions_for_segments): Likewise.
8045 (get_program_header_size): Likewise.
8046 * elflink.c (bfd_elf_size_dynamic_sections): Set
8047 elf_tdata (output_bfd)->relro from info->relro.
8048 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
8049
8050 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
8051
8052 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
8053 a zero symndx for which we hadn't accounted a dynamic relocation.
8054 (_frvfdpic_add_rofixup): Likewise.
8055
8056 2004-05-07 Brian Ford <ford@vss.fsi.com>
8057 DJ Delorie <dj@redhat.com>
8058
8059 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
8060 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
8061 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
8062 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
8063
8064 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
8065
8066 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
8067 immediately if there's no link info.
8068 (elf32_frvfdpic_copy_private_bfd_data): New.
8069 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
8070
8071 2004-05-06 Zack Weinberg <zack@codesourcery.com>
8072
8073 * dwarf2.c (add_line_info): Also set info->filename to NULL if
8074 filename argument is null; do not call strlen on a null pointer.
8075
8076 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
8077
8078 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
8079 special case.
8080
8081 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
8082
8083 * configure.in (bfd_elf32_frvfdpic_vec): New.
8084 * configure: Rebuilt.
8085 * targets.c (bfd_elf32_frvfdpic_vec): New.
8086 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
8087 on the latter.
8088 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
8089 frvfdpic instead of frv. Rearrange elf-target macros such that
8090 the FDPIC-specific ones are only defined for this new target
8091 vector.
8092 (bfd_elf32_frvfdpic_vec): Declare.
8093 (IS_FDPIC): New.
8094 (elf32_frv_relocate_section): Use it to enable segment checking
8095 and to control rofixup emission. Add output section vma to
8096 applied relocation in non-LOAD non-ALLOC sections. Use
8097 _bfd_error_handler for errors.
8098 (_frv_create_got_section): Create .rel.got and .rofixup only in
8099 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
8100 linker script.
8101 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
8102 (elf32_frvfdpic_modify_segment_map): Likewise.
8103 (elf32_frv_finish_dynamic_sections): New, do-nothing.
8104 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
8105 error message if we miscompute the rofixup size.
8106 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
8107 (frvfdpic_elf_encode_eh_address): Likewise.
8108 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
8109 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
8110 relocs. Reject unknown relocation types.
8111 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
8112 (frv_elf_merge_private_bfd_data): Likewise.
8113 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
8114 0x4000 for newly-added elf32-frvfdpic.
8115
8116 2004-05-05 Nick Clifton <nickc@redhat.com>
8117
8118 PR/136
8119 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
8120 returning NULL as most users of this function do not check its
8121 return value.
8122 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
8123 of bfd_cache_lookup().
8124 * sco5-core.c (sco5_core_file_p): Likewise.
8125 * trad-core.c (trad_unix_core_file_p): Likewise.
8126
8127 2004-05-05 Nick Clifton <nickc@redhat.com>
8128
8129 * cache.c (bfd_cache_lookup): Improve formatting.
8130 * archive.c: Fix formatting.
8131
8132 2004-05-05 Peter Barada <peter@the-baradas.com>
8133
8134 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
8135 * cpu-m68k.c(bfd_m68k_arch): Likewise.
8136 * bfd-in2.h(bfd_architecture): Regenerate.
8137
8138 2004-05-03 Alan Modra <amodra@bigpond.net.au>
8139
8140 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
8141 SEC_MERGE sections.
8142 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
8143 those against discarded link-once and SEC_MERGE section symbols.
8144
8145 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
8146
8147 * section.c (bfd_get_section_by_name_if): New.
8148 * bfd-in2.h: Regenerated.
8149
8150 2004-05-02 Alan Modra <amodra@bigpond.net.au>
8151
8152 * som.c (som_bfd_is_group_section): Define.
8153
8154 2004-05-01 Alan Modra <amodra@bigpond.net.au>
8155
8156 * section.c (bfd_make_section_anyway): Copy the whole
8157 bfd_hash_entry, not just "next" from existing entry.
8158
8159 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
8160
8161 * elf.c (bfd_section_from_shdr): Maintain the section order in
8162 a section group.
8163 (special_sections): Add ".note.GNU-stack".
8164 (elf_fake_sections): Handle section group for relocatable
8165 link..
8166
8167 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
8168
8169 * section.c (bfd_sections_find_if): New.
8170 * bfd-in2.h: Regenerated.
8171
8172 2004-04-30 Alan Modra <amodra@bigpond.net.au>
8173
8174 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
8175
8176 * elf-bfd.h (bfd_elf_is_group_section): Declare.
8177 * elf.c (bfd_elf_is_group_section): New function.
8178 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
8179 * section.c (bfd_generic_is_group_section): New function.
8180 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
8181 (BFD_JUMP_TABLE_LINK): Adjust.
8182 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
8183 * aout-target.h (MY_bfd_is_group_section): Define.
8184 * aout-tic30.c (MY_bfd_is_group_section): Define.
8185 * bfd.c (bfd_is_group_section): Define.
8186 * binary.c (binary_bfd_is_group_section): Define.
8187 * bout.c (b_out_bfd_is_group_section): Define.
8188 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
8189 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
8190 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
8191 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
8192 * coffcode.h (coff_bfd_is_group_section): Define.
8193 * i386msdos.c (msdos_bfd_is_group_section): Define.
8194 * i386os9k.c (os9k_bfd_is_group_section): Define.
8195 * ieee.c (ieee_bfd_is_group_section): Define.
8196 * ihex.c (ihex_bfd_is_group_section): Define.
8197 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
8198 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
8199 * mmo.c (mmo_bfd_is_group_section): Define.
8200 * nlm-target.h (nlm_bfd_is_group_section): Define.
8201 * oasys.c (oasys_bfd_is_group_section): Define.
8202 * pef.c (bfd_pef_bfd_is_group_section): Define.
8203 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
8204 * srec.c (srec_bfd_is_group_section): Define.
8205 * tekhex.c (tekhex_bfd_is_group_section): Define.
8206 * versados.c (versados_bfd_is_group_section): Define.
8207 * vms.c (vms_bfd_is_group_section): Define.
8208 * xsym.c (bfd_sym_bfd_is_group_section): Define.
8209 * bfd-in2.h: Regenerate.
8210 * libbfd.h: Regenerate.
8211
8212 2004-04-30 Alan Modra <amodra@bigpond.net.au>
8213
8214 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
8215
8216 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
8217
8218 * configure.in: Update version to 2.15.91.
8219 * configure: Regenerate.
8220
8221 2004-04-29 Brian Ford <ford@vss.fsi.com>
8222
8223 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
8224 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
8225 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
8226 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
8227 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
8228 .gnu.linkonce.wi. sections.
8229 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
8230 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
8231 .gnu.linkonce.wi..
8232 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
8233 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8234
8235 2004-04-28 Chris Demetriou <cgd@broadcom.com>
8236
8237 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
8238 * bfd-in2.h: Regenerate.
8239 * libbfd.h: Likewise.
8240
8241 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8242
8243 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
8244 dup_common fields.
8245 (setup_sections): Use som_subspace_dictionary_record struct instead
8246 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
8247 is_comdat, is_common or dup_common.
8248 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
8249 is_comdat, is_common and dup_common in section subspace_dict from
8250 copy_data.
8251 (som_begin_writing): Use som_subspace_dictionary_record struct.
8252 (som_finish_writing): Likewise.
8253 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
8254 is_common and dup_common flags in info for symbol. Add comment
8255 regarding linker support for these fields. Slightly reorganize
8256 function.
8257 (som_build_and_write_symbol_table): Set is_comdat, is_common and
8258 dup_common fields in symbol table from symbol info.
8259 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
8260 arguments. Set corresponding fields in copy_data. Change all callers.
8261 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
8262 symbol table.
8263 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
8264 * som.h (som_subspace_dictionary_record): Define.
8265 (som_copyable_section_data_struct): Add is_comdat, is_common and
8266 dup_common fields.
8267 (som_section_data_struct): Use som_subspace_dictionary_record struct
8268 instead of subspace_dictionary_record.
8269 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
8270
8271 2004-04-27 Bob Wilson <bob.wilson@acm.org>
8272
8273 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
8274 if set. Check reloc_done flag before applying relocations. Use
8275 output addresses, both when applying relocations and when comparing
8276 against the specified section.
8277 (elf_xtensa_relocate_section): Use output address to check if dynamic
8278 reloc is in a literal pool. Set section's reloc_done flag.
8279
8280 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
8281
8282 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
8283 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
8284 section.
8285 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
8286 section.
8287
8288 2004-04-27 Alan Modra <amodra@bigpond.net.au>
8289
8290 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
8291 structure field removed in 2004-04-24 patch.
8292 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
8293
8294 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
8295 Constify hdr arg.
8296 * elf32-arm.h (elf32_arm_section_flags): Likewise.
8297 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
8298 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
8299 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
8300 field before calling elf_backend_section_flags.
8301
8302 2004-04-24 Chris Demetriou <cgd@broadcom.com>
8303
8304 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
8305 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
8306 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
8307 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
8308 and BFD_RELOC_32_PCREL.
8309 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
8310 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
8311 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8312 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
8313 (mips_elf_next_relocation): Move comment about matching HI/LO
8314 relocations to...
8315 (_bfd_mips_elf_relocate_section): Here. Remove handling for
8316 R_MIPS_GNU_REL_HI16.
8317
8318 2004-04-23 Chris Demetriou <cgd@broadcom.com>
8319
8320 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
8321 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
8322 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
8323 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
8324 and update comments to reflect current usage.
8325 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
8326 and MIPS_R_SWITCH, as well as several empty entries. Update comment
8327 for MIPS_R_PCREL16.
8328 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
8329 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
8330 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8331 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
8332 type number to be MIPS_R_PCREL16.
8333 (mips_relocate_section): Remove support for link-time relaxation
8334 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
8335 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8336 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
8337 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
8338 relaxation of branches used by embedded-PIC.
8339 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
8340 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
8341 related members, update comment.
8342 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
8343 code related to embedded-PIC.
8344 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
8345 initialization of now-removed 'adjust' member of
8346 'struct ecoff_debug_info'.
8347
8348 2004-04-23 Chris Demetriou <cgd@broadcom.com>
8349
8350 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
8351
8352 2004-04-21 Philip Blundell <pb@nexus.co.uk>
8353
8354 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
8355 relocs for locally defined symbols during -shared final link.
8356 (elf32_arm_final_link_relocate): Likewise.
8357
8358 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8359
8360 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
8361 ELF_LINK_POINTER_EQUALITY_NEEDED.
8362 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
8363 if r_type is not R_X86_64_PC32.
8364 (elf64_x86_64_finish_dynamic_symbol): If
8365 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
8366 SHN_UNDEF symbols.
8367
8368 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8369
8370 * elf32-sh.c (sh_elf_plt_sym_val): New function.
8371 (elf_backend_plt_sym_val): Define.
8372
8373 2004-04-22 Andrew Cagney <cagney@redhat.com>
8374
8375 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
8376
8377 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8378
8379 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
8380 make_bfd_asection.
8381 * som.c (som_set_section_contents): Constantify second argument.
8382 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
8383 (som_object_setup): Rework to avoid warning.
8384 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
8385 Likewise.
8386
8387 2004-04-22 Andrew Cagney <cagney@redhat.com>
8388
8389 * cache.c (bfd_cache_close): Check for a previously closed file.
8390
8391 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8392
8393 * bfd.c (bfd_get_synthetic_symtab): Define.
8394 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
8395 NAME##_get_synthetic_symtab.
8396 (struct bfd_target): Add _bfd_get_synthetic_symtab.
8397 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
8398 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
8399 relplt_name fields.
8400 (_bfd_elf_get_synthetic_symtab): New prototype.
8401 * elfcode.h (elf_get_synthetic_symtab): Define.
8402 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
8403 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
8404 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
8405 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
8406 * bfd-in2.h: Rebuilt.
8407 * libbfd.h: Rebuilt.
8408 * elf32-i386.c (elf_i386_plt_sym_val): New function.
8409 (elf_backend_plt_sym_val): Define.
8410 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
8411 (elf_backend_plt_sym_val): Define.
8412 * elf32-s390.c (elf_s390_plt_sym_val): New function.
8413 (elf_backend_plt_sym_val): Define.
8414 * elf64-s390.c (elf_s390_plt_sym_val): New function.
8415 (elf_backend_plt_sym_val): Define.
8416 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
8417 (elf_backend_plt_sym_val): Define.
8418 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
8419 (elf_backend_plt_sym_val): Define.
8420 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
8421 (elf_backend_plt_sym_val): Define.
8422 * aout-target.h (MY_get_synthetic_symtab): Define.
8423 * aout-tic30.c (MY_get_synthetic_symtab): Define.
8424 * coff-rs6000.c (rs6000coff_vec): Add
8425 _bfd_nodynamic_get_synthetic_symtab.
8426 (pmac_xcoff_vec): Likewise.
8427 * coff64-rs6000.c (rs6000coff64_vec): Add
8428 _bfd_nodynamic_get_synthetic_symtab.
8429 (aix5coff64_vec): Likewise.
8430 * sunos.c (MY_get_synthetic_symtab): Define.
8431 * vms.c (vms_get_synthetic_symtab): Define.
8432
8433 2004-04-22 Nick Clifton <nickc@redhat.com>
8434
8435 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
8436
8437 2004-04-22 Peter Barada <peter@the-baradas.com>
8438
8439 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
8440 * bfd2-in.h: Regenerate.
8441 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
8442
8443 2004-04-21 Chris Demetriou <cgd@broadcom.com>
8444
8445 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
8446 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
8447 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
8448 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
8449 * bfd-in2.h: Regenerate.
8450
8451 2004-04-21 Bob Wilson <bob.wilson@acm.org>
8452
8453 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
8454 require relocations against a weak symbol to reference the same
8455 symbol hash entry if not a final, static link.
8456 (get_cached_value, add_value_map): Add final_static_link argument.
8457 (remove_literals): Pass final_static_link argument as needed.
8458
8459 2004-04-21 Andrew Cagney <cagney@redhat.com>
8460
8461 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
8462 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
8463 (opncls_bwrite, opncls_bclose, opncls_bflush)
8464 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
8465 bfd iovec that uses function callbacks.
8466 (bfd_close): Use the iovec's bclose.
8467 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
8468 (cache_bclose, cache_bflush, cache_bstat)
8469 (cache_iovec): New functions and global variable, implement a
8470 cache "iovec", where applicable set bfd_error.
8471 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
8472 * bfdio.c (struct bfd_iovec): Define.
8473 (real_read): Delete function.
8474 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
8475 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
8476 assume that bread and bwrite set bfd_error.
8477 * bfd.c (struct bfd): Add "iovec", update comments.
8478 * bfd-in2.h, libbfd.h: Re-generate.
8479
8480 2004-04-21 Andrew Cagney <cagney@redhat.com>
8481
8482 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8483
8484 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
8485
8486 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
8487 (bfd_elf_gc_sections): Fail if a shared object is being created.
8488 Do not fail if dynamic sections have been created. Instead call
8489 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
8490 dynamically referenced symbols. Do not mark the whole graph
8491 rooted at .eh_frame, only the section proper.
8492
8493 2004-04-20 DJ Delorie <dj@redhat.com>
8494
8495 * reloc.c: Add BFD_RELOC_32_SECREL.
8496 * bfd-in2.h: Regenerate.
8497 * libbfd.h: Likewise.
8498 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
8499 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
8500 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
8501
8502 2004-04-19 Jakub Jelinek <jakub@redhat.com>
8503
8504 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
8505 relocs against hidden/protected undefweak symbols properly.
8506 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8507
8508 2004-04-18 Mark Kettenis <kettenis@gnu.org>
8509
8510 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8511 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
8512 core files.
8513
8514 2004-04-17 Brian Ford <ford@vss.fsi.com>
8515
8516 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
8517 filepos for the SizeOfHeaders field.
8518 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
8519 overflow.
8520 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
8521
8522 2004-04-16 Alan Modra <amodra@bigpond.net.au>
8523
8524 * simple.c (bfd_simple_get_relocated_section_contents): Don't
8525 change reloc_done. Set and restore _cooked_size.
8526 (RETURN): Delete.
8527
8528 2004-04-15 Mark Kettenis <kettenis@gnu.org>
8529
8530 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
8531 core files.
8532
8533 2004-04-15 Nick Clifton <nickc@redhat.com>
8534
8535 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
8536
8537 2004-04-15 Alan Modra <amodra@bigpond.net.au>
8538
8539 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
8540
8541 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
8542
8543 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
8544 when it is a definition.
8545
8546 2004-04-14 Alan Modra <amodra@bigpond.net.au>
8547
8548 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
8549 when statically linking PIC code.
8550 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8551
8552 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8553
8554 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
8555 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
8556 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
8557 * configure: Regenerate.
8558
8559 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
8560
8561 * elflink.c: Include libiberty.h.
8562 * Makefile.am (elflink.lo): Depend on libiberty.h.
8563 * Makefile.in: Regenerate.
8564
8565 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
8566
8567 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8568 ".MIPS.stubs".
8569
8570 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
8571
8572 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8573 reserve the memory for dynamic linker
8574
8575 2004-04-05 Mark Kettenis <kettenis@gnu.org>
8576
8577 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8578 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8579
8580 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8581
8582 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8583 RELOC_FOR_GLOBAL_SYMBOL.
8584 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8585
8586 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8587
8588 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8589 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8590
8591 2004-04-01 Paul Brook <paul@codesourcery.com>
8592
8593 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8594 * elf32-arm.h (struct elf32_elf_section_map): New.
8595 (struct _arm_elf_section_data): New.
8596 (elf32_arm_section_data): Define.
8597 (struct elf32_arm_link_hash_table): Add byteswap_code.
8598 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8599 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8600 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8601 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8602 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8603 (bfd_elf32_new_section_hook, elf_backend_write_section,
8604 elf_backend_link_output_symbol_hook): Define.
8605
8606 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
8607
8608 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8609 that keeps the characters in a B_INCL..B_EINCL range.
8610 (_bfd_link_section_stabs): When computing the sum of the
8611 characters in a B_INCL..B_EINCL range also keep a copy of those
8612 characters. Use this information to distinguish between
8613 include sections that have the same sum and the same length
8614 but which are nevertheless unique.
8615
8616 2004-03-31 Paul Brook <paul@codesourcery.com>
8617
8618 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8619 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8620
8621 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
8622
8623 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8624 to 'sum_chars' and add field 'num_chars'.
8625 (_bfd_link_section_stabs): When computing the sum of the
8626 characters in a B_INCL..B_EINCL range also keep a count of the
8627 number of characters. Use this information to help distinguish
8628 between include sections when have the same sum but which
8629 nevertheless are still unique.
8630
8631 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
8632
8633 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8634
8635 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
8636 Tomer Levi <Tomer.Levi@nsc.com>
8637
8638 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8639 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8640 (BFD32_BACKENDS): Add elf32-cr16c.lo.
8641 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8642 (cpu-cr16c.lo): New target.
8643 (elf32-cr16c.lo): Likewise.
8644 * Makefile.in: Regenerate.
8645 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8646 (bfd_archures_list): Add bfd_cr16c_arch.
8647 * config.bfd: Handle cr16c-*-elf*.
8648 * configure.in: Handle bfd_elf32_cr16c_vec.
8649 * configure: Regenerate.
8650 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8651 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8652 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8653 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8654 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8655 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8656 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8657 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8658 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8659 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8660 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8661 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8662 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8663 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8664 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8665 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8666 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8667 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8668 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8669 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8670 * targets.c (bfd_elf32_cr16c_vec): Declare.
8671 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8672 * cpu-cr16c.c: New file.
8673 * elf32-cr16c.c: Likewise.
8674 * libbfd.h: Regenerate.
8675 * bfd-in2.h: Likewise.
8676
8677 2004-03-30 Jakub Jelinek <jakub@redhat.com>
8678
8679 * elf.c (map_sections_to_segments): Fix handling of .tbss.
8680
8681 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8682
8683 * Makefile.am: Remove all mention of elflink.h.
8684 * Makefile.in: Regenerate.
8685 * bfd-in.h (bfd_elf_discard_info): Declare.
8686 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8687 * bfd-in2.h: Regenerate.
8688 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8689 bfd_elf32_link_record_dynamic_symbol,
8690 bfd_elf64_link_record_dynamic_symbol,
8691 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8692 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8693 _bfd_elf32_link_record_local_dynamic_symbol,
8694 _bfd_elf64_link_record_local_dynamic_symbol,
8695 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8696 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8697 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8698 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8699 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8700 _bfd_elf32_reloc_symbol_deleted_p,
8701 _bfd_elf64_reloc_symbol_deleted_p): Delete.
8702 (bfd_elf_link_record_dynamic_symbol,
8703 bfd_elf_link_record_local_dynamic_symbol,
8704 bfd_elf_final_link, bfd_elf_gc_sections,
8705 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8706 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8707 bfd_elf_reloc_symbol_deleted_p): Declare.
8708 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8709 * elf32-arm.h: Update for changed function names. Remove local
8710 WILL_CALL_FINISH_DYNAMIC_SECTION define.
8711 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8712 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8713 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8714 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8715 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8716 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8717 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8718 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8719 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8720 (bfd_elfNN_print_symbol): Define.
8721 * elfcode.h: Don't include elflink.h.
8722 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8723 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8724 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8725 elf_gc_record_vtinherit, elf_gc_record_vtentry,
8726 elf_link_record_local_dynamic_symbol): Don't define.
8727 * elflink.c: Update for changed function names. Move elflink.h
8728 code here.
8729 * elflink.h: Delete file.
8730 * po/SRC-POTFILES.in: Regenerate.
8731 * po/bfd.pot: Regenerate.
8732
8733 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8734
8735 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8736 "name" for global syms accidentally removed in 2004-03-20 change.
8737
8738 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8739
8740 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8741 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8742 where Elf_External_* is different for 64 and 32 bit, with
8743 corresponding elf_size_info field.
8744 (struct elf_final_link_info): Use "bfd_byte *" instead
8745 of "Elf_External_Sym *" for external_syms and symbuf.
8746 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8747 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8748 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8749 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8750 (elf_link_sort_cmp2): Adjust.
8751 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8752 using ELF_R_SYM macro. Set u.sym_mask.
8753 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8754 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
8755 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
8756 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
8757 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
8758 swap_syn_out functions. Rearrange dyn swap in/out switch.
8759 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8760 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
8761 (elf_link_flush_output_syms): Add elf_backend_data arg.
8762 (elf_link_check_versioned_symbol): Likewise.
8763 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8764 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
8765 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
8766 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8767 ELF_R_TYPE and ELF_R_INFO macros.
8768 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8769 based on size rather than using ELF_R_INFO.
8770 (elf_gc_mark): Set up r_sym_shift local var and use instead of
8771 ELF_R_SYM macro.
8772 (struct alloc_got_off_arg): New.
8773 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8774 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
8775 (elf_gc_allocate_got_offsets): Adjust.
8776 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8777 ELF_R_SYM. Use bfd_section_from_elf_index.
8778 (elf_bfd_discard_info): Set cookie.r_sym_shift.
8779 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8780 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8781
8782 2004-03-26 Stan Shebs <shebs@apple.com>
8783
8784 Remove MPW support, no longer used.
8785 * config.bfd (powerpc-*-mpw*): Remove configuration.
8786 * mpw-config.in, mpw-make.sed: Remove files.
8787 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8788
8789 2004-03-26 Alan Modra <amodra@bigpond.net.au>
8790
8791 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8792 (ppc64_elf_add_symbol_hook): New function.
8793 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8794 const from Elf_Internal_Sym param.
8795 * elflink.c (elf_link_add_object_symbols): Adjust.
8796 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8797 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8798 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8799 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8800 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8801 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8802 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8803 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8804 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8805 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8806 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8807 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8808 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8809 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8810 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8811 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8812
8813 2004-03-26 Alan Modra <amodra@bigpond.net.au>
8814
8815 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8816 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8817 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8818 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8819 (bfd_elf64_bfd_link_add_symbols): Delete.
8820 (bfd_elf_link_add_symbols): Declare.
8821 * elfcode.h (elf_bfd_link_add_symbols): Delete.
8822 * elflink.c: Include safe-ctype.h.
8823 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8824 make static.
8825 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8826 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8827 static.
8828 (elf_link_add_archive_symbols): Rename from
8829 _bfd_elf_link_add_archive_symbols, make static.
8830 (elf_link_add_object_symbols): New function. Corresponding
8831 elflink.h function converted to use elf_size_info.
8832 (bfd_elf_link_add_symbols): Likewise.
8833 (bfd_elf_size_dynamic_sections): Adjust.
8834 * elflink.h (elf_bfd_link_add_symbols): Delete.
8835 (elf_link_add_object_symbols): Delete.
8836 * elf32-gen.c (elf32_generic_link_add_symbols): Call
8837 bfd_elf_link_add_symbols.
8838 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8839
8840 2004-03-25 Alan Modra <amodra@bigpond.net.au>
8841
8842 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8843 and chained shared libs only if dynsym. Clear dynsym on forced-local.
8844
8845 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8846 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8847 (_bfd_elf_add_dt_needed_tag): Declare.
8848 (_bfd_elf_sort_symbol): Declare.
8849 (_bfd_elf_finalize_dynstr): Declare.
8850 (RELOC_FOR_GLOBAL_SYM): Formatting.
8851 * elfcode.h (elf_add_dynamic_entry): Delete.
8852 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
8853 elflink.h function converted to use elf_size_info.
8854 (_bfd_elf_add_dt_needed_tag): Likewise.
8855 (_bfd_elf_sort_symbol): Likewise.
8856 (_bfd_elf_finalize_dynstr): Likewise.
8857 (compute_bucket_count): Likewise.
8858 (bfd_elf_size_dynamic_sections): Likewise. Check result of
8859 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8860 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8861 * elflink.h: ..here.
8862 (sort_symbol, add_dt_needed_tag): Delete.
8863 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8864 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8865 Update all users.
8866 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
8867 * elf32-cris.c (add_dynamic_entry): Likewise.
8868 * elf32-hppa.c (add_dynamic_entry): Likewise.
8869 * elf32-i370.c (add_dynamic_entry): Likewise.
8870 * elf32-i386.c (add_dynamic_entry): Likewise.
8871 * elf32-m32r.c (add_dynamic_entry): Likewise.
8872 * elf32-m68k.c (add_dynamic_entry): Likewise.
8873 * elf32-ppc.c (add_dynamic_entry): Likewise.
8874 * elf32-s390.c (add_dynamic_entry): Likewise.
8875 * elf32-sh.c (add_dynamic_entry): Likewise.
8876 * elf32-sparc.c (add_dynamic_entry): Likewise.
8877 * elf32-vax.c (add_dynamic_entry): Likewise.
8878 * elf32-xtensa.c (add_dynamic_entry): Likewise.
8879 * elf64-alpha.c (add_dynamic_entry): Likewise.
8880 * elf64-hppa.c (add_dynamic_entry): Likewise.
8881 * elf64-ppc.c (add_dynamic_entry): Likewise.
8882 * elf64-s390.c (add_dynamic_entry): Likewise.
8883 * elf64-sparc.c (add_dynamic_entry): Likewise.
8884 * elf64-x86-64.c (add_dynamic_entry): Likewise.
8885 * elfxx-ia64.c (add_dynamic_entry): Likewise.
8886 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8887 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8888 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8889 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8890
8891 2004-03-23 Paul Brook <paul@codesourcery.com>
8892
8893 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8894
8895 2004-03-22 Bob Wilson <bob.wilson@acm.org>
8896
8897 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8898 literal tables and check for relocs outside of literal pools.
8899 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8900 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8901 set DF_TEXTREL.
8902 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8903 (elf_xtensa_relocate_section): Read literal tables and check for
8904 dynamic relocations in read-only sections and not in literal pools.
8905
8906 2004-03-23 Alan Modra <amodra@bigpond.net.au>
8907
8908 PR 51.
8909 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8910
8911 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
8912
8913 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8914 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8915 not defined by the executable, or defined in a DSO.
8916 <eliding run-time relocation of .got>: Initialize GOT entry for a
8917 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8918 executable.
8919 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8920 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8921 a PLT reloc to GOT for an executable.
8922 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8923 .got for a DSO and explain why.
8924 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8925 and unreferenced symbols for which a PLT is defined. Adjust
8926 dynamic-symbol pruning correspondingly, to make sure we don't lose
8927 a dynamic symbol also defined by a DSO.
8928
8929 2004-03-22 Alan Modra <amodra@bigpond.net.au>
8930
8931 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8932 and rel args. Group input and output args. Wrap to 80 columns.
8933 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8934 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8935 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8936 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8937 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8938 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8939 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8940 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8941 RELOC_FOR_GLOBAL_SYMBOL invocation.
8942
8943 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8944
8945 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8946 unresolved symbols in objects aren't allowed.
8947
8948 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8949 unresolved symbols.
8950 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8951 (elf_hppa_unmark_useless_dynamic_symbols):
8952 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8953 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8954 (elf32_hppa_relocate_section): Likewise.
8955 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8956 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8957 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8958 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8959 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8960
8961 * elf-m10200.c (mn10200_elf_relocate_section): Use
8962 RELOC_FOR_GLOBAL_SYMBOL.
8963 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8964 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8965 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8966 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8967 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8968 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8969 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8970 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8971 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8972 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8973 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8974 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8975
8976 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8977
8978 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8979 (final_link_relocate): Likewise.
8980 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8981 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8982
8983 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8984
8985 * Makefile.am: Run "make dep-am".
8986 * Makefile.in: Regenerate.
8987 * aclocal.m4: Regenerate.
8988 * config.in: Regenerate.
8989 * po/bfd.pot: Regenerate.
8990
8991 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8992 H.J. Lu <hongjiu.lu@intel.com>
8993
8994 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8995 type and size change code to where it was previously. Remove
8996 dt_needed param. Treat old weak syms as strong if new sym is
8997 from a shared lib, even when old sym is from another shared
8998 lib. Remove unnecessary tests of oldweak and newweak. Correct
8999 comments.
9000 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
9001 _bfd_elf_merge_symbol calls.
9002 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
9003 dt_needed local var. Update comments.
9004 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
9005 (_bfd_elf_add_default_symbol): Likewise.
9006
9007 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
9008 strong syms in one shared object overriding weak syms in another.
9009
9010 2004-03-18 Alan Modra <amodra@bigpond.net.au>
9011
9012 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
9013 dyn_lib_class field. Rearrange for better packing.
9014 (elf_dt_soname): Delete.
9015 (elf_dyn_lib_class): Define.
9016 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
9017 (bfd_elf_set_dt_needed_soname): Delete.
9018 (bfd_elf_set_dyn_lib_class): New function.
9019 * elflink.h (add_dt_needed_tag): New function. Split out from..
9020 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
9021 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
9022 initialization of soname.
9023 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
9024 elf_dt_soname.
9025 * bfd-in.h (enum dynamic_lib_link_class): New.
9026 (bfd_elf_set_dt_needed_soname): Delete.
9027 (bfd_elf_set_dyn_lib_class): Declare.
9028 * bfd-in2.h: Regenerate.
9029
9030 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
9031 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
9032 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
9033 symbol loop. Instead use add_needed to flag tag as written.
9034
9035 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
9036
9037 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
9038 logic for null_input_bfd detection.
9039
9040 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
9041
9042 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
9043
9044 2004-03-16 Mark Kettenis <kettenis@gnu.org>
9045
9046 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
9047 code.
9048
9049 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9050
9051 * elflink.c (elf_link_read_relocs_from_section): Don't use
9052 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
9053 (_bfd_elf_link_read_relocs): ..to here.
9054 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
9055
9056 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9057
9058 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
9059 values selected in configure.host. Require both to be defined
9060 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
9061 corresponding BFD_HOST vars with quotes.
9062 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
9063 Always require BFD_HOST_64_BIT_DEFINED.
9064 <file_ptr type>: Find off_t size before emitting message. Combine
9065 off_t and ftello64 conditional.
9066 * configure: Regenerate.
9067
9068 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9069
9070 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
9071 aliasing warning. Remove trailing whitespace throughout file.
9072
9073 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9074
9075 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
9076 input_section in calls to get_dyn_name.
9077 * 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
9078 local symbols.
9079 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
9080
9081 2004-03-15 Alan Modra <amodra@bigpond.net.au>
9082
9083 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
9084 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
9085 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
9086 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
9087 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
9088 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
9089 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
9090 when using long.
9091 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
9092 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
9093 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
9094 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
9095 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
9096 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
9097 (read_8_bytes, read_indirect_string, read_address): Likewise.
9098 (read_abbrevs, parse_comp_unit): Likewise.
9099 * targets.c (struct bfd_target): Likewise.
9100 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
9101 * hppabsd-core.c: Likewise. Formatting.
9102 * hpux-core.c: Likewise.
9103 * irix-core.c: Likewise.
9104 * netbsd-core.c: Likewise.
9105 * osf-core.c: Likewise.
9106 * ptrace-core.c: Likewise.
9107 * sco5-core.c: Likewise.
9108 * trad-core.c: Likewise.
9109 * configure: Regenerate.
9110 * bfd-in2.h: Regenerate.
9111
9112 2004-03-15 Alan Modra <amodra@bigpond.net.au>
9113
9114 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
9115 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
9116 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
9117 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
9118 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
9119 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
9120 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
9121 * libbfd.c: Likewise in function definitions.
9122 (bfd_put_8): Mask with 0xff rather than casting to char.
9123 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
9124 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
9125 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
9126 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
9127 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
9128 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
9129 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
9130 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
9131 (H_GET_64, H_GET_32, H_GET_16): Likewise.
9132 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
9133 * archive.c (do_slurp_coff_armap): Update swap prototype.
9134 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
9135 (tic54x_getl_signed_32): Likewise.
9136 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
9137 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
9138 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
9139 (bfd_getp_signed_32, bfd_putp32): Likewise.
9140 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
9141 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
9142 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
9143 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
9144 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
9145 bfd_h_getx_signed_16, bfd_h_putx16.
9146 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
9147 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
9148 * hpux-core.c: Likewise.
9149 * irix-core.c: Likewise.
9150 * netbsd-core.c: Likewise.
9151 * osf-core.c: Likewise.
9152 * ptrace-core.c: Likewise.
9153 * sco5-core.c: Likewise.
9154 * trad-core.c: Likewise.
9155 * bfd-in2.h: Regenerate.
9156
9157 2004-03-15 Matt Thomas <matt@3am-software.com>
9158
9159 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
9160 selected.
9161
9162 2004-03-13 Mark Kettenis <kettenis@gnu.org>
9163
9164 * config.bfd: Add x86_64-*-openbsd*.
9165 * configure.in (x86_64-*-openbsd*): Set COREFILE to
9166 netbsd-core.lo.
9167 * configure: Regenerate.
9168
9169 2004-03-12 Nick Clifton <nickc@redhat.com>
9170 Dave Murphy <wintermute2k4@ntlworld.com>
9171
9172 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
9173 if the input bfd does not contain any code.
9174
9175 2004-03-09 Steve Ellcey <sje@cup.hp.com>
9176
9177 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
9178
9179 2004-03-05 Fred Fish <fnf@redhat.com>
9180
9181 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
9182 mips16 symbols to be even rather than testing first for even/odd.
9183 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
9184
9185 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
9186
9187 * elf.c (map_sections_to_segments): Ignore .tbss sections for
9188 layout purposes.
9189
9190 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
9191
9192 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
9193 undefined symbols as hash_new.
9194
9195 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
9196
9197 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
9198 * cpu-sh.c: Ditto.
9199 * elf32-sh.c: Ditto.
9200 * bfd-in2.h: Regenerate.
9201
9202 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
9203
9204 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
9205 dynrelocs.
9206 (_frv_count_got_plt_entries): Initialize them.
9207 (frv_pic_relocs_info_find): Add insert argument. Adjust all
9208 callers.
9209 (frv_pic_relocs_info_for_global): Likewise.
9210 (frv_pic_relocs_info_for_local): Likewise.
9211 (frv_pic_merge_early_relocs_info): New.
9212 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
9213 another.
9214 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
9215 Check that we don't exceed the allocated count for entry.
9216 (_frv_add_rofixup): Likewise.
9217 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
9218 (elf32_frv_finish_dynamic_sections): Improve error message in case
9219 we emit too few rofixup entries.
9220
9221 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
9222
9223 * archures.c (bfd_mach_fr450): New.
9224 * bfd-in2.h: Regenerate.
9225 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
9226 (arch_info_500): Link to it.
9227 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
9228 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
9229 (frv_elf_arch_extension_p): New function.
9230 (frv_elf_merge_private_bfd_data): Use it.
9231
9232 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
9233
9234 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
9235
9236 * elflink.h (is_global_data_symbol_definition): Moved to
9237 elflink.c.
9238 (elf_link_is_defined_archive_symbol): Likewise.
9239 (elf_link_add_archive_symbols): Likewise. Renamed to
9240 _bfd_elf_link_add_archive_symbols.
9241
9242 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
9243 of ELF symbol table entry from backend.
9244 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
9245 instead of elf_link_add_object_symbols.
9246
9247 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
9248
9249 * elf-bfd.h (struct elf_backend_data): Added
9250 elf_backend_can_make_relative_eh_frame,
9251 elf_backend_can_make_lsda_relative_eh_frame and
9252 elf_backend_encode_eh_address.
9253 (_bfd_elf_encode_eh_address): Declare.
9254 (_bfd_elf_can_make_relative): Declare.
9255 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
9256 hooks to decide whether to attempt to make_relative and
9257 make_lsda_relative.
9258 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
9259 (_bfd_elf_can_make_relative): New.
9260 (_bfd_elf_encode_eh_address): New.
9261 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
9262 (frv_elf_encode_eh_address): New.
9263 (elf_backend_can_make_relative_eh_frame): Define.
9264 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9265 (elf_backend_encode_eh_address): Define.
9266 * elfxx-target.h
9267 (elf_backend_can_make_relative_eh_frame): Define.
9268 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9269 (elf_backend_encode_eh_address): Define.
9270 (elfNN_bed): Add them.
9271
9272 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
9273
9274 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
9275 complain_on_overflow to signed.
9276
9277 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
9278
9279 * elflink.h (sort_symbol): New.
9280 (elf_link_add_object_symbols): Use a sorted symbol array for
9281 weakdef.
9282
9283 2004-02-27 Jakub Jelinek <jakub@redhat.com>
9284
9285 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9286 for pc relative relocs.
9287 (elf_s390_relocate_section): Likewise.
9288 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9289 for pc relative relocs.
9290 (elf_s390_relocate_section): Likewise.
9291
9292 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
9293
9294 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
9295 count_dyn_reloc.
9296
9297 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
9298
9299 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
9300 field to track if a relocation is against readonly section.
9301 (count_dyn_reloc): Take a new argument for rent->reltext.
9302 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
9303 (get_reloc_section): Don't set ia64_info->reltext here.
9304 (allocate_dynrel_entries): Set ia64_info->reltext here.
9305
9306 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
9307
9308 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
9309 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
9310 function's descriptor to symbol+offset, and map local undefweak
9311 symbol to NULL function descriptor.
9312 (elf32_frv_relocate_section): Likewise.
9313
9314 2004-02-23 Mark Kettenis <kettenis@gnu.org>
9315
9316 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
9317 M_X86_64_NETBSD.
9318 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
9319 (netbsd_core_file_p): Set architecture from machine ID for
9320 selected machines.
9321
9322 2004-02-23 Jakub Jelinek <jakub@redhat.com>
9323
9324 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
9325 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
9326
9327 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
9328
9329 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
9330 symbols with non-default visibility.
9331
9332 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
9333
9334 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
9335 IMAGE_SCN_MEM_WRITE on known sections only.
9336
9337 2004-02-20 Jakub Jelinek <jakub@redhat.com>
9338
9339 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
9340 symbols used in PIE relocs.
9341
9342 2004-02-19 Jakub Jelinek <jakub@redhat.com>
9343
9344 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
9345 .plt sh_entsize.
9346
9347 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
9348
9349 * configure.in: Update version to 2.15.90.
9350 * configure: Regenerate.
9351
9352 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
9353 Richard Sandiford <rsandifo@redhat.com>
9354
9355 * elfxx-mips.c (mips_elf_calculate_relocation): Use
9356 _bfd_elf_symbol_refs_local_p to decide whether to decay
9357 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
9358 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
9359 relocs if the symbol wasn't defined by a regular object file.
9360 Don't check the symbol's dynindx.
9361
9362 2004-02-16 Andrew Cagney <cagney@redhat.com>
9363
9364 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
9365 @bfd_file_ptr@.
9366 * bfd-in2.h: Re-generate.
9367
9368 2004-02-14 Andrew Cagney <cagney@redhat.com>
9369
9370 * configure.host (HDEFINES): When hppa*-*-hpux*, define
9371 _LARGEFILE64_SOURCE.
9372
9373 2004-02-13 Andrew Cagney <cagney@redhat.com>
9374
9375 * elf.c (vma_page_aligned_bias): New function.
9376 (assign_file_positions_except_relocs)
9377 (assign_file_positions_for_segments): Replace broken modulo
9378 arithmetic with call to vma_page_aligned_bias.
9379
9380 2004-02-11 Andrew Cagney <cagney@redhat.com>
9381
9382 * bfd-in.h: Update copyright.
9383 (bfd_tell): Change return type to file_ptr.
9384 * bfd-in2.h: Re-generate.
9385 * cache.c: Update copyright.
9386 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
9387 parameter.
9388 (close_one): Use real_ftell.
9389 * bfdio.c: Update copyright.
9390 (real_ftell, real_fseek): New functions.
9391 (bfd_tell): Use real_fseek and real_ftell, change return type to
9392 file_ptr.
9393 (bfd_seek): Use real_ftell and real_fseek, change type of
9394 file_position to a file_ptr.
9395 * libbfd-in.h: Update copyright.
9396 (real_ftell, real_fseek): Declare.
9397 * libbfd.h: Re-generate.
9398
9399 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
9400 fseeko and fseeko64. Determine bfd_file_ptr.
9401 * configure: Re-generate.
9402 * config.in: Re-generate.
9403
9404 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
9405
9406 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
9407 * elf32-h8300.c: Likewise.
9408
9409 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
9410 Nick Clifton <nickc@redhat.com>
9411
9412 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
9413 GOT entries with no associated GOT subsection.
9414
9415 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
9416
9417 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
9418 * elf.c (swap_out_syms): Use it to decide whether local section
9419 symbols should be named.
9420 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
9421 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
9422 (elf_backend_name_local_section_symbols): Define.
9423 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
9424
9425 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
9426
9427 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
9428 (elfNN_ia64_relax_section): Optimize brl to br during the relax
9429 finalize pass.
9430
9431 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
9432
9433 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
9434 to bfd_link_hash_entry passed by reference to
9435 _bfd_generic_link_add_one_symbol.
9436
9437 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
9438
9439 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
9440 relocations against dynamic symbols.
9441
9442 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
9443
9444 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
9445 change.
9446
9447 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
9448
9449 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
9450 * bfd-in2.h, libbfd.h: Rebuilt.
9451
9452 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
9453
9454 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
9455 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
9456 flag has been cleared.
9457
9458 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
9459
9460 * coff-h8300.c: Add and adjust comments about relaxation.
9461 * elf32-h8300.c: Likewise.
9462
9463 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9464
9465 * coff-h8300.c: Fix comment typos.
9466 * elf32-h8300.c: Likewise.
9467
9468 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9469
9470 * coff-h8300.c: Add comments about relaxation.
9471 * elf32-h8300.c: Likewise.
9472
9473 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9474
9475 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
9476 throughout.
9477 * aclocal.m4: Regenerate.
9478 * configure: Regenerate.
9479
9480 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
9481
9482 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
9483 mips_elf64_rtype_to_howto instead of using howto_table.
9484
9485 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
9486
9487 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
9488 the .plt section.
9489 (elf32_arm_check_relocs): Don't increment the PLT refcount for
9490 relocs which would not use the PLT.
9491
9492 2004-01-13 Alan Modra <amodra@bigpond.net.au>
9493
9494 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
9495 (ppc64_elf_gc_sweep_hook): Likewise.
9496 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
9497
9498 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
9499
9500 Adds linker relaxation support for bit manipulation insns like
9501 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
9502 bst, btst, bxor.
9503 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
9504 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
9505 * coff-h8300.c: Opcode for bit manipulation insn is checked in
9506 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
9507
9508 2004-01-12 Alan Modra <amodra@bigpond.net.au>
9509
9510 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
9511
9512 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9513
9514 * elf32-h8300.c: Fix formatting.
9515
9516 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9517
9518 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
9519 dynamic object is present. Declare r_symndx and h in an inner
9520 scope.
9521 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
9522
9523 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
9524
9525 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
9526 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
9527 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
9528 identically. Do not emit PC24 relocations for shared libraries.
9529 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
9530 identically. Don't adjust pc_count.
9531 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
9532 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
9533 adjust count for branch relocations.
9534 (allocate_dynrelocs): Correct typo in call to
9535 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
9536 PC24 or PLT32 relocs when linking.
9537
9538 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9539
9540 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
9541 relocation howto with ARM_26 one for consistency.
9542 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
9543 that will be converted to ARM_26D ones, since we always want 'done'
9544 relocations to be reflected in section's data.
9545 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
9546 offset.
9547 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
9548 requested.
9549
9550 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9551
9552 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
9553 are not partial_inplace during a relocatable link.
9554
9555 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
9556
9557 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
9558 if no dynamic object is present. Declare r_symndx and h in an
9559 inner scope.
9560
9561 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
9562
9563 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
9564 trampoline if it is known out of range.
9565
9566 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
9567
9568 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
9569 * elf32-frv.c (_frv_osec_readonly_p): New.
9570 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9571 undefweak symbol.
9572 (_frv_count_got_plt_entries): Adjust expected count accordingly.
9573 (elf32_frv_relocate_section): Likewise. Error out if attempting
9574 to emit rofixups or dynamic relocs in read-only segments. Use
9575 _bfd_elf_section_offset to adjust r_offsets in rofixups and
9576 dynamic relocations.
9577 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
9578 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9579 relocations or fixups involving merged sections correctly. Avoid
9580 crash when undefined symbol is referenced by R_FRV_32 or
9581 R_FRV_FUNCDESC_VALUE.
9582 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
9583 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9584 input section holding local symbol to addend of R_FRV_32 or
9585 R_FRV_FUNCDESC_VALUE dynamic relocation.
9586 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
9587 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9588 (elf32_frv_always_size_sections): Don't store pointer to
9589 __stacksize symbol in sec_info.
9590 (elf32_frv_modify_segment_map): Look it up here.
9591 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
9592 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9593 of the lazy PLT entry, not only its offset, as the low word of a
9594 function descriptor.
9595 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
9596 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9597 if a hash table entry already exists but is not a definition.
9598 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
9599 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9600 (_frv_add_rofixup): Don't inline.
9601 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9602 for undefweak symbols.
9603 (elf32_frv_relocate_section): Avoid crash while computing
9604 relocation when linking with shared library. Only emit rofixups
9605 and dynamic relocations for alloc&load sections. Mark binaries
9606 with inter-segment relocations for relocation as a unit.
9607 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9608 (DEFAULT_STACK_SIZE): New.
9609 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9610 emit rofixups or dynamic relocs when linking dynamic non-PIE
9611 executables.
9612 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9613 shared libs too. Reserve the last entry for the GOT pointer.
9614 (elf32_frv_finish_dynamic_sections): Emit it.
9615 (elf32_frv_always_size_sections): New.
9616 (elf32_frv_modify_segment_map): New.
9617 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9618 sections.
9619 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9620 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9621 (elf_backend_always_size_sections): New.
9622 (elf_backend_modify_segment_map): New.
9623 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
9624 * config.bfd: Added frv-*-*linux*.
9625 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9626 ABS section, instead of crashing.
9627 (elf32_frv_relocate_section): Don't crash before warning about
9628 different segments in non-PIC relocation.
9629 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
9630 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9631 relocs to undefweak symbols.
9632 (elf32_frv_relocate_section): Ditto for undefined symbols.
9633 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
9634 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9635 gotfixup section was created.
9636 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
9637 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9638 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9639 complain_overflow_signed.
9640 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9641 have not been allocated.
9642 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
9643 privfd only if dynamic sections were created.
9644 (elf32_frv_relocate_section): Compute gprel_segment, and use it
9645 for GPREL relocs. When linking relocatable FDPIC executables,
9646 emit warnings for relocations that would be illegal on PIE or
9647 shared libraries. Emit rofixup for R_FRV_32 only if input object
9648 is not FDPIC.
9649 (_frv_create_got_section): Define _gp symbol in the rofixup
9650 section.
9651 (elf32_frv_finish_dynamic_sections): If rofixups needed but
9652 dynamic sections missing, error out requesting -melf32frvfd.
9653 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
9654 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9655 computation of addends from section and global or local symbol
9656 value. Change return type to bfd_boolean, and return a failure if
9657 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9658 nonzero addend is required.
9659 (elf32_frv_relocate_section): Likewise. Print error for
9660 unsupported nonzero addends.
9661 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
9662 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9663 force everything local.
9664 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9665 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9666 (frv_gotfixup_section): New.
9667 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9668 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9669 and relocsfdv.
9670 (_frv_add_rofixup): New.
9671 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9672 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
9673 improve some ugly conditions.
9674 (elf32_frv_relocate_section): Likewise. Reject inter-segment
9675 relocations in fdpic.
9676 (_frv_create_got_section): Create .rofixup.got section.
9677 (struct _frv_dynamic_got_info): Added fixups.
9678 (_frv_count_got_plt_entries): Account in-GOT relocations into
9679 relocs32, relocsfd and relocsfdv. Account them into relocs or
9680 fixups, as appropriate.
9681 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
9682 sizing of gotrel.
9683 (elf32_frv_finish_dynamic_sections): Verify that the right number
9684 of relocations and fixups was generated.
9685 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9686 relocsfdv.
9687 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9688 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9689 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9690 descriptor of a (formerly-)global symbol is local.
9691 (struct frv_pic_relocs_info): Adjust comments.
9692 (_frv_emit_got_relocs_plt_entries): Adjust.
9693 (elf32_frv_relocate_section): Likewise.
9694 (_frv_count_got_plt_entries): Likewise.
9695 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9696 symbol's value to addend in the common preamble. Decay dynamic
9697 symbols to section+offset if they bind or call locally, for GOT
9698 and FUNCDESC_VALUE, respectively.
9699 (elf32_frv_relocate_section): Likewise.
9700 (elf32_frv_check_relocs): Don't register as dynamic symbols of
9701 internal or hidden visibility.
9702 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
9703 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9704 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9705 (elf32_frv_relocate_section): Pass relocation addend in. Use
9706 original relocation addend to look up the got relocs/plt entries
9707 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
9708 processing relocations that reference .scommon symbols.
9709 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
9710 Introduce support for dynamic linking.
9711 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9712 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9713 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9714 (frv_reloc_type_lookup): Return REL howtos for executables and
9715 dynamic libraries.
9716 (frv_info_to_howto_rel): New.
9717 (struct frv_elf_link_hash_table): New.
9718 (frv_hash_table, frv_got_section, frv_gotrel_section,
9719 frv_plt_section, frv_pltrel_section, frv_relocs_info,
9720 frv_got_initial_offset, frv_plt_initial_offset): New macros.
9721 (frv_elf_link_hash_table_create): New.
9722 (struct frv_pic_relocs_info): New.
9723 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9724 (frv_pic_relocs_info_find): New.
9725 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9726 New.
9727 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9728 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9729 (_frv_emit_got_relocs_plt_entries): New.
9730 (elf32_frv_relocate_section): Add support for dynamic linking.
9731 Handle new relocations.
9732 (_frv_create_got_section): New.
9733 (elf32_frv_create_dynamic_sections): New.
9734 (ELF_DYNAMIC_INTERPRETER): New.
9735 (struct _frv_dynamic_got_info): New.
9736 (_frv_count_got_plt_entries): New.
9737 (struct _frv_dynamic_got_plt_info): New.
9738 (_frv_compute_got_alloc_data): New.
9739 (_frv_get_got_entry, _frv_get_fd_entry): New.
9740 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9741 (_frv_resolve_final_relocs_info): New.
9742 (elf32_frv_size_dynamic_sections): New.
9743 (elf32_frv_finish_dynamic_sections): New.
9744 (elf32_frv_adjust_dynamic_symbol): New.
9745 (elf32_frv_finish_dynamic_symbol): New.
9746 (elf32_frv_check_relocs): Handle new relocs. Explain how the
9747 whole thing works.
9748 (elf_info_to_howto_rel): Define.
9749 (bfd_elf32_bfd_link_hash_table_create): Define.
9750 (elf_backend_create_dynamic_sections): Define.
9751 (elf_backend_adjust_dynamic_symbol): Define.
9752 (elf_backend_size_dynamic_sections): Define.
9753 (elf_backend_finish_dynamic_symbol): Define.
9754 (elf_backend_finish_dynamic_sections): Define.
9755 (elf_backend_want_got_sym): Define.
9756 (elf_backend_got_header_size): Define.
9757 (elf_backend_want_got_plt): Define.
9758 (elf_backend_plt_readonly): Define.
9759 (elf_backend_want_plt_sym): Define.
9760 (elf_backend_plt_header_size): Define.
9761 (elf_backend_may_use_rel_p): Define.
9762 (elf_backend_may_use_rela_p): Define.
9763 (elf_backend_default_use_rela_p): Define.
9764 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
9765 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9766 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9767 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9768 (frv_reloc_map): Map the corresponding BFD relocs to them.
9769 (frv_reloc_type_lookup): ... and back to BFD relocs.
9770 * reloc.c: New relocs.
9771 * bfd-in2.h, libbfd.h: Rebuilt.
9772 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
9773 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9774 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9775 R_FRV_FUNCDESC_GOTLO): New.
9776 (frv_reloc_map): Map the corresponding BFD relocs to them.
9777 (frv_reloc_type_lookup): ... and back to BFD relocs.
9778 * reloc.c: New relocs.
9779 * bfd-in2.h, libbfd.h: Rebuilt.
9780
9781 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9782
9783 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9784 targets to support pages of up to 64kB.
9785 (elf32_bed): Redefine to get a separate backend data structure for
9786 traditional targets.
9787 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9788 targets to support pages of up to 64kB.
9789 (elf64_bed): Redefine to get a separate backend data structure for
9790 traditional targets.
9791 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9792 targets to support pages of up to 64kB.
9793 (elf32_bed): Redefine to get a separate backend data structure for
9794 traditional targets.
9795
9796 2004-01-04 Mark Kettenis <kettenis@gnu.org>
9797
9798 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9799
9800 2004-01-02 Mark Kettenis <kettenis@gnu.org>
9801
9802 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9803 (elf_i386_grok_psinfo): Likewise.
9804
9805 2004-01-02 Bernardo Innocenti <bernie@develer.com>
9806
9807 * config.bfd: Add m68k-uClinux target.
9808
9809 2004-01-01 Grant Edwards <grante@visi.com>
9810
9811 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9812 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9813 (elf32_h8_gc_sweep_hook): New function.
9814 (elf_backend_gc_mark_hook): Define.
9815 (elf_backend_gc_sweep_hook): Define.
9816 (elf_backend_can_gc_sections): Define.
9817
9818 For older changes see ChangeLog-0203
9819 \f
9820 Local Variables:
9821 mode: change-log
9822 left-margin: 8
9823 fill-column: 74
9824 version-control: never
9825 End:
This page took 0.230295 seconds and 4 git commands to generate.