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