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