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