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