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