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