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