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