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