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