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