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