include/elf:
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
c19d1205
ZW
12005-05-17 Zack Weinberg <zack@codesourcery.com>
2
3 * elf32-arm.c: Wherever possible, use official reloc names
4 from AAELF.
5 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
6 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
7 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
8 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
9 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
10 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
11 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
12 Add many new relocations from AAELF.
13 (elf32_arm_howto_from_type): Update to match.
14 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
15 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
16 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
17 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
18 (elf32_arm_final_link_relocate): Add support for
19 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
20 case entries redundant with default.
21
22 * reloc.c: Reorganize ARM relocations. Add Thumb
23 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
24 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
25 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
26 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
27 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
28 * bfd-in2.h, libbfd.h: Regenerate.
29
26ae6d5e
DJ
302005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
31
32 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
33 elf_shstrtab.
34 * format.c (bfd_check_format_matches): Set output_has_begun
35 for both_direction.
36 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
37 special case for both_direction.
38
5982e3c7
NC
392005-05-17 Nick Clifton <nickc@redhat.com>
40
41 * elf.c (group_signature): Check for a group section which is
42 actually a (corrupt) symbol table section in disguise and prevent
43 an infinite loop from occurring.
44
fc3ab699
L
452005-05-17 H.J. Lu <hongjiu.lu@intel.com>
46
47 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
48 2005-02-16.
49
5e27d427
L
502005-05-17 H.J. Lu <hongjiu.lu@intel.com>
51
52 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
53 predicate on slot 0 only if slot 0 isn't br.
54
75ff4589
L
552005-05-17 H.J. Lu <hongjiu.lu@intel.com>
56
57 PR 797
58 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
59 empty sdynbss section.
60 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
61
8e0ed13f
NC
622005-05-17 Tavis Ormandy <taviso@gentoo.org>
63
64 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
65 dynamic sections.
66
7e8aeb9a
AM
672005-05-17 Alan Modra <amodra@bigpond.net.au>
68
69 * elf32-ppc.c (LIS_11. LIS_12): Define.
70 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
71 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
72 for --data-plt when building non-pie executables.
73
641bd093
NC
742005-05-17 Nick Clifton <nickc@redhat.com>
75
10dbd1f3
NC
76 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
77 the situation where a symbols's section is not known but a section
78 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
79 OS.
80
641bd093
NC
81 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
82 the presence of a symbol table to just before the symbol table is
83 actually used.
84
83b6bd86
L
852005-05-16 H.J. Lu <hongjiu.lu@intel.com>
86
87 PR 834
88 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
89 (elfNN_ia64_relax_section): Use it.
90
06084812
MK
912005-05-14 Mark Kettenis <kettenis@gnu.org>
92
93 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
94 of basename.
95
1fe44d79
AM
962005-05-14 Alan Modra <amodra@bigpond.net.au>
97
98 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
99 not DT_PPC_GLINK.
100 (ppc_elf_finish_dynamic_sections): Likewise.
101
2db3311b
FF
1022005-05-13 Fred Fish <fnf@specifixinc.com>
103
104 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
105 * libbfd.h: Rebuilt.
106
7db48a12
BW
1072005-05-13 Bob Wilson <bob.wilson@acm.org>
108
109 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
110 periods in linkonce_kind values.
111
8fe76924
L
1122005-05-12 H.J. Lu <hongjiu.lu@intel.com>
113
114 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
115 against protected function when building executable.
116
86b9da88
AM
1172005-05-12 Alan Modra <amodra@bigpond.net.au>
118
119 * elf32-ppc.c (LWZU_0_X_11): Delete.
120 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
121 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
122 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
123 table.
124 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
125 table.
126 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
127 Generate .glink branch table and updated stubs.
128
d7128ce4
AM
1292005-05-11 Alan Modra <amodra@bigpond.net.au>
130
131 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
132 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
133 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
134 (CROR_151515, CROR_313131): Delete.
135 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
136 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
137 LWZU_0_X_11): Define.
138 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
139 and R_PPC_REL16_HA entries.
140 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
141 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
142 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
143 new_plt, and old_plt.
144 (ppc_elf_create_dynamic_sections): Create .glink section.
145 (ppc_elf_check_relocs): Set new_plt and old_plt.
146 (ppc_elf_select_plt_layout): New function.
147 (ppc_elf_tls_setup): Set plt output section elf type and flags.
148 (allocate_got): Handle differences between old and new got layout.
149 (allocate_dynrelocs): Likewise for plt.
150 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
151 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
152 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
153 destination of R_PPC_PLTREL24 relocs.
154 (ppc_elf_relocate_section): Handle new relocs and changed destination
155 of R_PPC_PLTREL24.
156 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
157 differences in layout.
158 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
159 put a blrl in new got. Write glink contents.
160 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
161 * libbfd.h: Regenerate.
162 * bfd-in2.h: Regenerate.
163
4c9b0de6
AS
1642005-05-11 Andreas Schwab <schwab@suse.de>
165
166 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
167 warning.
168
3d2b39cf
L
1692005-05-10 H.J. Lu <hongjiu.lu@intel.com>
170
171 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
172 section if SEC_ALLOC isn't set.
173
2ba49b59
KC
1742005-05-09 Kelley Cook <kcook@gcc.gnu.org>
175
176 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
177 * acinclude.m4: Don't sinclude accross.m4.
178 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
179
433817dd
AM
1802005-05-09 Alan Modra <amodra@bigpond.net.au>
181
182 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
183 (ppc64_elf_add_symbol_hook): Set has_dotsym.
184 (ppc64_elf_check_directives): Only process syms when has_dotsym.
185 (func_desc_adjust): Hide fake function descriptors when function
186 code entry is defined.
187 (adjust_opd_syms): Adjust for deleted_section becoming union field.
188
0560d0f7
AM
1892005-05-09 Alan Modra <amodra@bigpond.net.au>
190
191 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
192
74cc7600
DK
1932005-05-08 Dave Korn <dave.korn@artimi.com>
194
195 * coff-tic80.c: Undefine _CONST after system headers to prevent
196 clash with tic80-specific definition in include/coff/tic80.h
197
cfca085c
L
1982005-05-08 H.J. Lu <hongjiu.lu@intel.com>
199
200 PR 939
201 * elflink.c (elf_link_output_extsym): Use output_bfd if
202 h->root.u.def.section is bfd_abs_section_ptr when reporting
203 error.
204
7f4d3958
L
2052005-05-07 H.J. Lu <hongjiu.lu@intel.com>
206
207 * elf-bfd.h (elf_backend_data): Update special_sections to
208 array of pointer to bfd_elf_special_section.
209 * elf.c (special_sections): Likewise.
210 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
211 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
212 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
213 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
214 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
215 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
216 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
217 * elf32-v850.c (v850_elf_special_sections): Likewise.
218 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
219 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
220 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
221 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
222 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
223 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
224 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
225 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
226
227 * elf.c (get_special_section): Updated.
228
3b36f7e6
AM
2292005-05-07 Alan Modra <amodra@bigpond.net.au>
230
231 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
232 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
233 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
234 got_symbol_offset.
235 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
236 * elf32-frv.c (_frv_create_got_section): Likewise.
237 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
238 (elf_backend_got_symbol_offset): Don't define.
239 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
240 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
241 and got_gap.
242 (ppc_elf_create_got): Tidy.
243 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
244 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
245 (ppc_elf_gc_sweep_hook): Likewise.
246 (ppc_elf_relocate_section): Likewise.
247 (ppc_elf_finish_dynamic_symbol): Likewise.
248 (allocate_got): New function.
249 (allocate_dynrelocs): Use allocate_got.
250 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
251 so that local got can refcount it. Set got_header_size.
252 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
253 coded 4.
254 (ppc_elf_finish_dynamic_sections): Likewise.
255 (elf_backend_got_symbol_offset): Don't define.
256 (elf_backend_got_header_size): Ditto.
257
2e0fbf77
JW
2582005-05-05 Steve Ellcey <sje@cup.hp.com>
259
260 * configure.in (ACX_HEADER_STRING): New.
261 * configure: Regenerate.
262 * config.in: Regenerate.
263 * sysdep.h (STRING_WITH_STRINGS): Use.
264
6f140a15
L
2652005-05-05 H.J. Lu <hongjiu.lu@intel.com>
266
267 * elf.c (_bfd_elf_close_and_cleanup): Only call
268 _bfd_dwarf2_cleanup_debug_info on bfd_object.
269
01d9ad14
L
2702005-05-05 H.J. Lu <hongjiu.lu@intel.com>
271
272 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
273 "__bss_start" instead of "_edata" as fallback.
274
b36b76cb
L
2752005-05-05 H.J. Lu <hongjiu.lu@intel.com>
276
277 * bfd-in2.h: Regenerated.
278
eac338cf
PB
2792005-05-05 Paul Brook <paul@codesourcery.com>
280
281 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
282 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
283 elf-vxworks.lo.
284 * configure: Regenerate.
285 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
286 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
287 (elf32-i386.lo): Depend on elf-vxworks.h.
288 (elf-vxworks.lo): New rule.
289 * Makefile.in: Regenerate.
290 * elf-bfd.h (elf_backend_data): Update type of
291 elf_backend_emit_relocs.
292 (_bfd_elf_link_output_relocs): Update prototype.
293 * elflink.c (_bfd_elf_link_output_relocs): Always use
294 bed->elf_backend_emit_relocs when outputting relocations.
295 * elfxx-target.h (elf_backend_emit_relocs): Default to
296 _bfd_elf_link_output_relocs.
297 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
298 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
299 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
300 (elf_i386_plt0_entry): Remove padding.
301 (elf_i386_pic_plt0_entry): Ditto.
302 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
303 (PLT_NON_JUMP_SLOT_RELOCS): Define.
304 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
305 plt0_pad_byte fields.
306 (elf_i386_link_hash_table_create): Zero them.
307 (elf_i386_create_dynamic_sections): Create static relocation section.
308 (allocate_dynrelocs): Allocate space for static PLT relocations.
309 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
310 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 311 if we have exported symbols from them.
eac338cf
PB
312 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
313 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
314 VxWorks.
315 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
316 Add relocation for GOT location. Fill in PLT static relocations.
317 (elf_i386_vxworks_link_hash_table_create): New function.
318 (elf_i386_vxworks_link_output_symbol_hook): New function.
319 * elf-vxworks.h: New file.
320
3496cb2a
L
3212005-05-05 H.J. Lu <hongjiu.lu@intel.com>
322
323 * section.c (bfd_make_section_anyway_with_flags): New.
324 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
325 (bfd_make_section_with_flags): New.
326 (bfd_make_section): Call bfd_make_section_with_flags.
327
328 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
329 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
330 instead of bfd_make_section/bfd_make_section and don't call
331 bfd_set_section_flags.
332 (mn10300_elf_check_relocs): Likewise.
333 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
334 * elf32-arm.c (create_got_section): Likewise.
335 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
336 (elf32_arm_check_relocs): Likewise.
337 * elf32-cris.c (cris_elf_check_relocs): Likewise.
338 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
339 (_frv_create_got_section): Likewise.
340 (elf32_frvfdpic_create_dynamic_sections): Likewise.
341 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
342 (elf32_hppa_check_relocs): Likewise.
343 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
344 (i370_elf_check_relocs): Likewise.
345 * elf32-i386.c (create_got_section): Likewise.
346 (elf_i386_check_relocs): Likewise.
347 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
348 (create_got_section): Likewise.
349 (m32r_elf_create_dynamic_sections): Likewise.
350 (m32r_elf_check_relocs): Likewise.
351 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
352 * elf32-ppc.c (ppc_elf_create_got): Likewise.
353 (ppc_elf_create_dynamic_sections): Likewise.
354 (ppc_elf_add_symbol_hook): Likewise.
355 (ppc_elf_check_relocs): Likewise.
356 * elf32-s390.c (create_got_section): Likewise.
357 (elf_s390_check_relocs): Likewise.
358 * elf32-sh.c (create_got_section): Likewise.
359 (sh_elf_create_dynamic_sections): Likewise.
360 (sh_elf_check_relocs): Likewise.
361 * elf32-vax.c (elf_vax_check_relocs): Likewise.
362 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
363 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
364 (add_extra_plt_sections): Likewise.
365 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
366 (elf64_alpha_create_got_section): Likewise.
367 (elf64_alpha_create_dynamic_sections): Likewise.
368 (elf64_alpha_check_relocs): Likewise.
369 * elf64-hppa.c (get_reloc_section): Likewise.
370 (get_opd): Likewise.
371 (get_plt): Likewise.
372 (get_dlt): Likewise.
373 (get_stub): Likewise.
374 (elf64_hppa_create_dynamic_sectionso): Likewise.
375 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
376 * elf64-ppc.c (create_linkage_sections): Likewise.
377 (ppc64_elf_check_relocs): Likewise.
378 * elf64-s390.c (create_got_section): Likewise.
379 (elf_s390_check_relocs): Likewise.
380 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
381 (sh64_elf64_create_dynamic_sections): Likewise.
382 * elf64-x86-64.c (create_got_section): Likewise.
383 (elf64_x86_64_check_relocs): Likewise.
384 * elflink.c (_bfd_elf_create_got_section): Likewise.
385 (_bfd_elf_link_create_dynamic_sections): Likewise.
386 (elf_link_add_object_symbols): Likewise.
387 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
388 (elfNN_ia64_create_dynamic_sections): Likewise.
389 (get_fptr): Likewise.
390 (get_pltoff): Likewise.
391 (get_reloc_section): Likewise.
392 (elfNN_ia64_object_p): Likewise.
393 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
394 (mips_elf_create_compact_rel_section): Likewise.
395 (mips_elf_create_got_section): Likewise.
396 (_bfd_mips_elf_create_dynamic_sections): Likewise.
397 * elfxx-sparc.c (create_got_section): Likewise.
398 (_bfd_sparc_elf_check_relocs): Likewise.
399
400 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
401 on linker created sections.
402
59fef9e7
L
4032005-05-05 H.J. Lu <hongjiu.lu@intel.com>
404
405 PR 882
406 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
407 script on executable.
408
35330cce
NC
4092005-05-05 John Levon <levon@movementarian.org>
410
411 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
412 allocated memory before returning.
413 (decode_line_info): Likewise.
414 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
415 allocated by functions in this file.
416 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 417 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
418 _bfd_dwarf2_cleanup_debug_info.
419
4a2a2686
HPN
4202005-05-05 Hans-Peter Nilsson <hp@axis.com>
421
422 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
423 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
424 * configure, config.in, Makefile.in: Regenerate.
425 * sysdep.h (stpcpy): Revert last change.
426
0baace35
HPN
4272005-05-05 Hans-Peter Nilsson <hp@axis.com>
428
429 * sysdep.h (stpcpy): Wrap declaration in parentheses.
430
5a260b66
L
4312005-05-04 H.J. Lu <hongjiu.lu@intel.com>
432
433 * elfxx-ia64.c (ARCH_SIZE): New.
434 (LOG_SECTION_ALIGN): Likewise.
435 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
436 align relocation sections.
437 (get_fptr): Likewise.
438 (get_reloc_section): Likewise.
439 (elfNN_ia64_tprel_base): Likewise.
440 (elfNN_ia64_check_relocs): Support 32bit relocations.
441 (allocate_global_fptr_got): Likewise.
442 (allocate_dynrel_entries): Likewise.
443 (set_got_entry): Likewise.
444 (set_pltoff_entry): Likewise.
445 (elfNN_ia64_relocate_section): Likewise.
446
4472005-05-04 H.J. Lu <hongjiu.lu@intel.com>
448
449 * configure.in: Add AC_CHECK_DECLS(stpcpy).
450 * configure: Regenerate.
451 * config.in: Likewise.
452
453 * sysdep.h (stpcpy): New.
454
3e110533
NC
4552005-05-04 Nick Clifton <nickc@redhat.com>
456
457 * Update the address and phone number of the FSF organization in
458 the GPL notices in the following files:
459 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
460 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
461 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
462 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
463 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
464 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
465 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
466 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
467 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
468 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
469 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
470 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
471 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
472 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
473 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
474 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
475 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
476 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
477 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
478 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
479 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
480 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
481 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
482 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
483 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
484 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
485 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
486 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
487 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
488 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
489 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
490 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
491 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
492 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
493 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
494 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
495 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
496 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
497 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
498 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
499 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
500 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
501 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
502 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
503 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
504 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
505 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
506 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
507 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
508 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
509 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
510 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
511 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
512 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
513 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
514 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
515 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
516 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
517 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
518 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
519 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
520 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
521 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
522 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
523 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
524 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
525 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
526 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
527 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
528 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 529 hosts/alphavms.h
3e110533 530
f652615e
L
5312005-05-04 H.J. Lu <hongjiu.lu@intel.com>
532
533 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
534 * bfd-in2.h: Regenerated.
535
536 * elflink.c (bfd_elf_set_symbol): New.
537 (_bfd_elf_provide_symbol): Call it.
538 (_bfd_elf_provide_section_bound_symbols): New.
539
c5e2cead
L
5402005-05-04 H.J. Lu <hongjiu.lu@intel.com>
541
542 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
543 at the end, if a strong definition has already been seen.
544
8423293d
AM
5452005-05-04 Alan Modra <amodra@bigpond.net.au>
546
547 * section.c (struct bfd_section): Replace link_order_head and
548 link_order_tail with map_head and map_tail union.
549 (STD_SECTION): Update.
550 (_bfd_strip_section_from_output): Delete.
551 * aoutx.h: Update throughout for above changes.
552 * coff-ppc.c: Likewise.
553 * cofflink.c: Likewise.
554 * ecoff.c: Likewise.
555 * elf-eh-frame.c: Likewise.
556 * elf-m10300.c: Likewise.
557 * elf.c: Likewise.
558 * elf32-arm.c: Likewise.
559 * elf32-cris.c: Likewise.
560 * elf32-hppa.c: Likewise.
561 * elf32-i386.c: Likewise.
562 * elf32-m32r.c: Likewise.
563 * elf32-m68hc1x.c: Likewise.
564 * elf32-m68k.c: Likewise.
565 * elf32-ppc.c: Likewise.
566 * elf32-s390.c: Likewise.
567 * elf32-sh.c: Likewise.
568 * elf32-vax.c: Likewise.
569 * elf32-xtensa.c: Likewise.
570 * elf64-alpha.c: Likewise.
571 * elf64-hppa.c: Likewise.
572 * elf64-ppc.c: Likewise.
573 * elf64-s390.c: Likewise.
574 * elf64-sh64.c: Likewise.
575 * elf64-x86-64.c: Likewise.
576 * elflink.c: Likewise.
577 * elfxx-ia64.c: Likewise.
578 * elfxx-mips.c: Likewise.
579 * elfxx-sparc.c: Likewise.
580 * linker.c: Likewise.
581 * merge.c: Likewise.
582 * pdp11.c: Likewise.
583 * xcofflink.c: Likewise.
584 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
585 out from bfd_elf_size_dynamic_sections.
586 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
587 * bfd-in2.h: Regenerate.
588
04dd1667
AM
5892005-05-04 Alan Modra <amodra@bigpond.net.au>
590
591 * section.c (bfd_section_list_remove): Don't clear s->next.
592 (bfd_section_list_append): Always init s->prev.
593 (bfd_section_list_prepend): Define.
594 (bfd_section_list_insert_after): Minor optimization.
595 (bfd_section_removed_from_list): Rewrite.
596 * elf.c (assign_section_numbers): Simplify list traversal now that
597 bfd_section_list_remove doesn't destroy removed section next ptr.
598 * sunos.c (sunos_add_dynamic_symbols): Likewise.
599 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
600 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
601 * bfd-in2.h: Regenerate.
602
5daa8fe7
L
6032005-05-02 H.J. Lu <hongjiu.lu@intel.com>
604
605 * bfd.c (bfd): Remove section_tail and add section_last.
606 (bfd_preserve): Likewise.
607 (bfd_preserve_save): Likewise.
608 (bfd_preserve_restore): Likewise.
609 * opncls.c (_bfd_new_bfd): Likewise.
610
611 * coffcode.h (coff_compute_section_file_positions): Updated.
612 (coff_compute_section_file_positions): Likewise.
613 * elf.c (assign_section_numbers): Likewise.
614 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
615 * elf64-mmix.c (mmix_elf_final_link): Likewise.
616 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
617 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
618 * sunos.c (sunos_add_dynamic_symbols): Likewise.
619 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
620
621 * ecoff.c (bfd_debug_section): Initialize prev.
622
623 * section.c (bfd_section): Add prev.
624 (bfd_section_list_remove): Updated.
625 (bfd_section_list_append): New.
626 (bfd_section_list_insert_after): New.
627 (bfd_section_list_insert_before): New.
628 (bfd_section_list_insert): Removed.
629 (bfd_section_removed_from_list): Updated.
630 (STD_SECTION): Initialize prev.
631 (bfd_section_init): Updated.
632 (bfd_section_list_clear): Updated.
633
634 * bfd-in2.h: Regenerated.
635
a31501e9
L
6362005-05-02 H.J. Lu <hongjiu.lu@intel.com>
637
638 * elf.c (_bfd_elf_new_section_hook): Don't call
639 _bfd_elf_get_sec_type_attr on sections from input files.
640
d05da6a8
L
6412005-05-02 H.J. Lu <hongjiu.lu@intel.com>
642
643 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
644 hash table size 16699 instead of bfd_hash_table_init.
645
a67b080b
PB
6462005-05-01 Paul Brook <paul@codesourcery.com>
647
648 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
649 definition has already been seen.
650
c6596c5e
PB
6512005-05-01 Paul Brook <paul@codesourcery.com>
652
653 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
654 R_ARM_PLT32 the same as R_ARM_PC24.
655 (arm_add_to_rel): Ditto.
656
9a813b7a
DJ
6572005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
658
659 * config.bfd: Add h8300*-*-rtemscoff.
660 Switch h8300*-*-rtems* to elf.
661
aa7eb06d
DJ
6622005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
663
664 * aclocal.m4, Makefile.in: Regnerated.
665
fa0d1cab
PB
6662005-04-28 Paul Brook <paul@codesourcery.com>
667
668 Merge changes only applied to Makefile.in.
669 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
670 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
671 (elfxx-sparc.lo): New rule.
672 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
673 (elf64-sparc.lo): Likewise.
674
0291d291
NC
6752005-04-28 Julian Brown <julian@codesourcery.com>
676
677 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
678 import.
679
26c61ae5
L
6802005-04-27 H.J. Lu <hongjiu.lu@intel.com>
681
682 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
683
684 * elf.c (bfd_elf_sym_name): Updated.
685 (group_signature): Likewise.
686 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
687 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
688 (ppc64_elf_edit_toc): Likewise.
689 (ppc64_elf_relocate_section): Likewise.
690 * elfcode.h (elf_slurp_symbol_table): Likewise.
691 * elflink.c (elf_link_input_bfd): Likewise.
692
693 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
694 bfd_elf_sym_name to get local symbol name when reporting errors.
695
8c19749a
NC
6962005-04-27 Nick Clifton <nickc@redhat.com>
697
698 * elflink.c (elf_link_input_bfd): Handle the case where a badly
699 formatted input file results in a reloc which has no associated
700 global symbol.
701
8e5b6e16
JG
7022005-04-26 Jerome Guitton <guitton@gnat.com>
703
704 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
705
e459dc7b
DM
7062005-04-25 David S. Miller <davem@davemloft.net>
707
708 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
709 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
710 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
711 Likewise.
712
6d633fd2
L
7132005-04-25 H.J. Lu <hongjiu.lu@intel.com>
714
715 PR 858
716 * elflink.c (elf_link_input_bfd): Make non-debugging reference
717 to discarded section an error.
718
d34a2b1d
JG
7192005-04-21 Jerome Guitton <guitton@gnat.com>
720
721 * configure.in: Replace BFD_NEED_DECLARATION checks by the
722 corresponding AC_CHECK_DECLS.
723 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
724 HAVE_DECL_*.
725 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
726 * configure: Regenerate.
727 * config.in: Ditto.
728
ff01938b
AS
7292005-04-21 Andreas Schwab <schwab@suse.de>
730
c2e70a82
AS
731 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
732 unsigned from type of dynamic_interpreter.
733 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
734 casts again.
735
ff01938b
AS
736 * elf.c (assign_section_numbers): Fix comment.
737
0858d3ec
JG
7382005-04-21 Jerome Guitton <guitton@gnat.com>
739
740 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
741 for struct som_exec_auxhdr fields.
742
7920ce38
NC
7432005-04-21 Nick Clifton <nickc@redhat.com>
744
745 * aout-adobe.c: Convert to ISO C and fix formatting.
746 * aout-arm.c: Convert to ISO C and fix formatting.
747 * aout-cris.c: Convert to ISO C and fix formatting.
748 * aout-ns32k.c: Convert to ISO C and fix formatting.
749 * aout-tic30.c: Convert to ISO C and fix formatting.
750 * coffcode.h: Convert to ISO C and fix formatting.
751 * coffswap.h: Convert to ISO C and fix formatting.
752 * i386aout.c: Convert to ISO C and fix formatting.
753 * libaout.h: Convert to ISO C and fix formatting.
754 * libcoff-in.h: Convert to ISO C and fix formatting.
755 * libcoff.h: Convert to ISO C and fix formatting.
756 * libecoff.h: Convert to ISO C and fix formatting.
757 * libnlm.h: Convert to ISO C and fix formatting.
758 * libpei.h: Convert to ISO C and fix formatting.
759 * libxcoff.h: Convert to ISO C and fix formatting.
760 * nlm-target.h: Convert to ISO C and fix formatting.
761 * nlm.c: Convert to ISO C and fix formatting.
762 * nlm32-alpha.c: Convert to ISO C and fix formatting.
763 * nlm32-i386.c: Convert to ISO C and fix formatting.
764 * nlm32-ppc.c: Convert to ISO C and fix formatting.
765 * nlm32-sparc.c: Convert to ISO C and fix formatting.
766 * nlmcode.h: Convert to ISO C and fix formatting.
767 * nlmswap.h: Convert to ISO C and fix formatting.
768 * pe-mips.c: Convert to ISO C and fix formatting.
769 * peXXigen.c: Convert to ISO C and fix formatting.
770 * peicode.h: Convert to ISO C and fix formatting.
771 * vms-gsd.c: Convert to ISO C and fix formatting.
772 * vms-hdr.c: Convert to ISO C and fix formatting.
773 * vms-misc.c: Convert to ISO C and fix formatting.
774 * vms-tir.c: Convert to ISO C and fix formatting.
775 * vms.c: Convert to ISO C and fix formatting.
776 * vms.h: Convert to ISO C and fix formatting.
777
778 * coffgen.c (coff_print_symbol): Restore correct formatting of
779 output.
780
e8be8da4
DM
7812005-04-20 David S. Miller <davem@davemloft.net>
782
783 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
784 (_bfd_sparc_elf_link_hash_table_create): Likewise.
785 (allocate_dynrelocs): Likewise.
786
ec7b76fe
JG
7872005-04-20 Jerome Guitton <guitton@gnat.com>
788
789 * configure.in: Fix the check for basename declaration. Add check
790 for declarations of ftello, ftello64, fseeko, fseeko64.
791 * configure: Regenerate.
792 * config.in: Ditto.
793 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
794
22b75d0a
DM
7952005-04-19 David S. Miller <davem@davemloft.net>
796
797 * elfxx-sparc.c: New file.
798 * elfxx-sparc.h: New file.
799 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
800 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
801 (elfxx-sparc.lo): New rule.
802 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
803 (elf64-sparc.lo): Likewise.
804 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
805 (bfd_elf64_sparc_vec): Likewise.
806 * configure: Regenerate.
807 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
808 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
809 which is more consistent with elf32-sparc.c
810
a008ac03
DJ
8112005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
812
813 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
814 (mips_elf_create_local_got_entry): Check h->root.forced_local.
815
c87b5a93
AM
8162005-04-19 Alan Modra <amodra@bigpond.net.au>
817
818 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
819 dynamic relocs in non-SEC_ALLOC sections.
820 (ppc_elf_gc_sweep_hook): Likewise.
821 (ppc_elf_relax_section): Likewise.
822 (ppc_elf_relocate_section): Likewise.
823
7cefacd3
NC
8242005-04-18 Nick Clifton <nickc@redhat.com>
825
826 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
827 assigning a value to return_value.
828
278d8f37
L
8292005-04-17 H.J. Lu <hongjiu.lu@intel.com>
830
831 PR 855
832 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
833 created group data.
834
20dbb49d
L
8352005-04-17 H.J. Lu <hongjiu.lu@intel.com>
836
837 PR 855
838 * elf.c (setup_group): Properly handle zero group count.
839
6a808a40
MK
8402005-04-17 Mark Kettenis <kettenis@gnu.org>
841
842 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
843 (som_is_subspace, compare_subspaces, som_compute_checksum)
844 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
845 protoypes.
846 (hppa_som_reloc, compare_syms, compare_subspaces)
847 (som_print_symbol, som_get_section_contents)
848 (som_set_section_contents): Remove space after 'void *'.
849 (som_bfd_print_private_bfd_data): Use %lx to print longs.
850 (som_bfd_merge_private_bfd_data)
851 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
852 defines.
853
33bfe774
JB
8542004-04-15 Julian Brown <julian@codesourcery.com>
855
856 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
857 * bfd-in2.h: Regenerate.
858 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
859 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
860 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
861 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
862 relocations if requested to.
863 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
864 use_blx rather than symbian_p.
865 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
866 use_blx is in effect.
867 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
868 for SymbianOS.
869
745c12f8
NC
8702005-04-15 Nick Clifton <nickc@redhat.com>
871
872 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
873 values.
874
2e8b3a61
AM
8752005-04-15 Alan Modra <amodra@bigpond.net.au>
876
877 PR ld/815
878 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
879 used as a list pointer.
880
9e9b66a9
AM
8812005-04-14 Alan Modra <amodra@bigpond.net.au>
882
883 * Makefile.am (NO_WERROR): Define.
884 * warning.m4: New file
885 * acinclude.m4: Include warning.m4.
886 * configure.in: Invoke AM_BINUTILS_WARNINGS.
887 * Makefile.in: Regenerate.
888 * configure: Regenerate.
889
8699aa54
AM
8902005-04-14 Alan Modra <amodra@bigpond.net.au>
891
92ceba1e
AM
892 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
893 Write trailing padding.
894
8699aa54
AM
895 * merge.c (merge_strings): Round up section size for alignment.
896
40937810
JJ
8972005-04-14 David S. Miller <davem@davemloft.net>
898
899 Add TLS support for 64-bit Sparc ELF.
900 * elf64-sparc.c (sparc64_elf_dyn_relocs,
901 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
902 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
903 sparc64_elf_hash_entry, sparc64_elf_tdata,
904 sparc64_elf_local_got_tls_type): New defines.
905 (sparc64_elf_mkobject): New function.
906 (sparc64_elf_link_hash_table): Add members for dynamic linker
907 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
908 uion to track TLS GOT references. Add sym_sec to cache
909 mappings from local sym to section.
910 (link_hash_newfunc): New function.
911 (sparc64_elf_bfd_link_hash_table_create): Rename to
912 sparc64_elf_link_hash_table_create for consistency.
913 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
914 (sparc64_elf_create_dynamic_sections): Initialize new section
915 members of sparc64_elf_link_hash_table. Only init srelbss
916 if not-shared.
917 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
918 New functions.
919 (SPARC_NOP): Define.
920 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
921 sparc64_elf_plt_ptr_offset): Delete.
922 (sparc64_plt_entry_build): New function to build PLT entries
923 gradually instread of all at once at the end of linking.
924 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
925 local vars. Get them from sparc64_elf_hash_table instead.
926 Check early on if r_symndx is in bounds. Handle TLS transitions.
927 Account for TLS GOT references and DF_STATIC_TLS, as needed.
928 For TLS relocs, record the tls_type in either
929 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
930 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
931 to the __tls_get_addr symbol. For PLT relocs, track references
932 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
933 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
934 symbol references, count the number of relocations needed for
935 that symbol. For default switch case, don't error, this lets
936 the TLS relocs not explicitly handled by this function get
937 accepted.
938 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
939 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
940 it from sparc64_elf_hash_table. Store the real PLT offset
941 in h->plt.offset, and build PLT entries one at a time. Also
942 get .dynbss section pointer from htab.
943 (allocate_dynrelocs, readonly_dynrelocs,
944 sparc64_omit_section_dynsym): New functions.
945 (sparc64_elf_omit_section_dynsym): Use these new functions as
946 helpers.
947 (dtpoff_base, tpoff): New functions.
948 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
949 locals, get them from sparc64_elf_hash_table. Handle TLS
950 relocations and refcounting in main relocation loop.
951 (sparc64_elf_finish_dynamic_symbol): Use
952 sparc64_elf_link_hash_table. Build PLT entries as we see
953 them. Handle TLS GOT relocations.
954 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
955 from sparc64_elf_hash_table. Initialize only PLT header
956 not all entries since we not build PLT entries one by one.
957 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
958 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
959 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
960
e75a280b
L
9612005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
962
963 * elflink.c (elf_link_input_bfd): Update check for removed
964 sections.
965
ceae3e33
AM
9662005-04-12 Alan Modra <amodra@bigpond.net.au>
967
968 * Makefile.am: Run "make dep-am".
969 * Makefile.in: Regenerate.
970 * aclocal.m4: Regenerate.
971 * libcoff.h: Regenerate.
972
ab82c5b9
L
9732005-04-11 H.J. Lu <hongjiu.lu@intel.com>
974
975 * linker.c (_bfd_generic_link_output_symbols): Also check if
976 the output section of an input section has been removed from
977 the output file.
978
979 * section.c (bfd_section_list_remove): Clear the next field
980 of the removed section.
981 (bfd_section_removed_from_list): New.
982 * bfd-in2.h: Regenerated.
983
bd695bcc
JJ
9842005-04-11 David S. Miller <davem@davemloft.net>
985
986 * elf32-sparc.c (elf32_sparc_relocate_section,
987 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
988 R_SPARC_TLS_LE_{HIX22,LOX10}.
989 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
990 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
991 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
992 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
993
b5b2699c
L
9942005-04-11 H.J. Lu <hongjiu.lu@intel.com>
995
996 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
997
116c20d2 9982005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 999
116c20d2
NC
1000 * aout-target.h: Convert to ISO C.
1001 * aoutf1.h: Convert to ISO C.
1002 * aoutx.h: Convert to ISO C.
1003 * bout.c: Convert to ISO C.
1004 * dwarf1.c: Convert to ISO C.
1005 * ecoffswap.h: Convert to ISO C.
1006 * freebsd.h: Convert to ISO C.
1007 * genlink.h: Convert to ISO C.
1008 * ieee.c: Convert to ISO C.
1009 * ihex.c: Convert to ISO C.
1010 * libcoff-in.h: Convert to ISO C.
1011 * mach-o.c: Convert to ISO C.
1012 * mach-o.h: Convert to ISO C.
1013 * netbsd.h: Convert to ISO C.
1014 * ns32k.h: Convert to ISO C.
1015 * ns32knetbsd.c: Convert to ISO C.
1016 * oasys.c: Convert to ISO C.
1017 * pdp11.c: Convert to ISO C.
1018 * pef-traceback.h: Convert to ISO C.
1019 * pef.c: Convert to ISO C.
1020 * pef.h: Convert to ISO C.
1021 * riscix.c: Convert to ISO C.
1022 * som.c: Convert to ISO C.
1023 * som.h: Convert to ISO C.
1024 * srec.c: Convert to ISO C.
1025 * stabs.c: Convert to ISO C.
1026 * sunos.c: Convert to ISO C.
1027 * tekhex.c: Convert to ISO C.
1028 * versados.c: Convert to ISO C.
1029 * version.h: Convert to ISO C.
1030 * xcoff-target.h: Convert to ISO C.
1031 * xcofflink.c: Convert to ISO C.
1032 * xsym.c: Convert to ISO C.
1033 * xsym.h: Convert to ISO C.
1034
8f6277f5
PB
10352005-04-08 Paul Brook <paul@codesourcery.com>
1036
1037 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1038 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1039 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1040 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1041 (elf32_arm_to_thumb_stub): Create PIC stubs.
1042 (record_arm_to_thumb_glue): Use different stub size for relocatable
1043 images.
1044
8c1d1bb8
AM
10452005-04-05 Alan Modra <amodra@bigpond.net.au>
1046
1047 * elf64-ppc.c (dec_dynrel_count): New function split out from
1048 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1049 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1050 (ppc64_elf_tls_optimize): Likewise.
1051
8c101720
NC
10522005-04-05 Mark Kettenis <kettenis@gnu.org>
1053
1054 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1055 CORE_WCOOKIE_OFFSET.
1056 (SPARC64_WCOOKIE_OFFSET): New.
1057 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1058
429cc0ae
NC
10592005-04-05 Nick Clifton <nickc@redhat.com>
1060
1061 * po/rw.po: New translation: Kinyarwanda
1062 * configure.in (ALL_LINGUAS): Add rw
1063 * configure: Regenerate.
1064
cc2e31b9
RS
10652005-04-05 Richard Sandiford <rsandifo@redhat.com>
1066
1067 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1068 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1069 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1070 section flags.
1071 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1072 to check for SHT_MIPS_OPTIONS sections.
1073 (_bfd_mips_elf_set_section_contents): Likewise.
1074
8236346f
EC
10752005-04-04 Eric Christopher <echristo@redhat.com>
1076
1077 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1078 Clean up gp handling code.
1079
7e4111ad
L
10802005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1081
1082 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 1083 group section.
da9f89d4
L
1084 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1085 sections for relocatable files only. Remove the linker created
1086 group sections.
1087 (_bfd_elf_compute_section_file_positions): Pass link_info to
1088 assign_section_numbers.
1089
1090 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1091 (elf_backend_object_p): Defined.
7e4111ad 1092
96982dc9
L
10932005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1094
1095 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1096
a13afe8e
FF
10972005-04-03 Fred Fish <fnf@specifixinc.com>
1098
1099 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1100 dwarf_ranges_size members.
1101 (struct comp_unit): Add base_address member.
1102 (struct funcinfo): Replace low/high members with an arange.
1103 (arange_add): Replace incoming "unit" parameter with "abfd" and
1104 "first_arange" pointers. Reorganize/rewrite function body.
1105 (decode_line_info): Change arange_add call to pass bfd and arange
1106 pointers.
1107 (lookup_address_in_line_info_table): Use arange list instead of
1108 individual low/high members. Walk function's arange list to find
1109 lowest PC in list, to test for overlapping functions.
1110 (read_debug_ranges): New function, reads the debug_ranges section.
1111 (lookup_address_in_function_table): Use arange list instead of
1112 individual low/high members. Rewrite to find smallest range that
1113 matches.
1114 (read_rangelist): Read a given rangelist from debug_ranges.
1115 (scan_unit_for_functions): Use arange list instead of individual
1116 low/high members. Handle a DW_AT_ranges attribute.
1117 (parse_comp_unit): Use arange list instead of individual low/high
1118 members. Save comp unit base address. Handle a DW_AT_ranges
1119 attribute.
1120
2796fd96
L
11212005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1122
1123 * elf.c (assign_section_numbers): Really use the kept section.
1124
01b3c8ab
L
11252005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1126
1127 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1128
1129 * elf.c (assign_section_numbers): When sh_link points to a
1130 discarded section, call _bfd_elf_check_kept_section to see if
1131 the kept section can be used. Otherwise reject sh_link
1132 pointing to discarded section.
1133
1134 * elflink.c (_bfd_elf_check_kept_section): New.
1135 (elf_link_input_bfd): Use it.
1136
35090471
AM
11372005-04-01 Alan Modra <amodra@bigpond.net.au>
1138
1139 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1140 that we no longer need.
1141
7356fed5
AM
11422005-04-01 Alan Modra <amodra@bigpond.net.au>
1143
1144 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1145 rather than 0.
77623a34 1146 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 1147
28b13744
L
11482005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * elf.c (assign_section_numbers): Fix a typo.
1151
c93625e2
L
11522005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1153
1154 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1155 error message.
1156 (_bfd_elf_section_already_linked): Likewise.
1157
fddc4048
JG
11582005-03-31 Jerome Guitton <guitton@gnat.com>
1159
1160 * config.in: Regenerate.
1161
2e9ebff5
JG
11622005-03-31 Jerome Guitton <guitton@gnat.com>
1163
c93625e2
L
1164 * config.in (HAVE_DECL_BASENAME): New configure macro.
1165 * configure.in: Check for basename.
1166 * configure: Regenerate.
2e9ebff5 1167
05ea83ed
JB
11682005-03-30 Julian Brown <julian@codesourcery.com>
1169
1170 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1171 bfd_elf32_is_arm_mapping_symbol_name.
1172 * bfd-in2.h: Regenerate.
1173 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1174 bfd_elf32_is_arm_mapping_symbol_name.
1175 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1176 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1177 (arm_elf_find_function): Likewise.
1178 (elf32_arm_output_symbol_hook): Likewise.
1179
9d2da7ca
JB
11802005-03-30 Julian Brown <julian@codesourcery.com>
1181
1182 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1183 * bfd-in2.h: Regenerate.
1184 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1185 bfd_elf32_is_arm_mapping_symbol_name.
1186 (elf32_arm_output_symbol_hook): Likewise.
1187 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1188 mapping symbols.
1189 (is_arm_mapping_symbol_name): Function moved from here...
1190 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1191 and made global.
1192
efa9bda4
AL
11932005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1194
1195 * configure.in: Check for ffs decl and alphabetize.
1196 * config.in: Regenerate.
1197 * configure: Regenerate.
d7128ce4 1198 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 1199
09a9d560
FF
12002005-03-29 Fred Fish <fnf@specifixinc.com>
1201
1202 * dwarf2.c (struct comp_unit): Fix typo.
1203 (scan_unit_for_functions): Remove unused local variable "name"
1204 and dead code that set it.
1205
ba93b8ac
DJ
12062005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1207 Phil Blundell <philb@gnu.org>
1208
1209 * bfd-in2.h, libbfd.h: Regenerated.
1210 * reloc.c: Add ARM TLS relocations.
1211 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1212 relocations.
1213 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1214 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1215 (elf32_arm_tls_ie32_howto): New.
1216 (elf32_arm_howto_from_type): Support TLS relocations.
1217 (elf32_arm_reloc_map): Likewise.
1218 (elf32_arm_reloc_type_lookup): Likewise.
1219 (TCB_SIZE): Define.
1220 (struct elf32_arm_obj_tdata): New.
1221 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1222 (elf32_arm_mkobject): New function.
1223 (struct elf32_arm_relocs_copied): Add pc_count.
1224 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1225 (GOT_TLS_IE): Define.
1226 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1227 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1228 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1229 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1230 (dtpoff_base, tpoff): New functions.
1231 (elf32_arm_final_link_relocate): Handle TLS relocations.
1232 (IS_ARM_TLS_RELOC): Define.
1233 (elf32_arm_relocate_section): Warn about TLS mismatches.
1234 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1235 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1236 TLS relocations and pc_count.
1237 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1238 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1239 calls.
1240 (elf32_arm_size_dynamic_sections): Handle TLS.
1241 (elf32_arm_finish_dynamic_symbol): Likewise.
1242 (bfd_elf32_mkobject): Define.
1243
71a976dd
DJ
12442005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1245
1246 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1247 relocation types. Don't count relocations which will use a PLT.
1248
7e7353ed
JB
12492005-03-29 Joel Brobecker <brobecker@gnat.com>
1250
1251 * elf.c (elfcore_grok_nto_status): Print tid as long.
1252 (elfcore_grok_nto_regs): Likewise.
1253
166856d7
JB
12542005-03-29 Joel Brobecker <brobecker@gnat.com>
1255
40937810 1256 * irix-core.c: Remove some unnecessary prototypes.
166856d7 1257
40f85900
JB
12582005-03-28 Joel Brobecker <brobecker@adacore.com>
1259
1260 * irix-core.c: Convert to ISO C.
1261
aa2e06ba
JB
12622005-03-28 Joel Brobecker <brobecker@adacore.com>
1263
1264 * irix-core.c (do_sections): Replace + by | in expression.
1265 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1266 to unused parameters to avoid a compiler warning.
1267
832bc186
MK
12682005-03-28 Mark Kettenis <kettenis@gnu.org>
1269
1270 * netbsd-core.c: Convert to ISO C. Fix formatting.
1271
82f0cfbd
EC
12722005-03-24 Eric Christopher <echristo@redhat.com>
1273
1274 * elfxx-mips.c: Revert previous patch.
1275
d7b9976f
NC
12762005-03-24 Nick Clifton <nickc@redhat.com>
1277
1278 * targets.c (_bfd_target_vector): Only include the
1279 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1280 all targets enabled.
1281
074d327a
NC
12822005-03-24 James E Wilson <wilson@specifixinc.com>
1283
1284 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1285 (BFD64_BACKENDS): Add elf32-ia64.lo.
1286 * Makefile.in: Regenerate.
1287
cc27e1dc
EC
12882005-03-23 Eric Christopher <echristo@redhat.com>
1289
1290 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1291 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1292 after emitting relocation.
1293 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1294 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1295 and readonly_reloc.
1296
ed84e695
NC
12972005-03-23 Mike Frysinger <vapier@gentoo.org>
1298 Nick Clifton <nickc@redhat.com>
1299
1300 * config.bfd: Accept any C library to accompany a GNU Linux
1301 implementation, not just the GNU C library.
1302 * configure.in: Likewise.
1303 * configure: Regenerate.
1304
81e1b023
L
13052005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 * bfd-in.h (_bfd_elf_provide_symbol): New.
1308 * bfd-in2.h: Regenerated.
1309
1310 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1311 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1312 of set_linker_sym.
1313
1314 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1315 from elf32-ppc.c.
1316
672c2d7e
HPN
13172005-03-22 Hans-Peter Nilsson <hp@axis.com>
1318
1319 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1320
1fbc7e7a
BW
13212005-03-22 Bob Wilson <bob.wilson@acm.org>
1322
1323 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1324 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1325 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1326 (xtensa_opcode_decode): Rearrange code.
1327
c8e7bf0d
NC
13282005-03-22 Nick Clifton <nickc@redhat.com>
1329
1330 * binary.c: Convert to ISO C90 formatting.
1331 * coff-arm.c: Convert to ISO C90 formatting.
1332 * coffgen.c: Convert to ISO C90 formatting.
1333 * elf32-gen.c: Convert to ISO C90 formatting.
1334 * elf64-gen.c: Convert to ISO C90 formatting.
1335 * hash.c: Convert to ISO C90 formatting.
1336 * ieee.c: Convert to ISO C90 formatting.
1337
28a094c2
DJ
13382005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1339
1340 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1341 unresolved symbols in R_ARM_NONE relocations.
1342
0945cdfd
DJ
13432005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1344
1345 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1346 UNRESOLVED_RELOC_P argument. Set it appropriately.
1347 (elf32_arm_relocate_section): Update call to
1348 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1349 unresolved_reloc instead.
1350
11d2f718
AM
13512005-03-23 Alan Modra <amodra@bigpond.net.au>
1352
1353 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1354 .gnu.warning.* sections.
1355
76750a2f
AM
13562005-03-22 Alan Modra <amodra@bigpond.net.au>
1357
1358 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1359 written_address_p.
1360 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1361 (elf_create_pointer_linker_section): Delete info parm. Don't make
1362 h dynamic. Don't set written_address_p.
1363 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1364 (bfd_put_ptr): Delete.
1365 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1366 Always write section contents. Assert global sym is def_regular.
1367 Use offset bottom bit as a written flag.
1368 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1369 calls.
1370
f85f57ad
AM
13712005-03-22 Alan Modra <amodra@bigpond.net.au>
1372
1373 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1374 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1375 and end syms.
1376
2dc773a0
NC
13772005-03-21 Nick Clifton <nickc@redhat.com>
1378
1379 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1380 targets.
1381 (t2a1_bx_pc_insn): Likewise.
1382 (t2a2_noop_insn): Likewise.
1383 (t2a3_b_insn): Likewise.
1384 (t2a1_push_insn): Likewise.
1385 (t2a2_ldr_insn): Likewise.
1386 (t2a3_mov_insn): Likewise.
1387 (t2a4_bx_insn): Likewise.
1388 (t2a5_pop_insn): Likewise.
1389 (t2a6_bx_insn): Likewise.
1390 (coff_arm_relocate_section): Only declare the high_address
1391 variable for non WINCE targets.
1392
644285ef
AM
13932005-03-22 Alan Modra <amodra@bigpond.net.au>
1394
1395 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1396 SEC_LINKER_CREATED. Attach to dynobj.
1397 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1398
c9a2f333
AM
13992005-03-21 Alan Modra <amodra@bigpond.net.au>
1400
1401 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1402 sym_offset. Add name, bss_name, sym_name, sym_val.
1403 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1404 Add sdata array of elf_linker_section_t.
1405 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1406 (enum elf_linker_section_enum): Delete.
1407 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1408 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1409 the special sections are needed. Adjust htab->sdata refs.
1410 Ensure dynobj is set in sreloc code.
1411 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1412 (ppc_elf_set_sdata_syms): New function.
1413 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1414 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1415 sym_val instead of sym_hash.
1416 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1417
8853c3d3
AM
14182005-03-21 Alan Modra <amodra@bigpond.net.au>
1419
1420 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1421 (ppc_elf_merge_private_bfd_data): Likewise.
1422
2bb04cf2
AM
14232005-03-21 Alan Modra <amodra@bigpond.net.au>
1424
1425 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1426 (ppc_elf_create_linker_section): Don't create rel_section.
1427 (elf_create_pointer_linker_section): Don't size relocs.
1428 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1429 Don't generate relocs.
1430 (ppc_elf_relocate_section): Adjust calls to
1431 elf_finish_pointer_linker_section.
1432
d2663f46
AM
14332005-03-21 Alan Modra <amodra@bigpond.net.au>
1434
1435 * elf32-ppc.c (is_ppc_elf_target): New function.
1436 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1437 for bfd_target_elf_flavour. Do this test before endian check.
1438 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1439 (ppc_elf_size_dynamic_sections): Likewise.
1440
6dc132d9
L
14412005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1442
1443 * elf-bfd.h (elf_backend_data): Add int to
1444 elf_backend_section_from_shdr.
1445 (bfd_elf_section_data): Update comment for this_idx.
1446 (_bfd_elf_make_section_from_shdr): Add int.
1447 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1448
1449 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1450 and use it to set this_idx in bfd_elf_section_data.
1451 (bfd_section_from_shdr): Pass shindex to
1452 _bfd_elf_make_section_from_shdr.
1453 (_bfd_elf_section_from_bfd_section): Use this_idx in
1454 bfd_elf_section_data to find section index.
1455
1456 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1457 index and pass it to _bfd_elf_make_section_from_shdr.
1458 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1459 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1460 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1461 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1462 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1463 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1464 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1465 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1466 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1467
cabd4ccc
DS
14682005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1469 Ross Ridge <rridge@csclub.uwaterloo.ca>
1470
1471 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1472 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1473 cases. Add comment.
1474
7451fd89
L
14752005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1476
1477 * elflink.c (elf_mark_used_section): Remove check for special
1478 sections.
1479
b4677f03
AS
14802005-03-18 Andreas Schwab <schwab@suse.de>
1481
1482 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1483 from bfd_vma to ia64_insn, remove broken cast.
1484
238d258f
NC
14852005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1486
8853c3d3 1487 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
1488 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1489 elf_m68k_finish_dynamic_sections): Use it.
1490
b294bdf8
MM
14912005-03-17 Paul Brook <paul@codesourcery.com>
1492 Dan Jacobowitz <dan@codesourcery.com>
1493 Mark Mitchell <mark@codesourcery.com>
1494
1495 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1496 (elf32_arm_additional_program_headers): Likewise.
1497 (elf_backend_modify_segment_map): Define.
1498 (elf_backend_additional_program_headers): Likewise.
1499 (elf32_arm_symbian_modify_segment_map): Use
1500 elf32_arm_modify_segment_map.
1501
257a4820
L
15022005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1503
1504 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1505 for special sections.
1506
554220db
AM
15072005-03-18 Alan Modra <amodra@bigpond.net.au>
1508
1509 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1510 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1511 section_sym_count param, and return number of section symbols.
1512 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1513 .dynsym contents. Don't bother calling swap_symbol_out on the
1514 first all-zero dynsym.
1515 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1516 special sections like bfd_abs_section.
1517 (bfd_elf_gc_sections): Spelling fix.
1518
36868d45
NC
15192005-03-16 Fred Fish <fnf@specifixinc.com>
1520
1521 PR binutils/790
1522 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1523 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1524
57316bff
L
15252005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1526
1527 * elflink.c (elf_mark_used_section): New.
1528 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1529 non-relocatable link if we don't do GC.
1530
1ad12f97
NC
15312005-03-16 Nick Clifton <nickc@redhat.com>
1532 Ben Elliston <bje@au.ibm.com>
1533
569acd2c 1534 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 1535 compiler command line. Enabled by default. Disable via
569acd2c 1536 --disable-werror.
1ad12f97
NC
1537 * configure: Regenerate.
1538
3b5d3310
NC
15392005-03-16 Nick Clifton <nickc@redhat.com>
1540
1541 * ecoff.c: Convert to ISO C90 formatting.
1542
25dbc73a
AM
15432005-03-16 Alan Modra <amodra@bigpond.net.au>
1544
1545 * elf32-ppc.c: Divide file into general and linker specific
1546 functions. Sort linker functions into roughly the order in which
1547 they are called by the ELF linker code.
1548
cb2d1ef2
AM
15492005-03-16 Alan Modra <amodra@bigpond.net.au>
1550
1551 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1552 on section. Correct comment, and add FIXME.
1553 (ppc_elf_additional_program_headers): Don't bump header count for
1554 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1555 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1556 do allocate memory if they need it.
1557
34723071
NC
15582005-03-15 Mikkel Krautz <krautz@gmail.com>
1559
1560 * config.bfd (x86_64-elf): Add target.
1561
729ae8d2
AM
15622005-03-15 Alan Modra <amodra@bigpond.net.au>
1563
1564 * po/es.po: Commit new Spanish translation.
1565
f0581930
L
15662005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1567
1568 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1569 for global symbol when reporting overflow.
1570
390c0e42
JJ
15712005-03-11 Jakub Jelinek <jakub@redhat.com>
1572
1573 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1574 * libbfd.h: Rebuilt.
1575 * archive.c (_bfd_ar_spacepad): New function.
1576 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1577 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1578 coff_write_armap): Use it.
1579 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1580 uid/gid support.
1581 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1582
a2633f4e
MK
15832005-03-10 Mark Kettenis <kettenis@gnu.org>
1584
1585 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1586 has_table to the start of the function.
1587
109f7096
BE
15882005-03-10 Ben Elliston <bje@au.ibm.com>
1589
1590 * archive.c: Include hashtab.h.
1591 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1592 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1593 (hash_file_ptr): New function.
1594 (eq_file_ptr): Likewise.
1595 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1596 * libbfd-in.h: Include hashtab.h.
1597 (struct artdata): Change `cache' member type to htab_t.
1598 * libbfd.h: Rebuild.
1599
664fe1be
DJ
16002005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1601
1602 * configure.in: Bump version to 2.16.90.
1603 * configure: Regenerated.
1604
0709bb22
JJ
16052005-03-07 Jakub Jelinek <jakub@redhat.com>
1606
1607 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1608 close is a function like macro in system headers.
1609
b18e2ae5
AM
16102005-03-07 Alan Modra <amodra@bigpond.net.au>
1611
1612 PR ld/778
1613 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1614 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1615
1f170678
AM
16162005-03-06 Alan Modra <amodra@bigpond.net.au>
1617
1618 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1619
06647dfd
AM
16202005-03-05 Alan Modra <amodra@bigpond.net.au>
1621
1622 * po/bfd.pot: Regenerate.
1623
93f3fa99
AM
16242005-03-05 Alan Modra <amodra@bigpond.net.au>
1625
1626 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1627 with is_func.
1628 (func_desc_adjust): Force dot-syms local in executables as well
1629 as shared libs.
1630
bbe506e8
TS
16312005-03-04 David Daney <ddaney@avtrex.com>
1632
1633 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1634 '__gnu_local_gp' symbol used by gas -mno-shared.
1635
d27f5fa1
L
16362005-03-03 H.J. Lu <hongjiu.lu@intel.com>
1637
1638 * elf-bfd.h (elf_backend_data): Add "const char *" to
1639 elf_backend_section_from_phdr.
1640
1641 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1642 elf_backend_section_from_phdr hook.
1643
0f20cc35
DJ
16442005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1645 Joseph Myers <joseph@codesourcery.com>
1646
1647 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1648 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1649 and tls_ldm_offset.
1650 (struct mips_elf_got_per_bfd_arg): Add global_count.
1651 (struct mips_elf_count_tls_arg): New.
1652 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1653 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1654 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1655 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1656 (TLS_RELOC_P): Define.
1657 (TP_OFFSET, DTP_OFFSET): Define.
1658 (dtprel_base, tprel_base): New functions.
1659 (mips_elf_link_hash_newfunc): Initialize tls_type.
1660 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1661 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1662 TLS entries.
1663 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1664 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1665 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1666 (mips_tls_got_index): New functions.
1667 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1668 arguments. Pass them to mips_elf_create_local_got_entry. Use
1669 mips_tls_got_index.
1670 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1671 Handle TLS entries.
1672 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1673 mips_elf_create_local_got_entry.
1674 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1675 arguments. Handle TLS entries.
1676 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1677 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1678 TLS entries.
1679 (mips_elf_record_global_got_symbol): Likewise.
1680 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1681 Count TLS entries.
1682 (mips_elf_merge_gots): Handle TLS entries when merging.
1683 (mips_elf_initialize_tls_index): New function.
1684 (mips_elf_set_global_got_offset): Handle TLS entries.
1685 (mips_elf_adjust_gp): Handle TLS.
1686 (mips_elf_multi_got): Remove redundant call to
1687 mips_elf_resolve_final_got_entries. Initialize global_count.
1688 Correct a comment. Initialize new TLS members of mips_got_info.
1689 Assign TLS GOT indexes for new GOTs.
1690 (mips_elf_create_got_section): Initialize new TLS members of
1691 mips_got_info.
1692 (mips_elf_calculate_relocation): Handle TLS relocs.
1693 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1694 functions.
1695 (_bfd_mips_elf_always_size_sections): Handle TLS.
1696 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1697 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1698 changed functions.
1699 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1700 (_bfd_mips_elf_hide_symbol): Handle TLS.
1701 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1702 (mips_reloc_map): Add TLS relocs.
1703 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1704 * elf64-mips.c (mips_elf64_howto_table_rel)
1705 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1706 * reloc.c: Define new MIPS TLS relocations.
1707 * libbfd.h, bfd-in2.h: Regenerated.
1708
bb14f524
JB
17092005-03-02 Jan Beulich <jbeulich@novell.com>
1710
1711 * Makefile.am: Add dependency of cache.o on libiberty.h.
1712 * cache.c: Include libiberty.h.
1713 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1714
8c1acd09
ZW
17152005-03-01 Zack Weinberg <zack@codesourcery.com>
1716
1717 * elf.c (bfd_section_from_shdr <default case>): Call
1718 elf_backend_section_from_shdr hook unconditionally, and return
1719 what it returns.
1720 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1721 * elfxx-target.h (elf_backend_section_from_shdr)
1722 (elf_backend_section_from_phdr): Default to
1723 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1724 respectively.
1725
70bfecec
AM
17262005-03-01 Alan Modra <amodra@bigpond.net.au>
1727
a67a7b8b
AM
1728 * targets.h: Typo fix.
1729 * bfd-in2.h: Regenerate.
1730
70bfecec
AM
1731 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1732 structs to size on-disk structures.
1733 (b_out_set_section_contents): Size the external struct, not the
1734 internal one for on-disk size.
1735 (b_out_sizeof_headers): Likewise.
1736
ceb1f1ef
AM
17372005-03-01 Alan Modra <amodra@bigpond.net.au>
1738
1739 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1740 entry points with the func descriptor as well as undefweak.
1741
f67e617a
NC
17422005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
1743
1744 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1745 present when IMPORT_NAME_UNDOECRATE is used.
1746
af44c138
L
17472005-02-28 H.J. Lu <hongjiu.lu@intel.com>
1748
1749 PR 757
1750 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1751 int.
1752
1753 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1754 to _bfd_elf_merge_symbol.
1755
1756 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1757 unsigned int to return the alignment of the old common symbol
1758 in the dynamic object.
1759 (_bfd_elf_add_default_symbol): Pass NULL to
1760 _bfd_elf_merge_symbol.
1761 (elf_link_add_object_symbols): Pass &old_alignment to
1762 _bfd_elf_merge_symbol. Get the alignment of the new common
1763 symbol in the dynamic object.
1764
10adf131
BE
17652005-02-24 Ben Elliston <bje@au.ibm.com>
1766
1767 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1768 * format.c (bfd_check_format_matches): Likewise.
1769 * archive.c (BFD_GNU960_ARMAG): Likewise.
1770 (bfd_generic_archive_p): Likewise.
1771 (_bfd_write_archive_contents): Likewise.
1772
60b779bf
L
17732005-02-24 H.J. Lu <hongjiu.lu@intel.com>
1774
1775 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1776 * configure: Regenerate.
1777
1f02cbd9
JB
17782005-02-24 Julian Brown <julian@sirius.codesourcery.com>
1779
1780 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1781 COMDAT group sections to have default visibility.
1782
f60ca5e3
AM
17832005-02-24 Alan Modra <amodra@bigpond.net.au>
1784
1785 * coffcode.h (coff_print_aux): Warning fix.
1786 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1787 instead of section pointer to identify.
1788 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
1789 the correct size buffer for local sym mangling too.
1790 (h8300_bfd_link_add_symbols): Likewise.
1791 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
1792 warning.
1793 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
1794 * elf32-xtensa.c (literal_value_hash): Warning fix.
1795 * versados.c (process_otr): Warning fix.
1796 (versados_canonicalize_reloc): Likewise.
1797 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
1798 * vms.c (fill_section_ptr): Warning fix.
1799
9a5d8e72
L
18002005-02-23 H.J. Lu <hongjiu.lu@intel.com>
1801
1802 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
1803 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
1804
4b6c0f2f
NC
18052005-02-23 Nick Clifton <nickc@redhat.com>
1806
abc0f8d0
NC
1807 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
1808 the relvaddr field of the Elf32_crinfo structure.
1809
9b69b847
NC
1810 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
1811 variables that are passed by reference to
1812 m68hc11_get_relocation_value in case that function does not
1813 initialise them.
1814
90e868ac
NC
1815 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
1816 return statements and replace with a single return at the end of
1817 the function. This helps pacify the flow analysis code in gcc 4.0.
1818
4b6c0f2f
NC
1819 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
1820 strtab to avoid compile time warning.
1821
c3e8c140
BE
18222005-02-23 Ben Elliston <bje@au.ibm.com>
1823
1824 * opncls.c (bfd_zalloc): Document this function.
1825
ebe372c1
L
18262005-02-21 H.J. Lu <hongjiu.lu@intel.com>
1827
1828 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
1829 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
1830 Replace SEC_SHARED with SEC_COFF_SHARED.
1831 (styp_to_sec_flags): Likewise.
1832
1833 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
1834 (TARGET_LITTLE_SYM): Likewise.
1835
1836 * section.c (SEC_ARCH_BIT_0): Removed.
1837 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
1838 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
1839 (SEC_SHARED): Renamed to ...
1840 (SEC_COFF_SHARED): This.
1841 (SEC_BLOCK): Renamed to ...
1842 (SEC_TIC54X_BLOCK): This.
1843 (SEC_CLINK): Renamed to ...
1844 (SEC_TIC54X_CLINK): This.
1845 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
1846 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
1847 end.
1848 * bfd-in2.h: Regenerated.
1849
26bf4e33
FF
18502005-02-21 Fred Fish <fnf@specifixinc.com>
1851
1852 * dwarf2.c (find_abstract_instance_name): Call recursively
1853 to handle a DW_AT_specification.
1854
e6daada3
TS
18552005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1856
1857 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
1858 mips_elf_create_dynamic_relocation,
1859 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
1860 Remove #if 0'd code.
1861
d25604af
AM
18622005-02-21 Alan Modra <amodra@bigpond.net.au>
1863
1864 * Makefile.am: Run "make dep-am"
1865 * Makefile.in: Regenerate.
1866
fedf8d51
AM
18672005-02-21 Alan Modra <amodra@bigpond.net.au>
1868
1869 * coffgen.c (bfd_coff_get_comdat_section): Check that
1870 coff_section_data isn't NULL.
1871
f075ee0c
AM
18722005-02-21 Alan Modra <amodra@bigpond.net.au>
1873
1874 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
1875 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
1876 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
1877 useless assignments.
1878 (xcoff_write_archive_contents_big): Likewise.
1879 (_bfd_xcoff_put_ldsymbol_name): Likewise.
1880 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
1881 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
1882 * cofflink.c (process_embedded_commands): Warning fixes.
1883 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
1884 Warning fixes.
1885 * dwarf2.c: Warning fixes.
1886 * elf-bfd.h: Likewise.
1887 * elf-eh-frame.c: Likewise.
1888 * elf-strtab.c: Likewise.
1889 * elf.c: Likewise.
1890 * elf32-m68k.c: Likewise.
1891 * elf32-ppc.c: Likewise.
1892 * elf32-sh-symbian.c: Likewise.
1893 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
1894 * elf64-sh64.c: Likewise.
1895 * peicode.h: Likewise.
1896 * elf64-mmix.c: Warning fixes.
1897 * elfcode.h: Likewise.
1898 * elfxx-mips.c: Likewise.
1899 * libbfd-in.h: Likewise.
1900 * libbfd.c: Likewise.
1901 * mach-o.c: Likewise.
1902 * merge.c: Likewise.
1903 * mmo.c: Likewise.
1904 * opncls.c: Likewise.
1905 * pef.c: Likewise.
1906 * srec.c: Likewise.
1907 * vms-hdr.c: Likewise.
1908 * vms-tir.c: Likewise.
1909 * xtensa-isa.c: Likewise.
1910 * xtensa-modules.c: Likewise.
1911 * xsym.c: Likewise.
1912 (pstrcmp): Use correct choice of string lengths. Fix return value.
1913 (bfd_sym_module_name): Correct string length.
1914 * bfd-in2.h: Regenerate.
1915 * libbfd.h: Regenerate.
1916
68320ddb
AO
19172005-02-17 Alexandre Oliva <aoliva@redhat.com>
1918
1919 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 1920 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
1921 Reported by Alan Modra.
1922 (elf32_frv_relocate_section): Improve errors and warnings.
1923
1808e341
AM
19242005-02-17 Alan Modra <amodra@bigpond.net.au>
1925
1926 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
1927
5ff625e9
AM
19282005-02-16 Alan Modra <amodra@bigpond.net.au>
1929
1930 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
1931 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
1932 * pef.c (bfd_pef_scan): Don't ignore return value of
1933 bfd_pef_scan_start_address.
7e3102a7
AM
1934 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
1935 bfd_mach_o_scan_start_address.
1936 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
1937 * elfxx-mips.c: Remove unnecessary prototypes.
1938 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 1939
92b7a70f
AM
19402005-02-16 Alan Modra <amodra@bigpond.net.au>
1941
1942 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
1943 Skip toc reloc adjust if reloc_count is zero.
1944
d6f16593 19452005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 1946 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
1947
1948 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1949 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1950 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1951 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1952 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1953 dst_mask.
1954 (mips16_gprel_reloc): Remove bit shuffling; call
1955 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1956 and _bfd_mips16_elf_reloc_shuffle() instead.
1957 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1958 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1959 relocs.
1960 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
1961 elf_mips16_howto_table_rel.
1962 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
1963 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
1964 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1965 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
1966 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1967 dst_mask.
1968 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
1969 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
1970 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
1971 placeholders.
1972 (mips16_gprel_reloc): Remove bit shuffling; call
1973 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1974 and _bfd_mips16_elf_reloc_shuffle() instead.
1975 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1976 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1977 relocs.
1978 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
1979 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
1980 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1981 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1982 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1983 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1984 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1985 dst_mask.
1986 (mips16_gprel_reloc): Remove bit shuffling; call
1987 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1988 and _bfd_mips16_elf_reloc_shuffle() instead.
1989 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1990 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1991 relocs.
1992 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
1993 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
1994 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
1995 handle bit shuffling for MIPS16 relocs.
1996 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1997 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
1998 and _bfd_mips16_elf_reloc_shuffle().
1999 (_bfd_mips_elf_generic_reloc): Likewise.
2000 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2001 and R_MIPS16_LO16.
2002 (mips_elf_obtain_contents): Remove bit shuffling.
2003 (mips_elf_perform_relocation): Likewise; call
2004 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2005 instead.
2006 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2007 and R_MIPS16_LO16.
2008 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2009 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2010 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2011 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2012 (BFD_RELOC_MIPS16_LO16): Likewise.
2013 * bfd-in2.h: Regenerate.
2014 * libbfd.h: Regenerate.
2015
0ca3e455
JB
20162005-02-15 Jan Beulich <jbeulich@novell.com>
2017
2018 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2019 R_IA64_DTPMOD64[LM]SB.
2020
c5509b92
L
20212005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2022
2023 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2024 backward branch in the same section.
2025 (elfNN_ia64_relocate_section): Inform users that the input
2026 section is too big to relax br instruction when overflow
2027 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2028 and R_IA64_PCREL21F.
2029
5cba516c
NC
20302005-02-14 Orjan Friberg <orjanf@axis.com>
2031
2032 * elfcore.h (elf_core_file_p): Move the call to
2033 elf_backend_object_p to allow the correct machine to be set before
2034 processing the program headers.
2035
b59a68e1
NC
20362005-02-14 Nick Clifton <nickc@redhat.com>
2037
2038 PR binutils/716
2039 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2040 aware flag from the input bfd to the output bfd.
2041
254f0426
MR
20422005-02-11 Maciej W. Rozycki <macro@mips.com>
2043
2044 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2045 R_MIPS_LITERAL relocations for external symbols.
2046 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2047 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2048
e91cdea7
L
20492005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2050
2051 * bfd-in2.h: Rebuilt.
2052
67687978
PB
20532005-02-11 Paul Brook <paul@codesourcery.com>
2054
2055 * elf-bfd.h (struct elf_link_hash_table): Add
2056 is_relocatable_executable.
2057 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2058 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2059 symbols in relocatable executables.
2060 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2061 relocatable executables.
2062 (_bfd_elf_link_renumber_dynsyms): Ditto.
2063 (bfd_elf_final_link): Ditto.
2064 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2065 relocations into relocatable executables.
2066 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2067 executables. Also copy absolute relocations.
2068 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2069 in relocatable executables.
2070 (allocate_dynrelocs): Copy relocations for relocatable executables.
2071 Output dynamic symbols for symbols defined in linker scripts.
2072
ca724bf2
NC
20732005-02-11 Nick Clifton <nickc@redhat.com>
2074
4b74b983
NC
2075 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2076 to avoid a compile time warning.
2077
ca724bf2
NC
2078 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2079 BFD_ASSERT.
2080
3e25964f
NC
2081 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2082 inclusion of coffcode.h so that it is actually picked up.
2083
cb7a88a4
NC
2084 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2085 case it is not used.
2086
596c83ec
NC
2087 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2088 structure and macro.
2089
6c408f53
NC
2090 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2091 array.
2092
d5b2f13b
NC
2093 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2094 to protect the declaration of this array.
2095
169a6afd
NC
2096 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2097 Avoid call to memcpy with a size of 0.
2098
2917689a
AM
20992005-02-12 Alan Modra <amodra@bigpond.net.au>
2100
2101 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2102 old-style branches to undefined dot-symbols which will be
2103 satisfied by a plt call.
2104
40d16e0b
AM
21052005-02-11 Alan Modra <amodra@bigpond.net.au>
2106
2107 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2108 (ppc64_elf_copy_indirect_symbol): ..here.
2109 (func_desc_adjust): Use move_plt_plist.
2110
e37c699c
PB
21112005-02-10 Paul Brook <paul@codesourcery.com>
2112
2113 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2114
6fa3860b
PB
21152005-02-10 Paul Brook <paul@codesourcery.com>
2116
2117 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2118 symbols local.
2119 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2120 (elf_link_renumber_local_hash_table_dynsyms): New function.
2121 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2122
d457dcf6
JJ
21232005-02-10 Jakub Jelinek <jakub@redhat.com>
2124
2125 * bfd-in.h (BFD_LINKER_CREATED): Define.
2126 * bfd-in2.h: Rebuilt.
2127 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2128 BFD_LINKER_CREATED bfds when determining input bfds without
2129 .note.GNU-stack section.
2130
7f05722e
MR
21312005-02-10 Maciej W. Rozycki <macro@mips.com>
2132
2133 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2134 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2135 relocations against external symbols unchanged.
2136
ccf5f610
PB
21372005-02-08 Paul Brook <paul@codesourcery.com>
2138
2139 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2140 sections.
2141
370a0e1b
HPN
21422005-02-08 Hans-Peter Nilsson <hp@axis.com>
2143
2144 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2145 prefix here.
2146
99277196
MR
21472005-02-07 Maciej W. Rozycki <macro@mips.com>
2148
2149 * elf64-mips.c: Fix formatting throughout.
2150
6422fbef
MR
21512005-02-07 Maciej W. Rozycki <macro@mips.com>
2152
2153 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2154
303e4c21
AO
21552005-02-07 Alexandre Oliva <aoliva@redhat.com>
2156
2157 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2158 *ABS*/*UND* sections.
2159 (elf32_frv_relocate_section): Move zero-addend-required error...
2160 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2161 missing needed TLS section.
2162
c3864421
HPN
21632005-02-07 Hans-Peter Nilsson <hp@axis.com>
2164
2165 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2166 being the last symbol.
9f400ee9
HPN
2167 (aout_link_add_symbols): Just return TRUE if a warning
2168 symbol was last.
c3864421 2169
765f2ef6
MR
21702005-02-07 Maciej W. Rozycki <macro@mips.com>
2171
2172 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2173 R_MIPS_GPREL32 relocations against external symbols.
2174 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2175 comment.
2176
1b3a8575
AM
21772005-02-07 Alan Modra <amodra@bigpond.net.au>
2178
2179 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2180 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2181 elf_string_from_elf_strtab.
2182 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2183 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2184 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2185 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2186 looking at cached symtab info first, before iterating over headers.
2187 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2188 * elfcode.h (elf_object_p): Don't load section header stringtab
2189 specially.
2190
90f487df
L
21912005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2192
2193 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2194 against protected function when building shared library.
2195
2196 PR 584
2197 * elf64-x86-64.c (is_32bit_relative_branch): New.
2198 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2199 protected function symbol when building shared library for
2200 32bit relative branch instruction.
2201
c4f68ce3
AM
22022005-02-06 Alan Modra <amodra@bigpond.net.au>
2203
2204 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2205 syms when doing a relocatable link.
2206 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2207 at u.def.section.
2208 (ppc64_elf_tls_setup): Likewise.
2209 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2210
908b32fc
AM
22112005-02-04 Alan Modra <amodra@bigpond.net.au>
2212
2213 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2214 (link_hash_newfunc): Clear all locals using memset.
2215 (make_fdh): Remove flags param. Always create fake func desc
2216 weak. Link the descriptor with the code entry sym.
2217 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2218 (add_symbol_adjust): Adjust make_fdh call.
2219 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2220 descriptor to strong undefined if code entry is strong.
2221
4ea42fb7
AM
22222005-02-04 Alan Modra <amodra@bigpond.net.au>
2223
2224 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2225 lookup here. Set to new before calling bfd_link_repair_undef_list.
2226 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2227
10d86c8a
AM
22282005-02-03 Alan Modra <amodra@bigpond.net.au>
2229
2230 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2231
11f25ea6
AM
22322005-02-03 Alan Modra <amodra@bigpond.net.au>
2233
2234 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2235 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2236 before the as-needed lib was loaded. Abort on unexpected refs.
2237
4f40114d
AM
22382005-02-02 Alan Modra <amodra@bigpond.net.au>
2239
ec13b3bb
AM
2240 * elflink.c (elf_smash_syms): Expand comments.
2241 (elf_link_add_object_symbols): Only call elf_smash_syms for
2242 as-needed dynamic objects.
2243
4f40114d
AM
2244 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2245 everything, just the field specific to ia64.
336549c1 2246 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 2247
bb700d78
AM
22482005-02-01 Alan Modra <amodra@bigpond.net.au>
2249
2250 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2251 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2252 undefined syms.
2253 (struct add_symbol_adjust_data): New.
2254 (add_symbol_adjust): Make an undefweak func desc for old ABI
2255 objects to link with --as-needed shared libs. Return fail status.
2256 Don't adjust old ABI func entry sym to weak if func desc syms
2257 isn't defined.
2258 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2259 and return status.
2260
1ffd1c2f
HPN
22612005-02-01 Hans-Peter Nilsson <hp@axis.com>
2262
2263 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2264 for clarity.
2265
77cfaee6
AM
22662005-02-01 Alan Modra <amodra@bigpond.net.au>
2267
2268 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2269 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2270 remove anything but new and undefweak.
2271 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2272 existing _DYNAMIC.
2273 (_bfd_elf_create_dynamic_sections): Formatting.
2274 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2275 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2276 (struct elf_smash_data): New.
2277 (elf_smash_syms): New function.
2278 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2279 unneeded dynamic objects to loaded list.
2280 (elf_link_output_extsym): Don't handle as-needed here. Strip
2281 bfd_link_hash_new symbols.
2282 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2283 delref when dynindx is already -1.
2284 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2285 symbols.
2286 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2287
b15c48d1
BE
22882005-02-01 Ben Elliston <bje@au.ibm.com>
2289
2290 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2291
0983f4eb 22922005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
2293
2294 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2295 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2296 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2297 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2298 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2299 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2300 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2301 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2302 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2303 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2304 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 2305 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
2306 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2307 throughout. Similarly, collapse #if 1'd code.
2308
23092005-02-01 Ben Elliston <bje@au.ibm.com>
2310
0983f4eb
BE
2311 * elf-bfd.h (bfd_elf_discard_group): Remove.
2312 * elf.c (bfd_elf_discard_group): Likewise.
2313 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2314
8c946ed5
RS
23152005-01-31 Richard Sandiford <rsandifo@redhat.com>
2316
2317 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2318 (_bfd_elf_eh_frame_address_size): Declare.
2319 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2320 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2321 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2322 (elf_backend_eh_frame_address_size): Define.
2323 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2324 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2325 size from the new backend hook.
2326 (_bfd_elf_write_section_eh_frame): Likewise.
2327 (_bfd_elf_eh_frame_address_size): New function.
2328
c46f8c51
AC
23292005-01-31 Andrew Cagney <cagney@gnu.org>
2330
2331 * configure: Regenerate to track ../gettext.m4.
2332
5cd3778d
MM
23332005-01-31 Mark Mitchell <mark@codesourcery.com>
2334
2335 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2336 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 2337
d6486796
NC
23382005-01-31 Nick Clifton <nickc@redhat.com>
2339
2340 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2341 sparc-lynxos, vax-vms) be obsolete.
2342
b1342370
DJ
23432005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2344
2345 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2346 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2347 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2348 * elfcode.h (elf_object_p): Use minpagesize instead of
2349 maxpagesize.
2350 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2351 (elfNN_bed): Include ELF_MINPAGESIZE.
2352
319850b4
JB
23532005-01-28 Julian Brown <julian@codesourcery.com>
2354
2355 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2356 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2357 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2358 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 2359 passing flag value from ld. Set flag value in global hash table entry.
319850b4 2360 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 2361 relocation.
319850b4 2362
a53bf506
AC
23632005-01-27 Andrew Cagney <cagney@gnu.org>
2364
2365 * configure: Regenerate to track ../gettext.m4 change.
2366
dc4c9c19
MM
23672005-01-25 Mark Mitchell <mark@codesourcery.com>
2368
2369 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 2370 SymbianOS.
dc4c9c19 2371
90219bd0
AO
23722005-01-25 Alexandre Oliva <aoliva@redhat.com>
2373
2374 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2375 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2376 for TLSMOFF.
2377 * reloc.c: Add R_FRV_TLSMOFF.
2378 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2379 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2380 (elf32_frv_relocate_section): Handle it.
2381 (elf32_frv_check_relocs): Likewise.
2382 * libbfd.h, bfd-in2.h: Rebuilt.
2383 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2384 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2385 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2386 such that they return the constant in gr9.
2387 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2388 symbols.
2389 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2390 too, such that they shrink on relaxation.
2391 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2392 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2393 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2394 if we can guarantee the use of 16-bit constants.
2395 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2396 Introduce TLS support for FR-V FDPIC.
2397 * reloc.c: Add TLS relocations.
2398 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2399 (elf32_frv_rel_tlsdesc_value_howto): New.
2400 (elf32_frv_rel_tlsoff_howto): New.
2401 (frv_reloc_map): Add new mappings.
2402 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2403 reloc information.
2404 (frvfdpic_dynamic_got_plt_info): New.
2405 (frvfdpic_plt_tls_ret_offset): New.
2406 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2407 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2408 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2409 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2410 section as local.
2411 (struct frvfdpic_relocs_info): Add TLS fields.
2412 (frvfdpic_relocs_info_hash): Warning clean up.
2413 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2414 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2415 (FRVFDPIC_TLS_BIAS): Define.
2416 (tls_biased_base): New.
2417 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2418 relocations.
2419 (frv_reloc_type_lookup): Likewise.
2420 (frvfdpic_info_to_howto_rel): Likewise.
2421 (elf32_frv_relocate_section): Likewise.
2422 (_frv_create_got_section): Create the PLT section here.
2423 (elf32_frvfdpic_create_dynamic_sections): Not here.
2424 (_frvfdpic_count_nontls_entries): Move out of...
2425 (_frvfdpic_count_got_plt_entries): ... here.
2426 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2427 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2428 support.
2429 (_frvfdpic_relax_tls_entries): New.
2430 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2431 (_frvfdpic_get_tlsdesc_entry): New.
2432 (_frvfdpic_assign_got_entries): Add TLS support.
2433 (_frvfdpic_assign_plt_entries): Likewise.
2434 (_frvfdpic_reset_got_plt_entries): New.
2435 (_frvfdpic_size_got_plt): Move out of...
2436 (elf32_frvfdpic_size_dynamic_sections): ... here.
2437 (_frvfdpic_relax_got_plt_entries): New.
2438 (elf32_frvfdpic_relax_section): New.
2439 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2440 (elf32_frv_check_relocs): Add TLS support.
2441 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2442 * libbfd.h, bfd-in2.h: Rebuilt.
2443
8615f3f2
AM
24442005-01-25 Alan Modra <amodra@bigpond.net.au>
2445
2446 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2447 loadable reloc sections.
2448 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2449 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2450
7e9f0867
AM
24512005-01-25 Alan Modra <amodra@bigpond.net.au>
2452
2453 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2454 sections immediately when linking shared libs. Instead, wait until
2455 we know a lib is needed.
2456 (_bfd_elf_link_create_dynstrtab): Extract from..
2457 (_bfd_elf_link_create_dynamic_sections_): ..here.
2458 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2459 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2460 for non-existent .dynamic.
2461 (elf_link_output_extsym): Don't complain about undefined symbols
2462 in as-needed dynamic libs that aren't actually linked.
2463
45181ed1
AC
24642005-01-24 Andrew Cagney <cagney@gnu.org>
2465
2466 * configure: Regenerate, ../gettext.m4 was updated.
2467
753e3eb6
BE
24682005-01-21 Ben Elliston <bje@au.ibm.com>
2469
2470 * aout-encap.c: Remove unused file.
2471
1c16dfa5
L
24722005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2473
2474 PR 679
2475 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2476 non-function symbols are local.
2477 (_bfd_elf_symbol_refs_local_p): Likewise.
2478
1449d79b
AM
24792005-01-18 Alan Modra <amodra@bigpond.net.au>
2480
2481 * bfd.c (bfd_link_just_syms): Add abfd param.
2482 * bfd-in2.h: Regenerate.
2483
dcf507a6
RS
24842005-01-17 Richard Sandiford <rsandifo@redhat.com>
2485
2486 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2487 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2488 instructions. If the amount of padding is known, reduce the size
2489 of the CIE or FDE by that amount.
2490
2c42be65
RS
24912005-01-17 Richard Sandiford <rsandifo@redhat.com>
2492
2493 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2494 augmentation_size. Use bfd_signed_vmas for data_align.
2495 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2496 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2497 functions. Don't read past the end of the enclosing CIE or FDE.
2498 (skip_bytes): New utility function.
2499 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2500 sanity checking.
2501 (_bfd_elf_write_section_eh_frame): Use new functions.
2502
acfe5567
RS
25032005-01-17 Richard Sandiford <rsandifo@redhat.com>
2504
2505 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2506 assert-style REQUIRE() macro to handle sanity checks.
2507
c0c28ab8
L
25082005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2509
2510 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2511 (comp_unit): Here.
2512 (read_unsigned_leb128): Removed.
2513 (read_signed_leb128): Removed.
2514 (find_abstract_instance_name): Updated.
2515 (parse_comp_unit): Accept info_ptr_unit.
2516 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2517 comp unit and pass it to parse_comp_unit.
2518
2519 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2520 (read_signed_leb128): Moved to ...
2521 * libbfd.c: Here.
2522
2523 * libbfd-in.h (read_unsigned_leb128): New prototype.
2524 (read_signed_leb128): Likewise.
2525 * libbfd.h: Regenerated.
2526
e38bc3b5
NC
25272005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2528 Nick Clifton <nickc@redhat.com>
2529
2530 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2531 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2532 arch_sh4a_nofpu_up in order to match the external names and make the
2533 testsuite's job easier.
2534 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2535 names.
2536 * bfd-in2.h: Regenerate.
2537
8fb84ecc
AC
25382005-01-15 Andrew Cagney <cagney@gnu.org>
2539
2540 * bfd.m4: New file.
2541 * acinclude.m4: Move BFD_NEED_DECLARATION,
2542 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2543 the new file bfd.m4. Include ../bfd/bfd.m4.
2544 * configure: Re-generate.
8615f3f2 2545
b4a38de6
AM
25462005-01-12 Alan Modra <amodra@bigpond.net.au>
2547
2548 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2549 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2550 reaching PLT.
2551 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2552 R_PPC_RELAX32PC_PLT.
2553
3eb128b2
AM
25542005-01-11 Alan Modra <amodra@bigpond.net.au>
2555
2556 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2557 symbols.
2558 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2559 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2560 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2561 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2562 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2563 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2564 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2565 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2566 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2567 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2568 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2569 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2570 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2571 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2572
264a1fe0
AM
25732005-01-11 Alan Modra <amodra@bigpond.net.au>
2574
2575 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2576 .dynsbss flags.
2577
5c4504f7
NC
25782005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2579
2580 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2581 * bfd-in2.h: Regenerate.
2582 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2583 to support these new machine values.
2584 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2585 the maxq10.
2586 (bfd_maxq_arch): Update values for the maxq20.
2587
669460c7
EB
25882005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2589
2590 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2591 non-shared object, do not reserve space in .plt and .rela.plt for
2592 regular symbols neither defined nor referenced in shared objects.
2593
a51a7930
EB
25942005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2595
01aac484
EB
2596 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2597 to zero the structure.
2598 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
2599 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2600 'srelgot' fields.
2601 (create_got_section): New function.
2602 (sparc64_elf_create_dynamic_sections): Likewise.
2603 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2604 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2605 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2606 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2607 (sparc64_elf_finish_dynamic_symbol): Likewise.
2608 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2609 (elf_backend_create_dynamic_sections): Define to
2610 sparc64_elf_create_dynamic_sections.
2611
151e5294
EB
26122005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2613
2614 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2615 (elf_backend_omit_section_dynsym): Define to it.
2616 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2617 (elf_backend_omit_section_dynsym): Define to it.
2618
6f79b219
JJ
26192005-01-07 Jakub Jelinek <jakub@redhat.com>
2620
2621 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2622 PT_DYNAMIC segment, unless .dynamic.
2623
4e7fd91e
PB
26242005-01-06 Paul Brook <paul@codesourcery.com>
2625
2626 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2627 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2628 * configure: Regenerate.
2629 * elf32-arm.c: Add VxWorks target bfd.
2630 (USE_REL): Remove.
2631 (elf32_arm_link_hash_table): Add use_rel.
2632 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2633 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2634 Correct offset calculation for RELA case.
2635 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2636 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2637 (elf32_arm_vxworks_link_hash_table_create): New function.
2638 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2639 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2640 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2641
4c52953f
AM
26422005-01-06 Alan Modra <amodra@bigpond.net.au>
2643
2644 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2645 multi_toc_needed.
2646 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2647 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2648 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2649 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2650 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2651 (toc_adjusting_stub_needed): Rewrite.
2652 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2653 toc tests. Adjust for toc_adjusting_stub_needed changes.
2654 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2655 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2656 * section.c: Expand comment on backend bits.
2657 * bfd-in2.h: Regenerate.
2658 * libbfd.h: Regenerate.
2659
f03d65b4
AM
26602005-01-06 Alan Modra <amodra@bigpond.net.au>
2661
2662 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2663 toc adjusting stub, do not test source section flags.
2664
8af139b3
EB
26652005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
2666
2667 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2668 from STABS debugging sections again.
2669
06f22d7e
FF
26702005-01-05 Fred Fish <fnf@specifixinc.com>
2671
2672 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2673 (find_abstract_instance_name): New function.
2674 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2675 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2676 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2677
83a358aa
PB
26782004-12-31 Paul Brook <paul@copdesourcery.com>
2679
2680 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2681
b996922c
AM
26822004-12-31 Alan Modra <amodra@bigpond.net.au>
2683
2684 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2685 Commit missing changes from 2004-12-22.
2686 * bfd-in2.h: Regenerate.
2687
17a83432
TL
26882004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
2689
2690 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2691
d69f560c
KW
26922004-12-21 Kris Warkentin <kewarken@qnx.com>
2693
2694 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2695 Add 'base' argument for constructing register sections. Reformat.
2696 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2697 gp and fp regs. Reformat.
4c52953f 2698
750bce0e
NC
26992004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2700
2701 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2702 * bfd-in2.h: Regenerate.
2703 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2704 (avr_reloc_map): Likewise.
2705 (avr_final_link_relocate): Likewise.
2706
a5db907e
AM
27072004-12-22 Alan Modra <amodra@bigpond.net.au>
2708
2709 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2710 as-needed dynamic libs as undefined.
2711 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2712 libs when finding they are needed.
2713
8860955f
AM
27142004-12-20 Alan Modra <amodra@bigpond.net.au>
2715
2716 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2717 (opd_entry_value): Use opd_relocs if available.
2718 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2719 copy .opd relocations to opd_relocs.
2720 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2721
1e50d24d
RS
27222004-12-16 Richard Sandiford <rsandifo@redhat.com>
2723
2724 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2725 * elf32-v850.c (v850_elf_howto_table): Add entry for
2726 R_V850_LO16_SPLIT_OFFSET.
2727 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2728 (v850_elf_perform_lo16_relocation): New function, extracted from...
2729 (v850_elf_perform_relocation): ...here. Use it to handle
2730 R_V850_LO16_SPLIT_OFFSET.
2731 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2732 R_V850_LO16_SPLIT_OFFSET.
2733 * libbfd.h, bfd-in2.h: Regenerate.
2734
2fbd2a87
NC
27352004-12-14 P.J. Darcy <darcypj@us.ibm.com>
2736
2737 * config.bfd: Add s390x-ibm-tpf support.
2738
06302770
TL
27392004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
2740
8860955f 2741 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
2742 to prototype, to make hash info available.
2743 Prevent wrapped symbols from being adjusted twice.
2744
c314987d
RS
27452004-12-14 Richard Sandiford <rsandifo@redhat.com>
2746
2747 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2748 overflow for calls to undefined weak symbols.
2749
5c799c07
AM
27502004-12-11 Alan Modra <amodra@bigpond.net.au>
2751
2752 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2753 canonical sections syms have a name.
2754
645ea6a9
AM
27552004-12-11 Alan Modra <amodra@bigpond.net.au>
2756
2757 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2758 have been adjusted for output.
2759 (ppc64_elf_relocate_section): Mark sections with reloc_done.
2760
0e2cfdce
AM
27612004-12-10 Alan Modra <amodra@bigpond.net.au>
2762
be8dd2ca
AM
2763 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2764 add symtab_hdr param.
0e2cfdce
AM
2765 (group_signature): Update calls.
2766 * elf-bfd.h (bfd_elf_sym_name): Update.
2767 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
2768 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2769 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
2770 * elflink.c (elf_link_input_bfd): Update.
2771
138f35cc
JJ
27722004-12-10 Jakub Jelinek <jakub@redhat.com>
2773
2774 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2775 st_shndx on STT_SECTION sections.
2776
f9cfae62
DJ
27772004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
2778
2779 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2780 ELF section symbols.
2781
0d2e43ed
ILT
27822004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
2783
1367d393
ILT
2784 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2785 return a real value, unless it is a PLT symbol.
2786 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2787 bal if possible.
2788
74f79d8d
ILT
2789 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
2790 R_MIPS_JALR entry to 0.
2791
0d2e43ed
ILT
2792 * archures.c: Define bfd_mach_mips9000.
2793 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
2794 (mips_set_isa_flags): Handle bfd_mach_mips9000.
2795 * cpu-mips.c (I_mips9000): Define.
2796 (arch_info_struct): Add case for bfd_mach_mips9000.
2797 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
2798 * bfd-in2.h: Regenerate.
2799
728b2f21
ILT
28002004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
2801
2802 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
2803 overflow.
2804
45ab555d
BE
28052004-12-07 Ben Elliston <bje@gnu.org>
2806
2807 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
2808
1511ddaf
DJ
28092004-12-06 Daniel Jacobowitz <dan@debian.org>
2810
2811 Suggested by Fergal Daly <fergal@esatclear.ie>:
2812 * simple.c (simple_dummy_multiple_definition): New function.
2813 (bfd_simple_get_relocated_section_contents): Use it.
2814
28152004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
2816
2817 * elf.c (elf_find_function): Don't use the last file symbol ever,
2818 seen, but the last one seen prior to the symbol being reported.
2819 Don't report a filename at all for global symbols when that might
2820 be ambiguous/wrong.
2821
94a3258f
PB
28222004-12-01 Paul Brook <paul@codesourcery.com>
2823
2824 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
2825 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
2826 version.
2827
529fcb95
PB
28282004-12-01 Paul Brook <paul@codesourcery.com>
2829
2830 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
2831 sections undefined.
2832
dea514f5
PB
28332004-11-30 Paul Brook <paul@codesourcery.com>
2834
2835 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
2836 no_pipeline_knowledge
2837 (elf32_arm_link_hash_table_create): Ditto.
2838 (bfd_elf32_arm_process_before_allocation): Ditto.
2839 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
2840 handling.
2841 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2842 prototype.
2843 * bfd-in2.h: Regenerate.
2844
edfc032f
AM
28452004-11-30 Randolph Chung <tausq@debian.org>
2846
2847 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
2848 (elf32_hppa_grok_psinfo): New function.
2849 (elf_backend_grok_prstatus): Define.
2850 (elf_backend_grok_psinfo): Define.
2851
0be9069d
L
28522004-11-24 H.J. Lu <hongjiu.lu@intel.com>
2853
2854 PR 574:
2855 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2856
47cc2cf5
PB
28572004-11-24 Paul Brook <paul@codesourcery.com>
2858
2859 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
2860
0beaef2b
PB
28612004-11-24 Paul Brook <paul@codesourcery.com>
2862
2863 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
2864 (elf32_arm_swap_symbol_out): New function.
2865 (elf32_arm_size_info): Add.
2866 (elf_backend_size_info): Define.
2867
3dd2fcf0
DA
28682004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2869
2870 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
2871 make_bfd_asection.
2872
de52dba4
AM
28732004-11-19 Alan Modra <amodra@bigpond.net.au>
2874
2875 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
2876 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
2877 * nlmcode.h (nlm_write_object_contents): Warning fix.
2878
288f74fa
BW
28792004-11-18 Bob Wilson <bob.wilson@acm.org>
2880
2881 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
2882
b7693d02
DJ
28832004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2884
2885 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
2886 (elf32_arm_plt_thumb_stub): New.
2887 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2888 and plt_got_offset.
2889 (elf32_arm_link_hash_traverse): Fix typo.
2890 (elf32_arm_link_hash_table): Add obfd.
2891 (elf32_arm_link_hash_newfunc): Initialize new fields.
2892 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2893 (elf32_arm_link_hash_table_create): Initialize obfd.
2894 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2895 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2896 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2897 interworking BFD is not dynamic.
2898 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
2899 not emit glue for PLT references.
2900 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
2901 emit glue for PLT references. Support the Thumb PLT prefix.
2902 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
2903 plt_thumb_refcount.
2904 (elf32_arm_check_relocs): Likewise.
2905 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
2906 plt_thumb_refcount.
2907 (allocate_dynrelocs): Handle Thumb PLT references.
2908 (elf32_arm_finish_dynamic_symbol): Likewise.
2909 (elf32_arm_symbol_processing): New function.
2910 (elf_backend_symbol_processing): Define.
2911
353057a5
RS
29122004-11-16 Richard Sandiford <rsandifo@redhat.com>
2913
2914 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
2915 add_fde_encoding. Remove need_relative.
2916 * elf-eh-frame.c (extra_augmentation_string_bytes)
2917 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
2918 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
2919 in cases where the CIE has no existing 'R' augmentation. Use
2920 size_of_output_cie_fde when assigning offsets. Use the final offset
2921 as the new section size.
2922 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
2923 Account for any extra augmentation bytes in the returned offset.
2924 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
2925 moved before being modified. Pad growing entries with DW_CFA_nops.
2926 Add 'z' and 'R' augmentations as directed by add_augmentation_size
2927 and add_fde_encoding.
2928
b32d3aa2
MM
29292004-11-15 Mark Mitchell <mark@codesourcery.com>
2930
2931 * elf32-arm.c (elf32_arm_relocate_section): Use
2932 arm_real_reloc_type.
2933
5d41f0b6
RS
29342004-11-16 Richard Sandiford <rsandifo@redhat.com>
2935
2936 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
2937 for discard relocations; don't add an R_MIPS_NONE to the main body
2938 of .rel.dyn.
2939
fc0e6df6
PB
29402004-11-04 Paul Brook <paul@codesourcery.com>
2941
2942 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
2943 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
2944 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
2945 default version definition for unversioned symbols.
2946 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
2947 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
2948 _bfd_elf_slurp_version_tables. Set default version for unversioned
2949 imported symbols.
2950
b23e50e2
PB
29512004-11-15 Paul Brook <paul@codesourcery.com>
2952
2953 * elflink.c (elf_link_add_object_symbols): Don't assume version
2954 indices are consecutive.
2955
f4a6705c
RS
29562004-11-14 Richard Sandiford <rsandifo@redhat.com>
2957
2958 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
2959 composite relocations against the personality data.
2960
ee06dc07
PB
29612004-11-13 Paul Brook <paul@codesourcery.com>
2962
2963 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
2964 R_ARM_PREL31 relocations to PLT entries.
2965 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
2966 (elf32_arm_check_relocs): Ditto.
2967
a1ace8d8
BW
29682004-11-12 Bob Wilson <bob.wilson@acm.org>
2969
2970 * xtensa-isa.c (xtensa_interface_class_id): New.
2971
e4115460
BW
29722004-11-11 Bob Wilson <bob.wilson@acm.org>
2973
2974 * elf32-xtensa.c (property_table_compare): Remove assertion about
2975 entries with the same address and non-zero size.
2976 (xtensa_read_table_entries): Report such entries as errors.
2977
6366ff1e
MM
29782004-11-11 Mark Mitchell <mark@codesourcery.com>
2979
2980 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
2981 R_ARM_RELATIVE on Symbian OS.
2982
b34af79c
MM
29832004-11-09 Mark Mitchell <mark@codesourcery.com>
2984
e6dc21b6
MM
2985 * som.c (som_bfd_print_private_bfd_data): New function.
2986 (som_object_setup): Save the auxiliary header. Don't assume that
2987 zero is an invalid entry point for a shared library.
2988 (som_object_p): Allocate the auxiliary header on the heap.
2989
b34af79c
MM
2990 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
2991 declaration.
2992 (elf32_arm_symbian_modify_segment_map): Likewise.
2993
08d1f311
DJ
29942004-11-09 Daniel Jacobowitz <dan@debian.org>
2995
2996 From David Poole <daveml@mbuf.com>:
2997 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
2998 (elf32_arm_size_dynamic_sections): Call it.
2999
0306b3bf
AM
30002004-11-09 Alan Modra <amodra@bigpond.net.au>
3001
3002 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3003 (ALL_MACHINES_CFILES): Fix typo.
3004 * Makefile.in: Regenerate.
3005 * po/SRC-POTFILES.in: Regenerate.
3006
a16385dc
MM
30072004-11-08 Mark Mitchell <mark@codesourcery.com>
3008
3009 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3010 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3011 symbol in the relocation.
3012
0306b3bf
AM
30132004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3014 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
3015
3016 * coff-maxq.c: New File.
0306b3bf
AM
3017 * cpu-maxq.c: New File.
3018 * coffcode.h: Likewise.
3019 * config.bfd: Likewise.
3020 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
3021 * Makefile.am: Add support for maxq target.
3022 * configure.in: Likewise.
0306b3bf
AM
3023 * archures.c:. Likewise.
3024 * targets.c: Likewise.
3025 * bfd_in2.h : Regenerated.
7499d566
NC
3026 * Makefile.in: Regenerated.
3027 * configure: Regenerated.
3028 * doc/Makefile.in: Regenerated.
3029
977cdf5a
NC
30302004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3031
3032 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3033 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3034 C_NT_WEAK aux entries.
3035 (_bfd_coff_generic_relocate_section): Handle undefined
3036 aliases.
3037
9dfe8738
AS
30382004-11-07 Andreas Schwab <schwab@suse.de>
3039
3040 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3041 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3042 non-default visibility.
3043
c3c76620
MM
30442004-11-01 Mark Mitchell <mark@codesourcery.com>
3045
3046 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 3047 D_PAGED.
c3c76620
MM
3048 (elf32_arm_symbian_modify_segment_map): Don't
3049 reset includes_filehdr and includes_phdrs here.
3050
7f266840
DJ
30512004-11-04 Daniel Jacobowitz <dan@debian.org>
3052
3053 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3054 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3055 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3056 dependency.
3057 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3058 to a new removed list. Remove normal configuration stanzas.
3059 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3060 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3061 elfarm-nabi.lo with elf32-arm.lo.
3062 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3063 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3064 * elf32-arm.h: Remove.
3065 * elfarm-oabi.c: Remove.
3066 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3067 and bfd_elf32_littlearm_oabi_vec.
3068 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3069
bac23f82
HPN
30702004-11-04 Hans-Peter Nilsson <hp@axis.com>
3071
3072 * config.bfd: Support crisv32-*-* like cris-*-*.
3073 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3074 (bfd_mach_cris_v10_v32): New macros.
3075 * cpu-cris.c: Tweak formatting.
3076 (get_compatible): New function.
3077 (N): New macro.
3078 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3079 bfd_arch_info_type:s.
3080 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3081 get_compatible for member compatible and link bfd_cris_arch_v32 as
3082 next.
3083 * elf32-cris.c (cris_elf_pcrel_reloc)
3084 (cris_elf_set_mach_from_flags): New functions.
3085 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3086 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3087 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3088 numbers for bfd_mach_cris_v32.
3089 (PLT_ENTRY_SIZE_V32): New macro.
3090 (elf_cris_plt0_entry): Drop last comma in initializer.
3091 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3092 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3093 PLT initializers.
3094 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3095 "%B, section %A".
3096 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3097 (elf_cris_finish_dynamic_sections): Similar.
3098 (elf_cris_adjust_dynamic_symbol): Similar.
3099 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3100 section %A".
3101 <switch with PIC relocs>: Emit error and return FALSE for
3102 bfd_mach_cris_v10_v32.
3103 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3104 Emit warning when generating textrel reloc.
3105 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3106 (cris_elf_final_write_processing): Set flags according to mach.
3107 (cris_elf_print_private_bfd_data): Display
3108 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3109 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3110 new_flags. Don't call cris_elf_final_write_processing. Don't
3111 look at the actual elf header flags at all; use
3112 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3113 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3114 objects.
3115 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3116 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3117 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3118 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3119 * bfd-in2.h, libbfd.h: Regenerate.
3120
c5614fa4
AM
31212004-11-04 Alan Modra <amodra@bigpond.net.au>
3122
3123 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3124 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3125 comment.
3126 (struct adjust_toc_info): New.
3127 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3128
0ebdbb83
BW
31292004-11-03 Bob Wilson <bob.wilson@acm.org>
3130
3131 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3132 if there are no segments.
3133
675b2ace
DJ
31342004-11-02 Daniel Jacobowitz <dan@debian.org>
3135
3136 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3137
58852c27
NC
31382004-11-02 Nick Clifton <nickc@redhat.com>
3139
3140 * elf32-iq2000.c: Convert to ISO C90 formatting.
3141
e6857c0c
HPN
31422004-11-02 Hans-Peter Nilsson <hp@axis.com>
3143
20288ed6 3144 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 3145
bf718458
L
31462004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3147
3148 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3149 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3150 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3151
044ad7e3
KK
31522004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3153
3154 * elf32-sh.c (tpoff): Take alignment into account.
3155
d5cb4bb8
NC
31562004-10-28 Nick Clifton <nickc@redhat.com>
3157
3158 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 3159 performing a relocatable link.
d5cb4bb8
NC
3160 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3161 for MIPS ports under Irix.
3162
5b5bb741
PB
31632004-10-27 Richard Earnshaw <rearnsha@arm.com>
3164
3165 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3166 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3167 (elf32_arm_final_link_relocate): Ditto.
3168 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3169 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3170 (elf32_arm_adjust_dynamic_symbol): Ditto.
3171 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3172 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3173 (elf32_arm_r_howto): ... To here.
3174 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3175
97ecf322
L
31762004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3177
3178 PR 475
3179 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3180 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3181 and R_IA64_SECREL64LSB.
3182
3e3b46e5
PB
31832004-10-26 Paul Brook <paul@codesourcery.com>
3184
3185 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3186 (bfd_elf_size_dynamic_sections): Create default version definition.
3187 (elf_link_output_extsym): Adjust for default symbol version.
3188
aa69fe43
HPN
31892004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3190
278b4623
HPN
3191 * mmo.c: Adjust to ISO C.
3192
aa69fe43
HPN
3193 * mmo.c (mmo_write_section_description): New function broken out
3194 of mmo_internal_write_section.
3195 (mmo_internal_write_section): For each of .text and .data, call
3196 mmo_write_section_description before outputting contents if it has
3197 nontrivially deducible vma or contents.
3198 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3199 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3200 symbols if found within the .data address range.
3201
ed040321
DJ
32022004-10-24 Daniel Jacobowitz <dan@debian.org>
3203
3204 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3205
830866af
HPN
32062004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3207
3208 * mmo.c (File Layout): Correct place of misplaced blurb about
3209 special data.
3210
5f417ca3
MK
32112004-10-22 Mark Kettenis <kettenis@gnu.org>
3212
3213 * config.bfd: Add mips64*-*-openbsd.
3214
823fc61f
BW
32152004-10-21 Bob Wilson <bob.wilson@acm.org>
3216
3217 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3218 statements.
3219
8697aafb
L
32202004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3221
3222 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3223 * configure: Regenerate.
3224
dfeffb9f
L
32252004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3226
3227 PR 463
3228 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3229 to linker reloc_overflow callback.
3230 (aout_link_input_section_ext): Likewise.
3231 (aout_link_reloc_link_order): Likewise.
3232 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3233 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3234 Likewise.
3235 (alpha_relocate_section): Likewise.
3236 * coff-arm.c (coff_arm_relocate_section): Likewise.
3237 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3238 * coff-h8500.c (extra_case): Likewise.
3239 * coff-i960.c (coff_i960_relocate_section): Likewise.
3240 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3241 * coff-mips.c (mips_relocate_section): Likewise.
3242 * coff-or32.c (coff_or32_relocate_section): Likewise.
3243 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3244 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3245 * coff-sh.c (sh_relocate_section): Likewise.
3246 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3247 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3248 * coff-z8k.c (extra_case): Likewise.
3249 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3250 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3251 (_bfd_coff_generic_relocate_section): Likewise.
3252 * ecoff.c (ecoff_reloc_link_order): Likewise.
3253 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3254 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3255 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3256 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3257 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3258 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3259 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3260 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3261 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3262 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3263 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3264 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3265 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3266 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3267 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3268 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3269 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3270 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3271 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3272 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3273 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3274 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3275 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3276 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3277 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3278 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3279 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3280 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3281 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3282 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3283 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3284 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3285 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3286 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3287 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3288 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3289 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3290 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3291 * elflink.c (elf_reloc_link_order): Likewise.
3292 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3293 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3294 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3295 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3296 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3297 (aout_link_reloc_link_order): Likewise.
3298 * reloc.c (bfd_generic_get_relocated_section_contents):
3299 Likewise.
3300 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3301 * simple.c (simple_dummy_reloc_overflow): Updated.
3302
1715e0e3
AS
33032004-10-20 Andreas Schwab <schwab@suse.de>
3304
3305 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3306 (elf_backend_plt_sym_val): Define.
3307
db3d41a8
DS
33082004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3309
3310 * config.bfd: Set targ_underscore=yes for PE COFF targets
3311
4b85d634
AM
33122004-10-19 Alan Modra <amodra@bigpond.net.au>
3313
3314 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3315 (ppc64_elf_edit_opd): Likewise.
3316
6df4d94c
MM
33172004-10-18 Mark Mitchell <mark@codesourcery.com>
3318
3319 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3320 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3321 set SEC_ALLOC and SEC_LOAD.
3322
00d962d1
NC
33232004-10-18 Nick Clifton <nickc@redhat.com>
3324
3325 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3326 'name' for relocs against both local and global symbols.
3327
b58f81ae
DJ
33282004-10-16 Daniel Jacobowitz <dan@debian.org>
3329
3330 * bfd-in2.h: Regenerate.
3331 * bfd.c (struct bfd): Add no_export.
3332 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3333
7d3f158f
AM
33342004-10-15 Alan Modra <amodra@bigpond.net.au>
3335
3336 * config.bfd: Whitespace cleanup.
3337 * Makefile.am: Run "make dep-am"
3338 * Makefile.in: Regenerate.
3339
6d2cd210
JJ
33402004-10-15 Jakub Jelinek <jakub@redhat.com>
3341
3342 * elflink.c (struct already_linked_section): Removed.
3343 (try_match_symbols_in_sections, already_linked): Removed.
3344 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3345 prefix of section names when finding already_linked_table
3346 chain. Compare section names. Instead of calling already_linked,
3347 do it inline and only for sections in the same already_linked_list.
3348
92e4ec35
AM
33492004-10-15 Alan Modra <amodra@bigpond.net.au>
3350
3351 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3352 parameter. If called after _bfd_elf_write_section_eh_frame,
3353 don't allow a -2 return unless need_* bit is already set, and
3354 handle offsets adjusted for output_offset.
3355 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3356 * elf.c (_bfd_elf_section_offset): Update call.
3357
7bf6dede
L
33582004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3359
3360 PR 440
3361 * coffcode.h (coff_compute_section_file_positions): Cast to
3362 bfd_vma when computing page alignment.
3363
c0042f5d
MM
33642004-10-13 Mark Mitchell <mark@codesourcery.com>
3365
3366 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3367 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3368
2a1b9a48
MM
33692004-10-12 Mark Mitchell <mark@codesourcery.com>
3370
3371 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3372 relocations use a virtual address, not a section offset.
3373
b08b5071
BW
33742004-10-12 Bob Wilson <bob.wilson@acm.org>
3375
3376 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3377 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3378 xtensa_format_encode.
3379 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3380 (ebb_add_proposed_action): Delete.
3381
7fa3d080
BW
33822004-10-12 Bob Wilson <bob.wilson@acm.org>
3383
3384 * elf32-xtensa.c: Use ISO C90 formatting.
3385
3656d5e3
PB
33862004-10-12 Paul Brook <paul@codesourcery.com>
3387
3388 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3389 message.
3390
8cb51566
PB
33912004-10-12 Paul Brook <paul@codesourcery.com>
3392
3393 * elf32-arm.h: Support EABI version 4 objects.
3394
1abc8597
AM
33952004-10-12 Alan Modra <amodra@bigpond.net.au>
3396
3397 PR 325
3398 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3399 Don't mark as default.
3400 (bfd_x86_64_arch): Don't mark as default.
3401
9e66c942
AM
34022004-10-12 Alan Modra <amodra@bigpond.net.au>
3403
3404 * elflink.c (enum action_discarded): New.
3405 (elf_section_complain_discarded): Delete.
3406 (elf_action_discarded): New function subsuming the above and also
3407 controlling reloc behaviour.
1abc8597 3408 (elf_link_input_bfd): Use it.
9e66c942 3409
7f1204bb
JJ
34102004-10-11 Jakub Jelinek <jakub@redhat.com>
3411
3412 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3413 (special_sections): Add .gnu.liblist and .gnu.conflict.
3414 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3415
87e5235d
AM
34162004-10-11 Alan Modra <amodra@bigpond.net.au>
3417
3418 PR 233
3419 * elflink.c (elf_link_input_bfd): Try harder to support
3420 relocations against symbols in removed linkonce sections.
3421
2ad770c3
AM
34222004-10-11 Alan Modra <amodra@bigpond.net.au>
3423
029446c4
AM
3424 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3425
2ad770c3
AM
3426 PR 354
3427 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3428 sections do not reference symbols in non-SEC_ALLOC sections.
3429
1da212d6
AM
34302004-10-11 Alan Modra <amodra@bigpond.net.au>
3431
3432 PR 437
3433 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3434 (_bfd_elf_link_omit_section_dynsym): Formatting.
3435
f12123c0
AM
34362004-10-10 Alan Modra <amodra@bigpond.net.au>
3437
3438 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3439 * libbfd.h: Regnerate.
3440 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3441 * elf32-frv.c: Likewise.
3442 * elf32-m32r.c: Likewise.
3443 * elf32-ppc.c: Likewise.
3444 * elf64-hppa.c: Likewise.
3445 * elfxx-ia64.c: Likewise.
3446 * opncls.c: Likewise.
3447
fda3ecf2
AM
34482004-10-10 Alan Modra <amodra@bigpond.net.au>
3449
3472e2e9
AM
3450 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3451 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3452 offsets stored in struct eh_cie_fde entries before doing other
3453 work.
3454
fda3ecf2
AM
3455 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3456 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3457 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3458 setting offsets for removed CIEs. Don't set "sec", instead set
3459 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3460 CIE in hdr_info. Only set make_relative and make_lsda_relative
3461 for CIEs. Use pointers rather than array indices.
3462 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3463 make_lsda_relative, need_* on cie_inf for FDEs.
3464 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3465 section output_offset. Delete cie_offset, instead use cie_inf
3466 pointer to CIE entry. Use need_relative and need_lsda_relative on
3467 CIE entry for FDEs. Use pointers rather than array indices.
3468
7db6994f
AM
34692004-10-09 Alan Modra <amodra@bigpond.net.au>
3470
3471 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3472 bfd_is_target_special_symbol.
3473 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3474 * som.c (som_bfd_is_target_special_symbol): Define.
3475
3c9458e9
NC
34762004-10-08 Nick Clifton <nickc@redhat.com>
3477
3478 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3479 * configure: Regenerate.
3480 * bfd-in2.h: Regenerate.
3481 * syms.c (bfd_is_target_special_symbol): New interface function.
3482 Returns true when a symbol should be considered to be special.
7db6994f 3483 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
3484 the symbol jump table.
3485 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3486 Return true iff the symbol is a mapping symbol.
3487 (bfd_elf32_bfd_is_target_special_symbol): Define.
3488 * elfxx-target.h: Provide a default definition for
3489 bfd_is_target_special_symbol.
3490 * aout-target.h: Likewise.
3491 * aout-tic30.c: Likewise.
873d03ee 3492 * binary.c: Likewise.
3c9458e9
NC
3493 * coffcode.h: Likewise.
3494 * i386msdos.c: Likewise.
3495 * ieee.c: Likewise.
873d03ee 3496 * ihex.c: Likewise.
3c9458e9
NC
3497 * libaout.h: Likewise.
3498 * libbfd-in.h: Likewise
3499 * libecoff.h: Likewise.
3500 * mach-o.c: Likewise.
3501 * mmo.c: Likewise.
3502 * nlm-target.h: Likewise.
3503 * oasys.c: Likewise.
3504 * pef.c: Likewise.
3505 * ppcboot.c: Likewise.
3506 * srec.c: Likewise.
3507 * tekhex.c: Likewise.
3508 * versados.c: Likewise.
3509 * vms.c: Likewise.
3510 * xcoff-target.h: Likewise.
3511 * xsym.c: Likewise.
3512 * libbfd.h: Regenerate.
3513
d2b2c203
DJ
35142004-10-08 Daniel Jacobowitz <dan@debian.org>
3515
3516 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3517 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3518 (elf_backend_section_from_shdr): Define.
3519
864274b0
AM
35202004-10-08 Alan Modra <amodra@bigpond.net.au>
3521
3522 * syms.c (bfd_is_local_label): Return false for file symbols.
3523
43cd72b9 35242004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 3525 David Heine <dlheine@tensilica.com>
43cd72b9
BW
3526
3527 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3528 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3529 (elf32xtensa_no_literal_movement): New global variable.
3530 (elf_howto_table): Add entries for new relocations.
3531 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3532 (property_table_compare): When addresses are equal, compare sizes and
3533 various property flags.
3534 (property_table_matches): New.
3535 (xtensa_read_table_entries): Extend to read new property tables. Add
3536 output_addr parameter to indicate that output addresses should be used.
3537 Use bfd_get_section_limit.
3538 (elf_xtensa_find_property_entry): New.
3539 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3540 (elf_xtensa_check_relocs): Handle new relocations.
3541 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3542 relocations. Use new xtensa-isa.h functions.
3543 (build_encoding_error_message): Remove encode_result parameter. Add
3544 new target_address parameter used to detect alignment errors.
3545 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3546 error handling. Use new is_operand_relocation function.
3547 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3548 Use underbar macro for error messages. Formatting.
3549 (get_const16_opcode): New.
3550 (get_l32r_opcode): Add a separate flag for initialization.
3551 (get_relocation_opnd): Operand number is no longer explicit in the
3552 relocation. Change to decode the opcode and analyze its operands.
3553 (get_relocation_slot): New.
3554 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3555 Use new xtensa-isa.h functions to handle multislot instructions.
3556 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3557 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3558 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3559 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3560 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3561 get_single_format, init_op_single_format_table): New.
3562 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3563 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3564 (contract_asm_expansion): Add error_message parameter and pass it to
3565 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3566 with R_XTENSA_SLOT0_OP.
3567 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3568 instructions. Use new xtensa-isa.h functions.
3569 (r_reloc struct): Add new virtual_offset field.
3570 (r_reloc_init): Add contents and content_length parameters. Set
3571 virtual_offset field to zero. Add contents to target_offset field for
3572 partial_inplace relocations.
3573 (r_reloc_is_defined): Check for null.
3574 (print_r_reloc): New debug function.
3575 (source_reloc struct): Replace xtensa_operand field with pair of the
3576 opcode and the operand position. Add is_abs_literal field.
3577 (init_source_reloc): Specify operand by opcode/position pair. Set
3578 is_abs_literal field.
3579 (source_reloc_compare): When target_offsets are equal, compare other
3580 fields to make sorting predictable.
3581 (literal_value struct): Add is_abs_literal field.
3582 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3583 (init_literal_value): New.
3584 (is_same_value): Replace with ...
3585 (literal_value_equal): ... this function. Add comparisons of
3586 virtual_offset and is_abs_literal fields.
3587 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3588 failure. Initialize has_last_loc field.
3589 (value_map_hash_table_delete): New.
3590 (hash_literal_value): Rename to ...
3591 (literal_value_hash): ... this. Include is_abs_literal flag and
3592 virtual_offset field in the hash value.
3593 (get_cached_value): Rename to ...
3594 (value_map_get_cached_value): ... this. Update calls to
3595 literal_value_hash and literal_value_equal.
3596 (add_value_map): Check for allocation failure. Update calls to
3597 value_map_get_cached_value and literal_value_hash.
3598 (text_action, text_action_list, text_action_t): New types.
3599 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3600 text_action_add, text_action_add_literal, offset_with_removed_text,
3601 offset_with_removed_text_before_fill, find_insn_action,
3602 print_action_list, print_removed_literals): New.
3603 (offset_with_removed_literals): Delete.
3604 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3605 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3606 allocated_relocs_count fields.
3607 (init_xtensa_relax_info): Initialize new fields.
3608 (reloc_bfd_fix struct): Add new translated field.
3609 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3610 translated field.
3611 (fix_compare, cache_fix_array): New.
3612 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3613 section via get_xtensa_relax_info. Use cache_fix_array to set up
3614 sorted fix_array and use bsearch instead of linear search.
3615 (section_cache_t): New struct.
3616 (init_section_cache, section_cache_section, clear_section_cache): New.
3617 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3618 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3619 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3620 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3621 New.
3622 (retrieve_contents): Use bfd_get_section_limit.
3623 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3624 to compute_removed_literals. Free value_map_hash_table when no longer
3625 needed.
3626 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3627 compute_text_actions for all sections.
3628 (find_relaxable_sections): Mark sections as relaxable if they contain
3629 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3630 call. Increment relax_info src_count field only for appropriate
3631 relocation types. Remove is_literal_section check.
3632 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3633 r_reloc_init and find_associated_l32r_irel. Check
3634 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3635 literals. Pass is_abs_literal flag to init_source_reloc.
3636 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3637 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 3638 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
3639 (find_associated_l32r_irel): Add bfd parameter and pass it to
3640 is_l32r_relocation.
3641 (compute_text_actions, compute_ebb_proposed_actions,
3642 compute_ebb_actions, check_section_ebb_pcrels_fit,
3643 check_section_ebb_reduces, text_action_add_proposed,
3644 compute_fill_extra_space): New.
3645 (remove_literals): Replace with ...
3646 (compute_removed_literals): ... this function. Call
3647 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3648 Call xtensa_read_table_entries to get the property table. Skip
3649 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3650 is_removable_literal, remove_dead_literal, and
fda3ecf2 3651 identify_literal_placement functions.
43cd72b9
BW
3652 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3653 instead of linear search.
3654 (is_removable_literal, remove_dead_literal,
3655 identify_literal_placement): New.
3656 (relocations_reach): Update check for literal not referenced by any
3657 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3658 (coalesce_shared_literal, move_shared_literal): New.
3659 (relax_section): Use bfd_get_section_limit. Call
3660 translate_section_fixes. Update calls to r_reloc_init and
3661 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3662 Add call to pin_internal_relocs. Add special handling for
3663 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3664 info to calculate new addend_displacement variable. Replace code for
3665 deleting literals with more general code to perform the actions
3666 determined by the action_list for the section.
3667 (translate_section_fixes, translate_reloc_bfd_fix): New.
3668 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3669 find_removed_literal only if is_operand_relocation. Update call to
3670 offset_with_removed_text. Use new target_offset and removed_bytes
3671 variables.
3672 (move_literal): New.
3673 (relax_property_section): Use bfd_get_section_limit. Set new
3674 is_full_prop_section flag and handle new property tables. Update calls
3675 to r_reloc_init and offset_with_removed_text. Check
3676 is_relaxable_asm_section flag. Handle expansion of zero-sized
3677 unreachable entries, with use of offset_with_removed_text_before_fill.
3678 For relocatable links, combine entries only for literal tables.
3679 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3680 calls to offset_with_removed_text. Translate st_size field for
3681 function symbols.
3682 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3683 failure. Add contents parameter. Update call to get_bfd_fix. Update
3684 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3685 R_XTENSA_ASM_EXPAND relocs.
3686 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3687 call to get_bfd_fix. Include offset from contents for partial_inplace
3688 relocations.
3689 (is_reloc_sym_weak): New.
3690 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3691 (prop_sec_len): New.
3692 (xtensa_is_property_section): Handle new property sections.
3693 (is_literal_section): Delete.
3694 (internal_reloc_compare): When r_offset matches, compare r_info and
3695 r_addend to make sorting predictable.
3696 (internal_reloc_matches): New.
3697 (xtensa_get_property_section_name): Handle new property sections.
3698 (xtensa_get_property_predef_flags): New.
3699 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3700 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3701 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3702 (xtisa_errno, xtisa_error_msg): New variables.
3703 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3704 (xtensa_insnbuf_alloc): Add error handling.
3705 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3706 use xtensa_format_decode. Add error handling.
3707 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3708 instruction length to find the number of bytes to copy.
3709 (xtensa_isa_init): Add error handling. Replace calls to
3710 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3711 tables in the xtensa_modules structure.
3712 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3713 xtensa_extend_isa): Delete.
3714 (xtensa_isa_free): Change to only free lookup tables.
3715 (opname_lookup_compare): Replace with ...
3716 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3717 (xtensa_insn_maxlength): Rename to ...
3718 (xtensa_isa_maxlength): ... this.
3719 (xtensa_insn_length): Delete.
3720 (xtensa_insn_length_from_first_byte): Replace with ...
3721 (xtensa_isa_length_from_chars): ... this function.
3722 (xtensa_num_opcodes): Rename to ...
3723 (xtensa_isa_num_opcodes): ... this.
3724 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3725 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3726 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3727 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3728 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3729 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3730 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3731 (xtensa_opcode_lookup): Add error handling.
3732 (xtensa_decode_insn): Replace with ...
3733 (xtensa_opcode_decode): ... this function, with new format and
3734 slot parameters. Add error handling.
3735 (xtensa_encode_insn): Replace with ...
3736 (xtensa_opcode_encode): ... this function, which does the encoding via
3737 one of the entries in the "encode_fns" array. Add error handling.
3738 (xtensa_opcode_name): Add error handling.
3739 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3740 xtensa_opcode_is_call): New.
3741 (xtensa_num_operands): Replace with ...
3742 (xtensa_opcode_num_operands): ... this function. Add error handling.
3743 (xtensa_opcode_num_stateOperands,
3744 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3745 xtensa_opcode_funcUnit_use, xtensa_operand_name,
3746 xtensa_operand_is_visible): New.
3747 (xtensa_get_operand, xtensa_operand_kind): Delete.
3748 (xtensa_operand_inout): Add error handling and special-case for
3749 "sout" operands.
3750 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3751 operate on one slot of an instruction. Added error handling.
3752 (xtensa_operand_encode): Handle default operands with no encoding
3753 functions. Check for success by comparing against decoded value.
3754 Add error handling.
3755 (xtensa_operand_decode): Handle default operands. Return decoded value
3756 through argument pointer. Add error handling.
3757 (xtensa_operand_is_register, xtensa_operand_regfile,
3758 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3759 (xtensa_operand_isPCRelative): Rename to ...
3760 (xtensa_operand_is_PCrelative): ... this. Add error handling.
3761 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3762 through argument pointer. Add error handling.
3763 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3764 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3765 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3766 xtensa_regfile_shortname, xtensa_regfile_view_parent,
3767 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3768 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3769 xtensa_state_is_exported, xtensa_sysreg_lookup,
3770 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3771 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3772 xtensa_interface_num_bits, xtensa_interface_inout,
3773 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3774 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3775 * xtensa-modules.c: Rewrite to use new data structures.
3776 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3777 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3778 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3779 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3780 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3781 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3782 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3783 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3784 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3785 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3786 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3787 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3788 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3789 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
3790 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
3791 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
3792 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
3793 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
3794 * Makefile.in: Regenerate.
3795 * bfd-in2.h: Likewise.
3796 * libbfd.h: Likewise.
3797
99022dfb
RS
37982004-10-07 Richard Sandiford <rsandifo@redhat.com>
3799
3800 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
3801 against the absolute section.
3802 (mips_elf64_write_rela): Likewise.
3803
b67ae299
NC
38042004-10-07 Jan Beulich <jbeulich@novell.com>
3805
3806 * elf.c (elf_find_function): Don't generally check for matching
3807 section, just for non-file symbols. Remove redunant comparison
3808 for the latter.
3809 * elf32-arm.h (arm_elf_find_function): Likewise.
3810
8fdd7217
NC
38112004-10-07 Jeff Baker <jbaker@qnx.com>
3812
3813 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
3814 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
3815 was specified.
3816
073a2dc3
RM
38172004-10-04 Roland McGrath <roland@redhat.com>
3818
3819 * hash.c (bfd_hash_set_default_size): Use const for table.
3820 Use size_t instead of int for variable compared to sizeof results.
3821
7785be14
AM
38222004-10-05 Alan Modra <amodra@bigpond.net.au>
3823
3824 PR 425
3825 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
3826
40a18ebd
NC
38272004-10-01 Paul Brook <paul@codesourcery.com>
3828
3829 * elf32-arm.h (elf32_arm_fake_sections,
3830 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
3831 functions.
3832 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
3833
8935b81f
AM
38342004-10-01 Alan Modra <amodra@bigpond.net.au>
3835
3836 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
3837 need_lsda_relative.
3838 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
3839 need_relative or need_lsda_relative if we are processing an
3840 offset for a reloc on a FDE initial loc or LSDA field
3841 respectively.
3842 (_bfd_elf_write_section_eh_frame): Test need_relative and
3843 need_lsda_relative in place of corresponding make_* field
3844 when deciding to use pc-relative encodings.
3845
eeac373a
PB
38462004-09-30 Paul Brook <paul@codesourcery.com>
3847
3848 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
3849 target2 relocation type.
3850
7479dfd4
L
38512004-09-30 H.J. Lu <hongjiu.lu@intel.com>
3852
3853 PR 414
3854 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
3855
0dd132b6
NC
38562004-09-30 Paul Brook <paul@codesourcery.com>
3857
3858 * reloc.c: Add BFD_RELOC_ARM_SMI.
3859 * bfd-in2.h: Regenerate.
3860 * libbfd.h: Ditto.
3861
1ba54ee0
AM
38622004-09-24 Alan Modra <amodra@bigpond.net.au>
3863
3864 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
3865 vma and output offset to address.
3866 * simple.c (simple_save_output_info): Only set output section
3867 and offset for debug sections, or those not already set up by
3868 the linker.
3869 (bfd_simple_get_relocated_section_contents): Update comment.
3870
5efb6261
AM
38712004-09-24 Alan Modra <amodra@bigpond.net.au>
3872
3873 * elf.c (IS_LOADED): Delete.
3874 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
3875 Restore SEC_HAS_CONTENTS test to the one place it was used prior
3876 to 2004-09-22.
3877
fca870e4
AM
38782004-09-23 Alan Modra <amodra@bigpond.net.au>
3879
3880 PR gas/396
3881 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3882 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
3883 redundant assignment of EM_SPARC.
3884
c86696a3
BF
38852004-09-22 Brian Ford <ford@vss.fsi.com>
3886
3887 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3888 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3889 constants.
3890 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3891
73adb214
AM
38922004-09-22 Alan Modra <amodra@bigpond.net.au>
3893
3894 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3895 (elf_backend_modify_segment_map): Don't define.
3896
b301b248
AM
38972004-09-22 Alan Modra <amodra@bigpond.net.au>
3898
3899 * elf.c (IS_LOADED): Define.
3900 (assign_file_positions_for_segments): Don't round up file offset of
3901 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
3902 Delete code handling link script adjustment of lma. Do the adjust
3903 in later code handling similar ajustments. Remove dead code error
3904 check. Warn if section lma would require a negative offset
3905 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
3906 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
3907 update voff in section loop. Change voff in segment loop to be an
3908 adjustment on top of "off". Set sec->filepos and update "off" later.
3909 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 3910 test for alloc-only sections other than .tbss consistently.
b301b248
AM
3911 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
3912 Tidy PT_NOTE handling. Use %B and %A in error messages.
3913 (assign_file_positions_except_relocs): Use %B in error message.
3914
3f85e526
L
39152004-09-17 H.J. Lu <hongjiu.lu@intel.com>
3916
3917 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
3918 (CONFIG_STATUS_DEPENDENCIES): New.
3919 (Makefile): Removed.
3920 (config.status): Likewise.
3921 * Makefile.in: Regenerated.
3922
eb043451
PB
39232004-09-17 Paul Brook <paul@codesourcery.com>
3924
3925 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
3926 (bfd_elf32_arm_process_before_allocation): Update prototype.
3927 * bfd-in2.h: Regenerate.
3928 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
3929 (elf32_arm_link_hash_table_create): Set it.
3930 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
3931 (bfd_elf32_arm_set_target_relocs): New function.
3932 (arm_real_reloc_type): New function.
3933 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
3934 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
3935 (elf32_arm_gc_sweep_hook): Ditto.
3936 (elf32_arm_check_relocs): Ditto.
3937 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
3938 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
3939 R_ARM_GOT_TARGET2.
3940 (elf32_arm_got_prel): New variable.
3941 (elf32_arm_howto_from_type): New function.
3942 (elf32_arm_info_to_howto): Use it.
3943 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
3944 BFD_RELOC_ARM_TARGET2.
3945 * libbfd.h: Regenerate.
3946 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
3947
f6e332e6
AM
39482004-09-17 Alan Modra <amodra@bigpond.net.au>
3949
3950 * ecoff.c: Update u.undef.next refs.
3951 * elf64-ppc.c: Likewise.
3952 * elflink.c: Likewise.
3953 * linker.c: Likewise.
3954 * xcofflink.c: Likewise.
3955
3956 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
3957 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
3958 fields to indirect struct.
3959 * elf-m10300.c: Update u.weakdef refs.
3960 * elf32-arm.h: Likewise.
3961 * elf32-cris.c: Likewise.
3962 * elf32-frv.c: Likewise.
3963 * elf32-hppa.c: Likewise.
3964 * elf32-i370.c: Likewise.
3965 * elf32-i386.c: Likewise.
3966 * elf32-m32r.c: Likewise.
3967 * elf32-m68k.c: Likewise.
3968 * elf32-ppc.c: Likewise.
3969 * elf32-s390.c: Likewise.
3970 * elf32-sh.c: Likewise.
3971 * elf32-sparc.c: Likewise.
3972 * elf32-vax.c: Likewise.
3973 * elf32-xtensa.c: Likewise.
3974 * elf64-alpha.c: Likewise.
3975 * elf64-hppa.c: Likewise.
3976 * elf64-ppc.c: Likewise.
3977 * elf64-s390.c: Likewise.
3978 * elf64-sh64.c: Likewise.
3979 * elf64-sparc.c: Likewise.
3980 * elf64-x86-64.c: Likewise.
3981 * elfxx-ia64.c: Likewise.
3982 * elfxx-mips.c: Likewise.
3983 * elflink.c: Likewise. Also u.elf_hash_value.
3984 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
3985 indirection.
3986 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3987 (bfd_elf_gc_record_vtinherit): Alloc vtable.
3988 (bfd_elf_gc_record_vtentry): Likewise.
3989 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
3990
90c0a373
AM
39912004-09-17 Alan Modra <amodra@bigpond.net.au>
3992
3993 * Makefile.am: Run "make dep-am".
3994 * Makefile.in: Regenerate.
3995 * bfd-in2.h: Regenerate.
3996 * po/SRC-POTFILES.in: Regenerate.
3997 * po/bfd.pot: Regenerate.
3998
f5385ebf
AM
39992004-09-16 Alan Modra <amodra@bigpond.net.au>
4000
4001 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4002 with bitfields. Make "type" and "other" bitfields too.
4003 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4004 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4005 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4006 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4007 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4008 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4009 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4010 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4011 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4012 * elf-m10300.c: Likewise.
4013 * elf.c: Likewise.
4014 * elf32-arm.h: Likewise.
4015 * elf32-cris.c: Likewise.
4016 * elf32-frv.c: Likewise.
4017 * elf32-hppa.c: Likewise.
4018 * elf32-i370.c: Likewise.
4019 * elf32-i386.c: Likewise.
4020 * elf32-m32r.c: Likewise.
4021 * elf32-m68k.c: Likewise.
4022 * elf32-ppc.c: Likewise.
4023 * elf32-s390.c: Likewise.
4024 * elf32-sh-symbian.c: Likewise.
4025 * elf32-sh.c: Likewise.
4026 * elf32-sh64.c: Likewise.
4027 * elf32-sparc.c: Likewise.
4028 * elf32-vax.c: Likewise.
4029 * elf32-xtensa.c: Likewise.
4030 * elf64-alpha.c: Likewise.
4031 * elf64-hppa.c: Likewise.
4032 * elf64-ppc.c: Likewise.
4033 * elf64-s390.c: Likewise.
4034 * elf64-sh64.c: Likewise.
4035 * elf64-sparc.c: Likewise.
4036 * elf64-x86-64.c: Likewise.
4037 * elflink.c: Likewise.
4038 * elfxx-ia64.c: Likewise.
4039 * elfxx-mips.c: Likewise.
4040 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4041 * configure: Regenerate.
4042 * aclocal.m4: Regenerate.
4043
b6ee372a
AM
40442004-09-16 Alan Modra <amodra@bigpond.net.au>
4045
4046 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4047 around uses of R_ARM_TARGET1.
4048 (elf32_arm_check_relocs): Likewise.
4049
9c504268
PB
40502004-09-13 Paul Brook <paul@codesourcery.com>
4051
4052 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4053 prototype.
4054 * bfd-in2.h: Regenerate.
4055 * libbfd.h: Regenerate.
4056 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4057 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4058 (bfd_elf32_arm_process_before_allocation): Ditto.
4059 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4060 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4061 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4062 * reloc.c: Ditto.
4063
94ea025a
JB
40642004-09-10 Joel Brobecker <brobecker@gnat.com>
4065
4066 * hpux-core.c (thread_section_p): New function.
4067 (hpux_core_core_file_p): Fix computation of offset in call
4068 to bfd_seek. Create a ".reg" section from an arbitrary
4069 ".reg/<id>" section if none was created after having read
4070 all sections.
4071
24443139
AS
40722004-09-11 Andreas Schwab <schwab@suse.de>
4073
4074 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4075 * aclocal.m4: Rebuild.
4076 * configure: Rebuild.
4077
f4eae89c
JB
40782004-09-10 Joel Brobecker <brobecker@gnat.com>
4079
4080 * section.c (bfd_sections_find_if): Fix parameter name in
4081 comment to match code.
4082
e0638f70
AM
40832004-09-10 Alan Modra <amodra@bigpond.net.au>
4084
4085 * elf.c (assign_file_positions_except_relocs): Assign relocs
4086 stored in a bfd section.
4087
5e0f5ae3
HPN
40882004-09-08 Hans-Peter Nilsson <hp@axis.com>
4089
4090 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4091 h->gotplt_refcount to 0, not -1.
4092
ada1953e
HPN
40932004-09-07 Hans-Peter Nilsson <hp@axis.com>
4094
4095 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4096 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4097 symname.
4098 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4099 handle symbol visibility here.
4100
ee75fd95
AM
41012004-09-07 Alan Modra <amodra@bigpond.net.au>
4102
4103 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4104 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4105 callers.
4106 (ppc_stub_name): Remove trailing "+0" on stub name.
4107 (create_linkage_sections): Create relocations for
4108 branch lookup table when --emit-relocs as well as when --shared.
4109 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4110 relbrlt test. For --emit-stub-syms, always output a sym even when
4111 one already exists on a plt call stub. Put stub type in the stub
4112 symbol name.
4113 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4114 test.
4115 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4116 reloc_count in stub sections. Adjust relbrlt test.
4117 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4118 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4119 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4120 for relocs against discarded symbols. Fix comments.
4121
229fcec5
MM
41222004-09-06 Mark Mitchell <mark@codesourcery.com>
4123
4124 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4125 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4126 from ...
4127 (map_sections_to_segments): ... here. Use it. Assign a file
4128 position to the .dynamic section if it is not loadable, but part
4129 of the PT_DYNAMIC segment.
4130 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4131 offsets, not VMAs, for the BPABI. Do not fill in the header in
4132 the .got.plt section for the BPABI.
4133 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4134 PT_DYNAMIC segment.
4135 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 4136
9a0789ec
NC
41372004-09-06 Nick Clifton <nickc@redhat.com>
4138
4139 * elflink.c (elf_link_add_object_symbols): Set the error code to
4140 bfd_error_wrong_format when the input format does not match the
4141 output format.
4142
7b53ace3
AM
41432004-09-06 Alan Modra <amodra@bigpond.net.au>
4144
4145 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4146 (ppc64_elf_check_directives): ..here.
4147 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4148 before accessing ppc64_elf_tdata.
4149 (ppc64_elf_finish_dynamic_sections): And here too.
4150
3e540f25
AM
41512004-09-04 Alan Modra <amodra@bigpond.net.au>
4152
4153 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4154
e5a52504
MM
41552004-09-03 Mark Mitchell <mark@codesourcery.com>
4156
4157 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4158 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4159 (bfd_elf32_littlearm_symbian_vec): Likewise.
4160 * configure: Regenerated.
4161 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4162 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4163 (PLT_ENTRY_SIZE): Likewise.
4164 (bfd_vma_elf32_arm_symbian_plt_entry): New
4165 variable.
4166 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4167 and symbian_p.
4168 (create_got_section): Don't create sections when generating BPABI
4169 objects.
4170 (elf32_arm_create_dynamic_sections): Tidy.
4171 (elf32_arm_link_hash_table_create): Set plt_header_size,
4172 plt_entry_size, and symbian_p.
4173 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4174 generating BPABI objects.
4175 (allocate_dynrelocs): Use htab->plt_header_size, not
4176 PLT_HEADER_SIZE. Do not add to .got.plt when
4177 generating BPABI objects.
4178 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4179 * elfarm-nabi.c: Add SymbianOS target vectors.
4180 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4181 (_bfd_elf_link_create_dynamic_sections): Likewise.
4182 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4183 (elfNN_bed): Use it.
4184 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4185 (bfd_elf32_littlearm_symbian_vec): Likewise.
4186 (_bfd_target_vector): Add them.
4187
6e3b6835
NC
41882004-09-03 Nick Clifton <nickc@redhat.com>
4189
4190 PR 360
4191 * coffcode.h (handle_COMDAT): Replace abort with an warning
4192 message and allow the scan to continue.
4193
595da8c5
AM
41942004-09-02 Alan Modra <amodra@bigpond.net.au>
4195
4196 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4197 in when reading relocs, not our sorted syms. Remove unnecessary
4198 var.
4199
6723a9f4
EB
42002004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4201
4202 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4203
5464f5a1
NN
42042004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4205
4206 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4207 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4208 replace uses of *_alias with *_noncanonical.
4209 * aclocal.m4: Rebuild with aclocal 1.4p6.
4210 * Makefile.in: Rebuild with automake 1.4p6.
4211 * doc/Makefile.in: Rebuild with automake 1.4p6.
4212 * configure.in: Autoupdate with autoupdate 2.59.
4213 * config.in: Regenerate with autoheader 2.59.
4214 * configure: Regnerate with autoconf 2.59.
4215
a7535cf3
AM
42162004-08-28 Alan Modra <amodra@bigpond.net.au>
4217
4218 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4219 symbol pointer arrays before modifying.
4220
c9727e01
AM
42212004-08-28 Alan Modra <amodra@bigpond.net.au>
4222
b91e2ae2 4223 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
4224 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4225 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4226 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
4227 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4228 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4229 Use both symbol tables on non-relocatable objects. Use a common
4230 error exit. Fix "mid" warning.
c9727e01
AM
4231 * libbfd.h: Regenerate.
4232 * bfd-in2.h: Regenerate.
4233
699733f6
AM
42342004-08-28 Alan Modra <amodra@bigpond.net.au>
4235
4236 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4237 object file.
4238 (struct sfpr_def_parms): Save some space.
4239 (sfpr_define): Here too.
4240
4241 * elf64-ppc.c (compare_symbols): Put section syms first.
4242 (sym_exists_at): New function.
4243 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4244 points only for relocatable files. Use .opd section contents
4245 otherwise. Generally clean up the code.
4246
deb0e272
AM
42472004-08-27 Alan Modra <amodra@bigpond.net.au>
4248
4249 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4250 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4251 (struct sfpr_def_parms): New.
4252 (sfpr_define): New function.
4253 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4254 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4255 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4256 (savefpr1_tail, restfpr1_tail): New functions.
4257 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4258 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4259 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4260 code. Define all ABI mandated _save and _rest functions.
4261
85a84e7a
PB
42622004-08-26 Paul Brook <paul@codesourcery.com>
4263
deb0e272 4264 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 4265
688c58f3
AM
42662004-08-26 Alan Modra <amodra@bigpond.net.au>
4267
4268 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4269 TRUE or FALSE.
4270
3e95eabc
AM
42712004-08-26 Alan Modra <amodra@bigpond.net.au>
4272
4273 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4274 that pcrel correction is applied for R_386_PC32.
4275
f855931b
AM
42762004-08-25 Alan Modra <amodra@bigpond.net.au>
4277
4278 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4279 for R_386_32 and R_386_PC32 relocs against symbols defined in
4280 discarded sections.
4281
b18c562e
NC
42822004-08-25 Dmitry Diky <diwil@spec.ru>
4283
4284 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4285 Add new relocations.
4286 * bfd-in2.h: Regenerate.
f855931b 4287 * libbfd.h: Regenerate.
b18c562e
NC
4288 * elf32-msp430.c: Clean-up code.
4289 (elf_msp430_howto_table): Add new relocation entries.
4290 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4291 (msp430_elf_relax_section): New function.
4292 (msp430_elf_relax_delete_bytes): New function.
4293 (msp430_elf_symbol_address_p): New function.
4294
af705ba8
NC
42952004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4296
4297 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4298 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4299
ea5158d8
DJ
43002004-08-20 Daniel Jacobowitz <dan@debian.org>
4301
4302 * elflink.c (_bfd_elf_section_already_linked): Handle
4303 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4304
49d934f1
MM
43052004-08-19 Mark Mitchell <mark@codesourcery.com>
4306
4307 * config.bfd (arm*-*-symbianelf*): New target.
4308 (arm*-*-eabi*): Likewise.
4309
039b3fef
AM
43102004-08-19 Alan Modra <amodra@bigpond.net.au>
4311
4312 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4313 "struct ppc_link_hash_entry *".
4314 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4315 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4316
3f764659
JJ
43172004-08-19 Jakub Jelinek <jakub@redhat.com>
4318
4319 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4320 entries (where fd_aux overlaps next entry's fd_func).
4321 Add non_overlapping argument, use it.
4322 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4323 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4324 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4325 as indexes into opd_sym_map/opd_adjust array.
4326 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4327
c09bdfe5
AM
43282004-08-18 Alan Modra <amodra@bigpond.net.au>
4329
4330 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4331 if we can look up their function descriptor in a regular file.
4332
271d0fc3
NC
43332004-08-18 Nick Clifton <nickc@redhat.com>
4334
4335 PR 324
4336 * cofflink.c (coff_link_add_symbols): Check that the comdat
4337 pointer in the coff_section_data structure has been initialised
4338 before using it.
4339
a010d60f
AM
43402004-08-18 Alan Modra <amodra@bigpond.net.au>
4341
4342 PR 338
4343 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4344 changing bfd_link_hash_undefined to bfd_link_hash_new.
4345
90e3cdf2
JJ
43462004-08-17 Jakub Jelinek <jakub@redhat.com>
4347
4348 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4349 if not yet defined.
4350 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4351 (synthetic_opd, synthetic_relocatable): New variables.
4352 (compare_symbols, compare_relocs): New helper routines.
4353 (ppc64_elf_get_synthetic_symtab): New function.
4354 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4355 to relsyms.
4356 * bfd-in2.h: Regenerated.
4357 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4358 to relsyms. Return 0 if abfd is relocatable.
4359
7c2c8505
AM
43602004-08-17 Alan Modra <amodra@bigpond.net.au>
4361
4362 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4363
0367ecfb
NC
43642004-08-17 Nick Clifton <nickc@redhat.com>
4365
4366 * (is_arm_mapping_symbol_name): New function - return true
4367 when a symbol name matches the requirements for an ARM mapping
4368 symbol name.
4369 (arm_elf_find_function): New function based on
4370 elf_find_function in elf.c but skipping ARM mapping symbols
4371 and including thumb function symbols.
4372 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4373 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4374
2441e016
AM
43752004-08-17 Alan Modra <amodra@bigpond.net.au>
4376
4377 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4378 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4379 (ppc64_elf_brtaken_reloc): Here too.
4380
35b0ce59
AM
43812004-08-17 Alan Modra <amodra@bigpond.net.au>
4382
4383 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4384 symbol visibility.
4385 (ppc64_elf_check_directives): Check that we have the right hash
4386 table before proceeding.
4387
81688140
AM
43882004-08-17 Alan Modra <amodra@bigpond.net.au>
4389
4390 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4391 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4392 the sections that will be discarded.
4393
327c1315
AM
43942004-08-16 Alan Modra <amodra@bigpond.net.au>
4395
4396 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4397
45fc9e4a
AM
43982004-08-16 Alan Modra <amodra@bigpond.net.au>
4399
4400 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4401 free space available.
4402
9dadfa79
AM
44032004-08-16 Alan Modra <amodra@bigpond.net.au>
4404
4405 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 4406 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
4407
4408 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4409 (xcoff_write_armap_big): Likewise.
4410 (xcoff_write_archive_contents_old): Likewise.
4411 (xcoff_write_archive_contents_big): Likewise.
4412
4413 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4414
57e8b36a
NC
44152004-08-13 Nick Clifton <nickc@redhat.com>
4416
4417 * elf32-arm.h: Convert to ISO C90.
4418
a005f94e
AM
44192004-08-13 Alan Modra <amodra@bigpond.net.au>
4420
4421 PR 293
4422 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4423 zero the plt field.
4424
d003868e
AM
44252004-08-13 Alan Modra <amodra@bigpond.net.au>
4426
4427 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4428 (bfd_archive_filename, bfd_get_section_ident): Delete.
4429 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4430 bfd_archive_filename.
4431 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4432 to warn about symbols in discarded sections. Use _bfd_error_handler.
4433 * aout-adobe.c (aout_adobe_callback): See below.
4434 * aout-cris.c (swap_ext_reloc_in): ..
4435 * coff-arm.c (find_thumb_glue, find_arm_glue,
4436 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4437 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4438 coff_arm_copy_private_bfd_data): ..
4439 * coff-i860.c (i860_reloc_processing): ..
4440 * coff-mcore.c (mcore_coff_unsupported_reloc,
4441 coff_mcore_relocate_section): ..
4442 * coff-ppc.c (coff_ppc_relocate_section): ..
4443 * coff-rs6000.c (xcoff_create_csect_from_smclas
4444 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4445 sh_swap_insns, sh_relocate_section): ..
4446 * coff-tic54x.c (tic54x_reloc_processing): ..
4447 * coff-tic80.c (coff_tic80_relocate_section): ..
4448 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4449 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4450 coff_slurp_symbol_table, coff_classify_symbol,
4451 coff_slurp_reloc_table): ..
4452 * coffgen.c (_bfd_coff_read_string_table): ..
4453 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4454 _bfd_coff_generic_relocate_section): ..
4455 * cpu-arm.c (bfd_arm_merge_machines): ..
4456 * cpu-sh.c (sh_merge_bfd_arch): ..
4457 * elf-hppa.h (elf_hppa_relocate_section): ..
4458 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4459 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4460 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4461 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4462 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4463 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4464 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4465 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4466 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4467 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4468 cris_elf_merge_private_bfd_data
4469 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4470 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4471 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4472 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4473 elf32_hppa_relocate_section): ..
4474 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4475 i370_elf_check_relocs, i370_elf_relocate_section): ..
4476 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4477 elf_i386_relocate_section): ..
4478 * elf32-m32r.c (m32r_elf_relocate_section,
4479 m32r_elf_merge_private_bfd_data): ..
4480 * elf32-m68hc1x.c (m68hc12_add_stub,
4481 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4482 * elf32-m68k.c (elf_m68k_relocate_section): ..
4483 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4484 mcore_elf_relocate_section): ..
4485 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4486 ppc_elf_check_relocs, ppc_elf_relocate_section,
4487 ppc_elf_begin_write_processing): ..
4488 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4489 elf_s390_relocate_section): ..
4490 * elf32-sh-symbian.c (sh_symbian_import_as,
4491 sh_symbian_process_embedded_commands,
4492 sh_symbian_relocate_section): ..
4493 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4494 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4495 sh_elf_merge_private_data): ..
4496 * elf32-sparc.c (elf32_sparc_check_relocs,
4497 elf32_sparc_relocate_section,
4498 elf32_sparc_merge_private_bfd_data): ..
4499 * elf32-v850.c (v850_elf_check_relocs,
4500 v850_elf_merge_private_bfd_data): ..
4501 * elf32-xtensa.c (elf_xtensa_check_relocs,
4502 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4503 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4504 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4505 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4506 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4507 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4508 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4509 ppc64_elf_relocate_section): ..
4510 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4511 elf_s390_relocate_section): ..
4512 * elf64-sh64.c (sh_elf64_relocate_section): ..
4513 * elf64-sparc.c (sparc64_elf_check_relocs,
4514 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4515 sparc64_elf_merge_private_bfd_data): ..
4516 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4517 elf64_x86_64_relocate_section): ..
4518 * elflink.c (_bfd_elf_add_default_symbol,
4519 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4520 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4521 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4522 elf_get_linked_section_vma, elf_fixup_link_order,
4523 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4524 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4525 * elfxx-ia64.c (elfNN_ia64_relax_section,
4526 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4527 * elfxx-mips.c (mips_elf_perform_relocation,
4528 _bfd_mips_elf_check_relocs,
4529 _bfd_mips_elf_merge_private_bfd_data): ..
4530 * ieee.c (ieee_slurp_external_symbols): ..
4531 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4532 * libbfd.c (_bfd_generic_verify_endian_match): ..
4533 * linker.c (_bfd_generic_link_add_one_symbol,
4534 _bfd_generic_section_already_linked): ..
4535 * pdp11.c (translate_to_native_sym_flags): ..
4536 * pe-mips.c (coff_pe_mips_relocate_section): ..
4537 * peicode.h (pe_ILF_build_a_bfd): ..
4538 * srec.c (srec_bad_byte): ..
4539 * stabs.c (_bfd_link_section_stabs): ..
4540 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4541 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4542 with corresponding %B and %A in _bfd_error_handler format string.
4543 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4544 calls to use %A and %B. Fix "against symbol .. from section" and
4545 similar error messages. Combine multiple _bfd_error_handler calls
4546 where they were separated due to bfd_archive_filename deficiencies.
4547 * bfd-in2.h: Regenerate.
4548
6ba842b6
L
45492004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4550
4551 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4552 relocation.
4553
99877b66
AM
45542004-08-10 Alan Modra <amodra@bigpond.net.au>
4555
4556 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4557 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4558 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4559 Add twiddled_syms.
4560 (link_hash_newfunc): Init was_undefined.
4561 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4562 Use undefweak instead.
4563 (ppc64_elf_check_directives): Fix undefs chain.
4564 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4565 references.
4566 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4567 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4568 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4569
ba3bee0b
JJ
45702004-08-09 Jakub Jelinek <jakub@redhat.com>
4571
4572 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4573 error, test input_section flags rather than sec.
4574
8387904d
AM
45752004-08-09 Alan Modra <amodra@bigpond.net.au>
4576
4577 * elf-bfd.h (struct elf_backend_data): Add
4578 elf_backend_archive_symbol_lookup.
4579 (_bfd_elf_archive_symbol_lookup): Declare.
4580 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4581 (elf_link_add_archive_symbols): ..extracted from here. Call the
4582 backend version.
4583 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4584 (elfNN_bed): Init new field.
4585 * elf64-ppc.c (elf_backend_check_directives): Define.
4586 (elf_backend_archive_symbol_lookup): Define.
4587 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4588 a ppc_link_hash_entry pointer.
4589 (get_fdh): Move.
4590 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4591 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4592 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4593 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4594 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4595 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4596 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4597 descriptor symbols.
4598
b25116a9
AM
45992004-08-09 Alan Modra <amodra@bigpond.net.au>
4600
8843416a
AM
4601 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4602 (ppc64_elf_add_symbol_hook): Test for NULL section.
4603 (get_sym_h): Formatting.
4604 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4605 stub target_value.
4606
b25116a9
AM
4607 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4608 long branch stubs with code handling plt and r2off branch stubs.
4609
ccfa59ea
AM
46102004-08-09 Alan Modra <amodra@bigpond.net.au>
4611
4612 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4613 * elflink.c (elf_link_input_bfd): Formatting.
4614 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4615 all callers.
4616 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4617 (link_hash_newfunc): Don't set it.
4618 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4619 (ppc64_elf_mark_entry_syms): Delete.
4620 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4621 sections. Use get_opd_info.
4622 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4623
4025353c
AM
46242004-08-09 Alan Modra <amodra@bigpond.net.au>
4625
4f800a42
AM
4626 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4627
06da1e8e
AM
4628 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4629 (func_desc_adjust): Don't set have_undefweak.
4630 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4631 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4632
34814b9f
AM
4633 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4634 "struct ppc_link_hash_entry *". Adjust all references.
4635 (ppc64_elf_hide_symbol): Correct a comment.
4636
4025353c
AM
4637 * elf64-ppc.c (get_opd_info): New function.
4638 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4639 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4640 before calling get_fdh. Test fdh rather than h before dereferencing
4641 fdh. Mark removed symbols in opd_adjust.
4642 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4643 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4644 opd symbols.
4645 (ppc64_elf_output_symbol_hook): Likewise.
4646
db6579d4
PB
46472004-08-06 Paul Brook <paul@codesourcery.com>
4648
4649 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4650 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4651 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4652 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4653 and BFD_RELOC_ARM_SBREL32.
4654 * bfd-in2.h, bbfd.h: Regenerate.
4655
a4d0f181
TS
46562004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4657
4658 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4659 the dynamic link symbol actually in use.
4660
83774818
SC
46612004-08-01 Stephane Carrez <stcarrez@nerim.fr>
4662
4663 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4664
a4d0f181 46652004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
4666 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4667
4668 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4669 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4670
185d09ad
L
46712004-07-30 H.J. Lu <hongjiu.lu@intel.com>
4672 Nick Clifton <nickc@redhat.com>
4673
4674 PR 290
4675 * bfd.c (_bfd_default_error_handler): Make it global.
4676
4677 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4678
4679 * elf.c (assign_section_numbers): Cope gracefully with sections
4680 which have SHF_LINK_ORDER set but no sh_link set up.
4681 * elflink.c (elf_get_linked_section_vma): Likewise.
4682
4683 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4684 it to NULL.
4685
4686 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4687 Set it to _bfd_default_error_handler.
4688 (elfNN_bed): Add elf_backend_link_order_error_handler.
4689
4690 * libbfd-in.h (_bfd_default_error_handler): New.
4691
4692 * libbfd.h: Regenerated.
4693
7946e94a
JJ
46942004-07-30 Jakub Jelinek <jakub@redhat.com>
4695
4696 * archures.c (bfd_mach_sparc_64bit_p): Define.
4697 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4698 * bfd-in2.h: Rebuilt.
4699
1d70c7fb
AO
47002004-07-29 Alexandre Oliva <aoliva@redhat.com>
4701
4702 Introduce SH2a support.
4703 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4704 * archures.c (bfd_mach_sh2a_nofpu): New.
4705 * bfd-in2.h: Rebuilt.
4706 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4707 (arch_info_struct): Add sh2a_nofpu.
4708 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4709 2003-12-29 DJ Delorie <dj@redhat.com>
4710 * reloc.c: Add relocs for sh2a.
4711 * bfd-in2.h: Regenerate.
4712 * libbfd.hh: Regenerate.
4713 2003-12-01 Michael Snyder <msnyder@redhat.com>
4714 * archures.c (bfd_mach_sh2a): New.
4715 * bfd-in2.h: Rebuilt.
4716 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4717 (SH2A_NEXT): New.
4718 (arch_info_struct): Add sh2a.
4719 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4720
404ed0cf
DA
47212004-07-28 Nick Clifton <nickc@redhat.com>
4722 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4723
4724 PR 273
4725 * som.c (setup_sections): Improve estimation of space sizes in
4726 relocatable objects.
4727
225247f0
JT
47282004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
4729 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4730 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4731 to targ_selvecs.
4732 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4733 * configure: Regenerate.
4734 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4735 case that accepts OSABI=NetBSD and OSABI=SysV.
4736 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4737 the base of .got or .data (if .got does not exist).
4738 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4739 set OSABI=NetBSD.
4740 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4741 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4742 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4743 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4744
3d7f7666
L
47452004-07-27 H.J. Lu <hongjiu.lu@intel.com>
4746
4747 PR 161/251
4748 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4749 (elf_sec_group): Defined.
4750 (bfd_elf_match_symbols_in_sections): New prototype.
4751 (_bfd_elf_setup_group_pointers): Likewise.
4752
4753 * elf.c (bfd_elf_discard_group): Abort.
4754 (bfd_elf_set_group_contents): Also include relocation sections.
4755 Remove zero-fill for ld -r.
4756 (_bfd_elf_setup_group_pointers): New function.
4757 (elf_sort_elf_symbol): Likewise.
4758 (elf_sym_name_compare): Likewise.
4759 (bfd_elf_match_symbols_in_sections): Likewise.
4760
4761 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4762
4763 * elflink.c (match_group_member): New.
4764 (elf_link_input_bfd): Check group member for discarded section.
4765 (try_match_symbols_in_sections): New function.
4766 (already_linked): Likewise.
4767 (_bfd_elf_section_already_linked): Support mixing comdat group
4768 and linkonce section.
4769
4770 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4771 * linker.c (bfd_section_already_linked_table_traverse): New.
4772
4773 * libbfd.h: Regenerated.
4774
670ec21d
NC
47752004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
4776
4777 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4778 BFD_RELOC_CRX_SWITCH32.
4779 * bfd-in2.h: Regenerate.
6cd7f07e 4780 * libbfd.h: Regenerate.
670ec21d
NC
4781 * elf32-crx.c: Support relocation/relaxation of
4782 BFD_RELOC_CRX_SWITCH* types.
4783
2c66dc6c
AM
47842004-07-27 Alan Modra <amodra@bigpond.net.au>
4785
4786 * elf64-ppc.c: Correct "Linker stubs" comment.
4787
38ce5b11
L
47882004-07-26 H.J. Lu <hongjiu.lu@intel.com>
4789
4790 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
4791 linked-to section.
4792 (elf_linked_to_section): New.
4793
4794 * elf.c (assign_section_numbers): Set up sh_link for
4795 SHF_LINK_ORDER.
4796
4797 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
4798 to sh_link for SHT_IA_64_UNWIND sections.
4799
65da361f
L
48002004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4801
4802 * elflink.c (elf_fixup_link_order): Add _() to error message.
4803
08ccf96b
L
48042004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4805
4806 * elflink.c (elf_fixup_link_order): Issue a warning and flag
4807 an error if failed.
4808
082b7297
L
48092004-07-21 H.J. Lu <hongjiu.lu@intel.com>
4810
4811 * aout-adobe.c (aout_32_section_already_linked): Defined.
4812 * aout-target.h (MY_section_already_linked): Likewise.
4813 * aout-tic30.c (MY_section_already_linked): Likewise.
4814 * binary.c (binary_section_already_linked): Likewise.
4815 * bout.c (b_out_section_already_linked): Likewise.
4816 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
4817 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
4818 * coffcode.h (coff_section_already_linked): Likewise.
4819 * i386msdos.c (msdos_section_already_linked): Likewise.
4820 * i386os9k.c (os9k_section_already_linked): Likewise.
4821 * ieee.c (ieee_section_already_linked): Likewise.
4822 * ihex.c (ihex_section_already_linked): Likewise.
4823 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
4824 * mmo.c (mmo_section_already_linked): Likewise.
4825 * nlm-target.h (nlm_section_already_linked): Likewise.
4826 * oasys.c (oasys_section_already_linked): Likewise.
4827 * pef.c (bfd_pef_section_already_linked): Likewise.
4828 * ppcboot.c (ppcboot_section_already_linked): Likewise.
4829 * som.c (som_bfd_discard_group): Likewise.
4830 * srec.c (srec_section_already_linked): Likewise.
4831 * tekhex.c (tekhex_section_already_linked): Likewise.
4832 * versados.c (versados_section_already_linked): Likewise.
4833 * vms.c (vms_section_already_linked): Likewise.
4834 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
4835 * xsym.c (bfd_sym_section_already_linked): Likewise.
4836
4837 * bfd-in.h (bfd_section_already_linked_table_init): New.
4838 (bfd_section_already_linked_table_free): Likewise.
4839
4840 * coff-rs6000.c (rs6000coff_vec): Add
4841 _bfd_generic_section_already_linked.
4842 (pmac_xcoff_vec): Likewise.
4843 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4844 (aix5coff64_vec): Likewise.
4845
4846 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
4847 * elflink.c (_bfd_elf_section_already_linked): New function.
4848
4849 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
4850
4851 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
4852 (_bfd_generic_section_already_linked): New.
4853 (bfd_section_already_linked_hash_entry): Likewise.
4854 (bfd_section_already_linked): Likewise.
4855 (bfd_section_already_linked_table_lookup): Likewise.
4856 (bfd_section_already_linked_table_insert): Likewise.
4857
4858 * linker.c (bfd_section_already_linked): New.
4859 (_bfd_section_already_linked_table): Likewise.
4860 (bfd_section_already_linked_table_lookup): Likewise.
4861 (bfd_section_already_linked_table_insert): Likewise.
4862 (already_linked_newfunc): Likewise.
4863 (bfd_section_already_linked_table_init): Likewise.
4864 (bfd_section_already_linked_table_free): Likewise.
4865 (_bfd_generic_section_already_linked): Likewise.
4866
4867 * section.c (bfd_section): Remove comdat.
4868 (bfd_comdat_info): Moved to ...
4869 * bfd-in.h (coff_comdat_info): Here.
4870 (bfd_coff_get_comdat_section): New.
4871 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
4872 * libcoff-in.h (coff_section_tdata): Add comdat.
4873 * coffcode.h (handle_COMDAT): Updated.
4874 * cofflink.c (coff_link_add_symbols): Likewise.
4875 * ecoff.c (bfd_debug_section): Likewise.
4876
4877 * targets.c (bfd_target): Add _section_already_linked.
4878 (BFD_JUMP_TABLE_LINK): Updated.
4879
4880 * bfd-in2.h: Regenerated.
4881 * libbfd.h: Likewise.
4882 * libcoff.h: Likewise.
4883
0b52efa6
PB
48842003-07-21 Paul Brook <paul@codesourcery.com>
4885
4886 * elflink.c (elf_get_linked_section_vma, compare_link_order,
4887 elf_fixup_link_order): New functions.
4888 (bfd_elf_final_link): Call elf_fixup_link_order.
4889
7e2294f9
AO
48902004-07-21 Alexandre Oliva <aoliva@redhat.com>
4891
4892 * elf-bfd.h (ELF_COMMON_DEF_P): New.
4893 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4894 common definitions.
4895 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4896 _bfd_elf_symbol_refs_local_p.
4897 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4898 symbols.
4899
e56f61be
L
49002004-07-19 H.J. Lu <hongjiu.lu@intel.com>
4901
4902 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
4903 DYN_NO_NEEDED.
4904 (bfd_elf_get_dyn_lib_class): New prototype.
4905 * elf.c (bfd_elf_get_dyn_lib_class): New function.
4906
4907 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
4908 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
4909 entry is needed. Issue an error if a DT_NEEDED entry is needed
4910 for a file marked DYN_NO_NEEDED.
4911 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
4912 for DT_NEEDED tags.
4913
4914 * bfd-in2.h: Regenerated.
4915
27b56da8
DA
49162004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4917
4918 * elflink.c (elf_section_complain_discarded): Don't complain in
4919 .PARISC.unwind.
4920
bbb268c3
JW
49212004-07-10 James E Wilson <wilson@specifixinc.com>
4922
4923 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
4924 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
4925 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
4926 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
4927 Fix callers.
4928 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
4929 bfd_put_64 to bfd_putl64.
4930 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 4931
e525914f
L
49322004-07-09 H.J. Lu <hongjiu.lu@intel.com>
4933
4934 PR 240
4935 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
4936 .init/.fini sections when trying to relax it.
4937
b1a6d0b1
NC
49382004-07-09 Jie Zhang <zhangjie@magima.com.cn>
4939
4940 * elf.c (assign_file_positions_for_segments): Make sure the
4941 .dynamic section is the first section in the PT_DYNAMIC segment.
4942
1a320fbb
NC
49432004-07-09 Nick Clifton <nickc@redhat.com>
4944
4945 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
4946 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
4947 sh_elf_get_flags_from_mach functions so that they do not conflict
4948 when this target is built with other sh-elf targets.
4949 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
4950 suppression of this function.
4951 (sh_elf_find_flags): Likewise.
4952
1fe1f39c
NC
49532004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
4954
4955 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
4956 (ALL_MACHINES_CFILES): Add cpu-crx.c.
4957 (BFD32_BACKENDS): Add elf32-crx.lo.
4958 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
4959 (cpu-crx.lo): New target.
4960 (elf32-crx.lo): New target.
4961 * Makefile.in: Regenerate.
4962 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
4963 (bfd_archures_list): Add bfd_crx_arch.
4964 * bfd-in2.h: Regenerate.
4965 * config.bfd: Handle crx-*-elf*, crx*.
4966 * configure.in: Handle bfd_elf32_crx_vec.
4967 * configure: Regenerate.
4968 * cpu-crx.c: New file.
4969 * elf32-crx.c: Likewise.
4970 * libbfd.h: Regenerate.
4971 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
4972 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
4973 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
4974 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
4975 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
4976 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
4977 * targets.c (bfd_elf32_crx_vec): Declare.
4978 (bfd_target_vector): Add bfd_elf32_crx_vec.
4979
85fbca6a
NC
49802004-07-06 Nick Clifton <nickc@redhat.com>
4981
4982 * config.bfd: Add sh-symbian-elf target.
4983 * configure.in: Add bfd_elf32_shl_symbian_vec.
4984 * configure: Regenerate.
4985 * elf-bfd.h (struct elf_backend_data): Add new field
4986 'check_directives'.
1fe1f39c 4987 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 4988 check_directives function, if defined.
1fe1f39c 4989 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 4990 check_directives.
1fe1f39c
NC
4991 * targets.c: Add bfd_elf32_shl_symbian_vec.
4992 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 4993 definition.
1fe1f39c 4994 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 4995 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 4996 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 4997 not already been defined.
1fe1f39c
NC
4998 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
4999 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
5000 * sh-symbian-elf target.
5001 * Makefile.am: Add elf32-sh-symbian.c
5002 * Makefile.in: Regenerate.
1fe1f39c 5003
871ec896
JR
50042004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5005
1fe1f39c
NC
5006 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5007 * Makefile.am: Ran make dep-am.
5008 * Makefile.in: Ran make dep-in.
871ec896 5009
c87db184
CF
50102004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5011
5012 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5013 externals properly.
5014
06f2f6af
MS
50152004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5016
5017 * config.bfd: Add want64 to configuration target s390-*-linux*.
5018
b602c853
L
50192004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5020
5021 * bfd.c (bfd_get_section_ident): New.
5022
5023 * elflink.c (elf_link_read_relocs_from_section): Call
5024 bfd_get_section_ident to identify the section when reporting
5025 error.
5026 (_bfd_elf_link_output_relocs): Likewise.
5027 (elf_link_output_extsym): Likewise.
5028 (elf_link_input_bfd): Likewise.
5029 (bfd_elf_gc_record_vtinherit): Likewise.
5030
5031 * bfd-in2.h: Regenerated.
5032
7a2a6943
NC
50332004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5034 Nick Clifton <nickc@redhat.com>
5035
5036 PR 204
5037 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5038 of section symbols to mips_elf_sort_hash_table ().
5039
cdd3575c
AM
50402004-07-01 Alan Modra <amodra@bigpond.net.au>
5041
5042 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5043 change. Comment.
5044 (elf_section_complain_discarded): New function. Handle
5045 .gcc_except_table too.
5046 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5047 in discarded sections.
5048 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5049
21a8f7fa
JW
50502004-06-30 James E Wilson <wilson@specifixinc.com>
5051
5052 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5053 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5054
2de26f35
L
50552004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5056
5057 PR 233
5058 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5059 local references to discarded sections and report their
5060 locations.
5061
72d7a15c
AM
50622004-06-30 Alan Modra <amodra@bigpond.net.au>
5063
5064 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5065 sec_info_type, test section name instead.
5066
e7f0a167
L
50672004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5068
5069 PR 240
5070 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5071 in .init/.fini sections.
5072
bff5f93a
BW
50732004-06-29 Bob Wilson <bob.wilson@acm.org>
5074
5075 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5076 bfd_get_section_limit.
5077
b54d4b07
BW
50782004-06-29 Bob Wilson <bob.wilson@acm.org>
5079
5080 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5081 output section size.
5082
e87a64e1
AM
50832004-06-29 Alan Modra <amodra@bigpond.net.au>
5084
1a23a9e6
AM
5085 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5086 rawsize.
5087 (mmix_elf_perform_relocation): Adjust for above change.
5088 (mmix_elf_relocate_section): Likewise.
5089 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5090 (mmix_elf_get_section_contents): Delete.
5091 (bfd_elf64_get_section_contents): Delete.
5092 (mmix_elf_relocate_section): Zero stub area.
5093 * linker.c (default_indirect_link_order): Alloc max of section size
5094 and rawsize.
5095 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5096 * section.c (bfd_malloc_and_get_section): Likewise.
5097 (struct bfd_section): Update rawsize comment.
5098 * bfd-in2.h: Regenerate.
5099
e87a64e1
AM
5100 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5101
07515404
AM
51022004-06-29 Alan Modra <amodra@bigpond.net.au>
5103
5104 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 5105 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
5106 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5107 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5108 * coff-arm.c (coff_arm_relocate_section): Likewise.
5109 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5110 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5111 (bfd_ns32k_final_link_relocate): Likewise.
5112 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5113 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 5114 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 5115 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 5116 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
5117 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5118 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5119 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5120 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5121 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5122 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5123 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5124 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5125 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5126 * elf32-v850.c (v850_elf_reloc): Likewise.
5127 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5128 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5129 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5130 * elf64-mips.c (mips_elf64_gprel32_reloc)
5131 (mips16_gprel_reloc): Likewise.
5132 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5133 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5134 * elf64-sparc.c (init_insn_reloc): Likewise.
5135 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
5136 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5137 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
5138 (_bfd_mips_elf_generic_reloc): Likewise.
5139 * bfd-in2.h: Regenerate.
5140
3722b82f
AM
51412004-06-28 Alan Modra <amodra@bigpond.net.au>
5142
5143 * bfd-in.h (struct stab_info): Move from stabs.c.
5144 * stabs.c (struct stab_link_includes_table): Delete.
5145 (stab_link_includes_lookup): Delete.
5146 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5147 level of indirection from sinfo parm.
5148 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5149 stabstr section. Adjust hash table accesses.
5150 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5151 alloc. Adjust stab_info test.
5152 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5153 (_bfd_coff_final_link): Adjust stab_info test.
5154 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5155 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5156 in place.
5157 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5158 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5159 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5160 stabstr section. Adjust stab_info test.
5161 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5162 (_bfd_write_stab_strings): Adjust prototypes.
5163 * libbfd.h: Regenerate.
5164 * libcoff.h: Regenerate.
5165 * bfd-in2.h: Regenerate.
5166
727e493d
MK
51672004-06-27 Mark Kettenis <kettenis@gnu.org>
5168
5169 From Miod Vallat <miod@online.fr>:
5170 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5171
146ccdbb
AO
51722004-06-26 Alexandre Oliva <aoliva@redhat.com>
5173
5174 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5175 (struct elf32_mn10300_link_hash_entry): Remove
5176 pcrel_relocs_copied.
5177 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5178 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5179 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5180 and gotoff relocations if the symbol doesn't bind locally. Use
5181 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5182 relocation for PCREL32.
5183 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5184 to test whether a symbol binds locally.
5185 (elf32_mn10300_link_hash_newfunc): Don't initialize
5186 pcrel_relocs_copied.
5187 (_bfd_mn10300_elf_discard_copies): Delete.
5188 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5189
a5fd0812
MK
51902004-06-26 Mark Kettenis <kettenis@gnu.org>
5191
5192 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5193
22bfad37
JB
51942004-06-25 Joel Brobecker <brobecker@gnat.com>
5195
5196 * som.c (som_set_reloc_info): Correct small typo.
5197
097f809a
NC
51982004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5199
5200 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5201 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5202 (m32r_elf_gcsweep_hook): Likewise.
5203 (m32r_elf_check_relocs): Likewise.
5204 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5205 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5206 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5207 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
5208 * bfd-in2.h: Regenerated.
5209 * libbfd.h: Regenerated.
097f809a 5210
6610a52d
L
52112004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5212
5213 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5214 relocation symbol.
5215 (elf64_x86_64_relocate_section): Issue an error for
5216 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5217 against global symbols when building shared library.
5218
eea6121a
AM
52192004-06-24 Alan Modra <amodra@bigpond.net.au>
5220
5221 * section.c (struct sec): Rename "_cooked_size" to "size".
5222 Rename "_raw_size" to "rawsize".
5223 (STD_SECTION): Adjust comments.
5224 (bfd_set_section_size, bfd_get_section_contents): Use size.
5225 (bfd_malloc_and_get_section): New function.
5226 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5227 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5228 Correctly free reloc and contents memory.
5229 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5230 and fake CIE now that we can shink section size to zero.
5231 (_bfd_elf_write_section_eh_frame): Likewise..
5232 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5233 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5234 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5235 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5236 unneeded indirection.
5237 * elf.c (_bfd_elf_section_offset): .. and update call.
5238 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5239 * libbfd.h: Regenerate.
5240 * bfd-in2.h: Regenerate.
5241
5242 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5243 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5244 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5245 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5246 Similarly use "rawsize", if non-zero, in reloc functions to validate
5247 reloc addresses. Use new bfd_malloc_and_get_section in most places
5248 where bfd_get_section_contents was called. Expand all occurrences of
5249 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5250 grok_prstatus and similar functions to "size".
5251 * aix386-core.c (aix386_core_file_p): ..
5252 * aix5ppc-core.c (xcoff64_core_p): ..
5253 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5254 aout_adobe_set_section_contents): ..
5255 * aout-target.h (callback): ..
5256 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5257 MY_bfd_final_link): ..
5258 * aoutf1.h (sunos4_core_file_p): ..
5259 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5260 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5261 final_link, aout_link_input_section): ..
5262 * binary.c (binary_object_p, binary_canonicalize_symtab,
5263 binary_set_section_contents): ..
5264 * bout.c (b_out_callback, b_out_write_object_contents,
5265 b_out_set_section_contents, b_out_bfd_relax_section,
5266 b_out_bfd_get_relocated_section_contents): ..
5267 * cisco-core.c (cisco_core_file_validate): ..
5268 * coff-alpha.c (alpha_ecoff_object_p,
5269 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5270 * coff-arm.c (coff_arm_relocate_section,
5271 bfd_arm_allocate_interworking_sections): ..
5272 * coff-h8300.c (h8300_reloc16_extra_cases,
5273 h8300_bfd_link_add_symbols): ..
5274 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5275 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5276 ppc_bfd_coff_final_link): ..
5277 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5278 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5279 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5280 * coff64-rs6000.c (xcoff64_write_object_contents,
5281 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5282 * coffcode.h (coff_compute_section_file_positions,
5283 coff_write_object_contents): ..
5284 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5285 coff_section_symbol, build_debug_section): ..
5286 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5287 process_embedded_commands, _bfd_coff_link_input_bfd,
5288 _bfd_coff_write_global_sym): ..
5289 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5290 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5291 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5292 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5293 _bfd_dwarf2_find_nearest_line): ..
5294 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5295 ecoff_compute_section_file_positions,
5296 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5297 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5298 _bfd_elf_discard_section_eh_frame_hdr,
5299 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5300 _bfd_elf_write_section_eh_frame,
5301 _bfd_elf_write_section_eh_frame_hdr): ..
5302 * elf-hppa.h (elf_hppa_sort_unwind): ..
5303 * elf-m10200.c (mn10200_elf_relax_section,
5304 mn10200_elf_relax_delete_bytes,
5305 mn10200_elf_get_relocated_section_contents): ..
5306 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5307 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5308 mn10300_elf_relax_delete_bytes,
5309 mn10300_elf_get_relocated_section_contents,
5310 _bfd_mn10300_elf_adjust_dynamic_symbol,
5311 _bfd_mn10300_elf_discard_copies,
5312 _bfd_mn10300_elf_size_dynamic_sections,
5313 _bfd_mn10300_elf_finish_dynamic_sections): ..
5314 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5315 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5316 bfd_elf_set_group_contents, map_sections_to_segments,
5317 elf_sort_sections, assign_file_positions_for_segments,
5318 SECTION_SIZE, copy_private_bfd_data,
5319 _bfd_elf_get_dynamic_reloc_upper_bound,
5320 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5321 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5322 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5323 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5324 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5325 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5326 bfd_elf32_arm_process_before_allocation,
5327 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5328 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5329 elf32_arm_write_section): ..
5330 * elf32-cris.c (cris_elf_grok_prstatus,
5331 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5332 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5333 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5334 elf_cris_discard_excess_dso_dynamics,
5335 elf_cris_discard_excess_program_dynamics): ..
5336 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5337 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5338 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5339 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5340 elf32_frvfdpic_size_dynamic_sections,
5341 elf32_frvfdpic_modify_segment_map,
5342 elf32_frvfdpic_finish_dynamic_sections): ..
5343 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5344 elf32_h8_get_relocated_section_contents): ..
5345 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5346 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5347 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5348 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5349 elf32_hppa_finish_dynamic_sections): ..
5350 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5351 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5352 i370_elf_finish_dynamic_sections): ..
5353 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5354 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5355 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5356 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5357 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5358 * elf32-ip2k.c (ip2k_is_switch_table_128,
5359 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5360 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5361 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5362 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5363 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5364 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5365 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5366 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5367 m32r_elf_get_relocated_section_contents): ..
5368 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5369 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5370 m68hc11_elf_relax_delete_bytes): ..
5371 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5372 m68hc12_elf_size_one_stub): ..
5373 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5374 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5375 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5376 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5377 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5378 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5379 elf32_mips_grok_prstatus): ..
5380 * elf32-or32.c (or32_elf_consth_reloc): ..
5381 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5382 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5383 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5384 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5385 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5386 ppc_elf_final_write_processing): ..
5387 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5388 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5389 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5390 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5391 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5392 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5393 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5394 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5395 * elf32-sh64-com.c (sh64_address_in_cranges,
5396 sh64_get_contents_type): ..
5397 * elf32-sh64.c (sh64_find_section_for_address,
5398 sh64_elf_final_write_processing): ..
5399 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5400 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5401 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5402 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5403 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5404 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5405 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5406 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5407 elf_vax_finish_dynamic_sections): ..
5408 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5409 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5410 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5411 xstormy16_elf_finish_dynamic_sections): ..
5412 * elf32-xtensa.c (xtensa_read_table_entries,
5413 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5414 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5415 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5416 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5417 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5418 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5419 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5420 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5421 xtensa_callback_required_dependence): ..
5422 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5423 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5424 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5425 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5426 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5427 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5428 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5429 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5430 * elf64-hppa.c (allocate_dynrel_entries,
5431 elf64_hppa_size_dynamic_sections,
5432 elf64_hppa_finish_dynamic_sections): ..
5433 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5434 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5435 elf64_mips_grok_prstatus): ..
5436 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5437 mmix_elf_relocate_section, mmix_elf_final_link,
5438 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5439 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5440 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5441 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5442 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5443 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5444 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5445 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5446 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5447 ppc64_elf_finish_dynamic_sections): ..
5448 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5449 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5450 elf_s390_finish_dynamic_sections): ..
5451 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5452 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5453 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5454 sh64_elf64_finish_dynamic_sections): ..
5455 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5456 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5457 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5458 sparc64_elf_finish_dynamic_symbol,
5459 sparc64_elf_finish_dynamic_sections): ..
5460 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5461 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5462 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5463 elf64_x86_64_finish_dynamic_sections): ..
5464 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5465 * elfcode.h (elf_slurp_reloc_table): ..
5466 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5467 elf_finalize_dynstr, elf_link_add_object_symbols,
5468 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5469 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5470 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5471 elf32_mips_grok_prstatus): ..
5472 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5473 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5474 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5475 elfNN_ia64_finish_dynamic_sections): ..
5476 * elfxx-mips.c (mips_elf_create_procedure_table,
5477 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5478 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5479 mips_elf_global_got_index, mips_elf_multi_got,
5480 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5481 mips_elf_allocate_dynamic_relocations,
5482 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5483 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5484 _bfd_mips_elf_always_size_sections,
5485 _bfd_mips_elf_size_dynamic_sections,
5486 _bfd_mips_elf_finish_dynamic_symbol,
5487 _bfd_mips_elf_finish_dynamic_sections,
5488 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5489 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5490 _bfd_elf_mips_get_relocated_section_contents,
5491 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5492 * hp300hpux.c (callback): ..
5493 * hppabsd-core.c (make_bfd_asection): ..
5494 * hpux-core.c (make_bfd_asection): ..
5495 * i386linux.c (linux_link_create_dynamic_sections,
5496 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5497 * i386msdos.c (msdos_write_object_contents): ..
5498 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5499 os9k_set_section_contents): ..
5500 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5501 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5502 ieee_write_section_part, do_with_relocs, do_as_repeat,
5503 do_without_relocs, ieee_write_debug_part, init_for_output,
5504 ieee_set_section_contents): ..
5505 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5506 * irix-core.c (do_sections, make_bfd_asection): ..
5507 * libaout.h (aout_section_merge_with_text_p): ..
5508 * libbfd.c (_bfd_generic_get_section_contents,
5509 _bfd_generic_get_section_contents_in_window): ..
5510 * linker.c (default_indirect_link_order): ..
5511 * lynx-core.c (make_bfd_asection): ..
5512 * m68klinux.c (linux_link_create_dynamic_sections,
5513 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5514 * mach-o.c (bfd_mach_o_make_bfd_section,
5515 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5516 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5517 bfd_mach_o_scan_read_segment): ..
5518 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5519 _bfd_merge_sections): ..
5520 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5521 mmo_map_set_sizes, mmo_canonicalize_symtab,
5522 mmo_internal_write_section, mmo_write_object_contents): ..
5523 * netbsd-core.c (netbsd_core_file_p): ..
5524 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5525 nlm_alpha_set_public_section): ..
5526 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5527 * nlm32-sparc.c (nlm_sparc_write_import): ..
5528 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5529 nlm_compute_section_file_positions): ..
5530 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5531 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5532 * opncls.c (get_debug_link_info): ..
5533 * osf-core.c (make_bfd_asection): ..
5534 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5535 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5536 final_link, aout_link_input_section): ..
5537 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5538 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5539 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5540 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5541 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5542 * ptrace-core.c (ptrace_unix_core_file_p): ..
5543 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5544 _bfd_final_link_relocate, bfd_generic_relax_section,
5545 bfd_generic_get_relocated_section_contents): ..
5546 * reloc16.c (bfd_coff_reloc16_relax_section,
5547 bfd_coff_reloc16_get_relocated_section_c): ..
5548 * riscix.c (riscix_some_aout_object_p): ..
5549 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5550 * sco5-core.c (make_bfd_asection): ..
5551 * simple.c (bfd_simple_get_relocated_section_contents): ..
5552 * som.c (som_object_setup, setup_sections, som_prep_headers,
5553 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5554 som_set_reloc_info, som_get_section_contents,
5555 som_bfd_link_split_section): ..
5556 * sparclinux.c (linux_link_create_dynamic_sections,
5557 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5558 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5559 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5560 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5561 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5562 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5563 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5564 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5565 sunos_finish_dynamic_link): ..
5566 * syms.c (_bfd_stab_section_find_nearest_line): ..
5567 * tekhex.c (first_phase, tekhex_set_section_contents,
5568 tekhex_write_object_contents): ..
5569 * trad-core.c (trad_unix_core_file_p): ..
5570 * versados.c (process_esd, process_otr, process_otr): ..
5571 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5572 * vms-misc.c (add_new_contents): ..
5573 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5574 * vms.c (vms_set_section_contents): ..
5575 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5576 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5577 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5578 * xsym.c (bfd_sym_scan): .. See above.
5579
bf8b15af
L
55802004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5581
5582 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5583 calling _bfd_merged_section_offset only for section symbols.
5584
d1c6de6f
AM
55852004-06-22 Alan Modra <amodra@bigpond.net.au>
5586
5587 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5588 for handling SEC_MERGE symbols in relax_section.
5589
aa02cc63
AO
55902004-06-21 Alexandre Oliva <aoliva@redhat.com>
5591
5592 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5593 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5594 linked together. Mark the result as h8300sx code.
5595
aee6f5b4
AO
55962004-06-21 Alexandre Oliva <aoliva@redhat.com>
5597
5598 * elf-bfd.h (struct elf_backend_data): Added
5599 elf_backend_omit_section_dynsym.
5600 (_bfd_elf_link_omit_section_dynsym): Declare.
5601 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5602 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5603 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5604 (_bfd_elf_link_renumber_dynsyms): ... this function.
5605 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5606 _bfd_elf_link_omit_section_dynsym).
5607 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5608
05576f10
NC
56092004-06-21 Nick Clifton <nickc@redhat.com>
5610
5611 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5612 flags.
5613
02d5a37b
JG
56142004-06-17 Jerome Guitton <guitton@gnat.com>
5615
5616 * bfd-in.h (bfd_cache_close_all): New function declaration.
5617 * bfd-in2.h: Regenerate.
5618 * cache.c (bfd_cache_close_all): New function definition.
5619
d2bef492
MK
56202004-06-16 Mark Kettenis <kettenis@gnu.org>
5621
5622 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5623 4.10 and beyond.
5624 * configure: Regenerate.
5625
8528d62e
DJ
56262004-06-16 Daniel Jacobowitz <dan@debian.org>
5627
5628 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5629 the pre-existing section.
5630
911d08a7
AM
56312004-06-15 Alan Modra <amodra@bigpond.net.au>
5632
5633 * section.c (struct sec): Remove usused flags. Reorganize a little.
5634 (bfd_get_section_size_before_reloc): Delete.
5635 (bfd_get_section_size_after_reloc): Delete.
5636 (STD_SECTION): Update.
5637 (bfd_get_section_size_now): Delete.
5638 (bfd_set_section_contents): Don't referece reloc_done.
5639 (bfd_get_section_contents): Remove reloc_done comment.
5640 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5641 reloc_done.
5642 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5643 * ecoff.c (bfd_debug_section): Update initializer.
5644 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5645 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5646 * bfd-in.h (bfd_section_size): Expand.
5647 (bfd_get_section_size): New macro.
5648 * bfd-in2.h: Regenerate.
5649 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5650 bfd_get_section_size_before_reloc with bfd_get_section_size.
5651 * coffcode.h (coff_write_object_contents): Likewise.
5652 * coffgen.c (build_debug_section): Likewise.
5653 * dwarf1.c (parse_line_table): Likewise.
5654 (_bfd_dwarf1_find_nearest_line): Likewise.
5655 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5656 * i386msdos.c (msdos_write_object_contents): Likewise.
5657 * pdp11.c (squirt_out_relocs): Likewise.
5658 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5659 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5660
092dcd75
CD
56612004-06-14 Chris Demetriou <cgd@broadcom.com>
5662
5663 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5664 removal) with updated comment.
5665 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5666 BFD_RELOC_32_PCREL.
5667 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5668 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5669
3ffa5234
AM
56702004-06-12 Alan Modra <amodra@bigpond.net.au>
5671
5672 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5673 overflow on branches to undefweaks.
5674
e9edc808
MR
56752004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5676
5677 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5678 as ecoff_section_data() does not return a valid lvalue.
5679
a873f25a
AO
56802004-06-09 Alexandre Oliva <aoliva@redhat.com>
5681
a9b881be
AO
5682 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5683 (elf_link_add_object_symbols): Likewise.
5684
a873f25a
AO
5685 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5686 (elf_backend_reloc_type_class): New.
5687
eef0f186
MK
56882004-06-08 Mark Kettenis <kettenis@gnu.org>
5689
5690 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5691 netbsd-core.lo.
5692 * configure: Regenerate.
5693
822392ce
DJ
56942004-06-07 Daniel Jacobowitz <dan@debian.org>
5695
5696 From: Albert Chin-A-Young <china@thewrittenword.com>
5697 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5698 to unsigned int.
5699
9f2e92c5
L
57002004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5701
5702 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5703 change.
5704
dd90f1b2
DD
57052004-05-28 DJ Delorie <dj@redhat.com>
5706
5707 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5708 for linking, but otherwise adjust reloc for merged sections.
5709
5dd23ec1
L
57102004-05-28 H.J. Lu <hongjiu.lu@intel.com>
5711
5712 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5713 _bfd_merged_section_offset for local symbols.
5714
f6f9408f
JR
57152004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
5716
5717 * Makefile.am: Regenerate dependencies.
5718 * Makefile.in: Regenerate.
5719 * archures.c: Add bfd_mach_sh3_nommu .
5720 * bfd-in2.h: Regenerate.
5721 * cpu-sh.c: Add sh3-nommu architecture.
5722 (bfd_to_arch_table): Create new table.
5723 (sh_get_arch_from_bfd_mach): Create new function.
5724 (sh_get_arch_up_from_bfd_mach): Create new function.
5725 (sh_merge_bfd_arch): Create new function.
5726 * elf32-sh.c (sh_ef_bfd_table): Add table.
5727 (sh_elf_check_relocs): Replace switch statement with
5728 use of sh_ef_bfd_table .
5729 (sh_elf_get_flags_from_mach): Add new function.
5730 (sh_find_elf_flags): Likewise.
5731 (sh_elf_copy_private_data): Replace most of non-elf contents
5732 with a call to sh_merge_bfd_arch() .
5733
d866f350
MC
57342004-05-27 Michael Chastain <mec.gnu@mindspring.com>
5735
5736 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5737 * Makefile.in: Regenerate.
5738
1055df0f
AO
57392004-05-27 Alexandre Oliva <aoliva@redhat.com>
5740
5741 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5742 custom calling conventions for dynamic symbols.
5743 (mn10300_elf_relax_section): Avoid relaxing a function as a local
5744 symbol if it's an alias to a global one.
5745
b3096250
L
57462004-05-26 H.J. Lu <hongjiu.lu@intel.com>
5747
5748 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5749 change.
5750
9bb351fd
AO
57512004-05-27 Alexandre Oliva <aoliva@redhat.com>
5752
5753 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5754 loop over hashes.
5755
e49f5022
AM
57562004-05-26 Alan Modra <amodra@bigpond.net.au>
5757
5758 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5759 for SHT_GROUP sections.
5760
57ceae94
AM
57612004-05-25 Alan Modra <amodra@bigpond.net.au>
5762
5763 * elflink.c (elf_link_add_object_symbols): Don't set up merge
5764 section data here..
5765 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5766 * merge.c: Formatting. Remove unnecessary casts. Expand
5767 bfd_get_section_alignment macro.
5768 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
5769 use throughout file.
5770 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
5771 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
5772 section name to determine sinfo group, instead test output section
5773 and alignment.
5774 (_bfd_merge_sections): Add struct bfd_link_info param. Call
5775 _bfd_strip_section_from_output rather than just twiddling flags.
5776 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5777 (_bfd_merge_sections): Update prototype.
5778 * libbfd.h: Regenerate.
5779
c6f8758f 57802004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
5781
5782 * netbsd-core.c: Correctly indent section that sets architecture
5783 from machine ID.
5784
c6f8758f
NC
5785 From Miod Vallat <miod@online.fr>:
5786 * m88kopenbsd.c: New file.
5787 * targets.c (m88k_openbsd_vec): New.
5788 * config.bfd: Add m88k-*-openbsd*.
5789 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
5790 (m88kopenbsd_vec): New.
5791 * configure: Regenerate.
5792 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
5793 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
5794 Run "make dep-am".
5795 * Makefile.in: Regenerate.
5796 * po/SRC-POTFILES.in: Regenerate.
5797
7d7e6bc4
NC
57982004-05-24 Nick Clifton <nickc@redhat.com>
5799
5800 * hash.c: Remove bogus node "Changing the default Hash Table Size"
5801 introduced by hash table size patch.
5802
bc286f95
BE
58032004-05-22 Ben Elliston <bje@au.ibm.com>
5804
5805 * configure.in (is_release): Remove.
5806 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
5807 (AC_OUTPUT): Don't output bfdver.h from version.h.
5808 * configure: Regenerate.
5809 * Makefile.am (RELEASE): New variable.
5810 (bfdver.h): New target.
5811 * Makefile.in: Regenerate.
5812 * doc/Makefile.in: Likewise.
5813
8b89a4eb
BE
58142004-05-22 Ben Elliston <bje@au.ibm.com>
5815
5816 * Makefile.am (config.status): Don't depend on version.h.
5817 * Makefile.in: Regenerate.
5818
753731ee
AM
58192004-05-22 Alan Modra <amodra@bigpond.net.au>
5820
5821 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
5822 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
5823 * libbfd.h: Regenerate.
5824 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
5825 (_bfd_elf_rel_local_sym): Likewise.
5826 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
5827 (elf_link_input_bfd): Likewise.
5828 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
5829 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5830 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5831 (elfNN_ia64_relocate_section): Likewise.
5832
2d643429
NC
58332004-05-21 Andy Chittenden <achittenden@bluearc.com>
5834
5835 * hash.c (bfd_default_hash_table_size): New variable.
5836 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
5837 (bfd_hash_set_default_size): New function. Set the default size
5838 to a selected prime number close to the argument. Document new
5839 function.
5840 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
5841 * bfd-in2.h: Regenerate.
5842 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
5843 * Makefile.in: Regenerate.
5844
8377c19c
MK
58452004-05-21 Mark Kettenis <kettenis@gnu.org>
5846
5847 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
5848 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
5849 arm, m68k, m88k and hppa core files.
5850
69fd4758
NC
58512004-05-21 Nick Clifton <nickc@redhat.com>
5852
5853 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
5854 (bfd_bwrite): Likewise.
5855 (bfd_tell): Likewise.
5856 (bfd_flush): Likewise.
5857 (bfd_stat): Likewise.
5858 (bfd_seek): Likewise.
5859 (bfd_get_mtime): Likewise.
5860 (bfd_get_size): Likewise.
5861
cd917290
BE
58622004-05-19 Ben Elliston <bje@au.ibm.com>
5863
5864 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
5865
1b09e940
NC
58662004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
5867
5868 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
5869 (bfd_generic_openr_next_archived_file): Likewise.
5870
096c35a7
BW
58712004-05-17 Bob Wilson <bob.wilson@acm.org>
5872
5873 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
5874 section names by inserting a new substring after .gnu.linkonce, except
5875 for .gnu.linkonce.t.* where the "t." is replaced.
5876
eea6121a 58772004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
5878
5879 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
5880 (m68-*-lynxos* case): Likewise.
5881 (powerpc-*-lyxnos* case): New case.
5882 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
5883
80fccad2
BW
58842004-05-17 David Heine <dlheine@tensilica.com>
5885
5886 * aout-target.h (MY_bfd_copy_private_header_data): Define.
5887 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5888 * bfd.c (bfd_copy_private_header_data): Define.
5889 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5890 interface.
5891 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5892 * coffcode.h (coff_bfd_copy_private_header_data): Define.
5893 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5894 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5895 segments by calling copy_private_bfd_data.
5896 (_bfd_elf_copy_private_header_data): Define.
5897 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5898 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5899 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5900 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
5901 * mmo.c (mmo_bfd_copy_private_header_data): Define.
5902 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
5903 * som.c (som_bfd_copy_private_header_data): Define.
5904 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
5905 * vms.c (vms_bfd_copy_private_header_data): Define.
5906 * bfd-in2.h: Regenerate.
5907 * libbfd.h: Regenerate.
5908
c5ae1840
TS
59092004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5910
5911 * elfxx-mips.c (MINUS_TWO): Define.
5912 (mips_elf_higher, mips_elf_highest,
5913 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
5914 some bfd_vma values.
5915 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
5916
a99cf92b
DA
59172004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5918
5919 * som.c (log2): Rename to exact_log2. Adjust all callers.
5920
0da76f83
NC
59212004-05-13 Paul Brook <paul@codesourcery.com>
5922
c273895f 5923 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
5924 dwarf3 format CIE entries. Remove comment about the size of the
5925 ra_column field. It is now correctly deduced.
0da76f83 5926
4b363073
NC
59272004-05-13 Joel Sherrill <joel@oarcorp.com>
5928
5929 * config.bfd (or32-*-rtems*): Switch to elf.
5930
9598fbe5
NC
59312004-05-13 Nick Clifton <nickc@redhat.com>
5932
5933 * po/fr.po: Updated French translation.
5934
8c37241b
JJ
59352004-05-11 Jakub Jelinek <jakub@redhat.com>
5936
0306b3bf 5937 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
5938 into .dynsym if elf_section_data (sec)->dynindx <= 0.
5939 Adjust counting of last_local.
5940 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
5941 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
5942 created by the linker nor !SHF_ALLOC.
5943
5944 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
5945 DT_PLTGOT to the start of the .got.plt section instead of the
5946 .got output section. Set sh_entsize for .got section in addition
5947 to .got.plt.
5948 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5949 is at sgot->output_section->vma.
5950 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
5951 DT_PLTGOT to the start of the .got.plt section instead of the
5952 .got output section.
5953 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5954 is at sgot->output_section->vma. Set sh_entsize for .got section
5955 in addition to .got.plt.
5956 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
5957 (bfd_section_from_phdr): Likewise.
5958 (map_sections_to_segments): Likewise.
5959 (assign_file_positions_for_segments): Likewise.
5960 (get_program_header_size): Likewise.
5961 * elflink.c (bfd_elf_size_dynamic_sections): Set
5962 elf_tdata (output_bfd)->relro from info->relro.
5963 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
5964
3f980e41
AO
59652004-05-08 Alexandre Oliva <aoliva@redhat.com>
5966
5967 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
5968 a zero symndx for which we hadn't accounted a dynamic relocation.
5969 (_frvfdpic_add_rofixup): Likewise.
5970
d70270c5 59712004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 5972 DJ Delorie <dj@redhat.com>
d70270c5
BF
5973
5974 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
5975 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
5976 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
5977 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
5978
7e9f3bd6
AO
59792004-05-07 Alexandre Oliva <aoliva@redhat.com>
5980
5981 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
5982 immediately if there's no link info.
5983 (elf32_frvfdpic_copy_private_bfd_data): New.
5984 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
5985
eb61d2d6
ZW
59862004-05-06 Zack Weinberg <zack@codesourcery.com>
5987
5988 * dwarf2.c (add_line_info): Also set info->filename to NULL if
5989 filename argument is null; do not call strlen on a null pointer.
5990
ecb2d096
DJ
59912004-05-06 Daniel Jacobowitz <drow@mvista.com>
5992
5993 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
5994 special case.
5995
43850d5b
AO
59962004-05-05 Alexandre Oliva <aoliva@redhat.com>
5997
5998 * configure.in (bfd_elf32_frvfdpic_vec): New.
5999 * configure: Rebuilt.
6000 * targets.c (bfd_elf32_frvfdpic_vec): New.
6001 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6002 on the latter.
6003 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6004 frvfdpic instead of frv. Rearrange elf-target macros such that
6005 the FDPIC-specific ones are only defined for this new target
6006 vector.
6007 (bfd_elf32_frvfdpic_vec): Declare.
6008 (IS_FDPIC): New.
6009 (elf32_frv_relocate_section): Use it to enable segment checking
6010 and to control rofixup emission. Add output section vma to
6011 applied relocation in non-LOAD non-ALLOC sections. Use
6012 _bfd_error_handler for errors.
6013 (_frv_create_got_section): Create .rel.got and .rofixup only in
6014 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6015 linker script.
6016 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6017 (elf32_frvfdpic_modify_segment_map): Likewise.
6018 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6019 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6020 error message if we miscompute the rofixup size.
6021 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6022 (frvfdpic_elf_encode_eh_address): Likewise.
6023 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6024 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6025 relocs. Reject unknown relocation types.
6026 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6027 (frv_elf_merge_private_bfd_data): Likewise.
6028 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6029 0x4000 for newly-added elf32-frvfdpic.
6030
06fc8a8c
NC
60312004-05-05 Nick Clifton <nickc@redhat.com>
6032
6033 PR/136
6034 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6035 returning NULL as most users of this function do not check its
6036 return value.
33216455
NC
6037 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6038 of bfd_cache_lookup().
6039 * sco5-core.c (sco5_core_file_p): Likewise.
6040 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
6041
60422004-05-05 Nick Clifton <nickc@redhat.com>
6043
6044 * cache.c (bfd_cache_lookup): Improve formatting.
6045 * archive.c: Fix formatting.
6046
6b6e92f4
NC
60472004-05-05 Peter Barada <peter@the-baradas.com>
6048
6049 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6050 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6051 * bfd-in2.h(bfd_architecture): Regenerate.
6052
6a8d1586
AM
60532004-05-03 Alan Modra <amodra@bigpond.net.au>
6054
6055 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6056 SEC_MERGE sections.
6057 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6058 those against discarded link-once and SEC_MERGE section symbols.
6059
fafe6678
L
60602004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6061
6062 * section.c (bfd_get_section_by_name_if): New.
6063 * bfd-in2.h: Regenerated.
6064
ad7b9a36
AM
60652004-05-02 Alan Modra <amodra@bigpond.net.au>
6066
6067 * som.c (som_bfd_is_group_section): Define.
6068
73499ab8
AM
60692004-05-01 Alan Modra <amodra@bigpond.net.au>
6070
6071 * section.c (bfd_make_section_anyway): Copy the whole
6072 bfd_hash_entry, not just "next" from existing entry.
6073
45c5e9ed
L
60742004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6075
6076 * elf.c (bfd_section_from_shdr): Maintain the section order in
6077 a section group.
6078 (special_sections): Add ".note.GNU-stack".
6079 (elf_fake_sections): Handle section group for relocatable
6080 link..
6081
bc87dd2e
L
60822004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6083
6084 * section.c (bfd_sections_find_if): New.
6085 * bfd-in2.h: Regenerated.
6086
72adc230
AM
60872004-04-30 Alan Modra <amodra@bigpond.net.au>
6088
6089 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6090
6091 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6092 * elf.c (bfd_elf_is_group_section): New function.
6093 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6094 * section.c (bfd_generic_is_group_section): New function.
6095 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6096 (BFD_JUMP_TABLE_LINK): Adjust.
6097 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6098 * aout-target.h (MY_bfd_is_group_section): Define.
6099 * aout-tic30.c (MY_bfd_is_group_section): Define.
6100 * bfd.c (bfd_is_group_section): Define.
6101 * binary.c (binary_bfd_is_group_section): Define.
6102 * bout.c (b_out_bfd_is_group_section): Define.
6103 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6104 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6105 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6106 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6107 * coffcode.h (coff_bfd_is_group_section): Define.
6108 * i386msdos.c (msdos_bfd_is_group_section): Define.
6109 * i386os9k.c (os9k_bfd_is_group_section): Define.
6110 * ieee.c (ieee_bfd_is_group_section): Define.
6111 * ihex.c (ihex_bfd_is_group_section): Define.
6112 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6113 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6114 * mmo.c (mmo_bfd_is_group_section): Define.
6115 * nlm-target.h (nlm_bfd_is_group_section): Define.
6116 * oasys.c (oasys_bfd_is_group_section): Define.
6117 * pef.c (bfd_pef_bfd_is_group_section): Define.
6118 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6119 * srec.c (srec_bfd_is_group_section): Define.
6120 * tekhex.c (tekhex_bfd_is_group_section): Define.
6121 * versados.c (versados_bfd_is_group_section): Define.
6122 * vms.c (vms_bfd_is_group_section): Define.
6123 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6124 * bfd-in2.h: Regenerate.
6125 * libbfd.h: Regenerate.
6126
20f0a1ad
AM
61272004-04-30 Alan Modra <amodra@bigpond.net.au>
6128
6129 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6130
f7458fc9 61312004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
6132
6133 * configure.in: Update version to 2.15.91.
6134 * configure: Regenerate.
6135
8a7140c3
NC
61362004-04-29 Brian Ford <ford@vss.fsi.com>
6137
6138 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6139 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6140 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6141 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6142 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6143 .gnu.linkonce.wi. sections.
6144 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6145 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6146 .gnu.linkonce.wi..
6147 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6148 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6149
3e722fb5
CD
61502004-04-28 Chris Demetriou <cgd@broadcom.com>
6151
6152 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6153 * bfd-in2.h: Regenerate.
6154 * libbfd.h: Likewise.
6155
351e2b5a
DA
61562004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6157
6158 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6159 dup_common fields.
6160 (setup_sections): Use som_subspace_dictionary_record struct instead
6161 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6162 is_comdat, is_common or dup_common.
6163 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6164 is_comdat, is_common and dup_common in section subspace_dict from
6165 copy_data.
6166 (som_begin_writing): Use som_subspace_dictionary_record struct.
6167 (som_finish_writing): Likewise.
6168 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6169 is_common and dup_common flags in info for symbol. Add comment
6170 regarding linker support for these fields. Slightly reorganize
6171 function.
6172 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6173 dup_common fields in symbol table from symbol info.
6174 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6175 arguments. Set corresponding fields in copy_data. Change all callers.
6176 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6177 symbol table.
6178 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6179 * som.h (som_subspace_dictionary_record): Define.
6180 (som_copyable_section_data_struct): Add is_comdat, is_common and
6181 dup_common fields.
6182 (som_section_data_struct): Use som_subspace_dictionary_record struct
6183 instead of subspace_dictionary_record.
6184 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6185
3ba3bc8c
BW
61862004-04-27 Bob Wilson <bob.wilson@acm.org>
6187
6188 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6189 if set. Check reloc_done flag before applying relocations. Use
6190 output addresses, both when applying relocations and when comparing
6191 against the specified section.
6192 (elf_xtensa_relocate_section): Use output address to check if dynamic
6193 reloc is in a literal pool. Set section's reloc_done flag.
6194
beb8df56
L
61952004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6196
6197 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6198 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6199 section.
6200 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6201 section.
6202
1829f4b2
AM
62032004-04-27 Alan Modra <amodra@bigpond.net.au>
6204
6205 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6206 structure field removed in 2004-04-24 patch.
6207 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6208
6209 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6210 Constify hdr arg.
6211 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6212 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6213 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6214 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6215 field before calling elf_backend_section_flags.
6216
4030e8f6
CD
62172004-04-24 Chris Demetriou <cgd@broadcom.com>
6218
6219 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6220 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6221 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6222 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6223 and BFD_RELOC_32_PCREL.
6224 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6225 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6226 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6227 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6228 (mips_elf_next_relocation): Move comment about matching HI/LO
6229 relocations to...
6230 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6231 R_MIPS_GNU_REL_HI16.
6232
3e27568f
CD
62332004-04-23 Chris Demetriou <cgd@broadcom.com>
6234
6235 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6236 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6237 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6238 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6239 and update comments to reflect current usage.
6240 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6241 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6242 for MIPS_R_PCREL16.
6243 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6244 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6245 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6246 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6247 type number to be MIPS_R_PCREL16.
6248 (mips_relocate_section): Remove support for link-time relaxation
6249 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6250 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6251 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6252 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6253 relaxation of branches used by embedded-PIC.
6254 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6255 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6256 related members, update comment.
6257 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6258 code related to embedded-PIC.
6259 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6260 initialization of now-removed 'adjust' member of
6261 'struct ecoff_debug_info'.
6262
b32de0bc 62632004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
6264
6265 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6266
955af222
PB
62672004-04-21 Philip Blundell <pb@nexus.co.uk>
6268
6269 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6270 relocs for locally defined symbols during -shared final link.
6271 (elf32_arm_final_link_relocate): Likewise.
6272
47a9f7b3
JJ
62732004-04-22 Jakub Jelinek <jakub@redhat.com>
6274
6275 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6276 ELF_LINK_POINTER_EQUALITY_NEEDED.
6277 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6278 if r_type is not R_X86_64_PC32.
6279 (elf64_x86_64_finish_dynamic_symbol): If
6280 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6281 SHN_UNDEF symbols.
6282
1f1799d5
KK
62832004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6284
6285 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6286 (elf_backend_plt_sym_val): Define.
6287
0fdea5ce
AC
62882004-04-22 Andrew Cagney <cagney@redhat.com>
6289
6290 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6291
5198ba8b
DA
62922004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6293
eb61d2d6 6294 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
6295 make_bfd_asection.
6296 * som.c (som_set_section_contents): Constantify second argument.
6297 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6298 (som_object_setup): Rework to avoid warning.
6299 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6300 Likewise.
6301
fe2e161a
AC
63022004-04-22 Andrew Cagney <cagney@redhat.com>
6303
6304 * cache.c (bfd_cache_close): Check for a previously closed file.
6305
4c45e5c9
JJ
63062004-04-22 Jakub Jelinek <jakub@redhat.com>
6307
6308 * bfd.c (bfd_get_synthetic_symtab): Define.
6309 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6310 NAME##_get_synthetic_symtab.
6311 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6312 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6313 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6314 relplt_name fields.
6315 (_bfd_elf_get_synthetic_symtab): New prototype.
6316 * elfcode.h (elf_get_synthetic_symtab): Define.
6317 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6318 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6319 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6320 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6321 * bfd-in2.h: Rebuilt.
6322 * libbfd.h: Rebuilt.
6323 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6324 (elf_backend_plt_sym_val): Define.
6325 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6326 (elf_backend_plt_sym_val): Define.
6327 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6328 (elf_backend_plt_sym_val): Define.
6329 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6330 (elf_backend_plt_sym_val): Define.
6331 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6332 (elf_backend_plt_sym_val): Define.
6333 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6334 (elf_backend_plt_sym_val): Define.
6335 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6336 (elf_backend_plt_sym_val): Define.
6337 * aout-target.h (MY_get_synthetic_symtab): Define.
6338 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6339 * coff-rs6000.c (rs6000coff_vec): Add
6340 _bfd_nodynamic_get_synthetic_symtab.
6341 (pmac_xcoff_vec): Likewise.
6342 * coff64-rs6000.c (rs6000coff64_vec): Add
6343 _bfd_nodynamic_get_synthetic_symtab.
6344 (aix5coff64_vec): Likewise.
6345 * sunos.c (MY_get_synthetic_symtab): Define.
6346 * vms.c (vms_get_synthetic_symtab): Define.
6347
d2f7ecac
NC
63482004-04-22 Nick Clifton <nickc@redhat.com>
6349
6350 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6351
fd99574b
NC
63522004-04-22 Peter Barada <peter@the-baradas.com>
6353
6354 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6355 * bfd2-in.h: Regenerate.
6356 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6357
23867d67
CD
63582004-04-21 Chris Demetriou <cgd@broadcom.com>
6359
6360 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6361 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6362 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6363 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6364 * bfd-in2.h: Regenerate.
6365
2c8c90bc
BW
63662004-04-21 Bob Wilson <bob.wilson@acm.org>
6367
6368 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6369 require relocations against a weak symbol to reference the same
6370 symbol hash entry if not a final, static link.
6371 (get_cached_value, add_value_map): Add final_static_link argument.
6372 (remove_literals): Pass final_static_link argument as needed.
6373
40838a72
AC
63742004-04-21 Andrew Cagney <cagney@redhat.com>
6375
6376 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6377 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6378 (opncls_bwrite, opncls_bclose, opncls_bflush)
6379 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6380 bfd iovec that uses function callbacks.
6381 (bfd_close): Use the iovec's bclose.
6382 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6383 (cache_bclose, cache_bflush, cache_bstat)
6384 (cache_iovec): New functions and global variable, implement a
6385 cache "iovec", where applicable set bfd_error.
6386 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6387 * bfdio.c (struct bfd_iovec): Define.
6388 (real_read): Delete function.
6389 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6390 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6391 assume that bread and bwrite set bfd_error.
6392 * bfd.c (struct bfd): Add "iovec", update comments.
6393 * bfd-in2.h, libbfd.h: Re-generate.
6394
7f919c84
AC
63952004-04-21 Andrew Cagney <cagney@redhat.com>
6396
6397 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6398
715df9b8
EB
63992004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6400
6401 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6402 (bfd_elf_gc_sections): Fail if a shared object is being created.
6403 Do not fail if dynamic sections have been created. Instead call
6404 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6405 dynamically referenced symbols. Do not mark the whole graph
6406 rooted at .eh_frame, only the section proper.
6407
6482c264
NC
64082004-04-20 DJ Delorie <dj@redhat.com>
6409
6410 * reloc.c: Add BFD_RELOC_32_SECREL.
6411 * bfd-in2.h: Regenerate.
6412 * libbfd.h: Likewise.
6413 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6414 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6415 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6416
4dc570c2
JJ
64172004-04-19 Jakub Jelinek <jakub@redhat.com>
6418
6419 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6420 relocs against hidden/protected undefweak symbols properly.
6421 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6422
0b60d5d3
MK
64232004-04-18 Mark Kettenis <kettenis@gnu.org>
6424
6425 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6426 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6427 core files.
6428
d48bdb99
AM
64292004-04-17 Brian Ford <ford@vss.fsi.com>
6430
6431 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6432 filepos for the SizeOfHeaders field.
6433 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6434 overflow.
6435 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6436
57a1784e
AM
64372004-04-16 Alan Modra <amodra@bigpond.net.au>
6438
6439 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6440 change reloc_done. Set and restore _cooked_size.
6441 (RETURN): Delete.
6442
d1ad3f6f
MK
64432004-04-15 Mark Kettenis <kettenis@gnu.org>
6444
6445 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6446 core files.
6447
3d1bca9d
NC
64482004-04-15 Nick Clifton <nickc@redhat.com>
6449
6450 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6451
019b892f
AM
64522004-04-15 Alan Modra <amodra@bigpond.net.au>
6453
6454 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6455
15b43f48
AM
64562004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6457
6458 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6459 when it is a definition.
6460
6de00a78
AM
64612004-04-14 Alan Modra <amodra@bigpond.net.au>
6462
6463 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6464 when statically linking PIC code.
6465 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6466
279500de
TS
64672004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6468
6469 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6470 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6471 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6472 * configure: Regenerate.
6473
ccf2f652
RS
64742004-04-08 Richard Sandiford <rsandifo@redhat.com>
6475
6476 * elflink.c: Include libiberty.h.
6477 * Makefile.am (elflink.lo): Depend on libiberty.h.
6478 * Makefile.in: Regenerate.
6479
ca07892d
DJ
64802004-04-06 Daniel Jacobowitz <drow@mvista.com>
6481
6482 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6483 ".MIPS.stubs".
6484
a5a58ba4
L
64852004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6486
6487 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6488 reserve the memory for dynamic linker
6489
24d18d30
MK
64902004-04-05 Mark Kettenis <kettenis@gnu.org>
6491
6492 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6493 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6494
a4d7b4b5
L
64952004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6496
6497 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6498 RELOC_FOR_GLOBAL_SYMBOL.
6499 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6500
1f433d93
L
65012004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6502
6503 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6504 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6505
e489d0ae
PB
65062004-04-01 Paul Brook <paul@codesourcery.com>
6507
6508 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6509 * elf32-arm.h (struct elf32_elf_section_map): New.
6510 (struct _arm_elf_section_data): New.
6511 (elf32_arm_section_data): Define.
6512 (struct elf32_arm_link_hash_table): Add byteswap_code.
6513 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6514 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6515 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6516 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6517 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6518 (bfd_elf32_new_section_hook, elf_backend_write_section,
6519 elf_backend_link_output_symbol_hook): Define.
6520
66a695f0
NC
65212004-04-01 Andy Chittenden <achittenden@bluearc.com>
6522
6523 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6524 that keeps the characters in a B_INCL..B_EINCL range.
6525 (_bfd_link_section_stabs): When computing the sum of the
6526 characters in a B_INCL..B_EINCL range also keep a copy of those
6527 characters. Use this information to distinguish between
6528 include sections that have the same sum and the same length
6529 but which are nevertheless unique.
6530
8375c36b
PB
65312004-03-31 Paul Brook <paul@codesourcery.com>
6532
6533 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6534 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6535
a56b48eb
NC
65362004-03-31 Andy Chittenden <achittenden@bluearc.com>
6537
6538 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6539 to 'sum_chars' and add field 'num_chars'.
6540 (_bfd_link_section_stabs): When computing the sum of the
6541 characters in a B_INCL..B_EINCL range also keep a count of the
6542 number of characters. Use this information to help distinguish
6543 between include sections when have the same sum but which
6544 nevertheless are still unique.
6545
1fbc7e7a 65462004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
6547
6548 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6549
0949843d 65502004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 6551 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
6552
6553 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6554 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6555 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6556 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6557 (cpu-cr16c.lo): New target.
6558 (elf32-cr16c.lo): Likewise.
6559 * Makefile.in: Regenerate.
6560 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6561 (bfd_archures_list): Add bfd_cr16c_arch.
6562 * config.bfd: Handle cr16c-*-elf*.
6563 * configure.in: Handle bfd_elf32_cr16c_vec.
6564 * configure: Regenerate.
6565 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6566 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6567 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6568 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6569 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6570 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6571 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6572 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6573 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6574 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6575 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6576 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6577 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6578 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6579 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6580 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6581 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6582 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6583 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6584 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6585 * targets.c (bfd_elf32_cr16c_vec): Declare.
6586 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6587 * cpu-cr16c.c: New file.
6588 * elf32-cr16c.c: Likewise.
6589 * libbfd.h: Regenerate.
6590 * bfd-in2.h: Likewise.
6591
baaff79e
JJ
65922004-03-30 Jakub Jelinek <jakub@redhat.com>
6593
6594 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6595
c152c796
AM
65962004-03-27 Alan Modra <amodra@bigpond.net.au>
6597
6598 * Makefile.am: Remove all mention of elflink.h.
6599 * Makefile.in: Regenerate.
6600 * bfd-in.h (bfd_elf_discard_info): Declare.
6601 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6602 * bfd-in2.h: Regenerate.
6603 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6604 bfd_elf32_link_record_dynamic_symbol,
6605 bfd_elf64_link_record_dynamic_symbol,
6606 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6607 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6608 _bfd_elf32_link_record_local_dynamic_symbol,
6609 _bfd_elf64_link_record_local_dynamic_symbol,
6610 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6611 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6612 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6613 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6614 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6615 _bfd_elf32_reloc_symbol_deleted_p,
6616 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6617 (bfd_elf_link_record_dynamic_symbol,
6618 bfd_elf_link_record_local_dynamic_symbol,
6619 bfd_elf_final_link, bfd_elf_gc_sections,
6620 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6621 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6622 bfd_elf_reloc_symbol_deleted_p): Declare.
6623 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6624 * elf32-arm.h: Update for changed function names. Remove local
6625 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6626 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6627 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6628 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6629 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6630 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6631 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6632 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6633 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6634 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6635 (bfd_elfNN_print_symbol): Define.
6636 * elfcode.h: Don't include elflink.h.
6637 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6638 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6639 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6640 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6641 elf_link_record_local_dynamic_symbol): Don't define.
6642 * elflink.c: Update for changed function names. Move elflink.h
6643 code here.
6644 * elflink.h: Delete file.
6645 * po/SRC-POTFILES.in: Regenerate.
6646 * po/bfd.pot: Regenerate.
6647
6a9cae7f
AM
66482004-03-27 Alan Modra <amodra@bigpond.net.au>
6649
6650 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6651 "name" for global syms accidentally removed in 2004-03-20 change.
6652
140f6c8e
AM
66532004-03-27 Alan Modra <amodra@bigpond.net.au>
6654
6655 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6656 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6657 where Elf_External_* is different for 64 and 32 bit, with
6658 corresponding elf_size_info field.
6659 (struct elf_final_link_info): Use "bfd_byte *" instead
6660 of "Elf_External_Sym *" for external_syms and symbuf.
6661 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6662 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6663 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6664 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6665 (elf_link_sort_cmp2): Adjust.
6666 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6667 using ELF_R_SYM macro. Set u.sym_mask.
6668 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6669 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6670 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6671 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6672 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6673 swap_syn_out functions. Rearrange dyn swap in/out switch.
6674 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6675 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6676 (elf_link_flush_output_syms): Add elf_backend_data arg.
6677 (elf_link_check_versioned_symbol): Likewise.
6678 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6679 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6680 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6681 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6682 ELF_R_TYPE and ELF_R_INFO macros.
6683 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6684 based on size rather than using ELF_R_INFO.
6685 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6686 ELF_R_SYM macro.
6687 (struct alloc_got_off_arg): New.
6688 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6689 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6690 (elf_gc_allocate_got_offsets): Adjust.
6691 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6692 ELF_R_SYM. Use bfd_section_from_elf_index.
6693 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6694 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6695 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6696
14bde378
SS
66972004-03-26 Stan Shebs <shebs@apple.com>
6698
6699 Remove MPW support, no longer used.
6700 * config.bfd (powerpc-*-mpw*): Remove configuration.
6701 * mpw-config.in, mpw-make.sed: Remove files.
6702 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6703
555cd476
AM
67042004-03-26 Alan Modra <amodra@bigpond.net.au>
6705
6706 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6707 (ppc64_elf_add_symbol_hook): New function.
6708 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6709 const from Elf_Internal_Sym param.
6710 * elflink.c (elf_link_add_object_symbols): Adjust.
6711 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6712 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6713 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6714 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6715 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6716 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6717 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6718 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6719 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6720 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6721 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6722 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6723 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6724 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6725 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6726 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6727
4ad4eba5
AM
67282004-03-26 Alan Modra <amodra@bigpond.net.au>
6729
6730 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6731 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6732 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6733 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6734 (bfd_elf64_bfd_link_add_symbols): Delete.
6735 (bfd_elf_link_add_symbols): Declare.
6736 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6737 * elflink.c: Include safe-ctype.h.
6738 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6739 make static.
6740 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6741 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6742 static.
6743 (elf_link_add_archive_symbols): Rename from
6744 _bfd_elf_link_add_archive_symbols, make static.
6745 (elf_link_add_object_symbols): New function. Corresponding
6746 elflink.h function converted to use elf_size_info.
6747 (bfd_elf_link_add_symbols): Likewise.
6748 (bfd_elf_size_dynamic_sections): Adjust.
6749 * elflink.h (elf_bfd_link_add_symbols): Delete.
6750 (elf_link_add_object_symbols): Delete.
6751 * elf32-gen.c (elf32_generic_link_add_symbols): Call
6752 bfd_elf_link_add_symbols.
6753 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6754
5a580b3a
AM
67552004-03-25 Alan Modra <amodra@bigpond.net.au>
6756
6757 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6758 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 6759
5a580b3a
AM
6760 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6761 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6762 (_bfd_elf_add_dt_needed_tag): Declare.
6763 (_bfd_elf_sort_symbol): Declare.
6764 (_bfd_elf_finalize_dynstr): Declare.
6765 (RELOC_FOR_GLOBAL_SYM): Formatting.
6766 * elfcode.h (elf_add_dynamic_entry): Delete.
6767 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
6768 elflink.h function converted to use elf_size_info.
6769 (_bfd_elf_add_dt_needed_tag): Likewise.
6770 (_bfd_elf_sort_symbol): Likewise.
6771 (_bfd_elf_finalize_dynstr): Likewise.
6772 (compute_bucket_count): Likewise.
6773 (bfd_elf_size_dynamic_sections): Likewise. Check result of
6774 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6775 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6776 * elflink.h: ..here.
6777 (sort_symbol, add_dt_needed_tag): Delete.
6778 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6779 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6780 Update all users.
6781 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
6782 * elf32-cris.c (add_dynamic_entry): Likewise.
6783 * elf32-hppa.c (add_dynamic_entry): Likewise.
6784 * elf32-i370.c (add_dynamic_entry): Likewise.
6785 * elf32-i386.c (add_dynamic_entry): Likewise.
6786 * elf32-m32r.c (add_dynamic_entry): Likewise.
6787 * elf32-m68k.c (add_dynamic_entry): Likewise.
6788 * elf32-ppc.c (add_dynamic_entry): Likewise.
6789 * elf32-s390.c (add_dynamic_entry): Likewise.
6790 * elf32-sh.c (add_dynamic_entry): Likewise.
6791 * elf32-sparc.c (add_dynamic_entry): Likewise.
6792 * elf32-vax.c (add_dynamic_entry): Likewise.
6793 * elf32-xtensa.c (add_dynamic_entry): Likewise.
6794 * elf64-alpha.c (add_dynamic_entry): Likewise.
6795 * elf64-hppa.c (add_dynamic_entry): Likewise.
6796 * elf64-ppc.c (add_dynamic_entry): Likewise.
6797 * elf64-s390.c (add_dynamic_entry): Likewise.
6798 * elf64-sparc.c (add_dynamic_entry): Likewise.
6799 * elf64-x86-64.c (add_dynamic_entry): Likewise.
6800 * elfxx-ia64.c (add_dynamic_entry): Likewise.
6801 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
6802 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
6803 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
6804 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6805
d507cf36
PB
68062004-03-23 Paul Brook <paul@codesourcery.com>
6807
6808 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
6809
88d65ad6
BW
68102004-03-22 Bob Wilson <bob.wilson@acm.org>
6811
6812 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
6813 literal tables and check for relocs outside of literal pools.
6814 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
6815 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
6816 set DF_TEXTREL.
6817 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
6818 (elf_xtensa_relocate_section): Read literal tables and check for
6819 dynamic relocations in read-only sections and not in literal pools.
c152c796 6820
b9cf773d
AM
68212004-03-23 Alan Modra <amodra@bigpond.net.au>
6822
6823 PR 51.
6824 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
6825
e4a2175c
HPN
68262004-03-22 Hans-Peter Nilsson <hp@axis.com>
6827
6828 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6829 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
6830 not defined by the executable, or defined in a DSO.
6831 <eliding run-time relocation of .got>: Initialize GOT entry for a
6832 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
6833 executable.
6834 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
6835 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
6836 a PLT reloc to GOT for an executable.
6837 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 6838 .got for a DSO and explain why.
e4a2175c
HPN
6839 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
6840 and unreferenced symbols for which a PLT is defined. Adjust
6841 dynamic-symbol pruning correspondingly, to make sure we don't lose
6842 a dynamic symbol also defined by a DSO.
6843
b2a8e766
AM
68442004-03-22 Alan Modra <amodra@bigpond.net.au>
6845
6846 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
6847 and rel args. Group input and output args. Wrap to 80 columns.
6848 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6849 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
6850 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
6851 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
6852 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6853 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
6854 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
6855 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
6856 RELOC_FOR_GLOBAL_SYMBOL invocation.
6857
59c2e50f
L
68582004-03-20 H.J. Lu <hongjiu.lu@intel.com>
6859
6860 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
6861 unresolved symbols in objects aren't allowed.
6862
6863 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
6864 unresolved symbols.
6865 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6866 (elf_hppa_unmark_useless_dynamic_symbols):
6867 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6868 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6869 (elf32_hppa_relocate_section): Likewise.
6870 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6871 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6872 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6873 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6874 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6875
6876 * elf-m10200.c (mn10200_elf_relocate_section): Use
6877 RELOC_FOR_GLOBAL_SYMBOL.
6878 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6879 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6880 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6881 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6882 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6883 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
6884 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6885 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
6886 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6887 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6888 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6889 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6890
9992270f
DA
68912004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6892
36751eee
DA
6893 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6894 (final_link_relocate): Likewise.
9992270f
DA
6895 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6896 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6897
05864e2a
AM
68982004-03-19 Alan Modra <amodra@bigpond.net.au>
6899
6900 * Makefile.am: Run "make dep-am".
6901 * Makefile.in: Regenerate.
6902 * aclocal.m4: Regenerate.
6903 * config.in: Regenerate.
6904 * po/bfd.pot: Regenerate.
6905
f218a464 69062004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
6907 H.J. Lu <hongjiu.lu@intel.com>
6908
6909 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
6910 type and size change code to where it was previously. Remove
6911 dt_needed param. Treat old weak syms as strong if new sym is
6912 from a shared lib, even when old sym is from another shared
6913 lib. Remove unnecessary tests of oldweak and newweak. Correct
6914 comments.
6915 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
6916 _bfd_elf_merge_symbol calls.
6917 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
6918 dt_needed local var. Update comments.
6919 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
6920 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
6921
6922 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
6923 strong syms in one shared object overriding weak syms in another.
6924
79349b09
AM
69252004-03-18 Alan Modra <amodra@bigpond.net.au>
6926
4a43e768
AM
6927 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
6928 dyn_lib_class field. Rearrange for better packing.
6929 (elf_dt_soname): Delete.
6930 (elf_dyn_lib_class): Define.
6931 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
6932 (bfd_elf_set_dt_needed_soname): Delete.
6933 (bfd_elf_set_dyn_lib_class): New function.
6934 * elflink.h (add_dt_needed_tag): New function. Split out from..
6935 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
6936 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
6937 initialization of soname.
6938 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
6939 elf_dt_soname.
6940 * bfd-in.h (enum dynamic_lib_link_class): New.
6941 (bfd_elf_set_dt_needed_soname): Delete.
6942 (bfd_elf_set_dyn_lib_class): Declare.
6943 * bfd-in2.h: Regenerate.
6944
79349b09
AM
6945 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
6946 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
6947 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
6948 symbol loop. Instead use add_needed to flag tag as written.
6949
d13d89fa
NS
69502004-03-17 Nathan Sidwell <nathan@codesourcery.com>
6951
6952 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
6953 logic for null_input_bfd detection.
6954
9183ed4b
AM
69552004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6956
6957 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
6958
021d7868
MK
69592004-03-16 Mark Kettenis <kettenis@gnu.org>
6960
6961 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
6962 code.
6963
51992aec
AM
69642004-03-16 Alan Modra <amodra@bigpond.net.au>
6965
6966 * elflink.c (elf_link_read_relocs_from_section): Don't use
6967 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
6968 (_bfd_elf_link_read_relocs): ..to here.
6969 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
6970
ccba357f
AM
69712004-03-16 Alan Modra <amodra@bigpond.net.au>
6972
6973 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
6974 values selected in configure.host. Require both to be defined
6975 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
6976 corresponding BFD_HOST vars with quotes.
6977 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
6978 Always require BFD_HOST_64_BIT_DEFINED.
6979 <file_ptr type>: Find off_t size before emitting message. Combine
6980 off_t and ftello64 conditional.
6981 * configure: Regenerate.
6982
41978308
AM
69832004-03-16 Alan Modra <amodra@bigpond.net.au>
6984
6985 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
6986 aliasing warning. Remove trailing whitespace throughout file.
6987
d63b5ed9
DA
69882004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6989
6990 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
6991 input_section in calls to get_dyn_name.
6992 * 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
6993 local symbols.
6994 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
6995
8ce8c090
AM
69962004-03-15 Alan Modra <amodra@bigpond.net.au>
6997
6998 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
6999 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7000 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7001 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7002 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7003 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7004 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7005 when using long.
7006 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7007 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7008 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7009 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7010 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7011 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7012 (read_8_bytes, read_indirect_string, read_address): Likewise.
7013 (read_abbrevs, parse_comp_unit): Likewise.
7014 * targets.c (struct bfd_target): Likewise.
7015 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7016 * hppabsd-core.c: Likewise. Formatting.
7017 * hpux-core.c: Likewise.
7018 * irix-core.c: Likewise.
7019 * netbsd-core.c: Likewise.
7020 * osf-core.c: Likewise.
7021 * ptrace-core.c: Likewise.
7022 * sco5-core.c: Likewise.
7023 * trad-core.c: Likewise.
7024 * configure: Regenerate.
7025 * bfd-in2.h: Regenerate.
7026
edeb6e24
AM
70272004-03-15 Alan Modra <amodra@bigpond.net.au>
7028
7029 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7030 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7031 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7032 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7033 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7034 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7035 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7036 * libbfd.c: Likewise in function definitions.
7037 (bfd_put_8): Mask with 0xff rather than casting to char.
7038 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7039 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7040 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7041 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7042 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7043 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7044 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7045 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7046 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7047 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7048 * archive.c (do_slurp_coff_armap): Update swap prototype.
7049 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7050 (tic54x_getl_signed_32): Likewise.
7051 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7052 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7053 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7054 (bfd_getp_signed_32, bfd_putp32): Likewise.
7055 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7056 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7057 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7058 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7059 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7060 bfd_h_getx_signed_16, bfd_h_putx16.
7061 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7062 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7063 * hpux-core.c: Likewise.
7064 * irix-core.c: Likewise.
7065 * netbsd-core.c: Likewise.
7066 * osf-core.c: Likewise.
7067 * ptrace-core.c: Likewise.
7068 * sco5-core.c: Likewise.
7069 * trad-core.c: Likewise.
7070 * bfd-in2.h: Regenerate.
7071
c1b954e2
AM
70722004-03-15 Matt Thomas <matt@3am-software.com>
7073
7074 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7075 selected.
7076
85cfd8d3
MK
70772004-03-13 Mark Kettenis <kettenis@gnu.org>
7078
7079 * config.bfd: Add x86_64-*-openbsd*.
7080 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7081 netbsd-core.lo.
7082 * configure: Regenerate.
7083
d1f161ea
NC
70842004-03-12 Nick Clifton <nickc@redhat.com>
7085 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 7086
d1f161ea
NC
7087 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7088 if the input bfd does not contain any code.
7089
8b6f2683
JW
70902004-03-09 Steve Ellcey <sje@cup.hp.com>
7091
7092 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7093
79cda7cf
FF
70942004-03-05 Fred Fish <fnf@redhat.com>
7095
7096 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7097 mips16 symbols to be even rather than testing first for even/odd.
7098 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7099
e5caec89
NS
71002004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7101
7102 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7103 layout purposes.
7104
02bb6eae
AO
71052004-03-03 Alexandre Oliva <aoliva@redhat.com>
7106
7107 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7108 undefined symbols as hash_new.
7109
ae51a426
JR
71102003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7111
7112 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7113 * cpu-sh.c: Ditto.
7114 * elf32-sh.c: Ditto.
7115 * bfd-in2.h: Regenerate.
7116
3b712a1a
AO
71172004-03-02 Alexandre Oliva <aoliva@redhat.com>
7118
7119 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7120 dynrelocs.
7121 (_frv_count_got_plt_entries): Initialize them.
7122 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7123 callers.
7124 (frv_pic_relocs_info_for_global): Likewise.
7125 (frv_pic_relocs_info_for_local): Likewise.
7126 (frv_pic_merge_early_relocs_info): New.
7127 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7128 another.
7129 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7130 Check that we don't exceed the allocated count for entry.
7131 (_frv_add_rofixup): Likewise.
7132 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7133 (elf32_frv_finish_dynamic_sections): Improve error message in case
7134 we emit too few rofixup entries.
7135
676a64f4
RS
71362004-03-01 Richard Sandiford <rsandifo@redhat.com>
7137
7138 * archures.c (bfd_mach_fr450): New.
7139 * bfd-in2.h: Regenerate.
7140 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7141 (arch_info_500): Link to it.
7142 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7143 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7144 (frv_elf_arch_extension_p): New function.
7145 (frv_elf_merge_private_bfd_data): Use it.
7146
0ad989f9
L
71472004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7148
7149 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7150
7151 * elflink.h (is_global_data_symbol_definition): Moved to
7152 elflink.c.
7153 (elf_link_is_defined_archive_symbol): Likewise.
7154 (elf_link_add_archive_symbols): Likewise. Renamed to
7155 _bfd_elf_link_add_archive_symbols.
7156
7157 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7158 of ELF symbol table entry from backend.
7159 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7160 instead of elf_link_add_object_symbols.
7161
ec3391e7
AO
71622004-02-27 Alexandre Oliva <aoliva@redhat.com>
7163
7164 * elf-bfd.h (struct elf_backend_data): Added
7165 elf_backend_can_make_relative_eh_frame,
7166 elf_backend_can_make_lsda_relative_eh_frame and
7167 elf_backend_encode_eh_address.
7168 (_bfd_elf_encode_eh_address): Declare.
7169 (_bfd_elf_can_make_relative): Declare.
7170 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7171 hooks to decide whether to attempt to make_relative and
7172 make_lsda_relative.
7173 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7174 (_bfd_elf_can_make_relative): New.
7175 (_bfd_elf_encode_eh_address): New.
7176 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7177 (frv_elf_encode_eh_address): New.
7178 (elf_backend_can_make_relative_eh_frame): Define.
7179 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7180 (elf_backend_encode_eh_address): Define.
7181 * elfxx-target.h
7182 (elf_backend_can_make_relative_eh_frame): Define.
7183 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7184 (elf_backend_encode_eh_address): Define.
7185 (elfNN_bed): Add them.
7186
e6deed0a
AO
71872004-02-27 Alexandre Oliva <aoliva@redhat.com>
7188
7189 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7190 complain_on_overflow to signed.
7191
b60d7a1a
L
71922004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7193
7194 * elflink.h (sort_symbol): New.
7195 (elf_link_add_object_symbols): Use a sorted symbol array for
7196 weakdef.
7197
1c3ff0f2
MS
71982004-02-27 Jakub Jelinek <jakub@redhat.com>
7199
7200 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7201 for pc relative relocs.
7202 (elf_s390_relocate_section): Likewise.
7203 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7204 for pc relative relocs.
7205 (elf_s390_relocate_section): Likewise.
7206
de9811af
L
72072004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7208
7209 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7210 count_dyn_reloc.
7211
ac33696c
L
72122004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7213
7214 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7215 field to track if a relocation is against readonly section.
7216 (count_dyn_reloc): Take a new argument for rent->reltext.
7217 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7218 (get_reloc_section): Don't set ia64_info->reltext here.
7219 (allocate_dynrel_entries): Set ia64_info->reltext here.
7220
072c8903
AO
72212004-02-24 Alexandre Oliva <aoliva@redhat.com>
7222
7223 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7224 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7225 function's descriptor to symbol+offset, and map local undefweak
7226 symbol to NULL function descriptor.
7227 (elf32_frv_relocate_section): Likewise.
7228
aca305d9
NC
72292004-02-23 Mark Kettenis <kettenis@gnu.org>
7230
7231 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7232 M_X86_64_NETBSD.
7233 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7234 (netbsd_core_file_p): Set architecture from machine ID for
7235 selected machines.
7236
646411fb
JJ
72372004-02-23 Jakub Jelinek <jakub@redhat.com>
7238
7239 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7240 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7241
1de1a317
L
72422004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7243
7244 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7245 symbols with non-default visibility.
7246
3c9d0484
DS
72472004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7248
7249 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7250 IMAGE_SCN_MEM_WRITE on known sections only.
7251
a876ecf9
JJ
72522004-02-20 Jakub Jelinek <jakub@redhat.com>
7253
7254 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7255 symbols used in PIE relocs.
7256
a8a6d7ce
JJ
72572004-02-19 Jakub Jelinek <jakub@redhat.com>
7258
7259 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7260 .plt sh_entsize.
7261
d080fcd2
DJ
72622004-02-18 Daniel Jacobowitz <drow@mvista.com>
7263
7264 * configure.in: Update version to 2.15.90.
7265 * configure: Regenerate.
7266
d25aed71 72672004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 7268 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
7269
7270 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7271 _bfd_elf_symbol_refs_local_p to decide whether to decay
7272 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7273 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7274 relocs if the symbol wasn't defined by a regular object file.
7275 Don't check the symbol's dynindx.
7276
d7ce59e3
AC
72772004-02-16 Andrew Cagney <cagney@redhat.com>
7278
7279 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7280 @bfd_file_ptr@.
7281 * bfd-in2.h: Re-generate.
7282
ca0b7686
AC
72832004-02-14 Andrew Cagney <cagney@redhat.com>
7284
7285 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7286 _LARGEFILE64_SOURCE.
7287
340b6d91
AC
72882004-02-13 Andrew Cagney <cagney@redhat.com>
7289
7290 * elf.c (vma_page_aligned_bias): New function.
7291 (assign_file_positions_except_relocs)
7292 (assign_file_positions_for_segments): Replace broken modulo
7293 arithmetic with call to vma_page_aligned_bias.
7294
1012372a
AC
72952004-02-11 Andrew Cagney <cagney@redhat.com>
7296
7c192733
AC
7297 * bfd-in.h: Update copyright.
7298 (bfd_tell): Change return type to file_ptr.
7299 * bfd-in2.h: Re-generate.
7300 * cache.c: Update copyright.
7301 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7302 parameter.
7303 (close_one): Use real_ftell.
7304 * bfdio.c: Update copyright.
7305 (real_ftell, real_fseek): New functions.
7306 (bfd_tell): Use real_fseek and real_ftell, change return type to
7307 file_ptr.
7308 (bfd_seek): Use real_ftell and real_fseek, change type of
7309 file_position to a file_ptr.
7310 * libbfd-in.h: Update copyright.
7311 (real_ftell, real_fseek): Declare.
7312 * libbfd.h: Re-generate.
7313
1012372a
AC
7314 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7315 fseeko and fseeko64. Determine bfd_file_ptr.
7316 * configure: Re-generate.
c1ea0c09 7317 * config.in: Re-generate.
c1b954e2 7318
3255318a
NC
73192004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7320
7321 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7322 * elf32-h8300.c: Likewise.
7323
0d5f9994
NC
73242004-02-09 Christian Vogel <vogelchr@vogel.cx>
7325 Nick Clifton <nickc@redhat.com>
7326
7327 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7328 GOT entries with no associated GOT subsection.
7329
174fd7f9
RS
73302004-02-09 Richard Sandiford <rsandifo@redhat.com>
7331
7332 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7333 * elf.c (swap_out_syms): Use it to decide whether local section
7334 symbols should be named.
7335 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7336 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7337 (elf_backend_name_local_section_symbols): Define.
7338 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7339
03609792
L
73402004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7341
7342 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7343 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7344 finalize pass.
7345
ea01195e
AO
73462004-01-30 Alexandre Oliva <aoliva@redhat.com>
7347
7348 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7349 to bfd_link_hash_entry passed by reference to
7350 _bfd_generic_link_add_one_symbol.
7351
838e70c5
L
73522004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7353
7354 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7355 relocations against dynamic symbols.
7356
4f199be3
DJ
73572004-01-23 Daniel Jacobowitz <drow@mvista.com>
7358
7359 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7360 change.
7361
28d39d1a
NC
73622004-01-21 Tom Rix <tcrix@worldnet.att.net>
7363
7364 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7365 * bfd-in2.h, libbfd.h: Rebuilt.
7366
66bed356
DS
73672004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7368
7369 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7370 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7371 flag has been cleared.
7372
7e89635a
KH
73732004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7374
7375 * coff-h8300.c: Add and adjust comments about relaxation.
7376 * elf32-h8300.c: Likewise.
7377
e804e836
KH
73782004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7379
7380 * coff-h8300.c: Fix comment typos.
7381 * elf32-h8300.c: Likewise.
7382
630a7b0a
KH
73832004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7384
7385 * coff-h8300.c: Add comments about relaxation.
7386 * elf32-h8300.c: Likewise.
7387
f8b73030
MR
73882004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7389
7390 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7391 throughout.
7392 * aclocal.m4: Regenerate.
7393 * configure: Regenerate.
7394
32159579
ILT
73952004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7396
7397 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7398 mips_elf64_rtype_to_howto instead of using howto_table.
7399
c84cd8ee
DJ
74002004-01-13 Daniel Jacobowitz <drow@mvista.com>
7401
7402 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7403 the .plt section.
7404 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7405 relocs which would not use the PLT.
7406
680a3378
AM
74072004-01-13 Alan Modra <amodra@bigpond.net.au>
7408
7409 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7410 (ppc64_elf_gc_sweep_hook): Likewise.
7411 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7412
faca21e5
NC
74132004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7414
7415 Adds linker relaxation support for bit manipulation insns like
680a3378 7416 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 7417 bst, btst, bxor.
680a3378 7418 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 7419 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 7420 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
7421 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7422
818a27ac
AM
74232004-01-12 Alan Modra <amodra@bigpond.net.au>
7424
7425 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7426
96ef1419
KH
74272004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7428
7429 * elf32-h8300.c: Fix formatting.
7430
babfd660
KH
74312004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7432
7433 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7434 dynamic object is present. Declare r_symndx and h in an inner
7435 scope.
7436 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7437
7359ea65
DJ
74382004-01-09 Daniel Jacobowitz <drow@mvista.com>
7439
7440 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7441 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7442 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7443 identically. Do not emit PC24 relocations for shared libraries.
7444 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7445 identically. Don't adjust pc_count.
7446 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7447 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7448 adjust count for branch relocations.
7449 (allocate_dynrelocs): Correct typo in call to
7450 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7451 PC24 or PLT32 relocs when linking.
7452
44e88952
NC
74532004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7454
7455 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7456 relocation howto with ARM_26 one for consistency.
7457 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7458 that will be converted to ARM_26D ones, since we always want 'done'
7459 relocations to be reflected in section's data.
7460 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7461 offset.
7462 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7463 requested.
7464
1e7fef1d
NC
74652004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7466
7467 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7468 are not partial_inplace during a relocatable link.
7469
4f075348
KH
74702004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7471
babfd660 7472 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
7473 if no dynamic object is present. Declare r_symndx and h in an
7474 inner scope.
7475
de0d9f33
L
74762004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7477
7478 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7479 trampoline if it is known out of range.
7480
51532845
AO
74812004-01-06 Alexandre Oliva <aoliva@redhat.com>
7482
7483 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7484 * elf32-frv.c (_frv_osec_readonly_p): New.
7485 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7486 undefweak symbol.
7487 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7488 (elf32_frv_relocate_section): Likewise. Error out if attempting
7489 to emit rofixups or dynamic relocs in read-only segments. Use
7490 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7491 dynamic relocations.
7492 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7493 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7494 relocations or fixups involving merged sections correctly. Avoid
7495 crash when undefined symbol is referenced by R_FRV_32 or
7496 R_FRV_FUNCDESC_VALUE.
7497 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7498 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7499 input section holding local symbol to addend of R_FRV_32 or
7500 R_FRV_FUNCDESC_VALUE dynamic relocation.
7501 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7502 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7503 (elf32_frv_always_size_sections): Don't store pointer to
7504 __stacksize symbol in sec_info.
7505 (elf32_frv_modify_segment_map): Look it up here.
7506 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7507 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7508 of the lazy PLT entry, not only its offset, as the low word of a
7509 function descriptor.
7510 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7511 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7512 if a hash table entry already exists but is not a definition.
7513 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7514 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7515 (_frv_add_rofixup): Don't inline.
7516 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7517 for undefweak symbols.
7518 (elf32_frv_relocate_section): Avoid crash while computing
7519 relocation when linking with shared library. Only emit rofixups
7520 and dynamic relocations for alloc&load sections. Mark binaries
7521 with inter-segment relocations for relocation as a unit.
7522 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7523 (DEFAULT_STACK_SIZE): New.
7524 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7525 emit rofixups or dynamic relocs when linking dynamic non-PIE
7526 executables.
7527 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7528 shared libs too. Reserve the last entry for the GOT pointer.
7529 (elf32_frv_finish_dynamic_sections): Emit it.
7530 (elf32_frv_always_size_sections): New.
7531 (elf32_frv_modify_segment_map): New.
7532 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7533 sections.
7534 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7535 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7536 (elf_backend_always_size_sections): New.
7537 (elf_backend_modify_segment_map): New.
7538 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7539 * config.bfd: Added frv-*-*linux*.
7540 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7541 ABS section, instead of crashing.
7542 (elf32_frv_relocate_section): Don't crash before warning about
7543 different segments in non-PIC relocation.
7544 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7545 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7546 relocs to undefweak symbols.
7547 (elf32_frv_relocate_section): Ditto for undefined symbols.
7548 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7549 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7550 gotfixup section was created.
7551 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7552 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7553 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7554 complain_overflow_signed.
7555 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7556 have not been allocated.
7557 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7558 privfd only if dynamic sections were created.
7559 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7560 for GPREL relocs. When linking relocatable FDPIC executables,
7561 emit warnings for relocations that would be illegal on PIE or
7562 shared libraries. Emit rofixup for R_FRV_32 only if input object
7563 is not FDPIC.
7564 (_frv_create_got_section): Define _gp symbol in the rofixup
7565 section.
7566 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7567 dynamic sections missing, error out requesting -melf32frvfd.
7568 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7569 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7570 computation of addends from section and global or local symbol
7571 value. Change return type to bfd_boolean, and return a failure if
7572 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7573 nonzero addend is required.
7574 (elf32_frv_relocate_section): Likewise. Print error for
7575 unsupported nonzero addends.
7576 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7577 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7578 force everything local.
7579 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7580 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7581 (frv_gotfixup_section): New.
7582 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7583 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7584 and relocsfdv.
7585 (_frv_add_rofixup): New.
7586 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7587 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7588 improve some ugly conditions.
7589 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7590 relocations in fdpic.
7591 (_frv_create_got_section): Create .rofixup.got section.
7592 (struct _frv_dynamic_got_info): Added fixups.
7593 (_frv_count_got_plt_entries): Account in-GOT relocations into
7594 relocs32, relocsfd and relocsfdv. Account them into relocs or
7595 fixups, as appropriate.
7596 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7597 sizing of gotrel.
7598 (elf32_frv_finish_dynamic_sections): Verify that the right number
7599 of relocations and fixups was generated.
7600 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7601 relocsfdv.
7602 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7603 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7604 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7605 descriptor of a (formerly-)global symbol is local.
7606 (struct frv_pic_relocs_info): Adjust comments.
7607 (_frv_emit_got_relocs_plt_entries): Adjust.
7608 (elf32_frv_relocate_section): Likewise.
7609 (_frv_count_got_plt_entries): Likewise.
7610 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7611 symbol's value to addend in the common preamble. Decay dynamic
7612 symbols to section+offset if they bind or call locally, for GOT
7613 and FUNCDESC_VALUE, respectively.
7614 (elf32_frv_relocate_section): Likewise.
7615 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7616 internal or hidden visibility.
7617 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7618 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7619 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7620 (elf32_frv_relocate_section): Pass relocation addend in. Use
7621 original relocation addend to look up the got relocs/plt entries
7622 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7623 processing relocations that reference .scommon symbols.
7624 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
7625 Introduce support for dynamic linking.
7626 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7627 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7628 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7629 (frv_reloc_type_lookup): Return REL howtos for executables and
7630 dynamic libraries.
7631 (frv_info_to_howto_rel): New.
7632 (struct frv_elf_link_hash_table): New.
7633 (frv_hash_table, frv_got_section, frv_gotrel_section,
7634 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7635 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7636 (frv_elf_link_hash_table_create): New.
7637 (struct frv_pic_relocs_info): New.
7638 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7639 (frv_pic_relocs_info_find): New.
7640 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7641 New.
7642 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7643 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7644 (_frv_emit_got_relocs_plt_entries): New.
7645 (elf32_frv_relocate_section): Add support for dynamic linking.
7646 Handle new relocations.
7647 (_frv_create_got_section): New.
7648 (elf32_frv_create_dynamic_sections): New.
7649 (ELF_DYNAMIC_INTERPRETER): New.
7650 (struct _frv_dynamic_got_info): New.
7651 (_frv_count_got_plt_entries): New.
7652 (struct _frv_dynamic_got_plt_info): New.
7653 (_frv_compute_got_alloc_data): New.
7654 (_frv_get_got_entry, _frv_get_fd_entry): New.
7655 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7656 (_frv_resolve_final_relocs_info): New.
7657 (elf32_frv_size_dynamic_sections): New.
7658 (elf32_frv_finish_dynamic_sections): New.
7659 (elf32_frv_adjust_dynamic_symbol): New.
7660 (elf32_frv_finish_dynamic_symbol): New.
7661 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7662 whole thing works.
7663 (elf_info_to_howto_rel): Define.
7664 (bfd_elf32_bfd_link_hash_table_create): Define.
7665 (elf_backend_create_dynamic_sections): Define.
7666 (elf_backend_adjust_dynamic_symbol): Define.
7667 (elf_backend_size_dynamic_sections): Define.
7668 (elf_backend_finish_dynamic_symbol): Define.
7669 (elf_backend_finish_dynamic_sections): Define.
7670 (elf_backend_want_got_sym): Define.
7671 (elf_backend_got_header_size): Define.
7672 (elf_backend_want_got_plt): Define.
7673 (elf_backend_plt_readonly): Define.
7674 (elf_backend_want_plt_sym): Define.
7675 (elf_backend_plt_header_size): Define.
7676 (elf_backend_may_use_rel_p): Define.
7677 (elf_backend_may_use_rela_p): Define.
7678 (elf_backend_default_use_rela_p): Define.
7679 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
7680 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7681 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7682 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7683 (frv_reloc_map): Map the corresponding BFD relocs to them.
7684 (frv_reloc_type_lookup): ... and back to BFD relocs.
7685 * reloc.c: New relocs.
7686 * bfd-in2.h, libbfd.h: Rebuilt.
7687 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
7688 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7689 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7690 R_FRV_FUNCDESC_GOTLO): New.
7691 (frv_reloc_map): Map the corresponding BFD relocs to them.
7692 (frv_reloc_type_lookup): ... and back to BFD relocs.
7693 * reloc.c: New relocs.
7694 * bfd-in2.h, libbfd.h: Rebuilt.
7695
4301eeb1
MR
76962004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7697
7698 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7699 targets to support pages of up to 64kB.
7700 (elf32_bed): Redefine to get a separate backend data structure for
7701 traditional targets.
7702 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7703 targets to support pages of up to 64kB.
7704 (elf64_bed): Redefine to get a separate backend data structure for
7705 traditional targets.
7706 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7707 targets to support pages of up to 64kB.
7708 (elf32_bed): Redefine to get a separate backend data structure for
7709 traditional targets.
7710
0647ed71
MK
77112004-01-04 Mark Kettenis <kettenis@gnu.org>
7712
7713 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7714
61adc1a4
NC
77152004-01-02 Mark Kettenis <kettenis@gnu.org>
7716
7717 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7718 (elf_i386_grok_psinfo): Likewise.
7719
b50c15dc
NC
77202004-01-02 Bernardo Innocenti <bernie@develer.com>
7721
7722 * config.bfd: Add m68k-uClinux target.
7723
2627de83
AM
77242004-01-01 Grant Edwards <grante@visi.com>
7725
7726 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7727 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7728 (elf32_h8_gc_sweep_hook): New function.
7729 (elf_backend_gc_mark_hook): Define.
7730 (elf_backend_gc_sweep_hook): Define.
7731 (elf_backend_can_gc_sections): Define.
7732
c9e214e5 7733For older changes see ChangeLog-0203
56882138
AM
7734\f
7735Local Variables:
7736mode: change-log
7737left-margin: 8
7738fill-column: 74
7739version-control: never
7740End:
This page took 0.699859 seconds and 4 git commands to generate.