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