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