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