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