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