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