* elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
c5211a54
RS
12005-08-01 Richard Sandiford <richard@codesourcery.com>
2
3 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
4 of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
5
1b9ee6a2
DD
62005-07-30 David Daney <ddaney@avtrex.com>
7
8 * elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
9
eedecc07
DD
102005-07-29 David Daney <ddaney@avtrex.com>
11
12 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp
13 if it is in the *ABS* section.
14
e9f89963
PB
152005-07-29 Paul Brook <paul@codesourcery.com>
16
17 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
18 * bfd-in2.h: Regenerate.
19 * libbfd.h: Regenerate.
20
92e90b6e
PB
212005-07-29 Paul Brook <paul@codesourcery.com>
22
23 * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
24 * bfd-in2.h: Regeenrate.
25 * libbfd.h: Regenerate.
26
0facbdf5
NC
272005-07-29 Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
28
29 * peXXigen.c (pe_print_edata): Compute the size of the export
30 table from the size field in the DataDictionary and not the size
31 of the section. Some linkers embed the export table inside a
32 larger section.
33
8a696751
AM
342005-07-29 Alan Modra <amodra@bigpond.net.au>
35
36 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
37 (enum action_discarded): Move from..
38 * elflink.c (enum action_discarded): ..here.
39 (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
40 Remove target specific section checks.
41 (elf_link_input_bfd): Adjust.
42 * elfxx-target.h (elf_backend_action_discarded): Define.
43 (elfNN_bed): Init new field.
44 * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
45 * bfd-in2.h: Regenerate.
46 * elf-hppa.h (elf_hppa_action_discarded): New function.
47 * elf32-hppa.c (elf_backend_action_discarded): Define.
48 * elf64-hppa.c (elf_backend_action_discarded): Define.
49 * elf32-ppc.c (ppc_elf_action_discarded): New function.
50 (elf_backend_action_discarded): Define.
51
2f5028a7
AM
522005-07-27 Alan Modra <amodra@bigpond.net.au>
53
54 * elflink.c (fix_syms): Handle symbols defined in input sections.
55
a33d77bc
JB
562005-07-27 Jan Beulich <jbeulich@novell.com>
57
58 * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
59 (elf64_x86_64_info_to_howto): Use them.
60
f41d945b
AM
612005-07-27 Alan Modra <amodra@bigpond.net.au>
62
63 * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
64 regardless of strength of previous definition.
65
87538722
AM
662005-07-26 Alan Modra <amodra@bigpond.net.au>
67
68 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
69 (bfd_elf_gc_sections): Allow -gc-sections when -shared.
70 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
71
9e8cc8b4
AM
722005-07-26 Alan Modra <amodra@bigpond.net.au>
73
74 * elflink.c (elf_gc_sweep): Move gcc_except_table code..
75 (bfd_elf_gc_sections): ..to here.
76
fd54057a
DD
772005-07-25 DJ Delorie <dj@redhat.com>
78
79 * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
80 * libbfd.h: Regenerate.
81 * bfd-in2.h: Regenerate.
82
83 * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
84 R_M32C_HI8, R_M32C_HI16.
85 (m32c_reloc_map): Likewise.
86 (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
87
3b22753a
L
882005-07-25 Jan Hubicka <jh@suse.cz>
89 H.J. Lu <hongjiu.lu@intel.com>
90
91 * elf-bfd.h (_bfd_elf_large_com_section): New.
92 * elf.c (_bfd_elf_large_com_section): New. Defined.
93
94 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
95 (elf64_x86_64_elf_section_from_bfd_section): New.
96 (elf64_x86_64_symbol_processing): New.
97 (elf64_x86_64_common_definition): New.
98 (elf64_x86_64_common_section_index): New.
99 (elf64_x86_64_common_section): New.
100 (elf64_x86_64_merge_symbol): New.
101 (elf64_x86_64_additional_program_headers): New.
102 (elf64_x86_64_special_sections): New.
103 (elf_backend_section_from_bfd_section): New. Defined.
104 (elf_backend_add_symbol_hook): Likewise.
105 (elf_backend_common_section_index): Likewise.
106 (elf_backend_common_section): Likewise.
107 (elf_backend_common_definition): Likewise.
108 (elf_backend_merge_symbol): Likewise.
109 (elf_backend_special_sections): Likewise.
110 (elf_backend_additional_program_headers): Likewise.
111
a4d8e49b
L
1122005-07-25 H.J. Lu <hongjiu.lu@intel.com>
113
114 * elf-bfd.h (elf_backend_data): Add common_definition,
115 common_section_index, common_section, and merge_symbol.
116 (_bfd_elf_common_definition): New.
117 (_bfd_elf_common_section_index): New.
118 (_bfd_elf_common_section): New.
119
120 * elf.c (elf_fake_sections): Don't clear sh_flags.
121
122 * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
123 if it is available.
124 (is_global_data_symbol_definition): Call backend
125 common_definition instead of checking SHN_COMMON.
126 (elf_link_add_object_symbols): Likewise.
127 (elf_link_output_extsym): Call backend common_section_index
128 for common section index.
129 (_bfd_elf_common_definition): New.
130 (_bfd_elf_common_section_index): New.
131 (_bfd_elf_common_section): New.
132
133 * elfxx-target.h (elf_backend_common_definition): New.
134 (elf_backend_common_section_index): New.
135 (elf_backend_common_section): New.
136 (elf_backend_merge_symbol): New.
137 (elfNN_bed): Initialize common_definition, common_section_index,
138 common_section, and merge_symbol.
139
140 * section.c (BFD_FAKE_SECTION): New.
141 (STD_SECTION): Use it.
142 * bfd-in2.h: Regenerated.
143
58ac56d0
L
1442005-07-23 Olaf Hering <olh@suse.de>
145
146 * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
147 callback.
148
9f971fcb
NC
1492005-07-21 Ralf Corsepius <ralf.corsepius@rtems.org>
150
151 * config.bfd: Remove i[3-7]86-*-rtemself*.
152 Remove sparc-*-rtemself*.
153
a9b7b174
NC
1542005-07-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
155
156 * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
157 R_M32R_REL32.
158
240a3425
BE
1592005-07-21 Ben Elliston <bje@gnu.org>
160
161 * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
162 (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
163 (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
164 (cf-m68klynx.lo, m68klynx.lo): Remove targets.
165 * Makefile.in: Regenerate.
166 * cf-m68klynx.c: Remove.
167 * m68klynx.c: Likewise.
168 * configure.in (m68klynx_aout_vec): Remove vector.
169 (m68klynx_coff_vec): Likewise.
170 * configure: Regenerate.
171 * targets.c (m68klynx_aout_vec): Remove extern.
172 (m68klynx_coff_vec): Likewise.
173 (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
174 * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
175
157e7bd1
NC
1762005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
177
178 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
179 (m32r_reloc_map): Likewise.
180 (m32r_elf_relocate_section): Likewise.
181 (m32r_elf_gc_sweep_hook): Likewise.
182 (m32r_elf_check_relocs): Likewise.
183
85da3a56
NC
1842005-07-18 Nick Clifton <nickc@redhat.com>
185
186 * reloc.c: Add M32C and MS1 relocs.
187 * bfd-in2.h: Regenerate.
188 * libbfd.h: Regenerate.
189
1902005-07-18 Nick Clifton <nickc@redhat.com>
191
192 * config.bfd: Move m32c entry to correct location.
9e8cc8b4
AM
193 * archures.c: Likewise.
194 * configure.in: Likewise.
195 * configure: Regenerate.
196 * targets.c: Move ms1 vector to correct location.
85da3a56 197
ac2aa337
JB
1982005-07-18 Jan Beulich <jbeulich@novell.com>
199
200 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
201 for R_386_PC16.
202 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
203 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
204
9a20ed6e 2052005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
cc86ff91
EB
206
207 PR ld/1021
208 PR ld/1031
209 * elflink.c (elf_link_add_object_symbols): Also append the version
210 name to non-hidden absolute symbols that are functions.
211
42fa7765
AM
2122005-07-16 Alan Modra <amodra@bigpond.net.au>
213
214 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
215 for zero size sections. Don't set .sbss syms here.
216 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
217
0f82ff91
AM
2182005-07-16 Alan Modra <amodra@bigpond.net.au>
219
220 * Makefile.am: Run "make dep-am".
221 * Makefile.in: Regenerate.
222
2db662be
BW
2232005-07-15 Bob Wilson <bob.wilson@acm.org>
224
225 * elf32-xtensa.c (vsprint_msg): Add prototype.
226 (build_encoding_error_message): Delete. Code moved into....
227 (elf_xtensa_do_reloc): ....here, and changed to give better
228 error messages for out of range literals.
229
eaae8ded
AM
2302005-07-15 Alan Modra <amodra@bigpond.net.au>
231
232 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
233 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
234 defined in output sections. Call bfd_elf_record_link_assignment.
235 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
236 * bfd-in2.h: Regenerate.
237
49f58d10
JB
2382005-07-14 Jim Blandy <jimb@redhat.com>
239
240 Add support for m32c-*-elf (Renesas m32c and m16c).
241 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
242 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
243 (BFD32_BACKENDS): Add elf32-m32c.lo.
244 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
245 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
246 * Makefile.in: Regenerated.
247 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
248 arch and mach codes.
249 (bfd_m32c_arch): New arch info object.
250 (bfd_archures_list): List bfd_m32c_arch.
251 * bfd-in2.h: Regenerated.
252 * config.bfd: Add case for the m32c.
253 * configure.in: Add case for the m32c.
254 * configure: Regenerated.
255 * cpu-m32c.c, elf32-m32c.c: New files.
256 * libbfd.h: Regenerated.
257 * targets.c (bfd_elf32_m32c_vec): Declare.
258 (_bfd_target_vector): List bfd_elf32_m32c_vec.
259
a3c2b96a
AM
2602005-07-14 Alan Modra <amodra@bigpond.net.au>
261
262 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
263 (_bfd_elf_provide_section_bound_symbols): Remove param name.
264 Formatting.
265 * bfd-in2.h: Regenerate.
266 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
267 (_bfd_elf_provide_symbol): Formatting.
268 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
269 create section relative syms.
270 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
271 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
272 _bfd_elf_provide_section_bound_symbols.
273 * reloc.c (bfd_mark_used_section): Delete.
274 (bfd_generic_gc_sections): Don't call the above.
275
1787c340
NC
2762005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
277
cb4aa473 278 PR 1063
1787c340
NC
279 * cache.c (bfd_last_cache): Initialise to NULL.
280
15ac1d4f
NC
2812005-07-14 Daniel Marques <marques@cs.cornell.edu>
282 Nick Clifton <nickc@redhat.com>
283
284 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
285 Alpha binaries and issue a helpful error message.
286 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
287 symbol index to 15 to allow for binaries produced by DEC
a3c2b96a 288 compilers.
15ac1d4f 289
d4909375
SE
2902005-07-13 Steve Ellcey <sje@cup.hp.com>
291
292 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
293
15b552e9
AM
2942005-07-12 Alan Modra <amodra@bigpond.net.au>
295
296 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
297 when !can_plt_call.
298
70961b9d
AM
2992005-07-12 Alan Modra <amodra@bigpond.net.au>
300
301 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
302
632a56fd
AM
3032005-07-12 Alan Modra <amodra@bigpond.net.au>
304
305 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
306
49ff44d6
L
3072005-07-11 H.J. Lu <hongjiu.lu@intel.com>
308
309 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
310 change.
311
0af4cd7c
PK
3122005-07-08 Paul Koning <pkoning@equallogic.com>
313
314 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
315 where addresses are sign extended.
316
7e4e2059
NC
3172005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
318
319 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
a3c2b96a 320 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
7e4e2059
NC
321 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
322 sparc*-*-rtemsaout* as removed
323
c456f082
AM
3242005-07-08 Alan Modra <amodra@bigpond.net.au>
325
326 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
327 of the usual sections are found.
328 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
329 Strip .dynbss if it is zero size.
330 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
331 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
332 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
333 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
334 .dynsbss.
335 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
336 when it is zero size.
337 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
338 of .dynbss and zero size sections.
339 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
340 it is zero size.
341 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
342 .dynbss if zero size.
343 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
344 too.
345 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
346 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
347 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
348 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
349 .plt.* and .got.plt.* if zero size.
350 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
351 .got* and .dynbss if zero size.
352 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
353 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
354 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
355 reloc section.
356 (create_got_section): Always create new .got and .rela.got sections.
357 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
358 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
359 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
360 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
361 dynamic bss sections correctly.
362 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
363 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
364 .dynbss if zero size.
365
6c98dd1e
BE
3662005-07-08 Ben Elliston <bje@au.ibm.com>
367
368 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
369 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
370
29ef7005
L
3712005-07-07 H.J. Lu <hongjiu.lu@intel.com>
372
373 * elf-bfd.h (elf_backend_data): Add special_sections.
374
375 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
376 first.
377
378 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
379 (elf_backend_special_sections): New. Defined.
380 * elf32-m32r.c: Likewise.
381 * elf32-m68hc11.c: Likewise.
382 * elf32-m68hc12.c: Likewise.
383 * elf32-mcore.c: Likewise.
384 * elf32-sh64.c: Likewise.
385 * elf32-v850.c: Likewise.
386 * elf32-xtensa.c: Likewise.
387 * elf64-alpha.c: Likewise.
388 * elf64-hppa.c: Likewise.
389 * elf64-ppc.c: Likewise.
390 * elf64-sh64.c: Likewise.
391 * elfxx-ia64.c: Likewise.
392 * elfxx-mips.c: Likewise.
393 * elfxx-mips.h: Likewise.
394
395 * elfxx-target.h (elf_backend_special_sections): New.
396 (elfNN_bed): Initialize special_sections.
397
074f5109
BW
3982005-07-07 Bob Wilson <bob.wilson@acm.org>
399
400 * xtensa-modules.c: Update tables with Xtensa MMU features.
401
0fd3a477
JW
4022005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
403
404 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
405 format bugs.
406 * vms.h (_bfd_vms_debug): Add format attribute.
407 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
408
9968d831
L
4092005-07-07 H.J. Lu <hongjiu.lu@intel.com>
410
411 PR 975
412 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
413 symbol with default visibility is local.
414
3b1fcf96
BE
4152005-07-07 Ben Elliston <bje@gnu.org>
416
417 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
418
5cf2e3f0
L
4192005-07-06 H.J. Lu <hongjiu.lu@intel.com>
420
421 * dwarf2.c (varinfo): Add addr.
422 (lookup_symbol_in_variable_table): Also check addr.
423 (scan_unit_for_symbols): Set addr for variable.
424 (comp_unit_find_line): Updated.
425
0adc9281
NC
4262005-07-06 Nick Clifton <nickc@redhat.com>
427
428 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
429 message if an unknown reloc is encountered.
430 (alpha_relocate_section): Likewise.
431
432 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
433 with a missing howto field.
434
cfbe541f
AM
4352005-07-06 Alan Modra <amodra@bigpond.net.au>
436
437 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
438 elfxx-sparc.c.
439
d5e3d971
PB
4402005-07-05 Paul Brook <paul@codesourcery.com>
441
442 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
443 (ppc_elf_vxworks_get_sec_type_attr): New function.
444 (elf_backend_special_sections): Remove vxwords definition.
445 (elf_backend_get_sec_type_attr): Define for vxworks.
446
3ec2b351
NC
4472005-07-05 Nick Clifton <nickc@redhat.com>
448
449 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
450
d5e3d971 4512005-07-05 Paul Brook <paul@codesourcery.com>
9d8504b1
PB
452
453 * config.bfd: Add separate case for ppc-vxworks.
454 * configure: Regenerate.
455 * configure.in: Include elf-vxworks.lo on ppc targets.
456 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
457 .rela.plt.unloaded.
458 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
459 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
460 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
461 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
462 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
463 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
464 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
465 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
466 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
467 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
468 (ppc_elf_create_got): Create .got.plt for VxWorks.
469 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
470 section for VxWorks.
471 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
472 (allocate_got): VxWorks does not need a got header.
473 (allocate_dynrelocs): Handle VxWorks plt format.
474 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
475 VxWorks. Handle VxWorks plt/got.
476 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
477 (ppc_elf_vxworks_special_sections): New.
478 (ppc_elf_vxworks_link_hash_table_create,
479 ppc_elf_vxworks_add_symbol_hook,
480 elf_i386_vxworks_link_output_symbol_hook,
481 ppc_elf_vxworks_final_write_processing): New functions.
482 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
483 (_bfd_target_vector): Use it.
484
c6c60d09
JJ
4852005-07-05 Jakub Jelinek <jakub@redhat.com>
486
9e492e05
JJ
487 * libbfd-in.h (struct artdata): Add extended_names_size field.
488 * libbfd.h: Rebuilt.
489 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
490 allocated object by bfd_zalloc.
491 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
492 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
493 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
494 (get_extended_arelt_filename): Fail if index is bigger or equal to
495 extended_names_size.
496 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
497 get_extended_arelt_filename already did that.
498 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
499 Allocate one extra byte and clear it, in case extended names table
500 is not terminated.
501
d0fb9a8d
JJ
502 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
503 bfd_zalloc2): New prototypes.
504 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
505 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
506 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
507 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
508 elf_map_symbols, map_sections_to_segments,
509 assign_file_positions_for_segments, copy_private_bfd_data,
510 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
511 where appropriate.
512 * bfd-in2.h: Rebuilt.
513 * libbfd.h: Rebuilt.
514
515 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
516 verdef or verneed section.
517 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
518 verneed sections gracefully.
519 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
520 bogus relocation values.
521 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
522 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
523 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
524 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
525 * elfxx-ia64.c (lookup_howto): Likewise.
526
c6c60d09
JJ
527 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
528 the end of strtab and clear it.
529 (elf_read): Remove.
530
dcd4b381
NC
5312005-07-05 Nick Clifton <nickc@redhat.com>
532
533 * po/vi.po: New Vietnamese translation.
534 * configure.in (ALL_LINGUAS): Add vi.
535 * configure: Regenerate.
536
8532796c
NC
5372005-07-05 Peter S. Mazinger <ps.m@gmx.net>
538
539 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
540 touchup logic like i386/ppc.
541
b35d266b
AM
5422005-07-05 Alan Modra <amodra@bigpond.net.au>
543
544 * elf.c (special_sections): Move const qualifier.
545 (special_sections_b..special_sections_t): Likewise.
546 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
547 const.
548 (elf32_arm_symbian_special_sections): Move const qualifier.
549 * elf32-m32r.c: Similarly.
550 * elf32-m68hc11.c: Similarly.
551 * elf32-m68hc12.c: Similarly.
552 * elf32-mcore.c: Similarly.
553 * elf32-ppc.c: Similarly.
554 * elf32-sh64.c: Similarly.
555 * elf32-v850.c: Similarly.
556 * elf32-xtensa.c: Similarly.
557 * elf64-alpha.c: Similarly.
558 * elf64-hppa.c: Similarly.
559 * elf64-ppc.c: Similarly.
560 * elf64-sh64.c: Similarly.
561 * elfxx-ia64.c: Similarly.
562 * elfxx-mips.c: Similarly.
563
80447b21
NC
5642005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
565
566 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
567 info->executable instead of !info->shared where appropriate.
568
540b09cb
AM
5692005-07-04 Alan Modra <amodra@bigpond.net.au>
570
571 PR 1042
572 * elf.c (assign_file_positions_for_segments): Remove excluded
573 sections from the segment map.
574
551b43fd
AM
5752005-07-04 Alan Modra <amodra@bigpond.net.au>
576
577 PR 1004
578 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
579 special_sections.
580 (_bfd_elf_get_special_section): Declare.
581 (bfd_elf_special_section): Update prototype.
582 * elf.c (special_sections): Remove unused outer entries.
583 (get_special_section): Delete.
584 (_bfd_elf_get_special_section): New function.
585 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
586 special_sections indexing.
587 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
588 * elf32-arm.c (symbian_special_sections_d): Delete.
589 (symbian_special_sections_g, symbian_special_sections_h): Delete.
590 (symbian_special_sections_i, symbian_special_sections_f): Delete.
591 (symbian_special_sections_p): Delete.
592 (elf32_arm_symbian_special_sections): Merge above to here.
593 (elf32_arm_symbian_get_sec_type_attr): New function.
594 (elf_backend_special_sections): Don't define.
595 (elf_backend_get_sec_type_attr): Define.
596 * elf32-m32r.c: Similarly to elf32-arm.c.
597 * elf32-m68hc11.c: Likewise.
598 * elf32-m68hc12.c: Likewise.
599 * elf32-mcore.c: Likewise.
600 * elf32-sh64.c: Likewise.
601 * elf32-v850.c: Likewise.
602 * elf32-xtensa.c: Likewise.
603 * elf64-alpha.c: Likewise.
604 * elf64-hppa.c: Likewise.
605 * elf64-ppc.c: Likewise.
606 * elf64-sh64.c: Likewise.
607 * elfxx-ia64.c: Likewise.
608 * elfxx-mips.c: Likewise.
609 * elf32-ppc.c: Likewise.
610 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
611 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
612 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
613 (elf_backend_get_sec_type_attr): Define.
614 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
615 (elf_backend_special_sections): Don't define.
616 (elfNN_bed): Update.
617
47b0e7ad
NC
6182005-07-01 Nick Clifton <nickc@redhat.com>
619
620 * cpu-d10v.c: Update to ISO C90 style function declarations and
621 fix formatting.
622 * cpu-d30v.c: Likewsie.
623 * cpu-i370.c: Likewsie.
624 * cpu-xstormy16.c: Likewsie.
625 * elf32-arc.c: Likewsie.
626 * elf32-d10v.c: Likewsie.
627 * elf32-d30v.c: Likewsie.
628 * elf32-dlx.c: Likewsie.
629 * elf32-i370.c: Likewsie.
630 * elf32-i960.c: Likewsie.
631 * elf32-ip2k.c: Likewsie.
632 * elf32-m32r.c: Likewsie.
633 * elf32-mcore.c: Likewsie.
634 * elf32-openrisc.c: Likewsie.
635 * elf32-or32.c: Likewsie.
636 * elf32-pj.c: Likewsie.
637 * elf32-v850.c: Likewsie.
638 * elf32-xstormy16.c: Likewsie.
639
85d162e6
AM
6402005-07-01 Alan Modra <amodra@bigpond.net.au>
641
642 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
643 a new .got section.
644 (elf64_alpha_create_dynamic_sections): Always make new sections
645 by using bfd_make_section_anyway_with_flags. Check that .got not
646 already created.
647 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
648 instead.
649
b116d4a7
AM
6502005-06-30 Alan Modra <amodra@bigpond.net.au>
651
652 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
653 _SDA_BASE_ and _SDA2_BASE_ symbols.
654 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
655 sym if not def_regular.
656 (_bfd_elf_provide_section_bound_symbols): Similarly.
657
7f41b278
BE
6582005-06-30 Ben Elliston <bje@gnu.org>
659
660 * config.bfd: Mark as obsolete:
661 m68*-apollo-*
662 m68*-apple-aux*
663 m68*-bull-sysv*
664
39c2f51b
AM
6652005-06-29 Alan Modra <amodra@bigpond.net.au>
666
667 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
668 .eh_frame specially..
669 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
670 Don't recheck sections we have already marked.
671 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
672 * section.c (struct bfd_section): Add gc_mark_from_eh.
673 (STD_SECTION): Adjust.
674 * ecoff.c (bfd_debug_section): Adjust.
675 * bfd-in2.h: Regenerate.
676
e8aaee2a
AM
6772005-06-29 Alan Modra <amodra@bigpond.net.au>
678
679 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
680 not been processed by check_relocs.
681
3b2175db
PB
6822005-06-29 Paul Brook <paul@codesourcery.com>
683
684 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
685 * bfd-in2.h: Regenerate.
686 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
687 relative.
688 * elflink.c (bfd_elf_set_symbol): Add section argument.
689 (_bfd_elf_provide_symbol): Ditto.
690 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
691
a63e02c7
DA
6922005-06-27 Carlos O'Donell <carlos@systemhalted.org>
693
c456f082 694 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
a63e02c7
DA
695 Use bh_root, and hh.
696 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
697 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
698 (struct elf32_hppa_link_hash_table): Use etab and bstab.
699 (stub_hash_newfunc): Use hh.
700 (hppa_link_hash_newfunc): Use hsh_cache.
701 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
702 (elf32_hppa_link_hash_table_free): Use bstab.
703 (hppa_stub_name): Use eh.
704 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
705 (hppa_add_stub): Use bstab.
706 (hppa_type_of_stub): Use eh.
707 (hppa_build_one_stub): Use hh and bh_root.
708 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
709 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
710 (elf32_hppa_gc_sweep_hook): Use hdh_next.
711 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
712 (allocate_plt_static): Use etab.
713 (allocate_dynrelocs): Use etab, and hdh_next.
714 (readonly_dynrelocs): Use hdh_next.
715 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
716 (get_local_syms): Use eh, bstab, and hh.
717 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
718 (elf32_hppa_set_gp): Use etab.
719 (elf32_hppa_build_stubs): Use bstab.
720 (final_link_relocate): Use eh, bh_root.
721 (elf32_hppa_relocate_section): Use elf, etab.
722 (elf32_hppa_finish_dynamic_sections): Use etab.
723
5f1cb353
L
7242005-06-27 H.J. Lu <hongjiu.lu@intel.com>
725
726 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
727 the extra `;'.
728
875c0872
DA
7292005-06-21 Carlos O'Donell <carlos@systemhalted.org>
730
731 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
732 (hppa_stub_hash_entry): Define.
733 (stub_hash_newfunc): Rename variables.
734 (hppa_link_hash_newfunc): Likewise.
735 (elf32_hppa_link_hash_table_free): Likewise.
736 (hppa_stub_name): Likewise.
737 (hppa_get_stub_entry): Likewise.
738 (hppa_add_stub): Likewise.
739 (hppa_type_of_stub): Likewise.
740 (hppa_build_one_stub): Likewise.
741 (hppa_size_one_stub): Likewise.
742 (elf32_hppa_create_dynamic_sections): Likewise.
743 (elf32_hppa_copy_indirect_symbol): Likewise.
744 (elf32_hppa_check_relocs): Likewise.
745 (elf32_hppa_gc_mark_hook): Likewise.
746 (elf32_hppa_gc_sweep_hook): Likewise.
747 (elf32_hppa_grok_psinfo): Likewise.
748 (elf32_hppa_hide_symbol): Likewise.
749 (elf32_hppa_adjust_dynamic_symbol): Likewise.
750 (allocate_dynrelocs): Likewise.
751 (clobber_millicode_symbols): Likewise.
752 (readonly_dynrelocs): Likewise.
753 (elf32_hppa_size_dynamic_sections): Likewise.
754 (get_local_syms): Likewise.
755 (elf32_hppa_size_stubs): Likewise.
756 (hppa_record_segment_addr): Likewise.
757 (final_link_relocate): Likewise.
758 (elf32_hppa_relocate_section): Likewise.
759 (elf32_hppa_finish_dynamic_symbol): Likewise.
760
973a3492
L
7612005-06-20 H.J. Lu <hongjiu.lu@intel.com>
762
763 PR 1025
764 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
765 symbol.
766 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
767 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
768 * elf32-cris.c (cris_elf_check_relocs): Likewise.
769 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
770 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
771 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
772 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
773 * elf32-i370.c (i370_elf_check_relocs): Likewise.
774 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
775 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
776 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
777 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
778 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
779 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
780 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
781 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
782 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
783 * elf32-s390.c (elf_s390_check_relocs): Likewise.
784 * elf32-sh.c (sh_elf_check_relocs): Likewise.
785 * elf32-v850.c (v850_elf_check_relocs): Likewise.
786 * elf32-vax.c (elf_vax_check_relocs): Likewise.
787 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
788 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
789 * elf64-s390.c (elf_s390_check_relocs): Likewise.
790 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
791 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
792 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
793
71cb9464
L
7942005-06-20 H.J. Lu <hongjiu.lu@intel.com>
795
f7c5057a
L
796 PR 1022
797 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
798 symbol.
799
8002005-06-20 H.J. Lu <hongjiu.lu@intel.com>
801
802 PR 1025
71cb9464
L
803 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
804 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
805
73d147dc
L
8062005-06-18 H.J. Lu <hongjiu.lu@intel.com>
807
808 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
809 BFD_RELOC_X86_64_GOTPC32.
810 * bfd-in2.h: Regenerated.
811
a50b2160
JJ
8122005-06-17 Jakub Jelinek <jakub@redhat.com>
813
aa2ca951
JJ
814 * elf.c (bfd_section_from_shdr): Kill bogus warning.
815
a50b2160
JJ
816 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
817 symbol, relocation, group or versym sections.
818
819 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
820 is NULL.
821 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
822 doesn't point into the section.
823
d6ab8113
JB
8242005-06-17 Jan Beulich <jbeulich@novell.com>
825
826 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
827 and BFD_RELOC_X86_64_GOTPC32.
828 * libbfd.h (bfd_reloc_code_real_names): Likewise.
829 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
830 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
831 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
832 and R_X86_64_GOTPC32.
833 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
834 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
835 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
836 (elf64_x86_64_relocate_section): Likewise.
837 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
838
b820f1e4
MK
8392005-06-15 Mark Kettenis <kettenis@gnu.org>
840
841 * archive.c: Include "libiberty.h".
842
46767561
NC
8432005-06-15 Nick Clifton <nickc@redhat.com>
844
845 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
846 produced by the GreenHills toolchain can be assimilated.
847
580a09db
DA
8482005-06-14 Steve Ellcey <sje@cup.hp.com>
849
850 * som.c (som_find_inliner_info): New.
851
91134c82
L
8522005-06-14 H.J. Lu <hongjiu.lu@intel.com>
853
854 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
855
933d961a
JJ
8562005-06-14 Jakub Jelinek <jakub@redhat.com>
857
858 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
859 Prevent endless recursion on broken objects.
860
861 * archive.c (do_slurp_coff_armap): Check for overflows.
862
9a44bbd9
DJ
8632005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
864
865 * elfcode.h (elf_write_relocs): Do nothing if there are no
866 relocations.
867
75758e9d
AM
8682005-06-10 Alan Modra <amodra@bigpond.net.au>
869
870 * dwarf2.c (decode_line_info): Revert last change. Instead set
871 initial low_pc to -1 to avoid need to test whether loc_pc has
872 been set.
873
2ae0844c
CF
8742005-06-09 Christopher Faylor <cgf@timesys.com>
875
876 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
877 either SEC_ALLOC OR SEC_LOAD.
878
3b137b9a
CF
8792005-06-09 Christopher Faylor <cgf@timesys.com>
880
881 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
882 section header. Do not add STYP_NOLOAD since it does not appear to be
883 a valid PE flag.
884
6bd00c5d
L
8852005-06-09 H.J. Lu <hongjiu.lu@intel.com>
886
887 PR 1000
888 * dwarf2.c (lookup_address_in_line_info_table): Restore code
889 handling NULL function info, removed with 2005-04-03 change.
890
a366f4ff
MM
8912005-06-08 Mark Mitchell <mark@codesourcery.com>
892
893 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
894
0e58fcf3
AM
8952005-06-09 Alan Modra <amodra@bigpond.net.au>
896
897 * elflink.c (elf_mark_used_section): Delete.
898 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
899 * reloc.c (bfd_mark_used_section): New function.
900 (bfd_generic_gc_sections): Call bfd_mark_used_section.
901
92a7c1b8
AM
9022005-06-08 Alan Modra <amodra@bigpond.net.au>
903
904 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
d83747fa 905 (bfd_fdopenr): Same.
92a7c1b8 906
dfab97d6
MM
9072005-06-07 Mark Mitchell <mark@codesourcery.com>
908
909 * opncls.c (bfd_fdopenr): Add missing break statements.
910
2d0123b7
MM
9112005-06-07 Mark Mitchell <mark@codesourcery.com>
912
913 * opncls.c (bfd_fopen): New API.
914 (bfd_openr): Use it.
915 (bfd_fdopenr): Likewise.
916 * bfd-in2.h: Regenerated.
917
de33e640
AH
9182005-06-07 Aldy Hernandez <aldyh@redhat.com>
919 Michael Snyder <msnyder@redhat.com>
920 Stan Cox <scox@redhat.com>
921
922 * Makefile.am (ALL_MACHINES): Add ms1 support.
923 (ALL_MACHINES_CFILES): Same.
924 (BFD32_BACKENDS): Same.
925 (BFD32_BACKENDS_CFILES): Same.
926
927 * Makefile.in: Regenerate.
928
929 * archures.c (bfd_architecture): Add ms1 entries.
930 Externalize bfd_ms1_arch.
931 (bfd_archures_list): Add bfd_ms1_arch.
932
933 * bfd-in2.h: Regenerate.
934
935 * cpu-ms1.c: New file.
936
937 * elf32-ms1.c: New file.
938
939 * targets.c: Define extern of bfd_elf32_ms1_vec.
940 Add bfd_elf32_ms1_vec to _bfd_target_vector.
941
942 * configure.in: Add bfd_elf32_ms1_vec case.
943
944 * configure: Regenerate.
945
946 * config.bfd: Add ms1-*-elf to table.
947
55cf6793
ZW
9482005-06-07 Zack Weinberg <zack@codesourcery.com>
949
950 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
951
4575b1b5
AM
9522005-06-07 Alan Modra <amodra@bigpond.net.au>
953
954 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
955 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
956
5420f73d
L
9572005-06-06 H.J. Lu <hongjiu.lu@intel.com>
958
959 PR 990
960 * bfd.c (bfd_find_line): New.
961
962 * dwarf2.c (comp_unit): Add variable_table.
963 (funcinfo): Add file, line, and sec.
964 (varinfo): New.
965 (lookup_symbol_in_function_table): New.
966 (lookup_symbol_in_variable_table): New.
967 (scan_unit_for_functions): Renamed to ...
968 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
969 DW_TAG_variable.
970 (comp_unit_find_nearest_line): Updated.
971 (comp_unit_find_line): New.
972 (_bfd_dwarf2_find_line): New.
973
974 * elf-bfd.h (_bfd_elf_find_line): New.
975 (_bfd_generic_find_line): New. Defined.
976
977 * elf.c (_bfd_elf_find_line): New.
978
979 * libbfd-in.h (_bfd_dwarf2_find_line): New.
980 (_bfd_generic_find_line): New.
981
982 * bfd-in2.h: Regenerated.
983 * libbfd.h: Likewise.
984
985 * libbfd.c (_bfd_generic_find_line): New.
986
987 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
988 with _bfd_generic_find_line.
989 (bfd_target): Add _bfd_find_line.
990
b42f9a05
L
9912005-06-06 H.J. Lu <hongjiu.lu@intel.com>
992
993 * dwarf2.c (decode_line_info): Properly set low_pc.
994
b4f4e59f
AM
9952005-06-06 Alan Modra <amodra@bigpond.net.au>
996
997 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
998 case, include addend when indexing .opd section map.
999 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
1000 clear opd_adjust array if no_opd_opt set. Tidy code.
46de2a7c
AM
1001 Ignore zero size .opd. Check bfd_alloc return value.
1002 (ppc_stub_name): Return immediately on bfd_malloc fail.
b4f4e59f
AM
1003 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1004
2ae727ad
L
10052005-06-04 H.J. Lu <hongjiu.lu@intel.com>
1006
1007 * dwarf2.c (comp_unit): Fix a typo in comment.
1008
ce71b576
NC
10092005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1010
1011 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1012 (reloc_type_lookup): Dito.
1013 (elf_vax_discard_copies): Dito.
1014 (elf_vax_instantiate_got_entries): Dito.
1015 (elf_vax_link_hash_traverse): Dito.
1016 (elf_vax_link_hash_newfunc): Dito.
1017 (elf_vax_link_hash_table_create): Dito.
1018 (elf32_vax_set_private_flags): Dito.
1019 (elf32_vax_merge_private_bfd_data): Dito.
1020 (elf32_vax_print_private_bfd_data): Dito.
1021 (elf_vax_check_relocs): Dito.
1022 (elf_vax_gc_mark_hook): Dito.
1023 (elf_vax_gc_sweep_hook): Dito.
1024 (elf_vax_size_dynamic_sections): Dito.
1025 (elf_vax_discard_copies): Dito.
1026 (elf_vax_instantiate_got_entries): Dito.
1027 (elf_vax_relocate_section): Dito.
1028 (elf_vax_finish_dynamic_symbol): Dito.
1029 (elf_vax_finish_dynamic_sections): Dito.
1030 (elf_vax_hash_table): Break-up of line isn't needed.
1031 (elf_vax_check_relocs): Remove leading whitespace
1032 (elf_vax_relocate_section): Remove redundant whitespace
1033 (elf_vax_link_hash_newfunc): Don't cast NULL.
1034 (elf_vax_link_hash_table_create): Dito.
1035 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1036
9635fe29
AM
10372005-06-03 Alan Modra <amodra@bigpond.net.au>
1038
e1fffbe6
AM
1039 PR 568
1040 * configure.in: Bump version
1041 * configure: Regenerate.
1042 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1043 discarded section sym refs and kill linker output.
1044 * simple.c (simple_dummy_einfo): New function.
1045 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1046
9635fe29
AM
1047 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1048 for all reloc types.
1049
e87d886e
AM
10502005-06-02 Alan Modra <amodra@bigpond.net.au>
1051
1052 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1053 restrictive of func code and func descr for undefined syms as well
1054 as defined.
1055
b2b09913
JB
10562005-05-31 Jim Blandy <jimb@redhat.com>
1057
1058 * Makefile.am: Regenerate dependencies with 'make dep-am'.
1059 * Makefile.in: Regenerate.
1060
8288a39e
RH
10612005-05-31 Richard Henderson <rth@redhat.com>
1062
1063 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1064 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1065 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1066 (elf64_alpha_want_plt): Update to match.
1067 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1068 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
1069
f1c71a59
ZW
10702005-05-31 Zack Weinberg <zack@codesourcery.com>
1071
1072 * elf32-arm.c (elf32_arm_reloc_type_lookup)
1073 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1074 Use ISO C90 function declaration style.
1075
653bb2de
JW
10762005-05-31 James E Wilson <wilson@specifixinc.com>
1077
1078 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1079 header PF_R flag on PT_LOAD segments.
1080
f915360b
RH
10812005-05-30 Richard Henderson <rth@redhat.com>
1082
1083 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1084 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1085
6ec7057a
RH
10862005-05-29 Richard Henderson <rth@redhat.com>
1087
1088 * configure.in (--enable-secureplt): New.
1089 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1090 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1091 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1092 (elf64_alpha_use_secureplt): New.
1093 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1094 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1095 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1096 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1097 (struct alpha_elf_link_hash_entry): Add plt_offset.
1098 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1099 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1100 (PLT_ENTRY_WORD3): Remove.
1101 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1102 on .plt and create .got.plt.
1103 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1104 (get_got_entry): Initialize plt_offset.
1105 (elf64_alpha_want_plt): New.
1106 (elf64_alpha_check_relocs): Use it.
1107 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
1108 plt entries here.
1109 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1110 error as user error.
1111 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1112 got subsection.
1113 (elf64_alpha_size_plt_section): Size .got.plt section.
1114 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1115 plt entries used.
1116 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1117 Add PLTRO DYNAMIC entry.
1118 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1119 (elf64_alpha_finish_dynamic_sections): Likewise.
1120
3133ddbf
DJ
11212005-05-28 David Daney <ddaney@avtrex.com>
1122
1123 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
1124 calculation of DT_RELSZ to occur after all dynamic relocations
1125 are created.
1126
36527912
AJ
11272005-05-28 Eli Zaretskii <eliz@gnu.org>
1128
1129 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1130 * config.in, configure: Regenerate.
1131
1bc8074d 11322005-05-26 Mark Kettenis <kettenis@gnu.org>
6ec7057a 1133 Maciej W. Rozycki <macro@linux-mips.org>
1bc8074d
MR
1134
1135 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1136 stop processing of options if one of invalid size is
1137 encountered.
1138 (_bfd_mips_elf_section_from_shdr): Likewise.
1139 (_bfd_mips_elf_fake_sections): Reset the type of empty special
1140 sections.
1141
75fed80d
RH
11422005-05-26 Richard Henderson <rth@redhat.com>
1143
36527912 1144 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
75fed80d
RH
1145 plt_old_section, plt_old_value.
1146 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1147 (elf64_alpha_size_plt_section_1): Don't use it.
1148
24639c7d
JJ
11492005-05-26 Jakub Jelinek <jakub@redhat.com>
1150
1151 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1152 first shdr has sh_size == 0. Fail if e_shnum is large to cause
1153 arithmetic overflow when allocating the i_shdr array.
1154 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
1155
a7519a3c
RH
11562005-05-25 Richard Henderson <rth@redhat.com>
1157
1158 * elf64-alpha.c: Update all function definitions to ISO C. Remove
1159 all function prototypes; rearrange functions into def-use order.
1160
308da68f
RH
11612005-05-25 Richard Henderson <rth@redhat.com>
1162
1163 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1164 in the presence of deleting elements.
1165 (elf64_alpha_size_got_sections): Zero dead got section size.
1166
4ab527b0
FF
11672005-05-23 Fred Fish <fnf@specifixinc.com>
1168
1169 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1170 (struct funcinfo): Add caller_func, caller_file, caller_line.
1171 tag, and nesting_level members.
1172 (lookup_address_in_function_table): Change first passed parameter
1173 from "struct funcinfo *" to "struct comp_unit *".
1174 (lookup_address_in_function_table): Dereference unit to find function
1175 table.
1176 (lookup_address_in_function_table): Traverse the function list to
1177 create a chain of inlined functions back to the first non inlined
1178 function.
1179 (scan_unit_for_functions): Remember tag and nesting level. Handle
1180 DW_AT_call_file and DW_AT_call_line.
1181 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1182 call to pass unit pointer instead of function table pointer. For
1183 inlined functions, save pointer to the inliner chain.
1184 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1185 (_bfd_dwarf2_find_inliner_info): New function that returns information
1186 from the inliner chain after a call to bfd_find_nearest_line.
1187
1188 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1189 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1190 NAME##_find_inliner_info.
1191 (bfd_target): Add _bfd_find_inliner_info.
1192 * bfd-in2.h: Regenerate.
1193
1194 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1195 macro that always returns bfd_false.
1196 (_bfd_dwarf2_find_inliner_info): Declare.
1197 * libbfd.h: Regenerate.
36527912 1198
4ab527b0
FF
1199 * elf32-arm.c (elf32_arm_find_inliner_info): New function
1200 that calls _bfd_dwarf2_find_inliner_info.
1201 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1202
1203 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1204 that calls _bfd_dwarf2_find_inliner_info.
1205 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1206 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1207 _bfd_mips_elf_find_inliner_info.
1208 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1209 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1210
1211 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1212 _bfd_dwarf2_find_inliner_info.
1213 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1214 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1215 _bfd_elf_find_inliner_info.
1216
1217 * coffgen.c (coff_find_inliner_info): New function that
1218 calls _bfd_dwarf2_find_inliner_info.
1219 * libcoff-in.h (coff_find_inliner_info): Declare.
1220 * libcoff.h: Regenerate.
1221 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1222 (pmac_xcoff_vec) Ditto.
1223 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1224 (aix5coff64_vec): Ditto.
36527912 1225
4ab527b0
FF
1226 * aout-target.h (MY_find_inliner_info): Define as
1227 _bfd_nosymbols_find_inliner_info.
1228 * aout-tic30.c (MY_find_inliner_info): Ditto.
1229 * binary.c (binary_find_inliner_info): Ditto.
1230 * i386msdos.c (msdos_find_inliner_info): Ditto.
1231 * ihex.c (ihex_find_inliner_info): Ditto.
1232 * libaout.h (aout_32_find_inliner_info): Ditto.
1233 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1234 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1235 * mmo.c (mmo_find_inliner_info): Ditto.
1236 * nlm-target.h (nlm_find_inliner_info): Ditto.
1237 * pef.c (bfd_pef_find_inliner_info): Ditto.
1238 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1239 * srec.c (srec_find_inliner_info): Ditto.
1240 * tekhex.c (tekhex_find_inliner_info): Ditto.
1241 * versados.c (versados_find_inliner_info): Ditto.
1242 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1243
1244 * ieee.c (ieee_find_inliner_info): New function that always
1245 returns FALSE.
1246 * oasys.c (oasys_find_inliner_info): Ditto.
1247 * vms.c (vms_find_inliner_info): Ditto.
1248
9edfd1af
AM
12492005-05-24 Alan Modra <amodra@bigpond.net.au>
1250
1251 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1252 force old plt layout.
1253
3241278a
RH
12542005-05-22 Richard Henderson <rth@redhat.com>
1255
1256 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1257 sections.
1258 (elf64_alpha_check_relocs): Likewise.
1259 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1260 non-allocated sections.
1261
d6ad34f6
RH
12622005-05-22 Richard Henderson <rth@redhat.com>
1263
36527912 1264 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
d6ad34f6
RH
1265 undefweak to use zero register. Call elf64_alpha_relax_got_load
1266 if not all uses removed.
1267 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1268 (elf64_alpha_relax_section): Handle undefweak symbols.
1269 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1270 (elf64_alpha_size_rela_got_1): Likewise.
1271 (elf64_alpha_relocate_section): Likewise.
1272
487c4353
RH
12732005-05-22 Richard Henderson <rth@redhat.com>
1274
1275 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1276 on SEC_CODE sections.
1277
a96afa0f
DA
12782005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1279
1280 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1281 unsigned int *.
1282 (som_write_space_strings): Change type of tmp_space and p to char *.
1283 (som_write_symbol_strings): Likewise. Also change type of comp to
1284 char *comp[4].
1285 (som_begin_writing): Change type of strings_size to unsigned int.
1286 (som_finish_writing): Likewise.
1287 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1288 char *.
1289 * som.h (struct som_section_data_struct): Change type of reloc_stream
1290 field to unsigned char *.
1291
643796e3
DJ
12922005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1293
1294 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1295 copy relocations for VxWorks.
1296
4dc4a9a5
DJ
12972005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1298
1299 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1300 has_sda_refs.
1301 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1302 (ppc_elf_check_relocs): Set has_sda_refs.
1303 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1304 copy relocations. Use has_sda_refs to place variables in .sbss.
1305 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1306 .sbss.
1307
dd1a320b
BW
13082005-05-20 Bob Wilson <bob.wilson@acm.org>
1309
1310 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1311 xtensa_default_isa is initialized.
1312
28e99bb6
AM
13132005-05-20 Alan Modra <amodra@bigpond.net.au>
1314
1315 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1316 for second and subsequent list entries. Only allocate multiple
1317 glink stubs when shared or pie.
1318 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1319 glink stub is needed.
1320
e3e71e27
ZW
13212005-05-19 Zack Weinberg <zack@codesourcery.com>
1322
1323 * Makefile.am: Have 'all' depend on 'info'.
1324 * Makefile.in: Regenerate.
1325
a6aa5195
AM
13262005-05-19 Alan Modra <amodra@bigpond.net.au>
1327
1328 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1329 init_offset. Add init_got_refcount, init_plt_refcount,
1330 init_got_offset and init_plt_offset.
1331 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1332 (_bfd_elf_link_hash_hide_symbol): Likewise.
1333 (_bfd_elf_link_hash_table_init): Likewise.
1334 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1335 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1336 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1337 (bfd_elf_size_dynamic_sections): Likewise.
1338 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1339 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1340 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1341 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1342 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1343 (struct plt_entry): New.
1344 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1345 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1346 use _bfd_elf_link_hash_copy_indirect.
1347 (update_plt_info, find_plt_ent): New functions.
1348 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1349 and adjust for use of plt list rather than refcount.
1350 (ppc_elf_gc_sweep_hook): Likewise.
1351 (ppc_elf_tls_optimize): Likewise.
1352 (ppc_elf_adjust_dynamic_symbol): Likewise.
1353 (allocate_dynrelocs): Likewise.
1354 (ppc_elf_relax_section): Likewise.
1355 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1356 when performing a relocatable link.
1357 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1358 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1359 pic resolver stub.
1360
a49e53ed
AM
13612005-05-19 Alan Modra <amodra@bigpond.net.au>
1362
1363 * elf.c (assign_file_positions_for_segments): Use maximum of
1364 maxpagesize and section alignment when adjusting initial
1365 segment offset and section offsets.
1366
cb1afa5c
ZW
13672005-05-18 Zack Weinberg <zack@codesourcery.com>
1368
1369 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1370 unconditional.
1371
13792e9d
L
13722005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1373
1374 * elf.c (group_signature): Undo the last change. Check if the
1375 symbol table section is correct.
1376
c19d1205
ZW
13772005-05-17 Zack Weinberg <zack@codesourcery.com>
1378
1379 * elf32-arm.c: Wherever possible, use official reloc names
1380 from AAELF.
1381 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1382 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1383 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1384 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1385 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1386 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1387 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1388 Add many new relocations from AAELF.
1389 (elf32_arm_howto_from_type): Update to match.
1390 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1391 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1392 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1393 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1394 (elf32_arm_final_link_relocate): Add support for
1395 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1396 case entries redundant with default.
1397
1398 * reloc.c: Reorganize ARM relocations. Add Thumb
1399 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1400 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1401 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1402 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1403 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1404 * bfd-in2.h, libbfd.h: Regenerate.
1405
26ae6d5e
DJ
14062005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1407
1408 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1409 elf_shstrtab.
1410 * format.c (bfd_check_format_matches): Set output_has_begun
1411 for both_direction.
1412 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1413 special case for both_direction.
1414
5982e3c7
NC
14152005-05-17 Nick Clifton <nickc@redhat.com>
1416
1417 * elf.c (group_signature): Check for a group section which is
1418 actually a (corrupt) symbol table section in disguise and prevent
1419 an infinite loop from occurring.
1420
fc3ab699
L
14212005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1422
1423 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1424 2005-02-16.
1425
5e27d427
L
14262005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1427
1428 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1429 predicate on slot 0 only if slot 0 isn't br.
1430
75ff4589
L
14312005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1432
1433 PR 797
1434 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1435 empty sdynbss section.
1436 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1437
8e0ed13f
NC
14382005-05-17 Tavis Ormandy <taviso@gentoo.org>
1439
1440 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1441 dynamic sections.
1442
7e8aeb9a
AM
14432005-05-17 Alan Modra <amodra@bigpond.net.au>
1444
1445 * elf32-ppc.c (LIS_11. LIS_12): Define.
1446 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1447 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1448 for --data-plt when building non-pie executables.
1449
641bd093
NC
14502005-05-17 Nick Clifton <nickc@redhat.com>
1451
10dbd1f3
NC
1452 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1453 the situation where a symbols's section is not known but a section
1454 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1455 OS.
1456
641bd093
NC
1457 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1458 the presence of a symbol table to just before the symbol table is
1459 actually used.
1460
83b6bd86
L
14612005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1462
1463 PR 834
1464 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1465 (elfNN_ia64_relax_section): Use it.
1466
06084812
MK
14672005-05-14 Mark Kettenis <kettenis@gnu.org>
1468
1469 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1470 of basename.
1471
1fe44d79
AM
14722005-05-14 Alan Modra <amodra@bigpond.net.au>
1473
1474 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1475 not DT_PPC_GLINK.
1476 (ppc_elf_finish_dynamic_sections): Likewise.
1477
2db3311b
FF
14782005-05-13 Fred Fish <fnf@specifixinc.com>
1479
1480 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1481 * libbfd.h: Rebuilt.
1482
7db48a12
BW
14832005-05-13 Bob Wilson <bob.wilson@acm.org>
1484
1485 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1486 periods in linkonce_kind values.
1487
8fe76924
L
14882005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1489
1490 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1491 against protected function when building executable.
1492
86b9da88
AM
14932005-05-12 Alan Modra <amodra@bigpond.net.au>
1494
1495 * elf32-ppc.c (LWZU_0_X_11): Delete.
1496 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1497 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1498 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1499 table.
1500 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1501 table.
1502 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1503 Generate .glink branch table and updated stubs.
1504
d7128ce4
AM
15052005-05-11 Alan Modra <amodra@bigpond.net.au>
1506
1507 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1508 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1509 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1510 (CROR_151515, CROR_313131): Delete.
1511 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1512 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1513 LWZU_0_X_11): Define.
1514 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1515 and R_PPC_REL16_HA entries.
1516 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1517 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1518 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1519 new_plt, and old_plt.
1520 (ppc_elf_create_dynamic_sections): Create .glink section.
1521 (ppc_elf_check_relocs): Set new_plt and old_plt.
1522 (ppc_elf_select_plt_layout): New function.
1523 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1524 (allocate_got): Handle differences between old and new got layout.
1525 (allocate_dynrelocs): Likewise for plt.
1526 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1527 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1528 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1529 destination of R_PPC_PLTREL24 relocs.
1530 (ppc_elf_relocate_section): Handle new relocs and changed destination
1531 of R_PPC_PLTREL24.
1532 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1533 differences in layout.
1534 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1535 put a blrl in new got. Write glink contents.
1536 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1537 * libbfd.h: Regenerate.
1538 * bfd-in2.h: Regenerate.
1539
4c9b0de6
AS
15402005-05-11 Andreas Schwab <schwab@suse.de>
1541
1542 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1543 warning.
1544
3d2b39cf
L
15452005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1546
1547 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1548 section if SEC_ALLOC isn't set.
1549
2ba49b59
KC
15502005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1551
1552 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1553 * acinclude.m4: Don't sinclude accross.m4.
1554 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1555
433817dd
AM
15562005-05-09 Alan Modra <amodra@bigpond.net.au>
1557
1558 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1559 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1560 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1561 (func_desc_adjust): Hide fake function descriptors when function
1562 code entry is defined.
1563 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1564
0560d0f7
AM
15652005-05-09 Alan Modra <amodra@bigpond.net.au>
1566
1567 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1568
74cc7600
DK
15692005-05-08 Dave Korn <dave.korn@artimi.com>
1570
1571 * coff-tic80.c: Undefine _CONST after system headers to prevent
1572 clash with tic80-specific definition in include/coff/tic80.h
1573
cfca085c
L
15742005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1575
1576 PR 939
1577 * elflink.c (elf_link_output_extsym): Use output_bfd if
1578 h->root.u.def.section is bfd_abs_section_ptr when reporting
1579 error.
1580
7f4d3958
L
15812005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1582
1583 * elf-bfd.h (elf_backend_data): Update special_sections to
1584 array of pointer to bfd_elf_special_section.
1585 * elf.c (special_sections): Likewise.
1586 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1587 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1588 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1589 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1590 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1591 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1592 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1593 * elf32-v850.c (v850_elf_special_sections): Likewise.
1594 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1595 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1596 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1597 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1598 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1599 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1600 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1601 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1602
1603 * elf.c (get_special_section): Updated.
1604
3b36f7e6
AM
16052005-05-07 Alan Modra <amodra@bigpond.net.au>
1606
1607 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1608 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1609 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1610 got_symbol_offset.
1611 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1612 * elf32-frv.c (_frv_create_got_section): Likewise.
1613 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1614 (elf_backend_got_symbol_offset): Don't define.
1615 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1616 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1617 and got_gap.
1618 (ppc_elf_create_got): Tidy.
1619 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1620 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1621 (ppc_elf_gc_sweep_hook): Likewise.
1622 (ppc_elf_relocate_section): Likewise.
1623 (ppc_elf_finish_dynamic_symbol): Likewise.
1624 (allocate_got): New function.
1625 (allocate_dynrelocs): Use allocate_got.
1626 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1627 so that local got can refcount it. Set got_header_size.
1628 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1629 coded 4.
1630 (ppc_elf_finish_dynamic_sections): Likewise.
1631 (elf_backend_got_symbol_offset): Don't define.
1632 (elf_backend_got_header_size): Ditto.
1633
2e0fbf77
JW
16342005-05-05 Steve Ellcey <sje@cup.hp.com>
1635
1636 * configure.in (ACX_HEADER_STRING): New.
1637 * configure: Regenerate.
1638 * config.in: Regenerate.
1639 * sysdep.h (STRING_WITH_STRINGS): Use.
1640
6f140a15
L
16412005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1642
1643 * elf.c (_bfd_elf_close_and_cleanup): Only call
1644 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1645
01d9ad14
L
16462005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1647
1648 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1649 "__bss_start" instead of "_edata" as fallback.
1650
b36b76cb
L
16512005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1652
1653 * bfd-in2.h: Regenerated.
1654
eac338cf
PB
16552005-05-05 Paul Brook <paul@codesourcery.com>
1656
1657 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1658 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1659 elf-vxworks.lo.
1660 * configure: Regenerate.
1661 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1662 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1663 (elf32-i386.lo): Depend on elf-vxworks.h.
1664 (elf-vxworks.lo): New rule.
1665 * Makefile.in: Regenerate.
1666 * elf-bfd.h (elf_backend_data): Update type of
1667 elf_backend_emit_relocs.
1668 (_bfd_elf_link_output_relocs): Update prototype.
1669 * elflink.c (_bfd_elf_link_output_relocs): Always use
1670 bed->elf_backend_emit_relocs when outputting relocations.
1671 * elfxx-target.h (elf_backend_emit_relocs): Default to
1672 _bfd_elf_link_output_relocs.
1673 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1674 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1675 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1676 (elf_i386_plt0_entry): Remove padding.
1677 (elf_i386_pic_plt0_entry): Ditto.
1678 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1679 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1680 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1681 plt0_pad_byte fields.
1682 (elf_i386_link_hash_table_create): Zero them.
1683 (elf_i386_create_dynamic_sections): Create static relocation section.
1684 (allocate_dynrelocs): Allocate space for static PLT relocations.
1685 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1686 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 1687 if we have exported symbols from them.
eac338cf
PB
1688 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1689 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1690 VxWorks.
1691 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1692 Add relocation for GOT location. Fill in PLT static relocations.
1693 (elf_i386_vxworks_link_hash_table_create): New function.
1694 (elf_i386_vxworks_link_output_symbol_hook): New function.
1695 * elf-vxworks.h: New file.
1696
3496cb2a
L
16972005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1698
1699 * section.c (bfd_make_section_anyway_with_flags): New.
1700 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1701 (bfd_make_section_with_flags): New.
1702 (bfd_make_section): Call bfd_make_section_with_flags.
1703
1704 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1705 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1706 instead of bfd_make_section/bfd_make_section and don't call
1707 bfd_set_section_flags.
1708 (mn10300_elf_check_relocs): Likewise.
1709 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1710 * elf32-arm.c (create_got_section): Likewise.
1711 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1712 (elf32_arm_check_relocs): Likewise.
1713 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1714 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1715 (_frv_create_got_section): Likewise.
1716 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1717 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1718 (elf32_hppa_check_relocs): Likewise.
1719 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1720 (i370_elf_check_relocs): Likewise.
1721 * elf32-i386.c (create_got_section): Likewise.
1722 (elf_i386_check_relocs): Likewise.
1723 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1724 (create_got_section): Likewise.
1725 (m32r_elf_create_dynamic_sections): Likewise.
1726 (m32r_elf_check_relocs): Likewise.
1727 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1728 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1729 (ppc_elf_create_dynamic_sections): Likewise.
1730 (ppc_elf_add_symbol_hook): Likewise.
1731 (ppc_elf_check_relocs): Likewise.
1732 * elf32-s390.c (create_got_section): Likewise.
1733 (elf_s390_check_relocs): Likewise.
1734 * elf32-sh.c (create_got_section): Likewise.
1735 (sh_elf_create_dynamic_sections): Likewise.
1736 (sh_elf_check_relocs): Likewise.
1737 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1738 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1739 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1740 (add_extra_plt_sections): Likewise.
1741 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1742 (elf64_alpha_create_got_section): Likewise.
1743 (elf64_alpha_create_dynamic_sections): Likewise.
1744 (elf64_alpha_check_relocs): Likewise.
1745 * elf64-hppa.c (get_reloc_section): Likewise.
1746 (get_opd): Likewise.
1747 (get_plt): Likewise.
1748 (get_dlt): Likewise.
1749 (get_stub): Likewise.
1750 (elf64_hppa_create_dynamic_sectionso): Likewise.
1751 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1752 * elf64-ppc.c (create_linkage_sections): Likewise.
1753 (ppc64_elf_check_relocs): Likewise.
1754 * elf64-s390.c (create_got_section): Likewise.
1755 (elf_s390_check_relocs): Likewise.
1756 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1757 (sh64_elf64_create_dynamic_sections): Likewise.
1758 * elf64-x86-64.c (create_got_section): Likewise.
1759 (elf64_x86_64_check_relocs): Likewise.
1760 * elflink.c (_bfd_elf_create_got_section): Likewise.
1761 (_bfd_elf_link_create_dynamic_sections): Likewise.
1762 (elf_link_add_object_symbols): Likewise.
1763 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1764 (elfNN_ia64_create_dynamic_sections): Likewise.
1765 (get_fptr): Likewise.
1766 (get_pltoff): Likewise.
1767 (get_reloc_section): Likewise.
1768 (elfNN_ia64_object_p): Likewise.
1769 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1770 (mips_elf_create_compact_rel_section): Likewise.
1771 (mips_elf_create_got_section): Likewise.
1772 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1773 * elfxx-sparc.c (create_got_section): Likewise.
1774 (_bfd_sparc_elf_check_relocs): Likewise.
1775
1776 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1777 on linker created sections.
1778
59fef9e7
L
17792005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1780
1781 PR 882
1782 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1783 script on executable.
1784
35330cce
NC
17852005-05-05 John Levon <levon@movementarian.org>
1786
1787 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1788 allocated memory before returning.
1789 (decode_line_info): Likewise.
1790 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1791 allocated by functions in this file.
1792 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 1793 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
1794 _bfd_dwarf2_cleanup_debug_info.
1795
4a2a2686
HPN
17962005-05-05 Hans-Peter Nilsson <hp@axis.com>
1797
1798 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1799 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1800 * configure, config.in, Makefile.in: Regenerate.
1801 * sysdep.h (stpcpy): Revert last change.
1802
0baace35
HPN
18032005-05-05 Hans-Peter Nilsson <hp@axis.com>
1804
1805 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1806
5a260b66
L
18072005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1808
1809 * elfxx-ia64.c (ARCH_SIZE): New.
1810 (LOG_SECTION_ALIGN): Likewise.
1811 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1812 align relocation sections.
1813 (get_fptr): Likewise.
1814 (get_reloc_section): Likewise.
1815 (elfNN_ia64_tprel_base): Likewise.
1816 (elfNN_ia64_check_relocs): Support 32bit relocations.
1817 (allocate_global_fptr_got): Likewise.
1818 (allocate_dynrel_entries): Likewise.
1819 (set_got_entry): Likewise.
1820 (set_pltoff_entry): Likewise.
1821 (elfNN_ia64_relocate_section): Likewise.
1822
18232005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1824
1825 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1826 * configure: Regenerate.
1827 * config.in: Likewise.
1828
1829 * sysdep.h (stpcpy): New.
1830
3e110533
NC
18312005-05-04 Nick Clifton <nickc@redhat.com>
1832
1833 * Update the address and phone number of the FSF organization in
1834 the GPL notices in the following files:
1835 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1836 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1837 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1838 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1839 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1840 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1841 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1842 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1843 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1844 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1845 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1846 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1847 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1848 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1849 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1850 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1851 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1852 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1853 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1854 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1855 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1856 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1857 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1858 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1859 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1860 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1861 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1862 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1863 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1864 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1865 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1866 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1867 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1868 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1869 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1870 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1871 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1872 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1873 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1874 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1875 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1876 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1877 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1878 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1879 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1880 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1881 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1882 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1883 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1884 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1885 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1886 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1887 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1888 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1889 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1890 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1891 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1892 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1893 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1894 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1895 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1896 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1897 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1898 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1899 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1900 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1901 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1902 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1903 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1904 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 1905 hosts/alphavms.h
3e110533 1906
f652615e
L
19072005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1908
1909 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1910 * bfd-in2.h: Regenerated.
1911
1912 * elflink.c (bfd_elf_set_symbol): New.
1913 (_bfd_elf_provide_symbol): Call it.
1914 (_bfd_elf_provide_section_bound_symbols): New.
1915
c5e2cead
L
19162005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1917
1918 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1919 at the end, if a strong definition has already been seen.
1920
8423293d
AM
19212005-05-04 Alan Modra <amodra@bigpond.net.au>
1922
1923 * section.c (struct bfd_section): Replace link_order_head and
1924 link_order_tail with map_head and map_tail union.
1925 (STD_SECTION): Update.
1926 (_bfd_strip_section_from_output): Delete.
1927 * aoutx.h: Update throughout for above changes.
1928 * coff-ppc.c: Likewise.
1929 * cofflink.c: Likewise.
1930 * ecoff.c: Likewise.
1931 * elf-eh-frame.c: Likewise.
1932 * elf-m10300.c: Likewise.
1933 * elf.c: Likewise.
1934 * elf32-arm.c: Likewise.
1935 * elf32-cris.c: Likewise.
1936 * elf32-hppa.c: Likewise.
1937 * elf32-i386.c: Likewise.
1938 * elf32-m32r.c: Likewise.
1939 * elf32-m68hc1x.c: Likewise.
1940 * elf32-m68k.c: Likewise.
1941 * elf32-ppc.c: Likewise.
1942 * elf32-s390.c: Likewise.
1943 * elf32-sh.c: Likewise.
1944 * elf32-vax.c: Likewise.
1945 * elf32-xtensa.c: Likewise.
1946 * elf64-alpha.c: Likewise.
1947 * elf64-hppa.c: Likewise.
1948 * elf64-ppc.c: Likewise.
1949 * elf64-s390.c: Likewise.
1950 * elf64-sh64.c: Likewise.
1951 * elf64-x86-64.c: Likewise.
1952 * elflink.c: Likewise.
1953 * elfxx-ia64.c: Likewise.
1954 * elfxx-mips.c: Likewise.
1955 * elfxx-sparc.c: Likewise.
1956 * linker.c: Likewise.
1957 * merge.c: Likewise.
1958 * pdp11.c: Likewise.
1959 * xcofflink.c: Likewise.
1960 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1961 out from bfd_elf_size_dynamic_sections.
1962 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1963 * bfd-in2.h: Regenerate.
1964
04dd1667
AM
19652005-05-04 Alan Modra <amodra@bigpond.net.au>
1966
1967 * section.c (bfd_section_list_remove): Don't clear s->next.
1968 (bfd_section_list_append): Always init s->prev.
1969 (bfd_section_list_prepend): Define.
1970 (bfd_section_list_insert_after): Minor optimization.
1971 (bfd_section_removed_from_list): Rewrite.
1972 * elf.c (assign_section_numbers): Simplify list traversal now that
1973 bfd_section_list_remove doesn't destroy removed section next ptr.
1974 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1975 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1976 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1977 * bfd-in2.h: Regenerate.
1978
5daa8fe7
L
19792005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1980
1981 * bfd.c (bfd): Remove section_tail and add section_last.
1982 (bfd_preserve): Likewise.
1983 (bfd_preserve_save): Likewise.
1984 (bfd_preserve_restore): Likewise.
1985 * opncls.c (_bfd_new_bfd): Likewise.
1986
1987 * coffcode.h (coff_compute_section_file_positions): Updated.
1988 (coff_compute_section_file_positions): Likewise.
1989 * elf.c (assign_section_numbers): Likewise.
1990 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1991 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1992 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1993 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1994 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1995 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1996
1997 * ecoff.c (bfd_debug_section): Initialize prev.
1998
1999 * section.c (bfd_section): Add prev.
2000 (bfd_section_list_remove): Updated.
2001 (bfd_section_list_append): New.
2002 (bfd_section_list_insert_after): New.
2003 (bfd_section_list_insert_before): New.
2004 (bfd_section_list_insert): Removed.
2005 (bfd_section_removed_from_list): Updated.
2006 (STD_SECTION): Initialize prev.
2007 (bfd_section_init): Updated.
2008 (bfd_section_list_clear): Updated.
2009
2010 * bfd-in2.h: Regenerated.
2011
a31501e9
L
20122005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2013
2014 * elf.c (_bfd_elf_new_section_hook): Don't call
2015 _bfd_elf_get_sec_type_attr on sections from input files.
2016
d05da6a8
L
20172005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2018
2019 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2020 hash table size 16699 instead of bfd_hash_table_init.
2021
a67b080b
PB
20222005-05-01 Paul Brook <paul@codesourcery.com>
2023
2024 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2025 definition has already been seen.
2026
c6596c5e
PB
20272005-05-01 Paul Brook <paul@codesourcery.com>
2028
2029 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2030 R_ARM_PLT32 the same as R_ARM_PC24.
2031 (arm_add_to_rel): Ditto.
2032
9a813b7a
DJ
20332005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
2034
2035 * config.bfd: Add h8300*-*-rtemscoff.
2036 Switch h8300*-*-rtems* to elf.
2037
aa7eb06d
DJ
20382005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2039
2040 * aclocal.m4, Makefile.in: Regnerated.
2041
fa0d1cab
PB
20422005-04-28 Paul Brook <paul@codesourcery.com>
2043
2044 Merge changes only applied to Makefile.in.
2045 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2046 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2047 (elfxx-sparc.lo): New rule.
2048 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2049 (elf64-sparc.lo): Likewise.
2050
0291d291
NC
20512005-04-28 Julian Brown <julian@codesourcery.com>
2052
2053 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2054 import.
2055
26c61ae5
L
20562005-04-27 H.J. Lu <hongjiu.lu@intel.com>
2057
2058 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2059
2060 * elf.c (bfd_elf_sym_name): Updated.
2061 (group_signature): Likewise.
2062 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2063 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2064 (ppc64_elf_edit_toc): Likewise.
2065 (ppc64_elf_relocate_section): Likewise.
2066 * elfcode.h (elf_slurp_symbol_table): Likewise.
2067 * elflink.c (elf_link_input_bfd): Likewise.
2068
2069 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2070 bfd_elf_sym_name to get local symbol name when reporting errors.
2071
8c19749a
NC
20722005-04-27 Nick Clifton <nickc@redhat.com>
2073
2074 * elflink.c (elf_link_input_bfd): Handle the case where a badly
2075 formatted input file results in a reloc which has no associated
2076 global symbol.
2077
8e5b6e16
JG
20782005-04-26 Jerome Guitton <guitton@gnat.com>
2079
2080 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2081
e459dc7b
DM
20822005-04-25 David S. Miller <davem@davemloft.net>
2083
2084 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2085 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2086 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2087 Likewise.
2088
6d633fd2
L
20892005-04-25 H.J. Lu <hongjiu.lu@intel.com>
2090
2091 PR 858
2092 * elflink.c (elf_link_input_bfd): Make non-debugging reference
2093 to discarded section an error.
2094
d34a2b1d
JG
20952005-04-21 Jerome Guitton <guitton@gnat.com>
2096
2097 * configure.in: Replace BFD_NEED_DECLARATION checks by the
2098 corresponding AC_CHECK_DECLS.
2099 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2100 HAVE_DECL_*.
2101 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2102 * configure: Regenerate.
2103 * config.in: Ditto.
2104
ff01938b
AS
21052005-04-21 Andreas Schwab <schwab@suse.de>
2106
c2e70a82
AS
2107 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2108 unsigned from type of dynamic_interpreter.
2109 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2110 casts again.
2111
ff01938b
AS
2112 * elf.c (assign_section_numbers): Fix comment.
2113
0858d3ec
JG
21142005-04-21 Jerome Guitton <guitton@gnat.com>
2115
2116 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2117 for struct som_exec_auxhdr fields.
2118
7920ce38
NC
21192005-04-21 Nick Clifton <nickc@redhat.com>
2120
2121 * aout-adobe.c: Convert to ISO C and fix formatting.
2122 * aout-arm.c: Convert to ISO C and fix formatting.
2123 * aout-cris.c: Convert to ISO C and fix formatting.
2124 * aout-ns32k.c: Convert to ISO C and fix formatting.
2125 * aout-tic30.c: Convert to ISO C and fix formatting.
2126 * coffcode.h: Convert to ISO C and fix formatting.
2127 * coffswap.h: Convert to ISO C and fix formatting.
2128 * i386aout.c: Convert to ISO C and fix formatting.
2129 * libaout.h: Convert to ISO C and fix formatting.
2130 * libcoff-in.h: Convert to ISO C and fix formatting.
2131 * libcoff.h: Convert to ISO C and fix formatting.
2132 * libecoff.h: Convert to ISO C and fix formatting.
2133 * libnlm.h: Convert to ISO C and fix formatting.
2134 * libpei.h: Convert to ISO C and fix formatting.
2135 * libxcoff.h: Convert to ISO C and fix formatting.
2136 * nlm-target.h: Convert to ISO C and fix formatting.
2137 * nlm.c: Convert to ISO C and fix formatting.
2138 * nlm32-alpha.c: Convert to ISO C and fix formatting.
2139 * nlm32-i386.c: Convert to ISO C and fix formatting.
2140 * nlm32-ppc.c: Convert to ISO C and fix formatting.
2141 * nlm32-sparc.c: Convert to ISO C and fix formatting.
2142 * nlmcode.h: Convert to ISO C and fix formatting.
2143 * nlmswap.h: Convert to ISO C and fix formatting.
2144 * pe-mips.c: Convert to ISO C and fix formatting.
2145 * peXXigen.c: Convert to ISO C and fix formatting.
2146 * peicode.h: Convert to ISO C and fix formatting.
2147 * vms-gsd.c: Convert to ISO C and fix formatting.
2148 * vms-hdr.c: Convert to ISO C and fix formatting.
2149 * vms-misc.c: Convert to ISO C and fix formatting.
2150 * vms-tir.c: Convert to ISO C and fix formatting.
2151 * vms.c: Convert to ISO C and fix formatting.
2152 * vms.h: Convert to ISO C and fix formatting.
2153
2154 * coffgen.c (coff_print_symbol): Restore correct formatting of
2155 output.
2156
e8be8da4
DM
21572005-04-20 David S. Miller <davem@davemloft.net>
2158
2159 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2160 (_bfd_sparc_elf_link_hash_table_create): Likewise.
2161 (allocate_dynrelocs): Likewise.
2162
ec7b76fe
JG
21632005-04-20 Jerome Guitton <guitton@gnat.com>
2164
2165 * configure.in: Fix the check for basename declaration. Add check
2166 for declarations of ftello, ftello64, fseeko, fseeko64.
2167 * configure: Regenerate.
2168 * config.in: Ditto.
2169 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2170
22b75d0a
DM
21712005-04-19 David S. Miller <davem@davemloft.net>
2172
2173 * elfxx-sparc.c: New file.
2174 * elfxx-sparc.h: New file.
2175 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2176 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2177 (elfxx-sparc.lo): New rule.
2178 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2179 (elf64-sparc.lo): Likewise.
2180 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2181 (bfd_elf64_sparc_vec): Likewise.
2182 * configure: Regenerate.
2183 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2184 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2185 which is more consistent with elf32-sparc.c
2186
a008ac03
DJ
21872005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
2188
2189 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2190 (mips_elf_create_local_got_entry): Check h->root.forced_local.
2191
c87b5a93
AM
21922005-04-19 Alan Modra <amodra@bigpond.net.au>
2193
2194 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2195 dynamic relocs in non-SEC_ALLOC sections.
2196 (ppc_elf_gc_sweep_hook): Likewise.
2197 (ppc_elf_relax_section): Likewise.
2198 (ppc_elf_relocate_section): Likewise.
2199
7cefacd3
NC
22002005-04-18 Nick Clifton <nickc@redhat.com>
2201
2202 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2203 assigning a value to return_value.
2204
278d8f37
L
22052005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2206
2207 PR 855
2208 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2209 created group data.
2210
20dbb49d
L
22112005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2212
2213 PR 855
2214 * elf.c (setup_group): Properly handle zero group count.
2215
6a808a40
MK
22162005-04-17 Mark Kettenis <kettenis@gnu.org>
2217
2218 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2219 (som_is_subspace, compare_subspaces, som_compute_checksum)
2220 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2221 protoypes.
2222 (hppa_som_reloc, compare_syms, compare_subspaces)
2223 (som_print_symbol, som_get_section_contents)
2224 (som_set_section_contents): Remove space after 'void *'.
2225 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2226 (som_bfd_merge_private_bfd_data)
2227 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2228 defines.
2229
33bfe774
JB
22302004-04-15 Julian Brown <julian@codesourcery.com>
2231
2232 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2233 * bfd-in2.h: Regenerate.
2234 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2235 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2236 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2237 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2238 relocations if requested to.
2239 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2240 use_blx rather than symbian_p.
2241 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2242 use_blx is in effect.
2243 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2244 for SymbianOS.
2245
745c12f8
NC
22462005-04-15 Nick Clifton <nickc@redhat.com>
2247
2248 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2249 values.
2250
2e8b3a61
AM
22512005-04-15 Alan Modra <amodra@bigpond.net.au>
2252
2253 PR ld/815
2254 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2255 used as a list pointer.
2256
9e9b66a9
AM
22572005-04-14 Alan Modra <amodra@bigpond.net.au>
2258
2259 * Makefile.am (NO_WERROR): Define.
2260 * warning.m4: New file
2261 * acinclude.m4: Include warning.m4.
2262 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2263 * Makefile.in: Regenerate.
2264 * configure: Regenerate.
2265
8699aa54
AM
22662005-04-14 Alan Modra <amodra@bigpond.net.au>
2267
92ceba1e
AM
2268 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2269 Write trailing padding.
2270
8699aa54
AM
2271 * merge.c (merge_strings): Round up section size for alignment.
2272
40937810
JJ
22732005-04-14 David S. Miller <davem@davemloft.net>
2274
2275 Add TLS support for 64-bit Sparc ELF.
2276 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2277 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2278 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2279 sparc64_elf_hash_entry, sparc64_elf_tdata,
2280 sparc64_elf_local_got_tls_type): New defines.
2281 (sparc64_elf_mkobject): New function.
2282 (sparc64_elf_link_hash_table): Add members for dynamic linker
2283 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2284 uion to track TLS GOT references. Add sym_sec to cache
2285 mappings from local sym to section.
2286 (link_hash_newfunc): New function.
2287 (sparc64_elf_bfd_link_hash_table_create): Rename to
2288 sparc64_elf_link_hash_table_create for consistency.
2289 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2290 (sparc64_elf_create_dynamic_sections): Initialize new section
2291 members of sparc64_elf_link_hash_table. Only init srelbss
2292 if not-shared.
2293 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2294 New functions.
2295 (SPARC_NOP): Define.
2296 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2297 sparc64_elf_plt_ptr_offset): Delete.
2298 (sparc64_plt_entry_build): New function to build PLT entries
2299 gradually instread of all at once at the end of linking.
2300 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2301 local vars. Get them from sparc64_elf_hash_table instead.
2302 Check early on if r_symndx is in bounds. Handle TLS transitions.
2303 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2304 For TLS relocs, record the tls_type in either
2305 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2306 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2307 to the __tls_get_addr symbol. For PLT relocs, track references
2308 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2309 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2310 symbol references, count the number of relocations needed for
2311 that symbol. For default switch case, don't error, this lets
2312 the TLS relocs not explicitly handled by this function get
2313 accepted.
2314 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2315 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2316 it from sparc64_elf_hash_table. Store the real PLT offset
2317 in h->plt.offset, and build PLT entries one at a time. Also
2318 get .dynbss section pointer from htab.
2319 (allocate_dynrelocs, readonly_dynrelocs,
2320 sparc64_omit_section_dynsym): New functions.
2321 (sparc64_elf_omit_section_dynsym): Use these new functions as
2322 helpers.
2323 (dtpoff_base, tpoff): New functions.
2324 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2325 locals, get them from sparc64_elf_hash_table. Handle TLS
2326 relocations and refcounting in main relocation loop.
2327 (sparc64_elf_finish_dynamic_symbol): Use
2328 sparc64_elf_link_hash_table. Build PLT entries as we see
2329 them. Handle TLS GOT relocations.
2330 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2331 from sparc64_elf_hash_table. Initialize only PLT header
2332 not all entries since we not build PLT entries one by one.
2333 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2334 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2335 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2336
e75a280b
L
23372005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2338
2339 * elflink.c (elf_link_input_bfd): Update check for removed
2340 sections.
2341
ceae3e33
AM
23422005-04-12 Alan Modra <amodra@bigpond.net.au>
2343
2344 * Makefile.am: Run "make dep-am".
2345 * Makefile.in: Regenerate.
2346 * aclocal.m4: Regenerate.
2347 * libcoff.h: Regenerate.
2348
ab82c5b9
L
23492005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2350
2351 * linker.c (_bfd_generic_link_output_symbols): Also check if
2352 the output section of an input section has been removed from
2353 the output file.
2354
2355 * section.c (bfd_section_list_remove): Clear the next field
2356 of the removed section.
2357 (bfd_section_removed_from_list): New.
2358 * bfd-in2.h: Regenerated.
2359
bd695bcc
JJ
23602005-04-11 David S. Miller <davem@davemloft.net>
2361
2362 * elf32-sparc.c (elf32_sparc_relocate_section,
2363 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2364 R_SPARC_TLS_LE_{HIX22,LOX10}.
2365 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2366 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2367 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2368 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2369
b5b2699c
L
23702005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2371
2372 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2373
116c20d2 23742005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 2375
116c20d2
NC
2376 * aout-target.h: Convert to ISO C.
2377 * aoutf1.h: Convert to ISO C.
2378 * aoutx.h: Convert to ISO C.
2379 * bout.c: Convert to ISO C.
2380 * dwarf1.c: Convert to ISO C.
2381 * ecoffswap.h: Convert to ISO C.
2382 * freebsd.h: Convert to ISO C.
2383 * genlink.h: Convert to ISO C.
2384 * ieee.c: Convert to ISO C.
2385 * ihex.c: Convert to ISO C.
2386 * libcoff-in.h: Convert to ISO C.
2387 * mach-o.c: Convert to ISO C.
2388 * mach-o.h: Convert to ISO C.
2389 * netbsd.h: Convert to ISO C.
2390 * ns32k.h: Convert to ISO C.
2391 * ns32knetbsd.c: Convert to ISO C.
2392 * oasys.c: Convert to ISO C.
2393 * pdp11.c: Convert to ISO C.
2394 * pef-traceback.h: Convert to ISO C.
2395 * pef.c: Convert to ISO C.
2396 * pef.h: Convert to ISO C.
2397 * riscix.c: Convert to ISO C.
2398 * som.c: Convert to ISO C.
2399 * som.h: Convert to ISO C.
2400 * srec.c: Convert to ISO C.
2401 * stabs.c: Convert to ISO C.
2402 * sunos.c: Convert to ISO C.
2403 * tekhex.c: Convert to ISO C.
2404 * versados.c: Convert to ISO C.
2405 * version.h: Convert to ISO C.
2406 * xcoff-target.h: Convert to ISO C.
2407 * xcofflink.c: Convert to ISO C.
2408 * xsym.c: Convert to ISO C.
2409 * xsym.h: Convert to ISO C.
2410
8f6277f5
PB
24112005-04-08 Paul Brook <paul@codesourcery.com>
2412
2413 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2414 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2415 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2416 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2417 (elf32_arm_to_thumb_stub): Create PIC stubs.
2418 (record_arm_to_thumb_glue): Use different stub size for relocatable
2419 images.
2420
8c1d1bb8
AM
24212005-04-05 Alan Modra <amodra@bigpond.net.au>
2422
2423 * elf64-ppc.c (dec_dynrel_count): New function split out from
2424 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2425 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2426 (ppc64_elf_tls_optimize): Likewise.
2427
8c101720
NC
24282005-04-05 Mark Kettenis <kettenis@gnu.org>
2429
2430 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2431 CORE_WCOOKIE_OFFSET.
2432 (SPARC64_WCOOKIE_OFFSET): New.
2433 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2434
429cc0ae
NC
24352005-04-05 Nick Clifton <nickc@redhat.com>
2436
2437 * po/rw.po: New translation: Kinyarwanda
2438 * configure.in (ALL_LINGUAS): Add rw
2439 * configure: Regenerate.
2440
cc2e31b9
RS
24412005-04-05 Richard Sandiford <rsandifo@redhat.com>
2442
2443 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2444 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2445 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2446 section flags.
2447 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2448 to check for SHT_MIPS_OPTIONS sections.
2449 (_bfd_mips_elf_set_section_contents): Likewise.
2450
8236346f
EC
24512005-04-04 Eric Christopher <echristo@redhat.com>
2452
2453 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2454 Clean up gp handling code.
2455
7e4111ad
L
24562005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2457
2458 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 2459 group section.
da9f89d4
L
2460 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2461 sections for relocatable files only. Remove the linker created
2462 group sections.
2463 (_bfd_elf_compute_section_file_positions): Pass link_info to
2464 assign_section_numbers.
2465
2466 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2467 (elf_backend_object_p): Defined.
7e4111ad 2468
96982dc9
L
24692005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2470
2471 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2472
a13afe8e
FF
24732005-04-03 Fred Fish <fnf@specifixinc.com>
2474
2475 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2476 dwarf_ranges_size members.
2477 (struct comp_unit): Add base_address member.
2478 (struct funcinfo): Replace low/high members with an arange.
2479 (arange_add): Replace incoming "unit" parameter with "abfd" and
2480 "first_arange" pointers. Reorganize/rewrite function body.
2481 (decode_line_info): Change arange_add call to pass bfd and arange
2482 pointers.
2483 (lookup_address_in_line_info_table): Use arange list instead of
2484 individual low/high members. Walk function's arange list to find
2485 lowest PC in list, to test for overlapping functions.
2486 (read_debug_ranges): New function, reads the debug_ranges section.
2487 (lookup_address_in_function_table): Use arange list instead of
2488 individual low/high members. Rewrite to find smallest range that
2489 matches.
2490 (read_rangelist): Read a given rangelist from debug_ranges.
2491 (scan_unit_for_functions): Use arange list instead of individual
2492 low/high members. Handle a DW_AT_ranges attribute.
2493 (parse_comp_unit): Use arange list instead of individual low/high
2494 members. Save comp unit base address. Handle a DW_AT_ranges
2495 attribute.
2496
2796fd96
L
24972005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2498
2499 * elf.c (assign_section_numbers): Really use the kept section.
2500
01b3c8ab
L
25012005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2502
2503 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2504
2505 * elf.c (assign_section_numbers): When sh_link points to a
2506 discarded section, call _bfd_elf_check_kept_section to see if
2507 the kept section can be used. Otherwise reject sh_link
2508 pointing to discarded section.
2509
2510 * elflink.c (_bfd_elf_check_kept_section): New.
2511 (elf_link_input_bfd): Use it.
2512
35090471
AM
25132005-04-01 Alan Modra <amodra@bigpond.net.au>
2514
2515 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2516 that we no longer need.
2517
7356fed5
AM
25182005-04-01 Alan Modra <amodra@bigpond.net.au>
2519
2520 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2521 rather than 0.
77623a34 2522 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 2523
28b13744
L
25242005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2525
2526 * elf.c (assign_section_numbers): Fix a typo.
2527
c93625e2
L
25282005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2529
2530 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2531 error message.
2532 (_bfd_elf_section_already_linked): Likewise.
2533
fddc4048
JG
25342005-03-31 Jerome Guitton <guitton@gnat.com>
2535
2536 * config.in: Regenerate.
2537
2e9ebff5
JG
25382005-03-31 Jerome Guitton <guitton@gnat.com>
2539
c93625e2
L
2540 * config.in (HAVE_DECL_BASENAME): New configure macro.
2541 * configure.in: Check for basename.
2542 * configure: Regenerate.
2e9ebff5 2543
05ea83ed
JB
25442005-03-30 Julian Brown <julian@codesourcery.com>
2545
2546 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2547 bfd_elf32_is_arm_mapping_symbol_name.
2548 * bfd-in2.h: Regenerate.
2549 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2550 bfd_elf32_is_arm_mapping_symbol_name.
2551 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2552 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2553 (arm_elf_find_function): Likewise.
2554 (elf32_arm_output_symbol_hook): Likewise.
2555
9d2da7ca
JB
25562005-03-30 Julian Brown <julian@codesourcery.com>
2557
2558 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2559 * bfd-in2.h: Regenerate.
2560 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2561 bfd_elf32_is_arm_mapping_symbol_name.
2562 (elf32_arm_output_symbol_hook): Likewise.
2563 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2564 mapping symbols.
2565 (is_arm_mapping_symbol_name): Function moved from here...
2566 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2567 and made global.
2568
efa9bda4
AL
25692005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2570
2571 * configure.in: Check for ffs decl and alphabetize.
2572 * config.in: Regenerate.
2573 * configure: Regenerate.
d7128ce4 2574 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 2575
09a9d560
FF
25762005-03-29 Fred Fish <fnf@specifixinc.com>
2577
2578 * dwarf2.c (struct comp_unit): Fix typo.
2579 (scan_unit_for_functions): Remove unused local variable "name"
2580 and dead code that set it.
2581
ba93b8ac
DJ
25822005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2583 Phil Blundell <philb@gnu.org>
2584
2585 * bfd-in2.h, libbfd.h: Regenerated.
2586 * reloc.c: Add ARM TLS relocations.
2587 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2588 relocations.
2589 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2590 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2591 (elf32_arm_tls_ie32_howto): New.
2592 (elf32_arm_howto_from_type): Support TLS relocations.
2593 (elf32_arm_reloc_map): Likewise.
2594 (elf32_arm_reloc_type_lookup): Likewise.
2595 (TCB_SIZE): Define.
2596 (struct elf32_arm_obj_tdata): New.
2597 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2598 (elf32_arm_mkobject): New function.
2599 (struct elf32_arm_relocs_copied): Add pc_count.
2600 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2601 (GOT_TLS_IE): Define.
2602 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2603 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2604 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2605 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2606 (dtpoff_base, tpoff): New functions.
2607 (elf32_arm_final_link_relocate): Handle TLS relocations.
2608 (IS_ARM_TLS_RELOC): Define.
2609 (elf32_arm_relocate_section): Warn about TLS mismatches.
2610 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2611 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2612 TLS relocations and pc_count.
2613 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2614 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2615 calls.
2616 (elf32_arm_size_dynamic_sections): Handle TLS.
2617 (elf32_arm_finish_dynamic_symbol): Likewise.
2618 (bfd_elf32_mkobject): Define.
2619
71a976dd
DJ
26202005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2621
2622 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2623 relocation types. Don't count relocations which will use a PLT.
2624
7e7353ed
JB
26252005-03-29 Joel Brobecker <brobecker@gnat.com>
2626
2627 * elf.c (elfcore_grok_nto_status): Print tid as long.
2628 (elfcore_grok_nto_regs): Likewise.
2629
166856d7
JB
26302005-03-29 Joel Brobecker <brobecker@gnat.com>
2631
40937810 2632 * irix-core.c: Remove some unnecessary prototypes.
166856d7 2633
40f85900
JB
26342005-03-28 Joel Brobecker <brobecker@adacore.com>
2635
2636 * irix-core.c: Convert to ISO C.
2637
aa2e06ba
JB
26382005-03-28 Joel Brobecker <brobecker@adacore.com>
2639
2640 * irix-core.c (do_sections): Replace + by | in expression.
2641 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2642 to unused parameters to avoid a compiler warning.
2643
832bc186
MK
26442005-03-28 Mark Kettenis <kettenis@gnu.org>
2645
2646 * netbsd-core.c: Convert to ISO C. Fix formatting.
2647
82f0cfbd
EC
26482005-03-24 Eric Christopher <echristo@redhat.com>
2649
2650 * elfxx-mips.c: Revert previous patch.
2651
d7b9976f
NC
26522005-03-24 Nick Clifton <nickc@redhat.com>
2653
2654 * targets.c (_bfd_target_vector): Only include the
2655 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2656 all targets enabled.
2657
074d327a
NC
26582005-03-24 James E Wilson <wilson@specifixinc.com>
2659
2660 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2661 (BFD64_BACKENDS): Add elf32-ia64.lo.
2662 * Makefile.in: Regenerate.
2663
cc27e1dc
EC
26642005-03-23 Eric Christopher <echristo@redhat.com>
2665
2666 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2667 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2668 after emitting relocation.
2669 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2670 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2671 and readonly_reloc.
2672
ed84e695
NC
26732005-03-23 Mike Frysinger <vapier@gentoo.org>
2674 Nick Clifton <nickc@redhat.com>
2675
2676 * config.bfd: Accept any C library to accompany a GNU Linux
2677 implementation, not just the GNU C library.
2678 * configure.in: Likewise.
2679 * configure: Regenerate.
2680
81e1b023
L
26812005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2682
2683 * bfd-in.h (_bfd_elf_provide_symbol): New.
2684 * bfd-in2.h: Regenerated.
2685
2686 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2687 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2688 of set_linker_sym.
2689
2690 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2691 from elf32-ppc.c.
2692
672c2d7e
HPN
26932005-03-22 Hans-Peter Nilsson <hp@axis.com>
2694
2695 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2696
1fbc7e7a
BW
26972005-03-22 Bob Wilson <bob.wilson@acm.org>
2698
2699 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2700 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2701 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2702 (xtensa_opcode_decode): Rearrange code.
2703
c8e7bf0d
NC
27042005-03-22 Nick Clifton <nickc@redhat.com>
2705
2706 * binary.c: Convert to ISO C90 formatting.
2707 * coff-arm.c: Convert to ISO C90 formatting.
2708 * coffgen.c: Convert to ISO C90 formatting.
2709 * elf32-gen.c: Convert to ISO C90 formatting.
2710 * elf64-gen.c: Convert to ISO C90 formatting.
2711 * hash.c: Convert to ISO C90 formatting.
2712 * ieee.c: Convert to ISO C90 formatting.
2713
28a094c2
DJ
27142005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2715
2716 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2717 unresolved symbols in R_ARM_NONE relocations.
2718
0945cdfd
DJ
27192005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2720
2721 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2722 UNRESOLVED_RELOC_P argument. Set it appropriately.
2723 (elf32_arm_relocate_section): Update call to
2724 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2725 unresolved_reloc instead.
2726
11d2f718
AM
27272005-03-23 Alan Modra <amodra@bigpond.net.au>
2728
2729 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2730 .gnu.warning.* sections.
2731
76750a2f
AM
27322005-03-22 Alan Modra <amodra@bigpond.net.au>
2733
2734 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2735 written_address_p.
2736 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2737 (elf_create_pointer_linker_section): Delete info parm. Don't make
2738 h dynamic. Don't set written_address_p.
2739 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2740 (bfd_put_ptr): Delete.
2741 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2742 Always write section contents. Assert global sym is def_regular.
2743 Use offset bottom bit as a written flag.
2744 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2745 calls.
2746
f85f57ad
AM
27472005-03-22 Alan Modra <amodra@bigpond.net.au>
2748
2749 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2750 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2751 and end syms.
2752
2dc773a0
NC
27532005-03-21 Nick Clifton <nickc@redhat.com>
2754
2755 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2756 targets.
2757 (t2a1_bx_pc_insn): Likewise.
2758 (t2a2_noop_insn): Likewise.
2759 (t2a3_b_insn): Likewise.
2760 (t2a1_push_insn): Likewise.
2761 (t2a2_ldr_insn): Likewise.
2762 (t2a3_mov_insn): Likewise.
2763 (t2a4_bx_insn): Likewise.
2764 (t2a5_pop_insn): Likewise.
2765 (t2a6_bx_insn): Likewise.
2766 (coff_arm_relocate_section): Only declare the high_address
2767 variable for non WINCE targets.
2768
644285ef
AM
27692005-03-22 Alan Modra <amodra@bigpond.net.au>
2770
2771 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2772 SEC_LINKER_CREATED. Attach to dynobj.
2773 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2774
c9a2f333
AM
27752005-03-21 Alan Modra <amodra@bigpond.net.au>
2776
2777 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2778 sym_offset. Add name, bss_name, sym_name, sym_val.
2779 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2780 Add sdata array of elf_linker_section_t.
2781 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2782 (enum elf_linker_section_enum): Delete.
2783 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2784 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2785 the special sections are needed. Adjust htab->sdata refs.
2786 Ensure dynobj is set in sreloc code.
2787 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2788 (ppc_elf_set_sdata_syms): New function.
2789 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2790 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2791 sym_val instead of sym_hash.
2792 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2793
8853c3d3
AM
27942005-03-21 Alan Modra <amodra@bigpond.net.au>
2795
2796 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2797 (ppc_elf_merge_private_bfd_data): Likewise.
2798
2bb04cf2
AM
27992005-03-21 Alan Modra <amodra@bigpond.net.au>
2800
2801 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2802 (ppc_elf_create_linker_section): Don't create rel_section.
2803 (elf_create_pointer_linker_section): Don't size relocs.
2804 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2805 Don't generate relocs.
2806 (ppc_elf_relocate_section): Adjust calls to
2807 elf_finish_pointer_linker_section.
2808
d2663f46
AM
28092005-03-21 Alan Modra <amodra@bigpond.net.au>
2810
2811 * elf32-ppc.c (is_ppc_elf_target): New function.
2812 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2813 for bfd_target_elf_flavour. Do this test before endian check.
2814 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2815 (ppc_elf_size_dynamic_sections): Likewise.
2816
6dc132d9
L
28172005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2818
2819 * elf-bfd.h (elf_backend_data): Add int to
2820 elf_backend_section_from_shdr.
2821 (bfd_elf_section_data): Update comment for this_idx.
2822 (_bfd_elf_make_section_from_shdr): Add int.
2823 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2824
2825 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2826 and use it to set this_idx in bfd_elf_section_data.
2827 (bfd_section_from_shdr): Pass shindex to
2828 _bfd_elf_make_section_from_shdr.
2829 (_bfd_elf_section_from_bfd_section): Use this_idx in
2830 bfd_elf_section_data to find section index.
2831
2832 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2833 index and pass it to _bfd_elf_make_section_from_shdr.
2834 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2835 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2836 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2837 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2838 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2839 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2840 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2841 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2842 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2843
cabd4ccc
DS
28442005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2845 Ross Ridge <rridge@csclub.uwaterloo.ca>
2846
2847 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2848 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2849 cases. Add comment.
2850
7451fd89
L
28512005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2852
2853 * elflink.c (elf_mark_used_section): Remove check for special
2854 sections.
2855
b4677f03
AS
28562005-03-18 Andreas Schwab <schwab@suse.de>
2857
2858 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2859 from bfd_vma to ia64_insn, remove broken cast.
2860
238d258f
NC
28612005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2862
8853c3d3 2863 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
2864 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2865 elf_m68k_finish_dynamic_sections): Use it.
2866
b294bdf8
MM
28672005-03-17 Paul Brook <paul@codesourcery.com>
2868 Dan Jacobowitz <dan@codesourcery.com>
2869 Mark Mitchell <mark@codesourcery.com>
2870
2871 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2872 (elf32_arm_additional_program_headers): Likewise.
2873 (elf_backend_modify_segment_map): Define.
2874 (elf_backend_additional_program_headers): Likewise.
2875 (elf32_arm_symbian_modify_segment_map): Use
2876 elf32_arm_modify_segment_map.
2877
257a4820
L
28782005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2879
2880 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2881 for special sections.
2882
554220db
AM
28832005-03-18 Alan Modra <amodra@bigpond.net.au>
2884
2885 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2886 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2887 section_sym_count param, and return number of section symbols.
2888 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2889 .dynsym contents. Don't bother calling swap_symbol_out on the
2890 first all-zero dynsym.
2891 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2892 special sections like bfd_abs_section.
2893 (bfd_elf_gc_sections): Spelling fix.
2894
36868d45
NC
28952005-03-16 Fred Fish <fnf@specifixinc.com>
2896
2897 PR binutils/790
2898 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2899 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2900
57316bff
L
29012005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2902
2903 * elflink.c (elf_mark_used_section): New.
2904 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2905 non-relocatable link if we don't do GC.
2906
1ad12f97
NC
29072005-03-16 Nick Clifton <nickc@redhat.com>
2908 Ben Elliston <bje@au.ibm.com>
2909
569acd2c 2910 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 2911 compiler command line. Enabled by default. Disable via
569acd2c 2912 --disable-werror.
1ad12f97
NC
2913 * configure: Regenerate.
2914
3b5d3310
NC
29152005-03-16 Nick Clifton <nickc@redhat.com>
2916
2917 * ecoff.c: Convert to ISO C90 formatting.
2918
25dbc73a
AM
29192005-03-16 Alan Modra <amodra@bigpond.net.au>
2920
2921 * elf32-ppc.c: Divide file into general and linker specific
2922 functions. Sort linker functions into roughly the order in which
2923 they are called by the ELF linker code.
2924
cb2d1ef2
AM
29252005-03-16 Alan Modra <amodra@bigpond.net.au>
2926
2927 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2928 on section. Correct comment, and add FIXME.
2929 (ppc_elf_additional_program_headers): Don't bump header count for
2930 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2931 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2932 do allocate memory if they need it.
2933
34723071
NC
29342005-03-15 Mikkel Krautz <krautz@gmail.com>
2935
2936 * config.bfd (x86_64-elf): Add target.
2937
729ae8d2
AM
29382005-03-15 Alan Modra <amodra@bigpond.net.au>
2939
2940 * po/es.po: Commit new Spanish translation.
2941
f0581930
L
29422005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2943
2944 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2945 for global symbol when reporting overflow.
2946
390c0e42
JJ
29472005-03-11 Jakub Jelinek <jakub@redhat.com>
2948
2949 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2950 * libbfd.h: Rebuilt.
2951 * archive.c (_bfd_ar_spacepad): New function.
2952 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2953 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2954 coff_write_armap): Use it.
2955 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2956 uid/gid support.
2957 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2958
a2633f4e
MK
29592005-03-10 Mark Kettenis <kettenis@gnu.org>
2960
2961 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2962 has_table to the start of the function.
2963
109f7096
BE
29642005-03-10 Ben Elliston <bje@au.ibm.com>
2965
2966 * archive.c: Include hashtab.h.
2967 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2968 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2969 (hash_file_ptr): New function.
2970 (eq_file_ptr): Likewise.
2971 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2972 * libbfd-in.h: Include hashtab.h.
2973 (struct artdata): Change `cache' member type to htab_t.
2974 * libbfd.h: Rebuild.
2975
664fe1be
DJ
29762005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2977
2978 * configure.in: Bump version to 2.16.90.
2979 * configure: Regenerated.
2980
0709bb22
JJ
29812005-03-07 Jakub Jelinek <jakub@redhat.com>
2982
2983 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2984 close is a function like macro in system headers.
2985
b18e2ae5
AM
29862005-03-07 Alan Modra <amodra@bigpond.net.au>
2987
2988 PR ld/778
2989 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2990 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2991
1f170678
AM
29922005-03-06 Alan Modra <amodra@bigpond.net.au>
2993
2994 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2995
06647dfd
AM
29962005-03-05 Alan Modra <amodra@bigpond.net.au>
2997
2998 * po/bfd.pot: Regenerate.
2999
93f3fa99
AM
30002005-03-05 Alan Modra <amodra@bigpond.net.au>
3001
3002 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3003 with is_func.
3004 (func_desc_adjust): Force dot-syms local in executables as well
3005 as shared libs.
3006
bbe506e8
TS
30072005-03-04 David Daney <ddaney@avtrex.com>
3008
3009 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3010 '__gnu_local_gp' symbol used by gas -mno-shared.
3011
d27f5fa1
L
30122005-03-03 H.J. Lu <hongjiu.lu@intel.com>
3013
3014 * elf-bfd.h (elf_backend_data): Add "const char *" to
3015 elf_backend_section_from_phdr.
3016
3017 * elf.c (bfd_section_from_phdr): Pass "proc" to the
3018 elf_backend_section_from_phdr hook.
3019
0f20cc35
DJ
30202005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
3021 Joseph Myers <joseph@codesourcery.com>
3022
3023 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3024 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3025 and tls_ldm_offset.
3026 (struct mips_elf_got_per_bfd_arg): Add global_count.
3027 (struct mips_elf_count_tls_arg): New.
3028 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3029 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3030 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3031 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3032 (TLS_RELOC_P): Define.
3033 (TP_OFFSET, DTP_OFFSET): Define.
3034 (dtprel_base, tprel_base): New functions.
3035 (mips_elf_link_hash_newfunc): Initialize tls_type.
3036 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3037 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3038 TLS entries.
3039 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3040 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3041 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3042 (mips_tls_got_index): New functions.
3043 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3044 arguments. Pass them to mips_elf_create_local_got_entry. Use
3045 mips_tls_got_index.
3046 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3047 Handle TLS entries.
3048 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3049 mips_elf_create_local_got_entry.
3050 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3051 arguments. Handle TLS entries.
3052 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3053 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
3054 TLS entries.
3055 (mips_elf_record_global_got_symbol): Likewise.
3056 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3057 Count TLS entries.
3058 (mips_elf_merge_gots): Handle TLS entries when merging.
3059 (mips_elf_initialize_tls_index): New function.
3060 (mips_elf_set_global_got_offset): Handle TLS entries.
3061 (mips_elf_adjust_gp): Handle TLS.
3062 (mips_elf_multi_got): Remove redundant call to
3063 mips_elf_resolve_final_got_entries. Initialize global_count.
3064 Correct a comment. Initialize new TLS members of mips_got_info.
3065 Assign TLS GOT indexes for new GOTs.
3066 (mips_elf_create_got_section): Initialize new TLS members of
3067 mips_got_info.
3068 (mips_elf_calculate_relocation): Handle TLS relocs.
3069 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
3070 functions.
3071 (_bfd_mips_elf_always_size_sections): Handle TLS.
3072 (_bfd_mips_elf_size_dynamic_sections): Likewise.
3073 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
3074 changed functions.
3075 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3076 (_bfd_mips_elf_hide_symbol): Handle TLS.
3077 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3078 (mips_reloc_map): Add TLS relocs.
3079 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3080 * elf64-mips.c (mips_elf64_howto_table_rel)
3081 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3082 * reloc.c: Define new MIPS TLS relocations.
3083 * libbfd.h, bfd-in2.h: Regenerated.
3084
bb14f524
JB
30852005-03-02 Jan Beulich <jbeulich@novell.com>
3086
3087 * Makefile.am: Add dependency of cache.o on libiberty.h.
3088 * cache.c: Include libiberty.h.
3089 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3090
8c1acd09
ZW
30912005-03-01 Zack Weinberg <zack@codesourcery.com>
3092
3093 * elf.c (bfd_section_from_shdr <default case>): Call
3094 elf_backend_section_from_shdr hook unconditionally, and return
3095 what it returns.
3096 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3097 * elfxx-target.h (elf_backend_section_from_shdr)
3098 (elf_backend_section_from_phdr): Default to
3099 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3100 respectively.
3101
70bfecec
AM
31022005-03-01 Alan Modra <amodra@bigpond.net.au>
3103
a67a7b8b
AM
3104 * targets.h: Typo fix.
3105 * bfd-in2.h: Regenerate.
3106
70bfecec
AM
3107 * bout.c (b_out_write_object_contents): Don't use sizeof on host
3108 structs to size on-disk structures.
3109 (b_out_set_section_contents): Size the external struct, not the
3110 internal one for on-disk size.
3111 (b_out_sizeof_headers): Likewise.
3112
ceb1f1ef
AM
31132005-03-01 Alan Modra <amodra@bigpond.net.au>
3114
3115 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3116 entry points with the func descriptor as well as undefweak.
3117
f67e617a
NC
31182005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
3119
3120 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3121 present when IMPORT_NAME_UNDOECRATE is used.
3122
af44c138
L
31232005-02-28 H.J. Lu <hongjiu.lu@intel.com>
3124
3125 PR 757
3126 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3127 int.
3128
3129 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3130 to _bfd_elf_merge_symbol.
3131
3132 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3133 unsigned int to return the alignment of the old common symbol
3134 in the dynamic object.
3135 (_bfd_elf_add_default_symbol): Pass NULL to
3136 _bfd_elf_merge_symbol.
3137 (elf_link_add_object_symbols): Pass &old_alignment to
3138 _bfd_elf_merge_symbol. Get the alignment of the new common
3139 symbol in the dynamic object.
3140
10adf131
BE
31412005-02-24 Ben Elliston <bje@au.ibm.com>
3142
3143 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3144 * format.c (bfd_check_format_matches): Likewise.
3145 * archive.c (BFD_GNU960_ARMAG): Likewise.
3146 (bfd_generic_archive_p): Likewise.
3147 (_bfd_write_archive_contents): Likewise.
3148
60b779bf
L
31492005-02-24 H.J. Lu <hongjiu.lu@intel.com>
3150
3151 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3152 * configure: Regenerate.
3153
1f02cbd9
JB
31542005-02-24 Julian Brown <julian@sirius.codesourcery.com>
3155
3156 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3157 COMDAT group sections to have default visibility.
3158
f60ca5e3
AM
31592005-02-24 Alan Modra <amodra@bigpond.net.au>
3160
3161 * coffcode.h (coff_print_aux): Warning fix.
3162 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3163 instead of section pointer to identify.
3164 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
3165 the correct size buffer for local sym mangling too.
3166 (h8300_bfd_link_add_symbols): Likewise.
3167 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3168 warning.
3169 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3170 * elf32-xtensa.c (literal_value_hash): Warning fix.
3171 * versados.c (process_otr): Warning fix.
3172 (versados_canonicalize_reloc): Likewise.
3173 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3174 * vms.c (fill_section_ptr): Warning fix.
3175
9a5d8e72
L
31762005-02-23 H.J. Lu <hongjiu.lu@intel.com>
3177
3178 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3179 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3180
4b6c0f2f
NC
31812005-02-23 Nick Clifton <nickc@redhat.com>
3182
abc0f8d0
NC
3183 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3184 the relvaddr field of the Elf32_crinfo structure.
3185
9b69b847
NC
3186 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3187 variables that are passed by reference to
3188 m68hc11_get_relocation_value in case that function does not
3189 initialise them.
3190
90e868ac
NC
3191 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3192 return statements and replace with a single return at the end of
3193 the function. This helps pacify the flow analysis code in gcc 4.0.
3194
4b6c0f2f
NC
3195 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3196 strtab to avoid compile time warning.
3197
c3e8c140
BE
31982005-02-23 Ben Elliston <bje@au.ibm.com>
3199
3200 * opncls.c (bfd_zalloc): Document this function.
3201
ebe372c1
L
32022005-02-21 H.J. Lu <hongjiu.lu@intel.com>
3203
3204 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3205 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3206 Replace SEC_SHARED with SEC_COFF_SHARED.
3207 (styp_to_sec_flags): Likewise.
3208
3209 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3210 (TARGET_LITTLE_SYM): Likewise.
3211
3212 * section.c (SEC_ARCH_BIT_0): Removed.
3213 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3214 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3215 (SEC_SHARED): Renamed to ...
3216 (SEC_COFF_SHARED): This.
3217 (SEC_BLOCK): Renamed to ...
3218 (SEC_TIC54X_BLOCK): This.
3219 (SEC_CLINK): Renamed to ...
3220 (SEC_TIC54X_CLINK): This.
3221 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3222 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3223 end.
3224 * bfd-in2.h: Regenerated.
3225
26bf4e33
FF
32262005-02-21 Fred Fish <fnf@specifixinc.com>
3227
3228 * dwarf2.c (find_abstract_instance_name): Call recursively
3229 to handle a DW_AT_specification.
3230
e6daada3
TS
32312005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3232
3233 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3234 mips_elf_create_dynamic_relocation,
3235 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3236 Remove #if 0'd code.
3237
d25604af
AM
32382005-02-21 Alan Modra <amodra@bigpond.net.au>
3239
3240 * Makefile.am: Run "make dep-am"
3241 * Makefile.in: Regenerate.
3242
fedf8d51
AM
32432005-02-21 Alan Modra <amodra@bigpond.net.au>
3244
3245 * coffgen.c (bfd_coff_get_comdat_section): Check that
3246 coff_section_data isn't NULL.
3247
f075ee0c
AM
32482005-02-21 Alan Modra <amodra@bigpond.net.au>
3249
3250 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3251 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3252 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3253 useless assignments.
3254 (xcoff_write_archive_contents_big): Likewise.
3255 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3256 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3257 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3258 * cofflink.c (process_embedded_commands): Warning fixes.
3259 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3260 Warning fixes.
3261 * dwarf2.c: Warning fixes.
3262 * elf-bfd.h: Likewise.
3263 * elf-eh-frame.c: Likewise.
3264 * elf-strtab.c: Likewise.
3265 * elf.c: Likewise.
3266 * elf32-m68k.c: Likewise.
3267 * elf32-ppc.c: Likewise.
3268 * elf32-sh-symbian.c: Likewise.
3269 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3270 * elf64-sh64.c: Likewise.
3271 * peicode.h: Likewise.
3272 * elf64-mmix.c: Warning fixes.
3273 * elfcode.h: Likewise.
3274 * elfxx-mips.c: Likewise.
3275 * libbfd-in.h: Likewise.
3276 * libbfd.c: Likewise.
3277 * mach-o.c: Likewise.
3278 * merge.c: Likewise.
3279 * mmo.c: Likewise.
3280 * opncls.c: Likewise.
3281 * pef.c: Likewise.
3282 * srec.c: Likewise.
3283 * vms-hdr.c: Likewise.
3284 * vms-tir.c: Likewise.
3285 * xtensa-isa.c: Likewise.
3286 * xtensa-modules.c: Likewise.
3287 * xsym.c: Likewise.
3288 (pstrcmp): Use correct choice of string lengths. Fix return value.
3289 (bfd_sym_module_name): Correct string length.
3290 * bfd-in2.h: Regenerate.
3291 * libbfd.h: Regenerate.
3292
68320ddb
AO
32932005-02-17 Alexandre Oliva <aoliva@redhat.com>
3294
3295 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 3296 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
3297 Reported by Alan Modra.
3298 (elf32_frv_relocate_section): Improve errors and warnings.
3299
1808e341
AM
33002005-02-17 Alan Modra <amodra@bigpond.net.au>
3301
3302 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3303
5ff625e9
AM
33042005-02-16 Alan Modra <amodra@bigpond.net.au>
3305
3306 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3307 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3308 * pef.c (bfd_pef_scan): Don't ignore return value of
3309 bfd_pef_scan_start_address.
7e3102a7
AM
3310 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3311 bfd_mach_o_scan_start_address.
3312 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3313 * elfxx-mips.c: Remove unnecessary prototypes.
3314 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 3315
92b7a70f
AM
33162005-02-16 Alan Modra <amodra@bigpond.net.au>
3317
3318 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3319 Skip toc reloc adjust if reloc_count is zero.
3320
d6f16593 33212005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 3322 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
3323
3324 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3325 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3326 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3327 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3328 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3329 dst_mask.
3330 (mips16_gprel_reloc): Remove bit shuffling; call
3331 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3332 and _bfd_mips16_elf_reloc_shuffle() instead.
3333 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3334 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3335 relocs.
3336 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3337 elf_mips16_howto_table_rel.
3338 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3339 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3340 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3341 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3342 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3343 dst_mask.
3344 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3345 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3346 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3347 placeholders.
3348 (mips16_gprel_reloc): Remove bit shuffling; call
3349 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3350 and _bfd_mips16_elf_reloc_shuffle() instead.
3351 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3352 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3353 relocs.
3354 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3355 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3356 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3357 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3358 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3359 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3360 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3361 dst_mask.
3362 (mips16_gprel_reloc): Remove bit shuffling; call
3363 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3364 and _bfd_mips16_elf_reloc_shuffle() instead.
3365 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3366 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3367 relocs.
3368 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3369 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3370 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3371 handle bit shuffling for MIPS16 relocs.
3372 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3373 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3374 and _bfd_mips16_elf_reloc_shuffle().
3375 (_bfd_mips_elf_generic_reloc): Likewise.
3376 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3377 and R_MIPS16_LO16.
3378 (mips_elf_obtain_contents): Remove bit shuffling.
3379 (mips_elf_perform_relocation): Likewise; call
3380 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3381 instead.
3382 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3383 and R_MIPS16_LO16.
3384 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3385 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3386 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3387 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3388 (BFD_RELOC_MIPS16_LO16): Likewise.
3389 * bfd-in2.h: Regenerate.
3390 * libbfd.h: Regenerate.
3391
0ca3e455
JB
33922005-02-15 Jan Beulich <jbeulich@novell.com>
3393
3394 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3395 R_IA64_DTPMOD64[LM]SB.
3396
c5509b92
L
33972005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3398
3399 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3400 backward branch in the same section.
3401 (elfNN_ia64_relocate_section): Inform users that the input
3402 section is too big to relax br instruction when overflow
3403 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3404 and R_IA64_PCREL21F.
3405
5cba516c
NC
34062005-02-14 Orjan Friberg <orjanf@axis.com>
3407
3408 * elfcore.h (elf_core_file_p): Move the call to
3409 elf_backend_object_p to allow the correct machine to be set before
3410 processing the program headers.
3411
b59a68e1
NC
34122005-02-14 Nick Clifton <nickc@redhat.com>
3413
3414 PR binutils/716
3415 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3416 aware flag from the input bfd to the output bfd.
3417
254f0426
MR
34182005-02-11 Maciej W. Rozycki <macro@mips.com>
3419
3420 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3421 R_MIPS_LITERAL relocations for external symbols.
3422 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3423 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3424
e91cdea7
L
34252005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3426
3427 * bfd-in2.h: Rebuilt.
3428
67687978
PB
34292005-02-11 Paul Brook <paul@codesourcery.com>
3430
3431 * elf-bfd.h (struct elf_link_hash_table): Add
3432 is_relocatable_executable.
3433 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3434 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3435 symbols in relocatable executables.
3436 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3437 relocatable executables.
3438 (_bfd_elf_link_renumber_dynsyms): Ditto.
3439 (bfd_elf_final_link): Ditto.
3440 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3441 relocations into relocatable executables.
3442 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3443 executables. Also copy absolute relocations.
3444 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3445 in relocatable executables.
3446 (allocate_dynrelocs): Copy relocations for relocatable executables.
3447 Output dynamic symbols for symbols defined in linker scripts.
3448
ca724bf2
NC
34492005-02-11 Nick Clifton <nickc@redhat.com>
3450
4b74b983
NC
3451 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3452 to avoid a compile time warning.
3453
ca724bf2
NC
3454 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3455 BFD_ASSERT.
3456
3e25964f
NC
3457 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3458 inclusion of coffcode.h so that it is actually picked up.
3459
cb7a88a4
NC
3460 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3461 case it is not used.
3462
596c83ec
NC
3463 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3464 structure and macro.
3465
6c408f53
NC
3466 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3467 array.
3468
d5b2f13b
NC
3469 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3470 to protect the declaration of this array.
3471
169a6afd
NC
3472 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3473 Avoid call to memcpy with a size of 0.
3474
2917689a
AM
34752005-02-12 Alan Modra <amodra@bigpond.net.au>
3476
3477 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3478 old-style branches to undefined dot-symbols which will be
3479 satisfied by a plt call.
3480
40d16e0b
AM
34812005-02-11 Alan Modra <amodra@bigpond.net.au>
3482
3483 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3484 (ppc64_elf_copy_indirect_symbol): ..here.
3485 (func_desc_adjust): Use move_plt_plist.
3486
e37c699c
PB
34872005-02-10 Paul Brook <paul@codesourcery.com>
3488
3489 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3490
6fa3860b
PB
34912005-02-10 Paul Brook <paul@codesourcery.com>
3492
3493 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3494 symbols local.
3495 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3496 (elf_link_renumber_local_hash_table_dynsyms): New function.
3497 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3498
d457dcf6
JJ
34992005-02-10 Jakub Jelinek <jakub@redhat.com>
3500
3501 * bfd-in.h (BFD_LINKER_CREATED): Define.
3502 * bfd-in2.h: Rebuilt.
3503 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3504 BFD_LINKER_CREATED bfds when determining input bfds without
3505 .note.GNU-stack section.
3506
7f05722e
MR
35072005-02-10 Maciej W. Rozycki <macro@mips.com>
3508
3509 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3510 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3511 relocations against external symbols unchanged.
3512
ccf5f610
PB
35132005-02-08 Paul Brook <paul@codesourcery.com>
3514
3515 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3516 sections.
3517
370a0e1b
HPN
35182005-02-08 Hans-Peter Nilsson <hp@axis.com>
3519
3520 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3521 prefix here.
3522
99277196
MR
35232005-02-07 Maciej W. Rozycki <macro@mips.com>
3524
3525 * elf64-mips.c: Fix formatting throughout.
3526
6422fbef
MR
35272005-02-07 Maciej W. Rozycki <macro@mips.com>
3528
3529 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3530
303e4c21
AO
35312005-02-07 Alexandre Oliva <aoliva@redhat.com>
3532
3533 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3534 *ABS*/*UND* sections.
3535 (elf32_frv_relocate_section): Move zero-addend-required error...
3536 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3537 missing needed TLS section.
3538
c3864421
HPN
35392005-02-07 Hans-Peter Nilsson <hp@axis.com>
3540
3541 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3542 being the last symbol.
9f400ee9
HPN
3543 (aout_link_add_symbols): Just return TRUE if a warning
3544 symbol was last.
c3864421 3545
765f2ef6
MR
35462005-02-07 Maciej W. Rozycki <macro@mips.com>
3547
3548 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3549 R_MIPS_GPREL32 relocations against external symbols.
3550 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3551 comment.
3552
1b3a8575
AM
35532005-02-07 Alan Modra <amodra@bigpond.net.au>
3554
3555 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3556 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3557 elf_string_from_elf_strtab.
3558 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3559 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3560 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3561 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3562 looking at cached symtab info first, before iterating over headers.
3563 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3564 * elfcode.h (elf_object_p): Don't load section header stringtab
3565 specially.
3566
90f487df
L
35672005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3568
3569 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3570 against protected function when building shared library.
3571
3572 PR 584
3573 * elf64-x86-64.c (is_32bit_relative_branch): New.
3574 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3575 protected function symbol when building shared library for
3576 32bit relative branch instruction.
3577
c4f68ce3
AM
35782005-02-06 Alan Modra <amodra@bigpond.net.au>
3579
3580 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3581 syms when doing a relocatable link.
3582 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3583 at u.def.section.
3584 (ppc64_elf_tls_setup): Likewise.
3585 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3586
908b32fc
AM
35872005-02-04 Alan Modra <amodra@bigpond.net.au>
3588
3589 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3590 (link_hash_newfunc): Clear all locals using memset.
3591 (make_fdh): Remove flags param. Always create fake func desc
3592 weak. Link the descriptor with the code entry sym.
3593 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3594 (add_symbol_adjust): Adjust make_fdh call.
3595 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3596 descriptor to strong undefined if code entry is strong.
3597
4ea42fb7
AM
35982005-02-04 Alan Modra <amodra@bigpond.net.au>
3599
3600 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3601 lookup here. Set to new before calling bfd_link_repair_undef_list.
3602 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3603
10d86c8a
AM
36042005-02-03 Alan Modra <amodra@bigpond.net.au>
3605
3606 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3607
11f25ea6
AM
36082005-02-03 Alan Modra <amodra@bigpond.net.au>
3609
3610 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3611 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3612 before the as-needed lib was loaded. Abort on unexpected refs.
3613
4f40114d
AM
36142005-02-02 Alan Modra <amodra@bigpond.net.au>
3615
ec13b3bb
AM
3616 * elflink.c (elf_smash_syms): Expand comments.
3617 (elf_link_add_object_symbols): Only call elf_smash_syms for
3618 as-needed dynamic objects.
3619
4f40114d
AM
3620 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3621 everything, just the field specific to ia64.
336549c1 3622 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 3623
bb700d78
AM
36242005-02-01 Alan Modra <amodra@bigpond.net.au>
3625
3626 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3627 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3628 undefined syms.
3629 (struct add_symbol_adjust_data): New.
3630 (add_symbol_adjust): Make an undefweak func desc for old ABI
3631 objects to link with --as-needed shared libs. Return fail status.
3632 Don't adjust old ABI func entry sym to weak if func desc syms
3633 isn't defined.
3634 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3635 and return status.
3636
1ffd1c2f
HPN
36372005-02-01 Hans-Peter Nilsson <hp@axis.com>
3638
3639 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3640 for clarity.
3641
77cfaee6
AM
36422005-02-01 Alan Modra <amodra@bigpond.net.au>
3643
3644 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3645 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3646 remove anything but new and undefweak.
3647 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3648 existing _DYNAMIC.
3649 (_bfd_elf_create_dynamic_sections): Formatting.
3650 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3651 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3652 (struct elf_smash_data): New.
3653 (elf_smash_syms): New function.
3654 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3655 unneeded dynamic objects to loaded list.
3656 (elf_link_output_extsym): Don't handle as-needed here. Strip
3657 bfd_link_hash_new symbols.
3658 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3659 delref when dynindx is already -1.
3660 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3661 symbols.
3662 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3663
b15c48d1
BE
36642005-02-01 Ben Elliston <bje@au.ibm.com>
3665
3666 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3667
0983f4eb 36682005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
3669
3670 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3671 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3672 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3673 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3674 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3675 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3676 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3677 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3678 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3679 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3680 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 3681 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
3682 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3683 throughout. Similarly, collapse #if 1'd code.
3684
36852005-02-01 Ben Elliston <bje@au.ibm.com>
3686
0983f4eb
BE
3687 * elf-bfd.h (bfd_elf_discard_group): Remove.
3688 * elf.c (bfd_elf_discard_group): Likewise.
3689 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3690
8c946ed5
RS
36912005-01-31 Richard Sandiford <rsandifo@redhat.com>
3692
3693 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3694 (_bfd_elf_eh_frame_address_size): Declare.
3695 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3696 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3697 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3698 (elf_backend_eh_frame_address_size): Define.
3699 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3700 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3701 size from the new backend hook.
3702 (_bfd_elf_write_section_eh_frame): Likewise.
3703 (_bfd_elf_eh_frame_address_size): New function.
3704
c46f8c51
AC
37052005-01-31 Andrew Cagney <cagney@gnu.org>
3706
3707 * configure: Regenerate to track ../gettext.m4.
3708
5cd3778d
MM
37092005-01-31 Mark Mitchell <mark@codesourcery.com>
3710
3711 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3712 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 3713
d6486796
NC
37142005-01-31 Nick Clifton <nickc@redhat.com>
3715
3716 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3717 sparc-lynxos, vax-vms) be obsolete.
3718
b1342370
DJ
37192005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3720
3721 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3722 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3723 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3724 * elfcode.h (elf_object_p): Use minpagesize instead of
3725 maxpagesize.
3726 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3727 (elfNN_bed): Include ELF_MINPAGESIZE.
3728
319850b4
JB
37292005-01-28 Julian Brown <julian@codesourcery.com>
3730
3731 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3732 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3733 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3734 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 3735 passing flag value from ld. Set flag value in global hash table entry.
319850b4 3736 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 3737 relocation.
319850b4 3738
a53bf506
AC
37392005-01-27 Andrew Cagney <cagney@gnu.org>
3740
3741 * configure: Regenerate to track ../gettext.m4 change.
3742
dc4c9c19
MM
37432005-01-25 Mark Mitchell <mark@codesourcery.com>
3744
3745 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 3746 SymbianOS.
dc4c9c19 3747
90219bd0
AO
37482005-01-25 Alexandre Oliva <aoliva@redhat.com>
3749
3750 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3751 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3752 for TLSMOFF.
3753 * reloc.c: Add R_FRV_TLSMOFF.
3754 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3755 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3756 (elf32_frv_relocate_section): Handle it.
3757 (elf32_frv_check_relocs): Likewise.
3758 * libbfd.h, bfd-in2.h: Rebuilt.
3759 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3760 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3761 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3762 such that they return the constant in gr9.
3763 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3764 symbols.
3765 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3766 too, such that they shrink on relaxation.
3767 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3768 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3769 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3770 if we can guarantee the use of 16-bit constants.
3771 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3772 Introduce TLS support for FR-V FDPIC.
3773 * reloc.c: Add TLS relocations.
3774 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3775 (elf32_frv_rel_tlsdesc_value_howto): New.
3776 (elf32_frv_rel_tlsoff_howto): New.
3777 (frv_reloc_map): Add new mappings.
3778 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3779 reloc information.
3780 (frvfdpic_dynamic_got_plt_info): New.
3781 (frvfdpic_plt_tls_ret_offset): New.
3782 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3783 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3784 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3785 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3786 section as local.
3787 (struct frvfdpic_relocs_info): Add TLS fields.
3788 (frvfdpic_relocs_info_hash): Warning clean up.
3789 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3790 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3791 (FRVFDPIC_TLS_BIAS): Define.
3792 (tls_biased_base): New.
3793 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3794 relocations.
3795 (frv_reloc_type_lookup): Likewise.
3796 (frvfdpic_info_to_howto_rel): Likewise.
3797 (elf32_frv_relocate_section): Likewise.
3798 (_frv_create_got_section): Create the PLT section here.
3799 (elf32_frvfdpic_create_dynamic_sections): Not here.
3800 (_frvfdpic_count_nontls_entries): Move out of...
3801 (_frvfdpic_count_got_plt_entries): ... here.
3802 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3803 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3804 support.
3805 (_frvfdpic_relax_tls_entries): New.
3806 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3807 (_frvfdpic_get_tlsdesc_entry): New.
3808 (_frvfdpic_assign_got_entries): Add TLS support.
3809 (_frvfdpic_assign_plt_entries): Likewise.
3810 (_frvfdpic_reset_got_plt_entries): New.
3811 (_frvfdpic_size_got_plt): Move out of...
3812 (elf32_frvfdpic_size_dynamic_sections): ... here.
3813 (_frvfdpic_relax_got_plt_entries): New.
3814 (elf32_frvfdpic_relax_section): New.
3815 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3816 (elf32_frv_check_relocs): Add TLS support.
3817 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3818 * libbfd.h, bfd-in2.h: Rebuilt.
3819
8615f3f2
AM
38202005-01-25 Alan Modra <amodra@bigpond.net.au>
3821
3822 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3823 loadable reloc sections.
3824 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3825 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3826
7e9f0867
AM
38272005-01-25 Alan Modra <amodra@bigpond.net.au>
3828
3829 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3830 sections immediately when linking shared libs. Instead, wait until
3831 we know a lib is needed.
3832 (_bfd_elf_link_create_dynstrtab): Extract from..
3833 (_bfd_elf_link_create_dynamic_sections_): ..here.
3834 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3835 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3836 for non-existent .dynamic.
3837 (elf_link_output_extsym): Don't complain about undefined symbols
3838 in as-needed dynamic libs that aren't actually linked.
3839
45181ed1
AC
38402005-01-24 Andrew Cagney <cagney@gnu.org>
3841
3842 * configure: Regenerate, ../gettext.m4 was updated.
3843
753e3eb6
BE
38442005-01-21 Ben Elliston <bje@au.ibm.com>
3845
3846 * aout-encap.c: Remove unused file.
3847
1c16dfa5
L
38482005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3849
3850 PR 679
3851 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3852 non-function symbols are local.
3853 (_bfd_elf_symbol_refs_local_p): Likewise.
3854
1449d79b
AM
38552005-01-18 Alan Modra <amodra@bigpond.net.au>
3856
3857 * bfd.c (bfd_link_just_syms): Add abfd param.
3858 * bfd-in2.h: Regenerate.
3859
dcf507a6
RS
38602005-01-17 Richard Sandiford <rsandifo@redhat.com>
3861
3862 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3863 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3864 instructions. If the amount of padding is known, reduce the size
3865 of the CIE or FDE by that amount.
3866
2c42be65
RS
38672005-01-17 Richard Sandiford <rsandifo@redhat.com>
3868
3869 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3870 augmentation_size. Use bfd_signed_vmas for data_align.
3871 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3872 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3873 functions. Don't read past the end of the enclosing CIE or FDE.
3874 (skip_bytes): New utility function.
3875 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3876 sanity checking.
3877 (_bfd_elf_write_section_eh_frame): Use new functions.
3878
acfe5567
RS
38792005-01-17 Richard Sandiford <rsandifo@redhat.com>
3880
3881 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3882 assert-style REQUIRE() macro to handle sanity checks.
3883
c0c28ab8
L
38842005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3885
3886 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3887 (comp_unit): Here.
3888 (read_unsigned_leb128): Removed.
3889 (read_signed_leb128): Removed.
3890 (find_abstract_instance_name): Updated.
3891 (parse_comp_unit): Accept info_ptr_unit.
3892 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3893 comp unit and pass it to parse_comp_unit.
3894
3895 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3896 (read_signed_leb128): Moved to ...
3897 * libbfd.c: Here.
3898
3899 * libbfd-in.h (read_unsigned_leb128): New prototype.
3900 (read_signed_leb128): Likewise.
3901 * libbfd.h: Regenerated.
3902
e38bc3b5
NC
39032005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3904 Nick Clifton <nickc@redhat.com>
3905
3906 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3907 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3908 arch_sh4a_nofpu_up in order to match the external names and make the
3909 testsuite's job easier.
3910 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3911 names.
3912 * bfd-in2.h: Regenerate.
3913
8fb84ecc
AC
39142005-01-15 Andrew Cagney <cagney@gnu.org>
3915
3916 * bfd.m4: New file.
3917 * acinclude.m4: Move BFD_NEED_DECLARATION,
3918 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3919 the new file bfd.m4. Include ../bfd/bfd.m4.
3920 * configure: Re-generate.
8615f3f2 3921
b4a38de6
AM
39222005-01-12 Alan Modra <amodra@bigpond.net.au>
3923
3924 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3925 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3926 reaching PLT.
3927 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3928 R_PPC_RELAX32PC_PLT.
3929
3eb128b2
AM
39302005-01-11 Alan Modra <amodra@bigpond.net.au>
3931
3932 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3933 symbols.
3934 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3935 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3936 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3937 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3938 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3939 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3940 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3941 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3942 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3943 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3944 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3945 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3946 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3947 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3948
264a1fe0
AM
39492005-01-11 Alan Modra <amodra@bigpond.net.au>
3950
3951 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3952 .dynsbss flags.
3953
5c4504f7
NC
39542005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3955
3956 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3957 * bfd-in2.h: Regenerate.
3958 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3959 to support these new machine values.
3960 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3961 the maxq10.
3962 (bfd_maxq_arch): Update values for the maxq20.
3963
669460c7
EB
39642005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3965
3966 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3967 non-shared object, do not reserve space in .plt and .rela.plt for
3968 regular symbols neither defined nor referenced in shared objects.
3969
a51a7930
EB
39702005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3971
01aac484
EB
3972 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3973 to zero the structure.
3974 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
3975 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3976 'srelgot' fields.
3977 (create_got_section): New function.
3978 (sparc64_elf_create_dynamic_sections): Likewise.
3979 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3980 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3981 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3982 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3983 (sparc64_elf_finish_dynamic_symbol): Likewise.
3984 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3985 (elf_backend_create_dynamic_sections): Define to
3986 sparc64_elf_create_dynamic_sections.
3987
151e5294
EB
39882005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3989
3990 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3991 (elf_backend_omit_section_dynsym): Define to it.
3992 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3993 (elf_backend_omit_section_dynsym): Define to it.
3994
6f79b219
JJ
39952005-01-07 Jakub Jelinek <jakub@redhat.com>
3996
3997 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3998 PT_DYNAMIC segment, unless .dynamic.
3999
4e7fd91e
PB
40002005-01-06 Paul Brook <paul@codesourcery.com>
4001
4002 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4003 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4004 * configure: Regenerate.
4005 * elf32-arm.c: Add VxWorks target bfd.
4006 (USE_REL): Remove.
4007 (elf32_arm_link_hash_table): Add use_rel.
4008 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4009 elf32_arm_relocate_section): Replace USE_REL with runtime check.
4010 Correct offset calculation for RELA case.
4011 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4012 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4013 (elf32_arm_vxworks_link_hash_table_create): New function.
4014 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4015 (bfd_elf32_littlearm_vxworks_vec): Ditto.
4016 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4017
4c52953f
AM
40182005-01-06 Alan Modra <amodra@bigpond.net.au>
4019
4020 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4021 multi_toc_needed.
4022 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4023 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4024 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4025 (ppc64_elf_next_toc_section): Heed no_multi_toc.
4026 (ppc64_elf_reinit_toc): Set multi_toc_needed.
4027 (toc_adjusting_stub_needed): Rewrite.
4028 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4029 toc tests. Adjust for toc_adjusting_stub_needed changes.
4030 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4031 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4032 * section.c: Expand comment on backend bits.
4033 * bfd-in2.h: Regenerate.
4034 * libbfd.h: Regenerate.
4035
f03d65b4
AM
40362005-01-06 Alan Modra <amodra@bigpond.net.au>
4037
4038 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4039 toc adjusting stub, do not test source section flags.
4040
8af139b3
EB
40412005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
4042
4043 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4044 from STABS debugging sections again.
4045
06f22d7e
FF
40462005-01-05 Fred Fish <fnf@specifixinc.com>
4047
4048 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4049 (find_abstract_instance_name): New function.
4050 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4051 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4052 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4053
83a358aa
PB
40542004-12-31 Paul Brook <paul@copdesourcery.com>
4055
4056 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4057
b996922c
AM
40582004-12-31 Alan Modra <amodra@bigpond.net.au>
4059
4060 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4061 Commit missing changes from 2004-12-22.
4062 * bfd-in2.h: Regenerate.
4063
17a83432
TL
40642004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
4065
4066 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4067
d69f560c
KW
40682004-12-21 Kris Warkentin <kewarken@qnx.com>
4069
4070 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4071 Add 'base' argument for constructing register sections. Reformat.
4072 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4073 gp and fp regs. Reformat.
4c52953f 4074
750bce0e
NC
40752004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
4076
4077 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4078 * bfd-in2.h: Regenerate.
4079 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4080 (avr_reloc_map): Likewise.
4081 (avr_final_link_relocate): Likewise.
4082
a5db907e
AM
40832004-12-22 Alan Modra <amodra@bigpond.net.au>
4084
4085 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4086 as-needed dynamic libs as undefined.
4087 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4088 libs when finding they are needed.
4089
8860955f
AM
40902004-12-20 Alan Modra <amodra@bigpond.net.au>
4091
4092 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4093 (opd_entry_value): Use opd_relocs if available.
4094 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
4095 copy .opd relocations to opd_relocs.
4096 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4097
1e50d24d
RS
40982004-12-16 Richard Sandiford <rsandifo@redhat.com>
4099
4100 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4101 * elf32-v850.c (v850_elf_howto_table): Add entry for
4102 R_V850_LO16_SPLIT_OFFSET.
4103 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4104 (v850_elf_perform_lo16_relocation): New function, extracted from...
4105 (v850_elf_perform_relocation): ...here. Use it to handle
4106 R_V850_LO16_SPLIT_OFFSET.
4107 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4108 R_V850_LO16_SPLIT_OFFSET.
4109 * libbfd.h, bfd-in2.h: Regenerate.
4110
2fbd2a87
NC
41112004-12-14 P.J. Darcy <darcypj@us.ibm.com>
4112
4113 * config.bfd: Add s390x-ibm-tpf support.
4114
06302770
TL
41152004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
4116
8860955f 4117 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
4118 to prototype, to make hash info available.
4119 Prevent wrapped symbols from being adjusted twice.
4120
c314987d
RS
41212004-12-14 Richard Sandiford <rsandifo@redhat.com>
4122
4123 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4124 overflow for calls to undefined weak symbols.
4125
5c799c07
AM
41262004-12-11 Alan Modra <amodra@bigpond.net.au>
4127
4128 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4129 canonical sections syms have a name.
4130
645ea6a9
AM
41312004-12-11 Alan Modra <amodra@bigpond.net.au>
4132
4133 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4134 have been adjusted for output.
4135 (ppc64_elf_relocate_section): Mark sections with reloc_done.
4136
0e2cfdce
AM
41372004-12-10 Alan Modra <amodra@bigpond.net.au>
4138
be8dd2ca
AM
4139 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4140 add symtab_hdr param.
0e2cfdce
AM
4141 (group_signature): Update calls.
4142 * elf-bfd.h (bfd_elf_sym_name): Update.
4143 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
4144 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4145 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
4146 * elflink.c (elf_link_input_bfd): Update.
4147
138f35cc
JJ
41482004-12-10 Jakub Jelinek <jakub@redhat.com>
4149
4150 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4151 st_shndx on STT_SECTION sections.
4152
f9cfae62
DJ
41532004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
4154
4155 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4156 ELF section symbols.
4157
0d2e43ed
ILT
41582004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
4159
1367d393
ILT
4160 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4161 return a real value, unless it is a PLT symbol.
4162 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4163 bal if possible.
4164
74f79d8d
ILT
4165 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4166 R_MIPS_JALR entry to 0.
4167
0d2e43ed
ILT
4168 * archures.c: Define bfd_mach_mips9000.
4169 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4170 (mips_set_isa_flags): Handle bfd_mach_mips9000.
4171 * cpu-mips.c (I_mips9000): Define.
4172 (arch_info_struct): Add case for bfd_mach_mips9000.
4173 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4174 * bfd-in2.h: Regenerate.
4175
728b2f21
ILT
41762004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
4177
4178 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4179 overflow.
4180
45ab555d
BE
41812004-12-07 Ben Elliston <bje@gnu.org>
4182
4183 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4184
1511ddaf
DJ
41852004-12-06 Daniel Jacobowitz <dan@debian.org>
4186
4187 Suggested by Fergal Daly <fergal@esatclear.ie>:
4188 * simple.c (simple_dummy_multiple_definition): New function.
4189 (bfd_simple_get_relocated_section_contents): Use it.
4190
41912004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
4192
4193 * elf.c (elf_find_function): Don't use the last file symbol ever,
4194 seen, but the last one seen prior to the symbol being reported.
4195 Don't report a filename at all for global symbols when that might
4196 be ambiguous/wrong.
4197
94a3258f
PB
41982004-12-01 Paul Brook <paul@codesourcery.com>
4199
4200 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4201 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4202 version.
4203
529fcb95
PB
42042004-12-01 Paul Brook <paul@codesourcery.com>
4205
4206 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4207 sections undefined.
4208
dea514f5
PB
42092004-11-30 Paul Brook <paul@codesourcery.com>
4210
4211 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4212 no_pipeline_knowledge
4213 (elf32_arm_link_hash_table_create): Ditto.
4214 (bfd_elf32_arm_process_before_allocation): Ditto.
4215 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4216 handling.
4217 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4218 prototype.
4219 * bfd-in2.h: Regenerate.
4220
edfc032f
AM
42212004-11-30 Randolph Chung <tausq@debian.org>
4222
4223 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4224 (elf32_hppa_grok_psinfo): New function.
4225 (elf_backend_grok_prstatus): Define.
4226 (elf_backend_grok_psinfo): Define.
4227
0be9069d
L
42282004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4229
4230 PR 574:
4231 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4232
47cc2cf5
PB
42332004-11-24 Paul Brook <paul@codesourcery.com>
4234
4235 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4236
0beaef2b
PB
42372004-11-24 Paul Brook <paul@codesourcery.com>
4238
4239 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4240 (elf32_arm_swap_symbol_out): New function.
4241 (elf32_arm_size_info): Add.
4242 (elf_backend_size_info): Define.
4243
3dd2fcf0
DA
42442004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4245
4246 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4247 make_bfd_asection.
4248
de52dba4
AM
42492004-11-19 Alan Modra <amodra@bigpond.net.au>
4250
4251 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4252 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4253 * nlmcode.h (nlm_write_object_contents): Warning fix.
4254
288f74fa
BW
42552004-11-18 Bob Wilson <bob.wilson@acm.org>
4256
4257 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4258
b7693d02
DJ
42592004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4260
4261 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4262 (elf32_arm_plt_thumb_stub): New.
4263 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4264 and plt_got_offset.
4265 (elf32_arm_link_hash_traverse): Fix typo.
4266 (elf32_arm_link_hash_table): Add obfd.
4267 (elf32_arm_link_hash_newfunc): Initialize new fields.
4268 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4269 (elf32_arm_link_hash_table_create): Initialize obfd.
4270 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4271 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4272 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4273 interworking BFD is not dynamic.
4274 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4275 not emit glue for PLT references.
4276 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4277 emit glue for PLT references. Support the Thumb PLT prefix.
4278 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4279 plt_thumb_refcount.
4280 (elf32_arm_check_relocs): Likewise.
4281 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4282 plt_thumb_refcount.
4283 (allocate_dynrelocs): Handle Thumb PLT references.
4284 (elf32_arm_finish_dynamic_symbol): Likewise.
4285 (elf32_arm_symbol_processing): New function.
4286 (elf_backend_symbol_processing): Define.
4287
353057a5
RS
42882004-11-16 Richard Sandiford <rsandifo@redhat.com>
4289
4290 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4291 add_fde_encoding. Remove need_relative.
4292 * elf-eh-frame.c (extra_augmentation_string_bytes)
4293 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4294 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4295 in cases where the CIE has no existing 'R' augmentation. Use
4296 size_of_output_cie_fde when assigning offsets. Use the final offset
4297 as the new section size.
4298 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4299 Account for any extra augmentation bytes in the returned offset.
4300 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4301 moved before being modified. Pad growing entries with DW_CFA_nops.
4302 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4303 and add_fde_encoding.
4304
b32d3aa2
MM
43052004-11-15 Mark Mitchell <mark@codesourcery.com>
4306
4307 * elf32-arm.c (elf32_arm_relocate_section): Use
4308 arm_real_reloc_type.
4309
5d41f0b6
RS
43102004-11-16 Richard Sandiford <rsandifo@redhat.com>
4311
4312 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4313 for discard relocations; don't add an R_MIPS_NONE to the main body
4314 of .rel.dyn.
4315
fc0e6df6
PB
43162004-11-04 Paul Brook <paul@codesourcery.com>
4317
4318 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4319 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4320 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4321 default version definition for unversioned symbols.
4322 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4323 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4324 _bfd_elf_slurp_version_tables. Set default version for unversioned
4325 imported symbols.
4326
b23e50e2
PB
43272004-11-15 Paul Brook <paul@codesourcery.com>
4328
4329 * elflink.c (elf_link_add_object_symbols): Don't assume version
4330 indices are consecutive.
4331
f4a6705c
RS
43322004-11-14 Richard Sandiford <rsandifo@redhat.com>
4333
4334 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4335 composite relocations against the personality data.
4336
ee06dc07
PB
43372004-11-13 Paul Brook <paul@codesourcery.com>
4338
4339 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4340 R_ARM_PREL31 relocations to PLT entries.
4341 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4342 (elf32_arm_check_relocs): Ditto.
4343
a1ace8d8
BW
43442004-11-12 Bob Wilson <bob.wilson@acm.org>
4345
4346 * xtensa-isa.c (xtensa_interface_class_id): New.
4347
e4115460
BW
43482004-11-11 Bob Wilson <bob.wilson@acm.org>
4349
4350 * elf32-xtensa.c (property_table_compare): Remove assertion about
4351 entries with the same address and non-zero size.
4352 (xtensa_read_table_entries): Report such entries as errors.
4353
6366ff1e
MM
43542004-11-11 Mark Mitchell <mark@codesourcery.com>
4355
4356 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4357 R_ARM_RELATIVE on Symbian OS.
4358
b34af79c
MM
43592004-11-09 Mark Mitchell <mark@codesourcery.com>
4360
e6dc21b6
MM
4361 * som.c (som_bfd_print_private_bfd_data): New function.
4362 (som_object_setup): Save the auxiliary header. Don't assume that
4363 zero is an invalid entry point for a shared library.
4364 (som_object_p): Allocate the auxiliary header on the heap.
4365
b34af79c
MM
4366 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4367 declaration.
4368 (elf32_arm_symbian_modify_segment_map): Likewise.
4369
08d1f311
DJ
43702004-11-09 Daniel Jacobowitz <dan@debian.org>
4371
4372 From David Poole <daveml@mbuf.com>:
4373 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4374 (elf32_arm_size_dynamic_sections): Call it.
4375
0306b3bf
AM
43762004-11-09 Alan Modra <amodra@bigpond.net.au>
4377
4378 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4379 (ALL_MACHINES_CFILES): Fix typo.
4380 * Makefile.in: Regenerate.
4381 * po/SRC-POTFILES.in: Regenerate.
4382
a16385dc
MM
43832004-11-08 Mark Mitchell <mark@codesourcery.com>
4384
4385 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4386 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4387 symbol in the relocation.
4388
0306b3bf
AM
43892004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4390 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
4391
4392 * coff-maxq.c: New File.
0306b3bf
AM
4393 * cpu-maxq.c: New File.
4394 * coffcode.h: Likewise.
4395 * config.bfd: Likewise.
4396 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
4397 * Makefile.am: Add support for maxq target.
4398 * configure.in: Likewise.
0306b3bf
AM
4399 * archures.c:. Likewise.
4400 * targets.c: Likewise.
4401 * bfd_in2.h : Regenerated.
7499d566
NC
4402 * Makefile.in: Regenerated.
4403 * configure: Regenerated.
4404 * doc/Makefile.in: Regenerated.
4405
977cdf5a
NC
44062004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4407
4408 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4409 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4410 C_NT_WEAK aux entries.
4411 (_bfd_coff_generic_relocate_section): Handle undefined
4412 aliases.
4413
9dfe8738
AS
44142004-11-07 Andreas Schwab <schwab@suse.de>
4415
4416 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4417 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4418 non-default visibility.
4419
c3c76620
MM
44202004-11-01 Mark Mitchell <mark@codesourcery.com>
4421
4422 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 4423 D_PAGED.
c3c76620
MM
4424 (elf32_arm_symbian_modify_segment_map): Don't
4425 reset includes_filehdr and includes_phdrs here.
4426
7f266840
DJ
44272004-11-04 Daniel Jacobowitz <dan@debian.org>
4428
4429 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4430 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4431 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4432 dependency.
4433 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4434 to a new removed list. Remove normal configuration stanzas.
4435 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4436 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4437 elfarm-nabi.lo with elf32-arm.lo.
4438 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4439 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4440 * elf32-arm.h: Remove.
4441 * elfarm-oabi.c: Remove.
4442 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4443 and bfd_elf32_littlearm_oabi_vec.
4444 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4445
bac23f82
HPN
44462004-11-04 Hans-Peter Nilsson <hp@axis.com>
4447
4448 * config.bfd: Support crisv32-*-* like cris-*-*.
4449 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4450 (bfd_mach_cris_v10_v32): New macros.
4451 * cpu-cris.c: Tweak formatting.
4452 (get_compatible): New function.
4453 (N): New macro.
4454 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4455 bfd_arch_info_type:s.
4456 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4457 get_compatible for member compatible and link bfd_cris_arch_v32 as
4458 next.
4459 * elf32-cris.c (cris_elf_pcrel_reloc)
4460 (cris_elf_set_mach_from_flags): New functions.
4461 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4462 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4463 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4464 numbers for bfd_mach_cris_v32.
4465 (PLT_ENTRY_SIZE_V32): New macro.
4466 (elf_cris_plt0_entry): Drop last comma in initializer.
4467 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4468 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4469 PLT initializers.
4470 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4471 "%B, section %A".
4472 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4473 (elf_cris_finish_dynamic_sections): Similar.
4474 (elf_cris_adjust_dynamic_symbol): Similar.
4475 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4476 section %A".
4477 <switch with PIC relocs>: Emit error and return FALSE for
4478 bfd_mach_cris_v10_v32.
4479 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4480 Emit warning when generating textrel reloc.
4481 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4482 (cris_elf_final_write_processing): Set flags according to mach.
4483 (cris_elf_print_private_bfd_data): Display
4484 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4485 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4486 new_flags. Don't call cris_elf_final_write_processing. Don't
4487 look at the actual elf header flags at all; use
4488 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4489 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4490 objects.
4491 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4492 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4493 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4494 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4495 * bfd-in2.h, libbfd.h: Regenerate.
4496
c5614fa4
AM
44972004-11-04 Alan Modra <amodra@bigpond.net.au>
4498
4499 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4500 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4501 comment.
4502 (struct adjust_toc_info): New.
4503 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4504
0ebdbb83
BW
45052004-11-03 Bob Wilson <bob.wilson@acm.org>
4506
4507 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4508 if there are no segments.
4509
675b2ace
DJ
45102004-11-02 Daniel Jacobowitz <dan@debian.org>
4511
4512 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4513
58852c27
NC
45142004-11-02 Nick Clifton <nickc@redhat.com>
4515
4516 * elf32-iq2000.c: Convert to ISO C90 formatting.
4517
e6857c0c
HPN
45182004-11-02 Hans-Peter Nilsson <hp@axis.com>
4519
20288ed6 4520 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 4521
bf718458
L
45222004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4523
4524 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4525 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4526 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4527
044ad7e3
KK
45282004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4529
4530 * elf32-sh.c (tpoff): Take alignment into account.
4531
d5cb4bb8
NC
45322004-10-28 Nick Clifton <nickc@redhat.com>
4533
4534 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 4535 performing a relocatable link.
d5cb4bb8
NC
4536 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4537 for MIPS ports under Irix.
4538
5b5bb741
PB
45392004-10-27 Richard Earnshaw <rearnsha@arm.com>
4540
4541 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4542 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4543 (elf32_arm_final_link_relocate): Ditto.
4544 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4545 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4546 (elf32_arm_adjust_dynamic_symbol): Ditto.
4547 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4548 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4549 (elf32_arm_r_howto): ... To here.
4550 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4551
97ecf322
L
45522004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4553
4554 PR 475
4555 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4556 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4557 and R_IA64_SECREL64LSB.
4558
3e3b46e5
PB
45592004-10-26 Paul Brook <paul@codesourcery.com>
4560
4561 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4562 (bfd_elf_size_dynamic_sections): Create default version definition.
4563 (elf_link_output_extsym): Adjust for default symbol version.
4564
aa69fe43
HPN
45652004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4566
278b4623
HPN
4567 * mmo.c: Adjust to ISO C.
4568
aa69fe43
HPN
4569 * mmo.c (mmo_write_section_description): New function broken out
4570 of mmo_internal_write_section.
4571 (mmo_internal_write_section): For each of .text and .data, call
4572 mmo_write_section_description before outputting contents if it has
4573 nontrivially deducible vma or contents.
4574 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4575 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4576 symbols if found within the .data address range.
4577
ed040321
DJ
45782004-10-24 Daniel Jacobowitz <dan@debian.org>
4579
4580 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4581
830866af
HPN
45822004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4583
4584 * mmo.c (File Layout): Correct place of misplaced blurb about
4585 special data.
4586
5f417ca3
MK
45872004-10-22 Mark Kettenis <kettenis@gnu.org>
4588
4589 * config.bfd: Add mips64*-*-openbsd.
4590
823fc61f
BW
45912004-10-21 Bob Wilson <bob.wilson@acm.org>
4592
4593 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4594 statements.
4595
8697aafb
L
45962004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4597
4598 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4599 * configure: Regenerate.
4600
dfeffb9f
L
46012004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4602
4603 PR 463
4604 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4605 to linker reloc_overflow callback.
4606 (aout_link_input_section_ext): Likewise.
4607 (aout_link_reloc_link_order): Likewise.
4608 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4609 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4610 Likewise.
4611 (alpha_relocate_section): Likewise.
4612 * coff-arm.c (coff_arm_relocate_section): Likewise.
4613 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4614 * coff-h8500.c (extra_case): Likewise.
4615 * coff-i960.c (coff_i960_relocate_section): Likewise.
4616 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4617 * coff-mips.c (mips_relocate_section): Likewise.
4618 * coff-or32.c (coff_or32_relocate_section): Likewise.
4619 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4620 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4621 * coff-sh.c (sh_relocate_section): Likewise.
4622 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4623 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4624 * coff-z8k.c (extra_case): Likewise.
4625 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4626 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4627 (_bfd_coff_generic_relocate_section): Likewise.
4628 * ecoff.c (ecoff_reloc_link_order): Likewise.
4629 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4630 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4631 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4632 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4633 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4634 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4635 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4636 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4637 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4638 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4639 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4640 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4641 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4642 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4643 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4644 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4645 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4646 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4647 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4648 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4649 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4650 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4651 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4652 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4653 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4654 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4655 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4656 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4657 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4658 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4659 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4660 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4661 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4662 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4663 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4664 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4665 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4666 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4667 * elflink.c (elf_reloc_link_order): Likewise.
4668 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4669 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4670 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4671 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4672 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4673 (aout_link_reloc_link_order): Likewise.
4674 * reloc.c (bfd_generic_get_relocated_section_contents):
4675 Likewise.
4676 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4677 * simple.c (simple_dummy_reloc_overflow): Updated.
4678
1715e0e3
AS
46792004-10-20 Andreas Schwab <schwab@suse.de>
4680
4681 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4682 (elf_backend_plt_sym_val): Define.
4683
db3d41a8
DS
46842004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4685
4686 * config.bfd: Set targ_underscore=yes for PE COFF targets
4687
4b85d634
AM
46882004-10-19 Alan Modra <amodra@bigpond.net.au>
4689
4690 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4691 (ppc64_elf_edit_opd): Likewise.
4692
6df4d94c
MM
46932004-10-18 Mark Mitchell <mark@codesourcery.com>
4694
4695 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4696 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4697 set SEC_ALLOC and SEC_LOAD.
4698
00d962d1
NC
46992004-10-18 Nick Clifton <nickc@redhat.com>
4700
4701 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4702 'name' for relocs against both local and global symbols.
4703
b58f81ae
DJ
47042004-10-16 Daniel Jacobowitz <dan@debian.org>
4705
4706 * bfd-in2.h: Regenerate.
4707 * bfd.c (struct bfd): Add no_export.
4708 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4709
7d3f158f
AM
47102004-10-15 Alan Modra <amodra@bigpond.net.au>
4711
4712 * config.bfd: Whitespace cleanup.
4713 * Makefile.am: Run "make dep-am"
4714 * Makefile.in: Regenerate.
4715
6d2cd210
JJ
47162004-10-15 Jakub Jelinek <jakub@redhat.com>
4717
4718 * elflink.c (struct already_linked_section): Removed.
4719 (try_match_symbols_in_sections, already_linked): Removed.
4720 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4721 prefix of section names when finding already_linked_table
4722 chain. Compare section names. Instead of calling already_linked,
4723 do it inline and only for sections in the same already_linked_list.
4724
92e4ec35
AM
47252004-10-15 Alan Modra <amodra@bigpond.net.au>
4726
4727 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4728 parameter. If called after _bfd_elf_write_section_eh_frame,
4729 don't allow a -2 return unless need_* bit is already set, and
4730 handle offsets adjusted for output_offset.
4731 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4732 * elf.c (_bfd_elf_section_offset): Update call.
4733
7bf6dede
L
47342004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4735
4736 PR 440
4737 * coffcode.h (coff_compute_section_file_positions): Cast to
4738 bfd_vma when computing page alignment.
4739
c0042f5d
MM
47402004-10-13 Mark Mitchell <mark@codesourcery.com>
4741
4742 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4743 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4744
2a1b9a48
MM
47452004-10-12 Mark Mitchell <mark@codesourcery.com>
4746
4747 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4748 relocations use a virtual address, not a section offset.
4749
b08b5071
BW
47502004-10-12 Bob Wilson <bob.wilson@acm.org>
4751
4752 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4753 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4754 xtensa_format_encode.
4755 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4756 (ebb_add_proposed_action): Delete.
4757
7fa3d080
BW
47582004-10-12 Bob Wilson <bob.wilson@acm.org>
4759
4760 * elf32-xtensa.c: Use ISO C90 formatting.
4761
3656d5e3
PB
47622004-10-12 Paul Brook <paul@codesourcery.com>
4763
4764 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4765 message.
4766
8cb51566
PB
47672004-10-12 Paul Brook <paul@codesourcery.com>
4768
4769 * elf32-arm.h: Support EABI version 4 objects.
4770
1abc8597
AM
47712004-10-12 Alan Modra <amodra@bigpond.net.au>
4772
4773 PR 325
4774 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4775 Don't mark as default.
4776 (bfd_x86_64_arch): Don't mark as default.
4777
9e66c942
AM
47782004-10-12 Alan Modra <amodra@bigpond.net.au>
4779
4780 * elflink.c (enum action_discarded): New.
4781 (elf_section_complain_discarded): Delete.
4782 (elf_action_discarded): New function subsuming the above and also
4783 controlling reloc behaviour.
1abc8597 4784 (elf_link_input_bfd): Use it.
9e66c942 4785
7f1204bb
JJ
47862004-10-11 Jakub Jelinek <jakub@redhat.com>
4787
4788 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4789 (special_sections): Add .gnu.liblist and .gnu.conflict.
4790 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4791
87e5235d
AM
47922004-10-11 Alan Modra <amodra@bigpond.net.au>
4793
4794 PR 233
4795 * elflink.c (elf_link_input_bfd): Try harder to support
4796 relocations against symbols in removed linkonce sections.
4797
2ad770c3
AM
47982004-10-11 Alan Modra <amodra@bigpond.net.au>
4799
029446c4
AM
4800 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4801
2ad770c3
AM
4802 PR 354
4803 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4804 sections do not reference symbols in non-SEC_ALLOC sections.
4805
1da212d6
AM
48062004-10-11 Alan Modra <amodra@bigpond.net.au>
4807
4808 PR 437
4809 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4810 (_bfd_elf_link_omit_section_dynsym): Formatting.
4811
f12123c0
AM
48122004-10-10 Alan Modra <amodra@bigpond.net.au>
4813
4814 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4815 * libbfd.h: Regnerate.
4816 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4817 * elf32-frv.c: Likewise.
4818 * elf32-m32r.c: Likewise.
4819 * elf32-ppc.c: Likewise.
4820 * elf64-hppa.c: Likewise.
4821 * elfxx-ia64.c: Likewise.
4822 * opncls.c: Likewise.
4823
fda3ecf2
AM
48242004-10-10 Alan Modra <amodra@bigpond.net.au>
4825
3472e2e9
AM
4826 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4827 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4828 offsets stored in struct eh_cie_fde entries before doing other
4829 work.
4830
fda3ecf2
AM
4831 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4832 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4833 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4834 setting offsets for removed CIEs. Don't set "sec", instead set
4835 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4836 CIE in hdr_info. Only set make_relative and make_lsda_relative
4837 for CIEs. Use pointers rather than array indices.
4838 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4839 make_lsda_relative, need_* on cie_inf for FDEs.
4840 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4841 section output_offset. Delete cie_offset, instead use cie_inf
4842 pointer to CIE entry. Use need_relative and need_lsda_relative on
4843 CIE entry for FDEs. Use pointers rather than array indices.
4844
7db6994f
AM
48452004-10-09 Alan Modra <amodra@bigpond.net.au>
4846
4847 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4848 bfd_is_target_special_symbol.
4849 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4850 * som.c (som_bfd_is_target_special_symbol): Define.
4851
3c9458e9
NC
48522004-10-08 Nick Clifton <nickc@redhat.com>
4853
4854 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4855 * configure: Regenerate.
4856 * bfd-in2.h: Regenerate.
4857 * syms.c (bfd_is_target_special_symbol): New interface function.
4858 Returns true when a symbol should be considered to be special.
7db6994f 4859 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
4860 the symbol jump table.
4861 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4862 Return true iff the symbol is a mapping symbol.
4863 (bfd_elf32_bfd_is_target_special_symbol): Define.
4864 * elfxx-target.h: Provide a default definition for
4865 bfd_is_target_special_symbol.
4866 * aout-target.h: Likewise.
4867 * aout-tic30.c: Likewise.
873d03ee 4868 * binary.c: Likewise.
3c9458e9
NC
4869 * coffcode.h: Likewise.
4870 * i386msdos.c: Likewise.
4871 * ieee.c: Likewise.
873d03ee 4872 * ihex.c: Likewise.
3c9458e9
NC
4873 * libaout.h: Likewise.
4874 * libbfd-in.h: Likewise
4875 * libecoff.h: Likewise.
4876 * mach-o.c: Likewise.
4877 * mmo.c: Likewise.
4878 * nlm-target.h: Likewise.
4879 * oasys.c: Likewise.
4880 * pef.c: Likewise.
4881 * ppcboot.c: Likewise.
4882 * srec.c: Likewise.
4883 * tekhex.c: Likewise.
4884 * versados.c: Likewise.
4885 * vms.c: Likewise.
4886 * xcoff-target.h: Likewise.
4887 * xsym.c: Likewise.
4888 * libbfd.h: Regenerate.
4889
d2b2c203
DJ
48902004-10-08 Daniel Jacobowitz <dan@debian.org>
4891
4892 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4893 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4894 (elf_backend_section_from_shdr): Define.
4895
864274b0
AM
48962004-10-08 Alan Modra <amodra@bigpond.net.au>
4897
4898 * syms.c (bfd_is_local_label): Return false for file symbols.
4899
43cd72b9 49002004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 4901 David Heine <dlheine@tensilica.com>
43cd72b9
BW
4902
4903 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4904 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4905 (elf32xtensa_no_literal_movement): New global variable.
4906 (elf_howto_table): Add entries for new relocations.
4907 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4908 (property_table_compare): When addresses are equal, compare sizes and
4909 various property flags.
4910 (property_table_matches): New.
4911 (xtensa_read_table_entries): Extend to read new property tables. Add
4912 output_addr parameter to indicate that output addresses should be used.
4913 Use bfd_get_section_limit.
4914 (elf_xtensa_find_property_entry): New.
4915 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4916 (elf_xtensa_check_relocs): Handle new relocations.
4917 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4918 relocations. Use new xtensa-isa.h functions.
4919 (build_encoding_error_message): Remove encode_result parameter. Add
4920 new target_address parameter used to detect alignment errors.
4921 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4922 error handling. Use new is_operand_relocation function.
4923 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4924 Use underbar macro for error messages. Formatting.
4925 (get_const16_opcode): New.
4926 (get_l32r_opcode): Add a separate flag for initialization.
4927 (get_relocation_opnd): Operand number is no longer explicit in the
4928 relocation. Change to decode the opcode and analyze its operands.
4929 (get_relocation_slot): New.
4930 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4931 Use new xtensa-isa.h functions to handle multislot instructions.
4932 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4933 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4934 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4935 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4936 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4937 get_single_format, init_op_single_format_table): New.
4938 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4939 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4940 (contract_asm_expansion): Add error_message parameter and pass it to
4941 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4942 with R_XTENSA_SLOT0_OP.
4943 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4944 instructions. Use new xtensa-isa.h functions.
4945 (r_reloc struct): Add new virtual_offset field.
4946 (r_reloc_init): Add contents and content_length parameters. Set
4947 virtual_offset field to zero. Add contents to target_offset field for
4948 partial_inplace relocations.
4949 (r_reloc_is_defined): Check for null.
4950 (print_r_reloc): New debug function.
4951 (source_reloc struct): Replace xtensa_operand field with pair of the
4952 opcode and the operand position. Add is_abs_literal field.
4953 (init_source_reloc): Specify operand by opcode/position pair. Set
4954 is_abs_literal field.
4955 (source_reloc_compare): When target_offsets are equal, compare other
4956 fields to make sorting predictable.
4957 (literal_value struct): Add is_abs_literal field.
4958 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4959 (init_literal_value): New.
4960 (is_same_value): Replace with ...
4961 (literal_value_equal): ... this function. Add comparisons of
4962 virtual_offset and is_abs_literal fields.
4963 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4964 failure. Initialize has_last_loc field.
4965 (value_map_hash_table_delete): New.
4966 (hash_literal_value): Rename to ...
4967 (literal_value_hash): ... this. Include is_abs_literal flag and
4968 virtual_offset field in the hash value.
4969 (get_cached_value): Rename to ...
4970 (value_map_get_cached_value): ... this. Update calls to
4971 literal_value_hash and literal_value_equal.
4972 (add_value_map): Check for allocation failure. Update calls to
4973 value_map_get_cached_value and literal_value_hash.
4974 (text_action, text_action_list, text_action_t): New types.
4975 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4976 text_action_add, text_action_add_literal, offset_with_removed_text,
4977 offset_with_removed_text_before_fill, find_insn_action,
4978 print_action_list, print_removed_literals): New.
4979 (offset_with_removed_literals): Delete.
4980 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4981 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4982 allocated_relocs_count fields.
4983 (init_xtensa_relax_info): Initialize new fields.
4984 (reloc_bfd_fix struct): Add new translated field.
4985 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4986 translated field.
4987 (fix_compare, cache_fix_array): New.
4988 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4989 section via get_xtensa_relax_info. Use cache_fix_array to set up
4990 sorted fix_array and use bsearch instead of linear search.
4991 (section_cache_t): New struct.
4992 (init_section_cache, section_cache_section, clear_section_cache): New.
4993 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4994 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4995 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4996 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4997 New.
4998 (retrieve_contents): Use bfd_get_section_limit.
4999 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
5000 to compute_removed_literals. Free value_map_hash_table when no longer
5001 needed.
5002 (analyze_relocations): Check is_relaxable_asm_section flag. Call
5003 compute_text_actions for all sections.
5004 (find_relaxable_sections): Mark sections as relaxable if they contain
5005 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
5006 call. Increment relax_info src_count field only for appropriate
5007 relocation types. Remove is_literal_section check.
5008 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
5009 r_reloc_init and find_associated_l32r_irel. Check
5010 is_relaxable_asm_section flag. Handle L32R instructions with absolute
5011 literals. Pass is_abs_literal flag to init_source_reloc.
5012 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
5013 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 5014 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
5015 (find_associated_l32r_irel): Add bfd parameter and pass it to
5016 is_l32r_relocation.
5017 (compute_text_actions, compute_ebb_proposed_actions,
5018 compute_ebb_actions, check_section_ebb_pcrels_fit,
5019 check_section_ebb_reduces, text_action_add_proposed,
5020 compute_fill_extra_space): New.
5021 (remove_literals): Replace with ...
5022 (compute_removed_literals): ... this function. Call
5023 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
5024 Call xtensa_read_table_entries to get the property table. Skip
5025 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
5026 is_removable_literal, remove_dead_literal, and
fda3ecf2 5027 identify_literal_placement functions.
43cd72b9
BW
5028 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5029 instead of linear search.
5030 (is_removable_literal, remove_dead_literal,
5031 identify_literal_placement): New.
5032 (relocations_reach): Update check for literal not referenced by any
5033 PC-relative relocations. Adjust call to pcrel_reloc_fits.
5034 (coalesce_shared_literal, move_shared_literal): New.
5035 (relax_section): Use bfd_get_section_limit. Call
5036 translate_section_fixes. Update calls to r_reloc_init and
5037 offset_with_removed_text. Check new is_relaxable_asm_section flag.
5038 Add call to pin_internal_relocs. Add special handling for
5039 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
5040 info to calculate new addend_displacement variable. Replace code for
5041 deleting literals with more general code to perform the actions
5042 determined by the action_list for the section.
5043 (translate_section_fixes, translate_reloc_bfd_fix): New.
5044 (translate_reloc): Check new is_relaxable_asm_section flag. Call
5045 find_removed_literal only if is_operand_relocation. Update call to
5046 offset_with_removed_text. Use new target_offset and removed_bytes
5047 variables.
5048 (move_literal): New.
5049 (relax_property_section): Use bfd_get_section_limit. Set new
5050 is_full_prop_section flag and handle new property tables. Update calls
5051 to r_reloc_init and offset_with_removed_text. Check
5052 is_relaxable_asm_section flag. Handle expansion of zero-sized
5053 unreachable entries, with use of offset_with_removed_text_before_fill.
5054 For relocatable links, combine entries only for literal tables.
5055 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
5056 calls to offset_with_removed_text. Translate st_size field for
5057 function symbols.
5058 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5059 failure. Add contents parameter. Update call to get_bfd_fix. Update
5060 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
5061 R_XTENSA_ASM_EXPAND relocs.
5062 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
5063 call to get_bfd_fix. Include offset from contents for partial_inplace
5064 relocations.
5065 (is_reloc_sym_weak): New.
5066 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5067 (prop_sec_len): New.
5068 (xtensa_is_property_section): Handle new property sections.
5069 (is_literal_section): Delete.
5070 (internal_reloc_compare): When r_offset matches, compare r_info and
5071 r_addend to make sorting predictable.
5072 (internal_reloc_matches): New.
5073 (xtensa_get_property_section_name): Handle new property sections.
5074 (xtensa_get_property_predef_flags): New.
5075 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5076 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5077 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5078 (xtisa_errno, xtisa_error_msg): New variables.
5079 (xtensa_isa_errno, xtensa_isa_error_msg): New.
5080 (xtensa_insnbuf_alloc): Add error handling.
5081 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
5082 use xtensa_format_decode. Add error handling.
5083 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
5084 instruction length to find the number of bytes to copy.
5085 (xtensa_isa_init): Add error handling. Replace calls to
5086 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5087 tables in the xtensa_modules structure.
5088 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5089 xtensa_extend_isa): Delete.
5090 (xtensa_isa_free): Change to only free lookup tables.
5091 (opname_lookup_compare): Replace with ...
5092 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
5093 (xtensa_insn_maxlength): Rename to ...
5094 (xtensa_isa_maxlength): ... this.
5095 (xtensa_insn_length): Delete.
5096 (xtensa_insn_length_from_first_byte): Replace with ...
5097 (xtensa_isa_length_from_chars): ... this function.
5098 (xtensa_num_opcodes): Rename to ...
5099 (xtensa_isa_num_opcodes): ... this.
5100 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5101 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5102 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5103 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5104 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5105 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5106 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5107 (xtensa_opcode_lookup): Add error handling.
5108 (xtensa_decode_insn): Replace with ...
5109 (xtensa_opcode_decode): ... this function, with new format and
5110 slot parameters. Add error handling.
5111 (xtensa_encode_insn): Replace with ...
5112 (xtensa_opcode_encode): ... this function, which does the encoding via
5113 one of the entries in the "encode_fns" array. Add error handling.
5114 (xtensa_opcode_name): Add error handling.
5115 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5116 xtensa_opcode_is_call): New.
5117 (xtensa_num_operands): Replace with ...
5118 (xtensa_opcode_num_operands): ... this function. Add error handling.
5119 (xtensa_opcode_num_stateOperands,
5120 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5121 xtensa_opcode_funcUnit_use, xtensa_operand_name,
5122 xtensa_operand_is_visible): New.
5123 (xtensa_get_operand, xtensa_operand_kind): Delete.
5124 (xtensa_operand_inout): Add error handling and special-case for
5125 "sout" operands.
5126 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5127 operate on one slot of an instruction. Added error handling.
5128 (xtensa_operand_encode): Handle default operands with no encoding
5129 functions. Check for success by comparing against decoded value.
5130 Add error handling.
5131 (xtensa_operand_decode): Handle default operands. Return decoded value
5132 through argument pointer. Add error handling.
5133 (xtensa_operand_is_register, xtensa_operand_regfile,
5134 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5135 (xtensa_operand_isPCRelative): Rename to ...
5136 (xtensa_operand_is_PCrelative): ... this. Add error handling.
5137 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5138 through argument pointer. Add error handling.
5139 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5140 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5141 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5142 xtensa_regfile_shortname, xtensa_regfile_view_parent,
5143 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5144 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5145 xtensa_state_is_exported, xtensa_sysreg_lookup,
5146 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5147 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5148 xtensa_interface_num_bits, xtensa_interface_inout,
5149 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5150 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5151 * xtensa-modules.c: Rewrite to use new data structures.
5152 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5153 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5154 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5155 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5156 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5157 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5158 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5159 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5160 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5161 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5162 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5163 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5164 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5165 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5166 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5167 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5168 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5169 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5170 * Makefile.in: Regenerate.
5171 * bfd-in2.h: Likewise.
5172 * libbfd.h: Likewise.
5173
99022dfb
RS
51742004-10-07 Richard Sandiford <rsandifo@redhat.com>
5175
5176 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5177 against the absolute section.
5178 (mips_elf64_write_rela): Likewise.
5179
b67ae299
NC
51802004-10-07 Jan Beulich <jbeulich@novell.com>
5181
5182 * elf.c (elf_find_function): Don't generally check for matching
5183 section, just for non-file symbols. Remove redunant comparison
5184 for the latter.
5185 * elf32-arm.h (arm_elf_find_function): Likewise.
5186
8fdd7217
NC
51872004-10-07 Jeff Baker <jbaker@qnx.com>
5188
5189 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5190 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5191 was specified.
5192
073a2dc3
RM
51932004-10-04 Roland McGrath <roland@redhat.com>
5194
5195 * hash.c (bfd_hash_set_default_size): Use const for table.
5196 Use size_t instead of int for variable compared to sizeof results.
5197
7785be14
AM
51982004-10-05 Alan Modra <amodra@bigpond.net.au>
5199
5200 PR 425
5201 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5202
40a18ebd
NC
52032004-10-01 Paul Brook <paul@codesourcery.com>
5204
5205 * elf32-arm.h (elf32_arm_fake_sections,
5206 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5207 functions.
5208 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5209
8935b81f
AM
52102004-10-01 Alan Modra <amodra@bigpond.net.au>
5211
5212 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5213 need_lsda_relative.
5214 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5215 need_relative or need_lsda_relative if we are processing an
5216 offset for a reloc on a FDE initial loc or LSDA field
5217 respectively.
5218 (_bfd_elf_write_section_eh_frame): Test need_relative and
5219 need_lsda_relative in place of corresponding make_* field
5220 when deciding to use pc-relative encodings.
5221
eeac373a
PB
52222004-09-30 Paul Brook <paul@codesourcery.com>
5223
5224 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5225 target2 relocation type.
5226
7479dfd4
L
52272004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5228
5229 PR 414
5230 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5231
0dd132b6
NC
52322004-09-30 Paul Brook <paul@codesourcery.com>
5233
5234 * reloc.c: Add BFD_RELOC_ARM_SMI.
5235 * bfd-in2.h: Regenerate.
5236 * libbfd.h: Ditto.
5237
1ba54ee0
AM
52382004-09-24 Alan Modra <amodra@bigpond.net.au>
5239
5240 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5241 vma and output offset to address.
5242 * simple.c (simple_save_output_info): Only set output section
5243 and offset for debug sections, or those not already set up by
5244 the linker.
5245 (bfd_simple_get_relocated_section_contents): Update comment.
5246
5efb6261
AM
52472004-09-24 Alan Modra <amodra@bigpond.net.au>
5248
5249 * elf.c (IS_LOADED): Delete.
5250 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5251 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5252 to 2004-09-22.
5253
fca870e4
AM
52542004-09-23 Alan Modra <amodra@bigpond.net.au>
5255
5256 PR gas/396
5257 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5258 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5259 redundant assignment of EM_SPARC.
5260
c86696a3
BF
52612004-09-22 Brian Ford <ford@vss.fsi.com>
5262
5263 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5264 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5265 constants.
5266 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5267
73adb214
AM
52682004-09-22 Alan Modra <amodra@bigpond.net.au>
5269
5270 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5271 (elf_backend_modify_segment_map): Don't define.
5272
b301b248
AM
52732004-09-22 Alan Modra <amodra@bigpond.net.au>
5274
5275 * elf.c (IS_LOADED): Define.
5276 (assign_file_positions_for_segments): Don't round up file offset of
5277 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5278 Delete code handling link script adjustment of lma. Do the adjust
5279 in later code handling similar ajustments. Remove dead code error
5280 check. Warn if section lma would require a negative offset
5281 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5282 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5283 update voff in section loop. Change voff in segment loop to be an
5284 adjustment on top of "off". Set sec->filepos and update "off" later.
5285 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 5286 test for alloc-only sections other than .tbss consistently.
b301b248
AM
5287 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5288 Tidy PT_NOTE handling. Use %B and %A in error messages.
5289 (assign_file_positions_except_relocs): Use %B in error message.
5290
3f85e526
L
52912004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5292
5293 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5294 (CONFIG_STATUS_DEPENDENCIES): New.
5295 (Makefile): Removed.
5296 (config.status): Likewise.
5297 * Makefile.in: Regenerated.
5298
eb043451
PB
52992004-09-17 Paul Brook <paul@codesourcery.com>
5300
5301 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5302 (bfd_elf32_arm_process_before_allocation): Update prototype.
5303 * bfd-in2.h: Regenerate.
5304 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5305 (elf32_arm_link_hash_table_create): Set it.
5306 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5307 (bfd_elf32_arm_set_target_relocs): New function.
5308 (arm_real_reloc_type): New function.
5309 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5310 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5311 (elf32_arm_gc_sweep_hook): Ditto.
5312 (elf32_arm_check_relocs): Ditto.
5313 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5314 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5315 R_ARM_GOT_TARGET2.
5316 (elf32_arm_got_prel): New variable.
5317 (elf32_arm_howto_from_type): New function.
5318 (elf32_arm_info_to_howto): Use it.
5319 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5320 BFD_RELOC_ARM_TARGET2.
5321 * libbfd.h: Regenerate.
5322 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5323
f6e332e6
AM
53242004-09-17 Alan Modra <amodra@bigpond.net.au>
5325
5326 * ecoff.c: Update u.undef.next refs.
5327 * elf64-ppc.c: Likewise.
5328 * elflink.c: Likewise.
5329 * linker.c: Likewise.
5330 * xcofflink.c: Likewise.
5331
5332 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5333 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5334 fields to indirect struct.
5335 * elf-m10300.c: Update u.weakdef refs.
5336 * elf32-arm.h: Likewise.
5337 * elf32-cris.c: Likewise.
5338 * elf32-frv.c: Likewise.
5339 * elf32-hppa.c: Likewise.
5340 * elf32-i370.c: Likewise.
5341 * elf32-i386.c: Likewise.
5342 * elf32-m32r.c: Likewise.
5343 * elf32-m68k.c: Likewise.
5344 * elf32-ppc.c: Likewise.
5345 * elf32-s390.c: Likewise.
5346 * elf32-sh.c: Likewise.
5347 * elf32-sparc.c: Likewise.
5348 * elf32-vax.c: Likewise.
5349 * elf32-xtensa.c: Likewise.
5350 * elf64-alpha.c: Likewise.
5351 * elf64-hppa.c: Likewise.
5352 * elf64-ppc.c: Likewise.
5353 * elf64-s390.c: Likewise.
5354 * elf64-sh64.c: Likewise.
5355 * elf64-sparc.c: Likewise.
5356 * elf64-x86-64.c: Likewise.
5357 * elfxx-ia64.c: Likewise.
5358 * elfxx-mips.c: Likewise.
5359 * elflink.c: Likewise. Also u.elf_hash_value.
5360 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5361 indirection.
5362 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5363 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5364 (bfd_elf_gc_record_vtentry): Likewise.
5365 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5366
90c0a373
AM
53672004-09-17 Alan Modra <amodra@bigpond.net.au>
5368
5369 * Makefile.am: Run "make dep-am".
5370 * Makefile.in: Regenerate.
5371 * bfd-in2.h: Regenerate.
5372 * po/SRC-POTFILES.in: Regenerate.
5373 * po/bfd.pot: Regenerate.
5374
f5385ebf
AM
53752004-09-16 Alan Modra <amodra@bigpond.net.au>
5376
5377 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5378 with bitfields. Make "type" and "other" bitfields too.
5379 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5380 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5381 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5382 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5383 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5384 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5385 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5386 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5387 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5388 * elf-m10300.c: Likewise.
5389 * elf.c: Likewise.
5390 * elf32-arm.h: Likewise.
5391 * elf32-cris.c: Likewise.
5392 * elf32-frv.c: Likewise.
5393 * elf32-hppa.c: Likewise.
5394 * elf32-i370.c: Likewise.
5395 * elf32-i386.c: Likewise.
5396 * elf32-m32r.c: Likewise.
5397 * elf32-m68k.c: Likewise.
5398 * elf32-ppc.c: Likewise.
5399 * elf32-s390.c: Likewise.
5400 * elf32-sh-symbian.c: Likewise.
5401 * elf32-sh.c: Likewise.
5402 * elf32-sh64.c: Likewise.
5403 * elf32-sparc.c: Likewise.
5404 * elf32-vax.c: Likewise.
5405 * elf32-xtensa.c: Likewise.
5406 * elf64-alpha.c: Likewise.
5407 * elf64-hppa.c: Likewise.
5408 * elf64-ppc.c: Likewise.
5409 * elf64-s390.c: Likewise.
5410 * elf64-sh64.c: Likewise.
5411 * elf64-sparc.c: Likewise.
5412 * elf64-x86-64.c: Likewise.
5413 * elflink.c: Likewise.
5414 * elfxx-ia64.c: Likewise.
5415 * elfxx-mips.c: Likewise.
5416 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5417 * configure: Regenerate.
5418 * aclocal.m4: Regenerate.
5419
b6ee372a
AM
54202004-09-16 Alan Modra <amodra@bigpond.net.au>
5421
5422 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5423 around uses of R_ARM_TARGET1.
5424 (elf32_arm_check_relocs): Likewise.
5425
9c504268
PB
54262004-09-13 Paul Brook <paul@codesourcery.com>
5427
5428 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5429 prototype.
5430 * bfd-in2.h: Regenerate.
5431 * libbfd.h: Regenerate.
5432 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5433 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5434 (bfd_elf32_arm_process_before_allocation): Ditto.
5435 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5436 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5437 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5438 * reloc.c: Ditto.
5439
94ea025a
JB
54402004-09-10 Joel Brobecker <brobecker@gnat.com>
5441
5442 * hpux-core.c (thread_section_p): New function.
5443 (hpux_core_core_file_p): Fix computation of offset in call
5444 to bfd_seek. Create a ".reg" section from an arbitrary
5445 ".reg/<id>" section if none was created after having read
5446 all sections.
5447
24443139
AS
54482004-09-11 Andreas Schwab <schwab@suse.de>
5449
5450 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5451 * aclocal.m4: Rebuild.
5452 * configure: Rebuild.
5453
f4eae89c
JB
54542004-09-10 Joel Brobecker <brobecker@gnat.com>
5455
5456 * section.c (bfd_sections_find_if): Fix parameter name in
5457 comment to match code.
5458
e0638f70
AM
54592004-09-10 Alan Modra <amodra@bigpond.net.au>
5460
5461 * elf.c (assign_file_positions_except_relocs): Assign relocs
5462 stored in a bfd section.
5463
5e0f5ae3
HPN
54642004-09-08 Hans-Peter Nilsson <hp@axis.com>
5465
5466 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5467 h->gotplt_refcount to 0, not -1.
5468
ada1953e
HPN
54692004-09-07 Hans-Peter Nilsson <hp@axis.com>
5470
5471 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5472 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5473 symname.
5474 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5475 handle symbol visibility here.
5476
ee75fd95
AM
54772004-09-07 Alan Modra <amodra@bigpond.net.au>
5478
5479 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5480 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5481 callers.
5482 (ppc_stub_name): Remove trailing "+0" on stub name.
5483 (create_linkage_sections): Create relocations for
5484 branch lookup table when --emit-relocs as well as when --shared.
5485 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5486 relbrlt test. For --emit-stub-syms, always output a sym even when
5487 one already exists on a plt call stub. Put stub type in the stub
5488 symbol name.
5489 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5490 test.
5491 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5492 reloc_count in stub sections. Adjust relbrlt test.
5493 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5494 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5495 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5496 for relocs against discarded symbols. Fix comments.
5497
229fcec5
MM
54982004-09-06 Mark Mitchell <mark@codesourcery.com>
5499
5500 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5501 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5502 from ...
5503 (map_sections_to_segments): ... here. Use it. Assign a file
5504 position to the .dynamic section if it is not loadable, but part
5505 of the PT_DYNAMIC segment.
5506 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5507 offsets, not VMAs, for the BPABI. Do not fill in the header in
5508 the .got.plt section for the BPABI.
5509 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5510 PT_DYNAMIC segment.
5511 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 5512
9a0789ec
NC
55132004-09-06 Nick Clifton <nickc@redhat.com>
5514
5515 * elflink.c (elf_link_add_object_symbols): Set the error code to
5516 bfd_error_wrong_format when the input format does not match the
5517 output format.
5518
7b53ace3
AM
55192004-09-06 Alan Modra <amodra@bigpond.net.au>
5520
5521 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5522 (ppc64_elf_check_directives): ..here.
5523 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5524 before accessing ppc64_elf_tdata.
5525 (ppc64_elf_finish_dynamic_sections): And here too.
5526
3e540f25
AM
55272004-09-04 Alan Modra <amodra@bigpond.net.au>
5528
5529 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5530
e5a52504
MM
55312004-09-03 Mark Mitchell <mark@codesourcery.com>
5532
5533 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5534 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5535 (bfd_elf32_littlearm_symbian_vec): Likewise.
5536 * configure: Regenerated.
5537 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5538 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5539 (PLT_ENTRY_SIZE): Likewise.
5540 (bfd_vma_elf32_arm_symbian_plt_entry): New
5541 variable.
5542 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5543 and symbian_p.
5544 (create_got_section): Don't create sections when generating BPABI
5545 objects.
5546 (elf32_arm_create_dynamic_sections): Tidy.
5547 (elf32_arm_link_hash_table_create): Set plt_header_size,
5548 plt_entry_size, and symbian_p.
5549 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5550 generating BPABI objects.
5551 (allocate_dynrelocs): Use htab->plt_header_size, not
5552 PLT_HEADER_SIZE. Do not add to .got.plt when
5553 generating BPABI objects.
5554 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5555 * elfarm-nabi.c: Add SymbianOS target vectors.
5556 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5557 (_bfd_elf_link_create_dynamic_sections): Likewise.
5558 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5559 (elfNN_bed): Use it.
5560 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5561 (bfd_elf32_littlearm_symbian_vec): Likewise.
5562 (_bfd_target_vector): Add them.
5563
6e3b6835
NC
55642004-09-03 Nick Clifton <nickc@redhat.com>
5565
5566 PR 360
5567 * coffcode.h (handle_COMDAT): Replace abort with an warning
5568 message and allow the scan to continue.
5569
595da8c5
AM
55702004-09-02 Alan Modra <amodra@bigpond.net.au>
5571
5572 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5573 in when reading relocs, not our sorted syms. Remove unnecessary
5574 var.
5575
6723a9f4
EB
55762004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5577
5578 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5579
5464f5a1
NN
55802004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5581
5582 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5583 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5584 replace uses of *_alias with *_noncanonical.
5585 * aclocal.m4: Rebuild with aclocal 1.4p6.
5586 * Makefile.in: Rebuild with automake 1.4p6.
5587 * doc/Makefile.in: Rebuild with automake 1.4p6.
5588 * configure.in: Autoupdate with autoupdate 2.59.
5589 * config.in: Regenerate with autoheader 2.59.
5590 * configure: Regnerate with autoconf 2.59.
5591
a7535cf3
AM
55922004-08-28 Alan Modra <amodra@bigpond.net.au>
5593
5594 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5595 symbol pointer arrays before modifying.
5596
c9727e01
AM
55972004-08-28 Alan Modra <amodra@bigpond.net.au>
5598
b91e2ae2 5599 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
5600 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5601 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5602 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
5603 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5604 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5605 Use both symbol tables on non-relocatable objects. Use a common
5606 error exit. Fix "mid" warning.
c9727e01
AM
5607 * libbfd.h: Regenerate.
5608 * bfd-in2.h: Regenerate.
5609
699733f6
AM
56102004-08-28 Alan Modra <amodra@bigpond.net.au>
5611
5612 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5613 object file.
5614 (struct sfpr_def_parms): Save some space.
5615 (sfpr_define): Here too.
5616
5617 * elf64-ppc.c (compare_symbols): Put section syms first.
5618 (sym_exists_at): New function.
5619 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5620 points only for relocatable files. Use .opd section contents
5621 otherwise. Generally clean up the code.
5622
deb0e272
AM
56232004-08-27 Alan Modra <amodra@bigpond.net.au>
5624
5625 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5626 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5627 (struct sfpr_def_parms): New.
5628 (sfpr_define): New function.
5629 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5630 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5631 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5632 (savefpr1_tail, restfpr1_tail): New functions.
5633 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5634 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5635 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5636 code. Define all ABI mandated _save and _rest functions.
5637
85a84e7a
PB
56382004-08-26 Paul Brook <paul@codesourcery.com>
5639
deb0e272 5640 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 5641
688c58f3
AM
56422004-08-26 Alan Modra <amodra@bigpond.net.au>
5643
5644 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5645 TRUE or FALSE.
5646
3e95eabc
AM
56472004-08-26 Alan Modra <amodra@bigpond.net.au>
5648
5649 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5650 that pcrel correction is applied for R_386_PC32.
5651
f855931b
AM
56522004-08-25 Alan Modra <amodra@bigpond.net.au>
5653
5654 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5655 for R_386_32 and R_386_PC32 relocs against symbols defined in
5656 discarded sections.
5657
b18c562e
NC
56582004-08-25 Dmitry Diky <diwil@spec.ru>
5659
5660 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5661 Add new relocations.
5662 * bfd-in2.h: Regenerate.
f855931b 5663 * libbfd.h: Regenerate.
b18c562e
NC
5664 * elf32-msp430.c: Clean-up code.
5665 (elf_msp430_howto_table): Add new relocation entries.
5666 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5667 (msp430_elf_relax_section): New function.
5668 (msp430_elf_relax_delete_bytes): New function.
5669 (msp430_elf_symbol_address_p): New function.
5670
af705ba8
NC
56712004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5672
5673 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5674 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5675
ea5158d8
DJ
56762004-08-20 Daniel Jacobowitz <dan@debian.org>
5677
5678 * elflink.c (_bfd_elf_section_already_linked): Handle
5679 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5680
49d934f1
MM
56812004-08-19 Mark Mitchell <mark@codesourcery.com>
5682
5683 * config.bfd (arm*-*-symbianelf*): New target.
5684 (arm*-*-eabi*): Likewise.
5685
039b3fef
AM
56862004-08-19 Alan Modra <amodra@bigpond.net.au>
5687
5688 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5689 "struct ppc_link_hash_entry *".
5690 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5691 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5692
3f764659
JJ
56932004-08-19 Jakub Jelinek <jakub@redhat.com>
5694
5695 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5696 entries (where fd_aux overlaps next entry's fd_func).
5697 Add non_overlapping argument, use it.
5698 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5699 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5700 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5701 as indexes into opd_sym_map/opd_adjust array.
5702 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5703
c09bdfe5
AM
57042004-08-18 Alan Modra <amodra@bigpond.net.au>
5705
5706 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5707 if we can look up their function descriptor in a regular file.
5708
271d0fc3
NC
57092004-08-18 Nick Clifton <nickc@redhat.com>
5710
5711 PR 324
5712 * cofflink.c (coff_link_add_symbols): Check that the comdat
5713 pointer in the coff_section_data structure has been initialised
5714 before using it.
5715
a010d60f
AM
57162004-08-18 Alan Modra <amodra@bigpond.net.au>
5717
5718 PR 338
5719 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5720 changing bfd_link_hash_undefined to bfd_link_hash_new.
5721
90e3cdf2
JJ
57222004-08-17 Jakub Jelinek <jakub@redhat.com>
5723
5724 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5725 if not yet defined.
5726 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5727 (synthetic_opd, synthetic_relocatable): New variables.
5728 (compare_symbols, compare_relocs): New helper routines.
5729 (ppc64_elf_get_synthetic_symtab): New function.
5730 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5731 to relsyms.
5732 * bfd-in2.h: Regenerated.
5733 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5734 to relsyms. Return 0 if abfd is relocatable.
5735
7c2c8505
AM
57362004-08-17 Alan Modra <amodra@bigpond.net.au>
5737
5738 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5739
0367ecfb
NC
57402004-08-17 Nick Clifton <nickc@redhat.com>
5741
5742 * (is_arm_mapping_symbol_name): New function - return true
5743 when a symbol name matches the requirements for an ARM mapping
5744 symbol name.
5745 (arm_elf_find_function): New function based on
5746 elf_find_function in elf.c but skipping ARM mapping symbols
5747 and including thumb function symbols.
5748 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5749 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5750
2441e016
AM
57512004-08-17 Alan Modra <amodra@bigpond.net.au>
5752
5753 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5754 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5755 (ppc64_elf_brtaken_reloc): Here too.
5756
35b0ce59
AM
57572004-08-17 Alan Modra <amodra@bigpond.net.au>
5758
5759 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5760 symbol visibility.
5761 (ppc64_elf_check_directives): Check that we have the right hash
5762 table before proceeding.
5763
81688140
AM
57642004-08-17 Alan Modra <amodra@bigpond.net.au>
5765
5766 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5767 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5768 the sections that will be discarded.
5769
327c1315
AM
57702004-08-16 Alan Modra <amodra@bigpond.net.au>
5771
5772 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5773
45fc9e4a
AM
57742004-08-16 Alan Modra <amodra@bigpond.net.au>
5775
5776 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5777 free space available.
5778
9dadfa79
AM
57792004-08-16 Alan Modra <amodra@bigpond.net.au>
5780
5781 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 5782 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
5783
5784 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5785 (xcoff_write_armap_big): Likewise.
5786 (xcoff_write_archive_contents_old): Likewise.
5787 (xcoff_write_archive_contents_big): Likewise.
5788
5789 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5790
57e8b36a
NC
57912004-08-13 Nick Clifton <nickc@redhat.com>
5792
5793 * elf32-arm.h: Convert to ISO C90.
5794
a005f94e
AM
57952004-08-13 Alan Modra <amodra@bigpond.net.au>
5796
5797 PR 293
5798 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5799 zero the plt field.
5800
d003868e
AM
58012004-08-13 Alan Modra <amodra@bigpond.net.au>
5802
5803 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5804 (bfd_archive_filename, bfd_get_section_ident): Delete.
5805 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5806 bfd_archive_filename.
5807 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5808 to warn about symbols in discarded sections. Use _bfd_error_handler.
5809 * aout-adobe.c (aout_adobe_callback): See below.
5810 * aout-cris.c (swap_ext_reloc_in): ..
5811 * coff-arm.c (find_thumb_glue, find_arm_glue,
5812 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5813 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5814 coff_arm_copy_private_bfd_data): ..
5815 * coff-i860.c (i860_reloc_processing): ..
5816 * coff-mcore.c (mcore_coff_unsupported_reloc,
5817 coff_mcore_relocate_section): ..
5818 * coff-ppc.c (coff_ppc_relocate_section): ..
5819 * coff-rs6000.c (xcoff_create_csect_from_smclas
5820 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5821 sh_swap_insns, sh_relocate_section): ..
5822 * coff-tic54x.c (tic54x_reloc_processing): ..
5823 * coff-tic80.c (coff_tic80_relocate_section): ..
5824 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5825 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5826 coff_slurp_symbol_table, coff_classify_symbol,
5827 coff_slurp_reloc_table): ..
5828 * coffgen.c (_bfd_coff_read_string_table): ..
5829 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5830 _bfd_coff_generic_relocate_section): ..
5831 * cpu-arm.c (bfd_arm_merge_machines): ..
5832 * cpu-sh.c (sh_merge_bfd_arch): ..
5833 * elf-hppa.h (elf_hppa_relocate_section): ..
5834 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5835 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5836 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5837 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5838 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5839 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5840 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5841 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5842 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5843 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5844 cris_elf_merge_private_bfd_data
5845 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5846 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5847 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5848 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5849 elf32_hppa_relocate_section): ..
5850 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5851 i370_elf_check_relocs, i370_elf_relocate_section): ..
5852 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5853 elf_i386_relocate_section): ..
5854 * elf32-m32r.c (m32r_elf_relocate_section,
5855 m32r_elf_merge_private_bfd_data): ..
5856 * elf32-m68hc1x.c (m68hc12_add_stub,
5857 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5858 * elf32-m68k.c (elf_m68k_relocate_section): ..
5859 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5860 mcore_elf_relocate_section): ..
5861 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5862 ppc_elf_check_relocs, ppc_elf_relocate_section,
5863 ppc_elf_begin_write_processing): ..
5864 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5865 elf_s390_relocate_section): ..
5866 * elf32-sh-symbian.c (sh_symbian_import_as,
5867 sh_symbian_process_embedded_commands,
5868 sh_symbian_relocate_section): ..
5869 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5870 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5871 sh_elf_merge_private_data): ..
5872 * elf32-sparc.c (elf32_sparc_check_relocs,
5873 elf32_sparc_relocate_section,
5874 elf32_sparc_merge_private_bfd_data): ..
5875 * elf32-v850.c (v850_elf_check_relocs,
5876 v850_elf_merge_private_bfd_data): ..
5877 * elf32-xtensa.c (elf_xtensa_check_relocs,
5878 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5879 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5880 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5881 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5882 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5883 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5884 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5885 ppc64_elf_relocate_section): ..
5886 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5887 elf_s390_relocate_section): ..
5888 * elf64-sh64.c (sh_elf64_relocate_section): ..
5889 * elf64-sparc.c (sparc64_elf_check_relocs,
5890 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5891 sparc64_elf_merge_private_bfd_data): ..
5892 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5893 elf64_x86_64_relocate_section): ..
5894 * elflink.c (_bfd_elf_add_default_symbol,
5895 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5896 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5897 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5898 elf_get_linked_section_vma, elf_fixup_link_order,
5899 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5900 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5901 * elfxx-ia64.c (elfNN_ia64_relax_section,
5902 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5903 * elfxx-mips.c (mips_elf_perform_relocation,
5904 _bfd_mips_elf_check_relocs,
5905 _bfd_mips_elf_merge_private_bfd_data): ..
5906 * ieee.c (ieee_slurp_external_symbols): ..
5907 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5908 * libbfd.c (_bfd_generic_verify_endian_match): ..
5909 * linker.c (_bfd_generic_link_add_one_symbol,
5910 _bfd_generic_section_already_linked): ..
5911 * pdp11.c (translate_to_native_sym_flags): ..
5912 * pe-mips.c (coff_pe_mips_relocate_section): ..
5913 * peicode.h (pe_ILF_build_a_bfd): ..
5914 * srec.c (srec_bad_byte): ..
5915 * stabs.c (_bfd_link_section_stabs): ..
5916 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5917 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5918 with corresponding %B and %A in _bfd_error_handler format string.
5919 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5920 calls to use %A and %B. Fix "against symbol .. from section" and
5921 similar error messages. Combine multiple _bfd_error_handler calls
5922 where they were separated due to bfd_archive_filename deficiencies.
5923 * bfd-in2.h: Regenerate.
5924
6ba842b6
L
59252004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5926
5927 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5928 relocation.
5929
99877b66
AM
59302004-08-10 Alan Modra <amodra@bigpond.net.au>
5931
5932 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5933 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5934 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5935 Add twiddled_syms.
5936 (link_hash_newfunc): Init was_undefined.
5937 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5938 Use undefweak instead.
5939 (ppc64_elf_check_directives): Fix undefs chain.
5940 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5941 references.
5942 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5943 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5944 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5945
ba3bee0b
JJ
59462004-08-09 Jakub Jelinek <jakub@redhat.com>
5947
5948 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5949 error, test input_section flags rather than sec.
5950
8387904d
AM
59512004-08-09 Alan Modra <amodra@bigpond.net.au>
5952
5953 * elf-bfd.h (struct elf_backend_data): Add
5954 elf_backend_archive_symbol_lookup.
5955 (_bfd_elf_archive_symbol_lookup): Declare.
5956 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5957 (elf_link_add_archive_symbols): ..extracted from here. Call the
5958 backend version.
5959 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5960 (elfNN_bed): Init new field.
5961 * elf64-ppc.c (elf_backend_check_directives): Define.
5962 (elf_backend_archive_symbol_lookup): Define.
5963 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5964 a ppc_link_hash_entry pointer.
5965 (get_fdh): Move.
5966 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5967 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5968 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5969 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5970 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5971 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5972 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5973 descriptor symbols.
5974
b25116a9
AM
59752004-08-09 Alan Modra <amodra@bigpond.net.au>
5976
8843416a
AM
5977 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5978 (ppc64_elf_add_symbol_hook): Test for NULL section.
5979 (get_sym_h): Formatting.
5980 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5981 stub target_value.
5982
b25116a9
AM
5983 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5984 long branch stubs with code handling plt and r2off branch stubs.
5985
ccfa59ea
AM
59862004-08-09 Alan Modra <amodra@bigpond.net.au>
5987
5988 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5989 * elflink.c (elf_link_input_bfd): Formatting.
5990 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5991 all callers.
5992 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5993 (link_hash_newfunc): Don't set it.
5994 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5995 (ppc64_elf_mark_entry_syms): Delete.
5996 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5997 sections. Use get_opd_info.
5998 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5999
4025353c
AM
60002004-08-09 Alan Modra <amodra@bigpond.net.au>
6001
4f800a42
AM
6002 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6003
06da1e8e
AM
6004 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6005 (func_desc_adjust): Don't set have_undefweak.
6006 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6007 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6008
34814b9f
AM
6009 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6010 "struct ppc_link_hash_entry *". Adjust all references.
6011 (ppc64_elf_hide_symbol): Correct a comment.
6012
4025353c
AM
6013 * elf64-ppc.c (get_opd_info): New function.
6014 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
6015 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
6016 before calling get_fdh. Test fdh rather than h before dereferencing
6017 fdh. Mark removed symbols in opd_adjust.
6018 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6019 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6020 opd symbols.
6021 (ppc64_elf_output_symbol_hook): Likewise.
6022
db6579d4
PB
60232004-08-06 Paul Brook <paul@codesourcery.com>
6024
6025 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6026 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6027 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6028 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6029 and BFD_RELOC_ARM_SBREL32.
6030 * bfd-in2.h, bbfd.h: Regenerate.
6031
a4d0f181
TS
60322004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6033
6034 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6035 the dynamic link symbol actually in use.
6036
83774818
SC
60372004-08-01 Stephane Carrez <stcarrez@nerim.fr>
6038
6039 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6040
a4d0f181 60412004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
6042 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6043
6044 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6045 SHN_MIPS_TEXT and SHN_MIPS_DATA.
6046
185d09ad
L
60472004-07-30 H.J. Lu <hongjiu.lu@intel.com>
6048 Nick Clifton <nickc@redhat.com>
6049
6050 PR 290
6051 * bfd.c (_bfd_default_error_handler): Make it global.
6052
6053 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6054
6055 * elf.c (assign_section_numbers): Cope gracefully with sections
6056 which have SHF_LINK_ORDER set but no sh_link set up.
6057 * elflink.c (elf_get_linked_section_vma): Likewise.
6058
6059 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6060 it to NULL.
6061
6062 * elfxx-target.h (elf_backend_link_order_error_handler): New.
6063 Set it to _bfd_default_error_handler.
6064 (elfNN_bed): Add elf_backend_link_order_error_handler.
6065
6066 * libbfd-in.h (_bfd_default_error_handler): New.
6067
6068 * libbfd.h: Regenerated.
6069
7946e94a
JJ
60702004-07-30 Jakub Jelinek <jakub@redhat.com>
6071
6072 * archures.c (bfd_mach_sparc_64bit_p): Define.
6073 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6074 * bfd-in2.h: Rebuilt.
6075
1d70c7fb
AO
60762004-07-29 Alexandre Oliva <aoliva@redhat.com>
6077
6078 Introduce SH2a support.
6079 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
6080 * archures.c (bfd_mach_sh2a_nofpu): New.
6081 * bfd-in2.h: Rebuilt.
6082 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6083 (arch_info_struct): Add sh2a_nofpu.
6084 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6085 2003-12-29 DJ Delorie <dj@redhat.com>
6086 * reloc.c: Add relocs for sh2a.
6087 * bfd-in2.h: Regenerate.
6088 * libbfd.hh: Regenerate.
6089 2003-12-01 Michael Snyder <msnyder@redhat.com>
6090 * archures.c (bfd_mach_sh2a): New.
6091 * bfd-in2.h: Rebuilt.
6092 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6093 (SH2A_NEXT): New.
6094 (arch_info_struct): Add sh2a.
6095 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6096
404ed0cf
DA
60972004-07-28 Nick Clifton <nickc@redhat.com>
6098 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6099
6100 PR 273
6101 * som.c (setup_sections): Improve estimation of space sizes in
6102 relocatable objects.
6103
225247f0
JT
61042004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
6105 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6106 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
6107 to targ_selvecs.
6108 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6109 * configure: Regenerate.
6110 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6111 case that accepts OSABI=NetBSD and OSABI=SysV.
6112 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6113 the base of .got or .data (if .got does not exist).
6114 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6115 set OSABI=NetBSD.
6116 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6117 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6118 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6119 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6120
3d7f7666
L
61212004-07-27 H.J. Lu <hongjiu.lu@intel.com>
6122
6123 PR 161/251
6124 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6125 (elf_sec_group): Defined.
6126 (bfd_elf_match_symbols_in_sections): New prototype.
6127 (_bfd_elf_setup_group_pointers): Likewise.
6128
6129 * elf.c (bfd_elf_discard_group): Abort.
6130 (bfd_elf_set_group_contents): Also include relocation sections.
6131 Remove zero-fill for ld -r.
6132 (_bfd_elf_setup_group_pointers): New function.
6133 (elf_sort_elf_symbol): Likewise.
6134 (elf_sym_name_compare): Likewise.
6135 (bfd_elf_match_symbols_in_sections): Likewise.
6136
6137 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6138
6139 * elflink.c (match_group_member): New.
6140 (elf_link_input_bfd): Check group member for discarded section.
6141 (try_match_symbols_in_sections): New function.
6142 (already_linked): Likewise.
6143 (_bfd_elf_section_already_linked): Support mixing comdat group
6144 and linkonce section.
6145
6146 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6147 * linker.c (bfd_section_already_linked_table_traverse): New.
6148
6149 * libbfd.h: Regenerated.
6150
670ec21d
NC
61512004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
6152
6153 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6154 BFD_RELOC_CRX_SWITCH32.
6155 * bfd-in2.h: Regenerate.
6cd7f07e 6156 * libbfd.h: Regenerate.
670ec21d
NC
6157 * elf32-crx.c: Support relocation/relaxation of
6158 BFD_RELOC_CRX_SWITCH* types.
6159
2c66dc6c
AM
61602004-07-27 Alan Modra <amodra@bigpond.net.au>
6161
6162 * elf64-ppc.c: Correct "Linker stubs" comment.
6163
38ce5b11
L
61642004-07-26 H.J. Lu <hongjiu.lu@intel.com>
6165
6166 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6167 linked-to section.
6168 (elf_linked_to_section): New.
6169
6170 * elf.c (assign_section_numbers): Set up sh_link for
6171 SHF_LINK_ORDER.
6172
6173 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6174 to sh_link for SHT_IA_64_UNWIND sections.
6175
65da361f
L
61762004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6177
6178 * elflink.c (elf_fixup_link_order): Add _() to error message.
6179
08ccf96b
L
61802004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6181
6182 * elflink.c (elf_fixup_link_order): Issue a warning and flag
6183 an error if failed.
6184
082b7297
L
61852004-07-21 H.J. Lu <hongjiu.lu@intel.com>
6186
6187 * aout-adobe.c (aout_32_section_already_linked): Defined.
6188 * aout-target.h (MY_section_already_linked): Likewise.
6189 * aout-tic30.c (MY_section_already_linked): Likewise.
6190 * binary.c (binary_section_already_linked): Likewise.
6191 * bout.c (b_out_section_already_linked): Likewise.
6192 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6193 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6194 * coffcode.h (coff_section_already_linked): Likewise.
6195 * i386msdos.c (msdos_section_already_linked): Likewise.
6196 * i386os9k.c (os9k_section_already_linked): Likewise.
6197 * ieee.c (ieee_section_already_linked): Likewise.
6198 * ihex.c (ihex_section_already_linked): Likewise.
6199 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6200 * mmo.c (mmo_section_already_linked): Likewise.
6201 * nlm-target.h (nlm_section_already_linked): Likewise.
6202 * oasys.c (oasys_section_already_linked): Likewise.
6203 * pef.c (bfd_pef_section_already_linked): Likewise.
6204 * ppcboot.c (ppcboot_section_already_linked): Likewise.
6205 * som.c (som_bfd_discard_group): Likewise.
6206 * srec.c (srec_section_already_linked): Likewise.
6207 * tekhex.c (tekhex_section_already_linked): Likewise.
6208 * versados.c (versados_section_already_linked): Likewise.
6209 * vms.c (vms_section_already_linked): Likewise.
6210 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6211 * xsym.c (bfd_sym_section_already_linked): Likewise.
6212
6213 * bfd-in.h (bfd_section_already_linked_table_init): New.
6214 (bfd_section_already_linked_table_free): Likewise.
6215
6216 * coff-rs6000.c (rs6000coff_vec): Add
6217 _bfd_generic_section_already_linked.
6218 (pmac_xcoff_vec): Likewise.
6219 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6220 (aix5coff64_vec): Likewise.
6221
6222 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6223 * elflink.c (_bfd_elf_section_already_linked): New function.
6224
6225 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6226
6227 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6228 (_bfd_generic_section_already_linked): New.
6229 (bfd_section_already_linked_hash_entry): Likewise.
6230 (bfd_section_already_linked): Likewise.
6231 (bfd_section_already_linked_table_lookup): Likewise.
6232 (bfd_section_already_linked_table_insert): Likewise.
6233
6234 * linker.c (bfd_section_already_linked): New.
6235 (_bfd_section_already_linked_table): Likewise.
6236 (bfd_section_already_linked_table_lookup): Likewise.
6237 (bfd_section_already_linked_table_insert): Likewise.
6238 (already_linked_newfunc): Likewise.
6239 (bfd_section_already_linked_table_init): Likewise.
6240 (bfd_section_already_linked_table_free): Likewise.
6241 (_bfd_generic_section_already_linked): Likewise.
6242
6243 * section.c (bfd_section): Remove comdat.
6244 (bfd_comdat_info): Moved to ...
6245 * bfd-in.h (coff_comdat_info): Here.
6246 (bfd_coff_get_comdat_section): New.
6247 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6248 * libcoff-in.h (coff_section_tdata): Add comdat.
6249 * coffcode.h (handle_COMDAT): Updated.
6250 * cofflink.c (coff_link_add_symbols): Likewise.
6251 * ecoff.c (bfd_debug_section): Likewise.
6252
6253 * targets.c (bfd_target): Add _section_already_linked.
6254 (BFD_JUMP_TABLE_LINK): Updated.
6255
6256 * bfd-in2.h: Regenerated.
6257 * libbfd.h: Likewise.
6258 * libcoff.h: Likewise.
6259
0b52efa6
PB
62602003-07-21 Paul Brook <paul@codesourcery.com>
6261
6262 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6263 elf_fixup_link_order): New functions.
6264 (bfd_elf_final_link): Call elf_fixup_link_order.
6265
7e2294f9
AO
62662004-07-21 Alexandre Oliva <aoliva@redhat.com>
6267
6268 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6269 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6270 common definitions.
6271 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6272 _bfd_elf_symbol_refs_local_p.
6273 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6274 symbols.
6275
e56f61be
L
62762004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6277
6278 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6279 DYN_NO_NEEDED.
6280 (bfd_elf_get_dyn_lib_class): New prototype.
6281 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6282
6283 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6284 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6285 entry is needed. Issue an error if a DT_NEEDED entry is needed
6286 for a file marked DYN_NO_NEEDED.
6287 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6288 for DT_NEEDED tags.
6289
6290 * bfd-in2.h: Regenerated.
6291
27b56da8
DA
62922004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6293
6294 * elflink.c (elf_section_complain_discarded): Don't complain in
6295 .PARISC.unwind.
6296
bbb268c3
JW
62972004-07-10 James E Wilson <wilson@specifixinc.com>
6298
6299 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6300 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6301 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6302 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6303 Fix callers.
6304 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6305 bfd_put_64 to bfd_putl64.
6306 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 6307
e525914f
L
63082004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6309
6310 PR 240
6311 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6312 .init/.fini sections when trying to relax it.
6313
b1a6d0b1
NC
63142004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6315
6316 * elf.c (assign_file_positions_for_segments): Make sure the
6317 .dynamic section is the first section in the PT_DYNAMIC segment.
6318
1a320fbb
NC
63192004-07-09 Nick Clifton <nickc@redhat.com>
6320
6321 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6322 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6323 sh_elf_get_flags_from_mach functions so that they do not conflict
6324 when this target is built with other sh-elf targets.
6325 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6326 suppression of this function.
6327 (sh_elf_find_flags): Likewise.
6328
1fe1f39c
NC
63292004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6330
6331 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6332 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6333 (BFD32_BACKENDS): Add elf32-crx.lo.
6334 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6335 (cpu-crx.lo): New target.
6336 (elf32-crx.lo): New target.
6337 * Makefile.in: Regenerate.
6338 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6339 (bfd_archures_list): Add bfd_crx_arch.
6340 * bfd-in2.h: Regenerate.
6341 * config.bfd: Handle crx-*-elf*, crx*.
6342 * configure.in: Handle bfd_elf32_crx_vec.
6343 * configure: Regenerate.
6344 * cpu-crx.c: New file.
6345 * elf32-crx.c: Likewise.
6346 * libbfd.h: Regenerate.
6347 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6348 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6349 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6350 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6351 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6352 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6353 * targets.c (bfd_elf32_crx_vec): Declare.
6354 (bfd_target_vector): Add bfd_elf32_crx_vec.
6355
85fbca6a
NC
63562004-07-06 Nick Clifton <nickc@redhat.com>
6357
6358 * config.bfd: Add sh-symbian-elf target.
6359 * configure.in: Add bfd_elf32_shl_symbian_vec.
6360 * configure: Regenerate.
6361 * elf-bfd.h (struct elf_backend_data): Add new field
6362 'check_directives'.
1fe1f39c 6363 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 6364 check_directives function, if defined.
1fe1f39c 6365 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 6366 check_directives.
1fe1f39c
NC
6367 * targets.c: Add bfd_elf32_shl_symbian_vec.
6368 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 6369 definition.
1fe1f39c 6370 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 6371 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 6372 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 6373 not already been defined.
1fe1f39c
NC
6374 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6375 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
6376 * sh-symbian-elf target.
6377 * Makefile.am: Add elf32-sh-symbian.c
6378 * Makefile.in: Regenerate.
1fe1f39c 6379
871ec896
JR
63802004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6381
1fe1f39c
NC
6382 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6383 * Makefile.am: Ran make dep-am.
6384 * Makefile.in: Ran make dep-in.
871ec896 6385
c87db184
CF
63862004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6387
6388 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6389 externals properly.
6390
06f2f6af
MS
63912004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6392
6393 * config.bfd: Add want64 to configuration target s390-*-linux*.
6394
b602c853
L
63952004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6396
6397 * bfd.c (bfd_get_section_ident): New.
6398
6399 * elflink.c (elf_link_read_relocs_from_section): Call
6400 bfd_get_section_ident to identify the section when reporting
6401 error.
6402 (_bfd_elf_link_output_relocs): Likewise.
6403 (elf_link_output_extsym): Likewise.
6404 (elf_link_input_bfd): Likewise.
6405 (bfd_elf_gc_record_vtinherit): Likewise.
6406
6407 * bfd-in2.h: Regenerated.
6408
7a2a6943
NC
64092004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6410 Nick Clifton <nickc@redhat.com>
6411
6412 PR 204
6413 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6414 of section symbols to mips_elf_sort_hash_table ().
6415
cdd3575c
AM
64162004-07-01 Alan Modra <amodra@bigpond.net.au>
6417
6418 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6419 change. Comment.
6420 (elf_section_complain_discarded): New function. Handle
6421 .gcc_except_table too.
6422 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6423 in discarded sections.
6424 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6425
21a8f7fa
JW
64262004-06-30 James E Wilson <wilson@specifixinc.com>
6427
6428 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6429 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6430
2de26f35
L
64312004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6432
6433 PR 233
6434 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6435 local references to discarded sections and report their
6436 locations.
6437
72d7a15c
AM
64382004-06-30 Alan Modra <amodra@bigpond.net.au>
6439
6440 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6441 sec_info_type, test section name instead.
6442
e7f0a167
L
64432004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6444
6445 PR 240
6446 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6447 in .init/.fini sections.
6448
bff5f93a
BW
64492004-06-29 Bob Wilson <bob.wilson@acm.org>
6450
6451 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6452 bfd_get_section_limit.
6453
b54d4b07
BW
64542004-06-29 Bob Wilson <bob.wilson@acm.org>
6455
6456 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6457 output section size.
6458
e87a64e1
AM
64592004-06-29 Alan Modra <amodra@bigpond.net.au>
6460
1a23a9e6
AM
6461 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6462 rawsize.
6463 (mmix_elf_perform_relocation): Adjust for above change.
6464 (mmix_elf_relocate_section): Likewise.
6465 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6466 (mmix_elf_get_section_contents): Delete.
6467 (bfd_elf64_get_section_contents): Delete.
6468 (mmix_elf_relocate_section): Zero stub area.
6469 * linker.c (default_indirect_link_order): Alloc max of section size
6470 and rawsize.
6471 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6472 * section.c (bfd_malloc_and_get_section): Likewise.
6473 (struct bfd_section): Update rawsize comment.
6474 * bfd-in2.h: Regenerate.
6475
e87a64e1
AM
6476 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6477
07515404
AM
64782004-06-29 Alan Modra <amodra@bigpond.net.au>
6479
6480 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 6481 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
6482 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6483 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6484 * coff-arm.c (coff_arm_relocate_section): Likewise.
6485 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6486 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6487 (bfd_ns32k_final_link_relocate): Likewise.
6488 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6489 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 6490 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 6491 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 6492 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
6493 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6494 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6495 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6496 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6497 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6498 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6499 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6500 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6501 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6502 * elf32-v850.c (v850_elf_reloc): Likewise.
6503 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6504 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6505 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6506 * elf64-mips.c (mips_elf64_gprel32_reloc)
6507 (mips16_gprel_reloc): Likewise.
6508 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6509 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6510 * elf64-sparc.c (init_insn_reloc): Likewise.
6511 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
6512 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6513 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
6514 (_bfd_mips_elf_generic_reloc): Likewise.
6515 * bfd-in2.h: Regenerate.
6516
3722b82f
AM
65172004-06-28 Alan Modra <amodra@bigpond.net.au>
6518
6519 * bfd-in.h (struct stab_info): Move from stabs.c.
6520 * stabs.c (struct stab_link_includes_table): Delete.
6521 (stab_link_includes_lookup): Delete.
6522 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6523 level of indirection from sinfo parm.
6524 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6525 stabstr section. Adjust hash table accesses.
6526 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6527 alloc. Adjust stab_info test.
6528 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6529 (_bfd_coff_final_link): Adjust stab_info test.
6530 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6531 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6532 in place.
6533 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6534 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6535 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6536 stabstr section. Adjust stab_info test.
6537 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6538 (_bfd_write_stab_strings): Adjust prototypes.
6539 * libbfd.h: Regenerate.
6540 * libcoff.h: Regenerate.
6541 * bfd-in2.h: Regenerate.
6542
727e493d
MK
65432004-06-27 Mark Kettenis <kettenis@gnu.org>
6544
6545 From Miod Vallat <miod@online.fr>:
6546 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6547
146ccdbb
AO
65482004-06-26 Alexandre Oliva <aoliva@redhat.com>
6549
6550 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6551 (struct elf32_mn10300_link_hash_entry): Remove
6552 pcrel_relocs_copied.
6553 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6554 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6555 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6556 and gotoff relocations if the symbol doesn't bind locally. Use
6557 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6558 relocation for PCREL32.
6559 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6560 to test whether a symbol binds locally.
6561 (elf32_mn10300_link_hash_newfunc): Don't initialize
6562 pcrel_relocs_copied.
6563 (_bfd_mn10300_elf_discard_copies): Delete.
6564 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6565
a5fd0812
MK
65662004-06-26 Mark Kettenis <kettenis@gnu.org>
6567
6568 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6569
22bfad37
JB
65702004-06-25 Joel Brobecker <brobecker@gnat.com>
6571
6572 * som.c (som_set_reloc_info): Correct small typo.
6573
097f809a
NC
65742004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6575
6576 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6577 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6578 (m32r_elf_gcsweep_hook): Likewise.
6579 (m32r_elf_check_relocs): Likewise.
6580 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6581 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6582 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6583 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
6584 * bfd-in2.h: Regenerated.
6585 * libbfd.h: Regenerated.
097f809a 6586
6610a52d
L
65872004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6588
6589 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6590 relocation symbol.
6591 (elf64_x86_64_relocate_section): Issue an error for
6592 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6593 against global symbols when building shared library.
6594
eea6121a
AM
65952004-06-24 Alan Modra <amodra@bigpond.net.au>
6596
6597 * section.c (struct sec): Rename "_cooked_size" to "size".
6598 Rename "_raw_size" to "rawsize".
6599 (STD_SECTION): Adjust comments.
6600 (bfd_set_section_size, bfd_get_section_contents): Use size.
6601 (bfd_malloc_and_get_section): New function.
6602 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6603 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6604 Correctly free reloc and contents memory.
6605 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6606 and fake CIE now that we can shink section size to zero.
6607 (_bfd_elf_write_section_eh_frame): Likewise..
6608 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6609 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6610 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6611 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6612 unneeded indirection.
6613 * elf.c (_bfd_elf_section_offset): .. and update call.
6614 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6615 * libbfd.h: Regenerate.
6616 * bfd-in2.h: Regenerate.
6617
6618 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6619 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6620 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6621 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6622 Similarly use "rawsize", if non-zero, in reloc functions to validate
6623 reloc addresses. Use new bfd_malloc_and_get_section in most places
6624 where bfd_get_section_contents was called. Expand all occurrences of
6625 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6626 grok_prstatus and similar functions to "size".
6627 * aix386-core.c (aix386_core_file_p): ..
6628 * aix5ppc-core.c (xcoff64_core_p): ..
6629 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6630 aout_adobe_set_section_contents): ..
6631 * aout-target.h (callback): ..
6632 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6633 MY_bfd_final_link): ..
6634 * aoutf1.h (sunos4_core_file_p): ..
6635 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6636 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6637 final_link, aout_link_input_section): ..
6638 * binary.c (binary_object_p, binary_canonicalize_symtab,
6639 binary_set_section_contents): ..
6640 * bout.c (b_out_callback, b_out_write_object_contents,
6641 b_out_set_section_contents, b_out_bfd_relax_section,
6642 b_out_bfd_get_relocated_section_contents): ..
6643 * cisco-core.c (cisco_core_file_validate): ..
6644 * coff-alpha.c (alpha_ecoff_object_p,
6645 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6646 * coff-arm.c (coff_arm_relocate_section,
6647 bfd_arm_allocate_interworking_sections): ..
6648 * coff-h8300.c (h8300_reloc16_extra_cases,
6649 h8300_bfd_link_add_symbols): ..
6650 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6651 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6652 ppc_bfd_coff_final_link): ..
6653 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6654 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6655 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6656 * coff64-rs6000.c (xcoff64_write_object_contents,
6657 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6658 * coffcode.h (coff_compute_section_file_positions,
6659 coff_write_object_contents): ..
6660 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6661 coff_section_symbol, build_debug_section): ..
6662 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6663 process_embedded_commands, _bfd_coff_link_input_bfd,
6664 _bfd_coff_write_global_sym): ..
6665 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6666 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6667 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6668 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6669 _bfd_dwarf2_find_nearest_line): ..
6670 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6671 ecoff_compute_section_file_positions,
6672 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6673 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6674 _bfd_elf_discard_section_eh_frame_hdr,
6675 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6676 _bfd_elf_write_section_eh_frame,
6677 _bfd_elf_write_section_eh_frame_hdr): ..
6678 * elf-hppa.h (elf_hppa_sort_unwind): ..
6679 * elf-m10200.c (mn10200_elf_relax_section,
6680 mn10200_elf_relax_delete_bytes,
6681 mn10200_elf_get_relocated_section_contents): ..
6682 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6683 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6684 mn10300_elf_relax_delete_bytes,
6685 mn10300_elf_get_relocated_section_contents,
6686 _bfd_mn10300_elf_adjust_dynamic_symbol,
6687 _bfd_mn10300_elf_discard_copies,
6688 _bfd_mn10300_elf_size_dynamic_sections,
6689 _bfd_mn10300_elf_finish_dynamic_sections): ..
6690 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6691 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6692 bfd_elf_set_group_contents, map_sections_to_segments,
6693 elf_sort_sections, assign_file_positions_for_segments,
6694 SECTION_SIZE, copy_private_bfd_data,
6695 _bfd_elf_get_dynamic_reloc_upper_bound,
6696 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6697 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6698 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6699 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6700 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6701 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6702 bfd_elf32_arm_process_before_allocation,
6703 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6704 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6705 elf32_arm_write_section): ..
6706 * elf32-cris.c (cris_elf_grok_prstatus,
6707 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6708 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6709 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6710 elf_cris_discard_excess_dso_dynamics,
6711 elf_cris_discard_excess_program_dynamics): ..
6712 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6713 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6714 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6715 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6716 elf32_frvfdpic_size_dynamic_sections,
6717 elf32_frvfdpic_modify_segment_map,
6718 elf32_frvfdpic_finish_dynamic_sections): ..
6719 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6720 elf32_h8_get_relocated_section_contents): ..
6721 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6722 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6723 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6724 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6725 elf32_hppa_finish_dynamic_sections): ..
6726 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6727 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6728 i370_elf_finish_dynamic_sections): ..
6729 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6730 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6731 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6732 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6733 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6734 * elf32-ip2k.c (ip2k_is_switch_table_128,
6735 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6736 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6737 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6738 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6739 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6740 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6741 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6742 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6743 m32r_elf_get_relocated_section_contents): ..
6744 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6745 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6746 m68hc11_elf_relax_delete_bytes): ..
6747 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6748 m68hc12_elf_size_one_stub): ..
6749 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6750 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6751 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6752 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6753 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6754 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6755 elf32_mips_grok_prstatus): ..
6756 * elf32-or32.c (or32_elf_consth_reloc): ..
6757 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6758 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6759 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6760 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6761 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6762 ppc_elf_final_write_processing): ..
6763 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6764 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6765 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6766 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6767 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6768 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6769 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6770 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6771 * elf32-sh64-com.c (sh64_address_in_cranges,
6772 sh64_get_contents_type): ..
6773 * elf32-sh64.c (sh64_find_section_for_address,
6774 sh64_elf_final_write_processing): ..
6775 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6776 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6777 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6778 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6779 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6780 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6781 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6782 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6783 elf_vax_finish_dynamic_sections): ..
6784 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6785 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6786 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6787 xstormy16_elf_finish_dynamic_sections): ..
6788 * elf32-xtensa.c (xtensa_read_table_entries,
6789 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6790 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6791 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6792 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6793 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6794 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6795 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6796 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6797 xtensa_callback_required_dependence): ..
6798 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6799 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6800 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6801 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6802 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6803 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6804 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6805 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6806 * elf64-hppa.c (allocate_dynrel_entries,
6807 elf64_hppa_size_dynamic_sections,
6808 elf64_hppa_finish_dynamic_sections): ..
6809 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6810 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6811 elf64_mips_grok_prstatus): ..
6812 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6813 mmix_elf_relocate_section, mmix_elf_final_link,
6814 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6815 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6816 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6817 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6818 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6819 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6820 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6821 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6822 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6823 ppc64_elf_finish_dynamic_sections): ..
6824 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6825 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6826 elf_s390_finish_dynamic_sections): ..
6827 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6828 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6829 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6830 sh64_elf64_finish_dynamic_sections): ..
6831 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6832 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6833 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6834 sparc64_elf_finish_dynamic_symbol,
6835 sparc64_elf_finish_dynamic_sections): ..
6836 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6837 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6838 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6839 elf64_x86_64_finish_dynamic_sections): ..
6840 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6841 * elfcode.h (elf_slurp_reloc_table): ..
6842 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6843 elf_finalize_dynstr, elf_link_add_object_symbols,
6844 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6845 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6846 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6847 elf32_mips_grok_prstatus): ..
6848 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6849 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6850 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6851 elfNN_ia64_finish_dynamic_sections): ..
6852 * elfxx-mips.c (mips_elf_create_procedure_table,
6853 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6854 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6855 mips_elf_global_got_index, mips_elf_multi_got,
6856 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6857 mips_elf_allocate_dynamic_relocations,
6858 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6859 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6860 _bfd_mips_elf_always_size_sections,
6861 _bfd_mips_elf_size_dynamic_sections,
6862 _bfd_mips_elf_finish_dynamic_symbol,
6863 _bfd_mips_elf_finish_dynamic_sections,
6864 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6865 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6866 _bfd_elf_mips_get_relocated_section_contents,
6867 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6868 * hp300hpux.c (callback): ..
6869 * hppabsd-core.c (make_bfd_asection): ..
6870 * hpux-core.c (make_bfd_asection): ..
6871 * i386linux.c (linux_link_create_dynamic_sections,
6872 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6873 * i386msdos.c (msdos_write_object_contents): ..
6874 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6875 os9k_set_section_contents): ..
6876 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6877 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6878 ieee_write_section_part, do_with_relocs, do_as_repeat,
6879 do_without_relocs, ieee_write_debug_part, init_for_output,
6880 ieee_set_section_contents): ..
6881 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6882 * irix-core.c (do_sections, make_bfd_asection): ..
6883 * libaout.h (aout_section_merge_with_text_p): ..
6884 * libbfd.c (_bfd_generic_get_section_contents,
6885 _bfd_generic_get_section_contents_in_window): ..
6886 * linker.c (default_indirect_link_order): ..
6887 * lynx-core.c (make_bfd_asection): ..
6888 * m68klinux.c (linux_link_create_dynamic_sections,
6889 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6890 * mach-o.c (bfd_mach_o_make_bfd_section,
6891 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6892 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6893 bfd_mach_o_scan_read_segment): ..
6894 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6895 _bfd_merge_sections): ..
6896 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6897 mmo_map_set_sizes, mmo_canonicalize_symtab,
6898 mmo_internal_write_section, mmo_write_object_contents): ..
6899 * netbsd-core.c (netbsd_core_file_p): ..
6900 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6901 nlm_alpha_set_public_section): ..
6902 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6903 * nlm32-sparc.c (nlm_sparc_write_import): ..
6904 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6905 nlm_compute_section_file_positions): ..
6906 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6907 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6908 * opncls.c (get_debug_link_info): ..
6909 * osf-core.c (make_bfd_asection): ..
6910 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6911 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6912 final_link, aout_link_input_section): ..
6913 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6914 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6915 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6916 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6917 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6918 * ptrace-core.c (ptrace_unix_core_file_p): ..
6919 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6920 _bfd_final_link_relocate, bfd_generic_relax_section,
6921 bfd_generic_get_relocated_section_contents): ..
6922 * reloc16.c (bfd_coff_reloc16_relax_section,
6923 bfd_coff_reloc16_get_relocated_section_c): ..
6924 * riscix.c (riscix_some_aout_object_p): ..
6925 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6926 * sco5-core.c (make_bfd_asection): ..
6927 * simple.c (bfd_simple_get_relocated_section_contents): ..
6928 * som.c (som_object_setup, setup_sections, som_prep_headers,
6929 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6930 som_set_reloc_info, som_get_section_contents,
6931 som_bfd_link_split_section): ..
6932 * sparclinux.c (linux_link_create_dynamic_sections,
6933 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6934 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6935 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6936 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6937 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6938 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6939 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6940 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6941 sunos_finish_dynamic_link): ..
6942 * syms.c (_bfd_stab_section_find_nearest_line): ..
6943 * tekhex.c (first_phase, tekhex_set_section_contents,
6944 tekhex_write_object_contents): ..
6945 * trad-core.c (trad_unix_core_file_p): ..
6946 * versados.c (process_esd, process_otr, process_otr): ..
6947 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6948 * vms-misc.c (add_new_contents): ..
6949 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6950 * vms.c (vms_set_section_contents): ..
6951 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6952 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6953 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6954 * xsym.c (bfd_sym_scan): .. See above.
6955
bf8b15af
L
69562004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6957
6958 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6959 calling _bfd_merged_section_offset only for section symbols.
6960
d1c6de6f
AM
69612004-06-22 Alan Modra <amodra@bigpond.net.au>
6962
6963 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6964 for handling SEC_MERGE symbols in relax_section.
6965
aa02cc63
AO
69662004-06-21 Alexandre Oliva <aoliva@redhat.com>
6967
6968 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6969 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6970 linked together. Mark the result as h8300sx code.
6971
aee6f5b4
AO
69722004-06-21 Alexandre Oliva <aoliva@redhat.com>
6973
6974 * elf-bfd.h (struct elf_backend_data): Added
6975 elf_backend_omit_section_dynsym.
6976 (_bfd_elf_link_omit_section_dynsym): Declare.
6977 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6978 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6979 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6980 (_bfd_elf_link_renumber_dynsyms): ... this function.
6981 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6982 _bfd_elf_link_omit_section_dynsym).
6983 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6984
05576f10
NC
69852004-06-21 Nick Clifton <nickc@redhat.com>
6986
6987 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6988 flags.
6989
02d5a37b
JG
69902004-06-17 Jerome Guitton <guitton@gnat.com>
6991
6992 * bfd-in.h (bfd_cache_close_all): New function declaration.
6993 * bfd-in2.h: Regenerate.
6994 * cache.c (bfd_cache_close_all): New function definition.
6995
d2bef492
MK
69962004-06-16 Mark Kettenis <kettenis@gnu.org>
6997
6998 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6999 4.10 and beyond.
7000 * configure: Regenerate.
7001
8528d62e
DJ
70022004-06-16 Daniel Jacobowitz <dan@debian.org>
7003
7004 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7005 the pre-existing section.
7006
911d08a7
AM
70072004-06-15 Alan Modra <amodra@bigpond.net.au>
7008
7009 * section.c (struct sec): Remove usused flags. Reorganize a little.
7010 (bfd_get_section_size_before_reloc): Delete.
7011 (bfd_get_section_size_after_reloc): Delete.
7012 (STD_SECTION): Update.
7013 (bfd_get_section_size_now): Delete.
7014 (bfd_set_section_contents): Don't referece reloc_done.
7015 (bfd_get_section_contents): Remove reloc_done comment.
7016 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7017 reloc_done.
7018 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7019 * ecoff.c (bfd_debug_section): Update initializer.
7020 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7021 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7022 * bfd-in.h (bfd_section_size): Expand.
7023 (bfd_get_section_size): New macro.
7024 * bfd-in2.h: Regenerate.
7025 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7026 bfd_get_section_size_before_reloc with bfd_get_section_size.
7027 * coffcode.h (coff_write_object_contents): Likewise.
7028 * coffgen.c (build_debug_section): Likewise.
7029 * dwarf1.c (parse_line_table): Likewise.
7030 (_bfd_dwarf1_find_nearest_line): Likewise.
7031 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7032 * i386msdos.c (msdos_write_object_contents): Likewise.
7033 * pdp11.c (squirt_out_relocs): Likewise.
7034 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7035 * elf64-mmix.c (mmix_elf_final_link): Update comment.
7036
092dcd75
CD
70372004-06-14 Chris Demetriou <cgd@broadcom.com>
7038
7039 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7040 removal) with updated comment.
7041 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7042 BFD_RELOC_32_PCREL.
7043 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7044 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7045
3ffa5234
AM
70462004-06-12 Alan Modra <amodra@bigpond.net.au>
7047
7048 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7049 overflow on branches to undefweaks.
7050
e9edc808
MR
70512004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7052
7053 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7054 as ecoff_section_data() does not return a valid lvalue.
7055
a873f25a
AO
70562004-06-09 Alexandre Oliva <aoliva@redhat.com>
7057
a9b881be
AO
7058 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7059 (elf_link_add_object_symbols): Likewise.
7060
a873f25a
AO
7061 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7062 (elf_backend_reloc_type_class): New.
7063
eef0f186
MK
70642004-06-08 Mark Kettenis <kettenis@gnu.org>
7065
7066 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7067 netbsd-core.lo.
7068 * configure: Regenerate.
7069
822392ce
DJ
70702004-06-07 Daniel Jacobowitz <dan@debian.org>
7071
7072 From: Albert Chin-A-Young <china@thewrittenword.com>
7073 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7074 to unsigned int.
7075
9f2e92c5
L
70762004-05-29 H.J. Lu <hongjiu.lu@intel.com>
7077
7078 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7079 change.
7080
dd90f1b2
DD
70812004-05-28 DJ Delorie <dj@redhat.com>
7082
7083 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7084 for linking, but otherwise adjust reloc for merged sections.
7085
5dd23ec1
L
70862004-05-28 H.J. Lu <hongjiu.lu@intel.com>
7087
7088 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7089 _bfd_merged_section_offset for local symbols.
7090
f6f9408f
JR
70912004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
7092
7093 * Makefile.am: Regenerate dependencies.
7094 * Makefile.in: Regenerate.
7095 * archures.c: Add bfd_mach_sh3_nommu .
7096 * bfd-in2.h: Regenerate.
7097 * cpu-sh.c: Add sh3-nommu architecture.
7098 (bfd_to_arch_table): Create new table.
7099 (sh_get_arch_from_bfd_mach): Create new function.
7100 (sh_get_arch_up_from_bfd_mach): Create new function.
7101 (sh_merge_bfd_arch): Create new function.
7102 * elf32-sh.c (sh_ef_bfd_table): Add table.
7103 (sh_elf_check_relocs): Replace switch statement with
7104 use of sh_ef_bfd_table .
7105 (sh_elf_get_flags_from_mach): Add new function.
7106 (sh_find_elf_flags): Likewise.
7107 (sh_elf_copy_private_data): Replace most of non-elf contents
7108 with a call to sh_merge_bfd_arch() .
7109
d866f350
MC
71102004-05-27 Michael Chastain <mec.gnu@mindspring.com>
7111
7112 * Makefile.am (bfdver.h): Use explicit filename, not $< .
7113 * Makefile.in: Regenerate.
7114
1055df0f
AO
71152004-05-27 Alexandre Oliva <aoliva@redhat.com>
7116
7117 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7118 custom calling conventions for dynamic symbols.
7119 (mn10300_elf_relax_section): Avoid relaxing a function as a local
7120 symbol if it's an alias to a global one.
7121
b3096250
L
71222004-05-26 H.J. Lu <hongjiu.lu@intel.com>
7123
7124 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7125 change.
7126
9bb351fd
AO
71272004-05-27 Alexandre Oliva <aoliva@redhat.com>
7128
7129 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7130 loop over hashes.
7131
e49f5022
AM
71322004-05-26 Alan Modra <amodra@bigpond.net.au>
7133
7134 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7135 for SHT_GROUP sections.
7136
57ceae94
AM
71372004-05-25 Alan Modra <amodra@bigpond.net.au>
7138
7139 * elflink.c (elf_link_add_object_symbols): Don't set up merge
7140 section data here..
7141 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7142 * merge.c: Formatting. Remove unnecessary casts. Expand
7143 bfd_get_section_alignment macro.
7144 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
7145 use throughout file.
7146 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
7147 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
7148 section name to determine sinfo group, instead test output section
7149 and alignment.
7150 (_bfd_merge_sections): Add struct bfd_link_info param. Call
7151 _bfd_strip_section_from_output rather than just twiddling flags.
7152 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7153 (_bfd_merge_sections): Update prototype.
7154 * libbfd.h: Regenerate.
7155
c6f8758f 71562004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
7157
7158 * netbsd-core.c: Correctly indent section that sets architecture
7159 from machine ID.
7160
c6f8758f
NC
7161 From Miod Vallat <miod@online.fr>:
7162 * m88kopenbsd.c: New file.
7163 * targets.c (m88k_openbsd_vec): New.
7164 * config.bfd: Add m88k-*-openbsd*.
7165 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7166 (m88kopenbsd_vec): New.
7167 * configure: Regenerate.
7168 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7169 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7170 Run "make dep-am".
7171 * Makefile.in: Regenerate.
7172 * po/SRC-POTFILES.in: Regenerate.
7173
7d7e6bc4
NC
71742004-05-24 Nick Clifton <nickc@redhat.com>
7175
7176 * hash.c: Remove bogus node "Changing the default Hash Table Size"
7177 introduced by hash table size patch.
7178
bc286f95
BE
71792004-05-22 Ben Elliston <bje@au.ibm.com>
7180
7181 * configure.in (is_release): Remove.
7182 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7183 (AC_OUTPUT): Don't output bfdver.h from version.h.
7184 * configure: Regenerate.
7185 * Makefile.am (RELEASE): New variable.
7186 (bfdver.h): New target.
7187 * Makefile.in: Regenerate.
7188 * doc/Makefile.in: Likewise.
7189
8b89a4eb
BE
71902004-05-22 Ben Elliston <bje@au.ibm.com>
7191
7192 * Makefile.am (config.status): Don't depend on version.h.
7193 * Makefile.in: Regenerate.
7194
753731ee
AM
71952004-05-22 Alan Modra <amodra@bigpond.net.au>
7196
7197 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7198 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7199 * libbfd.h: Regenerate.
7200 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7201 (_bfd_elf_rel_local_sym): Likewise.
7202 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7203 (elf_link_input_bfd): Likewise.
7204 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7205 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7206 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7207 (elfNN_ia64_relocate_section): Likewise.
7208
2d643429
NC
72092004-05-21 Andy Chittenden <achittenden@bluearc.com>
7210
7211 * hash.c (bfd_default_hash_table_size): New variable.
7212 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7213 (bfd_hash_set_default_size): New function. Set the default size
7214 to a selected prime number close to the argument. Document new
7215 function.
7216 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7217 * bfd-in2.h: Regenerate.
7218 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7219 * Makefile.in: Regenerate.
7220
8377c19c
MK
72212004-05-21 Mark Kettenis <kettenis@gnu.org>
7222
7223 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7224 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7225 arm, m68k, m88k and hppa core files.
7226
69fd4758
NC
72272004-05-21 Nick Clifton <nickc@redhat.com>
7228
7229 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7230 (bfd_bwrite): Likewise.
7231 (bfd_tell): Likewise.
7232 (bfd_flush): Likewise.
7233 (bfd_stat): Likewise.
7234 (bfd_seek): Likewise.
7235 (bfd_get_mtime): Likewise.
7236 (bfd_get_size): Likewise.
7237
cd917290
BE
72382004-05-19 Ben Elliston <bje@au.ibm.com>
7239
7240 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7241
1b09e940
NC
72422004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7243
7244 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7245 (bfd_generic_openr_next_archived_file): Likewise.
7246
096c35a7
BW
72472004-05-17 Bob Wilson <bob.wilson@acm.org>
7248
7249 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7250 section names by inserting a new substring after .gnu.linkonce, except
7251 for .gnu.linkonce.t.* where the "t." is replaced.
7252
eea6121a 72532004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
7254
7255 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7256 (m68-*-lynxos* case): Likewise.
7257 (powerpc-*-lyxnos* case): New case.
7258 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7259
80fccad2
BW
72602004-05-17 David Heine <dlheine@tensilica.com>
7261
7262 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7263 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7264 * bfd.c (bfd_copy_private_header_data): Define.
7265 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7266 interface.
7267 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7268 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7269 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7270 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7271 segments by calling copy_private_bfd_data.
7272 (_bfd_elf_copy_private_header_data): Define.
7273 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7274 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7275 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7276 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7277 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7278 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7279 * som.c (som_bfd_copy_private_header_data): Define.
7280 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7281 * vms.c (vms_bfd_copy_private_header_data): Define.
7282 * bfd-in2.h: Regenerate.
7283 * libbfd.h: Regenerate.
7284
c5ae1840
TS
72852004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7286
7287 * elfxx-mips.c (MINUS_TWO): Define.
7288 (mips_elf_higher, mips_elf_highest,
7289 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7290 some bfd_vma values.
7291 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7292
a99cf92b
DA
72932004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7294
7295 * som.c (log2): Rename to exact_log2. Adjust all callers.
7296
0da76f83
NC
72972004-05-13 Paul Brook <paul@codesourcery.com>
7298
c273895f 7299 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
7300 dwarf3 format CIE entries. Remove comment about the size of the
7301 ra_column field. It is now correctly deduced.
0da76f83 7302
4b363073
NC
73032004-05-13 Joel Sherrill <joel@oarcorp.com>
7304
7305 * config.bfd (or32-*-rtems*): Switch to elf.
7306
9598fbe5
NC
73072004-05-13 Nick Clifton <nickc@redhat.com>
7308
7309 * po/fr.po: Updated French translation.
7310
8c37241b
JJ
73112004-05-11 Jakub Jelinek <jakub@redhat.com>
7312
0306b3bf 7313 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
7314 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7315 Adjust counting of last_local.
7316 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7317 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7318 created by the linker nor !SHF_ALLOC.
7319
7320 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7321 DT_PLTGOT to the start of the .got.plt section instead of the
7322 .got output section. Set sh_entsize for .got section in addition
7323 to .got.plt.
7324 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7325 is at sgot->output_section->vma.
7326 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7327 DT_PLTGOT to the start of the .got.plt section instead of the
7328 .got output section.
7329 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7330 is at sgot->output_section->vma. Set sh_entsize for .got section
7331 in addition to .got.plt.
7332 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7333 (bfd_section_from_phdr): Likewise.
7334 (map_sections_to_segments): Likewise.
7335 (assign_file_positions_for_segments): Likewise.
7336 (get_program_header_size): Likewise.
7337 * elflink.c (bfd_elf_size_dynamic_sections): Set
7338 elf_tdata (output_bfd)->relro from info->relro.
7339 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7340
3f980e41
AO
73412004-05-08 Alexandre Oliva <aoliva@redhat.com>
7342
7343 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7344 a zero symndx for which we hadn't accounted a dynamic relocation.
7345 (_frvfdpic_add_rofixup): Likewise.
7346
d70270c5 73472004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 7348 DJ Delorie <dj@redhat.com>
d70270c5
BF
7349
7350 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7351 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7352 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7353 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7354
7e9f3bd6
AO
73552004-05-07 Alexandre Oliva <aoliva@redhat.com>
7356
7357 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7358 immediately if there's no link info.
7359 (elf32_frvfdpic_copy_private_bfd_data): New.
7360 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7361
eb61d2d6
ZW
73622004-05-06 Zack Weinberg <zack@codesourcery.com>
7363
7364 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7365 filename argument is null; do not call strlen on a null pointer.
7366
ecb2d096
DJ
73672004-05-06 Daniel Jacobowitz <drow@mvista.com>
7368
7369 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7370 special case.
7371
43850d5b
AO
73722004-05-05 Alexandre Oliva <aoliva@redhat.com>
7373
7374 * configure.in (bfd_elf32_frvfdpic_vec): New.
7375 * configure: Rebuilt.
7376 * targets.c (bfd_elf32_frvfdpic_vec): New.
7377 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7378 on the latter.
7379 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7380 frvfdpic instead of frv. Rearrange elf-target macros such that
7381 the FDPIC-specific ones are only defined for this new target
7382 vector.
7383 (bfd_elf32_frvfdpic_vec): Declare.
7384 (IS_FDPIC): New.
7385 (elf32_frv_relocate_section): Use it to enable segment checking
7386 and to control rofixup emission. Add output section vma to
7387 applied relocation in non-LOAD non-ALLOC sections. Use
7388 _bfd_error_handler for errors.
7389 (_frv_create_got_section): Create .rel.got and .rofixup only in
7390 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7391 linker script.
7392 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7393 (elf32_frvfdpic_modify_segment_map): Likewise.
7394 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7395 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7396 error message if we miscompute the rofixup size.
7397 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7398 (frvfdpic_elf_encode_eh_address): Likewise.
7399 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7400 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7401 relocs. Reject unknown relocation types.
7402 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7403 (frv_elf_merge_private_bfd_data): Likewise.
7404 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7405 0x4000 for newly-added elf32-frvfdpic.
7406
06fc8a8c
NC
74072004-05-05 Nick Clifton <nickc@redhat.com>
7408
7409 PR/136
7410 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7411 returning NULL as most users of this function do not check its
7412 return value.
33216455
NC
7413 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7414 of bfd_cache_lookup().
7415 * sco5-core.c (sco5_core_file_p): Likewise.
7416 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
7417
74182004-05-05 Nick Clifton <nickc@redhat.com>
7419
7420 * cache.c (bfd_cache_lookup): Improve formatting.
7421 * archive.c: Fix formatting.
7422
6b6e92f4
NC
74232004-05-05 Peter Barada <peter@the-baradas.com>
7424
7425 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7426 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7427 * bfd-in2.h(bfd_architecture): Regenerate.
7428
6a8d1586
AM
74292004-05-03 Alan Modra <amodra@bigpond.net.au>
7430
7431 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7432 SEC_MERGE sections.
7433 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7434 those against discarded link-once and SEC_MERGE section symbols.
7435
fafe6678
L
74362004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7437
7438 * section.c (bfd_get_section_by_name_if): New.
7439 * bfd-in2.h: Regenerated.
7440
ad7b9a36
AM
74412004-05-02 Alan Modra <amodra@bigpond.net.au>
7442
7443 * som.c (som_bfd_is_group_section): Define.
7444
73499ab8
AM
74452004-05-01 Alan Modra <amodra@bigpond.net.au>
7446
7447 * section.c (bfd_make_section_anyway): Copy the whole
7448 bfd_hash_entry, not just "next" from existing entry.
7449
45c5e9ed
L
74502004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7451
7452 * elf.c (bfd_section_from_shdr): Maintain the section order in
7453 a section group.
7454 (special_sections): Add ".note.GNU-stack".
7455 (elf_fake_sections): Handle section group for relocatable
7456 link..
7457
bc87dd2e
L
74582004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7459
7460 * section.c (bfd_sections_find_if): New.
7461 * bfd-in2.h: Regenerated.
7462
72adc230
AM
74632004-04-30 Alan Modra <amodra@bigpond.net.au>
7464
7465 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7466
7467 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7468 * elf.c (bfd_elf_is_group_section): New function.
7469 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7470 * section.c (bfd_generic_is_group_section): New function.
7471 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7472 (BFD_JUMP_TABLE_LINK): Adjust.
7473 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7474 * aout-target.h (MY_bfd_is_group_section): Define.
7475 * aout-tic30.c (MY_bfd_is_group_section): Define.
7476 * bfd.c (bfd_is_group_section): Define.
7477 * binary.c (binary_bfd_is_group_section): Define.
7478 * bout.c (b_out_bfd_is_group_section): Define.
7479 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7480 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7481 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7482 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7483 * coffcode.h (coff_bfd_is_group_section): Define.
7484 * i386msdos.c (msdos_bfd_is_group_section): Define.
7485 * i386os9k.c (os9k_bfd_is_group_section): Define.
7486 * ieee.c (ieee_bfd_is_group_section): Define.
7487 * ihex.c (ihex_bfd_is_group_section): Define.
7488 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7489 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7490 * mmo.c (mmo_bfd_is_group_section): Define.
7491 * nlm-target.h (nlm_bfd_is_group_section): Define.
7492 * oasys.c (oasys_bfd_is_group_section): Define.
7493 * pef.c (bfd_pef_bfd_is_group_section): Define.
7494 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7495 * srec.c (srec_bfd_is_group_section): Define.
7496 * tekhex.c (tekhex_bfd_is_group_section): Define.
7497 * versados.c (versados_bfd_is_group_section): Define.
7498 * vms.c (vms_bfd_is_group_section): Define.
7499 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7500 * bfd-in2.h: Regenerate.
7501 * libbfd.h: Regenerate.
7502
20f0a1ad
AM
75032004-04-30 Alan Modra <amodra@bigpond.net.au>
7504
7505 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7506
f7458fc9 75072004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
7508
7509 * configure.in: Update version to 2.15.91.
7510 * configure: Regenerate.
7511
8a7140c3
NC
75122004-04-29 Brian Ford <ford@vss.fsi.com>
7513
7514 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7515 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7516 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7517 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7518 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7519 .gnu.linkonce.wi. sections.
7520 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7521 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7522 .gnu.linkonce.wi..
7523 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7524 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7525
3e722fb5
CD
75262004-04-28 Chris Demetriou <cgd@broadcom.com>
7527
7528 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7529 * bfd-in2.h: Regenerate.
7530 * libbfd.h: Likewise.
7531
351e2b5a
DA
75322004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7533
7534 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7535 dup_common fields.
7536 (setup_sections): Use som_subspace_dictionary_record struct instead
7537 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7538 is_comdat, is_common or dup_common.
7539 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7540 is_comdat, is_common and dup_common in section subspace_dict from
7541 copy_data.
7542 (som_begin_writing): Use som_subspace_dictionary_record struct.
7543 (som_finish_writing): Likewise.
7544 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7545 is_common and dup_common flags in info for symbol. Add comment
7546 regarding linker support for these fields. Slightly reorganize
7547 function.
7548 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7549 dup_common fields in symbol table from symbol info.
7550 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7551 arguments. Set corresponding fields in copy_data. Change all callers.
7552 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7553 symbol table.
7554 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7555 * som.h (som_subspace_dictionary_record): Define.
7556 (som_copyable_section_data_struct): Add is_comdat, is_common and
7557 dup_common fields.
7558 (som_section_data_struct): Use som_subspace_dictionary_record struct
7559 instead of subspace_dictionary_record.
7560 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7561
3ba3bc8c
BW
75622004-04-27 Bob Wilson <bob.wilson@acm.org>
7563
7564 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7565 if set. Check reloc_done flag before applying relocations. Use
7566 output addresses, both when applying relocations and when comparing
7567 against the specified section.
7568 (elf_xtensa_relocate_section): Use output address to check if dynamic
7569 reloc is in a literal pool. Set section's reloc_done flag.
7570
beb8df56
L
75712004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7572
7573 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7574 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7575 section.
7576 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7577 section.
7578
1829f4b2
AM
75792004-04-27 Alan Modra <amodra@bigpond.net.au>
7580
7581 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7582 structure field removed in 2004-04-24 patch.
7583 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7584
7585 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7586 Constify hdr arg.
7587 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7588 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7589 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7590 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7591 field before calling elf_backend_section_flags.
7592
4030e8f6
CD
75932004-04-24 Chris Demetriou <cgd@broadcom.com>
7594
7595 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7596 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7597 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7598 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7599 and BFD_RELOC_32_PCREL.
7600 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7601 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7602 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7603 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7604 (mips_elf_next_relocation): Move comment about matching HI/LO
7605 relocations to...
7606 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7607 R_MIPS_GNU_REL_HI16.
7608
3e27568f
CD
76092004-04-23 Chris Demetriou <cgd@broadcom.com>
7610
7611 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7612 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7613 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7614 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7615 and update comments to reflect current usage.
7616 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7617 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7618 for MIPS_R_PCREL16.
7619 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7620 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7621 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7622 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7623 type number to be MIPS_R_PCREL16.
7624 (mips_relocate_section): Remove support for link-time relaxation
7625 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7626 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7627 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7628 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7629 relaxation of branches used by embedded-PIC.
7630 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7631 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7632 related members, update comment.
7633 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7634 code related to embedded-PIC.
7635 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7636 initialization of now-removed 'adjust' member of
7637 'struct ecoff_debug_info'.
7638
b32de0bc 76392004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
7640
7641 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7642
955af222
PB
76432004-04-21 Philip Blundell <pb@nexus.co.uk>
7644
7645 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7646 relocs for locally defined symbols during -shared final link.
7647 (elf32_arm_final_link_relocate): Likewise.
7648
47a9f7b3
JJ
76492004-04-22 Jakub Jelinek <jakub@redhat.com>
7650
7651 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7652 ELF_LINK_POINTER_EQUALITY_NEEDED.
7653 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7654 if r_type is not R_X86_64_PC32.
7655 (elf64_x86_64_finish_dynamic_symbol): If
7656 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7657 SHN_UNDEF symbols.
7658
1f1799d5
KK
76592004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7660
7661 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7662 (elf_backend_plt_sym_val): Define.
7663
0fdea5ce
AC
76642004-04-22 Andrew Cagney <cagney@redhat.com>
7665
7666 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7667
5198ba8b
DA
76682004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7669
eb61d2d6 7670 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
7671 make_bfd_asection.
7672 * som.c (som_set_section_contents): Constantify second argument.
7673 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7674 (som_object_setup): Rework to avoid warning.
7675 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7676 Likewise.
7677
fe2e161a
AC
76782004-04-22 Andrew Cagney <cagney@redhat.com>
7679
7680 * cache.c (bfd_cache_close): Check for a previously closed file.
7681
4c45e5c9
JJ
76822004-04-22 Jakub Jelinek <jakub@redhat.com>
7683
7684 * bfd.c (bfd_get_synthetic_symtab): Define.
7685 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7686 NAME##_get_synthetic_symtab.
7687 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7688 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7689 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7690 relplt_name fields.
7691 (_bfd_elf_get_synthetic_symtab): New prototype.
7692 * elfcode.h (elf_get_synthetic_symtab): Define.
7693 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7694 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7695 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7696 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7697 * bfd-in2.h: Rebuilt.
7698 * libbfd.h: Rebuilt.
7699 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7700 (elf_backend_plt_sym_val): Define.
7701 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7702 (elf_backend_plt_sym_val): Define.
7703 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7704 (elf_backend_plt_sym_val): Define.
7705 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7706 (elf_backend_plt_sym_val): Define.
7707 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7708 (elf_backend_plt_sym_val): Define.
7709 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7710 (elf_backend_plt_sym_val): Define.
7711 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7712 (elf_backend_plt_sym_val): Define.
7713 * aout-target.h (MY_get_synthetic_symtab): Define.
7714 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7715 * coff-rs6000.c (rs6000coff_vec): Add
7716 _bfd_nodynamic_get_synthetic_symtab.
7717 (pmac_xcoff_vec): Likewise.
7718 * coff64-rs6000.c (rs6000coff64_vec): Add
7719 _bfd_nodynamic_get_synthetic_symtab.
7720 (aix5coff64_vec): Likewise.
7721 * sunos.c (MY_get_synthetic_symtab): Define.
7722 * vms.c (vms_get_synthetic_symtab): Define.
7723
d2f7ecac
NC
77242004-04-22 Nick Clifton <nickc@redhat.com>
7725
7726 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7727
fd99574b
NC
77282004-04-22 Peter Barada <peter@the-baradas.com>
7729
7730 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7731 * bfd2-in.h: Regenerate.
7732 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7733
23867d67
CD
77342004-04-21 Chris Demetriou <cgd@broadcom.com>
7735
7736 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7737 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7738 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7739 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7740 * bfd-in2.h: Regenerate.
7741
2c8c90bc
BW
77422004-04-21 Bob Wilson <bob.wilson@acm.org>
7743
7744 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7745 require relocations against a weak symbol to reference the same
7746 symbol hash entry if not a final, static link.
7747 (get_cached_value, add_value_map): Add final_static_link argument.
7748 (remove_literals): Pass final_static_link argument as needed.
7749
40838a72
AC
77502004-04-21 Andrew Cagney <cagney@redhat.com>
7751
7752 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7753 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7754 (opncls_bwrite, opncls_bclose, opncls_bflush)
7755 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7756 bfd iovec that uses function callbacks.
7757 (bfd_close): Use the iovec's bclose.
7758 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7759 (cache_bclose, cache_bflush, cache_bstat)
7760 (cache_iovec): New functions and global variable, implement a
7761 cache "iovec", where applicable set bfd_error.
7762 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7763 * bfdio.c (struct bfd_iovec): Define.
7764 (real_read): Delete function.
7765 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7766 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7767 assume that bread and bwrite set bfd_error.
7768 * bfd.c (struct bfd): Add "iovec", update comments.
7769 * bfd-in2.h, libbfd.h: Re-generate.
7770
7f919c84
AC
77712004-04-21 Andrew Cagney <cagney@redhat.com>
7772
7773 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7774
715df9b8
EB
77752004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7776
7777 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7778 (bfd_elf_gc_sections): Fail if a shared object is being created.
7779 Do not fail if dynamic sections have been created. Instead call
7780 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7781 dynamically referenced symbols. Do not mark the whole graph
7782 rooted at .eh_frame, only the section proper.
7783
6482c264
NC
77842004-04-20 DJ Delorie <dj@redhat.com>
7785
7786 * reloc.c: Add BFD_RELOC_32_SECREL.
7787 * bfd-in2.h: Regenerate.
7788 * libbfd.h: Likewise.
7789 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7790 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7791 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7792
4dc570c2
JJ
77932004-04-19 Jakub Jelinek <jakub@redhat.com>
7794
7795 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7796 relocs against hidden/protected undefweak symbols properly.
7797 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7798
0b60d5d3
MK
77992004-04-18 Mark Kettenis <kettenis@gnu.org>
7800
7801 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7802 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7803 core files.
7804
d48bdb99
AM
78052004-04-17 Brian Ford <ford@vss.fsi.com>
7806
7807 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7808 filepos for the SizeOfHeaders field.
7809 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7810 overflow.
7811 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7812
57a1784e
AM
78132004-04-16 Alan Modra <amodra@bigpond.net.au>
7814
7815 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7816 change reloc_done. Set and restore _cooked_size.
7817 (RETURN): Delete.
7818
d1ad3f6f
MK
78192004-04-15 Mark Kettenis <kettenis@gnu.org>
7820
7821 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7822 core files.
7823
3d1bca9d
NC
78242004-04-15 Nick Clifton <nickc@redhat.com>
7825
7826 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7827
019b892f
AM
78282004-04-15 Alan Modra <amodra@bigpond.net.au>
7829
7830 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7831
15b43f48
AM
78322004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7833
7834 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7835 when it is a definition.
7836
6de00a78
AM
78372004-04-14 Alan Modra <amodra@bigpond.net.au>
7838
7839 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7840 when statically linking PIC code.
7841 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7842
279500de
TS
78432004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7844
7845 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7846 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7847 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7848 * configure: Regenerate.
7849
ccf2f652
RS
78502004-04-08 Richard Sandiford <rsandifo@redhat.com>
7851
7852 * elflink.c: Include libiberty.h.
7853 * Makefile.am (elflink.lo): Depend on libiberty.h.
7854 * Makefile.in: Regenerate.
7855
ca07892d
DJ
78562004-04-06 Daniel Jacobowitz <drow@mvista.com>
7857
7858 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7859 ".MIPS.stubs".
7860
a5a58ba4
L
78612004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7862
7863 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7864 reserve the memory for dynamic linker
7865
24d18d30
MK
78662004-04-05 Mark Kettenis <kettenis@gnu.org>
7867
7868 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7869 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7870
a4d7b4b5
L
78712004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7872
7873 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7874 RELOC_FOR_GLOBAL_SYMBOL.
7875 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7876
1f433d93
L
78772004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7878
7879 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7880 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7881
e489d0ae
PB
78822004-04-01 Paul Brook <paul@codesourcery.com>
7883
7884 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7885 * elf32-arm.h (struct elf32_elf_section_map): New.
7886 (struct _arm_elf_section_data): New.
7887 (elf32_arm_section_data): Define.
7888 (struct elf32_arm_link_hash_table): Add byteswap_code.
7889 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7890 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7891 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7892 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7893 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7894 (bfd_elf32_new_section_hook, elf_backend_write_section,
7895 elf_backend_link_output_symbol_hook): Define.
7896
66a695f0
NC
78972004-04-01 Andy Chittenden <achittenden@bluearc.com>
7898
7899 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7900 that keeps the characters in a B_INCL..B_EINCL range.
7901 (_bfd_link_section_stabs): When computing the sum of the
7902 characters in a B_INCL..B_EINCL range also keep a copy of those
7903 characters. Use this information to distinguish between
7904 include sections that have the same sum and the same length
7905 but which are nevertheless unique.
7906
8375c36b
PB
79072004-03-31 Paul Brook <paul@codesourcery.com>
7908
7909 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7910 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7911
a56b48eb
NC
79122004-03-31 Andy Chittenden <achittenden@bluearc.com>
7913
7914 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7915 to 'sum_chars' and add field 'num_chars'.
7916 (_bfd_link_section_stabs): When computing the sum of the
7917 characters in a B_INCL..B_EINCL range also keep a count of the
7918 number of characters. Use this information to help distinguish
7919 between include sections when have the same sum but which
7920 nevertheless are still unique.
7921
1fbc7e7a 79222004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
7923
7924 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7925
0949843d 79262004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 7927 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
7928
7929 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7930 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7931 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7932 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7933 (cpu-cr16c.lo): New target.
7934 (elf32-cr16c.lo): Likewise.
7935 * Makefile.in: Regenerate.
7936 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7937 (bfd_archures_list): Add bfd_cr16c_arch.
7938 * config.bfd: Handle cr16c-*-elf*.
7939 * configure.in: Handle bfd_elf32_cr16c_vec.
7940 * configure: Regenerate.
7941 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7942 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7943 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7944 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7945 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7946 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7947 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7948 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7949 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7950 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7951 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7952 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7953 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7954 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7955 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7956 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7957 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7958 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7959 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7960 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7961 * targets.c (bfd_elf32_cr16c_vec): Declare.
7962 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7963 * cpu-cr16c.c: New file.
7964 * elf32-cr16c.c: Likewise.
7965 * libbfd.h: Regenerate.
7966 * bfd-in2.h: Likewise.
7967
baaff79e
JJ
79682004-03-30 Jakub Jelinek <jakub@redhat.com>
7969
7970 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7971
c152c796
AM
79722004-03-27 Alan Modra <amodra@bigpond.net.au>
7973
7974 * Makefile.am: Remove all mention of elflink.h.
7975 * Makefile.in: Regenerate.
7976 * bfd-in.h (bfd_elf_discard_info): Declare.
7977 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7978 * bfd-in2.h: Regenerate.
7979 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7980 bfd_elf32_link_record_dynamic_symbol,
7981 bfd_elf64_link_record_dynamic_symbol,
7982 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7983 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7984 _bfd_elf32_link_record_local_dynamic_symbol,
7985 _bfd_elf64_link_record_local_dynamic_symbol,
7986 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7987 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7988 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7989 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7990 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7991 _bfd_elf32_reloc_symbol_deleted_p,
7992 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7993 (bfd_elf_link_record_dynamic_symbol,
7994 bfd_elf_link_record_local_dynamic_symbol,
7995 bfd_elf_final_link, bfd_elf_gc_sections,
7996 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7997 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7998 bfd_elf_reloc_symbol_deleted_p): Declare.
7999 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8000 * elf32-arm.h: Update for changed function names. Remove local
8001 WILL_CALL_FINISH_DYNAMIC_SECTION define.
8002 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8003 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8004 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8005 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8006 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8007 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8008 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8009 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8010 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8011 (bfd_elfNN_print_symbol): Define.
8012 * elfcode.h: Don't include elflink.h.
8013 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8014 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8015 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8016 elf_gc_record_vtinherit, elf_gc_record_vtentry,
8017 elf_link_record_local_dynamic_symbol): Don't define.
8018 * elflink.c: Update for changed function names. Move elflink.h
8019 code here.
8020 * elflink.h: Delete file.
8021 * po/SRC-POTFILES.in: Regenerate.
8022 * po/bfd.pot: Regenerate.
8023
6a9cae7f
AM
80242004-03-27 Alan Modra <amodra@bigpond.net.au>
8025
8026 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8027 "name" for global syms accidentally removed in 2004-03-20 change.
8028
140f6c8e
AM
80292004-03-27 Alan Modra <amodra@bigpond.net.au>
8030
8031 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8032 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8033 where Elf_External_* is different for 64 and 32 bit, with
8034 corresponding elf_size_info field.
8035 (struct elf_final_link_info): Use "bfd_byte *" instead
8036 of "Elf_External_Sym *" for external_syms and symbuf.
8037 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8038 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8039 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8040 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8041 (elf_link_sort_cmp2): Adjust.
8042 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8043 using ELF_R_SYM macro. Set u.sym_mask.
8044 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8045 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
8046 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
8047 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
8048 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
8049 swap_syn_out functions. Rearrange dyn swap in/out switch.
8050 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8051 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
8052 (elf_link_flush_output_syms): Add elf_backend_data arg.
8053 (elf_link_check_versioned_symbol): Likewise.
8054 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8055 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
8056 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
8057 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8058 ELF_R_TYPE and ELF_R_INFO macros.
8059 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8060 based on size rather than using ELF_R_INFO.
8061 (elf_gc_mark): Set up r_sym_shift local var and use instead of
8062 ELF_R_SYM macro.
8063 (struct alloc_got_off_arg): New.
8064 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8065 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
8066 (elf_gc_allocate_got_offsets): Adjust.
8067 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8068 ELF_R_SYM. Use bfd_section_from_elf_index.
8069 (elf_bfd_discard_info): Set cookie.r_sym_shift.
8070 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8071 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8072
14bde378
SS
80732004-03-26 Stan Shebs <shebs@apple.com>
8074
8075 Remove MPW support, no longer used.
8076 * config.bfd (powerpc-*-mpw*): Remove configuration.
8077 * mpw-config.in, mpw-make.sed: Remove files.
8078 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8079
555cd476
AM
80802004-03-26 Alan Modra <amodra@bigpond.net.au>
8081
8082 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8083 (ppc64_elf_add_symbol_hook): New function.
8084 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8085 const from Elf_Internal_Sym param.
8086 * elflink.c (elf_link_add_object_symbols): Adjust.
8087 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8088 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8089 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8090 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8091 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8092 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8093 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8094 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8095 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8096 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8097 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8098 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8099 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8100 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8101 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8102 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8103
4ad4eba5
AM
81042004-03-26 Alan Modra <amodra@bigpond.net.au>
8105
8106 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8107 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8108 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8109 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8110 (bfd_elf64_bfd_link_add_symbols): Delete.
8111 (bfd_elf_link_add_symbols): Declare.
8112 * elfcode.h (elf_bfd_link_add_symbols): Delete.
8113 * elflink.c: Include safe-ctype.h.
8114 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8115 make static.
8116 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8117 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8118 static.
8119 (elf_link_add_archive_symbols): Rename from
8120 _bfd_elf_link_add_archive_symbols, make static.
8121 (elf_link_add_object_symbols): New function. Corresponding
8122 elflink.h function converted to use elf_size_info.
8123 (bfd_elf_link_add_symbols): Likewise.
8124 (bfd_elf_size_dynamic_sections): Adjust.
8125 * elflink.h (elf_bfd_link_add_symbols): Delete.
8126 (elf_link_add_object_symbols): Delete.
8127 * elf32-gen.c (elf32_generic_link_add_symbols): Call
8128 bfd_elf_link_add_symbols.
8129 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8130
5a580b3a
AM
81312004-03-25 Alan Modra <amodra@bigpond.net.au>
8132
8133 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8134 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 8135
5a580b3a
AM
8136 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8137 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8138 (_bfd_elf_add_dt_needed_tag): Declare.
8139 (_bfd_elf_sort_symbol): Declare.
8140 (_bfd_elf_finalize_dynstr): Declare.
8141 (RELOC_FOR_GLOBAL_SYM): Formatting.
8142 * elfcode.h (elf_add_dynamic_entry): Delete.
8143 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
8144 elflink.h function converted to use elf_size_info.
8145 (_bfd_elf_add_dt_needed_tag): Likewise.
8146 (_bfd_elf_sort_symbol): Likewise.
8147 (_bfd_elf_finalize_dynstr): Likewise.
8148 (compute_bucket_count): Likewise.
8149 (bfd_elf_size_dynamic_sections): Likewise. Check result of
8150 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8151 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8152 * elflink.h: ..here.
8153 (sort_symbol, add_dt_needed_tag): Delete.
8154 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8155 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8156 Update all users.
8157 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
8158 * elf32-cris.c (add_dynamic_entry): Likewise.
8159 * elf32-hppa.c (add_dynamic_entry): Likewise.
8160 * elf32-i370.c (add_dynamic_entry): Likewise.
8161 * elf32-i386.c (add_dynamic_entry): Likewise.
8162 * elf32-m32r.c (add_dynamic_entry): Likewise.
8163 * elf32-m68k.c (add_dynamic_entry): Likewise.
8164 * elf32-ppc.c (add_dynamic_entry): Likewise.
8165 * elf32-s390.c (add_dynamic_entry): Likewise.
8166 * elf32-sh.c (add_dynamic_entry): Likewise.
8167 * elf32-sparc.c (add_dynamic_entry): Likewise.
8168 * elf32-vax.c (add_dynamic_entry): Likewise.
8169 * elf32-xtensa.c (add_dynamic_entry): Likewise.
8170 * elf64-alpha.c (add_dynamic_entry): Likewise.
8171 * elf64-hppa.c (add_dynamic_entry): Likewise.
8172 * elf64-ppc.c (add_dynamic_entry): Likewise.
8173 * elf64-s390.c (add_dynamic_entry): Likewise.
8174 * elf64-sparc.c (add_dynamic_entry): Likewise.
8175 * elf64-x86-64.c (add_dynamic_entry): Likewise.
8176 * elfxx-ia64.c (add_dynamic_entry): Likewise.
8177 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8178 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8179 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8180 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8181
d507cf36
PB
81822004-03-23 Paul Brook <paul@codesourcery.com>
8183
8184 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8185
88d65ad6
BW
81862004-03-22 Bob Wilson <bob.wilson@acm.org>
8187
8188 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8189 literal tables and check for relocs outside of literal pools.
8190 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8191 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8192 set DF_TEXTREL.
8193 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8194 (elf_xtensa_relocate_section): Read literal tables and check for
8195 dynamic relocations in read-only sections and not in literal pools.
c152c796 8196
b9cf773d
AM
81972004-03-23 Alan Modra <amodra@bigpond.net.au>
8198
8199 PR 51.
8200 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8201
e4a2175c
HPN
82022004-03-22 Hans-Peter Nilsson <hp@axis.com>
8203
8204 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8205 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8206 not defined by the executable, or defined in a DSO.
8207 <eliding run-time relocation of .got>: Initialize GOT entry for a
8208 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8209 executable.
8210 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8211 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8212 a PLT reloc to GOT for an executable.
8213 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 8214 .got for a DSO and explain why.
e4a2175c
HPN
8215 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8216 and unreferenced symbols for which a PLT is defined. Adjust
8217 dynamic-symbol pruning correspondingly, to make sure we don't lose
8218 a dynamic symbol also defined by a DSO.
8219
b2a8e766
AM
82202004-03-22 Alan Modra <amodra@bigpond.net.au>
8221
8222 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8223 and rel args. Group input and output args. Wrap to 80 columns.
8224 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8225 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8226 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8227 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8228 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8229 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8230 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8231 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8232 RELOC_FOR_GLOBAL_SYMBOL invocation.
8233
59c2e50f
L
82342004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8235
8236 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8237 unresolved symbols in objects aren't allowed.
8238
8239 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8240 unresolved symbols.
8241 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8242 (elf_hppa_unmark_useless_dynamic_symbols):
8243 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8244 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8245 (elf32_hppa_relocate_section): Likewise.
8246 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8247 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8248 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8249 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8250 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8251
8252 * elf-m10200.c (mn10200_elf_relocate_section): Use
8253 RELOC_FOR_GLOBAL_SYMBOL.
8254 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8255 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8256 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8257 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8258 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8259 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8260 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8261 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8262 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8263 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8264 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8265 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8266
9992270f
DA
82672004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8268
36751eee
DA
8269 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8270 (final_link_relocate): Likewise.
9992270f
DA
8271 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8272 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8273
05864e2a
AM
82742004-03-19 Alan Modra <amodra@bigpond.net.au>
8275
8276 * Makefile.am: Run "make dep-am".
8277 * Makefile.in: Regenerate.
8278 * aclocal.m4: Regenerate.
8279 * config.in: Regenerate.
8280 * po/bfd.pot: Regenerate.
8281
f218a464 82822004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
8283 H.J. Lu <hongjiu.lu@intel.com>
8284
8285 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8286 type and size change code to where it was previously. Remove
8287 dt_needed param. Treat old weak syms as strong if new sym is
8288 from a shared lib, even when old sym is from another shared
8289 lib. Remove unnecessary tests of oldweak and newweak. Correct
8290 comments.
8291 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8292 _bfd_elf_merge_symbol calls.
8293 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8294 dt_needed local var. Update comments.
8295 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8296 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
8297
8298 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8299 strong syms in one shared object overriding weak syms in another.
8300
79349b09
AM
83012004-03-18 Alan Modra <amodra@bigpond.net.au>
8302
4a43e768
AM
8303 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8304 dyn_lib_class field. Rearrange for better packing.
8305 (elf_dt_soname): Delete.
8306 (elf_dyn_lib_class): Define.
8307 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8308 (bfd_elf_set_dt_needed_soname): Delete.
8309 (bfd_elf_set_dyn_lib_class): New function.
8310 * elflink.h (add_dt_needed_tag): New function. Split out from..
8311 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8312 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8313 initialization of soname.
8314 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8315 elf_dt_soname.
8316 * bfd-in.h (enum dynamic_lib_link_class): New.
8317 (bfd_elf_set_dt_needed_soname): Delete.
8318 (bfd_elf_set_dyn_lib_class): Declare.
8319 * bfd-in2.h: Regenerate.
8320
79349b09
AM
8321 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8322 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8323 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8324 symbol loop. Instead use add_needed to flag tag as written.
8325
d13d89fa
NS
83262004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8327
8328 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8329 logic for null_input_bfd detection.
8330
9183ed4b
AM
83312004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8332
8333 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8334
021d7868
MK
83352004-03-16 Mark Kettenis <kettenis@gnu.org>
8336
8337 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8338 code.
8339
51992aec
AM
83402004-03-16 Alan Modra <amodra@bigpond.net.au>
8341
8342 * elflink.c (elf_link_read_relocs_from_section): Don't use
8343 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8344 (_bfd_elf_link_read_relocs): ..to here.
8345 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8346
ccba357f
AM
83472004-03-16 Alan Modra <amodra@bigpond.net.au>
8348
8349 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8350 values selected in configure.host. Require both to be defined
8351 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8352 corresponding BFD_HOST vars with quotes.
8353 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8354 Always require BFD_HOST_64_BIT_DEFINED.
8355 <file_ptr type>: Find off_t size before emitting message. Combine
8356 off_t and ftello64 conditional.
8357 * configure: Regenerate.
8358
41978308
AM
83592004-03-16 Alan Modra <amodra@bigpond.net.au>
8360
8361 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8362 aliasing warning. Remove trailing whitespace throughout file.
8363
d63b5ed9
DA
83642004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8365
8366 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8367 input_section in calls to get_dyn_name.
8368 * 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
8369 local symbols.
8370 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8371
8ce8c090
AM
83722004-03-15 Alan Modra <amodra@bigpond.net.au>
8373
8374 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8375 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8376 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8377 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8378 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8379 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8380 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8381 when using long.
8382 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8383 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8384 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8385 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8386 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8387 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8388 (read_8_bytes, read_indirect_string, read_address): Likewise.
8389 (read_abbrevs, parse_comp_unit): Likewise.
8390 * targets.c (struct bfd_target): Likewise.
8391 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8392 * hppabsd-core.c: Likewise. Formatting.
8393 * hpux-core.c: Likewise.
8394 * irix-core.c: Likewise.
8395 * netbsd-core.c: Likewise.
8396 * osf-core.c: Likewise.
8397 * ptrace-core.c: Likewise.
8398 * sco5-core.c: Likewise.
8399 * trad-core.c: Likewise.
8400 * configure: Regenerate.
8401 * bfd-in2.h: Regenerate.
8402
edeb6e24
AM
84032004-03-15 Alan Modra <amodra@bigpond.net.au>
8404
8405 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8406 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8407 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8408 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8409 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8410 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8411 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8412 * libbfd.c: Likewise in function definitions.
8413 (bfd_put_8): Mask with 0xff rather than casting to char.
8414 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8415 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8416 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8417 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8418 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8419 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8420 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8421 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8422 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8423 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8424 * archive.c (do_slurp_coff_armap): Update swap prototype.
8425 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8426 (tic54x_getl_signed_32): Likewise.
8427 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8428 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8429 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8430 (bfd_getp_signed_32, bfd_putp32): Likewise.
8431 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8432 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8433 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8434 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8435 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8436 bfd_h_getx_signed_16, bfd_h_putx16.
8437 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8438 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8439 * hpux-core.c: Likewise.
8440 * irix-core.c: Likewise.
8441 * netbsd-core.c: Likewise.
8442 * osf-core.c: Likewise.
8443 * ptrace-core.c: Likewise.
8444 * sco5-core.c: Likewise.
8445 * trad-core.c: Likewise.
8446 * bfd-in2.h: Regenerate.
8447
c1b954e2
AM
84482004-03-15 Matt Thomas <matt@3am-software.com>
8449
8450 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8451 selected.
8452
85cfd8d3
MK
84532004-03-13 Mark Kettenis <kettenis@gnu.org>
8454
8455 * config.bfd: Add x86_64-*-openbsd*.
8456 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8457 netbsd-core.lo.
8458 * configure: Regenerate.
8459
d1f161ea
NC
84602004-03-12 Nick Clifton <nickc@redhat.com>
8461 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 8462
d1f161ea
NC
8463 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8464 if the input bfd does not contain any code.
8465
8b6f2683
JW
84662004-03-09 Steve Ellcey <sje@cup.hp.com>
8467
8468 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8469
79cda7cf
FF
84702004-03-05 Fred Fish <fnf@redhat.com>
8471
8472 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8473 mips16 symbols to be even rather than testing first for even/odd.
8474 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8475
e5caec89
NS
84762004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8477
8478 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8479 layout purposes.
8480
02bb6eae
AO
84812004-03-03 Alexandre Oliva <aoliva@redhat.com>
8482
8483 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8484 undefined symbols as hash_new.
8485
ae51a426
JR
84862003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8487
8488 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8489 * cpu-sh.c: Ditto.
8490 * elf32-sh.c: Ditto.
8491 * bfd-in2.h: Regenerate.
8492
3b712a1a
AO
84932004-03-02 Alexandre Oliva <aoliva@redhat.com>
8494
8495 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8496 dynrelocs.
8497 (_frv_count_got_plt_entries): Initialize them.
8498 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8499 callers.
8500 (frv_pic_relocs_info_for_global): Likewise.
8501 (frv_pic_relocs_info_for_local): Likewise.
8502 (frv_pic_merge_early_relocs_info): New.
8503 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8504 another.
8505 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8506 Check that we don't exceed the allocated count for entry.
8507 (_frv_add_rofixup): Likewise.
8508 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8509 (elf32_frv_finish_dynamic_sections): Improve error message in case
8510 we emit too few rofixup entries.
8511
676a64f4
RS
85122004-03-01 Richard Sandiford <rsandifo@redhat.com>
8513
8514 * archures.c (bfd_mach_fr450): New.
8515 * bfd-in2.h: Regenerate.
8516 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8517 (arch_info_500): Link to it.
8518 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8519 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8520 (frv_elf_arch_extension_p): New function.
8521 (frv_elf_merge_private_bfd_data): Use it.
8522
0ad989f9
L
85232004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8524
8525 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8526
8527 * elflink.h (is_global_data_symbol_definition): Moved to
8528 elflink.c.
8529 (elf_link_is_defined_archive_symbol): Likewise.
8530 (elf_link_add_archive_symbols): Likewise. Renamed to
8531 _bfd_elf_link_add_archive_symbols.
8532
8533 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8534 of ELF symbol table entry from backend.
8535 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8536 instead of elf_link_add_object_symbols.
8537
ec3391e7
AO
85382004-02-27 Alexandre Oliva <aoliva@redhat.com>
8539
8540 * elf-bfd.h (struct elf_backend_data): Added
8541 elf_backend_can_make_relative_eh_frame,
8542 elf_backend_can_make_lsda_relative_eh_frame and
8543 elf_backend_encode_eh_address.
8544 (_bfd_elf_encode_eh_address): Declare.
8545 (_bfd_elf_can_make_relative): Declare.
8546 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8547 hooks to decide whether to attempt to make_relative and
8548 make_lsda_relative.
8549 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8550 (_bfd_elf_can_make_relative): New.
8551 (_bfd_elf_encode_eh_address): New.
8552 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8553 (frv_elf_encode_eh_address): New.
8554 (elf_backend_can_make_relative_eh_frame): Define.
8555 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8556 (elf_backend_encode_eh_address): Define.
8557 * elfxx-target.h
8558 (elf_backend_can_make_relative_eh_frame): Define.
8559 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8560 (elf_backend_encode_eh_address): Define.
8561 (elfNN_bed): Add them.
8562
e6deed0a
AO
85632004-02-27 Alexandre Oliva <aoliva@redhat.com>
8564
8565 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8566 complain_on_overflow to signed.
8567
b60d7a1a
L
85682004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8569
8570 * elflink.h (sort_symbol): New.
8571 (elf_link_add_object_symbols): Use a sorted symbol array for
8572 weakdef.
8573
1c3ff0f2
MS
85742004-02-27 Jakub Jelinek <jakub@redhat.com>
8575
8576 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8577 for pc relative relocs.
8578 (elf_s390_relocate_section): Likewise.
8579 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8580 for pc relative relocs.
8581 (elf_s390_relocate_section): Likewise.
8582
de9811af
L
85832004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8584
8585 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8586 count_dyn_reloc.
8587
ac33696c
L
85882004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8589
8590 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8591 field to track if a relocation is against readonly section.
8592 (count_dyn_reloc): Take a new argument for rent->reltext.
8593 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8594 (get_reloc_section): Don't set ia64_info->reltext here.
8595 (allocate_dynrel_entries): Set ia64_info->reltext here.
8596
072c8903
AO
85972004-02-24 Alexandre Oliva <aoliva@redhat.com>
8598
8599 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8600 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8601 function's descriptor to symbol+offset, and map local undefweak
8602 symbol to NULL function descriptor.
8603 (elf32_frv_relocate_section): Likewise.
8604
aca305d9
NC
86052004-02-23 Mark Kettenis <kettenis@gnu.org>
8606
8607 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8608 M_X86_64_NETBSD.
8609 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8610 (netbsd_core_file_p): Set architecture from machine ID for
8611 selected machines.
8612
646411fb
JJ
86132004-02-23 Jakub Jelinek <jakub@redhat.com>
8614
8615 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8616 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8617
1de1a317
L
86182004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8619
8620 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8621 symbols with non-default visibility.
8622
3c9d0484
DS
86232004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8624
8625 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8626 IMAGE_SCN_MEM_WRITE on known sections only.
8627
a876ecf9
JJ
86282004-02-20 Jakub Jelinek <jakub@redhat.com>
8629
8630 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8631 symbols used in PIE relocs.
8632
a8a6d7ce
JJ
86332004-02-19 Jakub Jelinek <jakub@redhat.com>
8634
8635 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8636 .plt sh_entsize.
8637
d080fcd2
DJ
86382004-02-18 Daniel Jacobowitz <drow@mvista.com>
8639
8640 * configure.in: Update version to 2.15.90.
8641 * configure: Regenerate.
8642
d25aed71 86432004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 8644 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
8645
8646 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8647 _bfd_elf_symbol_refs_local_p to decide whether to decay
8648 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8649 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8650 relocs if the symbol wasn't defined by a regular object file.
8651 Don't check the symbol's dynindx.
8652
d7ce59e3
AC
86532004-02-16 Andrew Cagney <cagney@redhat.com>
8654
8655 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8656 @bfd_file_ptr@.
8657 * bfd-in2.h: Re-generate.
8658
ca0b7686
AC
86592004-02-14 Andrew Cagney <cagney@redhat.com>
8660
8661 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8662 _LARGEFILE64_SOURCE.
8663
340b6d91
AC
86642004-02-13 Andrew Cagney <cagney@redhat.com>
8665
8666 * elf.c (vma_page_aligned_bias): New function.
8667 (assign_file_positions_except_relocs)
8668 (assign_file_positions_for_segments): Replace broken modulo
8669 arithmetic with call to vma_page_aligned_bias.
8670
1012372a
AC
86712004-02-11 Andrew Cagney <cagney@redhat.com>
8672
7c192733
AC
8673 * bfd-in.h: Update copyright.
8674 (bfd_tell): Change return type to file_ptr.
8675 * bfd-in2.h: Re-generate.
8676 * cache.c: Update copyright.
8677 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8678 parameter.
8679 (close_one): Use real_ftell.
8680 * bfdio.c: Update copyright.
8681 (real_ftell, real_fseek): New functions.
8682 (bfd_tell): Use real_fseek and real_ftell, change return type to
8683 file_ptr.
8684 (bfd_seek): Use real_ftell and real_fseek, change type of
8685 file_position to a file_ptr.
8686 * libbfd-in.h: Update copyright.
8687 (real_ftell, real_fseek): Declare.
8688 * libbfd.h: Re-generate.
8689
1012372a
AC
8690 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8691 fseeko and fseeko64. Determine bfd_file_ptr.
8692 * configure: Re-generate.
c1ea0c09 8693 * config.in: Re-generate.
c1b954e2 8694
3255318a
NC
86952004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8696
8697 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8698 * elf32-h8300.c: Likewise.
8699
0d5f9994
NC
87002004-02-09 Christian Vogel <vogelchr@vogel.cx>
8701 Nick Clifton <nickc@redhat.com>
8702
8703 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8704 GOT entries with no associated GOT subsection.
8705
174fd7f9
RS
87062004-02-09 Richard Sandiford <rsandifo@redhat.com>
8707
8708 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8709 * elf.c (swap_out_syms): Use it to decide whether local section
8710 symbols should be named.
8711 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8712 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8713 (elf_backend_name_local_section_symbols): Define.
8714 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8715
03609792
L
87162004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8717
8718 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8719 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8720 finalize pass.
8721
ea01195e
AO
87222004-01-30 Alexandre Oliva <aoliva@redhat.com>
8723
8724 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8725 to bfd_link_hash_entry passed by reference to
8726 _bfd_generic_link_add_one_symbol.
8727
838e70c5
L
87282004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8729
8730 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8731 relocations against dynamic symbols.
8732
4f199be3
DJ
87332004-01-23 Daniel Jacobowitz <drow@mvista.com>
8734
8735 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8736 change.
8737
28d39d1a
NC
87382004-01-21 Tom Rix <tcrix@worldnet.att.net>
8739
8740 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8741 * bfd-in2.h, libbfd.h: Rebuilt.
8742
66bed356
DS
87432004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8744
8745 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8746 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8747 flag has been cleared.
8748
7e89635a
KH
87492004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8750
8751 * coff-h8300.c: Add and adjust comments about relaxation.
8752 * elf32-h8300.c: Likewise.
8753
e804e836
KH
87542004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8755
8756 * coff-h8300.c: Fix comment typos.
8757 * elf32-h8300.c: Likewise.
8758
630a7b0a
KH
87592004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8760
8761 * coff-h8300.c: Add comments about relaxation.
8762 * elf32-h8300.c: Likewise.
8763
f8b73030
MR
87642004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8765
8766 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8767 throughout.
8768 * aclocal.m4: Regenerate.
8769 * configure: Regenerate.
8770
32159579
ILT
87712004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8772
8773 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8774 mips_elf64_rtype_to_howto instead of using howto_table.
8775
c84cd8ee
DJ
87762004-01-13 Daniel Jacobowitz <drow@mvista.com>
8777
8778 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8779 the .plt section.
8780 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8781 relocs which would not use the PLT.
8782
680a3378
AM
87832004-01-13 Alan Modra <amodra@bigpond.net.au>
8784
8785 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8786 (ppc64_elf_gc_sweep_hook): Likewise.
8787 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8788
faca21e5
NC
87892004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8790
8791 Adds linker relaxation support for bit manipulation insns like
680a3378 8792 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 8793 bst, btst, bxor.
680a3378 8794 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 8795 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 8796 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
8797 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8798
818a27ac
AM
87992004-01-12 Alan Modra <amodra@bigpond.net.au>
8800
8801 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8802
96ef1419
KH
88032004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8804
8805 * elf32-h8300.c: Fix formatting.
8806
babfd660
KH
88072004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8808
8809 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8810 dynamic object is present. Declare r_symndx and h in an inner
8811 scope.
8812 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8813
7359ea65
DJ
88142004-01-09 Daniel Jacobowitz <drow@mvista.com>
8815
8816 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8817 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8818 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8819 identically. Do not emit PC24 relocations for shared libraries.
8820 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8821 identically. Don't adjust pc_count.
8822 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8823 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8824 adjust count for branch relocations.
8825 (allocate_dynrelocs): Correct typo in call to
8826 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8827 PC24 or PLT32 relocs when linking.
8828
44e88952
NC
88292004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8830
8831 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8832 relocation howto with ARM_26 one for consistency.
8833 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8834 that will be converted to ARM_26D ones, since we always want 'done'
8835 relocations to be reflected in section's data.
8836 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8837 offset.
8838 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8839 requested.
8840
1e7fef1d
NC
88412004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8842
8843 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8844 are not partial_inplace during a relocatable link.
8845
4f075348
KH
88462004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8847
babfd660 8848 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
8849 if no dynamic object is present. Declare r_symndx and h in an
8850 inner scope.
8851
de0d9f33
L
88522004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8853
8854 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8855 trampoline if it is known out of range.
8856
51532845
AO
88572004-01-06 Alexandre Oliva <aoliva@redhat.com>
8858
8859 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8860 * elf32-frv.c (_frv_osec_readonly_p): New.
8861 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8862 undefweak symbol.
8863 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8864 (elf32_frv_relocate_section): Likewise. Error out if attempting
8865 to emit rofixups or dynamic relocs in read-only segments. Use
8866 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8867 dynamic relocations.
8868 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8869 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8870 relocations or fixups involving merged sections correctly. Avoid
8871 crash when undefined symbol is referenced by R_FRV_32 or
8872 R_FRV_FUNCDESC_VALUE.
8873 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8874 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8875 input section holding local symbol to addend of R_FRV_32 or
8876 R_FRV_FUNCDESC_VALUE dynamic relocation.
8877 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8878 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8879 (elf32_frv_always_size_sections): Don't store pointer to
8880 __stacksize symbol in sec_info.
8881 (elf32_frv_modify_segment_map): Look it up here.
8882 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8883 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8884 of the lazy PLT entry, not only its offset, as the low word of a
8885 function descriptor.
8886 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8887 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8888 if a hash table entry already exists but is not a definition.
8889 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8890 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8891 (_frv_add_rofixup): Don't inline.
8892 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8893 for undefweak symbols.
8894 (elf32_frv_relocate_section): Avoid crash while computing
8895 relocation when linking with shared library. Only emit rofixups
8896 and dynamic relocations for alloc&load sections. Mark binaries
8897 with inter-segment relocations for relocation as a unit.
8898 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8899 (DEFAULT_STACK_SIZE): New.
8900 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8901 emit rofixups or dynamic relocs when linking dynamic non-PIE
8902 executables.
8903 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8904 shared libs too. Reserve the last entry for the GOT pointer.
8905 (elf32_frv_finish_dynamic_sections): Emit it.
8906 (elf32_frv_always_size_sections): New.
8907 (elf32_frv_modify_segment_map): New.
8908 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8909 sections.
8910 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8911 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8912 (elf_backend_always_size_sections): New.
8913 (elf_backend_modify_segment_map): New.
8914 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8915 * config.bfd: Added frv-*-*linux*.
8916 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8917 ABS section, instead of crashing.
8918 (elf32_frv_relocate_section): Don't crash before warning about
8919 different segments in non-PIC relocation.
8920 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8921 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8922 relocs to undefweak symbols.
8923 (elf32_frv_relocate_section): Ditto for undefined symbols.
8924 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8925 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8926 gotfixup section was created.
8927 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8928 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8929 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8930 complain_overflow_signed.
8931 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8932 have not been allocated.
8933 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8934 privfd only if dynamic sections were created.
8935 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8936 for GPREL relocs. When linking relocatable FDPIC executables,
8937 emit warnings for relocations that would be illegal on PIE or
8938 shared libraries. Emit rofixup for R_FRV_32 only if input object
8939 is not FDPIC.
8940 (_frv_create_got_section): Define _gp symbol in the rofixup
8941 section.
8942 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8943 dynamic sections missing, error out requesting -melf32frvfd.
8944 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8945 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8946 computation of addends from section and global or local symbol
8947 value. Change return type to bfd_boolean, and return a failure if
8948 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8949 nonzero addend is required.
8950 (elf32_frv_relocate_section): Likewise. Print error for
8951 unsupported nonzero addends.
8952 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8953 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8954 force everything local.
8955 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8956 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8957 (frv_gotfixup_section): New.
8958 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8959 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8960 and relocsfdv.
8961 (_frv_add_rofixup): New.
8962 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8963 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8964 improve some ugly conditions.
8965 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8966 relocations in fdpic.
8967 (_frv_create_got_section): Create .rofixup.got section.
8968 (struct _frv_dynamic_got_info): Added fixups.
8969 (_frv_count_got_plt_entries): Account in-GOT relocations into
8970 relocs32, relocsfd and relocsfdv. Account them into relocs or
8971 fixups, as appropriate.
8972 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8973 sizing of gotrel.
8974 (elf32_frv_finish_dynamic_sections): Verify that the right number
8975 of relocations and fixups was generated.
8976 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8977 relocsfdv.
8978 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8979 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8980 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8981 descriptor of a (formerly-)global symbol is local.
8982 (struct frv_pic_relocs_info): Adjust comments.
8983 (_frv_emit_got_relocs_plt_entries): Adjust.
8984 (elf32_frv_relocate_section): Likewise.
8985 (_frv_count_got_plt_entries): Likewise.
8986 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8987 symbol's value to addend in the common preamble. Decay dynamic
8988 symbols to section+offset if they bind or call locally, for GOT
8989 and FUNCDESC_VALUE, respectively.
8990 (elf32_frv_relocate_section): Likewise.
8991 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8992 internal or hidden visibility.
8993 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8994 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8995 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8996 (elf32_frv_relocate_section): Pass relocation addend in. Use
8997 original relocation addend to look up the got relocs/plt entries
8998 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8999 processing relocations that reference .scommon symbols.
9000 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
9001 Introduce support for dynamic linking.
9002 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9003 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9004 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9005 (frv_reloc_type_lookup): Return REL howtos for executables and
9006 dynamic libraries.
9007 (frv_info_to_howto_rel): New.
9008 (struct frv_elf_link_hash_table): New.
9009 (frv_hash_table, frv_got_section, frv_gotrel_section,
9010 frv_plt_section, frv_pltrel_section, frv_relocs_info,
9011 frv_got_initial_offset, frv_plt_initial_offset): New macros.
9012 (frv_elf_link_hash_table_create): New.
9013 (struct frv_pic_relocs_info): New.
9014 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9015 (frv_pic_relocs_info_find): New.
9016 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9017 New.
9018 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9019 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9020 (_frv_emit_got_relocs_plt_entries): New.
9021 (elf32_frv_relocate_section): Add support for dynamic linking.
9022 Handle new relocations.
9023 (_frv_create_got_section): New.
9024 (elf32_frv_create_dynamic_sections): New.
9025 (ELF_DYNAMIC_INTERPRETER): New.
9026 (struct _frv_dynamic_got_info): New.
9027 (_frv_count_got_plt_entries): New.
9028 (struct _frv_dynamic_got_plt_info): New.
9029 (_frv_compute_got_alloc_data): New.
9030 (_frv_get_got_entry, _frv_get_fd_entry): New.
9031 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9032 (_frv_resolve_final_relocs_info): New.
9033 (elf32_frv_size_dynamic_sections): New.
9034 (elf32_frv_finish_dynamic_sections): New.
9035 (elf32_frv_adjust_dynamic_symbol): New.
9036 (elf32_frv_finish_dynamic_symbol): New.
9037 (elf32_frv_check_relocs): Handle new relocs. Explain how the
9038 whole thing works.
9039 (elf_info_to_howto_rel): Define.
9040 (bfd_elf32_bfd_link_hash_table_create): Define.
9041 (elf_backend_create_dynamic_sections): Define.
9042 (elf_backend_adjust_dynamic_symbol): Define.
9043 (elf_backend_size_dynamic_sections): Define.
9044 (elf_backend_finish_dynamic_symbol): Define.
9045 (elf_backend_finish_dynamic_sections): Define.
9046 (elf_backend_want_got_sym): Define.
9047 (elf_backend_got_header_size): Define.
9048 (elf_backend_want_got_plt): Define.
9049 (elf_backend_plt_readonly): Define.
9050 (elf_backend_want_plt_sym): Define.
9051 (elf_backend_plt_header_size): Define.
9052 (elf_backend_may_use_rel_p): Define.
9053 (elf_backend_may_use_rela_p): Define.
9054 (elf_backend_default_use_rela_p): Define.
9055 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
9056 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9057 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9058 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9059 (frv_reloc_map): Map the corresponding BFD relocs to them.
9060 (frv_reloc_type_lookup): ... and back to BFD relocs.
9061 * reloc.c: New relocs.
9062 * bfd-in2.h, libbfd.h: Rebuilt.
9063 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
9064 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9065 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9066 R_FRV_FUNCDESC_GOTLO): New.
9067 (frv_reloc_map): Map the corresponding BFD relocs to them.
9068 (frv_reloc_type_lookup): ... and back to BFD relocs.
9069 * reloc.c: New relocs.
9070 * bfd-in2.h, libbfd.h: Rebuilt.
9071
4301eeb1
MR
90722004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9073
9074 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9075 targets to support pages of up to 64kB.
9076 (elf32_bed): Redefine to get a separate backend data structure for
9077 traditional targets.
9078 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9079 targets to support pages of up to 64kB.
9080 (elf64_bed): Redefine to get a separate backend data structure for
9081 traditional targets.
9082 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9083 targets to support pages of up to 64kB.
9084 (elf32_bed): Redefine to get a separate backend data structure for
9085 traditional targets.
9086
0647ed71
MK
90872004-01-04 Mark Kettenis <kettenis@gnu.org>
9088
9089 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9090
61adc1a4
NC
90912004-01-02 Mark Kettenis <kettenis@gnu.org>
9092
9093 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9094 (elf_i386_grok_psinfo): Likewise.
9095
b50c15dc
NC
90962004-01-02 Bernardo Innocenti <bernie@develer.com>
9097
9098 * config.bfd: Add m68k-uClinux target.
9099
2627de83
AM
91002004-01-01 Grant Edwards <grante@visi.com>
9101
9102 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9103 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9104 (elf32_h8_gc_sweep_hook): New function.
9105 (elf_backend_gc_mark_hook): Define.
9106 (elf_backend_gc_sweep_hook): Define.
9107 (elf_backend_can_gc_sections): Define.
9108
c9e214e5 9109For older changes see ChangeLog-0203
56882138
AM
9110\f
9111Local Variables:
9112mode: change-log
9113left-margin: 8
9114fill-column: 74
9115version-control: never
9116End:
This page took 0.731136 seconds and 4 git commands to generate.