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