bfd/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
b4f4e59f
AM
12005-06-06 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
4 case, include addend when indexing .opd section map.
5 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
6 clear opd_adjust array if no_opd_opt set. Tidy code.
7 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
8
2ae727ad
L
92005-06-04 H.J. Lu <hongjiu.lu@intel.com>
10
11 * dwarf2.c (comp_unit): Fix a typo in comment.
12
ce71b576
NC
132005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
14
15 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
16 (reloc_type_lookup): Dito.
17 (elf_vax_discard_copies): Dito.
18 (elf_vax_instantiate_got_entries): Dito.
19 (elf_vax_link_hash_traverse): Dito.
20 (elf_vax_link_hash_newfunc): Dito.
21 (elf_vax_link_hash_table_create): Dito.
22 (elf32_vax_set_private_flags): Dito.
23 (elf32_vax_merge_private_bfd_data): Dito.
24 (elf32_vax_print_private_bfd_data): Dito.
25 (elf_vax_check_relocs): Dito.
26 (elf_vax_gc_mark_hook): Dito.
27 (elf_vax_gc_sweep_hook): Dito.
28 (elf_vax_size_dynamic_sections): Dito.
29 (elf_vax_discard_copies): Dito.
30 (elf_vax_instantiate_got_entries): Dito.
31 (elf_vax_relocate_section): Dito.
32 (elf_vax_finish_dynamic_symbol): Dito.
33 (elf_vax_finish_dynamic_sections): Dito.
34 (elf_vax_hash_table): Break-up of line isn't needed.
35 (elf_vax_check_relocs): Remove leading whitespace
36 (elf_vax_relocate_section): Remove redundant whitespace
37 (elf_vax_link_hash_newfunc): Don't cast NULL.
38 (elf_vax_link_hash_table_create): Dito.
39 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
40
9635fe29
AM
412005-06-03 Alan Modra <amodra@bigpond.net.au>
42
e1fffbe6
AM
43 PR 568
44 * configure.in: Bump version
45 * configure: Regenerate.
46 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
47 discarded section sym refs and kill linker output.
48 * simple.c (simple_dummy_einfo): New function.
49 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
50
9635fe29
AM
51 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
52 for all reloc types.
53
e87d886e
AM
542005-06-02 Alan Modra <amodra@bigpond.net.au>
55
56 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
57 restrictive of func code and func descr for undefined syms as well
58 as defined.
59
b2b09913
JB
602005-05-31 Jim Blandy <jimb@redhat.com>
61
62 * Makefile.am: Regenerate dependencies with 'make dep-am'.
63 * Makefile.in: Regenerate.
64
8288a39e
RH
652005-05-31 Richard Henderson <rth@redhat.com>
66
67 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
68 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
69 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
70 (elf64_alpha_want_plt): Update to match.
71 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
72 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
73
f1c71a59
ZW
742005-05-31 Zack Weinberg <zack@codesourcery.com>
75
76 * elf32-arm.c (elf32_arm_reloc_type_lookup)
77 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
78 Use ISO C90 function declaration style.
79
653bb2de
JW
802005-05-31 James E Wilson <wilson@specifixinc.com>
81
82 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
83 header PF_R flag on PT_LOAD segments.
84
f915360b
RH
852005-05-30 Richard Henderson <rth@redhat.com>
86
87 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
88 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
89
6ec7057a
RH
902005-05-29 Richard Henderson <rth@redhat.com>
91
92 * configure.in (--enable-secureplt): New.
93 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
94 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
95 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
96 (elf64_alpha_use_secureplt): New.
97 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
98 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
99 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
100 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
101 (struct alpha_elf_link_hash_entry): Add plt_offset.
102 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
103 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
104 (PLT_ENTRY_WORD3): Remove.
105 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
106 on .plt and create .got.plt.
107 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
108 (get_got_entry): Initialize plt_offset.
109 (elf64_alpha_want_plt): New.
110 (elf64_alpha_check_relocs): Use it.
111 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
112 plt entries here.
113 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
114 error as user error.
115 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
116 got subsection.
117 (elf64_alpha_size_plt_section): Size .got.plt section.
118 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
119 plt entries used.
120 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
121 Add PLTRO DYNAMIC entry.
122 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
123 (elf64_alpha_finish_dynamic_sections): Likewise.
124
3133ddbf
DJ
1252005-05-28 David Daney <ddaney@avtrex.com>
126
127 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
128 calculation of DT_RELSZ to occur after all dynamic relocations
129 are created.
130
36527912
AJ
1312005-05-28 Eli Zaretskii <eliz@gnu.org>
132
133 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
134 * config.in, configure: Regenerate.
135
1bc8074d 1362005-05-26 Mark Kettenis <kettenis@gnu.org>
6ec7057a 137 Maciej W. Rozycki <macro@linux-mips.org>
1bc8074d
MR
138
139 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
140 stop processing of options if one of invalid size is
141 encountered.
142 (_bfd_mips_elf_section_from_shdr): Likewise.
143 (_bfd_mips_elf_fake_sections): Reset the type of empty special
144 sections.
145
75fed80d
RH
1462005-05-26 Richard Henderson <rth@redhat.com>
147
36527912 148 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
75fed80d
RH
149 plt_old_section, plt_old_value.
150 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
151 (elf64_alpha_size_plt_section_1): Don't use it.
152
24639c7d
JJ
1532005-05-26 Jakub Jelinek <jakub@redhat.com>
154
155 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
156 first shdr has sh_size == 0. Fail if e_shnum is large to cause
157 arithmetic overflow when allocating the i_shdr array.
158 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
159
a7519a3c
RH
1602005-05-25 Richard Henderson <rth@redhat.com>
161
162 * elf64-alpha.c: Update all function definitions to ISO C. Remove
163 all function prototypes; rearrange functions into def-use order.
164
308da68f
RH
1652005-05-25 Richard Henderson <rth@redhat.com>
166
167 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
168 in the presence of deleting elements.
169 (elf64_alpha_size_got_sections): Zero dead got section size.
170
4ab527b0
FF
1712005-05-23 Fred Fish <fnf@specifixinc.com>
172
173 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
174 (struct funcinfo): Add caller_func, caller_file, caller_line.
175 tag, and nesting_level members.
176 (lookup_address_in_function_table): Change first passed parameter
177 from "struct funcinfo *" to "struct comp_unit *".
178 (lookup_address_in_function_table): Dereference unit to find function
179 table.
180 (lookup_address_in_function_table): Traverse the function list to
181 create a chain of inlined functions back to the first non inlined
182 function.
183 (scan_unit_for_functions): Remember tag and nesting level. Handle
184 DW_AT_call_file and DW_AT_call_line.
185 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
186 call to pass unit pointer instead of function table pointer. For
187 inlined functions, save pointer to the inliner chain.
188 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
189 (_bfd_dwarf2_find_inliner_info): New function that returns information
190 from the inliner chain after a call to bfd_find_nearest_line.
191
192 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
193 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
194 NAME##_find_inliner_info.
195 (bfd_target): Add _bfd_find_inliner_info.
196 * bfd-in2.h: Regenerate.
197
198 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
199 macro that always returns bfd_false.
200 (_bfd_dwarf2_find_inliner_info): Declare.
201 * libbfd.h: Regenerate.
36527912 202
4ab527b0
FF
203 * elf32-arm.c (elf32_arm_find_inliner_info): New function
204 that calls _bfd_dwarf2_find_inliner_info.
205 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
206
207 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
208 that calls _bfd_dwarf2_find_inliner_info.
209 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
210 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
211 _bfd_mips_elf_find_inliner_info.
212 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
213 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
214
215 * elf.c (_bfd_elf_find_inliner_info): New function that calls
216 _bfd_dwarf2_find_inliner_info.
217 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
218 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
219 _bfd_elf_find_inliner_info.
220
221 * coffgen.c (coff_find_inliner_info): New function that
222 calls _bfd_dwarf2_find_inliner_info.
223 * libcoff-in.h (coff_find_inliner_info): Declare.
224 * libcoff.h: Regenerate.
225 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
226 (pmac_xcoff_vec) Ditto.
227 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
228 (aix5coff64_vec): Ditto.
36527912 229
4ab527b0
FF
230 * aout-target.h (MY_find_inliner_info): Define as
231 _bfd_nosymbols_find_inliner_info.
232 * aout-tic30.c (MY_find_inliner_info): Ditto.
233 * binary.c (binary_find_inliner_info): Ditto.
234 * i386msdos.c (msdos_find_inliner_info): Ditto.
235 * ihex.c (ihex_find_inliner_info): Ditto.
236 * libaout.h (aout_32_find_inliner_info): Ditto.
237 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
238 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
239 * mmo.c (mmo_find_inliner_info): Ditto.
240 * nlm-target.h (nlm_find_inliner_info): Ditto.
241 * pef.c (bfd_pef_find_inliner_info): Ditto.
242 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
243 * srec.c (srec_find_inliner_info): Ditto.
244 * tekhex.c (tekhex_find_inliner_info): Ditto.
245 * versados.c (versados_find_inliner_info): Ditto.
246 * xsym.c (bfd_sym_find_inliner_info): Ditto.
247
248 * ieee.c (ieee_find_inliner_info): New function that always
249 returns FALSE.
250 * oasys.c (oasys_find_inliner_info): Ditto.
251 * vms.c (vms_find_inliner_info): Ditto.
252
9edfd1af
AM
2532005-05-24 Alan Modra <amodra@bigpond.net.au>
254
255 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
256 force old plt layout.
257
3241278a
RH
2582005-05-22 Richard Henderson <rth@redhat.com>
259
260 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
261 sections.
262 (elf64_alpha_check_relocs): Likewise.
263 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
264 non-allocated sections.
265
d6ad34f6
RH
2662005-05-22 Richard Henderson <rth@redhat.com>
267
36527912 268 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
d6ad34f6
RH
269 undefweak to use zero register. Call elf64_alpha_relax_got_load
270 if not all uses removed.
271 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
272 (elf64_alpha_relax_section): Handle undefweak symbols.
273 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
274 (elf64_alpha_size_rela_got_1): Likewise.
275 (elf64_alpha_relocate_section): Likewise.
276
487c4353
RH
2772005-05-22 Richard Henderson <rth@redhat.com>
278
279 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
280 on SEC_CODE sections.
281
a96afa0f
DA
2822005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
283
284 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
285 unsigned int *.
286 (som_write_space_strings): Change type of tmp_space and p to char *.
287 (som_write_symbol_strings): Likewise. Also change type of comp to
288 char *comp[4].
289 (som_begin_writing): Change type of strings_size to unsigned int.
290 (som_finish_writing): Likewise.
291 (som_slurp_reloc_table): Change type of external_relocs to unsigned
292 char *.
293 * som.h (struct som_section_data_struct): Change type of reloc_stream
294 field to unsigned char *.
295
643796e3
DJ
2962005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
297
298 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
299 copy relocations for VxWorks.
300
4dc4a9a5
DJ
3012005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
302
303 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
304 has_sda_refs.
305 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
306 (ppc_elf_check_relocs): Set has_sda_refs.
307 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
308 copy relocations. Use has_sda_refs to place variables in .sbss.
309 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
310 .sbss.
311
dd1a320b
BW
3122005-05-20 Bob Wilson <bob.wilson@acm.org>
313
314 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
315 xtensa_default_isa is initialized.
316
28e99bb6
AM
3172005-05-20 Alan Modra <amodra@bigpond.net.au>
318
319 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
320 for second and subsequent list entries. Only allocate multiple
321 glink stubs when shared or pie.
322 (ppc_elf_finish_dynamic_symbol): Break out early when only one
323 glink stub is needed.
324
e3e71e27
ZW
3252005-05-19 Zack Weinberg <zack@codesourcery.com>
326
327 * Makefile.am: Have 'all' depend on 'info'.
328 * Makefile.in: Regenerate.
329
a6aa5195
AM
3302005-05-19 Alan Modra <amodra@bigpond.net.au>
331
332 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
333 init_offset. Add init_got_refcount, init_plt_refcount,
334 init_got_offset and init_plt_offset.
335 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
336 (_bfd_elf_link_hash_hide_symbol): Likewise.
337 (_bfd_elf_link_hash_table_init): Likewise.
338 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
339 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
340 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
341 (bfd_elf_size_dynamic_sections): Likewise.
342 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
343 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
344 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
345 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
346 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
347 (struct plt_entry): New.
348 (ppc_elf_link_hash_table_create): Set new init_plt fields.
349 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
350 use _bfd_elf_link_hash_copy_indirect.
351 (update_plt_info, find_plt_ent): New functions.
352 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
353 and adjust for use of plt list rather than refcount.
354 (ppc_elf_gc_sweep_hook): Likewise.
355 (ppc_elf_tls_optimize): Likewise.
356 (ppc_elf_adjust_dynamic_symbol): Likewise.
357 (allocate_dynrelocs): Likewise.
358 (ppc_elf_relax_section): Likewise.
359 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
360 when performing a relocatable link.
361 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
362 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
363 pic resolver stub.
364
a49e53ed
AM
3652005-05-19 Alan Modra <amodra@bigpond.net.au>
366
367 * elf.c (assign_file_positions_for_segments): Use maximum of
368 maxpagesize and section alignment when adjusting initial
369 segment offset and section offsets.
370
cb1afa5c
ZW
3712005-05-18 Zack Weinberg <zack@codesourcery.com>
372
373 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
374 unconditional.
375
13792e9d
L
3762005-05-18 H.J. Lu <hongjiu.lu@intel.com>
377
378 * elf.c (group_signature): Undo the last change. Check if the
379 symbol table section is correct.
380
c19d1205
ZW
3812005-05-17 Zack Weinberg <zack@codesourcery.com>
382
383 * elf32-arm.c: Wherever possible, use official reloc names
384 from AAELF.
385 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
386 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
387 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
388 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
389 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
390 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
391 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
392 Add many new relocations from AAELF.
393 (elf32_arm_howto_from_type): Update to match.
394 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
395 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
396 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
397 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
398 (elf32_arm_final_link_relocate): Add support for
399 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
400 case entries redundant with default.
401
402 * reloc.c: Reorganize ARM relocations. Add Thumb
403 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
404 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
405 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
406 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
407 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
408 * bfd-in2.h, libbfd.h: Regenerate.
409
26ae6d5e
DJ
4102005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
411
412 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
413 elf_shstrtab.
414 * format.c (bfd_check_format_matches): Set output_has_begun
415 for both_direction.
416 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
417 special case for both_direction.
418
5982e3c7
NC
4192005-05-17 Nick Clifton <nickc@redhat.com>
420
421 * elf.c (group_signature): Check for a group section which is
422 actually a (corrupt) symbol table section in disguise and prevent
423 an infinite loop from occurring.
424
fc3ab699
L
4252005-05-17 H.J. Lu <hongjiu.lu@intel.com>
426
427 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
428 2005-02-16.
429
5e27d427
L
4302005-05-17 H.J. Lu <hongjiu.lu@intel.com>
431
432 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
433 predicate on slot 0 only if slot 0 isn't br.
434
75ff4589
L
4352005-05-17 H.J. Lu <hongjiu.lu@intel.com>
436
437 PR 797
438 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
439 empty sdynbss section.
440 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
441
8e0ed13f
NC
4422005-05-17 Tavis Ormandy <taviso@gentoo.org>
443
444 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
445 dynamic sections.
446
7e8aeb9a
AM
4472005-05-17 Alan Modra <amodra@bigpond.net.au>
448
449 * elf32-ppc.c (LIS_11. LIS_12): Define.
450 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
451 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
452 for --data-plt when building non-pie executables.
453
641bd093
NC
4542005-05-17 Nick Clifton <nickc@redhat.com>
455
10dbd1f3
NC
456 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
457 the situation where a symbols's section is not known but a section
458 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
459 OS.
460
641bd093
NC
461 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
462 the presence of a symbol table to just before the symbol table is
463 actually used.
464
83b6bd86
L
4652005-05-16 H.J. Lu <hongjiu.lu@intel.com>
466
467 PR 834
468 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
469 (elfNN_ia64_relax_section): Use it.
470
06084812
MK
4712005-05-14 Mark Kettenis <kettenis@gnu.org>
472
473 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
474 of basename.
475
1fe44d79
AM
4762005-05-14 Alan Modra <amodra@bigpond.net.au>
477
478 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
479 not DT_PPC_GLINK.
480 (ppc_elf_finish_dynamic_sections): Likewise.
481
2db3311b
FF
4822005-05-13 Fred Fish <fnf@specifixinc.com>
483
484 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
485 * libbfd.h: Rebuilt.
486
7db48a12
BW
4872005-05-13 Bob Wilson <bob.wilson@acm.org>
488
489 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
490 periods in linkonce_kind values.
491
8fe76924
L
4922005-05-12 H.J. Lu <hongjiu.lu@intel.com>
493
494 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
495 against protected function when building executable.
496
86b9da88
AM
4972005-05-12 Alan Modra <amodra@bigpond.net.au>
498
499 * elf32-ppc.c (LWZU_0_X_11): Delete.
500 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
501 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
502 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
503 table.
504 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
505 table.
506 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
507 Generate .glink branch table and updated stubs.
508
d7128ce4
AM
5092005-05-11 Alan Modra <amodra@bigpond.net.au>
510
511 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
512 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
513 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
514 (CROR_151515, CROR_313131): Delete.
515 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
516 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
517 LWZU_0_X_11): Define.
518 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
519 and R_PPC_REL16_HA entries.
520 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
521 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
522 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
523 new_plt, and old_plt.
524 (ppc_elf_create_dynamic_sections): Create .glink section.
525 (ppc_elf_check_relocs): Set new_plt and old_plt.
526 (ppc_elf_select_plt_layout): New function.
527 (ppc_elf_tls_setup): Set plt output section elf type and flags.
528 (allocate_got): Handle differences between old and new got layout.
529 (allocate_dynrelocs): Likewise for plt.
530 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
531 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
532 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
533 destination of R_PPC_PLTREL24 relocs.
534 (ppc_elf_relocate_section): Handle new relocs and changed destination
535 of R_PPC_PLTREL24.
536 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
537 differences in layout.
538 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
539 put a blrl in new got. Write glink contents.
540 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
541 * libbfd.h: Regenerate.
542 * bfd-in2.h: Regenerate.
543
4c9b0de6
AS
5442005-05-11 Andreas Schwab <schwab@suse.de>
545
546 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
547 warning.
548
3d2b39cf
L
5492005-05-10 H.J. Lu <hongjiu.lu@intel.com>
550
551 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
552 section if SEC_ALLOC isn't set.
553
2ba49b59
KC
5542005-05-09 Kelley Cook <kcook@gcc.gnu.org>
555
556 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
557 * acinclude.m4: Don't sinclude accross.m4.
558 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
559
433817dd
AM
5602005-05-09 Alan Modra <amodra@bigpond.net.au>
561
562 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
563 (ppc64_elf_add_symbol_hook): Set has_dotsym.
564 (ppc64_elf_check_directives): Only process syms when has_dotsym.
565 (func_desc_adjust): Hide fake function descriptors when function
566 code entry is defined.
567 (adjust_opd_syms): Adjust for deleted_section becoming union field.
568
0560d0f7
AM
5692005-05-09 Alan Modra <amodra@bigpond.net.au>
570
571 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
572
74cc7600
DK
5732005-05-08 Dave Korn <dave.korn@artimi.com>
574
575 * coff-tic80.c: Undefine _CONST after system headers to prevent
576 clash with tic80-specific definition in include/coff/tic80.h
577
cfca085c
L
5782005-05-08 H.J. Lu <hongjiu.lu@intel.com>
579
580 PR 939
581 * elflink.c (elf_link_output_extsym): Use output_bfd if
582 h->root.u.def.section is bfd_abs_section_ptr when reporting
583 error.
584
7f4d3958
L
5852005-05-07 H.J. Lu <hongjiu.lu@intel.com>
586
587 * elf-bfd.h (elf_backend_data): Update special_sections to
588 array of pointer to bfd_elf_special_section.
589 * elf.c (special_sections): Likewise.
590 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
591 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
592 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
593 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
594 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
595 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
596 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
597 * elf32-v850.c (v850_elf_special_sections): Likewise.
598 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
599 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
600 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
601 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
602 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
603 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
604 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
605 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
606
607 * elf.c (get_special_section): Updated.
608
3b36f7e6
AM
6092005-05-07 Alan Modra <amodra@bigpond.net.au>
610
611 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
612 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
613 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
614 got_symbol_offset.
615 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
616 * elf32-frv.c (_frv_create_got_section): Likewise.
617 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
618 (elf_backend_got_symbol_offset): Don't define.
619 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
620 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
621 and got_gap.
622 (ppc_elf_create_got): Tidy.
623 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
624 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
625 (ppc_elf_gc_sweep_hook): Likewise.
626 (ppc_elf_relocate_section): Likewise.
627 (ppc_elf_finish_dynamic_symbol): Likewise.
628 (allocate_got): New function.
629 (allocate_dynrelocs): Use allocate_got.
630 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
631 so that local got can refcount it. Set got_header_size.
632 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
633 coded 4.
634 (ppc_elf_finish_dynamic_sections): Likewise.
635 (elf_backend_got_symbol_offset): Don't define.
636 (elf_backend_got_header_size): Ditto.
637
2e0fbf77
JW
6382005-05-05 Steve Ellcey <sje@cup.hp.com>
639
640 * configure.in (ACX_HEADER_STRING): New.
641 * configure: Regenerate.
642 * config.in: Regenerate.
643 * sysdep.h (STRING_WITH_STRINGS): Use.
644
6f140a15
L
6452005-05-05 H.J. Lu <hongjiu.lu@intel.com>
646
647 * elf.c (_bfd_elf_close_and_cleanup): Only call
648 _bfd_dwarf2_cleanup_debug_info on bfd_object.
649
01d9ad14
L
6502005-05-05 H.J. Lu <hongjiu.lu@intel.com>
651
652 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
653 "__bss_start" instead of "_edata" as fallback.
654
b36b76cb
L
6552005-05-05 H.J. Lu <hongjiu.lu@intel.com>
656
657 * bfd-in2.h: Regenerated.
658
eac338cf
PB
6592005-05-05 Paul Brook <paul@codesourcery.com>
660
661 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
662 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
663 elf-vxworks.lo.
664 * configure: Regenerate.
665 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
666 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
667 (elf32-i386.lo): Depend on elf-vxworks.h.
668 (elf-vxworks.lo): New rule.
669 * Makefile.in: Regenerate.
670 * elf-bfd.h (elf_backend_data): Update type of
671 elf_backend_emit_relocs.
672 (_bfd_elf_link_output_relocs): Update prototype.
673 * elflink.c (_bfd_elf_link_output_relocs): Always use
674 bed->elf_backend_emit_relocs when outputting relocations.
675 * elfxx-target.h (elf_backend_emit_relocs): Default to
676 _bfd_elf_link_output_relocs.
677 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
678 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
679 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
680 (elf_i386_plt0_entry): Remove padding.
681 (elf_i386_pic_plt0_entry): Ditto.
682 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
683 (PLT_NON_JUMP_SLOT_RELOCS): Define.
684 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
685 plt0_pad_byte fields.
686 (elf_i386_link_hash_table_create): Zero them.
687 (elf_i386_create_dynamic_sections): Create static relocation section.
688 (allocate_dynrelocs): Allocate space for static PLT relocations.
689 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
690 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 691 if we have exported symbols from them.
eac338cf
PB
692 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
693 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
694 VxWorks.
695 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
696 Add relocation for GOT location. Fill in PLT static relocations.
697 (elf_i386_vxworks_link_hash_table_create): New function.
698 (elf_i386_vxworks_link_output_symbol_hook): New function.
699 * elf-vxworks.h: New file.
700
3496cb2a
L
7012005-05-05 H.J. Lu <hongjiu.lu@intel.com>
702
703 * section.c (bfd_make_section_anyway_with_flags): New.
704 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
705 (bfd_make_section_with_flags): New.
706 (bfd_make_section): Call bfd_make_section_with_flags.
707
708 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
709 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
710 instead of bfd_make_section/bfd_make_section and don't call
711 bfd_set_section_flags.
712 (mn10300_elf_check_relocs): Likewise.
713 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
714 * elf32-arm.c (create_got_section): Likewise.
715 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
716 (elf32_arm_check_relocs): Likewise.
717 * elf32-cris.c (cris_elf_check_relocs): Likewise.
718 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
719 (_frv_create_got_section): Likewise.
720 (elf32_frvfdpic_create_dynamic_sections): Likewise.
721 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
722 (elf32_hppa_check_relocs): Likewise.
723 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
724 (i370_elf_check_relocs): Likewise.
725 * elf32-i386.c (create_got_section): Likewise.
726 (elf_i386_check_relocs): Likewise.
727 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
728 (create_got_section): Likewise.
729 (m32r_elf_create_dynamic_sections): Likewise.
730 (m32r_elf_check_relocs): Likewise.
731 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
732 * elf32-ppc.c (ppc_elf_create_got): Likewise.
733 (ppc_elf_create_dynamic_sections): Likewise.
734 (ppc_elf_add_symbol_hook): Likewise.
735 (ppc_elf_check_relocs): Likewise.
736 * elf32-s390.c (create_got_section): Likewise.
737 (elf_s390_check_relocs): Likewise.
738 * elf32-sh.c (create_got_section): Likewise.
739 (sh_elf_create_dynamic_sections): Likewise.
740 (sh_elf_check_relocs): Likewise.
741 * elf32-vax.c (elf_vax_check_relocs): Likewise.
742 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
743 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
744 (add_extra_plt_sections): Likewise.
745 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
746 (elf64_alpha_create_got_section): Likewise.
747 (elf64_alpha_create_dynamic_sections): Likewise.
748 (elf64_alpha_check_relocs): Likewise.
749 * elf64-hppa.c (get_reloc_section): Likewise.
750 (get_opd): Likewise.
751 (get_plt): Likewise.
752 (get_dlt): Likewise.
753 (get_stub): Likewise.
754 (elf64_hppa_create_dynamic_sectionso): Likewise.
755 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
756 * elf64-ppc.c (create_linkage_sections): Likewise.
757 (ppc64_elf_check_relocs): Likewise.
758 * elf64-s390.c (create_got_section): Likewise.
759 (elf_s390_check_relocs): Likewise.
760 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
761 (sh64_elf64_create_dynamic_sections): Likewise.
762 * elf64-x86-64.c (create_got_section): Likewise.
763 (elf64_x86_64_check_relocs): Likewise.
764 * elflink.c (_bfd_elf_create_got_section): Likewise.
765 (_bfd_elf_link_create_dynamic_sections): Likewise.
766 (elf_link_add_object_symbols): Likewise.
767 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
768 (elfNN_ia64_create_dynamic_sections): Likewise.
769 (get_fptr): Likewise.
770 (get_pltoff): Likewise.
771 (get_reloc_section): Likewise.
772 (elfNN_ia64_object_p): Likewise.
773 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
774 (mips_elf_create_compact_rel_section): Likewise.
775 (mips_elf_create_got_section): Likewise.
776 (_bfd_mips_elf_create_dynamic_sections): Likewise.
777 * elfxx-sparc.c (create_got_section): Likewise.
778 (_bfd_sparc_elf_check_relocs): Likewise.
779
780 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
781 on linker created sections.
782
59fef9e7
L
7832005-05-05 H.J. Lu <hongjiu.lu@intel.com>
784
785 PR 882
786 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
787 script on executable.
788
35330cce
NC
7892005-05-05 John Levon <levon@movementarian.org>
790
791 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
792 allocated memory before returning.
793 (decode_line_info): Likewise.
794 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
795 allocated by functions in this file.
796 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 797 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
798 _bfd_dwarf2_cleanup_debug_info.
799
4a2a2686
HPN
8002005-05-05 Hans-Peter Nilsson <hp@axis.com>
801
802 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
803 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
804 * configure, config.in, Makefile.in: Regenerate.
805 * sysdep.h (stpcpy): Revert last change.
806
0baace35
HPN
8072005-05-05 Hans-Peter Nilsson <hp@axis.com>
808
809 * sysdep.h (stpcpy): Wrap declaration in parentheses.
810
5a260b66
L
8112005-05-04 H.J. Lu <hongjiu.lu@intel.com>
812
813 * elfxx-ia64.c (ARCH_SIZE): New.
814 (LOG_SECTION_ALIGN): Likewise.
815 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
816 align relocation sections.
817 (get_fptr): Likewise.
818 (get_reloc_section): Likewise.
819 (elfNN_ia64_tprel_base): Likewise.
820 (elfNN_ia64_check_relocs): Support 32bit relocations.
821 (allocate_global_fptr_got): Likewise.
822 (allocate_dynrel_entries): Likewise.
823 (set_got_entry): Likewise.
824 (set_pltoff_entry): Likewise.
825 (elfNN_ia64_relocate_section): Likewise.
826
8272005-05-04 H.J. Lu <hongjiu.lu@intel.com>
828
829 * configure.in: Add AC_CHECK_DECLS(stpcpy).
830 * configure: Regenerate.
831 * config.in: Likewise.
832
833 * sysdep.h (stpcpy): New.
834
3e110533
NC
8352005-05-04 Nick Clifton <nickc@redhat.com>
836
837 * Update the address and phone number of the FSF organization in
838 the GPL notices in the following files:
839 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
840 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
841 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
842 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
843 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
844 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
845 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
846 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
847 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
848 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
849 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
850 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
851 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
852 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
853 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
854 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
855 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
856 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
857 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
858 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
859 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
860 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
861 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
862 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
863 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
864 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
865 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
866 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
867 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
868 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
869 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
870 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
871 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
872 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
873 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
874 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
875 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
876 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
877 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
878 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
879 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
880 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
881 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
882 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
883 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
884 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
885 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
886 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
887 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
888 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
889 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
890 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
891 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
892 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
893 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
894 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
895 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
896 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
897 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
898 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
899 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
900 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
901 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
902 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
903 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
904 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
905 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
906 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
907 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
908 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 909 hosts/alphavms.h
3e110533 910
f652615e
L
9112005-05-04 H.J. Lu <hongjiu.lu@intel.com>
912
913 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
914 * bfd-in2.h: Regenerated.
915
916 * elflink.c (bfd_elf_set_symbol): New.
917 (_bfd_elf_provide_symbol): Call it.
918 (_bfd_elf_provide_section_bound_symbols): New.
919
c5e2cead
L
9202005-05-04 H.J. Lu <hongjiu.lu@intel.com>
921
922 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
923 at the end, if a strong definition has already been seen.
924
8423293d
AM
9252005-05-04 Alan Modra <amodra@bigpond.net.au>
926
927 * section.c (struct bfd_section): Replace link_order_head and
928 link_order_tail with map_head and map_tail union.
929 (STD_SECTION): Update.
930 (_bfd_strip_section_from_output): Delete.
931 * aoutx.h: Update throughout for above changes.
932 * coff-ppc.c: Likewise.
933 * cofflink.c: Likewise.
934 * ecoff.c: Likewise.
935 * elf-eh-frame.c: Likewise.
936 * elf-m10300.c: Likewise.
937 * elf.c: Likewise.
938 * elf32-arm.c: Likewise.
939 * elf32-cris.c: Likewise.
940 * elf32-hppa.c: Likewise.
941 * elf32-i386.c: Likewise.
942 * elf32-m32r.c: Likewise.
943 * elf32-m68hc1x.c: Likewise.
944 * elf32-m68k.c: Likewise.
945 * elf32-ppc.c: Likewise.
946 * elf32-s390.c: Likewise.
947 * elf32-sh.c: Likewise.
948 * elf32-vax.c: Likewise.
949 * elf32-xtensa.c: Likewise.
950 * elf64-alpha.c: Likewise.
951 * elf64-hppa.c: Likewise.
952 * elf64-ppc.c: Likewise.
953 * elf64-s390.c: Likewise.
954 * elf64-sh64.c: Likewise.
955 * elf64-x86-64.c: Likewise.
956 * elflink.c: Likewise.
957 * elfxx-ia64.c: Likewise.
958 * elfxx-mips.c: Likewise.
959 * elfxx-sparc.c: Likewise.
960 * linker.c: Likewise.
961 * merge.c: Likewise.
962 * pdp11.c: Likewise.
963 * xcofflink.c: Likewise.
964 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
965 out from bfd_elf_size_dynamic_sections.
966 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
967 * bfd-in2.h: Regenerate.
968
04dd1667
AM
9692005-05-04 Alan Modra <amodra@bigpond.net.au>
970
971 * section.c (bfd_section_list_remove): Don't clear s->next.
972 (bfd_section_list_append): Always init s->prev.
973 (bfd_section_list_prepend): Define.
974 (bfd_section_list_insert_after): Minor optimization.
975 (bfd_section_removed_from_list): Rewrite.
976 * elf.c (assign_section_numbers): Simplify list traversal now that
977 bfd_section_list_remove doesn't destroy removed section next ptr.
978 * sunos.c (sunos_add_dynamic_symbols): Likewise.
979 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
980 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
981 * bfd-in2.h: Regenerate.
982
5daa8fe7
L
9832005-05-02 H.J. Lu <hongjiu.lu@intel.com>
984
985 * bfd.c (bfd): Remove section_tail and add section_last.
986 (bfd_preserve): Likewise.
987 (bfd_preserve_save): Likewise.
988 (bfd_preserve_restore): Likewise.
989 * opncls.c (_bfd_new_bfd): Likewise.
990
991 * coffcode.h (coff_compute_section_file_positions): Updated.
992 (coff_compute_section_file_positions): Likewise.
993 * elf.c (assign_section_numbers): Likewise.
994 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
995 * elf64-mmix.c (mmix_elf_final_link): Likewise.
996 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
997 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
998 * sunos.c (sunos_add_dynamic_symbols): Likewise.
999 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1000
1001 * ecoff.c (bfd_debug_section): Initialize prev.
1002
1003 * section.c (bfd_section): Add prev.
1004 (bfd_section_list_remove): Updated.
1005 (bfd_section_list_append): New.
1006 (bfd_section_list_insert_after): New.
1007 (bfd_section_list_insert_before): New.
1008 (bfd_section_list_insert): Removed.
1009 (bfd_section_removed_from_list): Updated.
1010 (STD_SECTION): Initialize prev.
1011 (bfd_section_init): Updated.
1012 (bfd_section_list_clear): Updated.
1013
1014 * bfd-in2.h: Regenerated.
1015
a31501e9
L
10162005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1017
1018 * elf.c (_bfd_elf_new_section_hook): Don't call
1019 _bfd_elf_get_sec_type_attr on sections from input files.
1020
d05da6a8
L
10212005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1022
1023 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1024 hash table size 16699 instead of bfd_hash_table_init.
1025
a67b080b
PB
10262005-05-01 Paul Brook <paul@codesourcery.com>
1027
1028 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1029 definition has already been seen.
1030
c6596c5e
PB
10312005-05-01 Paul Brook <paul@codesourcery.com>
1032
1033 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1034 R_ARM_PLT32 the same as R_ARM_PC24.
1035 (arm_add_to_rel): Ditto.
1036
9a813b7a
DJ
10372005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1038
1039 * config.bfd: Add h8300*-*-rtemscoff.
1040 Switch h8300*-*-rtems* to elf.
1041
aa7eb06d
DJ
10422005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1043
1044 * aclocal.m4, Makefile.in: Regnerated.
1045
fa0d1cab
PB
10462005-04-28 Paul Brook <paul@codesourcery.com>
1047
1048 Merge changes only applied to Makefile.in.
1049 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1050 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1051 (elfxx-sparc.lo): New rule.
1052 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1053 (elf64-sparc.lo): Likewise.
1054
0291d291
NC
10552005-04-28 Julian Brown <julian@codesourcery.com>
1056
1057 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1058 import.
1059
26c61ae5
L
10602005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1061
1062 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1063
1064 * elf.c (bfd_elf_sym_name): Updated.
1065 (group_signature): Likewise.
1066 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1067 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1068 (ppc64_elf_edit_toc): Likewise.
1069 (ppc64_elf_relocate_section): Likewise.
1070 * elfcode.h (elf_slurp_symbol_table): Likewise.
1071 * elflink.c (elf_link_input_bfd): Likewise.
1072
1073 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1074 bfd_elf_sym_name to get local symbol name when reporting errors.
1075
8c19749a
NC
10762005-04-27 Nick Clifton <nickc@redhat.com>
1077
1078 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1079 formatted input file results in a reloc which has no associated
1080 global symbol.
1081
8e5b6e16
JG
10822005-04-26 Jerome Guitton <guitton@gnat.com>
1083
1084 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1085
e459dc7b
DM
10862005-04-25 David S. Miller <davem@davemloft.net>
1087
1088 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1089 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1090 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1091 Likewise.
1092
6d633fd2
L
10932005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1094
1095 PR 858
1096 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1097 to discarded section an error.
1098
d34a2b1d
JG
10992005-04-21 Jerome Guitton <guitton@gnat.com>
1100
1101 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1102 corresponding AC_CHECK_DECLS.
1103 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1104 HAVE_DECL_*.
1105 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1106 * configure: Regenerate.
1107 * config.in: Ditto.
1108
ff01938b
AS
11092005-04-21 Andreas Schwab <schwab@suse.de>
1110
c2e70a82
AS
1111 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1112 unsigned from type of dynamic_interpreter.
1113 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1114 casts again.
1115
ff01938b
AS
1116 * elf.c (assign_section_numbers): Fix comment.
1117
0858d3ec
JG
11182005-04-21 Jerome Guitton <guitton@gnat.com>
1119
1120 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1121 for struct som_exec_auxhdr fields.
1122
7920ce38
NC
11232005-04-21 Nick Clifton <nickc@redhat.com>
1124
1125 * aout-adobe.c: Convert to ISO C and fix formatting.
1126 * aout-arm.c: Convert to ISO C and fix formatting.
1127 * aout-cris.c: Convert to ISO C and fix formatting.
1128 * aout-ns32k.c: Convert to ISO C and fix formatting.
1129 * aout-tic30.c: Convert to ISO C and fix formatting.
1130 * coffcode.h: Convert to ISO C and fix formatting.
1131 * coffswap.h: Convert to ISO C and fix formatting.
1132 * i386aout.c: Convert to ISO C and fix formatting.
1133 * libaout.h: Convert to ISO C and fix formatting.
1134 * libcoff-in.h: Convert to ISO C and fix formatting.
1135 * libcoff.h: Convert to ISO C and fix formatting.
1136 * libecoff.h: Convert to ISO C and fix formatting.
1137 * libnlm.h: Convert to ISO C and fix formatting.
1138 * libpei.h: Convert to ISO C and fix formatting.
1139 * libxcoff.h: Convert to ISO C and fix formatting.
1140 * nlm-target.h: Convert to ISO C and fix formatting.
1141 * nlm.c: Convert to ISO C and fix formatting.
1142 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1143 * nlm32-i386.c: Convert to ISO C and fix formatting.
1144 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1145 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1146 * nlmcode.h: Convert to ISO C and fix formatting.
1147 * nlmswap.h: Convert to ISO C and fix formatting.
1148 * pe-mips.c: Convert to ISO C and fix formatting.
1149 * peXXigen.c: Convert to ISO C and fix formatting.
1150 * peicode.h: Convert to ISO C and fix formatting.
1151 * vms-gsd.c: Convert to ISO C and fix formatting.
1152 * vms-hdr.c: Convert to ISO C and fix formatting.
1153 * vms-misc.c: Convert to ISO C and fix formatting.
1154 * vms-tir.c: Convert to ISO C and fix formatting.
1155 * vms.c: Convert to ISO C and fix formatting.
1156 * vms.h: Convert to ISO C and fix formatting.
1157
1158 * coffgen.c (coff_print_symbol): Restore correct formatting of
1159 output.
1160
e8be8da4
DM
11612005-04-20 David S. Miller <davem@davemloft.net>
1162
1163 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1164 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1165 (allocate_dynrelocs): Likewise.
1166
ec7b76fe
JG
11672005-04-20 Jerome Guitton <guitton@gnat.com>
1168
1169 * configure.in: Fix the check for basename declaration. Add check
1170 for declarations of ftello, ftello64, fseeko, fseeko64.
1171 * configure: Regenerate.
1172 * config.in: Ditto.
1173 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1174
22b75d0a
DM
11752005-04-19 David S. Miller <davem@davemloft.net>
1176
1177 * elfxx-sparc.c: New file.
1178 * elfxx-sparc.h: New file.
1179 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1180 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1181 (elfxx-sparc.lo): New rule.
1182 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1183 (elf64-sparc.lo): Likewise.
1184 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1185 (bfd_elf64_sparc_vec): Likewise.
1186 * configure: Regenerate.
1187 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1188 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1189 which is more consistent with elf32-sparc.c
1190
a008ac03
DJ
11912005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1192
1193 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1194 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1195
c87b5a93
AM
11962005-04-19 Alan Modra <amodra@bigpond.net.au>
1197
1198 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1199 dynamic relocs in non-SEC_ALLOC sections.
1200 (ppc_elf_gc_sweep_hook): Likewise.
1201 (ppc_elf_relax_section): Likewise.
1202 (ppc_elf_relocate_section): Likewise.
1203
7cefacd3
NC
12042005-04-18 Nick Clifton <nickc@redhat.com>
1205
1206 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1207 assigning a value to return_value.
1208
278d8f37
L
12092005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1210
1211 PR 855
1212 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1213 created group data.
1214
20dbb49d
L
12152005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1216
1217 PR 855
1218 * elf.c (setup_group): Properly handle zero group count.
1219
6a808a40
MK
12202005-04-17 Mark Kettenis <kettenis@gnu.org>
1221
1222 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1223 (som_is_subspace, compare_subspaces, som_compute_checksum)
1224 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1225 protoypes.
1226 (hppa_som_reloc, compare_syms, compare_subspaces)
1227 (som_print_symbol, som_get_section_contents)
1228 (som_set_section_contents): Remove space after 'void *'.
1229 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1230 (som_bfd_merge_private_bfd_data)
1231 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1232 defines.
1233
33bfe774
JB
12342004-04-15 Julian Brown <julian@codesourcery.com>
1235
1236 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1237 * bfd-in2.h: Regenerate.
1238 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1239 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1240 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1241 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1242 relocations if requested to.
1243 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1244 use_blx rather than symbian_p.
1245 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1246 use_blx is in effect.
1247 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1248 for SymbianOS.
1249
745c12f8
NC
12502005-04-15 Nick Clifton <nickc@redhat.com>
1251
1252 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1253 values.
1254
2e8b3a61
AM
12552005-04-15 Alan Modra <amodra@bigpond.net.au>
1256
1257 PR ld/815
1258 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1259 used as a list pointer.
1260
9e9b66a9
AM
12612005-04-14 Alan Modra <amodra@bigpond.net.au>
1262
1263 * Makefile.am (NO_WERROR): Define.
1264 * warning.m4: New file
1265 * acinclude.m4: Include warning.m4.
1266 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1267 * Makefile.in: Regenerate.
1268 * configure: Regenerate.
1269
8699aa54
AM
12702005-04-14 Alan Modra <amodra@bigpond.net.au>
1271
92ceba1e
AM
1272 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1273 Write trailing padding.
1274
8699aa54
AM
1275 * merge.c (merge_strings): Round up section size for alignment.
1276
40937810
JJ
12772005-04-14 David S. Miller <davem@davemloft.net>
1278
1279 Add TLS support for 64-bit Sparc ELF.
1280 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1281 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1282 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1283 sparc64_elf_hash_entry, sparc64_elf_tdata,
1284 sparc64_elf_local_got_tls_type): New defines.
1285 (sparc64_elf_mkobject): New function.
1286 (sparc64_elf_link_hash_table): Add members for dynamic linker
1287 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1288 uion to track TLS GOT references. Add sym_sec to cache
1289 mappings from local sym to section.
1290 (link_hash_newfunc): New function.
1291 (sparc64_elf_bfd_link_hash_table_create): Rename to
1292 sparc64_elf_link_hash_table_create for consistency.
1293 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1294 (sparc64_elf_create_dynamic_sections): Initialize new section
1295 members of sparc64_elf_link_hash_table. Only init srelbss
1296 if not-shared.
1297 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1298 New functions.
1299 (SPARC_NOP): Define.
1300 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1301 sparc64_elf_plt_ptr_offset): Delete.
1302 (sparc64_plt_entry_build): New function to build PLT entries
1303 gradually instread of all at once at the end of linking.
1304 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1305 local vars. Get them from sparc64_elf_hash_table instead.
1306 Check early on if r_symndx is in bounds. Handle TLS transitions.
1307 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1308 For TLS relocs, record the tls_type in either
1309 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1310 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1311 to the __tls_get_addr symbol. For PLT relocs, track references
1312 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1313 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1314 symbol references, count the number of relocations needed for
1315 that symbol. For default switch case, don't error, this lets
1316 the TLS relocs not explicitly handled by this function get
1317 accepted.
1318 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1319 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1320 it from sparc64_elf_hash_table. Store the real PLT offset
1321 in h->plt.offset, and build PLT entries one at a time. Also
1322 get .dynbss section pointer from htab.
1323 (allocate_dynrelocs, readonly_dynrelocs,
1324 sparc64_omit_section_dynsym): New functions.
1325 (sparc64_elf_omit_section_dynsym): Use these new functions as
1326 helpers.
1327 (dtpoff_base, tpoff): New functions.
1328 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1329 locals, get them from sparc64_elf_hash_table. Handle TLS
1330 relocations and refcounting in main relocation loop.
1331 (sparc64_elf_finish_dynamic_symbol): Use
1332 sparc64_elf_link_hash_table. Build PLT entries as we see
1333 them. Handle TLS GOT relocations.
1334 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1335 from sparc64_elf_hash_table. Initialize only PLT header
1336 not all entries since we not build PLT entries one by one.
1337 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1338 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1339 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1340
e75a280b
L
13412005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1342
1343 * elflink.c (elf_link_input_bfd): Update check for removed
1344 sections.
1345
ceae3e33
AM
13462005-04-12 Alan Modra <amodra@bigpond.net.au>
1347
1348 * Makefile.am: Run "make dep-am".
1349 * Makefile.in: Regenerate.
1350 * aclocal.m4: Regenerate.
1351 * libcoff.h: Regenerate.
1352
ab82c5b9
L
13532005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1354
1355 * linker.c (_bfd_generic_link_output_symbols): Also check if
1356 the output section of an input section has been removed from
1357 the output file.
1358
1359 * section.c (bfd_section_list_remove): Clear the next field
1360 of the removed section.
1361 (bfd_section_removed_from_list): New.
1362 * bfd-in2.h: Regenerated.
1363
bd695bcc
JJ
13642005-04-11 David S. Miller <davem@davemloft.net>
1365
1366 * elf32-sparc.c (elf32_sparc_relocate_section,
1367 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1368 R_SPARC_TLS_LE_{HIX22,LOX10}.
1369 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1370 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1371 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1372 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1373
b5b2699c
L
13742005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1375
1376 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1377
116c20d2 13782005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 1379
116c20d2
NC
1380 * aout-target.h: Convert to ISO C.
1381 * aoutf1.h: Convert to ISO C.
1382 * aoutx.h: Convert to ISO C.
1383 * bout.c: Convert to ISO C.
1384 * dwarf1.c: Convert to ISO C.
1385 * ecoffswap.h: Convert to ISO C.
1386 * freebsd.h: Convert to ISO C.
1387 * genlink.h: Convert to ISO C.
1388 * ieee.c: Convert to ISO C.
1389 * ihex.c: Convert to ISO C.
1390 * libcoff-in.h: Convert to ISO C.
1391 * mach-o.c: Convert to ISO C.
1392 * mach-o.h: Convert to ISO C.
1393 * netbsd.h: Convert to ISO C.
1394 * ns32k.h: Convert to ISO C.
1395 * ns32knetbsd.c: Convert to ISO C.
1396 * oasys.c: Convert to ISO C.
1397 * pdp11.c: Convert to ISO C.
1398 * pef-traceback.h: Convert to ISO C.
1399 * pef.c: Convert to ISO C.
1400 * pef.h: Convert to ISO C.
1401 * riscix.c: Convert to ISO C.
1402 * som.c: Convert to ISO C.
1403 * som.h: Convert to ISO C.
1404 * srec.c: Convert to ISO C.
1405 * stabs.c: Convert to ISO C.
1406 * sunos.c: Convert to ISO C.
1407 * tekhex.c: Convert to ISO C.
1408 * versados.c: Convert to ISO C.
1409 * version.h: Convert to ISO C.
1410 * xcoff-target.h: Convert to ISO C.
1411 * xcofflink.c: Convert to ISO C.
1412 * xsym.c: Convert to ISO C.
1413 * xsym.h: Convert to ISO C.
1414
8f6277f5
PB
14152005-04-08 Paul Brook <paul@codesourcery.com>
1416
1417 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1418 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1419 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1420 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1421 (elf32_arm_to_thumb_stub): Create PIC stubs.
1422 (record_arm_to_thumb_glue): Use different stub size for relocatable
1423 images.
1424
8c1d1bb8
AM
14252005-04-05 Alan Modra <amodra@bigpond.net.au>
1426
1427 * elf64-ppc.c (dec_dynrel_count): New function split out from
1428 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1429 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1430 (ppc64_elf_tls_optimize): Likewise.
1431
8c101720
NC
14322005-04-05 Mark Kettenis <kettenis@gnu.org>
1433
1434 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1435 CORE_WCOOKIE_OFFSET.
1436 (SPARC64_WCOOKIE_OFFSET): New.
1437 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1438
429cc0ae
NC
14392005-04-05 Nick Clifton <nickc@redhat.com>
1440
1441 * po/rw.po: New translation: Kinyarwanda
1442 * configure.in (ALL_LINGUAS): Add rw
1443 * configure: Regenerate.
1444
cc2e31b9
RS
14452005-04-05 Richard Sandiford <rsandifo@redhat.com>
1446
1447 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1448 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1449 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1450 section flags.
1451 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1452 to check for SHT_MIPS_OPTIONS sections.
1453 (_bfd_mips_elf_set_section_contents): Likewise.
1454
8236346f
EC
14552005-04-04 Eric Christopher <echristo@redhat.com>
1456
1457 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1458 Clean up gp handling code.
1459
7e4111ad
L
14602005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1461
1462 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 1463 group section.
da9f89d4
L
1464 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1465 sections for relocatable files only. Remove the linker created
1466 group sections.
1467 (_bfd_elf_compute_section_file_positions): Pass link_info to
1468 assign_section_numbers.
1469
1470 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1471 (elf_backend_object_p): Defined.
7e4111ad 1472
96982dc9
L
14732005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1474
1475 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1476
a13afe8e
FF
14772005-04-03 Fred Fish <fnf@specifixinc.com>
1478
1479 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1480 dwarf_ranges_size members.
1481 (struct comp_unit): Add base_address member.
1482 (struct funcinfo): Replace low/high members with an arange.
1483 (arange_add): Replace incoming "unit" parameter with "abfd" and
1484 "first_arange" pointers. Reorganize/rewrite function body.
1485 (decode_line_info): Change arange_add call to pass bfd and arange
1486 pointers.
1487 (lookup_address_in_line_info_table): Use arange list instead of
1488 individual low/high members. Walk function's arange list to find
1489 lowest PC in list, to test for overlapping functions.
1490 (read_debug_ranges): New function, reads the debug_ranges section.
1491 (lookup_address_in_function_table): Use arange list instead of
1492 individual low/high members. Rewrite to find smallest range that
1493 matches.
1494 (read_rangelist): Read a given rangelist from debug_ranges.
1495 (scan_unit_for_functions): Use arange list instead of individual
1496 low/high members. Handle a DW_AT_ranges attribute.
1497 (parse_comp_unit): Use arange list instead of individual low/high
1498 members. Save comp unit base address. Handle a DW_AT_ranges
1499 attribute.
1500
2796fd96
L
15012005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1502
1503 * elf.c (assign_section_numbers): Really use the kept section.
1504
01b3c8ab
L
15052005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1506
1507 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1508
1509 * elf.c (assign_section_numbers): When sh_link points to a
1510 discarded section, call _bfd_elf_check_kept_section to see if
1511 the kept section can be used. Otherwise reject sh_link
1512 pointing to discarded section.
1513
1514 * elflink.c (_bfd_elf_check_kept_section): New.
1515 (elf_link_input_bfd): Use it.
1516
35090471
AM
15172005-04-01 Alan Modra <amodra@bigpond.net.au>
1518
1519 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1520 that we no longer need.
1521
7356fed5
AM
15222005-04-01 Alan Modra <amodra@bigpond.net.au>
1523
1524 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1525 rather than 0.
77623a34 1526 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 1527
28b13744
L
15282005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1529
1530 * elf.c (assign_section_numbers): Fix a typo.
1531
c93625e2
L
15322005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1533
1534 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1535 error message.
1536 (_bfd_elf_section_already_linked): Likewise.
1537
fddc4048
JG
15382005-03-31 Jerome Guitton <guitton@gnat.com>
1539
1540 * config.in: Regenerate.
1541
2e9ebff5
JG
15422005-03-31 Jerome Guitton <guitton@gnat.com>
1543
c93625e2
L
1544 * config.in (HAVE_DECL_BASENAME): New configure macro.
1545 * configure.in: Check for basename.
1546 * configure: Regenerate.
2e9ebff5 1547
05ea83ed
JB
15482005-03-30 Julian Brown <julian@codesourcery.com>
1549
1550 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1551 bfd_elf32_is_arm_mapping_symbol_name.
1552 * bfd-in2.h: Regenerate.
1553 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1554 bfd_elf32_is_arm_mapping_symbol_name.
1555 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1556 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1557 (arm_elf_find_function): Likewise.
1558 (elf32_arm_output_symbol_hook): Likewise.
1559
9d2da7ca
JB
15602005-03-30 Julian Brown <julian@codesourcery.com>
1561
1562 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1563 * bfd-in2.h: Regenerate.
1564 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1565 bfd_elf32_is_arm_mapping_symbol_name.
1566 (elf32_arm_output_symbol_hook): Likewise.
1567 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1568 mapping symbols.
1569 (is_arm_mapping_symbol_name): Function moved from here...
1570 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1571 and made global.
1572
efa9bda4
AL
15732005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1574
1575 * configure.in: Check for ffs decl and alphabetize.
1576 * config.in: Regenerate.
1577 * configure: Regenerate.
d7128ce4 1578 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 1579
09a9d560
FF
15802005-03-29 Fred Fish <fnf@specifixinc.com>
1581
1582 * dwarf2.c (struct comp_unit): Fix typo.
1583 (scan_unit_for_functions): Remove unused local variable "name"
1584 and dead code that set it.
1585
ba93b8ac
DJ
15862005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1587 Phil Blundell <philb@gnu.org>
1588
1589 * bfd-in2.h, libbfd.h: Regenerated.
1590 * reloc.c: Add ARM TLS relocations.
1591 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1592 relocations.
1593 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1594 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1595 (elf32_arm_tls_ie32_howto): New.
1596 (elf32_arm_howto_from_type): Support TLS relocations.
1597 (elf32_arm_reloc_map): Likewise.
1598 (elf32_arm_reloc_type_lookup): Likewise.
1599 (TCB_SIZE): Define.
1600 (struct elf32_arm_obj_tdata): New.
1601 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1602 (elf32_arm_mkobject): New function.
1603 (struct elf32_arm_relocs_copied): Add pc_count.
1604 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1605 (GOT_TLS_IE): Define.
1606 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1607 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1608 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1609 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1610 (dtpoff_base, tpoff): New functions.
1611 (elf32_arm_final_link_relocate): Handle TLS relocations.
1612 (IS_ARM_TLS_RELOC): Define.
1613 (elf32_arm_relocate_section): Warn about TLS mismatches.
1614 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1615 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1616 TLS relocations and pc_count.
1617 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1618 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1619 calls.
1620 (elf32_arm_size_dynamic_sections): Handle TLS.
1621 (elf32_arm_finish_dynamic_symbol): Likewise.
1622 (bfd_elf32_mkobject): Define.
1623
71a976dd
DJ
16242005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1625
1626 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1627 relocation types. Don't count relocations which will use a PLT.
1628
7e7353ed
JB
16292005-03-29 Joel Brobecker <brobecker@gnat.com>
1630
1631 * elf.c (elfcore_grok_nto_status): Print tid as long.
1632 (elfcore_grok_nto_regs): Likewise.
1633
166856d7
JB
16342005-03-29 Joel Brobecker <brobecker@gnat.com>
1635
40937810 1636 * irix-core.c: Remove some unnecessary prototypes.
166856d7 1637
40f85900
JB
16382005-03-28 Joel Brobecker <brobecker@adacore.com>
1639
1640 * irix-core.c: Convert to ISO C.
1641
aa2e06ba
JB
16422005-03-28 Joel Brobecker <brobecker@adacore.com>
1643
1644 * irix-core.c (do_sections): Replace + by | in expression.
1645 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1646 to unused parameters to avoid a compiler warning.
1647
832bc186
MK
16482005-03-28 Mark Kettenis <kettenis@gnu.org>
1649
1650 * netbsd-core.c: Convert to ISO C. Fix formatting.
1651
82f0cfbd
EC
16522005-03-24 Eric Christopher <echristo@redhat.com>
1653
1654 * elfxx-mips.c: Revert previous patch.
1655
d7b9976f
NC
16562005-03-24 Nick Clifton <nickc@redhat.com>
1657
1658 * targets.c (_bfd_target_vector): Only include the
1659 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1660 all targets enabled.
1661
074d327a
NC
16622005-03-24 James E Wilson <wilson@specifixinc.com>
1663
1664 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1665 (BFD64_BACKENDS): Add elf32-ia64.lo.
1666 * Makefile.in: Regenerate.
1667
cc27e1dc
EC
16682005-03-23 Eric Christopher <echristo@redhat.com>
1669
1670 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1671 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1672 after emitting relocation.
1673 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1674 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1675 and readonly_reloc.
1676
ed84e695
NC
16772005-03-23 Mike Frysinger <vapier@gentoo.org>
1678 Nick Clifton <nickc@redhat.com>
1679
1680 * config.bfd: Accept any C library to accompany a GNU Linux
1681 implementation, not just the GNU C library.
1682 * configure.in: Likewise.
1683 * configure: Regenerate.
1684
81e1b023
L
16852005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1686
1687 * bfd-in.h (_bfd_elf_provide_symbol): New.
1688 * bfd-in2.h: Regenerated.
1689
1690 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1691 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1692 of set_linker_sym.
1693
1694 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1695 from elf32-ppc.c.
1696
672c2d7e
HPN
16972005-03-22 Hans-Peter Nilsson <hp@axis.com>
1698
1699 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1700
1fbc7e7a
BW
17012005-03-22 Bob Wilson <bob.wilson@acm.org>
1702
1703 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1704 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1705 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1706 (xtensa_opcode_decode): Rearrange code.
1707
c8e7bf0d
NC
17082005-03-22 Nick Clifton <nickc@redhat.com>
1709
1710 * binary.c: Convert to ISO C90 formatting.
1711 * coff-arm.c: Convert to ISO C90 formatting.
1712 * coffgen.c: Convert to ISO C90 formatting.
1713 * elf32-gen.c: Convert to ISO C90 formatting.
1714 * elf64-gen.c: Convert to ISO C90 formatting.
1715 * hash.c: Convert to ISO C90 formatting.
1716 * ieee.c: Convert to ISO C90 formatting.
1717
28a094c2
DJ
17182005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1719
1720 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1721 unresolved symbols in R_ARM_NONE relocations.
1722
0945cdfd
DJ
17232005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1724
1725 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1726 UNRESOLVED_RELOC_P argument. Set it appropriately.
1727 (elf32_arm_relocate_section): Update call to
1728 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1729 unresolved_reloc instead.
1730
11d2f718
AM
17312005-03-23 Alan Modra <amodra@bigpond.net.au>
1732
1733 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1734 .gnu.warning.* sections.
1735
76750a2f
AM
17362005-03-22 Alan Modra <amodra@bigpond.net.au>
1737
1738 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1739 written_address_p.
1740 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1741 (elf_create_pointer_linker_section): Delete info parm. Don't make
1742 h dynamic. Don't set written_address_p.
1743 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1744 (bfd_put_ptr): Delete.
1745 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1746 Always write section contents. Assert global sym is def_regular.
1747 Use offset bottom bit as a written flag.
1748 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1749 calls.
1750
f85f57ad
AM
17512005-03-22 Alan Modra <amodra@bigpond.net.au>
1752
1753 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1754 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1755 and end syms.
1756
2dc773a0
NC
17572005-03-21 Nick Clifton <nickc@redhat.com>
1758
1759 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1760 targets.
1761 (t2a1_bx_pc_insn): Likewise.
1762 (t2a2_noop_insn): Likewise.
1763 (t2a3_b_insn): Likewise.
1764 (t2a1_push_insn): Likewise.
1765 (t2a2_ldr_insn): Likewise.
1766 (t2a3_mov_insn): Likewise.
1767 (t2a4_bx_insn): Likewise.
1768 (t2a5_pop_insn): Likewise.
1769 (t2a6_bx_insn): Likewise.
1770 (coff_arm_relocate_section): Only declare the high_address
1771 variable for non WINCE targets.
1772
644285ef
AM
17732005-03-22 Alan Modra <amodra@bigpond.net.au>
1774
1775 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1776 SEC_LINKER_CREATED. Attach to dynobj.
1777 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1778
c9a2f333
AM
17792005-03-21 Alan Modra <amodra@bigpond.net.au>
1780
1781 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1782 sym_offset. Add name, bss_name, sym_name, sym_val.
1783 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1784 Add sdata array of elf_linker_section_t.
1785 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1786 (enum elf_linker_section_enum): Delete.
1787 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1788 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1789 the special sections are needed. Adjust htab->sdata refs.
1790 Ensure dynobj is set in sreloc code.
1791 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1792 (ppc_elf_set_sdata_syms): New function.
1793 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1794 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1795 sym_val instead of sym_hash.
1796 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1797
8853c3d3
AM
17982005-03-21 Alan Modra <amodra@bigpond.net.au>
1799
1800 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1801 (ppc_elf_merge_private_bfd_data): Likewise.
1802
2bb04cf2
AM
18032005-03-21 Alan Modra <amodra@bigpond.net.au>
1804
1805 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1806 (ppc_elf_create_linker_section): Don't create rel_section.
1807 (elf_create_pointer_linker_section): Don't size relocs.
1808 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1809 Don't generate relocs.
1810 (ppc_elf_relocate_section): Adjust calls to
1811 elf_finish_pointer_linker_section.
1812
d2663f46
AM
18132005-03-21 Alan Modra <amodra@bigpond.net.au>
1814
1815 * elf32-ppc.c (is_ppc_elf_target): New function.
1816 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1817 for bfd_target_elf_flavour. Do this test before endian check.
1818 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1819 (ppc_elf_size_dynamic_sections): Likewise.
1820
6dc132d9
L
18212005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1822
1823 * elf-bfd.h (elf_backend_data): Add int to
1824 elf_backend_section_from_shdr.
1825 (bfd_elf_section_data): Update comment for this_idx.
1826 (_bfd_elf_make_section_from_shdr): Add int.
1827 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1828
1829 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1830 and use it to set this_idx in bfd_elf_section_data.
1831 (bfd_section_from_shdr): Pass shindex to
1832 _bfd_elf_make_section_from_shdr.
1833 (_bfd_elf_section_from_bfd_section): Use this_idx in
1834 bfd_elf_section_data to find section index.
1835
1836 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1837 index and pass it to _bfd_elf_make_section_from_shdr.
1838 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1839 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1840 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1841 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1842 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1843 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1844 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1845 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1846 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1847
cabd4ccc
DS
18482005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1849 Ross Ridge <rridge@csclub.uwaterloo.ca>
1850
1851 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1852 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1853 cases. Add comment.
1854
7451fd89
L
18552005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1856
1857 * elflink.c (elf_mark_used_section): Remove check for special
1858 sections.
1859
b4677f03
AS
18602005-03-18 Andreas Schwab <schwab@suse.de>
1861
1862 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1863 from bfd_vma to ia64_insn, remove broken cast.
1864
238d258f
NC
18652005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1866
8853c3d3 1867 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
1868 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1869 elf_m68k_finish_dynamic_sections): Use it.
1870
b294bdf8
MM
18712005-03-17 Paul Brook <paul@codesourcery.com>
1872 Dan Jacobowitz <dan@codesourcery.com>
1873 Mark Mitchell <mark@codesourcery.com>
1874
1875 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1876 (elf32_arm_additional_program_headers): Likewise.
1877 (elf_backend_modify_segment_map): Define.
1878 (elf_backend_additional_program_headers): Likewise.
1879 (elf32_arm_symbian_modify_segment_map): Use
1880 elf32_arm_modify_segment_map.
1881
257a4820
L
18822005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1883
1884 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1885 for special sections.
1886
554220db
AM
18872005-03-18 Alan Modra <amodra@bigpond.net.au>
1888
1889 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1890 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1891 section_sym_count param, and return number of section symbols.
1892 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1893 .dynsym contents. Don't bother calling swap_symbol_out on the
1894 first all-zero dynsym.
1895 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1896 special sections like bfd_abs_section.
1897 (bfd_elf_gc_sections): Spelling fix.
1898
36868d45
NC
18992005-03-16 Fred Fish <fnf@specifixinc.com>
1900
1901 PR binutils/790
1902 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1903 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1904
57316bff
L
19052005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1906
1907 * elflink.c (elf_mark_used_section): New.
1908 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1909 non-relocatable link if we don't do GC.
1910
1ad12f97
NC
19112005-03-16 Nick Clifton <nickc@redhat.com>
1912 Ben Elliston <bje@au.ibm.com>
1913
569acd2c 1914 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 1915 compiler command line. Enabled by default. Disable via
569acd2c 1916 --disable-werror.
1ad12f97
NC
1917 * configure: Regenerate.
1918
3b5d3310
NC
19192005-03-16 Nick Clifton <nickc@redhat.com>
1920
1921 * ecoff.c: Convert to ISO C90 formatting.
1922
25dbc73a
AM
19232005-03-16 Alan Modra <amodra@bigpond.net.au>
1924
1925 * elf32-ppc.c: Divide file into general and linker specific
1926 functions. Sort linker functions into roughly the order in which
1927 they are called by the ELF linker code.
1928
cb2d1ef2
AM
19292005-03-16 Alan Modra <amodra@bigpond.net.au>
1930
1931 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1932 on section. Correct comment, and add FIXME.
1933 (ppc_elf_additional_program_headers): Don't bump header count for
1934 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1935 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1936 do allocate memory if they need it.
1937
34723071
NC
19382005-03-15 Mikkel Krautz <krautz@gmail.com>
1939
1940 * config.bfd (x86_64-elf): Add target.
1941
729ae8d2
AM
19422005-03-15 Alan Modra <amodra@bigpond.net.au>
1943
1944 * po/es.po: Commit new Spanish translation.
1945
f0581930
L
19462005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1947
1948 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1949 for global symbol when reporting overflow.
1950
390c0e42
JJ
19512005-03-11 Jakub Jelinek <jakub@redhat.com>
1952
1953 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1954 * libbfd.h: Rebuilt.
1955 * archive.c (_bfd_ar_spacepad): New function.
1956 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1957 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1958 coff_write_armap): Use it.
1959 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1960 uid/gid support.
1961 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1962
a2633f4e
MK
19632005-03-10 Mark Kettenis <kettenis@gnu.org>
1964
1965 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1966 has_table to the start of the function.
1967
109f7096
BE
19682005-03-10 Ben Elliston <bje@au.ibm.com>
1969
1970 * archive.c: Include hashtab.h.
1971 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1972 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1973 (hash_file_ptr): New function.
1974 (eq_file_ptr): Likewise.
1975 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1976 * libbfd-in.h: Include hashtab.h.
1977 (struct artdata): Change `cache' member type to htab_t.
1978 * libbfd.h: Rebuild.
1979
664fe1be
DJ
19802005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1981
1982 * configure.in: Bump version to 2.16.90.
1983 * configure: Regenerated.
1984
0709bb22
JJ
19852005-03-07 Jakub Jelinek <jakub@redhat.com>
1986
1987 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1988 close is a function like macro in system headers.
1989
b18e2ae5
AM
19902005-03-07 Alan Modra <amodra@bigpond.net.au>
1991
1992 PR ld/778
1993 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1994 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1995
1f170678
AM
19962005-03-06 Alan Modra <amodra@bigpond.net.au>
1997
1998 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1999
06647dfd
AM
20002005-03-05 Alan Modra <amodra@bigpond.net.au>
2001
2002 * po/bfd.pot: Regenerate.
2003
93f3fa99
AM
20042005-03-05 Alan Modra <amodra@bigpond.net.au>
2005
2006 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2007 with is_func.
2008 (func_desc_adjust): Force dot-syms local in executables as well
2009 as shared libs.
2010
bbe506e8
TS
20112005-03-04 David Daney <ddaney@avtrex.com>
2012
2013 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2014 '__gnu_local_gp' symbol used by gas -mno-shared.
2015
d27f5fa1
L
20162005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2017
2018 * elf-bfd.h (elf_backend_data): Add "const char *" to
2019 elf_backend_section_from_phdr.
2020
2021 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2022 elf_backend_section_from_phdr hook.
2023
0f20cc35
DJ
20242005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2025 Joseph Myers <joseph@codesourcery.com>
2026
2027 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2028 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2029 and tls_ldm_offset.
2030 (struct mips_elf_got_per_bfd_arg): Add global_count.
2031 (struct mips_elf_count_tls_arg): New.
2032 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2033 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2034 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2035 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2036 (TLS_RELOC_P): Define.
2037 (TP_OFFSET, DTP_OFFSET): Define.
2038 (dtprel_base, tprel_base): New functions.
2039 (mips_elf_link_hash_newfunc): Initialize tls_type.
2040 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2041 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2042 TLS entries.
2043 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2044 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2045 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2046 (mips_tls_got_index): New functions.
2047 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2048 arguments. Pass them to mips_elf_create_local_got_entry. Use
2049 mips_tls_got_index.
2050 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2051 Handle TLS entries.
2052 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2053 mips_elf_create_local_got_entry.
2054 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2055 arguments. Handle TLS entries.
2056 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2057 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2058 TLS entries.
2059 (mips_elf_record_global_got_symbol): Likewise.
2060 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2061 Count TLS entries.
2062 (mips_elf_merge_gots): Handle TLS entries when merging.
2063 (mips_elf_initialize_tls_index): New function.
2064 (mips_elf_set_global_got_offset): Handle TLS entries.
2065 (mips_elf_adjust_gp): Handle TLS.
2066 (mips_elf_multi_got): Remove redundant call to
2067 mips_elf_resolve_final_got_entries. Initialize global_count.
2068 Correct a comment. Initialize new TLS members of mips_got_info.
2069 Assign TLS GOT indexes for new GOTs.
2070 (mips_elf_create_got_section): Initialize new TLS members of
2071 mips_got_info.
2072 (mips_elf_calculate_relocation): Handle TLS relocs.
2073 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2074 functions.
2075 (_bfd_mips_elf_always_size_sections): Handle TLS.
2076 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2077 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2078 changed functions.
2079 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2080 (_bfd_mips_elf_hide_symbol): Handle TLS.
2081 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2082 (mips_reloc_map): Add TLS relocs.
2083 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2084 * elf64-mips.c (mips_elf64_howto_table_rel)
2085 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2086 * reloc.c: Define new MIPS TLS relocations.
2087 * libbfd.h, bfd-in2.h: Regenerated.
2088
bb14f524
JB
20892005-03-02 Jan Beulich <jbeulich@novell.com>
2090
2091 * Makefile.am: Add dependency of cache.o on libiberty.h.
2092 * cache.c: Include libiberty.h.
2093 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2094
8c1acd09
ZW
20952005-03-01 Zack Weinberg <zack@codesourcery.com>
2096
2097 * elf.c (bfd_section_from_shdr <default case>): Call
2098 elf_backend_section_from_shdr hook unconditionally, and return
2099 what it returns.
2100 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2101 * elfxx-target.h (elf_backend_section_from_shdr)
2102 (elf_backend_section_from_phdr): Default to
2103 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2104 respectively.
2105
70bfecec
AM
21062005-03-01 Alan Modra <amodra@bigpond.net.au>
2107
a67a7b8b
AM
2108 * targets.h: Typo fix.
2109 * bfd-in2.h: Regenerate.
2110
70bfecec
AM
2111 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2112 structs to size on-disk structures.
2113 (b_out_set_section_contents): Size the external struct, not the
2114 internal one for on-disk size.
2115 (b_out_sizeof_headers): Likewise.
2116
ceb1f1ef
AM
21172005-03-01 Alan Modra <amodra@bigpond.net.au>
2118
2119 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2120 entry points with the func descriptor as well as undefweak.
2121
f67e617a
NC
21222005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2123
2124 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2125 present when IMPORT_NAME_UNDOECRATE is used.
2126
af44c138
L
21272005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2128
2129 PR 757
2130 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2131 int.
2132
2133 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2134 to _bfd_elf_merge_symbol.
2135
2136 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2137 unsigned int to return the alignment of the old common symbol
2138 in the dynamic object.
2139 (_bfd_elf_add_default_symbol): Pass NULL to
2140 _bfd_elf_merge_symbol.
2141 (elf_link_add_object_symbols): Pass &old_alignment to
2142 _bfd_elf_merge_symbol. Get the alignment of the new common
2143 symbol in the dynamic object.
2144
10adf131
BE
21452005-02-24 Ben Elliston <bje@au.ibm.com>
2146
2147 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2148 * format.c (bfd_check_format_matches): Likewise.
2149 * archive.c (BFD_GNU960_ARMAG): Likewise.
2150 (bfd_generic_archive_p): Likewise.
2151 (_bfd_write_archive_contents): Likewise.
2152
60b779bf
L
21532005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2154
2155 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2156 * configure: Regenerate.
2157
1f02cbd9
JB
21582005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2159
2160 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2161 COMDAT group sections to have default visibility.
2162
f60ca5e3
AM
21632005-02-24 Alan Modra <amodra@bigpond.net.au>
2164
2165 * coffcode.h (coff_print_aux): Warning fix.
2166 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2167 instead of section pointer to identify.
2168 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2169 the correct size buffer for local sym mangling too.
2170 (h8300_bfd_link_add_symbols): Likewise.
2171 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2172 warning.
2173 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2174 * elf32-xtensa.c (literal_value_hash): Warning fix.
2175 * versados.c (process_otr): Warning fix.
2176 (versados_canonicalize_reloc): Likewise.
2177 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2178 * vms.c (fill_section_ptr): Warning fix.
2179
9a5d8e72
L
21802005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2181
2182 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2183 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2184
4b6c0f2f
NC
21852005-02-23 Nick Clifton <nickc@redhat.com>
2186
abc0f8d0
NC
2187 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2188 the relvaddr field of the Elf32_crinfo structure.
2189
9b69b847
NC
2190 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2191 variables that are passed by reference to
2192 m68hc11_get_relocation_value in case that function does not
2193 initialise them.
2194
90e868ac
NC
2195 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2196 return statements and replace with a single return at the end of
2197 the function. This helps pacify the flow analysis code in gcc 4.0.
2198
4b6c0f2f
NC
2199 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2200 strtab to avoid compile time warning.
2201
c3e8c140
BE
22022005-02-23 Ben Elliston <bje@au.ibm.com>
2203
2204 * opncls.c (bfd_zalloc): Document this function.
2205
ebe372c1
L
22062005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2207
2208 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2209 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2210 Replace SEC_SHARED with SEC_COFF_SHARED.
2211 (styp_to_sec_flags): Likewise.
2212
2213 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2214 (TARGET_LITTLE_SYM): Likewise.
2215
2216 * section.c (SEC_ARCH_BIT_0): Removed.
2217 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2218 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2219 (SEC_SHARED): Renamed to ...
2220 (SEC_COFF_SHARED): This.
2221 (SEC_BLOCK): Renamed to ...
2222 (SEC_TIC54X_BLOCK): This.
2223 (SEC_CLINK): Renamed to ...
2224 (SEC_TIC54X_CLINK): This.
2225 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2226 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2227 end.
2228 * bfd-in2.h: Regenerated.
2229
26bf4e33
FF
22302005-02-21 Fred Fish <fnf@specifixinc.com>
2231
2232 * dwarf2.c (find_abstract_instance_name): Call recursively
2233 to handle a DW_AT_specification.
2234
e6daada3
TS
22352005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2236
2237 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2238 mips_elf_create_dynamic_relocation,
2239 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2240 Remove #if 0'd code.
2241
d25604af
AM
22422005-02-21 Alan Modra <amodra@bigpond.net.au>
2243
2244 * Makefile.am: Run "make dep-am"
2245 * Makefile.in: Regenerate.
2246
fedf8d51
AM
22472005-02-21 Alan Modra <amodra@bigpond.net.au>
2248
2249 * coffgen.c (bfd_coff_get_comdat_section): Check that
2250 coff_section_data isn't NULL.
2251
f075ee0c
AM
22522005-02-21 Alan Modra <amodra@bigpond.net.au>
2253
2254 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2255 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2256 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2257 useless assignments.
2258 (xcoff_write_archive_contents_big): Likewise.
2259 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2260 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2261 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2262 * cofflink.c (process_embedded_commands): Warning fixes.
2263 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2264 Warning fixes.
2265 * dwarf2.c: Warning fixes.
2266 * elf-bfd.h: Likewise.
2267 * elf-eh-frame.c: Likewise.
2268 * elf-strtab.c: Likewise.
2269 * elf.c: Likewise.
2270 * elf32-m68k.c: Likewise.
2271 * elf32-ppc.c: Likewise.
2272 * elf32-sh-symbian.c: Likewise.
2273 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2274 * elf64-sh64.c: Likewise.
2275 * peicode.h: Likewise.
2276 * elf64-mmix.c: Warning fixes.
2277 * elfcode.h: Likewise.
2278 * elfxx-mips.c: Likewise.
2279 * libbfd-in.h: Likewise.
2280 * libbfd.c: Likewise.
2281 * mach-o.c: Likewise.
2282 * merge.c: Likewise.
2283 * mmo.c: Likewise.
2284 * opncls.c: Likewise.
2285 * pef.c: Likewise.
2286 * srec.c: Likewise.
2287 * vms-hdr.c: Likewise.
2288 * vms-tir.c: Likewise.
2289 * xtensa-isa.c: Likewise.
2290 * xtensa-modules.c: Likewise.
2291 * xsym.c: Likewise.
2292 (pstrcmp): Use correct choice of string lengths. Fix return value.
2293 (bfd_sym_module_name): Correct string length.
2294 * bfd-in2.h: Regenerate.
2295 * libbfd.h: Regenerate.
2296
68320ddb
AO
22972005-02-17 Alexandre Oliva <aoliva@redhat.com>
2298
2299 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 2300 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
2301 Reported by Alan Modra.
2302 (elf32_frv_relocate_section): Improve errors and warnings.
2303
1808e341
AM
23042005-02-17 Alan Modra <amodra@bigpond.net.au>
2305
2306 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2307
5ff625e9
AM
23082005-02-16 Alan Modra <amodra@bigpond.net.au>
2309
2310 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2311 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2312 * pef.c (bfd_pef_scan): Don't ignore return value of
2313 bfd_pef_scan_start_address.
7e3102a7
AM
2314 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2315 bfd_mach_o_scan_start_address.
2316 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2317 * elfxx-mips.c: Remove unnecessary prototypes.
2318 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 2319
92b7a70f
AM
23202005-02-16 Alan Modra <amodra@bigpond.net.au>
2321
2322 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2323 Skip toc reloc adjust if reloc_count is zero.
2324
d6f16593 23252005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 2326 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
2327
2328 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2329 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2330 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2331 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2332 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2333 dst_mask.
2334 (mips16_gprel_reloc): Remove bit shuffling; call
2335 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2336 and _bfd_mips16_elf_reloc_shuffle() instead.
2337 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2338 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2339 relocs.
2340 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2341 elf_mips16_howto_table_rel.
2342 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2343 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2344 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2345 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2346 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2347 dst_mask.
2348 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2349 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2350 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2351 placeholders.
2352 (mips16_gprel_reloc): Remove bit shuffling; call
2353 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2354 and _bfd_mips16_elf_reloc_shuffle() instead.
2355 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2356 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2357 relocs.
2358 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2359 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2360 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2361 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2362 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2363 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2364 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2365 dst_mask.
2366 (mips16_gprel_reloc): Remove bit shuffling; call
2367 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2368 and _bfd_mips16_elf_reloc_shuffle() instead.
2369 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2370 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2371 relocs.
2372 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2373 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2374 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2375 handle bit shuffling for MIPS16 relocs.
2376 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2377 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2378 and _bfd_mips16_elf_reloc_shuffle().
2379 (_bfd_mips_elf_generic_reloc): Likewise.
2380 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2381 and R_MIPS16_LO16.
2382 (mips_elf_obtain_contents): Remove bit shuffling.
2383 (mips_elf_perform_relocation): Likewise; call
2384 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2385 instead.
2386 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2387 and R_MIPS16_LO16.
2388 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2389 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2390 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2391 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2392 (BFD_RELOC_MIPS16_LO16): Likewise.
2393 * bfd-in2.h: Regenerate.
2394 * libbfd.h: Regenerate.
2395
0ca3e455
JB
23962005-02-15 Jan Beulich <jbeulich@novell.com>
2397
2398 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2399 R_IA64_DTPMOD64[LM]SB.
2400
c5509b92
L
24012005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2402
2403 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2404 backward branch in the same section.
2405 (elfNN_ia64_relocate_section): Inform users that the input
2406 section is too big to relax br instruction when overflow
2407 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2408 and R_IA64_PCREL21F.
2409
5cba516c
NC
24102005-02-14 Orjan Friberg <orjanf@axis.com>
2411
2412 * elfcore.h (elf_core_file_p): Move the call to
2413 elf_backend_object_p to allow the correct machine to be set before
2414 processing the program headers.
2415
b59a68e1
NC
24162005-02-14 Nick Clifton <nickc@redhat.com>
2417
2418 PR binutils/716
2419 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2420 aware flag from the input bfd to the output bfd.
2421
254f0426
MR
24222005-02-11 Maciej W. Rozycki <macro@mips.com>
2423
2424 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2425 R_MIPS_LITERAL relocations for external symbols.
2426 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2427 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2428
e91cdea7
L
24292005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2430
2431 * bfd-in2.h: Rebuilt.
2432
67687978
PB
24332005-02-11 Paul Brook <paul@codesourcery.com>
2434
2435 * elf-bfd.h (struct elf_link_hash_table): Add
2436 is_relocatable_executable.
2437 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2438 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2439 symbols in relocatable executables.
2440 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2441 relocatable executables.
2442 (_bfd_elf_link_renumber_dynsyms): Ditto.
2443 (bfd_elf_final_link): Ditto.
2444 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2445 relocations into relocatable executables.
2446 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2447 executables. Also copy absolute relocations.
2448 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2449 in relocatable executables.
2450 (allocate_dynrelocs): Copy relocations for relocatable executables.
2451 Output dynamic symbols for symbols defined in linker scripts.
2452
ca724bf2
NC
24532005-02-11 Nick Clifton <nickc@redhat.com>
2454
4b74b983
NC
2455 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2456 to avoid a compile time warning.
2457
ca724bf2
NC
2458 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2459 BFD_ASSERT.
2460
3e25964f
NC
2461 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2462 inclusion of coffcode.h so that it is actually picked up.
2463
cb7a88a4
NC
2464 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2465 case it is not used.
2466
596c83ec
NC
2467 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2468 structure and macro.
2469
6c408f53
NC
2470 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2471 array.
2472
d5b2f13b
NC
2473 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2474 to protect the declaration of this array.
2475
169a6afd
NC
2476 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2477 Avoid call to memcpy with a size of 0.
2478
2917689a
AM
24792005-02-12 Alan Modra <amodra@bigpond.net.au>
2480
2481 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2482 old-style branches to undefined dot-symbols which will be
2483 satisfied by a plt call.
2484
40d16e0b
AM
24852005-02-11 Alan Modra <amodra@bigpond.net.au>
2486
2487 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2488 (ppc64_elf_copy_indirect_symbol): ..here.
2489 (func_desc_adjust): Use move_plt_plist.
2490
e37c699c
PB
24912005-02-10 Paul Brook <paul@codesourcery.com>
2492
2493 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2494
6fa3860b
PB
24952005-02-10 Paul Brook <paul@codesourcery.com>
2496
2497 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2498 symbols local.
2499 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2500 (elf_link_renumber_local_hash_table_dynsyms): New function.
2501 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2502
d457dcf6
JJ
25032005-02-10 Jakub Jelinek <jakub@redhat.com>
2504
2505 * bfd-in.h (BFD_LINKER_CREATED): Define.
2506 * bfd-in2.h: Rebuilt.
2507 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2508 BFD_LINKER_CREATED bfds when determining input bfds without
2509 .note.GNU-stack section.
2510
7f05722e
MR
25112005-02-10 Maciej W. Rozycki <macro@mips.com>
2512
2513 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2514 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2515 relocations against external symbols unchanged.
2516
ccf5f610
PB
25172005-02-08 Paul Brook <paul@codesourcery.com>
2518
2519 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2520 sections.
2521
370a0e1b
HPN
25222005-02-08 Hans-Peter Nilsson <hp@axis.com>
2523
2524 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2525 prefix here.
2526
99277196
MR
25272005-02-07 Maciej W. Rozycki <macro@mips.com>
2528
2529 * elf64-mips.c: Fix formatting throughout.
2530
6422fbef
MR
25312005-02-07 Maciej W. Rozycki <macro@mips.com>
2532
2533 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2534
303e4c21
AO
25352005-02-07 Alexandre Oliva <aoliva@redhat.com>
2536
2537 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2538 *ABS*/*UND* sections.
2539 (elf32_frv_relocate_section): Move zero-addend-required error...
2540 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2541 missing needed TLS section.
2542
c3864421
HPN
25432005-02-07 Hans-Peter Nilsson <hp@axis.com>
2544
2545 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2546 being the last symbol.
9f400ee9
HPN
2547 (aout_link_add_symbols): Just return TRUE if a warning
2548 symbol was last.
c3864421 2549
765f2ef6
MR
25502005-02-07 Maciej W. Rozycki <macro@mips.com>
2551
2552 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2553 R_MIPS_GPREL32 relocations against external symbols.
2554 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2555 comment.
2556
1b3a8575
AM
25572005-02-07 Alan Modra <amodra@bigpond.net.au>
2558
2559 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2560 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2561 elf_string_from_elf_strtab.
2562 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2563 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2564 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2565 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2566 looking at cached symtab info first, before iterating over headers.
2567 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2568 * elfcode.h (elf_object_p): Don't load section header stringtab
2569 specially.
2570
90f487df
L
25712005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2572
2573 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2574 against protected function when building shared library.
2575
2576 PR 584
2577 * elf64-x86-64.c (is_32bit_relative_branch): New.
2578 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2579 protected function symbol when building shared library for
2580 32bit relative branch instruction.
2581
c4f68ce3
AM
25822005-02-06 Alan Modra <amodra@bigpond.net.au>
2583
2584 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2585 syms when doing a relocatable link.
2586 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2587 at u.def.section.
2588 (ppc64_elf_tls_setup): Likewise.
2589 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2590
908b32fc
AM
25912005-02-04 Alan Modra <amodra@bigpond.net.au>
2592
2593 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2594 (link_hash_newfunc): Clear all locals using memset.
2595 (make_fdh): Remove flags param. Always create fake func desc
2596 weak. Link the descriptor with the code entry sym.
2597 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2598 (add_symbol_adjust): Adjust make_fdh call.
2599 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2600 descriptor to strong undefined if code entry is strong.
2601
4ea42fb7
AM
26022005-02-04 Alan Modra <amodra@bigpond.net.au>
2603
2604 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2605 lookup here. Set to new before calling bfd_link_repair_undef_list.
2606 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2607
10d86c8a
AM
26082005-02-03 Alan Modra <amodra@bigpond.net.au>
2609
2610 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2611
11f25ea6
AM
26122005-02-03 Alan Modra <amodra@bigpond.net.au>
2613
2614 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2615 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2616 before the as-needed lib was loaded. Abort on unexpected refs.
2617
4f40114d
AM
26182005-02-02 Alan Modra <amodra@bigpond.net.au>
2619
ec13b3bb
AM
2620 * elflink.c (elf_smash_syms): Expand comments.
2621 (elf_link_add_object_symbols): Only call elf_smash_syms for
2622 as-needed dynamic objects.
2623
4f40114d
AM
2624 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2625 everything, just the field specific to ia64.
336549c1 2626 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 2627
bb700d78
AM
26282005-02-01 Alan Modra <amodra@bigpond.net.au>
2629
2630 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2631 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2632 undefined syms.
2633 (struct add_symbol_adjust_data): New.
2634 (add_symbol_adjust): Make an undefweak func desc for old ABI
2635 objects to link with --as-needed shared libs. Return fail status.
2636 Don't adjust old ABI func entry sym to weak if func desc syms
2637 isn't defined.
2638 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2639 and return status.
2640
1ffd1c2f
HPN
26412005-02-01 Hans-Peter Nilsson <hp@axis.com>
2642
2643 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2644 for clarity.
2645
77cfaee6
AM
26462005-02-01 Alan Modra <amodra@bigpond.net.au>
2647
2648 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2649 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2650 remove anything but new and undefweak.
2651 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2652 existing _DYNAMIC.
2653 (_bfd_elf_create_dynamic_sections): Formatting.
2654 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2655 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2656 (struct elf_smash_data): New.
2657 (elf_smash_syms): New function.
2658 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2659 unneeded dynamic objects to loaded list.
2660 (elf_link_output_extsym): Don't handle as-needed here. Strip
2661 bfd_link_hash_new symbols.
2662 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2663 delref when dynindx is already -1.
2664 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2665 symbols.
2666 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2667
b15c48d1
BE
26682005-02-01 Ben Elliston <bje@au.ibm.com>
2669
2670 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2671
0983f4eb 26722005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
2673
2674 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2675 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2676 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2677 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2678 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2679 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2680 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2681 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2682 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2683 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2684 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 2685 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
2686 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2687 throughout. Similarly, collapse #if 1'd code.
2688
26892005-02-01 Ben Elliston <bje@au.ibm.com>
2690
0983f4eb
BE
2691 * elf-bfd.h (bfd_elf_discard_group): Remove.
2692 * elf.c (bfd_elf_discard_group): Likewise.
2693 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2694
8c946ed5
RS
26952005-01-31 Richard Sandiford <rsandifo@redhat.com>
2696
2697 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2698 (_bfd_elf_eh_frame_address_size): Declare.
2699 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2700 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2701 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2702 (elf_backend_eh_frame_address_size): Define.
2703 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2704 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2705 size from the new backend hook.
2706 (_bfd_elf_write_section_eh_frame): Likewise.
2707 (_bfd_elf_eh_frame_address_size): New function.
2708
c46f8c51
AC
27092005-01-31 Andrew Cagney <cagney@gnu.org>
2710
2711 * configure: Regenerate to track ../gettext.m4.
2712
5cd3778d
MM
27132005-01-31 Mark Mitchell <mark@codesourcery.com>
2714
2715 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2716 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 2717
d6486796
NC
27182005-01-31 Nick Clifton <nickc@redhat.com>
2719
2720 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2721 sparc-lynxos, vax-vms) be obsolete.
2722
b1342370
DJ
27232005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2724
2725 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2726 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2727 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2728 * elfcode.h (elf_object_p): Use minpagesize instead of
2729 maxpagesize.
2730 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2731 (elfNN_bed): Include ELF_MINPAGESIZE.
2732
319850b4
JB
27332005-01-28 Julian Brown <julian@codesourcery.com>
2734
2735 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2736 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2737 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2738 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 2739 passing flag value from ld. Set flag value in global hash table entry.
319850b4 2740 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 2741 relocation.
319850b4 2742
a53bf506
AC
27432005-01-27 Andrew Cagney <cagney@gnu.org>
2744
2745 * configure: Regenerate to track ../gettext.m4 change.
2746
dc4c9c19
MM
27472005-01-25 Mark Mitchell <mark@codesourcery.com>
2748
2749 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 2750 SymbianOS.
dc4c9c19 2751
90219bd0
AO
27522005-01-25 Alexandre Oliva <aoliva@redhat.com>
2753
2754 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2755 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2756 for TLSMOFF.
2757 * reloc.c: Add R_FRV_TLSMOFF.
2758 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2759 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2760 (elf32_frv_relocate_section): Handle it.
2761 (elf32_frv_check_relocs): Likewise.
2762 * libbfd.h, bfd-in2.h: Rebuilt.
2763 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2764 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2765 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2766 such that they return the constant in gr9.
2767 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2768 symbols.
2769 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2770 too, such that they shrink on relaxation.
2771 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2772 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2773 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2774 if we can guarantee the use of 16-bit constants.
2775 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2776 Introduce TLS support for FR-V FDPIC.
2777 * reloc.c: Add TLS relocations.
2778 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2779 (elf32_frv_rel_tlsdesc_value_howto): New.
2780 (elf32_frv_rel_tlsoff_howto): New.
2781 (frv_reloc_map): Add new mappings.
2782 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2783 reloc information.
2784 (frvfdpic_dynamic_got_plt_info): New.
2785 (frvfdpic_plt_tls_ret_offset): New.
2786 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2787 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2788 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2789 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2790 section as local.
2791 (struct frvfdpic_relocs_info): Add TLS fields.
2792 (frvfdpic_relocs_info_hash): Warning clean up.
2793 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2794 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2795 (FRVFDPIC_TLS_BIAS): Define.
2796 (tls_biased_base): New.
2797 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2798 relocations.
2799 (frv_reloc_type_lookup): Likewise.
2800 (frvfdpic_info_to_howto_rel): Likewise.
2801 (elf32_frv_relocate_section): Likewise.
2802 (_frv_create_got_section): Create the PLT section here.
2803 (elf32_frvfdpic_create_dynamic_sections): Not here.
2804 (_frvfdpic_count_nontls_entries): Move out of...
2805 (_frvfdpic_count_got_plt_entries): ... here.
2806 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2807 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2808 support.
2809 (_frvfdpic_relax_tls_entries): New.
2810 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2811 (_frvfdpic_get_tlsdesc_entry): New.
2812 (_frvfdpic_assign_got_entries): Add TLS support.
2813 (_frvfdpic_assign_plt_entries): Likewise.
2814 (_frvfdpic_reset_got_plt_entries): New.
2815 (_frvfdpic_size_got_plt): Move out of...
2816 (elf32_frvfdpic_size_dynamic_sections): ... here.
2817 (_frvfdpic_relax_got_plt_entries): New.
2818 (elf32_frvfdpic_relax_section): New.
2819 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2820 (elf32_frv_check_relocs): Add TLS support.
2821 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2822 * libbfd.h, bfd-in2.h: Rebuilt.
2823
8615f3f2
AM
28242005-01-25 Alan Modra <amodra@bigpond.net.au>
2825
2826 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2827 loadable reloc sections.
2828 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2829 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2830
7e9f0867
AM
28312005-01-25 Alan Modra <amodra@bigpond.net.au>
2832
2833 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2834 sections immediately when linking shared libs. Instead, wait until
2835 we know a lib is needed.
2836 (_bfd_elf_link_create_dynstrtab): Extract from..
2837 (_bfd_elf_link_create_dynamic_sections_): ..here.
2838 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2839 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2840 for non-existent .dynamic.
2841 (elf_link_output_extsym): Don't complain about undefined symbols
2842 in as-needed dynamic libs that aren't actually linked.
2843
45181ed1
AC
28442005-01-24 Andrew Cagney <cagney@gnu.org>
2845
2846 * configure: Regenerate, ../gettext.m4 was updated.
2847
753e3eb6
BE
28482005-01-21 Ben Elliston <bje@au.ibm.com>
2849
2850 * aout-encap.c: Remove unused file.
2851
1c16dfa5
L
28522005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2853
2854 PR 679
2855 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2856 non-function symbols are local.
2857 (_bfd_elf_symbol_refs_local_p): Likewise.
2858
1449d79b
AM
28592005-01-18 Alan Modra <amodra@bigpond.net.au>
2860
2861 * bfd.c (bfd_link_just_syms): Add abfd param.
2862 * bfd-in2.h: Regenerate.
2863
dcf507a6
RS
28642005-01-17 Richard Sandiford <rsandifo@redhat.com>
2865
2866 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2867 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2868 instructions. If the amount of padding is known, reduce the size
2869 of the CIE or FDE by that amount.
2870
2c42be65
RS
28712005-01-17 Richard Sandiford <rsandifo@redhat.com>
2872
2873 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2874 augmentation_size. Use bfd_signed_vmas for data_align.
2875 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2876 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2877 functions. Don't read past the end of the enclosing CIE or FDE.
2878 (skip_bytes): New utility function.
2879 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2880 sanity checking.
2881 (_bfd_elf_write_section_eh_frame): Use new functions.
2882
acfe5567
RS
28832005-01-17 Richard Sandiford <rsandifo@redhat.com>
2884
2885 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2886 assert-style REQUIRE() macro to handle sanity checks.
2887
c0c28ab8
L
28882005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2889
2890 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2891 (comp_unit): Here.
2892 (read_unsigned_leb128): Removed.
2893 (read_signed_leb128): Removed.
2894 (find_abstract_instance_name): Updated.
2895 (parse_comp_unit): Accept info_ptr_unit.
2896 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2897 comp unit and pass it to parse_comp_unit.
2898
2899 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2900 (read_signed_leb128): Moved to ...
2901 * libbfd.c: Here.
2902
2903 * libbfd-in.h (read_unsigned_leb128): New prototype.
2904 (read_signed_leb128): Likewise.
2905 * libbfd.h: Regenerated.
2906
e38bc3b5
NC
29072005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2908 Nick Clifton <nickc@redhat.com>
2909
2910 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2911 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2912 arch_sh4a_nofpu_up in order to match the external names and make the
2913 testsuite's job easier.
2914 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2915 names.
2916 * bfd-in2.h: Regenerate.
2917
8fb84ecc
AC
29182005-01-15 Andrew Cagney <cagney@gnu.org>
2919
2920 * bfd.m4: New file.
2921 * acinclude.m4: Move BFD_NEED_DECLARATION,
2922 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2923 the new file bfd.m4. Include ../bfd/bfd.m4.
2924 * configure: Re-generate.
8615f3f2 2925
b4a38de6
AM
29262005-01-12 Alan Modra <amodra@bigpond.net.au>
2927
2928 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2929 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2930 reaching PLT.
2931 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2932 R_PPC_RELAX32PC_PLT.
2933
3eb128b2
AM
29342005-01-11 Alan Modra <amodra@bigpond.net.au>
2935
2936 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2937 symbols.
2938 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2939 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2940 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2941 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2942 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2943 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2944 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2945 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2946 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2947 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2948 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2949 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2950 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2951 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2952
264a1fe0
AM
29532005-01-11 Alan Modra <amodra@bigpond.net.au>
2954
2955 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2956 .dynsbss flags.
2957
5c4504f7
NC
29582005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2959
2960 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2961 * bfd-in2.h: Regenerate.
2962 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2963 to support these new machine values.
2964 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2965 the maxq10.
2966 (bfd_maxq_arch): Update values for the maxq20.
2967
669460c7
EB
29682005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2969
2970 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2971 non-shared object, do not reserve space in .plt and .rela.plt for
2972 regular symbols neither defined nor referenced in shared objects.
2973
a51a7930
EB
29742005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2975
01aac484
EB
2976 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2977 to zero the structure.
2978 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
2979 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2980 'srelgot' fields.
2981 (create_got_section): New function.
2982 (sparc64_elf_create_dynamic_sections): Likewise.
2983 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2984 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2985 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2986 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2987 (sparc64_elf_finish_dynamic_symbol): Likewise.
2988 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2989 (elf_backend_create_dynamic_sections): Define to
2990 sparc64_elf_create_dynamic_sections.
2991
151e5294
EB
29922005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2993
2994 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2995 (elf_backend_omit_section_dynsym): Define to it.
2996 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2997 (elf_backend_omit_section_dynsym): Define to it.
2998
6f79b219
JJ
29992005-01-07 Jakub Jelinek <jakub@redhat.com>
3000
3001 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3002 PT_DYNAMIC segment, unless .dynamic.
3003
4e7fd91e
PB
30042005-01-06 Paul Brook <paul@codesourcery.com>
3005
3006 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3007 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3008 * configure: Regenerate.
3009 * elf32-arm.c: Add VxWorks target bfd.
3010 (USE_REL): Remove.
3011 (elf32_arm_link_hash_table): Add use_rel.
3012 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3013 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3014 Correct offset calculation for RELA case.
3015 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3016 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3017 (elf32_arm_vxworks_link_hash_table_create): New function.
3018 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3019 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3020 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3021
4c52953f
AM
30222005-01-06 Alan Modra <amodra@bigpond.net.au>
3023
3024 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3025 multi_toc_needed.
3026 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3027 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3028 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3029 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3030 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3031 (toc_adjusting_stub_needed): Rewrite.
3032 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3033 toc tests. Adjust for toc_adjusting_stub_needed changes.
3034 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3035 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3036 * section.c: Expand comment on backend bits.
3037 * bfd-in2.h: Regenerate.
3038 * libbfd.h: Regenerate.
3039
f03d65b4
AM
30402005-01-06 Alan Modra <amodra@bigpond.net.au>
3041
3042 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3043 toc adjusting stub, do not test source section flags.
3044
8af139b3
EB
30452005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3046
3047 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3048 from STABS debugging sections again.
3049
06f22d7e
FF
30502005-01-05 Fred Fish <fnf@specifixinc.com>
3051
3052 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3053 (find_abstract_instance_name): New function.
3054 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3055 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3056 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3057
83a358aa
PB
30582004-12-31 Paul Brook <paul@copdesourcery.com>
3059
3060 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3061
b996922c
AM
30622004-12-31 Alan Modra <amodra@bigpond.net.au>
3063
3064 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3065 Commit missing changes from 2004-12-22.
3066 * bfd-in2.h: Regenerate.
3067
17a83432
TL
30682004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3069
3070 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3071
d69f560c
KW
30722004-12-21 Kris Warkentin <kewarken@qnx.com>
3073
3074 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3075 Add 'base' argument for constructing register sections. Reformat.
3076 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3077 gp and fp regs. Reformat.
4c52953f 3078
750bce0e
NC
30792004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3080
3081 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3082 * bfd-in2.h: Regenerate.
3083 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3084 (avr_reloc_map): Likewise.
3085 (avr_final_link_relocate): Likewise.
3086
a5db907e
AM
30872004-12-22 Alan Modra <amodra@bigpond.net.au>
3088
3089 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3090 as-needed dynamic libs as undefined.
3091 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3092 libs when finding they are needed.
3093
8860955f
AM
30942004-12-20 Alan Modra <amodra@bigpond.net.au>
3095
3096 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3097 (opd_entry_value): Use opd_relocs if available.
3098 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3099 copy .opd relocations to opd_relocs.
3100 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3101
1e50d24d
RS
31022004-12-16 Richard Sandiford <rsandifo@redhat.com>
3103
3104 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3105 * elf32-v850.c (v850_elf_howto_table): Add entry for
3106 R_V850_LO16_SPLIT_OFFSET.
3107 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3108 (v850_elf_perform_lo16_relocation): New function, extracted from...
3109 (v850_elf_perform_relocation): ...here. Use it to handle
3110 R_V850_LO16_SPLIT_OFFSET.
3111 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3112 R_V850_LO16_SPLIT_OFFSET.
3113 * libbfd.h, bfd-in2.h: Regenerate.
3114
2fbd2a87
NC
31152004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3116
3117 * config.bfd: Add s390x-ibm-tpf support.
3118
06302770
TL
31192004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3120
8860955f 3121 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
3122 to prototype, to make hash info available.
3123 Prevent wrapped symbols from being adjusted twice.
3124
c314987d
RS
31252004-12-14 Richard Sandiford <rsandifo@redhat.com>
3126
3127 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3128 overflow for calls to undefined weak symbols.
3129
5c799c07
AM
31302004-12-11 Alan Modra <amodra@bigpond.net.au>
3131
3132 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3133 canonical sections syms have a name.
3134
645ea6a9
AM
31352004-12-11 Alan Modra <amodra@bigpond.net.au>
3136
3137 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3138 have been adjusted for output.
3139 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3140
0e2cfdce
AM
31412004-12-10 Alan Modra <amodra@bigpond.net.au>
3142
be8dd2ca
AM
3143 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3144 add symtab_hdr param.
0e2cfdce
AM
3145 (group_signature): Update calls.
3146 * elf-bfd.h (bfd_elf_sym_name): Update.
3147 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
3148 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3149 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
3150 * elflink.c (elf_link_input_bfd): Update.
3151
138f35cc
JJ
31522004-12-10 Jakub Jelinek <jakub@redhat.com>
3153
3154 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3155 st_shndx on STT_SECTION sections.
3156
f9cfae62
DJ
31572004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3158
3159 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3160 ELF section symbols.
3161
0d2e43ed
ILT
31622004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3163
1367d393
ILT
3164 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3165 return a real value, unless it is a PLT symbol.
3166 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3167 bal if possible.
3168
74f79d8d
ILT
3169 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3170 R_MIPS_JALR entry to 0.
3171
0d2e43ed
ILT
3172 * archures.c: Define bfd_mach_mips9000.
3173 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3174 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3175 * cpu-mips.c (I_mips9000): Define.
3176 (arch_info_struct): Add case for bfd_mach_mips9000.
3177 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3178 * bfd-in2.h: Regenerate.
3179
728b2f21
ILT
31802004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3181
3182 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3183 overflow.
3184
45ab555d
BE
31852004-12-07 Ben Elliston <bje@gnu.org>
3186
3187 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3188
1511ddaf
DJ
31892004-12-06 Daniel Jacobowitz <dan@debian.org>
3190
3191 Suggested by Fergal Daly <fergal@esatclear.ie>:
3192 * simple.c (simple_dummy_multiple_definition): New function.
3193 (bfd_simple_get_relocated_section_contents): Use it.
3194
31952004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
3196
3197 * elf.c (elf_find_function): Don't use the last file symbol ever,
3198 seen, but the last one seen prior to the symbol being reported.
3199 Don't report a filename at all for global symbols when that might
3200 be ambiguous/wrong.
3201
94a3258f
PB
32022004-12-01 Paul Brook <paul@codesourcery.com>
3203
3204 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3205 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3206 version.
3207
529fcb95
PB
32082004-12-01 Paul Brook <paul@codesourcery.com>
3209
3210 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3211 sections undefined.
3212
dea514f5
PB
32132004-11-30 Paul Brook <paul@codesourcery.com>
3214
3215 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3216 no_pipeline_knowledge
3217 (elf32_arm_link_hash_table_create): Ditto.
3218 (bfd_elf32_arm_process_before_allocation): Ditto.
3219 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3220 handling.
3221 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3222 prototype.
3223 * bfd-in2.h: Regenerate.
3224
edfc032f
AM
32252004-11-30 Randolph Chung <tausq@debian.org>
3226
3227 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3228 (elf32_hppa_grok_psinfo): New function.
3229 (elf_backend_grok_prstatus): Define.
3230 (elf_backend_grok_psinfo): Define.
3231
0be9069d
L
32322004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3233
3234 PR 574:
3235 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3236
47cc2cf5
PB
32372004-11-24 Paul Brook <paul@codesourcery.com>
3238
3239 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3240
0beaef2b
PB
32412004-11-24 Paul Brook <paul@codesourcery.com>
3242
3243 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3244 (elf32_arm_swap_symbol_out): New function.
3245 (elf32_arm_size_info): Add.
3246 (elf_backend_size_info): Define.
3247
3dd2fcf0
DA
32482004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3249
3250 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3251 make_bfd_asection.
3252
de52dba4
AM
32532004-11-19 Alan Modra <amodra@bigpond.net.au>
3254
3255 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3256 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3257 * nlmcode.h (nlm_write_object_contents): Warning fix.
3258
288f74fa
BW
32592004-11-18 Bob Wilson <bob.wilson@acm.org>
3260
3261 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3262
b7693d02
DJ
32632004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3264
3265 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3266 (elf32_arm_plt_thumb_stub): New.
3267 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3268 and plt_got_offset.
3269 (elf32_arm_link_hash_traverse): Fix typo.
3270 (elf32_arm_link_hash_table): Add obfd.
3271 (elf32_arm_link_hash_newfunc): Initialize new fields.
3272 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3273 (elf32_arm_link_hash_table_create): Initialize obfd.
3274 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3275 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3276 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3277 interworking BFD is not dynamic.
3278 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3279 not emit glue for PLT references.
3280 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3281 emit glue for PLT references. Support the Thumb PLT prefix.
3282 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3283 plt_thumb_refcount.
3284 (elf32_arm_check_relocs): Likewise.
3285 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3286 plt_thumb_refcount.
3287 (allocate_dynrelocs): Handle Thumb PLT references.
3288 (elf32_arm_finish_dynamic_symbol): Likewise.
3289 (elf32_arm_symbol_processing): New function.
3290 (elf_backend_symbol_processing): Define.
3291
353057a5
RS
32922004-11-16 Richard Sandiford <rsandifo@redhat.com>
3293
3294 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3295 add_fde_encoding. Remove need_relative.
3296 * elf-eh-frame.c (extra_augmentation_string_bytes)
3297 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3298 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3299 in cases where the CIE has no existing 'R' augmentation. Use
3300 size_of_output_cie_fde when assigning offsets. Use the final offset
3301 as the new section size.
3302 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3303 Account for any extra augmentation bytes in the returned offset.
3304 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3305 moved before being modified. Pad growing entries with DW_CFA_nops.
3306 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3307 and add_fde_encoding.
3308
b32d3aa2
MM
33092004-11-15 Mark Mitchell <mark@codesourcery.com>
3310
3311 * elf32-arm.c (elf32_arm_relocate_section): Use
3312 arm_real_reloc_type.
3313
5d41f0b6
RS
33142004-11-16 Richard Sandiford <rsandifo@redhat.com>
3315
3316 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3317 for discard relocations; don't add an R_MIPS_NONE to the main body
3318 of .rel.dyn.
3319
fc0e6df6
PB
33202004-11-04 Paul Brook <paul@codesourcery.com>
3321
3322 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3323 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3324 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3325 default version definition for unversioned symbols.
3326 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3327 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3328 _bfd_elf_slurp_version_tables. Set default version for unversioned
3329 imported symbols.
3330
b23e50e2
PB
33312004-11-15 Paul Brook <paul@codesourcery.com>
3332
3333 * elflink.c (elf_link_add_object_symbols): Don't assume version
3334 indices are consecutive.
3335
f4a6705c
RS
33362004-11-14 Richard Sandiford <rsandifo@redhat.com>
3337
3338 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3339 composite relocations against the personality data.
3340
ee06dc07
PB
33412004-11-13 Paul Brook <paul@codesourcery.com>
3342
3343 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3344 R_ARM_PREL31 relocations to PLT entries.
3345 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3346 (elf32_arm_check_relocs): Ditto.
3347
a1ace8d8
BW
33482004-11-12 Bob Wilson <bob.wilson@acm.org>
3349
3350 * xtensa-isa.c (xtensa_interface_class_id): New.
3351
e4115460
BW
33522004-11-11 Bob Wilson <bob.wilson@acm.org>
3353
3354 * elf32-xtensa.c (property_table_compare): Remove assertion about
3355 entries with the same address and non-zero size.
3356 (xtensa_read_table_entries): Report such entries as errors.
3357
6366ff1e
MM
33582004-11-11 Mark Mitchell <mark@codesourcery.com>
3359
3360 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3361 R_ARM_RELATIVE on Symbian OS.
3362
b34af79c
MM
33632004-11-09 Mark Mitchell <mark@codesourcery.com>
3364
e6dc21b6
MM
3365 * som.c (som_bfd_print_private_bfd_data): New function.
3366 (som_object_setup): Save the auxiliary header. Don't assume that
3367 zero is an invalid entry point for a shared library.
3368 (som_object_p): Allocate the auxiliary header on the heap.
3369
b34af79c
MM
3370 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3371 declaration.
3372 (elf32_arm_symbian_modify_segment_map): Likewise.
3373
08d1f311
DJ
33742004-11-09 Daniel Jacobowitz <dan@debian.org>
3375
3376 From David Poole <daveml@mbuf.com>:
3377 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3378 (elf32_arm_size_dynamic_sections): Call it.
3379
0306b3bf
AM
33802004-11-09 Alan Modra <amodra@bigpond.net.au>
3381
3382 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3383 (ALL_MACHINES_CFILES): Fix typo.
3384 * Makefile.in: Regenerate.
3385 * po/SRC-POTFILES.in: Regenerate.
3386
a16385dc
MM
33872004-11-08 Mark Mitchell <mark@codesourcery.com>
3388
3389 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3390 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3391 symbol in the relocation.
3392
0306b3bf
AM
33932004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3394 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
3395
3396 * coff-maxq.c: New File.
0306b3bf
AM
3397 * cpu-maxq.c: New File.
3398 * coffcode.h: Likewise.
3399 * config.bfd: Likewise.
3400 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
3401 * Makefile.am: Add support for maxq target.
3402 * configure.in: Likewise.
0306b3bf
AM
3403 * archures.c:. Likewise.
3404 * targets.c: Likewise.
3405 * bfd_in2.h : Regenerated.
7499d566
NC
3406 * Makefile.in: Regenerated.
3407 * configure: Regenerated.
3408 * doc/Makefile.in: Regenerated.
3409
977cdf5a
NC
34102004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3411
3412 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3413 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3414 C_NT_WEAK aux entries.
3415 (_bfd_coff_generic_relocate_section): Handle undefined
3416 aliases.
3417
9dfe8738
AS
34182004-11-07 Andreas Schwab <schwab@suse.de>
3419
3420 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3421 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3422 non-default visibility.
3423
c3c76620
MM
34242004-11-01 Mark Mitchell <mark@codesourcery.com>
3425
3426 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 3427 D_PAGED.
c3c76620
MM
3428 (elf32_arm_symbian_modify_segment_map): Don't
3429 reset includes_filehdr and includes_phdrs here.
3430
7f266840
DJ
34312004-11-04 Daniel Jacobowitz <dan@debian.org>
3432
3433 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3434 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3435 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3436 dependency.
3437 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3438 to a new removed list. Remove normal configuration stanzas.
3439 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3440 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3441 elfarm-nabi.lo with elf32-arm.lo.
3442 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3443 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3444 * elf32-arm.h: Remove.
3445 * elfarm-oabi.c: Remove.
3446 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3447 and bfd_elf32_littlearm_oabi_vec.
3448 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3449
bac23f82
HPN
34502004-11-04 Hans-Peter Nilsson <hp@axis.com>
3451
3452 * config.bfd: Support crisv32-*-* like cris-*-*.
3453 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3454 (bfd_mach_cris_v10_v32): New macros.
3455 * cpu-cris.c: Tweak formatting.
3456 (get_compatible): New function.
3457 (N): New macro.
3458 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3459 bfd_arch_info_type:s.
3460 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3461 get_compatible for member compatible and link bfd_cris_arch_v32 as
3462 next.
3463 * elf32-cris.c (cris_elf_pcrel_reloc)
3464 (cris_elf_set_mach_from_flags): New functions.
3465 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3466 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3467 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3468 numbers for bfd_mach_cris_v32.
3469 (PLT_ENTRY_SIZE_V32): New macro.
3470 (elf_cris_plt0_entry): Drop last comma in initializer.
3471 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3472 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3473 PLT initializers.
3474 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3475 "%B, section %A".
3476 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3477 (elf_cris_finish_dynamic_sections): Similar.
3478 (elf_cris_adjust_dynamic_symbol): Similar.
3479 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3480 section %A".
3481 <switch with PIC relocs>: Emit error and return FALSE for
3482 bfd_mach_cris_v10_v32.
3483 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3484 Emit warning when generating textrel reloc.
3485 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3486 (cris_elf_final_write_processing): Set flags according to mach.
3487 (cris_elf_print_private_bfd_data): Display
3488 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3489 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3490 new_flags. Don't call cris_elf_final_write_processing. Don't
3491 look at the actual elf header flags at all; use
3492 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3493 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3494 objects.
3495 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3496 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3497 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3498 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3499 * bfd-in2.h, libbfd.h: Regenerate.
3500
c5614fa4
AM
35012004-11-04 Alan Modra <amodra@bigpond.net.au>
3502
3503 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3504 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3505 comment.
3506 (struct adjust_toc_info): New.
3507 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3508
0ebdbb83
BW
35092004-11-03 Bob Wilson <bob.wilson@acm.org>
3510
3511 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3512 if there are no segments.
3513
675b2ace
DJ
35142004-11-02 Daniel Jacobowitz <dan@debian.org>
3515
3516 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3517
58852c27
NC
35182004-11-02 Nick Clifton <nickc@redhat.com>
3519
3520 * elf32-iq2000.c: Convert to ISO C90 formatting.
3521
e6857c0c
HPN
35222004-11-02 Hans-Peter Nilsson <hp@axis.com>
3523
20288ed6 3524 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 3525
bf718458
L
35262004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3527
3528 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3529 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3530 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3531
044ad7e3
KK
35322004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3533
3534 * elf32-sh.c (tpoff): Take alignment into account.
3535
d5cb4bb8
NC
35362004-10-28 Nick Clifton <nickc@redhat.com>
3537
3538 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 3539 performing a relocatable link.
d5cb4bb8
NC
3540 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3541 for MIPS ports under Irix.
3542
5b5bb741
PB
35432004-10-27 Richard Earnshaw <rearnsha@arm.com>
3544
3545 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3546 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3547 (elf32_arm_final_link_relocate): Ditto.
3548 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3549 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3550 (elf32_arm_adjust_dynamic_symbol): Ditto.
3551 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3552 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3553 (elf32_arm_r_howto): ... To here.
3554 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3555
97ecf322
L
35562004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3557
3558 PR 475
3559 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3560 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3561 and R_IA64_SECREL64LSB.
3562
3e3b46e5
PB
35632004-10-26 Paul Brook <paul@codesourcery.com>
3564
3565 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3566 (bfd_elf_size_dynamic_sections): Create default version definition.
3567 (elf_link_output_extsym): Adjust for default symbol version.
3568
aa69fe43
HPN
35692004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3570
278b4623
HPN
3571 * mmo.c: Adjust to ISO C.
3572
aa69fe43
HPN
3573 * mmo.c (mmo_write_section_description): New function broken out
3574 of mmo_internal_write_section.
3575 (mmo_internal_write_section): For each of .text and .data, call
3576 mmo_write_section_description before outputting contents if it has
3577 nontrivially deducible vma or contents.
3578 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3579 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3580 symbols if found within the .data address range.
3581
ed040321
DJ
35822004-10-24 Daniel Jacobowitz <dan@debian.org>
3583
3584 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3585
830866af
HPN
35862004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3587
3588 * mmo.c (File Layout): Correct place of misplaced blurb about
3589 special data.
3590
5f417ca3
MK
35912004-10-22 Mark Kettenis <kettenis@gnu.org>
3592
3593 * config.bfd: Add mips64*-*-openbsd.
3594
823fc61f
BW
35952004-10-21 Bob Wilson <bob.wilson@acm.org>
3596
3597 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3598 statements.
3599
8697aafb
L
36002004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3601
3602 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3603 * configure: Regenerate.
3604
dfeffb9f
L
36052004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3606
3607 PR 463
3608 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3609 to linker reloc_overflow callback.
3610 (aout_link_input_section_ext): Likewise.
3611 (aout_link_reloc_link_order): Likewise.
3612 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3613 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3614 Likewise.
3615 (alpha_relocate_section): Likewise.
3616 * coff-arm.c (coff_arm_relocate_section): Likewise.
3617 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3618 * coff-h8500.c (extra_case): Likewise.
3619 * coff-i960.c (coff_i960_relocate_section): Likewise.
3620 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3621 * coff-mips.c (mips_relocate_section): Likewise.
3622 * coff-or32.c (coff_or32_relocate_section): Likewise.
3623 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3624 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3625 * coff-sh.c (sh_relocate_section): Likewise.
3626 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3627 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3628 * coff-z8k.c (extra_case): Likewise.
3629 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3630 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3631 (_bfd_coff_generic_relocate_section): Likewise.
3632 * ecoff.c (ecoff_reloc_link_order): Likewise.
3633 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3634 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3635 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3636 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3637 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3638 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3639 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3640 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3641 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3642 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3643 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3644 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3645 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3646 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3647 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3648 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3649 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3650 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3651 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3652 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3653 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3654 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3655 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3656 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3657 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3658 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3659 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3660 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3661 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3662 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3663 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3664 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3665 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3666 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3667 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3668 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3669 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3670 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3671 * elflink.c (elf_reloc_link_order): Likewise.
3672 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3673 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3674 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3675 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3676 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3677 (aout_link_reloc_link_order): Likewise.
3678 * reloc.c (bfd_generic_get_relocated_section_contents):
3679 Likewise.
3680 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3681 * simple.c (simple_dummy_reloc_overflow): Updated.
3682
1715e0e3
AS
36832004-10-20 Andreas Schwab <schwab@suse.de>
3684
3685 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3686 (elf_backend_plt_sym_val): Define.
3687
db3d41a8
DS
36882004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3689
3690 * config.bfd: Set targ_underscore=yes for PE COFF targets
3691
4b85d634
AM
36922004-10-19 Alan Modra <amodra@bigpond.net.au>
3693
3694 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3695 (ppc64_elf_edit_opd): Likewise.
3696
6df4d94c
MM
36972004-10-18 Mark Mitchell <mark@codesourcery.com>
3698
3699 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3700 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3701 set SEC_ALLOC and SEC_LOAD.
3702
00d962d1
NC
37032004-10-18 Nick Clifton <nickc@redhat.com>
3704
3705 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3706 'name' for relocs against both local and global symbols.
3707
b58f81ae
DJ
37082004-10-16 Daniel Jacobowitz <dan@debian.org>
3709
3710 * bfd-in2.h: Regenerate.
3711 * bfd.c (struct bfd): Add no_export.
3712 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3713
7d3f158f
AM
37142004-10-15 Alan Modra <amodra@bigpond.net.au>
3715
3716 * config.bfd: Whitespace cleanup.
3717 * Makefile.am: Run "make dep-am"
3718 * Makefile.in: Regenerate.
3719
6d2cd210
JJ
37202004-10-15 Jakub Jelinek <jakub@redhat.com>
3721
3722 * elflink.c (struct already_linked_section): Removed.
3723 (try_match_symbols_in_sections, already_linked): Removed.
3724 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3725 prefix of section names when finding already_linked_table
3726 chain. Compare section names. Instead of calling already_linked,
3727 do it inline and only for sections in the same already_linked_list.
3728
92e4ec35
AM
37292004-10-15 Alan Modra <amodra@bigpond.net.au>
3730
3731 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3732 parameter. If called after _bfd_elf_write_section_eh_frame,
3733 don't allow a -2 return unless need_* bit is already set, and
3734 handle offsets adjusted for output_offset.
3735 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3736 * elf.c (_bfd_elf_section_offset): Update call.
3737
7bf6dede
L
37382004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3739
3740 PR 440
3741 * coffcode.h (coff_compute_section_file_positions): Cast to
3742 bfd_vma when computing page alignment.
3743
c0042f5d
MM
37442004-10-13 Mark Mitchell <mark@codesourcery.com>
3745
3746 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3747 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3748
2a1b9a48
MM
37492004-10-12 Mark Mitchell <mark@codesourcery.com>
3750
3751 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3752 relocations use a virtual address, not a section offset.
3753
b08b5071
BW
37542004-10-12 Bob Wilson <bob.wilson@acm.org>
3755
3756 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3757 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3758 xtensa_format_encode.
3759 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3760 (ebb_add_proposed_action): Delete.
3761
7fa3d080
BW
37622004-10-12 Bob Wilson <bob.wilson@acm.org>
3763
3764 * elf32-xtensa.c: Use ISO C90 formatting.
3765
3656d5e3
PB
37662004-10-12 Paul Brook <paul@codesourcery.com>
3767
3768 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3769 message.
3770
8cb51566
PB
37712004-10-12 Paul Brook <paul@codesourcery.com>
3772
3773 * elf32-arm.h: Support EABI version 4 objects.
3774
1abc8597
AM
37752004-10-12 Alan Modra <amodra@bigpond.net.au>
3776
3777 PR 325
3778 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3779 Don't mark as default.
3780 (bfd_x86_64_arch): Don't mark as default.
3781
9e66c942
AM
37822004-10-12 Alan Modra <amodra@bigpond.net.au>
3783
3784 * elflink.c (enum action_discarded): New.
3785 (elf_section_complain_discarded): Delete.
3786 (elf_action_discarded): New function subsuming the above and also
3787 controlling reloc behaviour.
1abc8597 3788 (elf_link_input_bfd): Use it.
9e66c942 3789
7f1204bb
JJ
37902004-10-11 Jakub Jelinek <jakub@redhat.com>
3791
3792 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3793 (special_sections): Add .gnu.liblist and .gnu.conflict.
3794 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3795
87e5235d
AM
37962004-10-11 Alan Modra <amodra@bigpond.net.au>
3797
3798 PR 233
3799 * elflink.c (elf_link_input_bfd): Try harder to support
3800 relocations against symbols in removed linkonce sections.
3801
2ad770c3
AM
38022004-10-11 Alan Modra <amodra@bigpond.net.au>
3803
029446c4
AM
3804 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3805
2ad770c3
AM
3806 PR 354
3807 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3808 sections do not reference symbols in non-SEC_ALLOC sections.
3809
1da212d6
AM
38102004-10-11 Alan Modra <amodra@bigpond.net.au>
3811
3812 PR 437
3813 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3814 (_bfd_elf_link_omit_section_dynsym): Formatting.
3815
f12123c0
AM
38162004-10-10 Alan Modra <amodra@bigpond.net.au>
3817
3818 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3819 * libbfd.h: Regnerate.
3820 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3821 * elf32-frv.c: Likewise.
3822 * elf32-m32r.c: Likewise.
3823 * elf32-ppc.c: Likewise.
3824 * elf64-hppa.c: Likewise.
3825 * elfxx-ia64.c: Likewise.
3826 * opncls.c: Likewise.
3827
fda3ecf2
AM
38282004-10-10 Alan Modra <amodra@bigpond.net.au>
3829
3472e2e9
AM
3830 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3831 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3832 offsets stored in struct eh_cie_fde entries before doing other
3833 work.
3834
fda3ecf2
AM
3835 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3836 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3837 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3838 setting offsets for removed CIEs. Don't set "sec", instead set
3839 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3840 CIE in hdr_info. Only set make_relative and make_lsda_relative
3841 for CIEs. Use pointers rather than array indices.
3842 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3843 make_lsda_relative, need_* on cie_inf for FDEs.
3844 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3845 section output_offset. Delete cie_offset, instead use cie_inf
3846 pointer to CIE entry. Use need_relative and need_lsda_relative on
3847 CIE entry for FDEs. Use pointers rather than array indices.
3848
7db6994f
AM
38492004-10-09 Alan Modra <amodra@bigpond.net.au>
3850
3851 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3852 bfd_is_target_special_symbol.
3853 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3854 * som.c (som_bfd_is_target_special_symbol): Define.
3855
3c9458e9
NC
38562004-10-08 Nick Clifton <nickc@redhat.com>
3857
3858 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3859 * configure: Regenerate.
3860 * bfd-in2.h: Regenerate.
3861 * syms.c (bfd_is_target_special_symbol): New interface function.
3862 Returns true when a symbol should be considered to be special.
7db6994f 3863 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
3864 the symbol jump table.
3865 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3866 Return true iff the symbol is a mapping symbol.
3867 (bfd_elf32_bfd_is_target_special_symbol): Define.
3868 * elfxx-target.h: Provide a default definition for
3869 bfd_is_target_special_symbol.
3870 * aout-target.h: Likewise.
3871 * aout-tic30.c: Likewise.
873d03ee 3872 * binary.c: Likewise.
3c9458e9
NC
3873 * coffcode.h: Likewise.
3874 * i386msdos.c: Likewise.
3875 * ieee.c: Likewise.
873d03ee 3876 * ihex.c: Likewise.
3c9458e9
NC
3877 * libaout.h: Likewise.
3878 * libbfd-in.h: Likewise
3879 * libecoff.h: Likewise.
3880 * mach-o.c: Likewise.
3881 * mmo.c: Likewise.
3882 * nlm-target.h: Likewise.
3883 * oasys.c: Likewise.
3884 * pef.c: Likewise.
3885 * ppcboot.c: Likewise.
3886 * srec.c: Likewise.
3887 * tekhex.c: Likewise.
3888 * versados.c: Likewise.
3889 * vms.c: Likewise.
3890 * xcoff-target.h: Likewise.
3891 * xsym.c: Likewise.
3892 * libbfd.h: Regenerate.
3893
d2b2c203
DJ
38942004-10-08 Daniel Jacobowitz <dan@debian.org>
3895
3896 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3897 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3898 (elf_backend_section_from_shdr): Define.
3899
864274b0
AM
39002004-10-08 Alan Modra <amodra@bigpond.net.au>
3901
3902 * syms.c (bfd_is_local_label): Return false for file symbols.
3903
43cd72b9 39042004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 3905 David Heine <dlheine@tensilica.com>
43cd72b9
BW
3906
3907 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3908 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3909 (elf32xtensa_no_literal_movement): New global variable.
3910 (elf_howto_table): Add entries for new relocations.
3911 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3912 (property_table_compare): When addresses are equal, compare sizes and
3913 various property flags.
3914 (property_table_matches): New.
3915 (xtensa_read_table_entries): Extend to read new property tables. Add
3916 output_addr parameter to indicate that output addresses should be used.
3917 Use bfd_get_section_limit.
3918 (elf_xtensa_find_property_entry): New.
3919 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3920 (elf_xtensa_check_relocs): Handle new relocations.
3921 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3922 relocations. Use new xtensa-isa.h functions.
3923 (build_encoding_error_message): Remove encode_result parameter. Add
3924 new target_address parameter used to detect alignment errors.
3925 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3926 error handling. Use new is_operand_relocation function.
3927 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3928 Use underbar macro for error messages. Formatting.
3929 (get_const16_opcode): New.
3930 (get_l32r_opcode): Add a separate flag for initialization.
3931 (get_relocation_opnd): Operand number is no longer explicit in the
3932 relocation. Change to decode the opcode and analyze its operands.
3933 (get_relocation_slot): New.
3934 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3935 Use new xtensa-isa.h functions to handle multislot instructions.
3936 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3937 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3938 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3939 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3940 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3941 get_single_format, init_op_single_format_table): New.
3942 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3943 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3944 (contract_asm_expansion): Add error_message parameter and pass it to
3945 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3946 with R_XTENSA_SLOT0_OP.
3947 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3948 instructions. Use new xtensa-isa.h functions.
3949 (r_reloc struct): Add new virtual_offset field.
3950 (r_reloc_init): Add contents and content_length parameters. Set
3951 virtual_offset field to zero. Add contents to target_offset field for
3952 partial_inplace relocations.
3953 (r_reloc_is_defined): Check for null.
3954 (print_r_reloc): New debug function.
3955 (source_reloc struct): Replace xtensa_operand field with pair of the
3956 opcode and the operand position. Add is_abs_literal field.
3957 (init_source_reloc): Specify operand by opcode/position pair. Set
3958 is_abs_literal field.
3959 (source_reloc_compare): When target_offsets are equal, compare other
3960 fields to make sorting predictable.
3961 (literal_value struct): Add is_abs_literal field.
3962 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3963 (init_literal_value): New.
3964 (is_same_value): Replace with ...
3965 (literal_value_equal): ... this function. Add comparisons of
3966 virtual_offset and is_abs_literal fields.
3967 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3968 failure. Initialize has_last_loc field.
3969 (value_map_hash_table_delete): New.
3970 (hash_literal_value): Rename to ...
3971 (literal_value_hash): ... this. Include is_abs_literal flag and
3972 virtual_offset field in the hash value.
3973 (get_cached_value): Rename to ...
3974 (value_map_get_cached_value): ... this. Update calls to
3975 literal_value_hash and literal_value_equal.
3976 (add_value_map): Check for allocation failure. Update calls to
3977 value_map_get_cached_value and literal_value_hash.
3978 (text_action, text_action_list, text_action_t): New types.
3979 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3980 text_action_add, text_action_add_literal, offset_with_removed_text,
3981 offset_with_removed_text_before_fill, find_insn_action,
3982 print_action_list, print_removed_literals): New.
3983 (offset_with_removed_literals): Delete.
3984 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3985 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3986 allocated_relocs_count fields.
3987 (init_xtensa_relax_info): Initialize new fields.
3988 (reloc_bfd_fix struct): Add new translated field.
3989 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3990 translated field.
3991 (fix_compare, cache_fix_array): New.
3992 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3993 section via get_xtensa_relax_info. Use cache_fix_array to set up
3994 sorted fix_array and use bsearch instead of linear search.
3995 (section_cache_t): New struct.
3996 (init_section_cache, section_cache_section, clear_section_cache): New.
3997 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3998 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3999 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4000 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4001 New.
4002 (retrieve_contents): Use bfd_get_section_limit.
4003 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4004 to compute_removed_literals. Free value_map_hash_table when no longer
4005 needed.
4006 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4007 compute_text_actions for all sections.
4008 (find_relaxable_sections): Mark sections as relaxable if they contain
4009 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4010 call. Increment relax_info src_count field only for appropriate
4011 relocation types. Remove is_literal_section check.
4012 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4013 r_reloc_init and find_associated_l32r_irel. Check
4014 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4015 literals. Pass is_abs_literal flag to init_source_reloc.
4016 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4017 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 4018 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
4019 (find_associated_l32r_irel): Add bfd parameter and pass it to
4020 is_l32r_relocation.
4021 (compute_text_actions, compute_ebb_proposed_actions,
4022 compute_ebb_actions, check_section_ebb_pcrels_fit,
4023 check_section_ebb_reduces, text_action_add_proposed,
4024 compute_fill_extra_space): New.
4025 (remove_literals): Replace with ...
4026 (compute_removed_literals): ... this function. Call
4027 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4028 Call xtensa_read_table_entries to get the property table. Skip
4029 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4030 is_removable_literal, remove_dead_literal, and
fda3ecf2 4031 identify_literal_placement functions.
43cd72b9
BW
4032 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4033 instead of linear search.
4034 (is_removable_literal, remove_dead_literal,
4035 identify_literal_placement): New.
4036 (relocations_reach): Update check for literal not referenced by any
4037 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4038 (coalesce_shared_literal, move_shared_literal): New.
4039 (relax_section): Use bfd_get_section_limit. Call
4040 translate_section_fixes. Update calls to r_reloc_init and
4041 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4042 Add call to pin_internal_relocs. Add special handling for
4043 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4044 info to calculate new addend_displacement variable. Replace code for
4045 deleting literals with more general code to perform the actions
4046 determined by the action_list for the section.
4047 (translate_section_fixes, translate_reloc_bfd_fix): New.
4048 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4049 find_removed_literal only if is_operand_relocation. Update call to
4050 offset_with_removed_text. Use new target_offset and removed_bytes
4051 variables.
4052 (move_literal): New.
4053 (relax_property_section): Use bfd_get_section_limit. Set new
4054 is_full_prop_section flag and handle new property tables. Update calls
4055 to r_reloc_init and offset_with_removed_text. Check
4056 is_relaxable_asm_section flag. Handle expansion of zero-sized
4057 unreachable entries, with use of offset_with_removed_text_before_fill.
4058 For relocatable links, combine entries only for literal tables.
4059 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4060 calls to offset_with_removed_text. Translate st_size field for
4061 function symbols.
4062 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4063 failure. Add contents parameter. Update call to get_bfd_fix. Update
4064 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4065 R_XTENSA_ASM_EXPAND relocs.
4066 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4067 call to get_bfd_fix. Include offset from contents for partial_inplace
4068 relocations.
4069 (is_reloc_sym_weak): New.
4070 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4071 (prop_sec_len): New.
4072 (xtensa_is_property_section): Handle new property sections.
4073 (is_literal_section): Delete.
4074 (internal_reloc_compare): When r_offset matches, compare r_info and
4075 r_addend to make sorting predictable.
4076 (internal_reloc_matches): New.
4077 (xtensa_get_property_section_name): Handle new property sections.
4078 (xtensa_get_property_predef_flags): New.
4079 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4080 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4081 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4082 (xtisa_errno, xtisa_error_msg): New variables.
4083 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4084 (xtensa_insnbuf_alloc): Add error handling.
4085 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4086 use xtensa_format_decode. Add error handling.
4087 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4088 instruction length to find the number of bytes to copy.
4089 (xtensa_isa_init): Add error handling. Replace calls to
4090 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4091 tables in the xtensa_modules structure.
4092 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4093 xtensa_extend_isa): Delete.
4094 (xtensa_isa_free): Change to only free lookup tables.
4095 (opname_lookup_compare): Replace with ...
4096 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4097 (xtensa_insn_maxlength): Rename to ...
4098 (xtensa_isa_maxlength): ... this.
4099 (xtensa_insn_length): Delete.
4100 (xtensa_insn_length_from_first_byte): Replace with ...
4101 (xtensa_isa_length_from_chars): ... this function.
4102 (xtensa_num_opcodes): Rename to ...
4103 (xtensa_isa_num_opcodes): ... this.
4104 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4105 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4106 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4107 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4108 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4109 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4110 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4111 (xtensa_opcode_lookup): Add error handling.
4112 (xtensa_decode_insn): Replace with ...
4113 (xtensa_opcode_decode): ... this function, with new format and
4114 slot parameters. Add error handling.
4115 (xtensa_encode_insn): Replace with ...
4116 (xtensa_opcode_encode): ... this function, which does the encoding via
4117 one of the entries in the "encode_fns" array. Add error handling.
4118 (xtensa_opcode_name): Add error handling.
4119 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4120 xtensa_opcode_is_call): New.
4121 (xtensa_num_operands): Replace with ...
4122 (xtensa_opcode_num_operands): ... this function. Add error handling.
4123 (xtensa_opcode_num_stateOperands,
4124 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4125 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4126 xtensa_operand_is_visible): New.
4127 (xtensa_get_operand, xtensa_operand_kind): Delete.
4128 (xtensa_operand_inout): Add error handling and special-case for
4129 "sout" operands.
4130 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4131 operate on one slot of an instruction. Added error handling.
4132 (xtensa_operand_encode): Handle default operands with no encoding
4133 functions. Check for success by comparing against decoded value.
4134 Add error handling.
4135 (xtensa_operand_decode): Handle default operands. Return decoded value
4136 through argument pointer. Add error handling.
4137 (xtensa_operand_is_register, xtensa_operand_regfile,
4138 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4139 (xtensa_operand_isPCRelative): Rename to ...
4140 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4141 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4142 through argument pointer. Add error handling.
4143 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4144 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4145 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4146 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4147 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4148 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4149 xtensa_state_is_exported, xtensa_sysreg_lookup,
4150 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4151 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4152 xtensa_interface_num_bits, xtensa_interface_inout,
4153 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4154 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4155 * xtensa-modules.c: Rewrite to use new data structures.
4156 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4157 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4158 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4159 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4160 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4161 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4162 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4163 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4164 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4165 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4166 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4167 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4168 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4169 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4170 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4171 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4172 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4173 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4174 * Makefile.in: Regenerate.
4175 * bfd-in2.h: Likewise.
4176 * libbfd.h: Likewise.
4177
99022dfb
RS
41782004-10-07 Richard Sandiford <rsandifo@redhat.com>
4179
4180 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4181 against the absolute section.
4182 (mips_elf64_write_rela): Likewise.
4183
b67ae299
NC
41842004-10-07 Jan Beulich <jbeulich@novell.com>
4185
4186 * elf.c (elf_find_function): Don't generally check for matching
4187 section, just for non-file symbols. Remove redunant comparison
4188 for the latter.
4189 * elf32-arm.h (arm_elf_find_function): Likewise.
4190
8fdd7217
NC
41912004-10-07 Jeff Baker <jbaker@qnx.com>
4192
4193 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4194 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4195 was specified.
4196
073a2dc3
RM
41972004-10-04 Roland McGrath <roland@redhat.com>
4198
4199 * hash.c (bfd_hash_set_default_size): Use const for table.
4200 Use size_t instead of int for variable compared to sizeof results.
4201
7785be14
AM
42022004-10-05 Alan Modra <amodra@bigpond.net.au>
4203
4204 PR 425
4205 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4206
40a18ebd
NC
42072004-10-01 Paul Brook <paul@codesourcery.com>
4208
4209 * elf32-arm.h (elf32_arm_fake_sections,
4210 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4211 functions.
4212 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4213
8935b81f
AM
42142004-10-01 Alan Modra <amodra@bigpond.net.au>
4215
4216 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4217 need_lsda_relative.
4218 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4219 need_relative or need_lsda_relative if we are processing an
4220 offset for a reloc on a FDE initial loc or LSDA field
4221 respectively.
4222 (_bfd_elf_write_section_eh_frame): Test need_relative and
4223 need_lsda_relative in place of corresponding make_* field
4224 when deciding to use pc-relative encodings.
4225
eeac373a
PB
42262004-09-30 Paul Brook <paul@codesourcery.com>
4227
4228 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4229 target2 relocation type.
4230
7479dfd4
L
42312004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4232
4233 PR 414
4234 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4235
0dd132b6
NC
42362004-09-30 Paul Brook <paul@codesourcery.com>
4237
4238 * reloc.c: Add BFD_RELOC_ARM_SMI.
4239 * bfd-in2.h: Regenerate.
4240 * libbfd.h: Ditto.
4241
1ba54ee0
AM
42422004-09-24 Alan Modra <amodra@bigpond.net.au>
4243
4244 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4245 vma and output offset to address.
4246 * simple.c (simple_save_output_info): Only set output section
4247 and offset for debug sections, or those not already set up by
4248 the linker.
4249 (bfd_simple_get_relocated_section_contents): Update comment.
4250
5efb6261
AM
42512004-09-24 Alan Modra <amodra@bigpond.net.au>
4252
4253 * elf.c (IS_LOADED): Delete.
4254 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4255 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4256 to 2004-09-22.
4257
fca870e4
AM
42582004-09-23 Alan Modra <amodra@bigpond.net.au>
4259
4260 PR gas/396
4261 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4262 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4263 redundant assignment of EM_SPARC.
4264
c86696a3
BF
42652004-09-22 Brian Ford <ford@vss.fsi.com>
4266
4267 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4268 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4269 constants.
4270 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4271
73adb214
AM
42722004-09-22 Alan Modra <amodra@bigpond.net.au>
4273
4274 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4275 (elf_backend_modify_segment_map): Don't define.
4276
b301b248
AM
42772004-09-22 Alan Modra <amodra@bigpond.net.au>
4278
4279 * elf.c (IS_LOADED): Define.
4280 (assign_file_positions_for_segments): Don't round up file offset of
4281 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4282 Delete code handling link script adjustment of lma. Do the adjust
4283 in later code handling similar ajustments. Remove dead code error
4284 check. Warn if section lma would require a negative offset
4285 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4286 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4287 update voff in section loop. Change voff in segment loop to be an
4288 adjustment on top of "off". Set sec->filepos and update "off" later.
4289 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 4290 test for alloc-only sections other than .tbss consistently.
b301b248
AM
4291 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4292 Tidy PT_NOTE handling. Use %B and %A in error messages.
4293 (assign_file_positions_except_relocs): Use %B in error message.
4294
3f85e526
L
42952004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4296
4297 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4298 (CONFIG_STATUS_DEPENDENCIES): New.
4299 (Makefile): Removed.
4300 (config.status): Likewise.
4301 * Makefile.in: Regenerated.
4302
eb043451
PB
43032004-09-17 Paul Brook <paul@codesourcery.com>
4304
4305 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4306 (bfd_elf32_arm_process_before_allocation): Update prototype.
4307 * bfd-in2.h: Regenerate.
4308 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4309 (elf32_arm_link_hash_table_create): Set it.
4310 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4311 (bfd_elf32_arm_set_target_relocs): New function.
4312 (arm_real_reloc_type): New function.
4313 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4314 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4315 (elf32_arm_gc_sweep_hook): Ditto.
4316 (elf32_arm_check_relocs): Ditto.
4317 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4318 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4319 R_ARM_GOT_TARGET2.
4320 (elf32_arm_got_prel): New variable.
4321 (elf32_arm_howto_from_type): New function.
4322 (elf32_arm_info_to_howto): Use it.
4323 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4324 BFD_RELOC_ARM_TARGET2.
4325 * libbfd.h: Regenerate.
4326 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4327
f6e332e6
AM
43282004-09-17 Alan Modra <amodra@bigpond.net.au>
4329
4330 * ecoff.c: Update u.undef.next refs.
4331 * elf64-ppc.c: Likewise.
4332 * elflink.c: Likewise.
4333 * linker.c: Likewise.
4334 * xcofflink.c: Likewise.
4335
4336 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4337 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4338 fields to indirect struct.
4339 * elf-m10300.c: Update u.weakdef refs.
4340 * elf32-arm.h: Likewise.
4341 * elf32-cris.c: Likewise.
4342 * elf32-frv.c: Likewise.
4343 * elf32-hppa.c: Likewise.
4344 * elf32-i370.c: Likewise.
4345 * elf32-i386.c: Likewise.
4346 * elf32-m32r.c: Likewise.
4347 * elf32-m68k.c: Likewise.
4348 * elf32-ppc.c: Likewise.
4349 * elf32-s390.c: Likewise.
4350 * elf32-sh.c: Likewise.
4351 * elf32-sparc.c: Likewise.
4352 * elf32-vax.c: Likewise.
4353 * elf32-xtensa.c: Likewise.
4354 * elf64-alpha.c: Likewise.
4355 * elf64-hppa.c: Likewise.
4356 * elf64-ppc.c: Likewise.
4357 * elf64-s390.c: Likewise.
4358 * elf64-sh64.c: Likewise.
4359 * elf64-sparc.c: Likewise.
4360 * elf64-x86-64.c: Likewise.
4361 * elfxx-ia64.c: Likewise.
4362 * elfxx-mips.c: Likewise.
4363 * elflink.c: Likewise. Also u.elf_hash_value.
4364 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4365 indirection.
4366 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4367 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4368 (bfd_elf_gc_record_vtentry): Likewise.
4369 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4370
90c0a373
AM
43712004-09-17 Alan Modra <amodra@bigpond.net.au>
4372
4373 * Makefile.am: Run "make dep-am".
4374 * Makefile.in: Regenerate.
4375 * bfd-in2.h: Regenerate.
4376 * po/SRC-POTFILES.in: Regenerate.
4377 * po/bfd.pot: Regenerate.
4378
f5385ebf
AM
43792004-09-16 Alan Modra <amodra@bigpond.net.au>
4380
4381 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4382 with bitfields. Make "type" and "other" bitfields too.
4383 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4384 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4385 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4386 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4387 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4388 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4389 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4390 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4391 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4392 * elf-m10300.c: Likewise.
4393 * elf.c: Likewise.
4394 * elf32-arm.h: Likewise.
4395 * elf32-cris.c: Likewise.
4396 * elf32-frv.c: Likewise.
4397 * elf32-hppa.c: Likewise.
4398 * elf32-i370.c: Likewise.
4399 * elf32-i386.c: Likewise.
4400 * elf32-m32r.c: Likewise.
4401 * elf32-m68k.c: Likewise.
4402 * elf32-ppc.c: Likewise.
4403 * elf32-s390.c: Likewise.
4404 * elf32-sh-symbian.c: Likewise.
4405 * elf32-sh.c: Likewise.
4406 * elf32-sh64.c: Likewise.
4407 * elf32-sparc.c: Likewise.
4408 * elf32-vax.c: Likewise.
4409 * elf32-xtensa.c: Likewise.
4410 * elf64-alpha.c: Likewise.
4411 * elf64-hppa.c: Likewise.
4412 * elf64-ppc.c: Likewise.
4413 * elf64-s390.c: Likewise.
4414 * elf64-sh64.c: Likewise.
4415 * elf64-sparc.c: Likewise.
4416 * elf64-x86-64.c: Likewise.
4417 * elflink.c: Likewise.
4418 * elfxx-ia64.c: Likewise.
4419 * elfxx-mips.c: Likewise.
4420 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4421 * configure: Regenerate.
4422 * aclocal.m4: Regenerate.
4423
b6ee372a
AM
44242004-09-16 Alan Modra <amodra@bigpond.net.au>
4425
4426 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4427 around uses of R_ARM_TARGET1.
4428 (elf32_arm_check_relocs): Likewise.
4429
9c504268
PB
44302004-09-13 Paul Brook <paul@codesourcery.com>
4431
4432 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4433 prototype.
4434 * bfd-in2.h: Regenerate.
4435 * libbfd.h: Regenerate.
4436 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4437 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4438 (bfd_elf32_arm_process_before_allocation): Ditto.
4439 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4440 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4441 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4442 * reloc.c: Ditto.
4443
94ea025a
JB
44442004-09-10 Joel Brobecker <brobecker@gnat.com>
4445
4446 * hpux-core.c (thread_section_p): New function.
4447 (hpux_core_core_file_p): Fix computation of offset in call
4448 to bfd_seek. Create a ".reg" section from an arbitrary
4449 ".reg/<id>" section if none was created after having read
4450 all sections.
4451
24443139
AS
44522004-09-11 Andreas Schwab <schwab@suse.de>
4453
4454 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4455 * aclocal.m4: Rebuild.
4456 * configure: Rebuild.
4457
f4eae89c
JB
44582004-09-10 Joel Brobecker <brobecker@gnat.com>
4459
4460 * section.c (bfd_sections_find_if): Fix parameter name in
4461 comment to match code.
4462
e0638f70
AM
44632004-09-10 Alan Modra <amodra@bigpond.net.au>
4464
4465 * elf.c (assign_file_positions_except_relocs): Assign relocs
4466 stored in a bfd section.
4467
5e0f5ae3
HPN
44682004-09-08 Hans-Peter Nilsson <hp@axis.com>
4469
4470 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4471 h->gotplt_refcount to 0, not -1.
4472
ada1953e
HPN
44732004-09-07 Hans-Peter Nilsson <hp@axis.com>
4474
4475 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4476 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4477 symname.
4478 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4479 handle symbol visibility here.
4480
ee75fd95
AM
44812004-09-07 Alan Modra <amodra@bigpond.net.au>
4482
4483 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4484 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4485 callers.
4486 (ppc_stub_name): Remove trailing "+0" on stub name.
4487 (create_linkage_sections): Create relocations for
4488 branch lookup table when --emit-relocs as well as when --shared.
4489 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4490 relbrlt test. For --emit-stub-syms, always output a sym even when
4491 one already exists on a plt call stub. Put stub type in the stub
4492 symbol name.
4493 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4494 test.
4495 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4496 reloc_count in stub sections. Adjust relbrlt test.
4497 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4498 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4499 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4500 for relocs against discarded symbols. Fix comments.
4501
229fcec5
MM
45022004-09-06 Mark Mitchell <mark@codesourcery.com>
4503
4504 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4505 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4506 from ...
4507 (map_sections_to_segments): ... here. Use it. Assign a file
4508 position to the .dynamic section if it is not loadable, but part
4509 of the PT_DYNAMIC segment.
4510 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4511 offsets, not VMAs, for the BPABI. Do not fill in the header in
4512 the .got.plt section for the BPABI.
4513 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4514 PT_DYNAMIC segment.
4515 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 4516
9a0789ec
NC
45172004-09-06 Nick Clifton <nickc@redhat.com>
4518
4519 * elflink.c (elf_link_add_object_symbols): Set the error code to
4520 bfd_error_wrong_format when the input format does not match the
4521 output format.
4522
7b53ace3
AM
45232004-09-06 Alan Modra <amodra@bigpond.net.au>
4524
4525 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4526 (ppc64_elf_check_directives): ..here.
4527 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4528 before accessing ppc64_elf_tdata.
4529 (ppc64_elf_finish_dynamic_sections): And here too.
4530
3e540f25
AM
45312004-09-04 Alan Modra <amodra@bigpond.net.au>
4532
4533 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4534
e5a52504
MM
45352004-09-03 Mark Mitchell <mark@codesourcery.com>
4536
4537 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4538 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4539 (bfd_elf32_littlearm_symbian_vec): Likewise.
4540 * configure: Regenerated.
4541 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4542 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4543 (PLT_ENTRY_SIZE): Likewise.
4544 (bfd_vma_elf32_arm_symbian_plt_entry): New
4545 variable.
4546 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4547 and symbian_p.
4548 (create_got_section): Don't create sections when generating BPABI
4549 objects.
4550 (elf32_arm_create_dynamic_sections): Tidy.
4551 (elf32_arm_link_hash_table_create): Set plt_header_size,
4552 plt_entry_size, and symbian_p.
4553 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4554 generating BPABI objects.
4555 (allocate_dynrelocs): Use htab->plt_header_size, not
4556 PLT_HEADER_SIZE. Do not add to .got.plt when
4557 generating BPABI objects.
4558 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4559 * elfarm-nabi.c: Add SymbianOS target vectors.
4560 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4561 (_bfd_elf_link_create_dynamic_sections): Likewise.
4562 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4563 (elfNN_bed): Use it.
4564 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4565 (bfd_elf32_littlearm_symbian_vec): Likewise.
4566 (_bfd_target_vector): Add them.
4567
6e3b6835
NC
45682004-09-03 Nick Clifton <nickc@redhat.com>
4569
4570 PR 360
4571 * coffcode.h (handle_COMDAT): Replace abort with an warning
4572 message and allow the scan to continue.
4573
595da8c5
AM
45742004-09-02 Alan Modra <amodra@bigpond.net.au>
4575
4576 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4577 in when reading relocs, not our sorted syms. Remove unnecessary
4578 var.
4579
6723a9f4
EB
45802004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4581
4582 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4583
5464f5a1
NN
45842004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4585
4586 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4587 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4588 replace uses of *_alias with *_noncanonical.
4589 * aclocal.m4: Rebuild with aclocal 1.4p6.
4590 * Makefile.in: Rebuild with automake 1.4p6.
4591 * doc/Makefile.in: Rebuild with automake 1.4p6.
4592 * configure.in: Autoupdate with autoupdate 2.59.
4593 * config.in: Regenerate with autoheader 2.59.
4594 * configure: Regnerate with autoconf 2.59.
4595
a7535cf3
AM
45962004-08-28 Alan Modra <amodra@bigpond.net.au>
4597
4598 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4599 symbol pointer arrays before modifying.
4600
c9727e01
AM
46012004-08-28 Alan Modra <amodra@bigpond.net.au>
4602
b91e2ae2 4603 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
4604 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4605 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4606 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
4607 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4608 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4609 Use both symbol tables on non-relocatable objects. Use a common
4610 error exit. Fix "mid" warning.
c9727e01
AM
4611 * libbfd.h: Regenerate.
4612 * bfd-in2.h: Regenerate.
4613
699733f6
AM
46142004-08-28 Alan Modra <amodra@bigpond.net.au>
4615
4616 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4617 object file.
4618 (struct sfpr_def_parms): Save some space.
4619 (sfpr_define): Here too.
4620
4621 * elf64-ppc.c (compare_symbols): Put section syms first.
4622 (sym_exists_at): New function.
4623 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4624 points only for relocatable files. Use .opd section contents
4625 otherwise. Generally clean up the code.
4626
deb0e272
AM
46272004-08-27 Alan Modra <amodra@bigpond.net.au>
4628
4629 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4630 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4631 (struct sfpr_def_parms): New.
4632 (sfpr_define): New function.
4633 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4634 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4635 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4636 (savefpr1_tail, restfpr1_tail): New functions.
4637 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4638 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4639 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4640 code. Define all ABI mandated _save and _rest functions.
4641
85a84e7a
PB
46422004-08-26 Paul Brook <paul@codesourcery.com>
4643
deb0e272 4644 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 4645
688c58f3
AM
46462004-08-26 Alan Modra <amodra@bigpond.net.au>
4647
4648 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4649 TRUE or FALSE.
4650
3e95eabc
AM
46512004-08-26 Alan Modra <amodra@bigpond.net.au>
4652
4653 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4654 that pcrel correction is applied for R_386_PC32.
4655
f855931b
AM
46562004-08-25 Alan Modra <amodra@bigpond.net.au>
4657
4658 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4659 for R_386_32 and R_386_PC32 relocs against symbols defined in
4660 discarded sections.
4661
b18c562e
NC
46622004-08-25 Dmitry Diky <diwil@spec.ru>
4663
4664 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4665 Add new relocations.
4666 * bfd-in2.h: Regenerate.
f855931b 4667 * libbfd.h: Regenerate.
b18c562e
NC
4668 * elf32-msp430.c: Clean-up code.
4669 (elf_msp430_howto_table): Add new relocation entries.
4670 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4671 (msp430_elf_relax_section): New function.
4672 (msp430_elf_relax_delete_bytes): New function.
4673 (msp430_elf_symbol_address_p): New function.
4674
af705ba8
NC
46752004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4676
4677 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4678 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4679
ea5158d8
DJ
46802004-08-20 Daniel Jacobowitz <dan@debian.org>
4681
4682 * elflink.c (_bfd_elf_section_already_linked): Handle
4683 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4684
49d934f1
MM
46852004-08-19 Mark Mitchell <mark@codesourcery.com>
4686
4687 * config.bfd (arm*-*-symbianelf*): New target.
4688 (arm*-*-eabi*): Likewise.
4689
039b3fef
AM
46902004-08-19 Alan Modra <amodra@bigpond.net.au>
4691
4692 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4693 "struct ppc_link_hash_entry *".
4694 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4695 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4696
3f764659
JJ
46972004-08-19 Jakub Jelinek <jakub@redhat.com>
4698
4699 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4700 entries (where fd_aux overlaps next entry's fd_func).
4701 Add non_overlapping argument, use it.
4702 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4703 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4704 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4705 as indexes into opd_sym_map/opd_adjust array.
4706 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4707
c09bdfe5
AM
47082004-08-18 Alan Modra <amodra@bigpond.net.au>
4709
4710 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4711 if we can look up their function descriptor in a regular file.
4712
271d0fc3
NC
47132004-08-18 Nick Clifton <nickc@redhat.com>
4714
4715 PR 324
4716 * cofflink.c (coff_link_add_symbols): Check that the comdat
4717 pointer in the coff_section_data structure has been initialised
4718 before using it.
4719
a010d60f
AM
47202004-08-18 Alan Modra <amodra@bigpond.net.au>
4721
4722 PR 338
4723 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4724 changing bfd_link_hash_undefined to bfd_link_hash_new.
4725
90e3cdf2
JJ
47262004-08-17 Jakub Jelinek <jakub@redhat.com>
4727
4728 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4729 if not yet defined.
4730 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4731 (synthetic_opd, synthetic_relocatable): New variables.
4732 (compare_symbols, compare_relocs): New helper routines.
4733 (ppc64_elf_get_synthetic_symtab): New function.
4734 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4735 to relsyms.
4736 * bfd-in2.h: Regenerated.
4737 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4738 to relsyms. Return 0 if abfd is relocatable.
4739
7c2c8505
AM
47402004-08-17 Alan Modra <amodra@bigpond.net.au>
4741
4742 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4743
0367ecfb
NC
47442004-08-17 Nick Clifton <nickc@redhat.com>
4745
4746 * (is_arm_mapping_symbol_name): New function - return true
4747 when a symbol name matches the requirements for an ARM mapping
4748 symbol name.
4749 (arm_elf_find_function): New function based on
4750 elf_find_function in elf.c but skipping ARM mapping symbols
4751 and including thumb function symbols.
4752 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4753 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4754
2441e016
AM
47552004-08-17 Alan Modra <amodra@bigpond.net.au>
4756
4757 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4758 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4759 (ppc64_elf_brtaken_reloc): Here too.
4760
35b0ce59
AM
47612004-08-17 Alan Modra <amodra@bigpond.net.au>
4762
4763 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4764 symbol visibility.
4765 (ppc64_elf_check_directives): Check that we have the right hash
4766 table before proceeding.
4767
81688140
AM
47682004-08-17 Alan Modra <amodra@bigpond.net.au>
4769
4770 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4771 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4772 the sections that will be discarded.
4773
327c1315
AM
47742004-08-16 Alan Modra <amodra@bigpond.net.au>
4775
4776 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4777
45fc9e4a
AM
47782004-08-16 Alan Modra <amodra@bigpond.net.au>
4779
4780 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4781 free space available.
4782
9dadfa79
AM
47832004-08-16 Alan Modra <amodra@bigpond.net.au>
4784
4785 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 4786 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
4787
4788 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4789 (xcoff_write_armap_big): Likewise.
4790 (xcoff_write_archive_contents_old): Likewise.
4791 (xcoff_write_archive_contents_big): Likewise.
4792
4793 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4794
57e8b36a
NC
47952004-08-13 Nick Clifton <nickc@redhat.com>
4796
4797 * elf32-arm.h: Convert to ISO C90.
4798
a005f94e
AM
47992004-08-13 Alan Modra <amodra@bigpond.net.au>
4800
4801 PR 293
4802 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4803 zero the plt field.
4804
d003868e
AM
48052004-08-13 Alan Modra <amodra@bigpond.net.au>
4806
4807 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4808 (bfd_archive_filename, bfd_get_section_ident): Delete.
4809 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4810 bfd_archive_filename.
4811 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4812 to warn about symbols in discarded sections. Use _bfd_error_handler.
4813 * aout-adobe.c (aout_adobe_callback): See below.
4814 * aout-cris.c (swap_ext_reloc_in): ..
4815 * coff-arm.c (find_thumb_glue, find_arm_glue,
4816 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4817 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4818 coff_arm_copy_private_bfd_data): ..
4819 * coff-i860.c (i860_reloc_processing): ..
4820 * coff-mcore.c (mcore_coff_unsupported_reloc,
4821 coff_mcore_relocate_section): ..
4822 * coff-ppc.c (coff_ppc_relocate_section): ..
4823 * coff-rs6000.c (xcoff_create_csect_from_smclas
4824 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4825 sh_swap_insns, sh_relocate_section): ..
4826 * coff-tic54x.c (tic54x_reloc_processing): ..
4827 * coff-tic80.c (coff_tic80_relocate_section): ..
4828 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4829 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4830 coff_slurp_symbol_table, coff_classify_symbol,
4831 coff_slurp_reloc_table): ..
4832 * coffgen.c (_bfd_coff_read_string_table): ..
4833 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4834 _bfd_coff_generic_relocate_section): ..
4835 * cpu-arm.c (bfd_arm_merge_machines): ..
4836 * cpu-sh.c (sh_merge_bfd_arch): ..
4837 * elf-hppa.h (elf_hppa_relocate_section): ..
4838 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4839 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4840 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4841 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4842 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4843 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4844 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4845 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4846 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4847 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4848 cris_elf_merge_private_bfd_data
4849 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4850 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4851 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4852 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4853 elf32_hppa_relocate_section): ..
4854 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4855 i370_elf_check_relocs, i370_elf_relocate_section): ..
4856 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4857 elf_i386_relocate_section): ..
4858 * elf32-m32r.c (m32r_elf_relocate_section,
4859 m32r_elf_merge_private_bfd_data): ..
4860 * elf32-m68hc1x.c (m68hc12_add_stub,
4861 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4862 * elf32-m68k.c (elf_m68k_relocate_section): ..
4863 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4864 mcore_elf_relocate_section): ..
4865 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4866 ppc_elf_check_relocs, ppc_elf_relocate_section,
4867 ppc_elf_begin_write_processing): ..
4868 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4869 elf_s390_relocate_section): ..
4870 * elf32-sh-symbian.c (sh_symbian_import_as,
4871 sh_symbian_process_embedded_commands,
4872 sh_symbian_relocate_section): ..
4873 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4874 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4875 sh_elf_merge_private_data): ..
4876 * elf32-sparc.c (elf32_sparc_check_relocs,
4877 elf32_sparc_relocate_section,
4878 elf32_sparc_merge_private_bfd_data): ..
4879 * elf32-v850.c (v850_elf_check_relocs,
4880 v850_elf_merge_private_bfd_data): ..
4881 * elf32-xtensa.c (elf_xtensa_check_relocs,
4882 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4883 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4884 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4885 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4886 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4887 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4888 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4889 ppc64_elf_relocate_section): ..
4890 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4891 elf_s390_relocate_section): ..
4892 * elf64-sh64.c (sh_elf64_relocate_section): ..
4893 * elf64-sparc.c (sparc64_elf_check_relocs,
4894 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4895 sparc64_elf_merge_private_bfd_data): ..
4896 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4897 elf64_x86_64_relocate_section): ..
4898 * elflink.c (_bfd_elf_add_default_symbol,
4899 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4900 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4901 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4902 elf_get_linked_section_vma, elf_fixup_link_order,
4903 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4904 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4905 * elfxx-ia64.c (elfNN_ia64_relax_section,
4906 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4907 * elfxx-mips.c (mips_elf_perform_relocation,
4908 _bfd_mips_elf_check_relocs,
4909 _bfd_mips_elf_merge_private_bfd_data): ..
4910 * ieee.c (ieee_slurp_external_symbols): ..
4911 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4912 * libbfd.c (_bfd_generic_verify_endian_match): ..
4913 * linker.c (_bfd_generic_link_add_one_symbol,
4914 _bfd_generic_section_already_linked): ..
4915 * pdp11.c (translate_to_native_sym_flags): ..
4916 * pe-mips.c (coff_pe_mips_relocate_section): ..
4917 * peicode.h (pe_ILF_build_a_bfd): ..
4918 * srec.c (srec_bad_byte): ..
4919 * stabs.c (_bfd_link_section_stabs): ..
4920 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4921 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4922 with corresponding %B and %A in _bfd_error_handler format string.
4923 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4924 calls to use %A and %B. Fix "against symbol .. from section" and
4925 similar error messages. Combine multiple _bfd_error_handler calls
4926 where they were separated due to bfd_archive_filename deficiencies.
4927 * bfd-in2.h: Regenerate.
4928
6ba842b6
L
49292004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4930
4931 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4932 relocation.
4933
99877b66
AM
49342004-08-10 Alan Modra <amodra@bigpond.net.au>
4935
4936 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4937 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4938 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4939 Add twiddled_syms.
4940 (link_hash_newfunc): Init was_undefined.
4941 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4942 Use undefweak instead.
4943 (ppc64_elf_check_directives): Fix undefs chain.
4944 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4945 references.
4946 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4947 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4948 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4949
ba3bee0b
JJ
49502004-08-09 Jakub Jelinek <jakub@redhat.com>
4951
4952 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4953 error, test input_section flags rather than sec.
4954
8387904d
AM
49552004-08-09 Alan Modra <amodra@bigpond.net.au>
4956
4957 * elf-bfd.h (struct elf_backend_data): Add
4958 elf_backend_archive_symbol_lookup.
4959 (_bfd_elf_archive_symbol_lookup): Declare.
4960 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4961 (elf_link_add_archive_symbols): ..extracted from here. Call the
4962 backend version.
4963 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4964 (elfNN_bed): Init new field.
4965 * elf64-ppc.c (elf_backend_check_directives): Define.
4966 (elf_backend_archive_symbol_lookup): Define.
4967 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4968 a ppc_link_hash_entry pointer.
4969 (get_fdh): Move.
4970 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4971 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4972 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4973 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4974 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4975 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4976 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4977 descriptor symbols.
4978
b25116a9
AM
49792004-08-09 Alan Modra <amodra@bigpond.net.au>
4980
8843416a
AM
4981 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4982 (ppc64_elf_add_symbol_hook): Test for NULL section.
4983 (get_sym_h): Formatting.
4984 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4985 stub target_value.
4986
b25116a9
AM
4987 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4988 long branch stubs with code handling plt and r2off branch stubs.
4989
ccfa59ea
AM
49902004-08-09 Alan Modra <amodra@bigpond.net.au>
4991
4992 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4993 * elflink.c (elf_link_input_bfd): Formatting.
4994 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4995 all callers.
4996 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4997 (link_hash_newfunc): Don't set it.
4998 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4999 (ppc64_elf_mark_entry_syms): Delete.
5000 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5001 sections. Use get_opd_info.
5002 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5003
4025353c
AM
50042004-08-09 Alan Modra <amodra@bigpond.net.au>
5005
4f800a42
AM
5006 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5007
06da1e8e
AM
5008 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5009 (func_desc_adjust): Don't set have_undefweak.
5010 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5011 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5012
34814b9f
AM
5013 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5014 "struct ppc_link_hash_entry *". Adjust all references.
5015 (ppc64_elf_hide_symbol): Correct a comment.
5016
4025353c
AM
5017 * elf64-ppc.c (get_opd_info): New function.
5018 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5019 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5020 before calling get_fdh. Test fdh rather than h before dereferencing
5021 fdh. Mark removed symbols in opd_adjust.
5022 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5023 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5024 opd symbols.
5025 (ppc64_elf_output_symbol_hook): Likewise.
5026
db6579d4
PB
50272004-08-06 Paul Brook <paul@codesourcery.com>
5028
5029 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5030 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5031 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5032 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5033 and BFD_RELOC_ARM_SBREL32.
5034 * bfd-in2.h, bbfd.h: Regenerate.
5035
a4d0f181
TS
50362004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5037
5038 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5039 the dynamic link symbol actually in use.
5040
83774818
SC
50412004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5042
5043 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5044
a4d0f181 50452004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
5046 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5047
5048 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5049 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5050
185d09ad
L
50512004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5052 Nick Clifton <nickc@redhat.com>
5053
5054 PR 290
5055 * bfd.c (_bfd_default_error_handler): Make it global.
5056
5057 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5058
5059 * elf.c (assign_section_numbers): Cope gracefully with sections
5060 which have SHF_LINK_ORDER set but no sh_link set up.
5061 * elflink.c (elf_get_linked_section_vma): Likewise.
5062
5063 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5064 it to NULL.
5065
5066 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5067 Set it to _bfd_default_error_handler.
5068 (elfNN_bed): Add elf_backend_link_order_error_handler.
5069
5070 * libbfd-in.h (_bfd_default_error_handler): New.
5071
5072 * libbfd.h: Regenerated.
5073
7946e94a
JJ
50742004-07-30 Jakub Jelinek <jakub@redhat.com>
5075
5076 * archures.c (bfd_mach_sparc_64bit_p): Define.
5077 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5078 * bfd-in2.h: Rebuilt.
5079
1d70c7fb
AO
50802004-07-29 Alexandre Oliva <aoliva@redhat.com>
5081
5082 Introduce SH2a support.
5083 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5084 * archures.c (bfd_mach_sh2a_nofpu): New.
5085 * bfd-in2.h: Rebuilt.
5086 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5087 (arch_info_struct): Add sh2a_nofpu.
5088 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5089 2003-12-29 DJ Delorie <dj@redhat.com>
5090 * reloc.c: Add relocs for sh2a.
5091 * bfd-in2.h: Regenerate.
5092 * libbfd.hh: Regenerate.
5093 2003-12-01 Michael Snyder <msnyder@redhat.com>
5094 * archures.c (bfd_mach_sh2a): New.
5095 * bfd-in2.h: Rebuilt.
5096 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5097 (SH2A_NEXT): New.
5098 (arch_info_struct): Add sh2a.
5099 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5100
404ed0cf
DA
51012004-07-28 Nick Clifton <nickc@redhat.com>
5102 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5103
5104 PR 273
5105 * som.c (setup_sections): Improve estimation of space sizes in
5106 relocatable objects.
5107
225247f0
JT
51082004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5109 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5110 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5111 to targ_selvecs.
5112 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5113 * configure: Regenerate.
5114 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5115 case that accepts OSABI=NetBSD and OSABI=SysV.
5116 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5117 the base of .got or .data (if .got does not exist).
5118 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5119 set OSABI=NetBSD.
5120 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5121 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5122 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5123 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5124
3d7f7666
L
51252004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5126
5127 PR 161/251
5128 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5129 (elf_sec_group): Defined.
5130 (bfd_elf_match_symbols_in_sections): New prototype.
5131 (_bfd_elf_setup_group_pointers): Likewise.
5132
5133 * elf.c (bfd_elf_discard_group): Abort.
5134 (bfd_elf_set_group_contents): Also include relocation sections.
5135 Remove zero-fill for ld -r.
5136 (_bfd_elf_setup_group_pointers): New function.
5137 (elf_sort_elf_symbol): Likewise.
5138 (elf_sym_name_compare): Likewise.
5139 (bfd_elf_match_symbols_in_sections): Likewise.
5140
5141 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5142
5143 * elflink.c (match_group_member): New.
5144 (elf_link_input_bfd): Check group member for discarded section.
5145 (try_match_symbols_in_sections): New function.
5146 (already_linked): Likewise.
5147 (_bfd_elf_section_already_linked): Support mixing comdat group
5148 and linkonce section.
5149
5150 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5151 * linker.c (bfd_section_already_linked_table_traverse): New.
5152
5153 * libbfd.h: Regenerated.
5154
670ec21d
NC
51552004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5156
5157 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5158 BFD_RELOC_CRX_SWITCH32.
5159 * bfd-in2.h: Regenerate.
6cd7f07e 5160 * libbfd.h: Regenerate.
670ec21d
NC
5161 * elf32-crx.c: Support relocation/relaxation of
5162 BFD_RELOC_CRX_SWITCH* types.
5163
2c66dc6c
AM
51642004-07-27 Alan Modra <amodra@bigpond.net.au>
5165
5166 * elf64-ppc.c: Correct "Linker stubs" comment.
5167
38ce5b11
L
51682004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5169
5170 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5171 linked-to section.
5172 (elf_linked_to_section): New.
5173
5174 * elf.c (assign_section_numbers): Set up sh_link for
5175 SHF_LINK_ORDER.
5176
5177 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5178 to sh_link for SHT_IA_64_UNWIND sections.
5179
65da361f
L
51802004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5181
5182 * elflink.c (elf_fixup_link_order): Add _() to error message.
5183
08ccf96b
L
51842004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5185
5186 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5187 an error if failed.
5188
082b7297
L
51892004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5190
5191 * aout-adobe.c (aout_32_section_already_linked): Defined.
5192 * aout-target.h (MY_section_already_linked): Likewise.
5193 * aout-tic30.c (MY_section_already_linked): Likewise.
5194 * binary.c (binary_section_already_linked): Likewise.
5195 * bout.c (b_out_section_already_linked): Likewise.
5196 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5197 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5198 * coffcode.h (coff_section_already_linked): Likewise.
5199 * i386msdos.c (msdos_section_already_linked): Likewise.
5200 * i386os9k.c (os9k_section_already_linked): Likewise.
5201 * ieee.c (ieee_section_already_linked): Likewise.
5202 * ihex.c (ihex_section_already_linked): Likewise.
5203 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5204 * mmo.c (mmo_section_already_linked): Likewise.
5205 * nlm-target.h (nlm_section_already_linked): Likewise.
5206 * oasys.c (oasys_section_already_linked): Likewise.
5207 * pef.c (bfd_pef_section_already_linked): Likewise.
5208 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5209 * som.c (som_bfd_discard_group): Likewise.
5210 * srec.c (srec_section_already_linked): Likewise.
5211 * tekhex.c (tekhex_section_already_linked): Likewise.
5212 * versados.c (versados_section_already_linked): Likewise.
5213 * vms.c (vms_section_already_linked): Likewise.
5214 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5215 * xsym.c (bfd_sym_section_already_linked): Likewise.
5216
5217 * bfd-in.h (bfd_section_already_linked_table_init): New.
5218 (bfd_section_already_linked_table_free): Likewise.
5219
5220 * coff-rs6000.c (rs6000coff_vec): Add
5221 _bfd_generic_section_already_linked.
5222 (pmac_xcoff_vec): Likewise.
5223 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5224 (aix5coff64_vec): Likewise.
5225
5226 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5227 * elflink.c (_bfd_elf_section_already_linked): New function.
5228
5229 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5230
5231 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5232 (_bfd_generic_section_already_linked): New.
5233 (bfd_section_already_linked_hash_entry): Likewise.
5234 (bfd_section_already_linked): Likewise.
5235 (bfd_section_already_linked_table_lookup): Likewise.
5236 (bfd_section_already_linked_table_insert): Likewise.
5237
5238 * linker.c (bfd_section_already_linked): New.
5239 (_bfd_section_already_linked_table): Likewise.
5240 (bfd_section_already_linked_table_lookup): Likewise.
5241 (bfd_section_already_linked_table_insert): Likewise.
5242 (already_linked_newfunc): Likewise.
5243 (bfd_section_already_linked_table_init): Likewise.
5244 (bfd_section_already_linked_table_free): Likewise.
5245 (_bfd_generic_section_already_linked): Likewise.
5246
5247 * section.c (bfd_section): Remove comdat.
5248 (bfd_comdat_info): Moved to ...
5249 * bfd-in.h (coff_comdat_info): Here.
5250 (bfd_coff_get_comdat_section): New.
5251 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5252 * libcoff-in.h (coff_section_tdata): Add comdat.
5253 * coffcode.h (handle_COMDAT): Updated.
5254 * cofflink.c (coff_link_add_symbols): Likewise.
5255 * ecoff.c (bfd_debug_section): Likewise.
5256
5257 * targets.c (bfd_target): Add _section_already_linked.
5258 (BFD_JUMP_TABLE_LINK): Updated.
5259
5260 * bfd-in2.h: Regenerated.
5261 * libbfd.h: Likewise.
5262 * libcoff.h: Likewise.
5263
0b52efa6
PB
52642003-07-21 Paul Brook <paul@codesourcery.com>
5265
5266 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5267 elf_fixup_link_order): New functions.
5268 (bfd_elf_final_link): Call elf_fixup_link_order.
5269
7e2294f9
AO
52702004-07-21 Alexandre Oliva <aoliva@redhat.com>
5271
5272 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5273 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5274 common definitions.
5275 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5276 _bfd_elf_symbol_refs_local_p.
5277 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5278 symbols.
5279
e56f61be
L
52802004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5281
5282 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5283 DYN_NO_NEEDED.
5284 (bfd_elf_get_dyn_lib_class): New prototype.
5285 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5286
5287 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5288 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5289 entry is needed. Issue an error if a DT_NEEDED entry is needed
5290 for a file marked DYN_NO_NEEDED.
5291 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5292 for DT_NEEDED tags.
5293
5294 * bfd-in2.h: Regenerated.
5295
27b56da8
DA
52962004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5297
5298 * elflink.c (elf_section_complain_discarded): Don't complain in
5299 .PARISC.unwind.
5300
bbb268c3
JW
53012004-07-10 James E Wilson <wilson@specifixinc.com>
5302
5303 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5304 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5305 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5306 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5307 Fix callers.
5308 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5309 bfd_put_64 to bfd_putl64.
5310 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 5311
e525914f
L
53122004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5313
5314 PR 240
5315 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5316 .init/.fini sections when trying to relax it.
5317
b1a6d0b1
NC
53182004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5319
5320 * elf.c (assign_file_positions_for_segments): Make sure the
5321 .dynamic section is the first section in the PT_DYNAMIC segment.
5322
1a320fbb
NC
53232004-07-09 Nick Clifton <nickc@redhat.com>
5324
5325 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5326 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5327 sh_elf_get_flags_from_mach functions so that they do not conflict
5328 when this target is built with other sh-elf targets.
5329 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5330 suppression of this function.
5331 (sh_elf_find_flags): Likewise.
5332
1fe1f39c
NC
53332004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5334
5335 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5336 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5337 (BFD32_BACKENDS): Add elf32-crx.lo.
5338 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5339 (cpu-crx.lo): New target.
5340 (elf32-crx.lo): New target.
5341 * Makefile.in: Regenerate.
5342 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5343 (bfd_archures_list): Add bfd_crx_arch.
5344 * bfd-in2.h: Regenerate.
5345 * config.bfd: Handle crx-*-elf*, crx*.
5346 * configure.in: Handle bfd_elf32_crx_vec.
5347 * configure: Regenerate.
5348 * cpu-crx.c: New file.
5349 * elf32-crx.c: Likewise.
5350 * libbfd.h: Regenerate.
5351 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5352 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5353 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5354 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5355 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5356 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5357 * targets.c (bfd_elf32_crx_vec): Declare.
5358 (bfd_target_vector): Add bfd_elf32_crx_vec.
5359
85fbca6a
NC
53602004-07-06 Nick Clifton <nickc@redhat.com>
5361
5362 * config.bfd: Add sh-symbian-elf target.
5363 * configure.in: Add bfd_elf32_shl_symbian_vec.
5364 * configure: Regenerate.
5365 * elf-bfd.h (struct elf_backend_data): Add new field
5366 'check_directives'.
1fe1f39c 5367 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 5368 check_directives function, if defined.
1fe1f39c 5369 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 5370 check_directives.
1fe1f39c
NC
5371 * targets.c: Add bfd_elf32_shl_symbian_vec.
5372 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 5373 definition.
1fe1f39c 5374 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 5375 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 5376 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 5377 not already been defined.
1fe1f39c
NC
5378 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5379 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
5380 * sh-symbian-elf target.
5381 * Makefile.am: Add elf32-sh-symbian.c
5382 * Makefile.in: Regenerate.
1fe1f39c 5383
871ec896
JR
53842004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5385
1fe1f39c
NC
5386 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5387 * Makefile.am: Ran make dep-am.
5388 * Makefile.in: Ran make dep-in.
871ec896 5389
c87db184
CF
53902004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5391
5392 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5393 externals properly.
5394
06f2f6af
MS
53952004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5396
5397 * config.bfd: Add want64 to configuration target s390-*-linux*.
5398
b602c853
L
53992004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5400
5401 * bfd.c (bfd_get_section_ident): New.
5402
5403 * elflink.c (elf_link_read_relocs_from_section): Call
5404 bfd_get_section_ident to identify the section when reporting
5405 error.
5406 (_bfd_elf_link_output_relocs): Likewise.
5407 (elf_link_output_extsym): Likewise.
5408 (elf_link_input_bfd): Likewise.
5409 (bfd_elf_gc_record_vtinherit): Likewise.
5410
5411 * bfd-in2.h: Regenerated.
5412
7a2a6943
NC
54132004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5414 Nick Clifton <nickc@redhat.com>
5415
5416 PR 204
5417 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5418 of section symbols to mips_elf_sort_hash_table ().
5419
cdd3575c
AM
54202004-07-01 Alan Modra <amodra@bigpond.net.au>
5421
5422 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5423 change. Comment.
5424 (elf_section_complain_discarded): New function. Handle
5425 .gcc_except_table too.
5426 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5427 in discarded sections.
5428 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5429
21a8f7fa
JW
54302004-06-30 James E Wilson <wilson@specifixinc.com>
5431
5432 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5433 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5434
2de26f35
L
54352004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5436
5437 PR 233
5438 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5439 local references to discarded sections and report their
5440 locations.
5441
72d7a15c
AM
54422004-06-30 Alan Modra <amodra@bigpond.net.au>
5443
5444 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5445 sec_info_type, test section name instead.
5446
e7f0a167
L
54472004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5448
5449 PR 240
5450 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5451 in .init/.fini sections.
5452
bff5f93a
BW
54532004-06-29 Bob Wilson <bob.wilson@acm.org>
5454
5455 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5456 bfd_get_section_limit.
5457
b54d4b07
BW
54582004-06-29 Bob Wilson <bob.wilson@acm.org>
5459
5460 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5461 output section size.
5462
e87a64e1
AM
54632004-06-29 Alan Modra <amodra@bigpond.net.au>
5464
1a23a9e6
AM
5465 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5466 rawsize.
5467 (mmix_elf_perform_relocation): Adjust for above change.
5468 (mmix_elf_relocate_section): Likewise.
5469 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5470 (mmix_elf_get_section_contents): Delete.
5471 (bfd_elf64_get_section_contents): Delete.
5472 (mmix_elf_relocate_section): Zero stub area.
5473 * linker.c (default_indirect_link_order): Alloc max of section size
5474 and rawsize.
5475 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5476 * section.c (bfd_malloc_and_get_section): Likewise.
5477 (struct bfd_section): Update rawsize comment.
5478 * bfd-in2.h: Regenerate.
5479
e87a64e1
AM
5480 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5481
07515404
AM
54822004-06-29 Alan Modra <amodra@bigpond.net.au>
5483
5484 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 5485 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
5486 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5487 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5488 * coff-arm.c (coff_arm_relocate_section): Likewise.
5489 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5490 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5491 (bfd_ns32k_final_link_relocate): Likewise.
5492 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5493 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 5494 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 5495 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 5496 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
5497 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5498 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5499 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5500 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5501 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5502 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5503 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5504 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5505 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5506 * elf32-v850.c (v850_elf_reloc): Likewise.
5507 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5508 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5509 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5510 * elf64-mips.c (mips_elf64_gprel32_reloc)
5511 (mips16_gprel_reloc): Likewise.
5512 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5513 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5514 * elf64-sparc.c (init_insn_reloc): Likewise.
5515 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
5516 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5517 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
5518 (_bfd_mips_elf_generic_reloc): Likewise.
5519 * bfd-in2.h: Regenerate.
5520
3722b82f
AM
55212004-06-28 Alan Modra <amodra@bigpond.net.au>
5522
5523 * bfd-in.h (struct stab_info): Move from stabs.c.
5524 * stabs.c (struct stab_link_includes_table): Delete.
5525 (stab_link_includes_lookup): Delete.
5526 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5527 level of indirection from sinfo parm.
5528 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5529 stabstr section. Adjust hash table accesses.
5530 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5531 alloc. Adjust stab_info test.
5532 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5533 (_bfd_coff_final_link): Adjust stab_info test.
5534 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5535 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5536 in place.
5537 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5538 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5539 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5540 stabstr section. Adjust stab_info test.
5541 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5542 (_bfd_write_stab_strings): Adjust prototypes.
5543 * libbfd.h: Regenerate.
5544 * libcoff.h: Regenerate.
5545 * bfd-in2.h: Regenerate.
5546
727e493d
MK
55472004-06-27 Mark Kettenis <kettenis@gnu.org>
5548
5549 From Miod Vallat <miod@online.fr>:
5550 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5551
146ccdbb
AO
55522004-06-26 Alexandre Oliva <aoliva@redhat.com>
5553
5554 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5555 (struct elf32_mn10300_link_hash_entry): Remove
5556 pcrel_relocs_copied.
5557 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5558 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5559 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5560 and gotoff relocations if the symbol doesn't bind locally. Use
5561 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5562 relocation for PCREL32.
5563 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5564 to test whether a symbol binds locally.
5565 (elf32_mn10300_link_hash_newfunc): Don't initialize
5566 pcrel_relocs_copied.
5567 (_bfd_mn10300_elf_discard_copies): Delete.
5568 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5569
a5fd0812
MK
55702004-06-26 Mark Kettenis <kettenis@gnu.org>
5571
5572 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5573
22bfad37
JB
55742004-06-25 Joel Brobecker <brobecker@gnat.com>
5575
5576 * som.c (som_set_reloc_info): Correct small typo.
5577
097f809a
NC
55782004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5579
5580 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5581 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5582 (m32r_elf_gcsweep_hook): Likewise.
5583 (m32r_elf_check_relocs): Likewise.
5584 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5585 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5586 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5587 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
5588 * bfd-in2.h: Regenerated.
5589 * libbfd.h: Regenerated.
097f809a 5590
6610a52d
L
55912004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5592
5593 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5594 relocation symbol.
5595 (elf64_x86_64_relocate_section): Issue an error for
5596 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5597 against global symbols when building shared library.
5598
eea6121a
AM
55992004-06-24 Alan Modra <amodra@bigpond.net.au>
5600
5601 * section.c (struct sec): Rename "_cooked_size" to "size".
5602 Rename "_raw_size" to "rawsize".
5603 (STD_SECTION): Adjust comments.
5604 (bfd_set_section_size, bfd_get_section_contents): Use size.
5605 (bfd_malloc_and_get_section): New function.
5606 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5607 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5608 Correctly free reloc and contents memory.
5609 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5610 and fake CIE now that we can shink section size to zero.
5611 (_bfd_elf_write_section_eh_frame): Likewise..
5612 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5613 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5614 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5615 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5616 unneeded indirection.
5617 * elf.c (_bfd_elf_section_offset): .. and update call.
5618 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5619 * libbfd.h: Regenerate.
5620 * bfd-in2.h: Regenerate.
5621
5622 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5623 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5624 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5625 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5626 Similarly use "rawsize", if non-zero, in reloc functions to validate
5627 reloc addresses. Use new bfd_malloc_and_get_section in most places
5628 where bfd_get_section_contents was called. Expand all occurrences of
5629 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5630 grok_prstatus and similar functions to "size".
5631 * aix386-core.c (aix386_core_file_p): ..
5632 * aix5ppc-core.c (xcoff64_core_p): ..
5633 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5634 aout_adobe_set_section_contents): ..
5635 * aout-target.h (callback): ..
5636 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5637 MY_bfd_final_link): ..
5638 * aoutf1.h (sunos4_core_file_p): ..
5639 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5640 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5641 final_link, aout_link_input_section): ..
5642 * binary.c (binary_object_p, binary_canonicalize_symtab,
5643 binary_set_section_contents): ..
5644 * bout.c (b_out_callback, b_out_write_object_contents,
5645 b_out_set_section_contents, b_out_bfd_relax_section,
5646 b_out_bfd_get_relocated_section_contents): ..
5647 * cisco-core.c (cisco_core_file_validate): ..
5648 * coff-alpha.c (alpha_ecoff_object_p,
5649 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5650 * coff-arm.c (coff_arm_relocate_section,
5651 bfd_arm_allocate_interworking_sections): ..
5652 * coff-h8300.c (h8300_reloc16_extra_cases,
5653 h8300_bfd_link_add_symbols): ..
5654 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5655 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5656 ppc_bfd_coff_final_link): ..
5657 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5658 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5659 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5660 * coff64-rs6000.c (xcoff64_write_object_contents,
5661 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5662 * coffcode.h (coff_compute_section_file_positions,
5663 coff_write_object_contents): ..
5664 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5665 coff_section_symbol, build_debug_section): ..
5666 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5667 process_embedded_commands, _bfd_coff_link_input_bfd,
5668 _bfd_coff_write_global_sym): ..
5669 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5670 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5671 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5672 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5673 _bfd_dwarf2_find_nearest_line): ..
5674 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5675 ecoff_compute_section_file_positions,
5676 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5677 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5678 _bfd_elf_discard_section_eh_frame_hdr,
5679 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5680 _bfd_elf_write_section_eh_frame,
5681 _bfd_elf_write_section_eh_frame_hdr): ..
5682 * elf-hppa.h (elf_hppa_sort_unwind): ..
5683 * elf-m10200.c (mn10200_elf_relax_section,
5684 mn10200_elf_relax_delete_bytes,
5685 mn10200_elf_get_relocated_section_contents): ..
5686 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5687 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5688 mn10300_elf_relax_delete_bytes,
5689 mn10300_elf_get_relocated_section_contents,
5690 _bfd_mn10300_elf_adjust_dynamic_symbol,
5691 _bfd_mn10300_elf_discard_copies,
5692 _bfd_mn10300_elf_size_dynamic_sections,
5693 _bfd_mn10300_elf_finish_dynamic_sections): ..
5694 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5695 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5696 bfd_elf_set_group_contents, map_sections_to_segments,
5697 elf_sort_sections, assign_file_positions_for_segments,
5698 SECTION_SIZE, copy_private_bfd_data,
5699 _bfd_elf_get_dynamic_reloc_upper_bound,
5700 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5701 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5702 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5703 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5704 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5705 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5706 bfd_elf32_arm_process_before_allocation,
5707 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5708 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5709 elf32_arm_write_section): ..
5710 * elf32-cris.c (cris_elf_grok_prstatus,
5711 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5712 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5713 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5714 elf_cris_discard_excess_dso_dynamics,
5715 elf_cris_discard_excess_program_dynamics): ..
5716 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5717 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5718 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5719 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5720 elf32_frvfdpic_size_dynamic_sections,
5721 elf32_frvfdpic_modify_segment_map,
5722 elf32_frvfdpic_finish_dynamic_sections): ..
5723 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5724 elf32_h8_get_relocated_section_contents): ..
5725 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5726 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5727 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5728 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5729 elf32_hppa_finish_dynamic_sections): ..
5730 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5731 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5732 i370_elf_finish_dynamic_sections): ..
5733 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5734 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5735 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5736 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5737 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5738 * elf32-ip2k.c (ip2k_is_switch_table_128,
5739 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5740 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5741 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5742 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5743 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5744 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5745 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5746 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5747 m32r_elf_get_relocated_section_contents): ..
5748 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5749 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5750 m68hc11_elf_relax_delete_bytes): ..
5751 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5752 m68hc12_elf_size_one_stub): ..
5753 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5754 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5755 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5756 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5757 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5758 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5759 elf32_mips_grok_prstatus): ..
5760 * elf32-or32.c (or32_elf_consth_reloc): ..
5761 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5762 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5763 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5764 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5765 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5766 ppc_elf_final_write_processing): ..
5767 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5768 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5769 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5770 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5771 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5772 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5773 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5774 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5775 * elf32-sh64-com.c (sh64_address_in_cranges,
5776 sh64_get_contents_type): ..
5777 * elf32-sh64.c (sh64_find_section_for_address,
5778 sh64_elf_final_write_processing): ..
5779 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5780 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5781 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5782 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5783 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5784 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5785 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5786 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5787 elf_vax_finish_dynamic_sections): ..
5788 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5789 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5790 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5791 xstormy16_elf_finish_dynamic_sections): ..
5792 * elf32-xtensa.c (xtensa_read_table_entries,
5793 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5794 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5795 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5796 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5797 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5798 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5799 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5800 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5801 xtensa_callback_required_dependence): ..
5802 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5803 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5804 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5805 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5806 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5807 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5808 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5809 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5810 * elf64-hppa.c (allocate_dynrel_entries,
5811 elf64_hppa_size_dynamic_sections,
5812 elf64_hppa_finish_dynamic_sections): ..
5813 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5814 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5815 elf64_mips_grok_prstatus): ..
5816 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5817 mmix_elf_relocate_section, mmix_elf_final_link,
5818 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5819 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5820 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5821 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5822 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5823 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5824 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5825 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5826 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5827 ppc64_elf_finish_dynamic_sections): ..
5828 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5829 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5830 elf_s390_finish_dynamic_sections): ..
5831 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5832 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5833 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5834 sh64_elf64_finish_dynamic_sections): ..
5835 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5836 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5837 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5838 sparc64_elf_finish_dynamic_symbol,
5839 sparc64_elf_finish_dynamic_sections): ..
5840 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5841 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5842 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5843 elf64_x86_64_finish_dynamic_sections): ..
5844 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5845 * elfcode.h (elf_slurp_reloc_table): ..
5846 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5847 elf_finalize_dynstr, elf_link_add_object_symbols,
5848 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5849 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5850 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5851 elf32_mips_grok_prstatus): ..
5852 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5853 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5854 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5855 elfNN_ia64_finish_dynamic_sections): ..
5856 * elfxx-mips.c (mips_elf_create_procedure_table,
5857 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5858 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5859 mips_elf_global_got_index, mips_elf_multi_got,
5860 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5861 mips_elf_allocate_dynamic_relocations,
5862 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5863 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5864 _bfd_mips_elf_always_size_sections,
5865 _bfd_mips_elf_size_dynamic_sections,
5866 _bfd_mips_elf_finish_dynamic_symbol,
5867 _bfd_mips_elf_finish_dynamic_sections,
5868 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5869 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5870 _bfd_elf_mips_get_relocated_section_contents,
5871 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5872 * hp300hpux.c (callback): ..
5873 * hppabsd-core.c (make_bfd_asection): ..
5874 * hpux-core.c (make_bfd_asection): ..
5875 * i386linux.c (linux_link_create_dynamic_sections,
5876 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5877 * i386msdos.c (msdos_write_object_contents): ..
5878 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5879 os9k_set_section_contents): ..
5880 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5881 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5882 ieee_write_section_part, do_with_relocs, do_as_repeat,
5883 do_without_relocs, ieee_write_debug_part, init_for_output,
5884 ieee_set_section_contents): ..
5885 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5886 * irix-core.c (do_sections, make_bfd_asection): ..
5887 * libaout.h (aout_section_merge_with_text_p): ..
5888 * libbfd.c (_bfd_generic_get_section_contents,
5889 _bfd_generic_get_section_contents_in_window): ..
5890 * linker.c (default_indirect_link_order): ..
5891 * lynx-core.c (make_bfd_asection): ..
5892 * m68klinux.c (linux_link_create_dynamic_sections,
5893 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5894 * mach-o.c (bfd_mach_o_make_bfd_section,
5895 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5896 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5897 bfd_mach_o_scan_read_segment): ..
5898 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5899 _bfd_merge_sections): ..
5900 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5901 mmo_map_set_sizes, mmo_canonicalize_symtab,
5902 mmo_internal_write_section, mmo_write_object_contents): ..
5903 * netbsd-core.c (netbsd_core_file_p): ..
5904 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5905 nlm_alpha_set_public_section): ..
5906 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5907 * nlm32-sparc.c (nlm_sparc_write_import): ..
5908 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5909 nlm_compute_section_file_positions): ..
5910 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5911 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5912 * opncls.c (get_debug_link_info): ..
5913 * osf-core.c (make_bfd_asection): ..
5914 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5915 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5916 final_link, aout_link_input_section): ..
5917 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5918 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5919 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5920 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5921 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5922 * ptrace-core.c (ptrace_unix_core_file_p): ..
5923 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5924 _bfd_final_link_relocate, bfd_generic_relax_section,
5925 bfd_generic_get_relocated_section_contents): ..
5926 * reloc16.c (bfd_coff_reloc16_relax_section,
5927 bfd_coff_reloc16_get_relocated_section_c): ..
5928 * riscix.c (riscix_some_aout_object_p): ..
5929 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5930 * sco5-core.c (make_bfd_asection): ..
5931 * simple.c (bfd_simple_get_relocated_section_contents): ..
5932 * som.c (som_object_setup, setup_sections, som_prep_headers,
5933 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5934 som_set_reloc_info, som_get_section_contents,
5935 som_bfd_link_split_section): ..
5936 * sparclinux.c (linux_link_create_dynamic_sections,
5937 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5938 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5939 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5940 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5941 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5942 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5943 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5944 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5945 sunos_finish_dynamic_link): ..
5946 * syms.c (_bfd_stab_section_find_nearest_line): ..
5947 * tekhex.c (first_phase, tekhex_set_section_contents,
5948 tekhex_write_object_contents): ..
5949 * trad-core.c (trad_unix_core_file_p): ..
5950 * versados.c (process_esd, process_otr, process_otr): ..
5951 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5952 * vms-misc.c (add_new_contents): ..
5953 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5954 * vms.c (vms_set_section_contents): ..
5955 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5956 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5957 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5958 * xsym.c (bfd_sym_scan): .. See above.
5959
bf8b15af
L
59602004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5961
5962 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5963 calling _bfd_merged_section_offset only for section symbols.
5964
d1c6de6f
AM
59652004-06-22 Alan Modra <amodra@bigpond.net.au>
5966
5967 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5968 for handling SEC_MERGE symbols in relax_section.
5969
aa02cc63
AO
59702004-06-21 Alexandre Oliva <aoliva@redhat.com>
5971
5972 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5973 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5974 linked together. Mark the result as h8300sx code.
5975
aee6f5b4
AO
59762004-06-21 Alexandre Oliva <aoliva@redhat.com>
5977
5978 * elf-bfd.h (struct elf_backend_data): Added
5979 elf_backend_omit_section_dynsym.
5980 (_bfd_elf_link_omit_section_dynsym): Declare.
5981 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5982 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5983 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5984 (_bfd_elf_link_renumber_dynsyms): ... this function.
5985 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5986 _bfd_elf_link_omit_section_dynsym).
5987 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5988
05576f10
NC
59892004-06-21 Nick Clifton <nickc@redhat.com>
5990
5991 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5992 flags.
5993
02d5a37b
JG
59942004-06-17 Jerome Guitton <guitton@gnat.com>
5995
5996 * bfd-in.h (bfd_cache_close_all): New function declaration.
5997 * bfd-in2.h: Regenerate.
5998 * cache.c (bfd_cache_close_all): New function definition.
5999
d2bef492
MK
60002004-06-16 Mark Kettenis <kettenis@gnu.org>
6001
6002 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6003 4.10 and beyond.
6004 * configure: Regenerate.
6005
8528d62e
DJ
60062004-06-16 Daniel Jacobowitz <dan@debian.org>
6007
6008 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6009 the pre-existing section.
6010
911d08a7
AM
60112004-06-15 Alan Modra <amodra@bigpond.net.au>
6012
6013 * section.c (struct sec): Remove usused flags. Reorganize a little.
6014 (bfd_get_section_size_before_reloc): Delete.
6015 (bfd_get_section_size_after_reloc): Delete.
6016 (STD_SECTION): Update.
6017 (bfd_get_section_size_now): Delete.
6018 (bfd_set_section_contents): Don't referece reloc_done.
6019 (bfd_get_section_contents): Remove reloc_done comment.
6020 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6021 reloc_done.
6022 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6023 * ecoff.c (bfd_debug_section): Update initializer.
6024 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6025 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6026 * bfd-in.h (bfd_section_size): Expand.
6027 (bfd_get_section_size): New macro.
6028 * bfd-in2.h: Regenerate.
6029 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6030 bfd_get_section_size_before_reloc with bfd_get_section_size.
6031 * coffcode.h (coff_write_object_contents): Likewise.
6032 * coffgen.c (build_debug_section): Likewise.
6033 * dwarf1.c (parse_line_table): Likewise.
6034 (_bfd_dwarf1_find_nearest_line): Likewise.
6035 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6036 * i386msdos.c (msdos_write_object_contents): Likewise.
6037 * pdp11.c (squirt_out_relocs): Likewise.
6038 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6039 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6040
092dcd75
CD
60412004-06-14 Chris Demetriou <cgd@broadcom.com>
6042
6043 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6044 removal) with updated comment.
6045 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6046 BFD_RELOC_32_PCREL.
6047 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6048 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6049
3ffa5234
AM
60502004-06-12 Alan Modra <amodra@bigpond.net.au>
6051
6052 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6053 overflow on branches to undefweaks.
6054
e9edc808
MR
60552004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6056
6057 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6058 as ecoff_section_data() does not return a valid lvalue.
6059
a873f25a
AO
60602004-06-09 Alexandre Oliva <aoliva@redhat.com>
6061
a9b881be
AO
6062 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6063 (elf_link_add_object_symbols): Likewise.
6064
a873f25a
AO
6065 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6066 (elf_backend_reloc_type_class): New.
6067
eef0f186
MK
60682004-06-08 Mark Kettenis <kettenis@gnu.org>
6069
6070 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6071 netbsd-core.lo.
6072 * configure: Regenerate.
6073
822392ce
DJ
60742004-06-07 Daniel Jacobowitz <dan@debian.org>
6075
6076 From: Albert Chin-A-Young <china@thewrittenword.com>
6077 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6078 to unsigned int.
6079
9f2e92c5
L
60802004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6081
6082 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6083 change.
6084
dd90f1b2
DD
60852004-05-28 DJ Delorie <dj@redhat.com>
6086
6087 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6088 for linking, but otherwise adjust reloc for merged sections.
6089
5dd23ec1
L
60902004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6091
6092 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6093 _bfd_merged_section_offset for local symbols.
6094
f6f9408f
JR
60952004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6096
6097 * Makefile.am: Regenerate dependencies.
6098 * Makefile.in: Regenerate.
6099 * archures.c: Add bfd_mach_sh3_nommu .
6100 * bfd-in2.h: Regenerate.
6101 * cpu-sh.c: Add sh3-nommu architecture.
6102 (bfd_to_arch_table): Create new table.
6103 (sh_get_arch_from_bfd_mach): Create new function.
6104 (sh_get_arch_up_from_bfd_mach): Create new function.
6105 (sh_merge_bfd_arch): Create new function.
6106 * elf32-sh.c (sh_ef_bfd_table): Add table.
6107 (sh_elf_check_relocs): Replace switch statement with
6108 use of sh_ef_bfd_table .
6109 (sh_elf_get_flags_from_mach): Add new function.
6110 (sh_find_elf_flags): Likewise.
6111 (sh_elf_copy_private_data): Replace most of non-elf contents
6112 with a call to sh_merge_bfd_arch() .
6113
d866f350
MC
61142004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6115
6116 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6117 * Makefile.in: Regenerate.
6118
1055df0f
AO
61192004-05-27 Alexandre Oliva <aoliva@redhat.com>
6120
6121 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6122 custom calling conventions for dynamic symbols.
6123 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6124 symbol if it's an alias to a global one.
6125
b3096250
L
61262004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6127
6128 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6129 change.
6130
9bb351fd
AO
61312004-05-27 Alexandre Oliva <aoliva@redhat.com>
6132
6133 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6134 loop over hashes.
6135
e49f5022
AM
61362004-05-26 Alan Modra <amodra@bigpond.net.au>
6137
6138 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6139 for SHT_GROUP sections.
6140
57ceae94
AM
61412004-05-25 Alan Modra <amodra@bigpond.net.au>
6142
6143 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6144 section data here..
6145 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6146 * merge.c: Formatting. Remove unnecessary casts. Expand
6147 bfd_get_section_alignment macro.
6148 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6149 use throughout file.
6150 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6151 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6152 section name to determine sinfo group, instead test output section
6153 and alignment.
6154 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6155 _bfd_strip_section_from_output rather than just twiddling flags.
6156 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6157 (_bfd_merge_sections): Update prototype.
6158 * libbfd.h: Regenerate.
6159
c6f8758f 61602004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
6161
6162 * netbsd-core.c: Correctly indent section that sets architecture
6163 from machine ID.
6164
c6f8758f
NC
6165 From Miod Vallat <miod@online.fr>:
6166 * m88kopenbsd.c: New file.
6167 * targets.c (m88k_openbsd_vec): New.
6168 * config.bfd: Add m88k-*-openbsd*.
6169 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6170 (m88kopenbsd_vec): New.
6171 * configure: Regenerate.
6172 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6173 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6174 Run "make dep-am".
6175 * Makefile.in: Regenerate.
6176 * po/SRC-POTFILES.in: Regenerate.
6177
7d7e6bc4
NC
61782004-05-24 Nick Clifton <nickc@redhat.com>
6179
6180 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6181 introduced by hash table size patch.
6182
bc286f95
BE
61832004-05-22 Ben Elliston <bje@au.ibm.com>
6184
6185 * configure.in (is_release): Remove.
6186 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6187 (AC_OUTPUT): Don't output bfdver.h from version.h.
6188 * configure: Regenerate.
6189 * Makefile.am (RELEASE): New variable.
6190 (bfdver.h): New target.
6191 * Makefile.in: Regenerate.
6192 * doc/Makefile.in: Likewise.
6193
8b89a4eb
BE
61942004-05-22 Ben Elliston <bje@au.ibm.com>
6195
6196 * Makefile.am (config.status): Don't depend on version.h.
6197 * Makefile.in: Regenerate.
6198
753731ee
AM
61992004-05-22 Alan Modra <amodra@bigpond.net.au>
6200
6201 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6202 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6203 * libbfd.h: Regenerate.
6204 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6205 (_bfd_elf_rel_local_sym): Likewise.
6206 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6207 (elf_link_input_bfd): Likewise.
6208 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6209 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6210 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6211 (elfNN_ia64_relocate_section): Likewise.
6212
2d643429
NC
62132004-05-21 Andy Chittenden <achittenden@bluearc.com>
6214
6215 * hash.c (bfd_default_hash_table_size): New variable.
6216 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6217 (bfd_hash_set_default_size): New function. Set the default size
6218 to a selected prime number close to the argument. Document new
6219 function.
6220 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6221 * bfd-in2.h: Regenerate.
6222 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6223 * Makefile.in: Regenerate.
6224
8377c19c
MK
62252004-05-21 Mark Kettenis <kettenis@gnu.org>
6226
6227 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6228 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6229 arm, m68k, m88k and hppa core files.
6230
69fd4758
NC
62312004-05-21 Nick Clifton <nickc@redhat.com>
6232
6233 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6234 (bfd_bwrite): Likewise.
6235 (bfd_tell): Likewise.
6236 (bfd_flush): Likewise.
6237 (bfd_stat): Likewise.
6238 (bfd_seek): Likewise.
6239 (bfd_get_mtime): Likewise.
6240 (bfd_get_size): Likewise.
6241
cd917290
BE
62422004-05-19 Ben Elliston <bje@au.ibm.com>
6243
6244 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6245
1b09e940
NC
62462004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6247
6248 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6249 (bfd_generic_openr_next_archived_file): Likewise.
6250
096c35a7
BW
62512004-05-17 Bob Wilson <bob.wilson@acm.org>
6252
6253 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6254 section names by inserting a new substring after .gnu.linkonce, except
6255 for .gnu.linkonce.t.* where the "t." is replaced.
6256
eea6121a 62572004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
6258
6259 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6260 (m68-*-lynxos* case): Likewise.
6261 (powerpc-*-lyxnos* case): New case.
6262 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6263
80fccad2
BW
62642004-05-17 David Heine <dlheine@tensilica.com>
6265
6266 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6267 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6268 * bfd.c (bfd_copy_private_header_data): Define.
6269 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6270 interface.
6271 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6272 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6273 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6274 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6275 segments by calling copy_private_bfd_data.
6276 (_bfd_elf_copy_private_header_data): Define.
6277 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6278 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6279 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6280 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6281 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6282 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6283 * som.c (som_bfd_copy_private_header_data): Define.
6284 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6285 * vms.c (vms_bfd_copy_private_header_data): Define.
6286 * bfd-in2.h: Regenerate.
6287 * libbfd.h: Regenerate.
6288
c5ae1840
TS
62892004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6290
6291 * elfxx-mips.c (MINUS_TWO): Define.
6292 (mips_elf_higher, mips_elf_highest,
6293 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6294 some bfd_vma values.
6295 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6296
a99cf92b
DA
62972004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6298
6299 * som.c (log2): Rename to exact_log2. Adjust all callers.
6300
0da76f83
NC
63012004-05-13 Paul Brook <paul@codesourcery.com>
6302
c273895f 6303 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
6304 dwarf3 format CIE entries. Remove comment about the size of the
6305 ra_column field. It is now correctly deduced.
0da76f83 6306
4b363073
NC
63072004-05-13 Joel Sherrill <joel@oarcorp.com>
6308
6309 * config.bfd (or32-*-rtems*): Switch to elf.
6310
9598fbe5
NC
63112004-05-13 Nick Clifton <nickc@redhat.com>
6312
6313 * po/fr.po: Updated French translation.
6314
8c37241b
JJ
63152004-05-11 Jakub Jelinek <jakub@redhat.com>
6316
0306b3bf 6317 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
6318 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6319 Adjust counting of last_local.
6320 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6321 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6322 created by the linker nor !SHF_ALLOC.
6323
6324 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6325 DT_PLTGOT to the start of the .got.plt section instead of the
6326 .got output section. Set sh_entsize for .got section in addition
6327 to .got.plt.
6328 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6329 is at sgot->output_section->vma.
6330 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6331 DT_PLTGOT to the start of the .got.plt section instead of the
6332 .got output section.
6333 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6334 is at sgot->output_section->vma. Set sh_entsize for .got section
6335 in addition to .got.plt.
6336 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6337 (bfd_section_from_phdr): Likewise.
6338 (map_sections_to_segments): Likewise.
6339 (assign_file_positions_for_segments): Likewise.
6340 (get_program_header_size): Likewise.
6341 * elflink.c (bfd_elf_size_dynamic_sections): Set
6342 elf_tdata (output_bfd)->relro from info->relro.
6343 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6344
3f980e41
AO
63452004-05-08 Alexandre Oliva <aoliva@redhat.com>
6346
6347 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6348 a zero symndx for which we hadn't accounted a dynamic relocation.
6349 (_frvfdpic_add_rofixup): Likewise.
6350
d70270c5 63512004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 6352 DJ Delorie <dj@redhat.com>
d70270c5
BF
6353
6354 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6355 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6356 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6357 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6358
7e9f3bd6
AO
63592004-05-07 Alexandre Oliva <aoliva@redhat.com>
6360
6361 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6362 immediately if there's no link info.
6363 (elf32_frvfdpic_copy_private_bfd_data): New.
6364 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6365
eb61d2d6
ZW
63662004-05-06 Zack Weinberg <zack@codesourcery.com>
6367
6368 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6369 filename argument is null; do not call strlen on a null pointer.
6370
ecb2d096
DJ
63712004-05-06 Daniel Jacobowitz <drow@mvista.com>
6372
6373 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6374 special case.
6375
43850d5b
AO
63762004-05-05 Alexandre Oliva <aoliva@redhat.com>
6377
6378 * configure.in (bfd_elf32_frvfdpic_vec): New.
6379 * configure: Rebuilt.
6380 * targets.c (bfd_elf32_frvfdpic_vec): New.
6381 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6382 on the latter.
6383 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6384 frvfdpic instead of frv. Rearrange elf-target macros such that
6385 the FDPIC-specific ones are only defined for this new target
6386 vector.
6387 (bfd_elf32_frvfdpic_vec): Declare.
6388 (IS_FDPIC): New.
6389 (elf32_frv_relocate_section): Use it to enable segment checking
6390 and to control rofixup emission. Add output section vma to
6391 applied relocation in non-LOAD non-ALLOC sections. Use
6392 _bfd_error_handler for errors.
6393 (_frv_create_got_section): Create .rel.got and .rofixup only in
6394 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6395 linker script.
6396 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6397 (elf32_frvfdpic_modify_segment_map): Likewise.
6398 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6399 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6400 error message if we miscompute the rofixup size.
6401 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6402 (frvfdpic_elf_encode_eh_address): Likewise.
6403 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6404 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6405 relocs. Reject unknown relocation types.
6406 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6407 (frv_elf_merge_private_bfd_data): Likewise.
6408 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6409 0x4000 for newly-added elf32-frvfdpic.
6410
06fc8a8c
NC
64112004-05-05 Nick Clifton <nickc@redhat.com>
6412
6413 PR/136
6414 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6415 returning NULL as most users of this function do not check its
6416 return value.
33216455
NC
6417 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6418 of bfd_cache_lookup().
6419 * sco5-core.c (sco5_core_file_p): Likewise.
6420 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
6421
64222004-05-05 Nick Clifton <nickc@redhat.com>
6423
6424 * cache.c (bfd_cache_lookup): Improve formatting.
6425 * archive.c: Fix formatting.
6426
6b6e92f4
NC
64272004-05-05 Peter Barada <peter@the-baradas.com>
6428
6429 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6430 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6431 * bfd-in2.h(bfd_architecture): Regenerate.
6432
6a8d1586
AM
64332004-05-03 Alan Modra <amodra@bigpond.net.au>
6434
6435 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6436 SEC_MERGE sections.
6437 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6438 those against discarded link-once and SEC_MERGE section symbols.
6439
fafe6678
L
64402004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6441
6442 * section.c (bfd_get_section_by_name_if): New.
6443 * bfd-in2.h: Regenerated.
6444
ad7b9a36
AM
64452004-05-02 Alan Modra <amodra@bigpond.net.au>
6446
6447 * som.c (som_bfd_is_group_section): Define.
6448
73499ab8
AM
64492004-05-01 Alan Modra <amodra@bigpond.net.au>
6450
6451 * section.c (bfd_make_section_anyway): Copy the whole
6452 bfd_hash_entry, not just "next" from existing entry.
6453
45c5e9ed
L
64542004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6455
6456 * elf.c (bfd_section_from_shdr): Maintain the section order in
6457 a section group.
6458 (special_sections): Add ".note.GNU-stack".
6459 (elf_fake_sections): Handle section group for relocatable
6460 link..
6461
bc87dd2e
L
64622004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6463
6464 * section.c (bfd_sections_find_if): New.
6465 * bfd-in2.h: Regenerated.
6466
72adc230
AM
64672004-04-30 Alan Modra <amodra@bigpond.net.au>
6468
6469 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6470
6471 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6472 * elf.c (bfd_elf_is_group_section): New function.
6473 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6474 * section.c (bfd_generic_is_group_section): New function.
6475 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6476 (BFD_JUMP_TABLE_LINK): Adjust.
6477 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6478 * aout-target.h (MY_bfd_is_group_section): Define.
6479 * aout-tic30.c (MY_bfd_is_group_section): Define.
6480 * bfd.c (bfd_is_group_section): Define.
6481 * binary.c (binary_bfd_is_group_section): Define.
6482 * bout.c (b_out_bfd_is_group_section): Define.
6483 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6484 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6485 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6486 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6487 * coffcode.h (coff_bfd_is_group_section): Define.
6488 * i386msdos.c (msdos_bfd_is_group_section): Define.
6489 * i386os9k.c (os9k_bfd_is_group_section): Define.
6490 * ieee.c (ieee_bfd_is_group_section): Define.
6491 * ihex.c (ihex_bfd_is_group_section): Define.
6492 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6493 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6494 * mmo.c (mmo_bfd_is_group_section): Define.
6495 * nlm-target.h (nlm_bfd_is_group_section): Define.
6496 * oasys.c (oasys_bfd_is_group_section): Define.
6497 * pef.c (bfd_pef_bfd_is_group_section): Define.
6498 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6499 * srec.c (srec_bfd_is_group_section): Define.
6500 * tekhex.c (tekhex_bfd_is_group_section): Define.
6501 * versados.c (versados_bfd_is_group_section): Define.
6502 * vms.c (vms_bfd_is_group_section): Define.
6503 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6504 * bfd-in2.h: Regenerate.
6505 * libbfd.h: Regenerate.
6506
20f0a1ad
AM
65072004-04-30 Alan Modra <amodra@bigpond.net.au>
6508
6509 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6510
f7458fc9 65112004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
6512
6513 * configure.in: Update version to 2.15.91.
6514 * configure: Regenerate.
6515
8a7140c3
NC
65162004-04-29 Brian Ford <ford@vss.fsi.com>
6517
6518 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6519 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6520 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6521 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6522 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6523 .gnu.linkonce.wi. sections.
6524 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6525 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6526 .gnu.linkonce.wi..
6527 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6528 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6529
3e722fb5
CD
65302004-04-28 Chris Demetriou <cgd@broadcom.com>
6531
6532 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6533 * bfd-in2.h: Regenerate.
6534 * libbfd.h: Likewise.
6535
351e2b5a
DA
65362004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6537
6538 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6539 dup_common fields.
6540 (setup_sections): Use som_subspace_dictionary_record struct instead
6541 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6542 is_comdat, is_common or dup_common.
6543 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6544 is_comdat, is_common and dup_common in section subspace_dict from
6545 copy_data.
6546 (som_begin_writing): Use som_subspace_dictionary_record struct.
6547 (som_finish_writing): Likewise.
6548 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6549 is_common and dup_common flags in info for symbol. Add comment
6550 regarding linker support for these fields. Slightly reorganize
6551 function.
6552 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6553 dup_common fields in symbol table from symbol info.
6554 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6555 arguments. Set corresponding fields in copy_data. Change all callers.
6556 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6557 symbol table.
6558 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6559 * som.h (som_subspace_dictionary_record): Define.
6560 (som_copyable_section_data_struct): Add is_comdat, is_common and
6561 dup_common fields.
6562 (som_section_data_struct): Use som_subspace_dictionary_record struct
6563 instead of subspace_dictionary_record.
6564 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6565
3ba3bc8c
BW
65662004-04-27 Bob Wilson <bob.wilson@acm.org>
6567
6568 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6569 if set. Check reloc_done flag before applying relocations. Use
6570 output addresses, both when applying relocations and when comparing
6571 against the specified section.
6572 (elf_xtensa_relocate_section): Use output address to check if dynamic
6573 reloc is in a literal pool. Set section's reloc_done flag.
6574
beb8df56
L
65752004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6576
6577 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6578 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6579 section.
6580 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6581 section.
6582
1829f4b2
AM
65832004-04-27 Alan Modra <amodra@bigpond.net.au>
6584
6585 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6586 structure field removed in 2004-04-24 patch.
6587 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6588
6589 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6590 Constify hdr arg.
6591 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6592 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6593 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6594 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6595 field before calling elf_backend_section_flags.
6596
4030e8f6
CD
65972004-04-24 Chris Demetriou <cgd@broadcom.com>
6598
6599 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6600 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6601 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6602 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6603 and BFD_RELOC_32_PCREL.
6604 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6605 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6606 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6607 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6608 (mips_elf_next_relocation): Move comment about matching HI/LO
6609 relocations to...
6610 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6611 R_MIPS_GNU_REL_HI16.
6612
3e27568f
CD
66132004-04-23 Chris Demetriou <cgd@broadcom.com>
6614
6615 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6616 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6617 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6618 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6619 and update comments to reflect current usage.
6620 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6621 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6622 for MIPS_R_PCREL16.
6623 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6624 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6625 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6626 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6627 type number to be MIPS_R_PCREL16.
6628 (mips_relocate_section): Remove support for link-time relaxation
6629 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6630 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6631 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6632 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6633 relaxation of branches used by embedded-PIC.
6634 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6635 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6636 related members, update comment.
6637 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6638 code related to embedded-PIC.
6639 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6640 initialization of now-removed 'adjust' member of
6641 'struct ecoff_debug_info'.
6642
b32de0bc 66432004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
6644
6645 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6646
955af222
PB
66472004-04-21 Philip Blundell <pb@nexus.co.uk>
6648
6649 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6650 relocs for locally defined symbols during -shared final link.
6651 (elf32_arm_final_link_relocate): Likewise.
6652
47a9f7b3
JJ
66532004-04-22 Jakub Jelinek <jakub@redhat.com>
6654
6655 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6656 ELF_LINK_POINTER_EQUALITY_NEEDED.
6657 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6658 if r_type is not R_X86_64_PC32.
6659 (elf64_x86_64_finish_dynamic_symbol): If
6660 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6661 SHN_UNDEF symbols.
6662
1f1799d5
KK
66632004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6664
6665 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6666 (elf_backend_plt_sym_val): Define.
6667
0fdea5ce
AC
66682004-04-22 Andrew Cagney <cagney@redhat.com>
6669
6670 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6671
5198ba8b
DA
66722004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6673
eb61d2d6 6674 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
6675 make_bfd_asection.
6676 * som.c (som_set_section_contents): Constantify second argument.
6677 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6678 (som_object_setup): Rework to avoid warning.
6679 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6680 Likewise.
6681
fe2e161a
AC
66822004-04-22 Andrew Cagney <cagney@redhat.com>
6683
6684 * cache.c (bfd_cache_close): Check for a previously closed file.
6685
4c45e5c9
JJ
66862004-04-22 Jakub Jelinek <jakub@redhat.com>
6687
6688 * bfd.c (bfd_get_synthetic_symtab): Define.
6689 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6690 NAME##_get_synthetic_symtab.
6691 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6692 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6693 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6694 relplt_name fields.
6695 (_bfd_elf_get_synthetic_symtab): New prototype.
6696 * elfcode.h (elf_get_synthetic_symtab): Define.
6697 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6698 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6699 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6700 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6701 * bfd-in2.h: Rebuilt.
6702 * libbfd.h: Rebuilt.
6703 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6704 (elf_backend_plt_sym_val): Define.
6705 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6706 (elf_backend_plt_sym_val): Define.
6707 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6708 (elf_backend_plt_sym_val): Define.
6709 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6710 (elf_backend_plt_sym_val): Define.
6711 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6712 (elf_backend_plt_sym_val): Define.
6713 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6714 (elf_backend_plt_sym_val): Define.
6715 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6716 (elf_backend_plt_sym_val): Define.
6717 * aout-target.h (MY_get_synthetic_symtab): Define.
6718 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6719 * coff-rs6000.c (rs6000coff_vec): Add
6720 _bfd_nodynamic_get_synthetic_symtab.
6721 (pmac_xcoff_vec): Likewise.
6722 * coff64-rs6000.c (rs6000coff64_vec): Add
6723 _bfd_nodynamic_get_synthetic_symtab.
6724 (aix5coff64_vec): Likewise.
6725 * sunos.c (MY_get_synthetic_symtab): Define.
6726 * vms.c (vms_get_synthetic_symtab): Define.
6727
d2f7ecac
NC
67282004-04-22 Nick Clifton <nickc@redhat.com>
6729
6730 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6731
fd99574b
NC
67322004-04-22 Peter Barada <peter@the-baradas.com>
6733
6734 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6735 * bfd2-in.h: Regenerate.
6736 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6737
23867d67
CD
67382004-04-21 Chris Demetriou <cgd@broadcom.com>
6739
6740 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6741 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6742 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6743 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6744 * bfd-in2.h: Regenerate.
6745
2c8c90bc
BW
67462004-04-21 Bob Wilson <bob.wilson@acm.org>
6747
6748 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6749 require relocations against a weak symbol to reference the same
6750 symbol hash entry if not a final, static link.
6751 (get_cached_value, add_value_map): Add final_static_link argument.
6752 (remove_literals): Pass final_static_link argument as needed.
6753
40838a72
AC
67542004-04-21 Andrew Cagney <cagney@redhat.com>
6755
6756 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6757 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6758 (opncls_bwrite, opncls_bclose, opncls_bflush)
6759 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6760 bfd iovec that uses function callbacks.
6761 (bfd_close): Use the iovec's bclose.
6762 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6763 (cache_bclose, cache_bflush, cache_bstat)
6764 (cache_iovec): New functions and global variable, implement a
6765 cache "iovec", where applicable set bfd_error.
6766 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6767 * bfdio.c (struct bfd_iovec): Define.
6768 (real_read): Delete function.
6769 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6770 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6771 assume that bread and bwrite set bfd_error.
6772 * bfd.c (struct bfd): Add "iovec", update comments.
6773 * bfd-in2.h, libbfd.h: Re-generate.
6774
7f919c84
AC
67752004-04-21 Andrew Cagney <cagney@redhat.com>
6776
6777 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6778
715df9b8
EB
67792004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6780
6781 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6782 (bfd_elf_gc_sections): Fail if a shared object is being created.
6783 Do not fail if dynamic sections have been created. Instead call
6784 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6785 dynamically referenced symbols. Do not mark the whole graph
6786 rooted at .eh_frame, only the section proper.
6787
6482c264
NC
67882004-04-20 DJ Delorie <dj@redhat.com>
6789
6790 * reloc.c: Add BFD_RELOC_32_SECREL.
6791 * bfd-in2.h: Regenerate.
6792 * libbfd.h: Likewise.
6793 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6794 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6795 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6796
4dc570c2
JJ
67972004-04-19 Jakub Jelinek <jakub@redhat.com>
6798
6799 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6800 relocs against hidden/protected undefweak symbols properly.
6801 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6802
0b60d5d3
MK
68032004-04-18 Mark Kettenis <kettenis@gnu.org>
6804
6805 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6806 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6807 core files.
6808
d48bdb99
AM
68092004-04-17 Brian Ford <ford@vss.fsi.com>
6810
6811 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6812 filepos for the SizeOfHeaders field.
6813 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6814 overflow.
6815 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6816
57a1784e
AM
68172004-04-16 Alan Modra <amodra@bigpond.net.au>
6818
6819 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6820 change reloc_done. Set and restore _cooked_size.
6821 (RETURN): Delete.
6822
d1ad3f6f
MK
68232004-04-15 Mark Kettenis <kettenis@gnu.org>
6824
6825 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6826 core files.
6827
3d1bca9d
NC
68282004-04-15 Nick Clifton <nickc@redhat.com>
6829
6830 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6831
019b892f
AM
68322004-04-15 Alan Modra <amodra@bigpond.net.au>
6833
6834 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6835
15b43f48
AM
68362004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6837
6838 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6839 when it is a definition.
6840
6de00a78
AM
68412004-04-14 Alan Modra <amodra@bigpond.net.au>
6842
6843 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6844 when statically linking PIC code.
6845 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6846
279500de
TS
68472004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6848
6849 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6850 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6851 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6852 * configure: Regenerate.
6853
ccf2f652
RS
68542004-04-08 Richard Sandiford <rsandifo@redhat.com>
6855
6856 * elflink.c: Include libiberty.h.
6857 * Makefile.am (elflink.lo): Depend on libiberty.h.
6858 * Makefile.in: Regenerate.
6859
ca07892d
DJ
68602004-04-06 Daniel Jacobowitz <drow@mvista.com>
6861
6862 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6863 ".MIPS.stubs".
6864
a5a58ba4
L
68652004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6866
6867 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6868 reserve the memory for dynamic linker
6869
24d18d30
MK
68702004-04-05 Mark Kettenis <kettenis@gnu.org>
6871
6872 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6873 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6874
a4d7b4b5
L
68752004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6876
6877 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6878 RELOC_FOR_GLOBAL_SYMBOL.
6879 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6880
1f433d93
L
68812004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6882
6883 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6884 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6885
e489d0ae
PB
68862004-04-01 Paul Brook <paul@codesourcery.com>
6887
6888 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6889 * elf32-arm.h (struct elf32_elf_section_map): New.
6890 (struct _arm_elf_section_data): New.
6891 (elf32_arm_section_data): Define.
6892 (struct elf32_arm_link_hash_table): Add byteswap_code.
6893 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6894 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6895 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6896 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6897 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6898 (bfd_elf32_new_section_hook, elf_backend_write_section,
6899 elf_backend_link_output_symbol_hook): Define.
6900
66a695f0
NC
69012004-04-01 Andy Chittenden <achittenden@bluearc.com>
6902
6903 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6904 that keeps the characters in a B_INCL..B_EINCL range.
6905 (_bfd_link_section_stabs): When computing the sum of the
6906 characters in a B_INCL..B_EINCL range also keep a copy of those
6907 characters. Use this information to distinguish between
6908 include sections that have the same sum and the same length
6909 but which are nevertheless unique.
6910
8375c36b
PB
69112004-03-31 Paul Brook <paul@codesourcery.com>
6912
6913 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6914 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6915
a56b48eb
NC
69162004-03-31 Andy Chittenden <achittenden@bluearc.com>
6917
6918 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6919 to 'sum_chars' and add field 'num_chars'.
6920 (_bfd_link_section_stabs): When computing the sum of the
6921 characters in a B_INCL..B_EINCL range also keep a count of the
6922 number of characters. Use this information to help distinguish
6923 between include sections when have the same sum but which
6924 nevertheless are still unique.
6925
1fbc7e7a 69262004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
6927
6928 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6929
0949843d 69302004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 6931 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
6932
6933 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6934 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6935 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6936 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6937 (cpu-cr16c.lo): New target.
6938 (elf32-cr16c.lo): Likewise.
6939 * Makefile.in: Regenerate.
6940 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6941 (bfd_archures_list): Add bfd_cr16c_arch.
6942 * config.bfd: Handle cr16c-*-elf*.
6943 * configure.in: Handle bfd_elf32_cr16c_vec.
6944 * configure: Regenerate.
6945 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6946 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6947 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6948 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6949 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6950 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6951 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6952 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6953 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6954 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6955 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6956 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6957 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6958 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6959 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6960 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6961 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6962 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6963 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6964 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6965 * targets.c (bfd_elf32_cr16c_vec): Declare.
6966 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6967 * cpu-cr16c.c: New file.
6968 * elf32-cr16c.c: Likewise.
6969 * libbfd.h: Regenerate.
6970 * bfd-in2.h: Likewise.
6971
baaff79e
JJ
69722004-03-30 Jakub Jelinek <jakub@redhat.com>
6973
6974 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6975
c152c796
AM
69762004-03-27 Alan Modra <amodra@bigpond.net.au>
6977
6978 * Makefile.am: Remove all mention of elflink.h.
6979 * Makefile.in: Regenerate.
6980 * bfd-in.h (bfd_elf_discard_info): Declare.
6981 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6982 * bfd-in2.h: Regenerate.
6983 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6984 bfd_elf32_link_record_dynamic_symbol,
6985 bfd_elf64_link_record_dynamic_symbol,
6986 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6987 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6988 _bfd_elf32_link_record_local_dynamic_symbol,
6989 _bfd_elf64_link_record_local_dynamic_symbol,
6990 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6991 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6992 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6993 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6994 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6995 _bfd_elf32_reloc_symbol_deleted_p,
6996 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6997 (bfd_elf_link_record_dynamic_symbol,
6998 bfd_elf_link_record_local_dynamic_symbol,
6999 bfd_elf_final_link, bfd_elf_gc_sections,
7000 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7001 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7002 bfd_elf_reloc_symbol_deleted_p): Declare.
7003 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7004 * elf32-arm.h: Update for changed function names. Remove local
7005 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7006 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7007 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7008 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7009 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7010 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7011 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7012 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7013 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7014 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7015 (bfd_elfNN_print_symbol): Define.
7016 * elfcode.h: Don't include elflink.h.
7017 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7018 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7019 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7020 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7021 elf_link_record_local_dynamic_symbol): Don't define.
7022 * elflink.c: Update for changed function names. Move elflink.h
7023 code here.
7024 * elflink.h: Delete file.
7025 * po/SRC-POTFILES.in: Regenerate.
7026 * po/bfd.pot: Regenerate.
7027
6a9cae7f
AM
70282004-03-27 Alan Modra <amodra@bigpond.net.au>
7029
7030 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7031 "name" for global syms accidentally removed in 2004-03-20 change.
7032
140f6c8e
AM
70332004-03-27 Alan Modra <amodra@bigpond.net.au>
7034
7035 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7036 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7037 where Elf_External_* is different for 64 and 32 bit, with
7038 corresponding elf_size_info field.
7039 (struct elf_final_link_info): Use "bfd_byte *" instead
7040 of "Elf_External_Sym *" for external_syms and symbuf.
7041 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7042 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7043 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7044 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7045 (elf_link_sort_cmp2): Adjust.
7046 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7047 using ELF_R_SYM macro. Set u.sym_mask.
7048 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7049 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7050 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7051 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7052 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7053 swap_syn_out functions. Rearrange dyn swap in/out switch.
7054 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7055 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7056 (elf_link_flush_output_syms): Add elf_backend_data arg.
7057 (elf_link_check_versioned_symbol): Likewise.
7058 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7059 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7060 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7061 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7062 ELF_R_TYPE and ELF_R_INFO macros.
7063 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7064 based on size rather than using ELF_R_INFO.
7065 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7066 ELF_R_SYM macro.
7067 (struct alloc_got_off_arg): New.
7068 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7069 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7070 (elf_gc_allocate_got_offsets): Adjust.
7071 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7072 ELF_R_SYM. Use bfd_section_from_elf_index.
7073 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7074 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7075 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7076
14bde378
SS
70772004-03-26 Stan Shebs <shebs@apple.com>
7078
7079 Remove MPW support, no longer used.
7080 * config.bfd (powerpc-*-mpw*): Remove configuration.
7081 * mpw-config.in, mpw-make.sed: Remove files.
7082 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7083
555cd476
AM
70842004-03-26 Alan Modra <amodra@bigpond.net.au>
7085
7086 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7087 (ppc64_elf_add_symbol_hook): New function.
7088 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7089 const from Elf_Internal_Sym param.
7090 * elflink.c (elf_link_add_object_symbols): Adjust.
7091 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7092 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7093 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7094 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7095 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7096 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7097 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7098 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7099 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7100 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7101 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7102 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7103 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7104 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7105 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7106 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7107
4ad4eba5
AM
71082004-03-26 Alan Modra <amodra@bigpond.net.au>
7109
7110 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7111 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7112 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7113 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7114 (bfd_elf64_bfd_link_add_symbols): Delete.
7115 (bfd_elf_link_add_symbols): Declare.
7116 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7117 * elflink.c: Include safe-ctype.h.
7118 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7119 make static.
7120 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7121 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7122 static.
7123 (elf_link_add_archive_symbols): Rename from
7124 _bfd_elf_link_add_archive_symbols, make static.
7125 (elf_link_add_object_symbols): New function. Corresponding
7126 elflink.h function converted to use elf_size_info.
7127 (bfd_elf_link_add_symbols): Likewise.
7128 (bfd_elf_size_dynamic_sections): Adjust.
7129 * elflink.h (elf_bfd_link_add_symbols): Delete.
7130 (elf_link_add_object_symbols): Delete.
7131 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7132 bfd_elf_link_add_symbols.
7133 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7134
5a580b3a
AM
71352004-03-25 Alan Modra <amodra@bigpond.net.au>
7136
7137 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7138 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 7139
5a580b3a
AM
7140 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7141 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7142 (_bfd_elf_add_dt_needed_tag): Declare.
7143 (_bfd_elf_sort_symbol): Declare.
7144 (_bfd_elf_finalize_dynstr): Declare.
7145 (RELOC_FOR_GLOBAL_SYM): Formatting.
7146 * elfcode.h (elf_add_dynamic_entry): Delete.
7147 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7148 elflink.h function converted to use elf_size_info.
7149 (_bfd_elf_add_dt_needed_tag): Likewise.
7150 (_bfd_elf_sort_symbol): Likewise.
7151 (_bfd_elf_finalize_dynstr): Likewise.
7152 (compute_bucket_count): Likewise.
7153 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7154 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7155 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7156 * elflink.h: ..here.
7157 (sort_symbol, add_dt_needed_tag): Delete.
7158 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7159 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7160 Update all users.
7161 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7162 * elf32-cris.c (add_dynamic_entry): Likewise.
7163 * elf32-hppa.c (add_dynamic_entry): Likewise.
7164 * elf32-i370.c (add_dynamic_entry): Likewise.
7165 * elf32-i386.c (add_dynamic_entry): Likewise.
7166 * elf32-m32r.c (add_dynamic_entry): Likewise.
7167 * elf32-m68k.c (add_dynamic_entry): Likewise.
7168 * elf32-ppc.c (add_dynamic_entry): Likewise.
7169 * elf32-s390.c (add_dynamic_entry): Likewise.
7170 * elf32-sh.c (add_dynamic_entry): Likewise.
7171 * elf32-sparc.c (add_dynamic_entry): Likewise.
7172 * elf32-vax.c (add_dynamic_entry): Likewise.
7173 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7174 * elf64-alpha.c (add_dynamic_entry): Likewise.
7175 * elf64-hppa.c (add_dynamic_entry): Likewise.
7176 * elf64-ppc.c (add_dynamic_entry): Likewise.
7177 * elf64-s390.c (add_dynamic_entry): Likewise.
7178 * elf64-sparc.c (add_dynamic_entry): Likewise.
7179 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7180 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7181 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7182 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7183 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7184 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7185
d507cf36
PB
71862004-03-23 Paul Brook <paul@codesourcery.com>
7187
7188 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7189
88d65ad6
BW
71902004-03-22 Bob Wilson <bob.wilson@acm.org>
7191
7192 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7193 literal tables and check for relocs outside of literal pools.
7194 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7195 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7196 set DF_TEXTREL.
7197 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7198 (elf_xtensa_relocate_section): Read literal tables and check for
7199 dynamic relocations in read-only sections and not in literal pools.
c152c796 7200
b9cf773d
AM
72012004-03-23 Alan Modra <amodra@bigpond.net.au>
7202
7203 PR 51.
7204 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7205
e4a2175c
HPN
72062004-03-22 Hans-Peter Nilsson <hp@axis.com>
7207
7208 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7209 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7210 not defined by the executable, or defined in a DSO.
7211 <eliding run-time relocation of .got>: Initialize GOT entry for a
7212 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7213 executable.
7214 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7215 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7216 a PLT reloc to GOT for an executable.
7217 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 7218 .got for a DSO and explain why.
e4a2175c
HPN
7219 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7220 and unreferenced symbols for which a PLT is defined. Adjust
7221 dynamic-symbol pruning correspondingly, to make sure we don't lose
7222 a dynamic symbol also defined by a DSO.
7223
b2a8e766
AM
72242004-03-22 Alan Modra <amodra@bigpond.net.au>
7225
7226 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7227 and rel args. Group input and output args. Wrap to 80 columns.
7228 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7229 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7230 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7231 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7232 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7233 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7234 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7235 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7236 RELOC_FOR_GLOBAL_SYMBOL invocation.
7237
59c2e50f
L
72382004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7239
7240 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7241 unresolved symbols in objects aren't allowed.
7242
7243 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7244 unresolved symbols.
7245 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7246 (elf_hppa_unmark_useless_dynamic_symbols):
7247 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7248 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7249 (elf32_hppa_relocate_section): Likewise.
7250 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7251 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7252 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7253 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7254 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7255
7256 * elf-m10200.c (mn10200_elf_relocate_section): Use
7257 RELOC_FOR_GLOBAL_SYMBOL.
7258 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7259 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7260 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7261 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7262 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7263 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7264 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7265 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7266 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7267 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7268 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7269 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7270
9992270f
DA
72712004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7272
36751eee
DA
7273 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7274 (final_link_relocate): Likewise.
9992270f
DA
7275 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7276 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7277
05864e2a
AM
72782004-03-19 Alan Modra <amodra@bigpond.net.au>
7279
7280 * Makefile.am: Run "make dep-am".
7281 * Makefile.in: Regenerate.
7282 * aclocal.m4: Regenerate.
7283 * config.in: Regenerate.
7284 * po/bfd.pot: Regenerate.
7285
f218a464 72862004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
7287 H.J. Lu <hongjiu.lu@intel.com>
7288
7289 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7290 type and size change code to where it was previously. Remove
7291 dt_needed param. Treat old weak syms as strong if new sym is
7292 from a shared lib, even when old sym is from another shared
7293 lib. Remove unnecessary tests of oldweak and newweak. Correct
7294 comments.
7295 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7296 _bfd_elf_merge_symbol calls.
7297 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7298 dt_needed local var. Update comments.
7299 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7300 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
7301
7302 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7303 strong syms in one shared object overriding weak syms in another.
7304
79349b09
AM
73052004-03-18 Alan Modra <amodra@bigpond.net.au>
7306
4a43e768
AM
7307 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7308 dyn_lib_class field. Rearrange for better packing.
7309 (elf_dt_soname): Delete.
7310 (elf_dyn_lib_class): Define.
7311 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7312 (bfd_elf_set_dt_needed_soname): Delete.
7313 (bfd_elf_set_dyn_lib_class): New function.
7314 * elflink.h (add_dt_needed_tag): New function. Split out from..
7315 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7316 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7317 initialization of soname.
7318 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7319 elf_dt_soname.
7320 * bfd-in.h (enum dynamic_lib_link_class): New.
7321 (bfd_elf_set_dt_needed_soname): Delete.
7322 (bfd_elf_set_dyn_lib_class): Declare.
7323 * bfd-in2.h: Regenerate.
7324
79349b09
AM
7325 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7326 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7327 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7328 symbol loop. Instead use add_needed to flag tag as written.
7329
d13d89fa
NS
73302004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7331
7332 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7333 logic for null_input_bfd detection.
7334
9183ed4b
AM
73352004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7336
7337 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7338
021d7868
MK
73392004-03-16 Mark Kettenis <kettenis@gnu.org>
7340
7341 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7342 code.
7343
51992aec
AM
73442004-03-16 Alan Modra <amodra@bigpond.net.au>
7345
7346 * elflink.c (elf_link_read_relocs_from_section): Don't use
7347 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7348 (_bfd_elf_link_read_relocs): ..to here.
7349 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7350
ccba357f
AM
73512004-03-16 Alan Modra <amodra@bigpond.net.au>
7352
7353 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7354 values selected in configure.host. Require both to be defined
7355 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7356 corresponding BFD_HOST vars with quotes.
7357 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7358 Always require BFD_HOST_64_BIT_DEFINED.
7359 <file_ptr type>: Find off_t size before emitting message. Combine
7360 off_t and ftello64 conditional.
7361 * configure: Regenerate.
7362
41978308
AM
73632004-03-16 Alan Modra <amodra@bigpond.net.au>
7364
7365 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7366 aliasing warning. Remove trailing whitespace throughout file.
7367
d63b5ed9
DA
73682004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7369
7370 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7371 input_section in calls to get_dyn_name.
7372 * 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
7373 local symbols.
7374 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7375
8ce8c090
AM
73762004-03-15 Alan Modra <amodra@bigpond.net.au>
7377
7378 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7379 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7380 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7381 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7382 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7383 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7384 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7385 when using long.
7386 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7387 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7388 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7389 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7390 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7391 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7392 (read_8_bytes, read_indirect_string, read_address): Likewise.
7393 (read_abbrevs, parse_comp_unit): Likewise.
7394 * targets.c (struct bfd_target): Likewise.
7395 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7396 * hppabsd-core.c: Likewise. Formatting.
7397 * hpux-core.c: Likewise.
7398 * irix-core.c: Likewise.
7399 * netbsd-core.c: Likewise.
7400 * osf-core.c: Likewise.
7401 * ptrace-core.c: Likewise.
7402 * sco5-core.c: Likewise.
7403 * trad-core.c: Likewise.
7404 * configure: Regenerate.
7405 * bfd-in2.h: Regenerate.
7406
edeb6e24
AM
74072004-03-15 Alan Modra <amodra@bigpond.net.au>
7408
7409 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7410 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7411 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7412 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7413 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7414 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7415 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7416 * libbfd.c: Likewise in function definitions.
7417 (bfd_put_8): Mask with 0xff rather than casting to char.
7418 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7419 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7420 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7421 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7422 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7423 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7424 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7425 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7426 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7427 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7428 * archive.c (do_slurp_coff_armap): Update swap prototype.
7429 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7430 (tic54x_getl_signed_32): Likewise.
7431 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7432 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7433 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7434 (bfd_getp_signed_32, bfd_putp32): Likewise.
7435 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7436 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7437 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7438 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7439 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7440 bfd_h_getx_signed_16, bfd_h_putx16.
7441 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7442 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7443 * hpux-core.c: Likewise.
7444 * irix-core.c: Likewise.
7445 * netbsd-core.c: Likewise.
7446 * osf-core.c: Likewise.
7447 * ptrace-core.c: Likewise.
7448 * sco5-core.c: Likewise.
7449 * trad-core.c: Likewise.
7450 * bfd-in2.h: Regenerate.
7451
c1b954e2
AM
74522004-03-15 Matt Thomas <matt@3am-software.com>
7453
7454 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7455 selected.
7456
85cfd8d3
MK
74572004-03-13 Mark Kettenis <kettenis@gnu.org>
7458
7459 * config.bfd: Add x86_64-*-openbsd*.
7460 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7461 netbsd-core.lo.
7462 * configure: Regenerate.
7463
d1f161ea
NC
74642004-03-12 Nick Clifton <nickc@redhat.com>
7465 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 7466
d1f161ea
NC
7467 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7468 if the input bfd does not contain any code.
7469
8b6f2683
JW
74702004-03-09 Steve Ellcey <sje@cup.hp.com>
7471
7472 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7473
79cda7cf
FF
74742004-03-05 Fred Fish <fnf@redhat.com>
7475
7476 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7477 mips16 symbols to be even rather than testing first for even/odd.
7478 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7479
e5caec89
NS
74802004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7481
7482 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7483 layout purposes.
7484
02bb6eae
AO
74852004-03-03 Alexandre Oliva <aoliva@redhat.com>
7486
7487 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7488 undefined symbols as hash_new.
7489
ae51a426
JR
74902003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7491
7492 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7493 * cpu-sh.c: Ditto.
7494 * elf32-sh.c: Ditto.
7495 * bfd-in2.h: Regenerate.
7496
3b712a1a
AO
74972004-03-02 Alexandre Oliva <aoliva@redhat.com>
7498
7499 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7500 dynrelocs.
7501 (_frv_count_got_plt_entries): Initialize them.
7502 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7503 callers.
7504 (frv_pic_relocs_info_for_global): Likewise.
7505 (frv_pic_relocs_info_for_local): Likewise.
7506 (frv_pic_merge_early_relocs_info): New.
7507 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7508 another.
7509 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7510 Check that we don't exceed the allocated count for entry.
7511 (_frv_add_rofixup): Likewise.
7512 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7513 (elf32_frv_finish_dynamic_sections): Improve error message in case
7514 we emit too few rofixup entries.
7515
676a64f4
RS
75162004-03-01 Richard Sandiford <rsandifo@redhat.com>
7517
7518 * archures.c (bfd_mach_fr450): New.
7519 * bfd-in2.h: Regenerate.
7520 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7521 (arch_info_500): Link to it.
7522 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7523 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7524 (frv_elf_arch_extension_p): New function.
7525 (frv_elf_merge_private_bfd_data): Use it.
7526
0ad989f9
L
75272004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7528
7529 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7530
7531 * elflink.h (is_global_data_symbol_definition): Moved to
7532 elflink.c.
7533 (elf_link_is_defined_archive_symbol): Likewise.
7534 (elf_link_add_archive_symbols): Likewise. Renamed to
7535 _bfd_elf_link_add_archive_symbols.
7536
7537 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7538 of ELF symbol table entry from backend.
7539 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7540 instead of elf_link_add_object_symbols.
7541
ec3391e7
AO
75422004-02-27 Alexandre Oliva <aoliva@redhat.com>
7543
7544 * elf-bfd.h (struct elf_backend_data): Added
7545 elf_backend_can_make_relative_eh_frame,
7546 elf_backend_can_make_lsda_relative_eh_frame and
7547 elf_backend_encode_eh_address.
7548 (_bfd_elf_encode_eh_address): Declare.
7549 (_bfd_elf_can_make_relative): Declare.
7550 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7551 hooks to decide whether to attempt to make_relative and
7552 make_lsda_relative.
7553 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7554 (_bfd_elf_can_make_relative): New.
7555 (_bfd_elf_encode_eh_address): New.
7556 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7557 (frv_elf_encode_eh_address): New.
7558 (elf_backend_can_make_relative_eh_frame): Define.
7559 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7560 (elf_backend_encode_eh_address): Define.
7561 * elfxx-target.h
7562 (elf_backend_can_make_relative_eh_frame): Define.
7563 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7564 (elf_backend_encode_eh_address): Define.
7565 (elfNN_bed): Add them.
7566
e6deed0a
AO
75672004-02-27 Alexandre Oliva <aoliva@redhat.com>
7568
7569 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7570 complain_on_overflow to signed.
7571
b60d7a1a
L
75722004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7573
7574 * elflink.h (sort_symbol): New.
7575 (elf_link_add_object_symbols): Use a sorted symbol array for
7576 weakdef.
7577
1c3ff0f2
MS
75782004-02-27 Jakub Jelinek <jakub@redhat.com>
7579
7580 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7581 for pc relative relocs.
7582 (elf_s390_relocate_section): Likewise.
7583 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7584 for pc relative relocs.
7585 (elf_s390_relocate_section): Likewise.
7586
de9811af
L
75872004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7588
7589 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7590 count_dyn_reloc.
7591
ac33696c
L
75922004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7593
7594 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7595 field to track if a relocation is against readonly section.
7596 (count_dyn_reloc): Take a new argument for rent->reltext.
7597 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7598 (get_reloc_section): Don't set ia64_info->reltext here.
7599 (allocate_dynrel_entries): Set ia64_info->reltext here.
7600
072c8903
AO
76012004-02-24 Alexandre Oliva <aoliva@redhat.com>
7602
7603 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7604 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7605 function's descriptor to symbol+offset, and map local undefweak
7606 symbol to NULL function descriptor.
7607 (elf32_frv_relocate_section): Likewise.
7608
aca305d9
NC
76092004-02-23 Mark Kettenis <kettenis@gnu.org>
7610
7611 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7612 M_X86_64_NETBSD.
7613 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7614 (netbsd_core_file_p): Set architecture from machine ID for
7615 selected machines.
7616
646411fb
JJ
76172004-02-23 Jakub Jelinek <jakub@redhat.com>
7618
7619 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7620 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7621
1de1a317
L
76222004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7623
7624 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7625 symbols with non-default visibility.
7626
3c9d0484
DS
76272004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7628
7629 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7630 IMAGE_SCN_MEM_WRITE on known sections only.
7631
a876ecf9
JJ
76322004-02-20 Jakub Jelinek <jakub@redhat.com>
7633
7634 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7635 symbols used in PIE relocs.
7636
a8a6d7ce
JJ
76372004-02-19 Jakub Jelinek <jakub@redhat.com>
7638
7639 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7640 .plt sh_entsize.
7641
d080fcd2
DJ
76422004-02-18 Daniel Jacobowitz <drow@mvista.com>
7643
7644 * configure.in: Update version to 2.15.90.
7645 * configure: Regenerate.
7646
d25aed71 76472004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 7648 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
7649
7650 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7651 _bfd_elf_symbol_refs_local_p to decide whether to decay
7652 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7653 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7654 relocs if the symbol wasn't defined by a regular object file.
7655 Don't check the symbol's dynindx.
7656
d7ce59e3
AC
76572004-02-16 Andrew Cagney <cagney@redhat.com>
7658
7659 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7660 @bfd_file_ptr@.
7661 * bfd-in2.h: Re-generate.
7662
ca0b7686
AC
76632004-02-14 Andrew Cagney <cagney@redhat.com>
7664
7665 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7666 _LARGEFILE64_SOURCE.
7667
340b6d91
AC
76682004-02-13 Andrew Cagney <cagney@redhat.com>
7669
7670 * elf.c (vma_page_aligned_bias): New function.
7671 (assign_file_positions_except_relocs)
7672 (assign_file_positions_for_segments): Replace broken modulo
7673 arithmetic with call to vma_page_aligned_bias.
7674
1012372a
AC
76752004-02-11 Andrew Cagney <cagney@redhat.com>
7676
7c192733
AC
7677 * bfd-in.h: Update copyright.
7678 (bfd_tell): Change return type to file_ptr.
7679 * bfd-in2.h: Re-generate.
7680 * cache.c: Update copyright.
7681 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7682 parameter.
7683 (close_one): Use real_ftell.
7684 * bfdio.c: Update copyright.
7685 (real_ftell, real_fseek): New functions.
7686 (bfd_tell): Use real_fseek and real_ftell, change return type to
7687 file_ptr.
7688 (bfd_seek): Use real_ftell and real_fseek, change type of
7689 file_position to a file_ptr.
7690 * libbfd-in.h: Update copyright.
7691 (real_ftell, real_fseek): Declare.
7692 * libbfd.h: Re-generate.
7693
1012372a
AC
7694 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7695 fseeko and fseeko64. Determine bfd_file_ptr.
7696 * configure: Re-generate.
c1ea0c09 7697 * config.in: Re-generate.
c1b954e2 7698
3255318a
NC
76992004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7700
7701 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7702 * elf32-h8300.c: Likewise.
7703
0d5f9994
NC
77042004-02-09 Christian Vogel <vogelchr@vogel.cx>
7705 Nick Clifton <nickc@redhat.com>
7706
7707 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7708 GOT entries with no associated GOT subsection.
7709
174fd7f9
RS
77102004-02-09 Richard Sandiford <rsandifo@redhat.com>
7711
7712 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7713 * elf.c (swap_out_syms): Use it to decide whether local section
7714 symbols should be named.
7715 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7716 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7717 (elf_backend_name_local_section_symbols): Define.
7718 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7719
03609792
L
77202004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7721
7722 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7723 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7724 finalize pass.
7725
ea01195e
AO
77262004-01-30 Alexandre Oliva <aoliva@redhat.com>
7727
7728 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7729 to bfd_link_hash_entry passed by reference to
7730 _bfd_generic_link_add_one_symbol.
7731
838e70c5
L
77322004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7733
7734 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7735 relocations against dynamic symbols.
7736
4f199be3
DJ
77372004-01-23 Daniel Jacobowitz <drow@mvista.com>
7738
7739 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7740 change.
7741
28d39d1a
NC
77422004-01-21 Tom Rix <tcrix@worldnet.att.net>
7743
7744 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7745 * bfd-in2.h, libbfd.h: Rebuilt.
7746
66bed356
DS
77472004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7748
7749 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7750 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7751 flag has been cleared.
7752
7e89635a
KH
77532004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7754
7755 * coff-h8300.c: Add and adjust comments about relaxation.
7756 * elf32-h8300.c: Likewise.
7757
e804e836
KH
77582004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7759
7760 * coff-h8300.c: Fix comment typos.
7761 * elf32-h8300.c: Likewise.
7762
630a7b0a
KH
77632004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7764
7765 * coff-h8300.c: Add comments about relaxation.
7766 * elf32-h8300.c: Likewise.
7767
f8b73030
MR
77682004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7769
7770 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7771 throughout.
7772 * aclocal.m4: Regenerate.
7773 * configure: Regenerate.
7774
32159579
ILT
77752004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7776
7777 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7778 mips_elf64_rtype_to_howto instead of using howto_table.
7779
c84cd8ee
DJ
77802004-01-13 Daniel Jacobowitz <drow@mvista.com>
7781
7782 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7783 the .plt section.
7784 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7785 relocs which would not use the PLT.
7786
680a3378
AM
77872004-01-13 Alan Modra <amodra@bigpond.net.au>
7788
7789 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7790 (ppc64_elf_gc_sweep_hook): Likewise.
7791 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7792
faca21e5
NC
77932004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7794
7795 Adds linker relaxation support for bit manipulation insns like
680a3378 7796 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 7797 bst, btst, bxor.
680a3378 7798 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 7799 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 7800 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
7801 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7802
818a27ac
AM
78032004-01-12 Alan Modra <amodra@bigpond.net.au>
7804
7805 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7806
96ef1419
KH
78072004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7808
7809 * elf32-h8300.c: Fix formatting.
7810
babfd660
KH
78112004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7812
7813 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7814 dynamic object is present. Declare r_symndx and h in an inner
7815 scope.
7816 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7817
7359ea65
DJ
78182004-01-09 Daniel Jacobowitz <drow@mvista.com>
7819
7820 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7821 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7822 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7823 identically. Do not emit PC24 relocations for shared libraries.
7824 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7825 identically. Don't adjust pc_count.
7826 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7827 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7828 adjust count for branch relocations.
7829 (allocate_dynrelocs): Correct typo in call to
7830 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7831 PC24 or PLT32 relocs when linking.
7832
44e88952
NC
78332004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7834
7835 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7836 relocation howto with ARM_26 one for consistency.
7837 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7838 that will be converted to ARM_26D ones, since we always want 'done'
7839 relocations to be reflected in section's data.
7840 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7841 offset.
7842 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7843 requested.
7844
1e7fef1d
NC
78452004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7846
7847 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7848 are not partial_inplace during a relocatable link.
7849
4f075348
KH
78502004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7851
babfd660 7852 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
7853 if no dynamic object is present. Declare r_symndx and h in an
7854 inner scope.
7855
de0d9f33
L
78562004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7857
7858 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7859 trampoline if it is known out of range.
7860
51532845
AO
78612004-01-06 Alexandre Oliva <aoliva@redhat.com>
7862
7863 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7864 * elf32-frv.c (_frv_osec_readonly_p): New.
7865 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7866 undefweak symbol.
7867 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7868 (elf32_frv_relocate_section): Likewise. Error out if attempting
7869 to emit rofixups or dynamic relocs in read-only segments. Use
7870 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7871 dynamic relocations.
7872 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7873 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7874 relocations or fixups involving merged sections correctly. Avoid
7875 crash when undefined symbol is referenced by R_FRV_32 or
7876 R_FRV_FUNCDESC_VALUE.
7877 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7878 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7879 input section holding local symbol to addend of R_FRV_32 or
7880 R_FRV_FUNCDESC_VALUE dynamic relocation.
7881 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7882 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7883 (elf32_frv_always_size_sections): Don't store pointer to
7884 __stacksize symbol in sec_info.
7885 (elf32_frv_modify_segment_map): Look it up here.
7886 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7887 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7888 of the lazy PLT entry, not only its offset, as the low word of a
7889 function descriptor.
7890 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7891 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7892 if a hash table entry already exists but is not a definition.
7893 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7894 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7895 (_frv_add_rofixup): Don't inline.
7896 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7897 for undefweak symbols.
7898 (elf32_frv_relocate_section): Avoid crash while computing
7899 relocation when linking with shared library. Only emit rofixups
7900 and dynamic relocations for alloc&load sections. Mark binaries
7901 with inter-segment relocations for relocation as a unit.
7902 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7903 (DEFAULT_STACK_SIZE): New.
7904 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7905 emit rofixups or dynamic relocs when linking dynamic non-PIE
7906 executables.
7907 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7908 shared libs too. Reserve the last entry for the GOT pointer.
7909 (elf32_frv_finish_dynamic_sections): Emit it.
7910 (elf32_frv_always_size_sections): New.
7911 (elf32_frv_modify_segment_map): New.
7912 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7913 sections.
7914 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7915 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7916 (elf_backend_always_size_sections): New.
7917 (elf_backend_modify_segment_map): New.
7918 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7919 * config.bfd: Added frv-*-*linux*.
7920 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7921 ABS section, instead of crashing.
7922 (elf32_frv_relocate_section): Don't crash before warning about
7923 different segments in non-PIC relocation.
7924 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7925 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7926 relocs to undefweak symbols.
7927 (elf32_frv_relocate_section): Ditto for undefined symbols.
7928 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7929 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7930 gotfixup section was created.
7931 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7932 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7933 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7934 complain_overflow_signed.
7935 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7936 have not been allocated.
7937 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7938 privfd only if dynamic sections were created.
7939 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7940 for GPREL relocs. When linking relocatable FDPIC executables,
7941 emit warnings for relocations that would be illegal on PIE or
7942 shared libraries. Emit rofixup for R_FRV_32 only if input object
7943 is not FDPIC.
7944 (_frv_create_got_section): Define _gp symbol in the rofixup
7945 section.
7946 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7947 dynamic sections missing, error out requesting -melf32frvfd.
7948 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7949 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7950 computation of addends from section and global or local symbol
7951 value. Change return type to bfd_boolean, and return a failure if
7952 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7953 nonzero addend is required.
7954 (elf32_frv_relocate_section): Likewise. Print error for
7955 unsupported nonzero addends.
7956 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7957 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7958 force everything local.
7959 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7960 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7961 (frv_gotfixup_section): New.
7962 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7963 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7964 and relocsfdv.
7965 (_frv_add_rofixup): New.
7966 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7967 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7968 improve some ugly conditions.
7969 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7970 relocations in fdpic.
7971 (_frv_create_got_section): Create .rofixup.got section.
7972 (struct _frv_dynamic_got_info): Added fixups.
7973 (_frv_count_got_plt_entries): Account in-GOT relocations into
7974 relocs32, relocsfd and relocsfdv. Account them into relocs or
7975 fixups, as appropriate.
7976 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7977 sizing of gotrel.
7978 (elf32_frv_finish_dynamic_sections): Verify that the right number
7979 of relocations and fixups was generated.
7980 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7981 relocsfdv.
7982 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7983 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7984 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7985 descriptor of a (formerly-)global symbol is local.
7986 (struct frv_pic_relocs_info): Adjust comments.
7987 (_frv_emit_got_relocs_plt_entries): Adjust.
7988 (elf32_frv_relocate_section): Likewise.
7989 (_frv_count_got_plt_entries): Likewise.
7990 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7991 symbol's value to addend in the common preamble. Decay dynamic
7992 symbols to section+offset if they bind or call locally, for GOT
7993 and FUNCDESC_VALUE, respectively.
7994 (elf32_frv_relocate_section): Likewise.
7995 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7996 internal or hidden visibility.
7997 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7998 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7999 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8000 (elf32_frv_relocate_section): Pass relocation addend in. Use
8001 original relocation addend to look up the got relocs/plt entries
8002 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8003 processing relocations that reference .scommon symbols.
8004 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8005 Introduce support for dynamic linking.
8006 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8007 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8008 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8009 (frv_reloc_type_lookup): Return REL howtos for executables and
8010 dynamic libraries.
8011 (frv_info_to_howto_rel): New.
8012 (struct frv_elf_link_hash_table): New.
8013 (frv_hash_table, frv_got_section, frv_gotrel_section,
8014 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8015 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8016 (frv_elf_link_hash_table_create): New.
8017 (struct frv_pic_relocs_info): New.
8018 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8019 (frv_pic_relocs_info_find): New.
8020 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8021 New.
8022 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8023 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8024 (_frv_emit_got_relocs_plt_entries): New.
8025 (elf32_frv_relocate_section): Add support for dynamic linking.
8026 Handle new relocations.
8027 (_frv_create_got_section): New.
8028 (elf32_frv_create_dynamic_sections): New.
8029 (ELF_DYNAMIC_INTERPRETER): New.
8030 (struct _frv_dynamic_got_info): New.
8031 (_frv_count_got_plt_entries): New.
8032 (struct _frv_dynamic_got_plt_info): New.
8033 (_frv_compute_got_alloc_data): New.
8034 (_frv_get_got_entry, _frv_get_fd_entry): New.
8035 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8036 (_frv_resolve_final_relocs_info): New.
8037 (elf32_frv_size_dynamic_sections): New.
8038 (elf32_frv_finish_dynamic_sections): New.
8039 (elf32_frv_adjust_dynamic_symbol): New.
8040 (elf32_frv_finish_dynamic_symbol): New.
8041 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8042 whole thing works.
8043 (elf_info_to_howto_rel): Define.
8044 (bfd_elf32_bfd_link_hash_table_create): Define.
8045 (elf_backend_create_dynamic_sections): Define.
8046 (elf_backend_adjust_dynamic_symbol): Define.
8047 (elf_backend_size_dynamic_sections): Define.
8048 (elf_backend_finish_dynamic_symbol): Define.
8049 (elf_backend_finish_dynamic_sections): Define.
8050 (elf_backend_want_got_sym): Define.
8051 (elf_backend_got_header_size): Define.
8052 (elf_backend_want_got_plt): Define.
8053 (elf_backend_plt_readonly): Define.
8054 (elf_backend_want_plt_sym): Define.
8055 (elf_backend_plt_header_size): Define.
8056 (elf_backend_may_use_rel_p): Define.
8057 (elf_backend_may_use_rela_p): Define.
8058 (elf_backend_default_use_rela_p): Define.
8059 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8060 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8061 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8062 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8063 (frv_reloc_map): Map the corresponding BFD relocs to them.
8064 (frv_reloc_type_lookup): ... and back to BFD relocs.
8065 * reloc.c: New relocs.
8066 * bfd-in2.h, libbfd.h: Rebuilt.
8067 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8068 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8069 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8070 R_FRV_FUNCDESC_GOTLO): New.
8071 (frv_reloc_map): Map the corresponding BFD relocs to them.
8072 (frv_reloc_type_lookup): ... and back to BFD relocs.
8073 * reloc.c: New relocs.
8074 * bfd-in2.h, libbfd.h: Rebuilt.
8075
4301eeb1
MR
80762004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8077
8078 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8079 targets to support pages of up to 64kB.
8080 (elf32_bed): Redefine to get a separate backend data structure for
8081 traditional targets.
8082 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8083 targets to support pages of up to 64kB.
8084 (elf64_bed): Redefine to get a separate backend data structure for
8085 traditional targets.
8086 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8087 targets to support pages of up to 64kB.
8088 (elf32_bed): Redefine to get a separate backend data structure for
8089 traditional targets.
8090
0647ed71
MK
80912004-01-04 Mark Kettenis <kettenis@gnu.org>
8092
8093 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8094
61adc1a4
NC
80952004-01-02 Mark Kettenis <kettenis@gnu.org>
8096
8097 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8098 (elf_i386_grok_psinfo): Likewise.
8099
b50c15dc
NC
81002004-01-02 Bernardo Innocenti <bernie@develer.com>
8101
8102 * config.bfd: Add m68k-uClinux target.
8103
2627de83
AM
81042004-01-01 Grant Edwards <grante@visi.com>
8105
8106 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8107 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8108 (elf32_h8_gc_sweep_hook): New function.
8109 (elf_backend_gc_mark_hook): Define.
8110 (elf_backend_gc_sweep_hook): Define.
8111 (elf_backend_can_gc_sections): Define.
8112
c9e214e5 8113For older changes see ChangeLog-0203
56882138
AM
8114\f
8115Local Variables:
8116mode: change-log
8117left-margin: 8
8118fill-column: 74
8119version-control: never
8120End:
This page took 0.679345 seconds and 4 git commands to generate.