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