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