daily update
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
8c1d1bb8
AM
12005-04-05 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-ppc.c (dec_dynrel_count): New function split out from
4 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
5 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
6 (ppc64_elf_tls_optimize): Likewise.
7
8c101720
NC
82005-04-05 Mark Kettenis <kettenis@gnu.org>
9
10 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
11 CORE_WCOOKIE_OFFSET.
12 (SPARC64_WCOOKIE_OFFSET): New.
13 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
14
429cc0ae
NC
152005-04-05 Nick Clifton <nickc@redhat.com>
16
17 * po/rw.po: New translation: Kinyarwanda
18 * configure.in (ALL_LINGUAS): Add rw
19 * configure: Regenerate.
20
cc2e31b9
RS
212005-04-05 Richard Sandiford <rsandifo@redhat.com>
22
23 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
24 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
25 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
26 section flags.
27 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
28 to check for SHT_MIPS_OPTIONS sections.
29 (_bfd_mips_elf_set_section_contents): Likewise.
30
8236346f
EC
312005-04-04 Eric Christopher <echristo@redhat.com>
32
33 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
34 Clean up gp handling code.
35
7e4111ad
L
362005-04-04 H.J. Lu <hongjiu.lu@intel.com>
37
38 * elf.c (bfd_elf_set_group_contents): Ignore linker created
39 group section.
da9f89d4
L
40 (assign_section_numbers): Accept link_info. Check SHT_GROUP
41 sections for relocatable files only. Remove the linker created
42 group sections.
43 (_bfd_elf_compute_section_file_positions): Pass link_info to
44 assign_section_numbers.
45
46 * elfxx-ia64.c (elfNN_ia64_object_p): New.
47 (elf_backend_object_p): Defined.
7e4111ad 48
96982dc9
L
492005-04-04 H.J. Lu <hongjiu.lu@intel.com>
50
51 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
52
a13afe8e
FF
532005-04-03 Fred Fish <fnf@specifixinc.com>
54
55 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
56 dwarf_ranges_size members.
57 (struct comp_unit): Add base_address member.
58 (struct funcinfo): Replace low/high members with an arange.
59 (arange_add): Replace incoming "unit" parameter with "abfd" and
60 "first_arange" pointers. Reorganize/rewrite function body.
61 (decode_line_info): Change arange_add call to pass bfd and arange
62 pointers.
63 (lookup_address_in_line_info_table): Use arange list instead of
64 individual low/high members. Walk function's arange list to find
65 lowest PC in list, to test for overlapping functions.
66 (read_debug_ranges): New function, reads the debug_ranges section.
67 (lookup_address_in_function_table): Use arange list instead of
68 individual low/high members. Rewrite to find smallest range that
69 matches.
70 (read_rangelist): Read a given rangelist from debug_ranges.
71 (scan_unit_for_functions): Use arange list instead of individual
72 low/high members. Handle a DW_AT_ranges attribute.
73 (parse_comp_unit): Use arange list instead of individual low/high
74 members. Save comp unit base address. Handle a DW_AT_ranges
75 attribute.
76
2796fd96
L
772005-04-01 H.J. Lu <hongjiu.lu@intel.com>
78
79 * elf.c (assign_section_numbers): Really use the kept section.
80
01b3c8ab
L
812005-03-31 H.J. Lu <hongjiu.lu@intel.com>
82
83 * elf-bfd.h (_bfd_elf_check_kept_section): New.
84
85 * elf.c (assign_section_numbers): When sh_link points to a
86 discarded section, call _bfd_elf_check_kept_section to see if
87 the kept section can be used. Otherwise reject sh_link
88 pointing to discarded section.
89
90 * elflink.c (_bfd_elf_check_kept_section): New.
91 (elf_link_input_bfd): Use it.
92
35090471
AM
932005-04-01 Alan Modra <amodra@bigpond.net.au>
94
95 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
96 that we no longer need.
97
7356fed5
AM
982005-04-01 Alan Modra <amodra@bigpond.net.au>
99
100 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
101 rather than 0.
77623a34 102 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 103
28b13744
L
1042005-03-31 H.J. Lu <hongjiu.lu@intel.com>
105
106 * elf.c (assign_section_numbers): Fix a typo.
107
c93625e2
L
1082005-03-31 H.J. Lu <hongjiu.lu@intel.com>
109
110 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
111 error message.
112 (_bfd_elf_section_already_linked): Likewise.
113
fddc4048
JG
1142005-03-31 Jerome Guitton <guitton@gnat.com>
115
116 * config.in: Regenerate.
117
2e9ebff5
JG
1182005-03-31 Jerome Guitton <guitton@gnat.com>
119
c93625e2
L
120 * config.in (HAVE_DECL_BASENAME): New configure macro.
121 * configure.in: Check for basename.
122 * configure: Regenerate.
2e9ebff5 123
05ea83ed
JB
1242005-03-30 Julian Brown <julian@codesourcery.com>
125
126 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
127 bfd_elf32_is_arm_mapping_symbol_name.
128 * bfd-in2.h: Regenerate.
129 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
130 bfd_elf32_is_arm_mapping_symbol_name.
131 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
132 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
133 (arm_elf_find_function): Likewise.
134 (elf32_arm_output_symbol_hook): Likewise.
135
9d2da7ca
JB
1362005-03-30 Julian Brown <julian@codesourcery.com>
137
138 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
139 * bfd-in2.h: Regenerate.
140 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
141 bfd_elf32_is_arm_mapping_symbol_name.
142 (elf32_arm_output_symbol_hook): Likewise.
143 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
144 mapping symbols.
145 (is_arm_mapping_symbol_name): Function moved from here...
146 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
147 and made global.
148
efa9bda4
AL
1492005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
150
151 * configure.in: Check for ffs decl and alphabetize.
152 * config.in: Regenerate.
153 * configure: Regenerate.
154 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and
155 alphabetize.
156
09a9d560
FF
1572005-03-29 Fred Fish <fnf@specifixinc.com>
158
159 * dwarf2.c (struct comp_unit): Fix typo.
160 (scan_unit_for_functions): Remove unused local variable "name"
161 and dead code that set it.
162
ba93b8ac
DJ
1632005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
164 Phil Blundell <philb@gnu.org>
165
166 * bfd-in2.h, libbfd.h: Regenerated.
167 * reloc.c: Add ARM TLS relocations.
168 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
169 relocations.
170 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
171 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
172 (elf32_arm_tls_ie32_howto): New.
173 (elf32_arm_howto_from_type): Support TLS relocations.
174 (elf32_arm_reloc_map): Likewise.
175 (elf32_arm_reloc_type_lookup): Likewise.
176 (TCB_SIZE): Define.
177 (struct elf32_arm_obj_tdata): New.
178 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
179 (elf32_arm_mkobject): New function.
180 (struct elf32_arm_relocs_copied): Add pc_count.
181 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
182 (GOT_TLS_IE): Define.
183 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
184 (elf32_arm_link_hash_newfunc): Initialize tls_type.
185 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
186 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
187 (dtpoff_base, tpoff): New functions.
188 (elf32_arm_final_link_relocate): Handle TLS relocations.
189 (IS_ARM_TLS_RELOC): Define.
190 (elf32_arm_relocate_section): Warn about TLS mismatches.
191 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
192 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
193 TLS relocations and pc_count.
194 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
195 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
196 calls.
197 (elf32_arm_size_dynamic_sections): Handle TLS.
198 (elf32_arm_finish_dynamic_symbol): Likewise.
199 (bfd_elf32_mkobject): Define.
200
71a976dd
DJ
2012005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
202
203 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
204 relocation types. Don't count relocations which will use a PLT.
205
7e7353ed
JB
2062005-03-29 Joel Brobecker <brobecker@gnat.com>
207
208 * elf.c (elfcore_grok_nto_status): Print tid as long.
209 (elfcore_grok_nto_regs): Likewise.
210
166856d7
JB
2112005-03-29 Joel Brobecker <brobecker@gnat.com>
212
213 * irix-core.c: Remove some unnecessary prototypes.
214
40f85900
JB
2152005-03-28 Joel Brobecker <brobecker@adacore.com>
216
217 * irix-core.c: Convert to ISO C.
218
aa2e06ba
JB
2192005-03-28 Joel Brobecker <brobecker@adacore.com>
220
221 * irix-core.c (do_sections): Replace + by | in expression.
222 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
223 to unused parameters to avoid a compiler warning.
224
832bc186
MK
2252005-03-28 Mark Kettenis <kettenis@gnu.org>
226
227 * netbsd-core.c: Convert to ISO C. Fix formatting.
228
82f0cfbd
EC
2292005-03-24 Eric Christopher <echristo@redhat.com>
230
231 * elfxx-mips.c: Revert previous patch.
232
d7b9976f
NC
2332005-03-24 Nick Clifton <nickc@redhat.com>
234
235 * targets.c (_bfd_target_vector): Only include the
236 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
237 all targets enabled.
238
074d327a
NC
2392005-03-24 James E Wilson <wilson@specifixinc.com>
240
241 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
242 (BFD64_BACKENDS): Add elf32-ia64.lo.
243 * Makefile.in: Regenerate.
244
cc27e1dc
EC
2452005-03-23 Eric Christopher <echristo@redhat.com>
246
247 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
248 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
249 after emitting relocation.
250 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
251 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
252 and readonly_reloc.
253
ed84e695
NC
2542005-03-23 Mike Frysinger <vapier@gentoo.org>
255 Nick Clifton <nickc@redhat.com>
256
257 * config.bfd: Accept any C library to accompany a GNU Linux
258 implementation, not just the GNU C library.
259 * configure.in: Likewise.
260 * configure: Regenerate.
261
81e1b023
L
2622005-03-22 H.J. Lu <hongjiu.lu@intel.com>
263
264 * bfd-in.h (_bfd_elf_provide_symbol): New.
265 * bfd-in2.h: Regenerated.
266
267 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
268 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
269 of set_linker_sym.
270
271 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
272 from elf32-ppc.c.
273
672c2d7e
HPN
2742005-03-22 Hans-Peter Nilsson <hp@axis.com>
275
276 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
277
1fbc7e7a
BW
2782005-03-22 Bob Wilson <bob.wilson@acm.org>
279
280 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
281 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
282 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
283 (xtensa_opcode_decode): Rearrange code.
284
c8e7bf0d
NC
2852005-03-22 Nick Clifton <nickc@redhat.com>
286
287 * binary.c: Convert to ISO C90 formatting.
288 * coff-arm.c: Convert to ISO C90 formatting.
289 * coffgen.c: Convert to ISO C90 formatting.
290 * elf32-gen.c: Convert to ISO C90 formatting.
291 * elf64-gen.c: Convert to ISO C90 formatting.
292 * hash.c: Convert to ISO C90 formatting.
293 * ieee.c: Convert to ISO C90 formatting.
294
28a094c2
DJ
2952005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
296
297 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
298 unresolved symbols in R_ARM_NONE relocations.
299
0945cdfd
DJ
3002005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
301
302 * elf32-arm.c (elf32_arm_final_link_relocate): Add
303 UNRESOLVED_RELOC_P argument. Set it appropriately.
304 (elf32_arm_relocate_section): Update call to
305 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
306 unresolved_reloc instead.
307
11d2f718
AM
3082005-03-23 Alan Modra <amodra@bigpond.net.au>
309
310 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
311 .gnu.warning.* sections.
312
76750a2f
AM
3132005-03-22 Alan Modra <amodra@bigpond.net.au>
314
315 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
316 written_address_p.
317 (ppc_elf_create_linker_section): Don't try to reuse existing section.
318 (elf_create_pointer_linker_section): Delete info parm. Don't make
319 h dynamic. Don't set written_address_p.
320 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
321 (bfd_put_ptr): Delete.
322 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
323 Always write section contents. Assert global sym is def_regular.
324 Use offset bottom bit as a written flag.
325 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
326 calls.
327
f85f57ad
AM
3282005-03-22 Alan Modra <amodra@bigpond.net.au>
329
330 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
331 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
332 and end syms.
333
2dc773a0
NC
3342005-03-21 Nick Clifton <nickc@redhat.com>
335
336 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
337 targets.
338 (t2a1_bx_pc_insn): Likewise.
339 (t2a2_noop_insn): Likewise.
340 (t2a3_b_insn): Likewise.
341 (t2a1_push_insn): Likewise.
342 (t2a2_ldr_insn): Likewise.
343 (t2a3_mov_insn): Likewise.
344 (t2a4_bx_insn): Likewise.
345 (t2a5_pop_insn): Likewise.
346 (t2a6_bx_insn): Likewise.
347 (coff_arm_relocate_section): Only declare the high_address
348 variable for non WINCE targets.
349
644285ef
AM
3502005-03-22 Alan Modra <amodra@bigpond.net.au>
351
352 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
353 SEC_LINKER_CREATED. Attach to dynobj.
354 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
355
c9a2f333
AM
3562005-03-21 Alan Modra <amodra@bigpond.net.au>
357
358 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
359 sym_offset. Add name, bss_name, sym_name, sym_val.
360 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
361 Add sdata array of elf_linker_section_t.
362 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
363 (enum elf_linker_section_enum): Delete.
364 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
365 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
366 the special sections are needed. Adjust htab->sdata refs.
367 Ensure dynobj is set in sreloc code.
368 (ppc_elf_size_dynamic_sections): Strip sdata sections.
369 (ppc_elf_set_sdata_syms): New function.
370 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
371 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
372 sym_val instead of sym_hash.
373 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
374
8853c3d3
AM
3752005-03-21 Alan Modra <amodra@bigpond.net.au>
376
377 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
378 (ppc_elf_merge_private_bfd_data): Likewise.
379
2bb04cf2
AM
3802005-03-21 Alan Modra <amodra@bigpond.net.au>
381
382 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
383 (ppc_elf_create_linker_section): Don't create rel_section.
384 (elf_create_pointer_linker_section): Don't size relocs.
385 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
386 Don't generate relocs.
387 (ppc_elf_relocate_section): Adjust calls to
388 elf_finish_pointer_linker_section.
389
d2663f46
AM
3902005-03-21 Alan Modra <amodra@bigpond.net.au>
391
392 * elf32-ppc.c (is_ppc_elf_target): New function.
393 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
394 for bfd_target_elf_flavour. Do this test before endian check.
395 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
396 (ppc_elf_size_dynamic_sections): Likewise.
397
6dc132d9
L
3982005-03-20 H.J. Lu <hongjiu.lu@intel.com>
399
400 * elf-bfd.h (elf_backend_data): Add int to
401 elf_backend_section_from_shdr.
402 (bfd_elf_section_data): Update comment for this_idx.
403 (_bfd_elf_make_section_from_shdr): Add int.
404 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
405
406 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
407 and use it to set this_idx in bfd_elf_section_data.
408 (bfd_section_from_shdr): Pass shindex to
409 _bfd_elf_make_section_from_shdr.
410 (_bfd_elf_section_from_bfd_section): Use this_idx in
411 bfd_elf_section_data to find section index.
412
413 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
414 index and pass it to _bfd_elf_make_section_from_shdr.
415 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
416 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
417 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
418 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
419 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
420 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
421 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
422 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
423 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
424
cabd4ccc
DS
4252005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
426 Ross Ridge <rridge@csclub.uwaterloo.ca>
427
428 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
429 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
430 cases. Add comment.
431
7451fd89
L
4322005-03-18 H.J. Lu <hongjiu.lu@intel.com>
433
434 * elflink.c (elf_mark_used_section): Remove check for special
435 sections.
436
b4677f03
AS
4372005-03-18 Andreas Schwab <schwab@suse.de>
438
439 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
440 from bfd_vma to ia64_insn, remove broken cast.
441
238d258f
NC
4422005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
443
8853c3d3 444 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
445 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
446 elf_m68k_finish_dynamic_sections): Use it.
447
b294bdf8
MM
4482005-03-17 Paul Brook <paul@codesourcery.com>
449 Dan Jacobowitz <dan@codesourcery.com>
450 Mark Mitchell <mark@codesourcery.com>
451
452 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
453 (elf32_arm_additional_program_headers): Likewise.
454 (elf_backend_modify_segment_map): Define.
455 (elf_backend_additional_program_headers): Likewise.
456 (elf32_arm_symbian_modify_segment_map): Use
457 elf32_arm_modify_segment_map.
458
257a4820
L
4592005-03-18 H.J. Lu <hongjiu.lu@intel.com>
460
461 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
462 for special sections.
463
554220db
AM
4642005-03-18 Alan Modra <amodra@bigpond.net.au>
465
466 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
467 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
468 section_sym_count param, and return number of section symbols.
469 (bfd_elf_size_dynamic_sections): Clear section symbol area of
470 .dynsym contents. Don't bother calling swap_symbol_out on the
471 first all-zero dynsym.
472 (elf_mark_used_section): Formatting. Avoid twiddling flags in
473 special sections like bfd_abs_section.
474 (bfd_elf_gc_sections): Spelling fix.
475
36868d45
NC
4762005-03-16 Fred Fish <fnf@specifixinc.com>
477
478 PR binutils/790
479 * dwarf2.c (read_indirect_string): Fix apparent typo, check
480 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
481
57316bff
L
4822005-03-16 H.J. Lu <hongjiu.lu@intel.com>
483
484 * elflink.c (elf_mark_used_section): New.
485 (bfd_elf_gc_sections): Call elf_gc_mark_section for
486 non-relocatable link if we don't do GC.
487
1ad12f97
NC
4882005-03-16 Nick Clifton <nickc@redhat.com>
489 Ben Elliston <bje@au.ibm.com>
490
569acd2c 491 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 492 compiler command line. Enabled by default. Disable via
569acd2c 493 --disable-werror.
1ad12f97
NC
494 * configure: Regenerate.
495
3b5d3310
NC
4962005-03-16 Nick Clifton <nickc@redhat.com>
497
498 * ecoff.c: Convert to ISO C90 formatting.
499
25dbc73a
AM
5002005-03-16 Alan Modra <amodra@bigpond.net.au>
501
502 * elf32-ppc.c: Divide file into general and linker specific
503 functions. Sort linker functions into roughly the order in which
504 they are called by the ELF linker code.
505
cb2d1ef2
AM
5062005-03-16 Alan Modra <amodra@bigpond.net.au>
507
508 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
509 on section. Correct comment, and add FIXME.
510 (ppc_elf_additional_program_headers): Don't bump header count for
511 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
512 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
513 do allocate memory if they need it.
514
34723071
NC
5152005-03-15 Mikkel Krautz <krautz@gmail.com>
516
517 * config.bfd (x86_64-elf): Add target.
518
729ae8d2
AM
5192005-03-15 Alan Modra <amodra@bigpond.net.au>
520
521 * po/es.po: Commit new Spanish translation.
522
f0581930
L
5232005-03-14 H.J. Lu <hongjiu.lu@intel.com>
524
525 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
526 for global symbol when reporting overflow.
527
390c0e42
JJ
5282005-03-11 Jakub Jelinek <jakub@redhat.com>
529
530 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
531 * libbfd.h: Rebuilt.
532 * archive.c (_bfd_ar_spacepad): New function.
533 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
534 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
535 coff_write_armap): Use it.
536 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
537 uid/gid support.
538 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
539
a2633f4e
MK
5402005-03-10 Mark Kettenis <kettenis@gnu.org>
541
542 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
543 has_table to the start of the function.
544
109f7096
BE
5452005-03-10 Ben Elliston <bje@au.ibm.com>
546
547 * archive.c: Include hashtab.h.
548 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
549 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
550 (hash_file_ptr): New function.
551 (eq_file_ptr): Likewise.
552 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
553 * libbfd-in.h: Include hashtab.h.
554 (struct artdata): Change `cache' member type to htab_t.
555 * libbfd.h: Rebuild.
556
664fe1be
DJ
5572005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
558
559 * configure.in: Bump version to 2.16.90.
560 * configure: Regenerated.
561
0709bb22
JJ
5622005-03-07 Jakub Jelinek <jakub@redhat.com>
563
564 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
565 close is a function like macro in system headers.
566
b18e2ae5
AM
5672005-03-07 Alan Modra <amodra@bigpond.net.au>
568
569 PR ld/778
570 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
571 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
572
1f170678
AM
5732005-03-06 Alan Modra <amodra@bigpond.net.au>
574
575 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
576
06647dfd
AM
5772005-03-05 Alan Modra <amodra@bigpond.net.au>
578
579 * po/bfd.pot: Regenerate.
580
93f3fa99
AM
5812005-03-05 Alan Modra <amodra@bigpond.net.au>
582
583 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
584 with is_func.
585 (func_desc_adjust): Force dot-syms local in executables as well
586 as shared libs.
587
bbe506e8
TS
5882005-03-04 David Daney <ddaney@avtrex.com>
589
590 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
591 '__gnu_local_gp' symbol used by gas -mno-shared.
592
d27f5fa1
L
5932005-03-03 H.J. Lu <hongjiu.lu@intel.com>
594
595 * elf-bfd.h (elf_backend_data): Add "const char *" to
596 elf_backend_section_from_phdr.
597
598 * elf.c (bfd_section_from_phdr): Pass "proc" to the
599 elf_backend_section_from_phdr hook.
600
0f20cc35
DJ
6012005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
602 Joseph Myers <joseph@codesourcery.com>
603
604 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
605 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
606 and tls_ldm_offset.
607 (struct mips_elf_got_per_bfd_arg): Add global_count.
608 (struct mips_elf_count_tls_arg): New.
609 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
610 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
611 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
612 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
613 (TLS_RELOC_P): Define.
614 (TP_OFFSET, DTP_OFFSET): Define.
615 (dtprel_base, tprel_base): New functions.
616 (mips_elf_link_hash_newfunc): Initialize tls_type.
617 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
618 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
619 TLS entries.
620 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
621 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
622 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
623 (mips_tls_got_index): New functions.
624 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
625 arguments. Pass them to mips_elf_create_local_got_entry. Use
626 mips_tls_got_index.
627 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
628 Handle TLS entries.
629 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
630 mips_elf_create_local_got_entry.
631 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
632 arguments. Handle TLS entries.
633 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
634 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
635 TLS entries.
636 (mips_elf_record_global_got_symbol): Likewise.
637 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
638 Count TLS entries.
639 (mips_elf_merge_gots): Handle TLS entries when merging.
640 (mips_elf_initialize_tls_index): New function.
641 (mips_elf_set_global_got_offset): Handle TLS entries.
642 (mips_elf_adjust_gp): Handle TLS.
643 (mips_elf_multi_got): Remove redundant call to
644 mips_elf_resolve_final_got_entries. Initialize global_count.
645 Correct a comment. Initialize new TLS members of mips_got_info.
646 Assign TLS GOT indexes for new GOTs.
647 (mips_elf_create_got_section): Initialize new TLS members of
648 mips_got_info.
649 (mips_elf_calculate_relocation): Handle TLS relocs.
650 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
651 functions.
652 (_bfd_mips_elf_always_size_sections): Handle TLS.
653 (_bfd_mips_elf_size_dynamic_sections): Likewise.
654 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
655 changed functions.
656 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
657 (_bfd_mips_elf_hide_symbol): Handle TLS.
658 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
659 (mips_reloc_map): Add TLS relocs.
660 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
661 * elf64-mips.c (mips_elf64_howto_table_rel)
662 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
663 * reloc.c: Define new MIPS TLS relocations.
664 * libbfd.h, bfd-in2.h: Regenerated.
665
bb14f524
JB
6662005-03-02 Jan Beulich <jbeulich@novell.com>
667
668 * Makefile.am: Add dependency of cache.o on libiberty.h.
669 * cache.c: Include libiberty.h.
670 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
671
8c1acd09
ZW
6722005-03-01 Zack Weinberg <zack@codesourcery.com>
673
674 * elf.c (bfd_section_from_shdr <default case>): Call
675 elf_backend_section_from_shdr hook unconditionally, and return
676 what it returns.
677 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
678 * elfxx-target.h (elf_backend_section_from_shdr)
679 (elf_backend_section_from_phdr): Default to
680 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
681 respectively.
682
70bfecec
AM
6832005-03-01 Alan Modra <amodra@bigpond.net.au>
684
a67a7b8b
AM
685 * targets.h: Typo fix.
686 * bfd-in2.h: Regenerate.
687
70bfecec
AM
688 * bout.c (b_out_write_object_contents): Don't use sizeof on host
689 structs to size on-disk structures.
690 (b_out_set_section_contents): Size the external struct, not the
691 internal one for on-disk size.
692 (b_out_sizeof_headers): Likewise.
693
ceb1f1ef
AM
6942005-03-01 Alan Modra <amodra@bigpond.net.au>
695
696 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
697 entry points with the func descriptor as well as undefweak.
698
f67e617a
NC
6992005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
700
701 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
702 present when IMPORT_NAME_UNDOECRATE is used.
703
af44c138
L
7042005-02-28 H.J. Lu <hongjiu.lu@intel.com>
705
706 PR 757
707 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
708 int.
709
710 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
711 to _bfd_elf_merge_symbol.
712
713 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
714 unsigned int to return the alignment of the old common symbol
715 in the dynamic object.
716 (_bfd_elf_add_default_symbol): Pass NULL to
717 _bfd_elf_merge_symbol.
718 (elf_link_add_object_symbols): Pass &old_alignment to
719 _bfd_elf_merge_symbol. Get the alignment of the new common
720 symbol in the dynamic object.
721
10adf131
BE
7222005-02-24 Ben Elliston <bje@au.ibm.com>
723
724 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
725 * format.c (bfd_check_format_matches): Likewise.
726 * archive.c (BFD_GNU960_ARMAG): Likewise.
727 (bfd_generic_archive_p): Likewise.
728 (_bfd_write_archive_contents): Likewise.
729
60b779bf
L
7302005-02-24 H.J. Lu <hongjiu.lu@intel.com>
731
732 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
733 * configure: Regenerate.
734
1f02cbd9
JB
7352005-02-24 Julian Brown <julian@sirius.codesourcery.com>
736
737 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
738 COMDAT group sections to have default visibility.
739
f60ca5e3
AM
7402005-02-24 Alan Modra <amodra@bigpond.net.au>
741
742 * coffcode.h (coff_print_aux): Warning fix.
743 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
744 instead of section pointer to identify.
745 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
746 the correct size buffer for local sym mangling too.
747 (h8300_bfd_link_add_symbols): Likewise.
748 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
749 warning.
750 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
751 * elf32-xtensa.c (literal_value_hash): Warning fix.
752 * versados.c (process_otr): Warning fix.
753 (versados_canonicalize_reloc): Likewise.
754 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
755 * vms.c (fill_section_ptr): Warning fix.
756
9a5d8e72
L
7572005-02-23 H.J. Lu <hongjiu.lu@intel.com>
758
759 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
760 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
761
4b6c0f2f
NC
7622005-02-23 Nick Clifton <nickc@redhat.com>
763
abc0f8d0
NC
764 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
765 the relvaddr field of the Elf32_crinfo structure.
766
9b69b847
NC
767 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
768 variables that are passed by reference to
769 m68hc11_get_relocation_value in case that function does not
770 initialise them.
771
90e868ac
NC
772 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
773 return statements and replace with a single return at the end of
774 the function. This helps pacify the flow analysis code in gcc 4.0.
775
4b6c0f2f
NC
776 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
777 strtab to avoid compile time warning.
778
c3e8c140
BE
7792005-02-23 Ben Elliston <bje@au.ibm.com>
780
781 * opncls.c (bfd_zalloc): Document this function.
782
ebe372c1
L
7832005-02-21 H.J. Lu <hongjiu.lu@intel.com>
784
785 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
786 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
787 Replace SEC_SHARED with SEC_COFF_SHARED.
788 (styp_to_sec_flags): Likewise.
789
790 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
791 (TARGET_LITTLE_SYM): Likewise.
792
793 * section.c (SEC_ARCH_BIT_0): Removed.
794 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
795 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
796 (SEC_SHARED): Renamed to ...
797 (SEC_COFF_SHARED): This.
798 (SEC_BLOCK): Renamed to ...
799 (SEC_TIC54X_BLOCK): This.
800 (SEC_CLINK): Renamed to ...
801 (SEC_TIC54X_CLINK): This.
802 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
803 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
804 end.
805 * bfd-in2.h: Regenerated.
806
26bf4e33
FF
8072005-02-21 Fred Fish <fnf@specifixinc.com>
808
809 * dwarf2.c (find_abstract_instance_name): Call recursively
810 to handle a DW_AT_specification.
811
e6daada3
TS
8122005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
813
814 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
815 mips_elf_create_dynamic_relocation,
816 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
817 Remove #if 0'd code.
818
d25604af
AM
8192005-02-21 Alan Modra <amodra@bigpond.net.au>
820
821 * Makefile.am: Run "make dep-am"
822 * Makefile.in: Regenerate.
823
fedf8d51
AM
8242005-02-21 Alan Modra <amodra@bigpond.net.au>
825
826 * coffgen.c (bfd_coff_get_comdat_section): Check that
827 coff_section_data isn't NULL.
828
f075ee0c
AM
8292005-02-21 Alan Modra <amodra@bigpond.net.au>
830
831 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
832 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
833 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
834 useless assignments.
835 (xcoff_write_archive_contents_big): Likewise.
836 (_bfd_xcoff_put_ldsymbol_name): Likewise.
837 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
838 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
839 * cofflink.c (process_embedded_commands): Warning fixes.
840 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
841 Warning fixes.
842 * dwarf2.c: Warning fixes.
843 * elf-bfd.h: Likewise.
844 * elf-eh-frame.c: Likewise.
845 * elf-strtab.c: Likewise.
846 * elf.c: Likewise.
847 * elf32-m68k.c: Likewise.
848 * elf32-ppc.c: Likewise.
849 * elf32-sh-symbian.c: Likewise.
850 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
851 * elf64-sh64.c: Likewise.
852 * peicode.h: Likewise.
853 * elf64-mmix.c: Warning fixes.
854 * elfcode.h: Likewise.
855 * elfxx-mips.c: Likewise.
856 * libbfd-in.h: Likewise.
857 * libbfd.c: Likewise.
858 * mach-o.c: Likewise.
859 * merge.c: Likewise.
860 * mmo.c: Likewise.
861 * opncls.c: Likewise.
862 * pef.c: Likewise.
863 * srec.c: Likewise.
864 * vms-hdr.c: Likewise.
865 * vms-tir.c: Likewise.
866 * xtensa-isa.c: Likewise.
867 * xtensa-modules.c: Likewise.
868 * xsym.c: Likewise.
869 (pstrcmp): Use correct choice of string lengths. Fix return value.
870 (bfd_sym_module_name): Correct string length.
871 * bfd-in2.h: Regenerate.
872 * libbfd.h: Regenerate.
873
68320ddb
AO
8742005-02-17 Alexandre Oliva <aoliva@redhat.com>
875
876 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 877 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
878 Reported by Alan Modra.
879 (elf32_frv_relocate_section): Improve errors and warnings.
880
1808e341
AM
8812005-02-17 Alan Modra <amodra@bigpond.net.au>
882
883 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
884
5ff625e9
AM
8852005-02-16 Alan Modra <amodra@bigpond.net.au>
886
887 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
888 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
889 * pef.c (bfd_pef_scan): Don't ignore return value of
890 bfd_pef_scan_start_address.
7e3102a7
AM
891 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
892 bfd_mach_o_scan_start_address.
893 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
894 * elfxx-mips.c: Remove unnecessary prototypes.
895 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 896
92b7a70f
AM
8972005-02-16 Alan Modra <amodra@bigpond.net.au>
898
899 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
900 Skip toc reloc adjust if reloc_count is zero.
901
d6f16593 9022005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 903 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
904
905 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
906 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
907 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
908 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
909 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
910 dst_mask.
911 (mips16_gprel_reloc): Remove bit shuffling; call
912 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
913 and _bfd_mips16_elf_reloc_shuffle() instead.
914 (mips16_reloc_map): New reloc map for MIPS16 relocs.
915 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
916 relocs.
917 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
918 elf_mips16_howto_table_rel.
919 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
920 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
921 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
922 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
923 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
924 dst_mask.
925 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
926 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
927 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
928 placeholders.
929 (mips16_gprel_reloc): Remove bit shuffling; call
930 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
931 and _bfd_mips16_elf_reloc_shuffle() instead.
932 (mips16_reloc_map): New reloc map for MIPS16 relocs.
933 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
934 relocs.
935 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
936 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
937 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
938 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
939 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
940 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
941 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
942 dst_mask.
943 (mips16_gprel_reloc): Remove bit shuffling; call
944 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
945 and _bfd_mips16_elf_reloc_shuffle() instead.
946 (mips16_reloc_map): New reloc map for MIPS16 relocs.
947 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
948 relocs.
949 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
950 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
951 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
952 handle bit shuffling for MIPS16 relocs.
953 (_bfd_mips16_elf_reloc_shuffle): Likewise.
954 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
955 and _bfd_mips16_elf_reloc_shuffle().
956 (_bfd_mips_elf_generic_reloc): Likewise.
957 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
958 and R_MIPS16_LO16.
959 (mips_elf_obtain_contents): Remove bit shuffling.
960 (mips_elf_perform_relocation): Likewise; call
961 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
962 instead.
963 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
964 and R_MIPS16_LO16.
965 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
966 (_bfd_mips16_elf_reloc_shuffle): Likewise.
967 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
968 (BFD_RELOC_MIPS16_HI16_S): Likewise.
969 (BFD_RELOC_MIPS16_LO16): Likewise.
970 * bfd-in2.h: Regenerate.
971 * libbfd.h: Regenerate.
972
0ca3e455
JB
9732005-02-15 Jan Beulich <jbeulich@novell.com>
974
975 * elfxx-ia64.c (ia64_howto_table): Correct strings for
976 R_IA64_DTPMOD64[LM]SB.
977
c5509b92
L
9782005-02-14 H.J. Lu <hongjiu.lu@intel.com>
979
980 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
981 backward branch in the same section.
982 (elfNN_ia64_relocate_section): Inform users that the input
983 section is too big to relax br instruction when overflow
984 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
985 and R_IA64_PCREL21F.
986
5cba516c
NC
9872005-02-14 Orjan Friberg <orjanf@axis.com>
988
989 * elfcore.h (elf_core_file_p): Move the call to
990 elf_backend_object_p to allow the correct machine to be set before
991 processing the program headers.
992
b59a68e1
NC
9932005-02-14 Nick Clifton <nickc@redhat.com>
994
995 PR binutils/716
996 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
997 aware flag from the input bfd to the output bfd.
998
254f0426
MR
9992005-02-11 Maciej W. Rozycki <macro@mips.com>
1000
1001 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
1002 R_MIPS_LITERAL relocations for external symbols.
1003 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
1004 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
1005
e91cdea7
L
10062005-02-11 H.J. Lu <hongjiu.lu@intel.com>
1007
1008 * bfd-in2.h: Rebuilt.
1009
67687978
PB
10102005-02-11 Paul Brook <paul@codesourcery.com>
1011
1012 * elf-bfd.h (struct elf_link_hash_table): Add
1013 is_relocatable_executable.
1014 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
1015 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
1016 symbols in relocatable executables.
1017 (bfd_elf_record_link_assignment): Create dynamic section symbols in
1018 relocatable executables.
1019 (_bfd_elf_link_renumber_dynsyms): Ditto.
1020 (bfd_elf_final_link): Ditto.
1021 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
1022 relocations into relocatable executables.
1023 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
1024 executables. Also copy absolute relocations.
1025 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
1026 in relocatable executables.
1027 (allocate_dynrelocs): Copy relocations for relocatable executables.
1028 Output dynamic symbols for symbols defined in linker scripts.
1029
ca724bf2
NC
10302005-02-11 Nick Clifton <nickc@redhat.com>
1031
4b74b983
NC
1032 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
1033 to avoid a compile time warning.
1034
ca724bf2
NC
1035 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
1036 BFD_ASSERT.
1037
3e25964f
NC
1038 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
1039 inclusion of coffcode.h so that it is actually picked up.
1040
cb7a88a4
NC
1041 * coffcode.h (coff_std_swap_table): Add an unused attribute in
1042 case it is not used.
1043
596c83ec
NC
1044 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
1045 structure and macro.
1046
6c408f53
NC
1047 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
1048 array.
1049
d5b2f13b
NC
1050 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
1051 to protect the declaration of this array.
1052
169a6afd
NC
1053 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
1054 Avoid call to memcpy with a size of 0.
1055
2917689a
AM
10562005-02-12 Alan Modra <amodra@bigpond.net.au>
1057
1058 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
1059 old-style branches to undefined dot-symbols which will be
1060 satisfied by a plt call.
1061
40d16e0b
AM
10622005-02-11 Alan Modra <amodra@bigpond.net.au>
1063
1064 * elf64-ppc.c (move_plt_plist): New function, extracted from..
1065 (ppc64_elf_copy_indirect_symbol): ..here.
1066 (func_desc_adjust): Use move_plt_plist.
1067
e37c699c
PB
10682005-02-10 Paul Brook <paul@codesourcery.com>
1069
1070 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
1071
6fa3860b
PB
10722005-02-10 Paul Brook <paul@codesourcery.com>
1073
1074 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
1075 symbols local.
1076 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
1077 (elf_link_renumber_local_hash_table_dynsyms): New function.
1078 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
1079
d457dcf6
JJ
10802005-02-10 Jakub Jelinek <jakub@redhat.com>
1081
1082 * bfd-in.h (BFD_LINKER_CREATED): Define.
1083 * bfd-in2.h: Rebuilt.
1084 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
1085 BFD_LINKER_CREATED bfds when determining input bfds without
1086 .note.GNU-stack section.
1087
7f05722e
MR
10882005-02-10 Maciej W. Rozycki <macro@mips.com>
1089
1090 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
1091 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
1092 relocations against external symbols unchanged.
1093
ccf5f610
PB
10942005-02-08 Paul Brook <paul@codesourcery.com>
1095
1096 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
1097 sections.
1098
370a0e1b
HPN
10992005-02-08 Hans-Peter Nilsson <hp@axis.com>
1100
1101 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
1102 prefix here.
1103
99277196
MR
11042005-02-07 Maciej W. Rozycki <macro@mips.com>
1105
1106 * elf64-mips.c: Fix formatting throughout.
1107
6422fbef
MR
11082005-02-07 Maciej W. Rozycki <macro@mips.com>
1109
1110 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
1111
303e4c21
AO
11122005-02-07 Alexandre Oliva <aoliva@redhat.com>
1113
1114 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
1115 *ABS*/*UND* sections.
1116 (elf32_frv_relocate_section): Move zero-addend-required error...
1117 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
1118 missing needed TLS section.
1119
c3864421
HPN
11202005-02-07 Hans-Peter Nilsson <hp@axis.com>
1121
1122 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
1123 being the last symbol.
9f400ee9
HPN
1124 (aout_link_add_symbols): Just return TRUE if a warning
1125 symbol was last.
c3864421 1126
765f2ef6
MR
11272005-02-07 Maciej W. Rozycki <macro@mips.com>
1128
1129 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
1130 R_MIPS_GPREL32 relocations against external symbols.
1131 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
1132 comment.
1133
1b3a8575
AM
11342005-02-07 Alan Modra <amodra@bigpond.net.au>
1135
1136 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
1137 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
1138 elf_string_from_elf_strtab.
1139 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
1140 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
1141 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
1142 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
1143 looking at cached symtab info first, before iterating over headers.
1144 For SHT_REL and SHT_RELA, load dynsymtab if needed.
1145 * elfcode.h (elf_object_p): Don't load section header stringtab
1146 specially.
1147
90f487df
L
11482005-02-06 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
1151 against protected function when building shared library.
1152
1153 PR 584
1154 * elf64-x86-64.c (is_32bit_relative_branch): New.
1155 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
1156 protected function symbol when building shared library for
1157 32bit relative branch instruction.
1158
c4f68ce3
AM
11592005-02-06 Alan Modra <amodra@bigpond.net.au>
1160
1161 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
1162 syms when doing a relocatable link.
1163 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
1164 at u.def.section.
1165 (ppc64_elf_tls_setup): Likewise.
1166 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
1167
908b32fc
AM
11682005-02-04 Alan Modra <amodra@bigpond.net.au>
1169
1170 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
1171 (link_hash_newfunc): Clear all locals using memset.
1172 (make_fdh): Remove flags param. Always create fake func desc
1173 weak. Link the descriptor with the code entry sym.
1174 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
1175 (add_symbol_adjust): Adjust make_fdh call.
1176 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
1177 descriptor to strong undefined if code entry is strong.
1178
4ea42fb7
AM
11792005-02-04 Alan Modra <amodra@bigpond.net.au>
1180
1181 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
1182 lookup here. Set to new before calling bfd_link_repair_undef_list.
1183 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
1184
10d86c8a
AM
11852005-02-03 Alan Modra <amodra@bigpond.net.au>
1186
1187 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
1188
11f25ea6
AM
11892005-02-03 Alan Modra <amodra@bigpond.net.au>
1190
1191 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
1192 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
1193 before the as-needed lib was loaded. Abort on unexpected refs.
1194
4f40114d
AM
11952005-02-02 Alan Modra <amodra@bigpond.net.au>
1196
ec13b3bb
AM
1197 * elflink.c (elf_smash_syms): Expand comments.
1198 (elf_link_add_object_symbols): Only call elf_smash_syms for
1199 as-needed dynamic objects.
1200
4f40114d
AM
1201 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
1202 everything, just the field specific to ia64.
336549c1 1203 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 1204
bb700d78
AM
12052005-02-01 Alan Modra <amodra@bigpond.net.au>
1206
1207 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
1208 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
1209 undefined syms.
1210 (struct add_symbol_adjust_data): New.
1211 (add_symbol_adjust): Make an undefweak func desc for old ABI
1212 objects to link with --as-needed shared libs. Return fail status.
1213 Don't adjust old ABI func entry sym to weak if func desc syms
1214 isn't defined.
1215 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
1216 and return status.
1217
1ffd1c2f
HPN
12182005-02-01 Hans-Peter Nilsson <hp@axis.com>
1219
1220 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
1221 for clarity.
1222
77cfaee6
AM
12232005-02-01 Alan Modra <amodra@bigpond.net.au>
1224
1225 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
1226 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
1227 remove anything but new and undefweak.
1228 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
1229 existing _DYNAMIC.
1230 (_bfd_elf_create_dynamic_sections): Formatting.
1231 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
1232 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
1233 (struct elf_smash_data): New.
1234 (elf_smash_syms): New function.
1235 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
1236 unneeded dynamic objects to loaded list.
1237 (elf_link_output_extsym): Don't handle as-needed here. Strip
1238 bfd_link_hash_new symbols.
1239 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1240 delref when dynindx is already -1.
1241 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
1242 symbols.
1243 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
1244
b15c48d1
BE
12452005-02-01 Ben Elliston <bje@au.ibm.com>
1246
1247 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
1248
0983f4eb 12492005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
1250
1251 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
1252 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
1253 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
1254 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
1255 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
1256 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
1257 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
1258 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
1259 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
1260 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
1261 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
1262 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
1263 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
1264 throughout. Similarly, collapse #if 1'd code.
1265
12662005-02-01 Ben Elliston <bje@au.ibm.com>
1267
0983f4eb
BE
1268 * elf-bfd.h (bfd_elf_discard_group): Remove.
1269 * elf.c (bfd_elf_discard_group): Likewise.
1270 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
1271
8c946ed5
RS
12722005-01-31 Richard Sandiford <rsandifo@redhat.com>
1273
1274 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
1275 (_bfd_elf_eh_frame_address_size): Declare.
1276 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
1277 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
1278 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
1279 (elf_backend_eh_frame_address_size): Define.
1280 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
1281 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
1282 size from the new backend hook.
1283 (_bfd_elf_write_section_eh_frame): Likewise.
1284 (_bfd_elf_eh_frame_address_size): New function.
1285
c46f8c51
AC
12862005-01-31 Andrew Cagney <cagney@gnu.org>
1287
1288 * configure: Regenerate to track ../gettext.m4.
1289
5cd3778d
MM
12902005-01-31 Mark Mitchell <mark@codesourcery.com>
1291
1292 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
1293 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 1294
d6486796
NC
12952005-01-31 Nick Clifton <nickc@redhat.com>
1296
1297 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
1298 sparc-lynxos, vax-vms) be obsolete.
1299
b1342370
DJ
13002005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
1301
1302 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
1303 * elf32-arm.c (ELF_MINPAGESIZE): Define.
1304 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
1305 * elfcode.h (elf_object_p): Use minpagesize instead of
1306 maxpagesize.
1307 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
1308 (elfNN_bed): Include ELF_MINPAGESIZE.
1309
319850b4
JB
13102005-01-28 Julian Brown <julian@codesourcery.com>
1311
1312 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1313 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1314 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
1315 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 1316 passing flag value from ld. Set flag value in global hash table entry.
319850b4 1317 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 1318 relocation.
319850b4 1319
a53bf506
AC
13202005-01-27 Andrew Cagney <cagney@gnu.org>
1321
1322 * configure: Regenerate to track ../gettext.m4 change.
1323
dc4c9c19
MM
13242005-01-25 Mark Mitchell <mark@codesourcery.com>
1325
1326 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 1327 SymbianOS.
dc4c9c19 1328
90219bd0
AO
13292005-01-25 Alexandre Oliva <aoliva@redhat.com>
1330
1331 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
1332 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
1333 for TLSMOFF.
1334 * reloc.c: Add R_FRV_TLSMOFF.
1335 * elf32-frv.c (elf32_frv_howto_table): Likewise.
1336 (frv_reloc_map, frv_reloc_type_lookup): Map it.
1337 (elf32_frv_relocate_section): Handle it.
1338 (elf32_frv_check_relocs): Likewise.
1339 * libbfd.h, bfd-in2.h: Rebuilt.
1340 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
1341 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
1342 when given an undefweak TLS symbol. Fix constant TLS PLT entries
1343 such that they return the constant in gr9.
1344 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
1345 symbols.
1346 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
1347 too, such that they shrink on relaxation.
1348 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
1349 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
1350 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
1351 if we can guarantee the use of 16-bit constants.
1352 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
1353 Introduce TLS support for FR-V FDPIC.
1354 * reloc.c: Add TLS relocations.
1355 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
1356 (elf32_frv_rel_tlsdesc_value_howto): New.
1357 (elf32_frv_rel_tlsoff_howto): New.
1358 (frv_reloc_map): Add new mappings.
1359 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
1360 reloc information.
1361 (frvfdpic_dynamic_got_plt_info): New.
1362 (frvfdpic_plt_tls_ret_offset): New.
1363 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
1364 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
1365 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
1366 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
1367 section as local.
1368 (struct frvfdpic_relocs_info): Add TLS fields.
1369 (frvfdpic_relocs_info_hash): Warning clean up.
1370 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
1371 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
1372 (FRVFDPIC_TLS_BIAS): Define.
1373 (tls_biased_base): New.
1374 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
1375 relocations.
1376 (frv_reloc_type_lookup): Likewise.
1377 (frvfdpic_info_to_howto_rel): Likewise.
1378 (elf32_frv_relocate_section): Likewise.
1379 (_frv_create_got_section): Create the PLT section here.
1380 (elf32_frvfdpic_create_dynamic_sections): Not here.
1381 (_frvfdpic_count_nontls_entries): Move out of...
1382 (_frvfdpic_count_got_plt_entries): ... here.
1383 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
1384 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
1385 support.
1386 (_frvfdpic_relax_tls_entries): New.
1387 (_frvfdpic_compute_got_alloc_data): Add TLS support.
1388 (_frvfdpic_get_tlsdesc_entry): New.
1389 (_frvfdpic_assign_got_entries): Add TLS support.
1390 (_frvfdpic_assign_plt_entries): Likewise.
1391 (_frvfdpic_reset_got_plt_entries): New.
1392 (_frvfdpic_size_got_plt): Move out of...
1393 (elf32_frvfdpic_size_dynamic_sections): ... here.
1394 (_frvfdpic_relax_got_plt_entries): New.
1395 (elf32_frvfdpic_relax_section): New.
1396 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
1397 (elf32_frv_check_relocs): Add TLS support.
1398 (bfd_elf32_bfd_relax_section): Define for FDPIC.
1399 * libbfd.h, bfd-in2.h: Rebuilt.
1400
8615f3f2
AM
14012005-01-25 Alan Modra <amodra@bigpond.net.au>
1402
1403 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
1404 loadable reloc sections.
1405 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
1406 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
1407
7e9f0867
AM
14082005-01-25 Alan Modra <amodra@bigpond.net.au>
1409
1410 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
1411 sections immediately when linking shared libs. Instead, wait until
1412 we know a lib is needed.
1413 (_bfd_elf_link_create_dynstrtab): Extract from..
1414 (_bfd_elf_link_create_dynamic_sections_): ..here.
1415 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
1416 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
1417 for non-existent .dynamic.
1418 (elf_link_output_extsym): Don't complain about undefined symbols
1419 in as-needed dynamic libs that aren't actually linked.
1420
45181ed1
AC
14212005-01-24 Andrew Cagney <cagney@gnu.org>
1422
1423 * configure: Regenerate, ../gettext.m4 was updated.
1424
753e3eb6
BE
14252005-01-21 Ben Elliston <bje@au.ibm.com>
1426
1427 * aout-encap.c: Remove unused file.
1428
1c16dfa5
L
14292005-01-19 H.J. Lu <hongjiu.lu@intel.com>
1430
1431 PR 679
1432 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
1433 non-function symbols are local.
1434 (_bfd_elf_symbol_refs_local_p): Likewise.
1435
1449d79b
AM
14362005-01-18 Alan Modra <amodra@bigpond.net.au>
1437
1438 * bfd.c (bfd_link_just_syms): Add abfd param.
1439 * bfd-in2.h: Regenerate.
1440
dcf507a6
RS
14412005-01-17 Richard Sandiford <rsandifo@redhat.com>
1442
1443 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
1444 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
1445 instructions. If the amount of padding is known, reduce the size
1446 of the CIE or FDE by that amount.
1447
2c42be65
RS
14482005-01-17 Richard Sandiford <rsandifo@redhat.com>
1449
1450 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
1451 augmentation_size. Use bfd_signed_vmas for data_align.
1452 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
1453 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
1454 functions. Don't read past the end of the enclosing CIE or FDE.
1455 (skip_bytes): New utility function.
1456 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
1457 sanity checking.
1458 (_bfd_elf_write_section_eh_frame): Use new functions.
1459
acfe5567
RS
14602005-01-17 Richard Sandiford <rsandifo@redhat.com>
1461
1462 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
1463 assert-style REQUIRE() macro to handle sanity checks.
1464
c0c28ab8
L
14652005-01-17 H.J. Lu <hongjiu.lu@intel.com>
1466
1467 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
1468 (comp_unit): Here.
1469 (read_unsigned_leb128): Removed.
1470 (read_signed_leb128): Removed.
1471 (find_abstract_instance_name): Updated.
1472 (parse_comp_unit): Accept info_ptr_unit.
1473 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
1474 comp unit and pass it to parse_comp_unit.
1475
1476 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
1477 (read_signed_leb128): Moved to ...
1478 * libbfd.c: Here.
1479
1480 * libbfd-in.h (read_unsigned_leb128): New prototype.
1481 (read_signed_leb128): Likewise.
1482 * libbfd.h: Regenerated.
1483
e38bc3b5
NC
14842005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
1485 Nick Clifton <nickc@redhat.com>
1486
1487 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
1488 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
1489 arch_sh4a_nofpu_up in order to match the external names and make the
1490 testsuite's job easier.
1491 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
1492 names.
1493 * bfd-in2.h: Regenerate.
1494
8fb84ecc
AC
14952005-01-15 Andrew Cagney <cagney@gnu.org>
1496
1497 * bfd.m4: New file.
1498 * acinclude.m4: Move BFD_NEED_DECLARATION,
1499 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
1500 the new file bfd.m4. Include ../bfd/bfd.m4.
1501 * configure: Re-generate.
8615f3f2 1502
b4a38de6
AM
15032005-01-12 Alan Modra <amodra@bigpond.net.au>
1504
1505 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
1506 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
1507 reaching PLT.
1508 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
1509 R_PPC_RELAX32PC_PLT.
1510
3eb128b2
AM
15112005-01-11 Alan Modra <amodra@bigpond.net.au>
1512
1513 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
1514 symbols.
1515 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1516 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1517 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1518 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1519 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1520 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1521 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
1522 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1523 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1524 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
1525 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1526 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1527 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1528 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1529
264a1fe0
AM
15302005-01-11 Alan Modra <amodra@bigpond.net.au>
1531
1532 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
1533 .dynsbss flags.
1534
5c4504f7
NC
15352005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
1536
1537 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
1538 * bfd-in2.h: Regenerate.
1539 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
1540 to support these new machine values.
1541 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
1542 the maxq10.
1543 (bfd_maxq_arch): Update values for the maxq20.
1544
669460c7
EB
15452005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
1546
1547 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
1548 non-shared object, do not reserve space in .plt and .rela.plt for
1549 regular symbols neither defined nor referenced in shared objects.
1550
a51a7930
EB
15512005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
1552
01aac484
EB
1553 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
1554 to zero the structure.
1555 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
1556 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
1557 'srelgot' fields.
1558 (create_got_section): New function.
1559 (sparc64_elf_create_dynamic_sections): Likewise.
1560 (sparc64_elf_check_relocs): Invoke create_got_section instead of
1561 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
1562 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
1563 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
1564 (sparc64_elf_finish_dynamic_symbol): Likewise.
1565 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
1566 (elf_backend_create_dynamic_sections): Define to
1567 sparc64_elf_create_dynamic_sections.
1568
151e5294
EB
15692005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
1570
1571 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
1572 (elf_backend_omit_section_dynsym): Define to it.
1573 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
1574 (elf_backend_omit_section_dynsym): Define to it.
1575
6f79b219
JJ
15762005-01-07 Jakub Jelinek <jakub@redhat.com>
1577
1578 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
1579 PT_DYNAMIC segment, unless .dynamic.
1580
4e7fd91e
PB
15812005-01-06 Paul Brook <paul@codesourcery.com>
1582
1583 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
1584 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
1585 * configure: Regenerate.
1586 * elf32-arm.c: Add VxWorks target bfd.
1587 (USE_REL): Remove.
1588 (elf32_arm_link_hash_table): Add use_rel.
1589 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
1590 elf32_arm_relocate_section): Replace USE_REL with runtime check.
1591 Correct offset calculation for RELA case.
1592 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
1593 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
1594 (elf32_arm_vxworks_link_hash_table_create): New function.
1595 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
1596 (bfd_elf32_littlearm_vxworks_vec): Ditto.
1597 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
1598
4c52953f
AM
15992005-01-06 Alan Modra <amodra@bigpond.net.au>
1600
1601 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
1602 multi_toc_needed.
1603 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
1604 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
1605 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
1606 (ppc64_elf_next_toc_section): Heed no_multi_toc.
1607 (ppc64_elf_reinit_toc): Set multi_toc_needed.
1608 (toc_adjusting_stub_needed): Rewrite.
1609 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
1610 toc tests. Adjust for toc_adjusting_stub_needed changes.
1611 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
1612 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
1613 * section.c: Expand comment on backend bits.
1614 * bfd-in2.h: Regenerate.
1615 * libbfd.h: Regenerate.
1616
f03d65b4
AM
16172005-01-06 Alan Modra <amodra@bigpond.net.au>
1618
1619 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
1620 toc adjusting stub, do not test source section flags.
1621
8af139b3
EB
16222005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
1623
1624 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1625 from STABS debugging sections again.
1626
06f22d7e
FF
16272005-01-05 Fred Fish <fnf@specifixinc.com>
1628
1629 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
1630 (find_abstract_instance_name): New function.
1631 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
1632 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
1633 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
1634
83a358aa
PB
16352004-12-31 Paul Brook <paul@copdesourcery.com>
1636
1637 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
1638
b996922c
AM
16392004-12-31 Alan Modra <amodra@bigpond.net.au>
1640
1641 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
1642 Commit missing changes from 2004-12-22.
1643 * bfd-in2.h: Regenerate.
1644
17a83432
TL
16452004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
1646
1647 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
1648
d69f560c
KW
16492004-12-21 Kris Warkentin <kewarken@qnx.com>
1650
1651 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
1652 Add 'base' argument for constructing register sections. Reformat.
1653 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
1654 gp and fp regs. Reformat.
4c52953f 1655
750bce0e
NC
16562004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
1657
1658 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
1659 * bfd-in2.h: Regenerate.
1660 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
1661 (avr_reloc_map): Likewise.
1662 (avr_final_link_relocate): Likewise.
1663
a5db907e
AM
16642004-12-22 Alan Modra <amodra@bigpond.net.au>
1665
1666 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
1667 as-needed dynamic libs as undefined.
1668 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
1669 libs when finding they are needed.
1670
8860955f
AM
16712004-12-20 Alan Modra <amodra@bigpond.net.au>
1672
1673 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
1674 (opd_entry_value): Use opd_relocs if available.
1675 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
1676 copy .opd relocations to opd_relocs.
1677 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
1678
1e50d24d
RS
16792004-12-16 Richard Sandiford <rsandifo@redhat.com>
1680
1681 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
1682 * elf32-v850.c (v850_elf_howto_table): Add entry for
1683 R_V850_LO16_SPLIT_OFFSET.
1684 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
1685 (v850_elf_perform_lo16_relocation): New function, extracted from...
1686 (v850_elf_perform_relocation): ...here. Use it to handle
1687 R_V850_LO16_SPLIT_OFFSET.
1688 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
1689 R_V850_LO16_SPLIT_OFFSET.
1690 * libbfd.h, bfd-in2.h: Regenerate.
1691
2fbd2a87
NC
16922004-12-14 P.J. Darcy <darcypj@us.ibm.com>
1693
1694 * config.bfd: Add s390x-ibm-tpf support.
1695
06302770
TL
16962004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
1697
8860955f 1698 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
1699 to prototype, to make hash info available.
1700 Prevent wrapped symbols from being adjusted twice.
1701
c314987d
RS
17022004-12-14 Richard Sandiford <rsandifo@redhat.com>
1703
1704 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
1705 overflow for calls to undefined weak symbols.
1706
5c799c07
AM
17072004-12-11 Alan Modra <amodra@bigpond.net.au>
1708
1709 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
1710 canonical sections syms have a name.
1711
645ea6a9
AM
17122004-12-11 Alan Modra <amodra@bigpond.net.au>
1713
1714 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
1715 have been adjusted for output.
1716 (ppc64_elf_relocate_section): Mark sections with reloc_done.
1717
0e2cfdce
AM
17182004-12-10 Alan Modra <amodra@bigpond.net.au>
1719
be8dd2ca
AM
1720 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
1721 add symtab_hdr param.
0e2cfdce
AM
1722 (group_signature): Update calls.
1723 * elf-bfd.h (bfd_elf_sym_name): Update.
1724 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
1725 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
1726 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
1727 * elflink.c (elf_link_input_bfd): Update.
1728
138f35cc
JJ
17292004-12-10 Jakub Jelinek <jakub@redhat.com>
1730
1731 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
1732 st_shndx on STT_SECTION sections.
1733
f9cfae62
DJ
17342004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
1735
1736 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
1737 ELF section symbols.
1738
0d2e43ed
ILT
17392004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
1740
1367d393
ILT
1741 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
1742 return a real value, unless it is a PLT symbol.
1743 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
1744 bal if possible.
1745
74f79d8d
ILT
1746 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
1747 R_MIPS_JALR entry to 0.
1748
0d2e43ed
ILT
1749 * archures.c: Define bfd_mach_mips9000.
1750 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
1751 (mips_set_isa_flags): Handle bfd_mach_mips9000.
1752 * cpu-mips.c (I_mips9000): Define.
1753 (arch_info_struct): Add case for bfd_mach_mips9000.
1754 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
1755 * bfd-in2.h: Regenerate.
1756
728b2f21
ILT
17572004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
1758
1759 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
1760 overflow.
1761
45ab555d
BE
17622004-12-07 Ben Elliston <bje@gnu.org>
1763
1764 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
1765
1511ddaf
DJ
17662004-12-06 Daniel Jacobowitz <dan@debian.org>
1767
1768 Suggested by Fergal Daly <fergal@esatclear.ie>:
1769 * simple.c (simple_dummy_multiple_definition): New function.
1770 (bfd_simple_get_relocated_section_contents): Use it.
1771
17722004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
1773
1774 * elf.c (elf_find_function): Don't use the last file symbol ever,
1775 seen, but the last one seen prior to the symbol being reported.
1776 Don't report a filename at all for global symbols when that might
1777 be ambiguous/wrong.
1778
94a3258f
PB
17792004-12-01 Paul Brook <paul@codesourcery.com>
1780
1781 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
1782 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
1783 version.
1784
529fcb95
PB
17852004-12-01 Paul Brook <paul@codesourcery.com>
1786
1787 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
1788 sections undefined.
1789
dea514f5
PB
17902004-11-30 Paul Brook <paul@codesourcery.com>
1791
1792 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
1793 no_pipeline_knowledge
1794 (elf32_arm_link_hash_table_create): Ditto.
1795 (bfd_elf32_arm_process_before_allocation): Ditto.
1796 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
1797 handling.
1798 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
1799 prototype.
1800 * bfd-in2.h: Regenerate.
1801
edfc032f
AM
18022004-11-30 Randolph Chung <tausq@debian.org>
1803
1804 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
1805 (elf32_hppa_grok_psinfo): New function.
1806 (elf_backend_grok_prstatus): Define.
1807 (elf_backend_grok_psinfo): Define.
1808
0be9069d
L
18092004-11-24 H.J. Lu <hongjiu.lu@intel.com>
1810
1811 PR 574:
1812 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
1813
47cc2cf5
PB
18142004-11-24 Paul Brook <paul@codesourcery.com>
1815
1816 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
1817
0beaef2b
PB
18182004-11-24 Paul Brook <paul@codesourcery.com>
1819
1820 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
1821 (elf32_arm_swap_symbol_out): New function.
1822 (elf32_arm_size_info): Add.
1823 (elf_backend_size_info): Define.
1824
3dd2fcf0
DA
18252004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1826
1827 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
1828 make_bfd_asection.
1829
de52dba4
AM
18302004-11-19 Alan Modra <amodra@bigpond.net.au>
1831
1832 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
1833 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
1834 * nlmcode.h (nlm_write_object_contents): Warning fix.
1835
288f74fa
BW
18362004-11-18 Bob Wilson <bob.wilson@acm.org>
1837
1838 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
1839
b7693d02
DJ
18402004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
1841
1842 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
1843 (elf32_arm_plt_thumb_stub): New.
1844 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
1845 and plt_got_offset.
1846 (elf32_arm_link_hash_traverse): Fix typo.
1847 (elf32_arm_link_hash_table): Add obfd.
1848 (elf32_arm_link_hash_newfunc): Initialize new fields.
1849 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
1850 (elf32_arm_link_hash_table_create): Initialize obfd.
1851 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
1852 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
1853 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
1854 interworking BFD is not dynamic.
1855 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
1856 not emit glue for PLT references.
1857 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
1858 emit glue for PLT references. Support the Thumb PLT prefix.
1859 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
1860 plt_thumb_refcount.
1861 (elf32_arm_check_relocs): Likewise.
1862 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
1863 plt_thumb_refcount.
1864 (allocate_dynrelocs): Handle Thumb PLT references.
1865 (elf32_arm_finish_dynamic_symbol): Likewise.
1866 (elf32_arm_symbol_processing): New function.
1867 (elf_backend_symbol_processing): Define.
1868
353057a5
RS
18692004-11-16 Richard Sandiford <rsandifo@redhat.com>
1870
1871 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
1872 add_fde_encoding. Remove need_relative.
1873 * elf-eh-frame.c (extra_augmentation_string_bytes)
1874 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
1875 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
1876 in cases where the CIE has no existing 'R' augmentation. Use
1877 size_of_output_cie_fde when assigning offsets. Use the final offset
1878 as the new section size.
1879 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
1880 Account for any extra augmentation bytes in the returned offset.
1881 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
1882 moved before being modified. Pad growing entries with DW_CFA_nops.
1883 Add 'z' and 'R' augmentations as directed by add_augmentation_size
1884 and add_fde_encoding.
1885
b32d3aa2
MM
18862004-11-15 Mark Mitchell <mark@codesourcery.com>
1887
1888 * elf32-arm.c (elf32_arm_relocate_section): Use
1889 arm_real_reloc_type.
1890
5d41f0b6
RS
18912004-11-16 Richard Sandiford <rsandifo@redhat.com>
1892
1893 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
1894 for discard relocations; don't add an R_MIPS_NONE to the main body
1895 of .rel.dyn.
1896
fc0e6df6
PB
18972004-11-04 Paul Brook <paul@codesourcery.com>
1898
1899 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
1900 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
1901 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
1902 default version definition for unversioned symbols.
1903 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
1904 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
1905 _bfd_elf_slurp_version_tables. Set default version for unversioned
1906 imported symbols.
1907
b23e50e2
PB
19082004-11-15 Paul Brook <paul@codesourcery.com>
1909
1910 * elflink.c (elf_link_add_object_symbols): Don't assume version
1911 indices are consecutive.
1912
f4a6705c
RS
19132004-11-14 Richard Sandiford <rsandifo@redhat.com>
1914
1915 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
1916 composite relocations against the personality data.
1917
ee06dc07
PB
19182004-11-13 Paul Brook <paul@codesourcery.com>
1919
1920 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
1921 R_ARM_PREL31 relocations to PLT entries.
1922 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
1923 (elf32_arm_check_relocs): Ditto.
1924
a1ace8d8
BW
19252004-11-12 Bob Wilson <bob.wilson@acm.org>
1926
1927 * xtensa-isa.c (xtensa_interface_class_id): New.
1928
e4115460
BW
19292004-11-11 Bob Wilson <bob.wilson@acm.org>
1930
1931 * elf32-xtensa.c (property_table_compare): Remove assertion about
1932 entries with the same address and non-zero size.
1933 (xtensa_read_table_entries): Report such entries as errors.
1934
6366ff1e
MM
19352004-11-11 Mark Mitchell <mark@codesourcery.com>
1936
1937 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
1938 R_ARM_RELATIVE on Symbian OS.
1939
b34af79c
MM
19402004-11-09 Mark Mitchell <mark@codesourcery.com>
1941
e6dc21b6
MM
1942 * som.c (som_bfd_print_private_bfd_data): New function.
1943 (som_object_setup): Save the auxiliary header. Don't assume that
1944 zero is an invalid entry point for a shared library.
1945 (som_object_p): Allocate the auxiliary header on the heap.
1946
b34af79c
MM
1947 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
1948 declaration.
1949 (elf32_arm_symbian_modify_segment_map): Likewise.
1950
08d1f311
DJ
19512004-11-09 Daniel Jacobowitz <dan@debian.org>
1952
1953 From David Poole <daveml@mbuf.com>:
1954 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
1955 (elf32_arm_size_dynamic_sections): Call it.
1956
0306b3bf
AM
19572004-11-09 Alan Modra <amodra@bigpond.net.au>
1958
1959 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
1960 (ALL_MACHINES_CFILES): Fix typo.
1961 * Makefile.in: Regenerate.
1962 * po/SRC-POTFILES.in: Regenerate.
1963
a16385dc
MM
19642004-11-08 Mark Mitchell <mark@codesourcery.com>
1965
1966 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
1967 R_ARM_RELATIVE relocation for Symbian OS, mention the section
1968 symbol in the relocation.
1969
0306b3bf
AM
19702004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
1971 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
1972
1973 * coff-maxq.c: New File.
0306b3bf
AM
1974 * cpu-maxq.c: New File.
1975 * coffcode.h: Likewise.
1976 * config.bfd: Likewise.
1977 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
1978 * Makefile.am: Add support for maxq target.
1979 * configure.in: Likewise.
0306b3bf
AM
1980 * archures.c:. Likewise.
1981 * targets.c: Likewise.
1982 * bfd_in2.h : Regenerated.
7499d566
NC
1983 * Makefile.in: Regenerated.
1984 * configure: Regenerated.
1985 * doc/Makefile.in: Regenerated.
1986
977cdf5a
NC
19872004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1988
1989 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
1990 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
1991 C_NT_WEAK aux entries.
1992 (_bfd_coff_generic_relocate_section): Handle undefined
1993 aliases.
1994
9dfe8738
AS
19952004-11-07 Andreas Schwab <schwab@suse.de>
1996
1997 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
1998 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
1999 non-default visibility.
2000
c3c76620
MM
20012004-11-01 Mark Mitchell <mark@codesourcery.com>
2002
2003 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 2004 D_PAGED.
c3c76620
MM
2005 (elf32_arm_symbian_modify_segment_map): Don't
2006 reset includes_filehdr and includes_phdrs here.
2007
7f266840
DJ
20082004-11-04 Daniel Jacobowitz <dan@debian.org>
2009
2010 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
2011 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
2012 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
2013 dependency.
2014 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
2015 to a new removed list. Remove normal configuration stanzas.
2016 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
2017 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
2018 elfarm-nabi.lo with elf32-arm.lo.
2019 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
2020 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
2021 * elf32-arm.h: Remove.
2022 * elfarm-oabi.c: Remove.
2023 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
2024 and bfd_elf32_littlearm_oabi_vec.
2025 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
2026
bac23f82
HPN
20272004-11-04 Hans-Peter Nilsson <hp@axis.com>
2028
2029 * config.bfd: Support crisv32-*-* like cris-*-*.
2030 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
2031 (bfd_mach_cris_v10_v32): New macros.
2032 * cpu-cris.c: Tweak formatting.
2033 (get_compatible): New function.
2034 (N): New macro.
2035 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
2036 bfd_arch_info_type:s.
2037 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
2038 get_compatible for member compatible and link bfd_cris_arch_v32 as
2039 next.
2040 * elf32-cris.c (cris_elf_pcrel_reloc)
2041 (cris_elf_set_mach_from_flags): New functions.
2042 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
2043 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
2044 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
2045 numbers for bfd_mach_cris_v32.
2046 (PLT_ENTRY_SIZE_V32): New macro.
2047 (elf_cris_plt0_entry): Drop last comma in initializer.
2048 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
2049 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
2050 PLT initializers.
2051 (cris_elf_relocate_section): Change all "%B(%A)" messages to
2052 "%B, section %A".
2053 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
2054 (elf_cris_finish_dynamic_sections): Similar.
2055 (elf_cris_adjust_dynamic_symbol): Similar.
2056 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
2057 section %A".
2058 <switch with PIC relocs>: Emit error and return FALSE for
2059 bfd_mach_cris_v10_v32.
2060 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2061 Emit warning when generating textrel reloc.
2062 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
2063 (cris_elf_final_write_processing): Set flags according to mach.
2064 (cris_elf_print_private_bfd_data): Display
2065 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
2066 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
2067 new_flags. Don't call cris_elf_final_write_processing. Don't
2068 look at the actual elf header flags at all; use
2069 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
2070 in bfd_get_mach for ibfd and obfd and handle merging of compatible
2071 objects.
2072 (bfd_elf32_bfd_copy_private_bfd_data): Define.
2073 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
2074 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
2075 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
2076 * bfd-in2.h, libbfd.h: Regenerate.
2077
c5614fa4
AM
20782004-11-04 Alan Modra <amodra@bigpond.net.au>
2079
2080 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
2081 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
2082 comment.
2083 (struct adjust_toc_info): New.
2084 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
2085
0ebdbb83
BW
20862004-11-03 Bob Wilson <bob.wilson@acm.org>
2087
2088 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
2089 if there are no segments.
2090
675b2ace
DJ
20912004-11-02 Daniel Jacobowitz <dan@debian.org>
2092
2093 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
2094
58852c27
NC
20952004-11-02 Nick Clifton <nickc@redhat.com>
2096
2097 * elf32-iq2000.c: Convert to ISO C90 formatting.
2098
e6857c0c
HPN
20992004-11-02 Hans-Peter Nilsson <hp@axis.com>
2100
20288ed6 2101 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 2102
bf718458
L
21032004-10-28 H.J. Lu <hongjiu.lu@intel.com>
2104
2105 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
2106 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
2107 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2108
044ad7e3
KK
21092004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2110
2111 * elf32-sh.c (tpoff): Take alignment into account.
2112
d5cb4bb8
NC
21132004-10-28 Nick Clifton <nickc@redhat.com>
2114
2115 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 2116 performing a relocatable link.
d5cb4bb8
NC
2117 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
2118 for MIPS ports under Irix.
2119
5b5bb741
PB
21202004-10-27 Richard Earnshaw <rearnsha@arm.com>
2121
2122 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
2123 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
2124 (elf32_arm_final_link_relocate): Ditto.
2125 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
2126 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
2127 (elf32_arm_adjust_dynamic_symbol): Ditto.
2128 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
2129 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
2130 (elf32_arm_r_howto): ... To here.
2131 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
2132
97ecf322
L
21332004-10-26 H.J. Lu <hongjiu.lu@intel.com>
2134
2135 PR 475
2136 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
2137 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
2138 and R_IA64_SECREL64LSB.
2139
3e3b46e5
PB
21402004-10-26 Paul Brook <paul@codesourcery.com>
2141
2142 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
2143 (bfd_elf_size_dynamic_sections): Create default version definition.
2144 (elf_link_output_extsym): Adjust for default symbol version.
2145
aa69fe43
HPN
21462004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2147
278b4623
HPN
2148 * mmo.c: Adjust to ISO C.
2149
aa69fe43
HPN
2150 * mmo.c (mmo_write_section_description): New function broken out
2151 of mmo_internal_write_section.
2152 (mmo_internal_write_section): For each of .text and .data, call
2153 mmo_write_section_description before outputting contents if it has
2154 nontrivially deducible vma or contents.
2155 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
2156 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
2157 symbols if found within the .data address range.
2158
ed040321
DJ
21592004-10-24 Daniel Jacobowitz <dan@debian.org>
2160
2161 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
2162
830866af
HPN
21632004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2164
2165 * mmo.c (File Layout): Correct place of misplaced blurb about
2166 special data.
2167
5f417ca3
MK
21682004-10-22 Mark Kettenis <kettenis@gnu.org>
2169
2170 * config.bfd: Add mips64*-*-openbsd.
2171
823fc61f
BW
21722004-10-21 Bob Wilson <bob.wilson@acm.org>
2173
2174 * elf32-xtensa.c (ebb_propose_action): Put declarations before
2175 statements.
2176
8697aafb
L
21772004-10-21 H.J. Lu <hongjiu.lu@intel.com>
2178
2179 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
2180 * configure: Regenerate.
2181
dfeffb9f
L
21822004-10-21 H.J. Lu <hongjiu.lu@intel.com>
2183
2184 PR 463
2185 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
2186 to linker reloc_overflow callback.
2187 (aout_link_input_section_ext): Likewise.
2188 (aout_link_reloc_link_order): Likewise.
2189 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2190 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2191 Likewise.
2192 (alpha_relocate_section): Likewise.
2193 * coff-arm.c (coff_arm_relocate_section): Likewise.
2194 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
2195 * coff-h8500.c (extra_case): Likewise.
2196 * coff-i960.c (coff_i960_relocate_section): Likewise.
2197 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2198 * coff-mips.c (mips_relocate_section): Likewise.
2199 * coff-or32.c (coff_or32_relocate_section): Likewise.
2200 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2201 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
2202 * coff-sh.c (sh_relocate_section): Likewise.
2203 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2204 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
2205 * coff-z8k.c (extra_case): Likewise.
2206 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2207 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2208 (_bfd_coff_generic_relocate_section): Likewise.
2209 * ecoff.c (ecoff_reloc_link_order): Likewise.
2210 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2211 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2212 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2213 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2214 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2215 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2216 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2217 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2218 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2219 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2220 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2221 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2222 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2223 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2224 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2225 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2226 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2227 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2228 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2229 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2230 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2231 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2232 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2233 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2234 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2235 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2236 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2237 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2238 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2239 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2240 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2241 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2242 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2243 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2244 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2245 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2246 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2247 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2248 * elflink.c (elf_reloc_link_order): Likewise.
2249 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2250 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2251 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
2252 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2253 * pdp11.c (pdp11_aout_link_input_section): Likewise.
2254 (aout_link_reloc_link_order): Likewise.
2255 * reloc.c (bfd_generic_get_relocated_section_contents):
2256 Likewise.
2257 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2258 * simple.c (simple_dummy_reloc_overflow): Updated.
2259
1715e0e3
AS
22602004-10-20 Andreas Schwab <schwab@suse.de>
2261
2262 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
2263 (elf_backend_plt_sym_val): Define.
2264
db3d41a8
DS
22652004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
2266
2267 * config.bfd: Set targ_underscore=yes for PE COFF targets
2268
4b85d634
AM
22692004-10-19 Alan Modra <amodra@bigpond.net.au>
2270
2271 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
2272 (ppc64_elf_edit_opd): Likewise.
2273
6df4d94c
MM
22742004-10-18 Mark Mitchell <mark@codesourcery.com>
2275
2276 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
2277 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
2278 set SEC_ALLOC and SEC_LOAD.
2279
00d962d1
NC
22802004-10-18 Nick Clifton <nickc@redhat.com>
2281
2282 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
2283 'name' for relocs against both local and global symbols.
2284
b58f81ae
DJ
22852004-10-16 Daniel Jacobowitz <dan@debian.org>
2286
2287 * bfd-in2.h: Regenerate.
2288 * bfd.c (struct bfd): Add no_export.
2289 * elflink.c (elf_link_add_object_symbols): Handle no_export.
2290
7d3f158f
AM
22912004-10-15 Alan Modra <amodra@bigpond.net.au>
2292
2293 * config.bfd: Whitespace cleanup.
2294 * Makefile.am: Run "make dep-am"
2295 * Makefile.in: Regenerate.
2296
6d2cd210
JJ
22972004-10-15 Jakub Jelinek <jakub@redhat.com>
2298
2299 * elflink.c (struct already_linked_section): Removed.
2300 (try_match_symbols_in_sections, already_linked): Removed.
2301 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
2302 prefix of section names when finding already_linked_table
2303 chain. Compare section names. Instead of calling already_linked,
2304 do it inline and only for sections in the same already_linked_list.
2305
92e4ec35
AM
23062004-10-15 Alan Modra <amodra@bigpond.net.au>
2307
2308 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
2309 parameter. If called after _bfd_elf_write_section_eh_frame,
2310 don't allow a -2 return unless need_* bit is already set, and
2311 handle offsets adjusted for output_offset.
2312 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
2313 * elf.c (_bfd_elf_section_offset): Update call.
2314
7bf6dede
L
23152004-10-13 H.J. Lu <hongjiu.lu@intel.com>
2316
2317 PR 440
2318 * coffcode.h (coff_compute_section_file_positions): Cast to
2319 bfd_vma when computing page alignment.
2320
c0042f5d
MM
23212004-10-13 Mark Mitchell <mark@codesourcery.com>
2322
2323 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2324 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
2325
2a1b9a48
MM
23262004-10-12 Mark Mitchell <mark@codesourcery.com>
2327
2328 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
2329 relocations use a virtual address, not a section offset.
2330
b08b5071
BW
23312004-10-12 Bob Wilson <bob.wilson@acm.org>
2332
2333 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
2334 (narrow_instruction, widen_instruction): Remove unnecessary calls to
2335 xtensa_format_encode.
2336 (ebb_propose_action): Inline call to ebb_add_proposed_action.
2337 (ebb_add_proposed_action): Delete.
2338
7fa3d080
BW
23392004-10-12 Bob Wilson <bob.wilson@acm.org>
2340
2341 * elf32-xtensa.c: Use ISO C90 formatting.
2342
3656d5e3
PB
23432004-10-12 Paul Brook <paul@codesourcery.com>
2344
2345 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
2346 message.
2347
8cb51566
PB
23482004-10-12 Paul Brook <paul@codesourcery.com>
2349
2350 * elf32-arm.h: Support EABI version 4 objects.
2351
1abc8597
AM
23522004-10-12 Alan Modra <amodra@bigpond.net.au>
2353
2354 PR 325
2355 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
2356 Don't mark as default.
2357 (bfd_x86_64_arch): Don't mark as default.
2358
9e66c942
AM
23592004-10-12 Alan Modra <amodra@bigpond.net.au>
2360
2361 * elflink.c (enum action_discarded): New.
2362 (elf_section_complain_discarded): Delete.
2363 (elf_action_discarded): New function subsuming the above and also
2364 controlling reloc behaviour.
1abc8597 2365 (elf_link_input_bfd): Use it.
9e66c942 2366
7f1204bb
JJ
23672004-10-11 Jakub Jelinek <jakub@redhat.com>
2368
2369 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
2370 (special_sections): Add .gnu.liblist and .gnu.conflict.
2371 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
2372
87e5235d
AM
23732004-10-11 Alan Modra <amodra@bigpond.net.au>
2374
2375 PR 233
2376 * elflink.c (elf_link_input_bfd): Try harder to support
2377 relocations against symbols in removed linkonce sections.
2378
2ad770c3
AM
23792004-10-11 Alan Modra <amodra@bigpond.net.au>
2380
029446c4
AM
2381 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
2382
2ad770c3
AM
2383 PR 354
2384 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
2385 sections do not reference symbols in non-SEC_ALLOC sections.
2386
1da212d6
AM
23872004-10-11 Alan Modra <amodra@bigpond.net.au>
2388
2389 PR 437
2390 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
2391 (_bfd_elf_link_omit_section_dynsym): Formatting.
2392
f12123c0
AM
23932004-10-10 Alan Modra <amodra@bigpond.net.au>
2394
2395 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
2396 * libbfd.h: Regnerate.
2397 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
2398 * elf32-frv.c: Likewise.
2399 * elf32-m32r.c: Likewise.
2400 * elf32-ppc.c: Likewise.
2401 * elf64-hppa.c: Likewise.
2402 * elfxx-ia64.c: Likewise.
2403 * opncls.c: Likewise.
2404
fda3ecf2
AM
24052004-10-10 Alan Modra <amodra@bigpond.net.au>
2406
3472e2e9
AM
2407 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
2408 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
2409 offsets stored in struct eh_cie_fde entries before doing other
2410 work.
2411
fda3ecf2
AM
2412 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
2413 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
2414 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
2415 setting offsets for removed CIEs. Don't set "sec", instead set
2416 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
2417 CIE in hdr_info. Only set make_relative and make_lsda_relative
2418 for CIEs. Use pointers rather than array indices.
2419 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
2420 make_lsda_relative, need_* on cie_inf for FDEs.
2421 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
2422 section output_offset. Delete cie_offset, instead use cie_inf
2423 pointer to CIE entry. Use need_relative and need_lsda_relative on
2424 CIE entry for FDEs. Use pointers rather than array indices.
2425
7db6994f
AM
24262004-10-09 Alan Modra <amodra@bigpond.net.au>
2427
2428 * coff-rs6000.c (rs6000coff_vec): Add initializer for
2429 bfd_is_target_special_symbol.
2430 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2431 * som.c (som_bfd_is_target_special_symbol): Define.
2432
3c9458e9
NC
24332004-10-08 Nick Clifton <nickc@redhat.com>
2434
2435 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
2436 * configure: Regenerate.
2437 * bfd-in2.h: Regenerate.
2438 * syms.c (bfd_is_target_special_symbol): New interface function.
2439 Returns true when a symbol should be considered to be special.
7db6994f 2440 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
2441 the symbol jump table.
2442 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
2443 Return true iff the symbol is a mapping symbol.
2444 (bfd_elf32_bfd_is_target_special_symbol): Define.
2445 * elfxx-target.h: Provide a default definition for
2446 bfd_is_target_special_symbol.
2447 * aout-target.h: Likewise.
2448 * aout-tic30.c: Likewise.
873d03ee 2449 * binary.c: Likewise.
3c9458e9
NC
2450 * coffcode.h: Likewise.
2451 * i386msdos.c: Likewise.
2452 * ieee.c: Likewise.
873d03ee 2453 * ihex.c: Likewise.
3c9458e9
NC
2454 * libaout.h: Likewise.
2455 * libbfd-in.h: Likewise
2456 * libecoff.h: Likewise.
2457 * mach-o.c: Likewise.
2458 * mmo.c: Likewise.
2459 * nlm-target.h: Likewise.
2460 * oasys.c: Likewise.
2461 * pef.c: Likewise.
2462 * ppcboot.c: Likewise.
2463 * srec.c: Likewise.
2464 * tekhex.c: Likewise.
2465 * versados.c: Likewise.
2466 * vms.c: Likewise.
2467 * xcoff-target.h: Likewise.
2468 * xsym.c: Likewise.
2469 * libbfd.h: Regenerate.
2470
d2b2c203
DJ
24712004-10-08 Daniel Jacobowitz <dan@debian.org>
2472
2473 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
2474 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
2475 (elf_backend_section_from_shdr): Define.
2476
864274b0
AM
24772004-10-08 Alan Modra <amodra@bigpond.net.au>
2478
2479 * syms.c (bfd_is_local_label): Return false for file symbols.
2480
43cd72b9 24812004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 2482 David Heine <dlheine@tensilica.com>
43cd72b9
BW
2483
2484 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
2485 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
2486 (elf32xtensa_no_literal_movement): New global variable.
2487 (elf_howto_table): Add entries for new relocations.
2488 (elf_xtensa_reloc_type_lookup): Handle new relocations.
2489 (property_table_compare): When addresses are equal, compare sizes and
2490 various property flags.
2491 (property_table_matches): New.
2492 (xtensa_read_table_entries): Extend to read new property tables. Add
2493 output_addr parameter to indicate that output addresses should be used.
2494 Use bfd_get_section_limit.
2495 (elf_xtensa_find_property_entry): New.
2496 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
2497 (elf_xtensa_check_relocs): Handle new relocations.
2498 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
2499 relocations. Use new xtensa-isa.h functions.
2500 (build_encoding_error_message): Remove encode_result parameter. Add
2501 new target_address parameter used to detect alignment errors.
2502 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
2503 error handling. Use new is_operand_relocation function.
2504 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
2505 Use underbar macro for error messages. Formatting.
2506 (get_const16_opcode): New.
2507 (get_l32r_opcode): Add a separate flag for initialization.
2508 (get_relocation_opnd): Operand number is no longer explicit in the
2509 relocation. Change to decode the opcode and analyze its operands.
2510 (get_relocation_slot): New.
2511 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
2512 Use new xtensa-isa.h functions to handle multislot instructions.
2513 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
2514 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
2515 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
2516 check_loop_aligned, check_branch_target_aligned_address, narrowable,
2517 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
2518 get_single_format, init_op_single_format_table): New.
2519 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
2520 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
2521 (contract_asm_expansion): Add error_message parameter and pass it to
2522 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
2523 with R_XTENSA_SLOT0_OP.
2524 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
2525 instructions. Use new xtensa-isa.h functions.
2526 (r_reloc struct): Add new virtual_offset field.
2527 (r_reloc_init): Add contents and content_length parameters. Set
2528 virtual_offset field to zero. Add contents to target_offset field for
2529 partial_inplace relocations.
2530 (r_reloc_is_defined): Check for null.
2531 (print_r_reloc): New debug function.
2532 (source_reloc struct): Replace xtensa_operand field with pair of the
2533 opcode and the operand position. Add is_abs_literal field.
2534 (init_source_reloc): Specify operand by opcode/position pair. Set
2535 is_abs_literal field.
2536 (source_reloc_compare): When target_offsets are equal, compare other
2537 fields to make sorting predictable.
2538 (literal_value struct): Add is_abs_literal field.
2539 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
2540 (init_literal_value): New.
2541 (is_same_value): Replace with ...
2542 (literal_value_equal): ... this function. Add comparisons of
2543 virtual_offset and is_abs_literal fields.
2544 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
2545 failure. Initialize has_last_loc field.
2546 (value_map_hash_table_delete): New.
2547 (hash_literal_value): Rename to ...
2548 (literal_value_hash): ... this. Include is_abs_literal flag and
2549 virtual_offset field in the hash value.
2550 (get_cached_value): Rename to ...
2551 (value_map_get_cached_value): ... this. Update calls to
2552 literal_value_hash and literal_value_equal.
2553 (add_value_map): Check for allocation failure. Update calls to
2554 value_map_get_cached_value and literal_value_hash.
2555 (text_action, text_action_list, text_action_t): New types.
2556 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
2557 text_action_add, text_action_add_literal, offset_with_removed_text,
2558 offset_with_removed_text_before_fill, find_insn_action,
2559 print_action_list, print_removed_literals): New.
2560 (offset_with_removed_literals): Delete.
2561 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
2562 fix_array, fix_array_count, allocated_relocs, relocs_count, and
2563 allocated_relocs_count fields.
2564 (init_xtensa_relax_info): Initialize new fields.
2565 (reloc_bfd_fix struct): Add new translated field.
2566 (reloc_bfd_fix_init): Add translated parameter and use it to set the
2567 translated field.
2568 (fix_compare, cache_fix_array): New.
2569 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
2570 section via get_xtensa_relax_info. Use cache_fix_array to set up
2571 sorted fix_array and use bsearch instead of linear search.
2572 (section_cache_t): New struct.
2573 (init_section_cache, section_cache_section, clear_section_cache): New.
2574 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
2575 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
2576 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
2577 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
2578 New.
2579 (retrieve_contents): Use bfd_get_section_limit.
2580 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
2581 to compute_removed_literals. Free value_map_hash_table when no longer
2582 needed.
2583 (analyze_relocations): Check is_relaxable_asm_section flag. Call
2584 compute_text_actions for all sections.
2585 (find_relaxable_sections): Mark sections as relaxable if they contain
2586 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
2587 call. Increment relax_info src_count field only for appropriate
2588 relocation types. Remove is_literal_section check.
2589 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
2590 r_reloc_init and find_associated_l32r_irel. Check
2591 is_relaxable_asm_section flag. Handle L32R instructions with absolute
2592 literals. Pass is_abs_literal flag to init_source_reloc.
2593 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
2594 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 2595 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
2596 (find_associated_l32r_irel): Add bfd parameter and pass it to
2597 is_l32r_relocation.
2598 (compute_text_actions, compute_ebb_proposed_actions,
2599 compute_ebb_actions, check_section_ebb_pcrels_fit,
2600 check_section_ebb_reduces, text_action_add_proposed,
2601 compute_fill_extra_space): New.
2602 (remove_literals): Replace with ...
2603 (compute_removed_literals): ... this function. Call
2604 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
2605 Call xtensa_read_table_entries to get the property table. Skip
2606 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
2607 is_removable_literal, remove_dead_literal, and
fda3ecf2 2608 identify_literal_placement functions.
43cd72b9
BW
2609 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
2610 instead of linear search.
2611 (is_removable_literal, remove_dead_literal,
2612 identify_literal_placement): New.
2613 (relocations_reach): Update check for literal not referenced by any
2614 PC-relative relocations. Adjust call to pcrel_reloc_fits.
2615 (coalesce_shared_literal, move_shared_literal): New.
2616 (relax_section): Use bfd_get_section_limit. Call
2617 translate_section_fixes. Update calls to r_reloc_init and
2618 offset_with_removed_text. Check new is_relaxable_asm_section flag.
2619 Add call to pin_internal_relocs. Add special handling for
2620 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
2621 info to calculate new addend_displacement variable. Replace code for
2622 deleting literals with more general code to perform the actions
2623 determined by the action_list for the section.
2624 (translate_section_fixes, translate_reloc_bfd_fix): New.
2625 (translate_reloc): Check new is_relaxable_asm_section flag. Call
2626 find_removed_literal only if is_operand_relocation. Update call to
2627 offset_with_removed_text. Use new target_offset and removed_bytes
2628 variables.
2629 (move_literal): New.
2630 (relax_property_section): Use bfd_get_section_limit. Set new
2631 is_full_prop_section flag and handle new property tables. Update calls
2632 to r_reloc_init and offset_with_removed_text. Check
2633 is_relaxable_asm_section flag. Handle expansion of zero-sized
2634 unreachable entries, with use of offset_with_removed_text_before_fill.
2635 For relocatable links, combine entries only for literal tables.
2636 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
2637 calls to offset_with_removed_text. Translate st_size field for
2638 function symbols.
2639 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
2640 failure. Add contents parameter. Update call to get_bfd_fix. Update
2641 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
2642 R_XTENSA_ASM_EXPAND relocs.
2643 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
2644 call to get_bfd_fix. Include offset from contents for partial_inplace
2645 relocations.
2646 (is_reloc_sym_weak): New.
2647 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
2648 (prop_sec_len): New.
2649 (xtensa_is_property_section): Handle new property sections.
2650 (is_literal_section): Delete.
2651 (internal_reloc_compare): When r_offset matches, compare r_info and
2652 r_addend to make sorting predictable.
2653 (internal_reloc_matches): New.
2654 (xtensa_get_property_section_name): Handle new property sections.
2655 (xtensa_get_property_predef_flags): New.
2656 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
2657 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
2658 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
2659 (xtisa_errno, xtisa_error_msg): New variables.
2660 (xtensa_isa_errno, xtensa_isa_error_msg): New.
2661 (xtensa_insnbuf_alloc): Add error handling.
2662 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
2663 use xtensa_format_decode. Add error handling.
2664 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
2665 instruction length to find the number of bytes to copy.
2666 (xtensa_isa_init): Add error handling. Replace calls to
2667 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
2668 tables in the xtensa_modules structure.
2669 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
2670 xtensa_extend_isa): Delete.
2671 (xtensa_isa_free): Change to only free lookup tables.
2672 (opname_lookup_compare): Replace with ...
2673 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
2674 (xtensa_insn_maxlength): Rename to ...
2675 (xtensa_isa_maxlength): ... this.
2676 (xtensa_insn_length): Delete.
2677 (xtensa_insn_length_from_first_byte): Replace with ...
2678 (xtensa_isa_length_from_chars): ... this function.
2679 (xtensa_num_opcodes): Rename to ...
2680 (xtensa_isa_num_opcodes): ... this.
2681 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
2682 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
2683 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
2684 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
2685 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
2686 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
2687 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
2688 (xtensa_opcode_lookup): Add error handling.
2689 (xtensa_decode_insn): Replace with ...
2690 (xtensa_opcode_decode): ... this function, with new format and
2691 slot parameters. Add error handling.
2692 (xtensa_encode_insn): Replace with ...
2693 (xtensa_opcode_encode): ... this function, which does the encoding via
2694 one of the entries in the "encode_fns" array. Add error handling.
2695 (xtensa_opcode_name): Add error handling.
2696 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
2697 xtensa_opcode_is_call): New.
2698 (xtensa_num_operands): Replace with ...
2699 (xtensa_opcode_num_operands): ... this function. Add error handling.
2700 (xtensa_opcode_num_stateOperands,
2701 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
2702 xtensa_opcode_funcUnit_use, xtensa_operand_name,
2703 xtensa_operand_is_visible): New.
2704 (xtensa_get_operand, xtensa_operand_kind): Delete.
2705 (xtensa_operand_inout): Add error handling and special-case for
2706 "sout" operands.
2707 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
2708 operate on one slot of an instruction. Added error handling.
2709 (xtensa_operand_encode): Handle default operands with no encoding
2710 functions. Check for success by comparing against decoded value.
2711 Add error handling.
2712 (xtensa_operand_decode): Handle default operands. Return decoded value
2713 through argument pointer. Add error handling.
2714 (xtensa_operand_is_register, xtensa_operand_regfile,
2715 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
2716 (xtensa_operand_isPCRelative): Rename to ...
2717 (xtensa_operand_is_PCrelative): ... this. Add error handling.
2718 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
2719 through argument pointer. Add error handling.
2720 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
2721 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
2722 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
2723 xtensa_regfile_shortname, xtensa_regfile_view_parent,
2724 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
2725 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
2726 xtensa_state_is_exported, xtensa_sysreg_lookup,
2727 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
2728 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
2729 xtensa_interface_num_bits, xtensa_interface_inout,
2730 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
2731 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
2732 * xtensa-modules.c: Rewrite to use new data structures.
2733 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
2734 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
2735 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
2736 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
2737 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
2738 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
2739 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
2740 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
2741 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
2742 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
2743 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
2744 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
2745 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
2746 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
2747 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
2748 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
2749 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
2750 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
2751 * Makefile.in: Regenerate.
2752 * bfd-in2.h: Likewise.
2753 * libbfd.h: Likewise.
2754
99022dfb
RS
27552004-10-07 Richard Sandiford <rsandifo@redhat.com>
2756
2757 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
2758 against the absolute section.
2759 (mips_elf64_write_rela): Likewise.
2760
b67ae299
NC
27612004-10-07 Jan Beulich <jbeulich@novell.com>
2762
2763 * elf.c (elf_find_function): Don't generally check for matching
2764 section, just for non-file symbols. Remove redunant comparison
2765 for the latter.
2766 * elf32-arm.h (arm_elf_find_function): Likewise.
2767
8fdd7217
NC
27682004-10-07 Jeff Baker <jbaker@qnx.com>
2769
2770 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
2771 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
2772 was specified.
2773
073a2dc3
RM
27742004-10-04 Roland McGrath <roland@redhat.com>
2775
2776 * hash.c (bfd_hash_set_default_size): Use const for table.
2777 Use size_t instead of int for variable compared to sizeof results.
2778
7785be14
AM
27792004-10-05 Alan Modra <amodra@bigpond.net.au>
2780
2781 PR 425
2782 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
2783
40a18ebd
NC
27842004-10-01 Paul Brook <paul@codesourcery.com>
2785
2786 * elf32-arm.h (elf32_arm_fake_sections,
2787 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
2788 functions.
2789 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
2790
8935b81f
AM
27912004-10-01 Alan Modra <amodra@bigpond.net.au>
2792
2793 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
2794 need_lsda_relative.
2795 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
2796 need_relative or need_lsda_relative if we are processing an
2797 offset for a reloc on a FDE initial loc or LSDA field
2798 respectively.
2799 (_bfd_elf_write_section_eh_frame): Test need_relative and
2800 need_lsda_relative in place of corresponding make_* field
2801 when deciding to use pc-relative encodings.
2802
eeac373a
PB
28032004-09-30 Paul Brook <paul@codesourcery.com>
2804
2805 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
2806 target2 relocation type.
2807
7479dfd4
L
28082004-09-30 H.J. Lu <hongjiu.lu@intel.com>
2809
2810 PR 414
2811 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
2812
0dd132b6
NC
28132004-09-30 Paul Brook <paul@codesourcery.com>
2814
2815 * reloc.c: Add BFD_RELOC_ARM_SMI.
2816 * bfd-in2.h: Regenerate.
2817 * libbfd.h: Ditto.
2818
1ba54ee0
AM
28192004-09-24 Alan Modra <amodra@bigpond.net.au>
2820
2821 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
2822 vma and output offset to address.
2823 * simple.c (simple_save_output_info): Only set output section
2824 and offset for debug sections, or those not already set up by
2825 the linker.
2826 (bfd_simple_get_relocated_section_contents): Update comment.
2827
5efb6261
AM
28282004-09-24 Alan Modra <amodra@bigpond.net.au>
2829
2830 * elf.c (IS_LOADED): Delete.
2831 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
2832 Restore SEC_HAS_CONTENTS test to the one place it was used prior
2833 to 2004-09-22.
2834
fca870e4
AM
28352004-09-23 Alan Modra <amodra@bigpond.net.au>
2836
2837 PR gas/396
2838 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2839 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
2840 redundant assignment of EM_SPARC.
2841
c86696a3
BF
28422004-09-22 Brian Ford <ford@vss.fsi.com>
2843
2844 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2845 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
2846 constants.
2847 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2848
73adb214
AM
28492004-09-22 Alan Modra <amodra@bigpond.net.au>
2850
2851 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
2852 (elf_backend_modify_segment_map): Don't define.
2853
b301b248
AM
28542004-09-22 Alan Modra <amodra@bigpond.net.au>
2855
2856 * elf.c (IS_LOADED): Define.
2857 (assign_file_positions_for_segments): Don't round up file offset of
2858 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
2859 Delete code handling link script adjustment of lma. Do the adjust
2860 in later code handling similar ajustments. Remove dead code error
2861 check. Warn if section lma would require a negative offset
2862 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
2863 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
2864 update voff in section loop. Change voff in segment loop to be an
2865 adjustment on top of "off". Set sec->filepos and update "off" later.
2866 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 2867 test for alloc-only sections other than .tbss consistently.
b301b248
AM
2868 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
2869 Tidy PT_NOTE handling. Use %B and %A in error messages.
2870 (assign_file_positions_except_relocs): Use %B in error message.
2871
3f85e526
L
28722004-09-17 H.J. Lu <hongjiu.lu@intel.com>
2873
2874 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
2875 (CONFIG_STATUS_DEPENDENCIES): New.
2876 (Makefile): Removed.
2877 (config.status): Likewise.
2878 * Makefile.in: Regenerated.
2879
eb043451
PB
28802004-09-17 Paul Brook <paul@codesourcery.com>
2881
2882 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
2883 (bfd_elf32_arm_process_before_allocation): Update prototype.
2884 * bfd-in2.h: Regenerate.
2885 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
2886 (elf32_arm_link_hash_table_create): Set it.
2887 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
2888 (bfd_elf32_arm_set_target_relocs): New function.
2889 (arm_real_reloc_type): New function.
2890 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
2891 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
2892 (elf32_arm_gc_sweep_hook): Ditto.
2893 (elf32_arm_check_relocs): Ditto.
2894 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
2895 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
2896 R_ARM_GOT_TARGET2.
2897 (elf32_arm_got_prel): New variable.
2898 (elf32_arm_howto_from_type): New function.
2899 (elf32_arm_info_to_howto): Use it.
2900 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
2901 BFD_RELOC_ARM_TARGET2.
2902 * libbfd.h: Regenerate.
2903 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
2904
f6e332e6
AM
29052004-09-17 Alan Modra <amodra@bigpond.net.au>
2906
2907 * ecoff.c: Update u.undef.next refs.
2908 * elf64-ppc.c: Likewise.
2909 * elflink.c: Likewise.
2910 * linker.c: Likewise.
2911 * xcofflink.c: Likewise.
2912
2913 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
2914 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
2915 fields to indirect struct.
2916 * elf-m10300.c: Update u.weakdef refs.
2917 * elf32-arm.h: Likewise.
2918 * elf32-cris.c: Likewise.
2919 * elf32-frv.c: Likewise.
2920 * elf32-hppa.c: Likewise.
2921 * elf32-i370.c: Likewise.
2922 * elf32-i386.c: Likewise.
2923 * elf32-m32r.c: Likewise.
2924 * elf32-m68k.c: Likewise.
2925 * elf32-ppc.c: Likewise.
2926 * elf32-s390.c: Likewise.
2927 * elf32-sh.c: Likewise.
2928 * elf32-sparc.c: Likewise.
2929 * elf32-vax.c: Likewise.
2930 * elf32-xtensa.c: Likewise.
2931 * elf64-alpha.c: Likewise.
2932 * elf64-hppa.c: Likewise.
2933 * elf64-ppc.c: Likewise.
2934 * elf64-s390.c: Likewise.
2935 * elf64-sh64.c: Likewise.
2936 * elf64-sparc.c: Likewise.
2937 * elf64-x86-64.c: Likewise.
2938 * elfxx-ia64.c: Likewise.
2939 * elfxx-mips.c: Likewise.
2940 * elflink.c: Likewise. Also u.elf_hash_value.
2941 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
2942 indirection.
2943 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2944 (bfd_elf_gc_record_vtinherit): Alloc vtable.
2945 (bfd_elf_gc_record_vtentry): Likewise.
2946 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
2947
90c0a373
AM
29482004-09-17 Alan Modra <amodra@bigpond.net.au>
2949
2950 * Makefile.am: Run "make dep-am".
2951 * Makefile.in: Regenerate.
2952 * bfd-in2.h: Regenerate.
2953 * po/SRC-POTFILES.in: Regenerate.
2954 * po/bfd.pot: Regenerate.
2955
f5385ebf
AM
29562004-09-16 Alan Modra <amodra@bigpond.net.au>
2957
2958 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
2959 with bitfields. Make "type" and "other" bitfields too.
2960 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
2961 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
2962 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
2963 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
2964 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
2965 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
2966 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
2967 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
2968 * elf-hppa.h: Update all uses of elf_link_hash_flags.
2969 * elf-m10300.c: Likewise.
2970 * elf.c: Likewise.
2971 * elf32-arm.h: Likewise.
2972 * elf32-cris.c: Likewise.
2973 * elf32-frv.c: Likewise.
2974 * elf32-hppa.c: Likewise.
2975 * elf32-i370.c: Likewise.
2976 * elf32-i386.c: Likewise.
2977 * elf32-m32r.c: Likewise.
2978 * elf32-m68k.c: Likewise.
2979 * elf32-ppc.c: Likewise.
2980 * elf32-s390.c: Likewise.
2981 * elf32-sh-symbian.c: Likewise.
2982 * elf32-sh.c: Likewise.
2983 * elf32-sh64.c: Likewise.
2984 * elf32-sparc.c: Likewise.
2985 * elf32-vax.c: Likewise.
2986 * elf32-xtensa.c: Likewise.
2987 * elf64-alpha.c: Likewise.
2988 * elf64-hppa.c: Likewise.
2989 * elf64-ppc.c: Likewise.
2990 * elf64-s390.c: Likewise.
2991 * elf64-sh64.c: Likewise.
2992 * elf64-sparc.c: Likewise.
2993 * elf64-x86-64.c: Likewise.
2994 * elflink.c: Likewise.
2995 * elfxx-ia64.c: Likewise.
2996 * elfxx-mips.c: Likewise.
2997 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
2998 * configure: Regenerate.
2999 * aclocal.m4: Regenerate.
3000
b6ee372a
AM
30012004-09-16 Alan Modra <amodra@bigpond.net.au>
3002
3003 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
3004 around uses of R_ARM_TARGET1.
3005 (elf32_arm_check_relocs): Likewise.
3006
9c504268
PB
30072004-09-13 Paul Brook <paul@codesourcery.com>
3008
3009 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3010 prototype.
3011 * bfd-in2.h: Regenerate.
3012 * libbfd.h: Regenerate.
3013 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
3014 (elf32_arm_link_hash_table_create): Set target1_is_rel.
3015 (bfd_elf32_arm_process_before_allocation): Ditto.
3016 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
3017 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
3018 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
3019 * reloc.c: Ditto.
3020
94ea025a
JB
30212004-09-10 Joel Brobecker <brobecker@gnat.com>
3022
3023 * hpux-core.c (thread_section_p): New function.
3024 (hpux_core_core_file_p): Fix computation of offset in call
3025 to bfd_seek. Create a ".reg" section from an arbitrary
3026 ".reg/<id>" section if none was created after having read
3027 all sections.
3028
24443139
AS
30292004-09-11 Andreas Schwab <schwab@suse.de>
3030
3031 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
3032 * aclocal.m4: Rebuild.
3033 * configure: Rebuild.
3034
f4eae89c
JB
30352004-09-10 Joel Brobecker <brobecker@gnat.com>
3036
3037 * section.c (bfd_sections_find_if): Fix parameter name in
3038 comment to match code.
3039
e0638f70
AM
30402004-09-10 Alan Modra <amodra@bigpond.net.au>
3041
3042 * elf.c (assign_file_positions_except_relocs): Assign relocs
3043 stored in a bfd section.
3044
5e0f5ae3
HPN
30452004-09-08 Hans-Peter Nilsson <hp@axis.com>
3046
3047 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
3048 h->gotplt_refcount to 0, not -1.
3049
ada1953e
HPN
30502004-09-07 Hans-Peter Nilsson <hp@axis.com>
3051
3052 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3053 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
3054 symname.
3055 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
3056 handle symbol visibility here.
3057
ee75fd95
AM
30582004-09-07 Alan Modra <amodra@bigpond.net.au>
3059
3060 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
3061 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
3062 callers.
3063 (ppc_stub_name): Remove trailing "+0" on stub name.
3064 (create_linkage_sections): Create relocations for
3065 branch lookup table when --emit-relocs as well as when --shared.
3066 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
3067 relbrlt test. For --emit-stub-syms, always output a sym even when
3068 one already exists on a plt call stub. Put stub type in the stub
3069 symbol name.
3070 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
3071 test.
3072 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
3073 reloc_count in stub sections. Adjust relbrlt test.
3074 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
3075 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
3076 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
3077 for relocs against discarded symbols. Fix comments.
3078
229fcec5
MM
30792004-09-06 Mark Mitchell <mark@codesourcery.com>
3080
3081 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
3082 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
3083 from ...
3084 (map_sections_to_segments): ... here. Use it. Assign a file
3085 position to the .dynamic section if it is not loadable, but part
3086 of the PT_DYNAMIC segment.
3087 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3088 offsets, not VMAs, for the BPABI. Do not fill in the header in
3089 the .got.plt section for the BPABI.
3090 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
3091 PT_DYNAMIC segment.
3092 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 3093
9a0789ec
NC
30942004-09-06 Nick Clifton <nickc@redhat.com>
3095
3096 * elflink.c (elf_link_add_object_symbols): Set the error code to
3097 bfd_error_wrong_format when the input format does not match the
3098 output format.
3099
7b53ace3
AM
31002004-09-06 Alan Modra <amodra@bigpond.net.au>
3101
3102 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
3103 (ppc64_elf_check_directives): ..here.
3104 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
3105 before accessing ppc64_elf_tdata.
3106 (ppc64_elf_finish_dynamic_sections): And here too.
3107
3e540f25
AM
31082004-09-04 Alan Modra <amodra@bigpond.net.au>
3109
3110 * bfd.c (_bfd_default_error_handler): Correct loop exit.
3111
e5a52504
MM
31122004-09-03 Mark Mitchell <mark@codesourcery.com>
3113
3114 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
3115 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
3116 (bfd_elf32_littlearm_symbian_vec): Likewise.
3117 * configure: Regenerated.
3118 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
3119 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
3120 (PLT_ENTRY_SIZE): Likewise.
3121 (bfd_vma_elf32_arm_symbian_plt_entry): New
3122 variable.
3123 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
3124 and symbian_p.
3125 (create_got_section): Don't create sections when generating BPABI
3126 objects.
3127 (elf32_arm_create_dynamic_sections): Tidy.
3128 (elf32_arm_link_hash_table_create): Set plt_header_size,
3129 plt_entry_size, and symbian_p.
3130 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
3131 generating BPABI objects.
3132 (allocate_dynrelocs): Use htab->plt_header_size, not
3133 PLT_HEADER_SIZE. Do not add to .got.plt when
3134 generating BPABI objects.
3135 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
3136 * elfarm-nabi.c: Add SymbianOS target vectors.
3137 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
3138 (_bfd_elf_link_create_dynamic_sections): Likewise.
3139 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
3140 (elfNN_bed): Use it.
3141 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
3142 (bfd_elf32_littlearm_symbian_vec): Likewise.
3143 (_bfd_target_vector): Add them.
3144
6e3b6835
NC
31452004-09-03 Nick Clifton <nickc@redhat.com>
3146
3147 PR 360
3148 * coffcode.h (handle_COMDAT): Replace abort with an warning
3149 message and allow the scan to continue.
3150
595da8c5
AM
31512004-09-02 Alan Modra <amodra@bigpond.net.au>
3152
3153 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
3154 in when reading relocs, not our sorted syms. Remove unnecessary
3155 var.
3156
6723a9f4
EB
31572004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3158
3159 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
3160
5464f5a1
NN
31612004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
3162
3163 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
3164 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
3165 replace uses of *_alias with *_noncanonical.
3166 * aclocal.m4: Rebuild with aclocal 1.4p6.
3167 * Makefile.in: Rebuild with automake 1.4p6.
3168 * doc/Makefile.in: Rebuild with automake 1.4p6.
3169 * configure.in: Autoupdate with autoupdate 2.59.
3170 * config.in: Regenerate with autoheader 2.59.
3171 * configure: Regnerate with autoconf 2.59.
3172
a7535cf3
AM
31732004-08-28 Alan Modra <amodra@bigpond.net.au>
3174
3175 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
3176 symbol pointer arrays before modifying.
3177
c9727e01
AM
31782004-08-28 Alan Modra <amodra@bigpond.net.au>
3179
b91e2ae2 3180 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
3181 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
3182 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
3183 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
3184 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
3185 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
3186 Use both symbol tables on non-relocatable objects. Use a common
3187 error exit. Fix "mid" warning.
c9727e01
AM
3188 * libbfd.h: Regenerate.
3189 * bfd-in2.h: Regenerate.
3190
699733f6
AM
31912004-08-28 Alan Modra <amodra@bigpond.net.au>
3192
3193 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
3194 object file.
3195 (struct sfpr_def_parms): Save some space.
3196 (sfpr_define): Here too.
3197
3198 * elf64-ppc.c (compare_symbols): Put section syms first.
3199 (sym_exists_at): New function.
3200 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
3201 points only for relocatable files. Use .opd section contents
3202 otherwise. Generally clean up the code.
3203
deb0e272
AM
32042004-08-27 Alan Modra <amodra@bigpond.net.au>
3205
3206 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
3207 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
3208 (struct sfpr_def_parms): New.
3209 (sfpr_define): New function.
3210 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
3211 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
3212 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
3213 (savefpr1_tail, restfpr1_tail): New functions.
3214 (savevr, savevr_tail, restvr, restvr_tail): New functions.
3215 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
3216 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
3217 code. Define all ABI mandated _save and _rest functions.
3218
85a84e7a
PB
32192004-08-26 Paul Brook <paul@codesourcery.com>
3220
deb0e272 3221 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 3222
688c58f3
AM
32232004-08-26 Alan Modra <amodra@bigpond.net.au>
3224
3225 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
3226 TRUE or FALSE.
3227
3e95eabc
AM
32282004-08-26 Alan Modra <amodra@bigpond.net.au>
3229
3230 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
3231 that pcrel correction is applied for R_386_PC32.
3232
f855931b
AM
32332004-08-25 Alan Modra <amodra@bigpond.net.au>
3234
3235 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
3236 for R_386_32 and R_386_PC32 relocs against symbols defined in
3237 discarded sections.
3238
b18c562e
NC
32392004-08-25 Dmitry Diky <diwil@spec.ru>
3240
3241 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
3242 Add new relocations.
3243 * bfd-in2.h: Regenerate.
f855931b 3244 * libbfd.h: Regenerate.
b18c562e
NC
3245 * elf32-msp430.c: Clean-up code.
3246 (elf_msp430_howto_table): Add new relocation entries.
3247 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
3248 (msp430_elf_relax_section): New function.
3249 (msp430_elf_relax_delete_bytes): New function.
3250 (msp430_elf_symbol_address_p): New function.
3251
af705ba8
NC
32522004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3253
3254 * elf32-m32r.c (m32r_elf_relocate_section): Handle
3255 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
3256
ea5158d8
DJ
32572004-08-20 Daniel Jacobowitz <dan@debian.org>
3258
3259 * elflink.c (_bfd_elf_section_already_linked): Handle
3260 SEC_LINK_DUPLICATES_SAME_CONTENTS.
3261
49d934f1
MM
32622004-08-19 Mark Mitchell <mark@codesourcery.com>
3263
3264 * config.bfd (arm*-*-symbianelf*): New target.
3265 (arm*-*-eabi*): Likewise.
3266
039b3fef
AM
32672004-08-19 Alan Modra <amodra@bigpond.net.au>
3268
3269 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
3270 "struct ppc_link_hash_entry *".
3271 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
3272 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
3273
3f764659
JJ
32742004-08-19 Jakub Jelinek <jakub@redhat.com>
3275
3276 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
3277 entries (where fd_aux overlaps next entry's fd_func).
3278 Add non_overlapping argument, use it.
3279 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
3280 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3281 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
3282 as indexes into opd_sym_map/opd_adjust array.
3283 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
3284
c09bdfe5
AM
32852004-08-18 Alan Modra <amodra@bigpond.net.au>
3286
3287 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
3288 if we can look up their function descriptor in a regular file.
3289
271d0fc3
NC
32902004-08-18 Nick Clifton <nickc@redhat.com>
3291
3292 PR 324
3293 * cofflink.c (coff_link_add_symbols): Check that the comdat
3294 pointer in the coff_section_data structure has been initialised
3295 before using it.
3296
a010d60f
AM
32972004-08-18 Alan Modra <amodra@bigpond.net.au>
3298
3299 PR 338
3300 * elflink.c (bfd_elf_record_link_assignment): Add comment about
3301 changing bfd_link_hash_undefined to bfd_link_hash_new.
3302
90e3cdf2
JJ
33032004-08-17 Jakub Jelinek <jakub@redhat.com>
3304
3305 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
3306 if not yet defined.
3307 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
3308 (synthetic_opd, synthetic_relocatable): New variables.
3309 (compare_symbols, compare_relocs): New helper routines.
3310 (ppc64_elf_get_synthetic_symtab): New function.
3311 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
3312 to relsyms.
3313 * bfd-in2.h: Regenerated.
3314 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
3315 to relsyms. Return 0 if abfd is relocatable.
3316
7c2c8505
AM
33172004-08-17 Alan Modra <amodra@bigpond.net.au>
3318
3319 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
3320
0367ecfb
NC
33212004-08-17 Nick Clifton <nickc@redhat.com>
3322
3323 * (is_arm_mapping_symbol_name): New function - return true
3324 when a symbol name matches the requirements for an ARM mapping
3325 symbol name.
3326 (arm_elf_find_function): New function based on
3327 elf_find_function in elf.c but skipping ARM mapping symbols
3328 and including thumb function symbols.
3329 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
3330 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
3331
2441e016
AM
33322004-08-17 Alan Modra <amodra@bigpond.net.au>
3333
3334 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
3335 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
3336 (ppc64_elf_brtaken_reloc): Here too.
3337
35b0ce59
AM
33382004-08-17 Alan Modra <amodra@bigpond.net.au>
3339
3340 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
3341 symbol visibility.
3342 (ppc64_elf_check_directives): Check that we have the right hash
3343 table before proceeding.
3344
81688140
AM
33452004-08-17 Alan Modra <amodra@bigpond.net.au>
3346
3347 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
3348 (adjust_opd_syms): Attach opd syms for deleted entries to one of
3349 the sections that will be discarded.
3350
327c1315
AM
33512004-08-16 Alan Modra <amodra@bigpond.net.au>
3352
3353 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
3354
45fc9e4a
AM
33552004-08-16 Alan Modra <amodra@bigpond.net.au>
3356
3357 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
3358 free space available.
3359
9dadfa79
AM
33602004-08-16 Alan Modra <amodra@bigpond.net.au>
3361
3362 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 3363 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
3364
3365 * coff-rs6000.c (do_shared_object_padding): Warning fix.
3366 (xcoff_write_armap_big): Likewise.
3367 (xcoff_write_archive_contents_old): Likewise.
3368 (xcoff_write_archive_contents_big): Likewise.
3369
3370 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
3371
57e8b36a
NC
33722004-08-13 Nick Clifton <nickc@redhat.com>
3373
3374 * elf32-arm.h: Convert to ISO C90.
3375
a005f94e
AM
33762004-08-13 Alan Modra <amodra@bigpond.net.au>
3377
3378 PR 293
3379 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
3380 zero the plt field.
3381
d003868e
AM
33822004-08-13 Alan Modra <amodra@bigpond.net.au>
3383
3384 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
3385 (bfd_archive_filename, bfd_get_section_ident): Delete.
3386 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
3387 bfd_archive_filename.
3388 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
3389 to warn about symbols in discarded sections. Use _bfd_error_handler.
3390 * aout-adobe.c (aout_adobe_callback): See below.
3391 * aout-cris.c (swap_ext_reloc_in): ..
3392 * coff-arm.c (find_thumb_glue, find_arm_glue,
3393 coff_arm_relocate_section, bfd_arm_process_before_allocation,
3394 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
3395 coff_arm_copy_private_bfd_data): ..
3396 * coff-i860.c (i860_reloc_processing): ..
3397 * coff-mcore.c (mcore_coff_unsupported_reloc,
3398 coff_mcore_relocate_section): ..
3399 * coff-ppc.c (coff_ppc_relocate_section): ..
3400 * coff-rs6000.c (xcoff_create_csect_from_smclas
3401 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
3402 sh_swap_insns, sh_relocate_section): ..
3403 * coff-tic54x.c (tic54x_reloc_processing): ..
3404 * coff-tic80.c (coff_tic80_relocate_section): ..
3405 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
3406 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
3407 coff_slurp_symbol_table, coff_classify_symbol,
3408 coff_slurp_reloc_table): ..
3409 * coffgen.c (_bfd_coff_read_string_table): ..
3410 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
3411 _bfd_coff_generic_relocate_section): ..
3412 * cpu-arm.c (bfd_arm_merge_machines): ..
3413 * cpu-sh.c (sh_merge_bfd_arch): ..
3414 * elf-hppa.h (elf_hppa_relocate_section): ..
3415 * elf.c (bfd_elf_string_from_elf_section, setup_group,
3416 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
3417 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
3418 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
3419 * elf32-arm.h (find_thumb_glue, find_arm_glue,
3420 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
3421 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
3422 elf32_arm_relocate_section, elf32_arm_set_private_flags,
3423 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
3424 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
3425 cris_elf_merge_private_bfd_data
3426 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
3427 * elf32-gen.c (elf32_generic_link_add_symbols): ..
3428 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
3429 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
3430 elf32_hppa_relocate_section): ..
3431 * elf32-i370.c (i370_elf_merge_private_bfd_data,
3432 i370_elf_check_relocs, i370_elf_relocate_section): ..
3433 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
3434 elf_i386_relocate_section): ..
3435 * elf32-m32r.c (m32r_elf_relocate_section,
3436 m32r_elf_merge_private_bfd_data): ..
3437 * elf32-m68hc1x.c (m68hc12_add_stub,
3438 _bfd_m68hc11_elf_merge_private_bfd_data): ..
3439 * elf32-m68k.c (elf_m68k_relocate_section): ..
3440 * elf32-mcore.c (mcore_elf_unsupported_reloc,
3441 mcore_elf_relocate_section): ..
3442 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
3443 ppc_elf_check_relocs, ppc_elf_relocate_section,
3444 ppc_elf_begin_write_processing): ..
3445 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3446 elf_s390_relocate_section): ..
3447 * elf32-sh-symbian.c (sh_symbian_import_as,
3448 sh_symbian_process_embedded_commands,
3449 sh_symbian_relocate_section): ..
3450 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
3451 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
3452 sh_elf_merge_private_data): ..
3453 * elf32-sparc.c (elf32_sparc_check_relocs,
3454 elf32_sparc_relocate_section,
3455 elf32_sparc_merge_private_bfd_data): ..
3456 * elf32-v850.c (v850_elf_check_relocs,
3457 v850_elf_merge_private_bfd_data): ..
3458 * elf32-xtensa.c (elf_xtensa_check_relocs,
3459 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
3460 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
3461 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
3462 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
3463 * elf64-gen.c (elf64_generic_link_add_symbols): ..
3464 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
3465 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
3466 ppc64_elf_relocate_section): ..
3467 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3468 elf_s390_relocate_section): ..
3469 * elf64-sh64.c (sh_elf64_relocate_section): ..
3470 * elf64-sparc.c (sparc64_elf_check_relocs,
3471 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
3472 sparc64_elf_merge_private_bfd_data): ..
3473 * elf64-x86-64.c (elf64_x86_64_check_relocs,
3474 elf64_x86_64_relocate_section): ..
3475 * elflink.c (_bfd_elf_add_default_symbol,
3476 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
3477 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
3478 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
3479 elf_get_linked_section_vma, elf_fixup_link_order,
3480 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
3481 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
3482 * elfxx-ia64.c (elfNN_ia64_relax_section,
3483 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
3484 * elfxx-mips.c (mips_elf_perform_relocation,
3485 _bfd_mips_elf_check_relocs,
3486 _bfd_mips_elf_merge_private_bfd_data): ..
3487 * ieee.c (ieee_slurp_external_symbols): ..
3488 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
3489 * libbfd.c (_bfd_generic_verify_endian_match): ..
3490 * linker.c (_bfd_generic_link_add_one_symbol,
3491 _bfd_generic_section_already_linked): ..
3492 * pdp11.c (translate_to_native_sym_flags): ..
3493 * pe-mips.c (coff_pe_mips_relocate_section): ..
3494 * peicode.h (pe_ILF_build_a_bfd): ..
3495 * srec.c (srec_bad_byte): ..
3496 * stabs.c (_bfd_link_section_stabs): ..
3497 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
3498 Replace all uses of bfd_archive_filename and bfd_get_section_ident
3499 with corresponding %B and %A in _bfd_error_handler format string.
3500 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
3501 calls to use %A and %B. Fix "against symbol .. from section" and
3502 similar error messages. Combine multiple _bfd_error_handler calls
3503 where they were separated due to bfd_archive_filename deficiencies.
3504 * bfd-in2.h: Regenerate.
3505
6ba842b6
L
35062004-08-12 H.J. Lu <hongjiu.lu@intel.com>
3507
3508 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
3509 relocation.
3510
99877b66
AM
35112004-08-10 Alan Modra <amodra@bigpond.net.au>
3512
3513 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
3514 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
3515 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
3516 Add twiddled_syms.
3517 (link_hash_newfunc): Init was_undefined.
3518 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
3519 Use undefweak instead.
3520 (ppc64_elf_check_directives): Fix undefs chain.
3521 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
3522 references.
3523 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
3524 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
3525 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
3526
ba3bee0b
JJ
35272004-08-09 Jakub Jelinek <jakub@redhat.com>
3528
3529 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
3530 error, test input_section flags rather than sec.
3531
8387904d
AM
35322004-08-09 Alan Modra <amodra@bigpond.net.au>
3533
3534 * elf-bfd.h (struct elf_backend_data): Add
3535 elf_backend_archive_symbol_lookup.
3536 (_bfd_elf_archive_symbol_lookup): Declare.
3537 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
3538 (elf_link_add_archive_symbols): ..extracted from here. Call the
3539 backend version.
3540 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
3541 (elfNN_bed): Init new field.
3542 * elf64-ppc.c (elf_backend_check_directives): Define.
3543 (elf_backend_archive_symbol_lookup): Define.
3544 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
3545 a ppc_link_hash_entry pointer.
3546 (get_fdh): Move.
3547 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
3548 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
3549 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
3550 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
3551 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
3552 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3553 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
3554 descriptor symbols.
3555
b25116a9
AM
35562004-08-09 Alan Modra <amodra@bigpond.net.au>
3557
8843416a
AM
3558 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
3559 (ppc64_elf_add_symbol_hook): Test for NULL section.
3560 (get_sym_h): Formatting.
3561 (ppc64_elf_size_stubs): Include reloc addend in value stored as
3562 stub target_value.
3563
b25116a9
AM
3564 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
3565 long branch stubs with code handling plt and r2off branch stubs.
3566
ccfa59ea
AM
35672004-08-09 Alan Modra <amodra@bigpond.net.au>
3568
3569 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
3570 * elflink.c (elf_link_input_bfd): Formatting.
3571 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
3572 all callers.
3573 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
3574 (link_hash_newfunc): Don't set it.
3575 (ppc64_elf_copy_indirect_symbol): Nor copy it.
3576 (ppc64_elf_mark_entry_syms): Delete.
3577 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
3578 sections. Use get_opd_info.
3579 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
3580
4025353c
AM
35812004-08-09 Alan Modra <amodra@bigpond.net.au>
3582
4f800a42
AM
3583 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
3584
06da1e8e
AM
3585 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
3586 (func_desc_adjust): Don't set have_undefweak.
3587 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
3588 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
3589
34814b9f
AM
3590 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
3591 "struct ppc_link_hash_entry *". Adjust all references.
3592 (ppc64_elf_hide_symbol): Correct a comment.
3593
4025353c
AM
3594 * elf64-ppc.c (get_opd_info): New function.
3595 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
3596 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
3597 before calling get_fdh. Test fdh rather than h before dereferencing
3598 fdh. Mark removed symbols in opd_adjust.
3599 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
3600 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
3601 opd symbols.
3602 (ppc64_elf_output_symbol_hook): Likewise.
3603
db6579d4
PB
36042004-08-06 Paul Brook <paul@codesourcery.com>
3605
3606 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
3607 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
3608 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
3609 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
3610 and BFD_RELOC_ARM_SBREL32.
3611 * bfd-in2.h, bbfd.h: Regenerate.
3612
a4d0f181
TS
36132004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3614
3615 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
3616 the dynamic link symbol actually in use.
3617
83774818
SC
36182004-08-01 Stephane Carrez <stcarrez@nerim.fr>
3619
3620 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
3621
a4d0f181 36222004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
3623 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3624
3625 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
3626 SHN_MIPS_TEXT and SHN_MIPS_DATA.
3627
185d09ad
L
36282004-07-30 H.J. Lu <hongjiu.lu@intel.com>
3629 Nick Clifton <nickc@redhat.com>
3630
3631 PR 290
3632 * bfd.c (_bfd_default_error_handler): Make it global.
3633
3634 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
3635
3636 * elf.c (assign_section_numbers): Cope gracefully with sections
3637 which have SHF_LINK_ORDER set but no sh_link set up.
3638 * elflink.c (elf_get_linked_section_vma): Likewise.
3639
3640 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
3641 it to NULL.
3642
3643 * elfxx-target.h (elf_backend_link_order_error_handler): New.
3644 Set it to _bfd_default_error_handler.
3645 (elfNN_bed): Add elf_backend_link_order_error_handler.
3646
3647 * libbfd-in.h (_bfd_default_error_handler): New.
3648
3649 * libbfd.h: Regenerated.
3650
7946e94a
JJ
36512004-07-30 Jakub Jelinek <jakub@redhat.com>
3652
3653 * archures.c (bfd_mach_sparc_64bit_p): Define.
3654 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
3655 * bfd-in2.h: Rebuilt.
3656
1d70c7fb
AO
36572004-07-29 Alexandre Oliva <aoliva@redhat.com>
3658
3659 Introduce SH2a support.
3660 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
3661 * archures.c (bfd_mach_sh2a_nofpu): New.
3662 * bfd-in2.h: Rebuilt.
3663 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
3664 (arch_info_struct): Add sh2a_nofpu.
3665 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
3666 2003-12-29 DJ Delorie <dj@redhat.com>
3667 * reloc.c: Add relocs for sh2a.
3668 * bfd-in2.h: Regenerate.
3669 * libbfd.hh: Regenerate.
3670 2003-12-01 Michael Snyder <msnyder@redhat.com>
3671 * archures.c (bfd_mach_sh2a): New.
3672 * bfd-in2.h: Rebuilt.
3673 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
3674 (SH2A_NEXT): New.
3675 (arch_info_struct): Add sh2a.
3676 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
3677
404ed0cf
DA
36782004-07-28 Nick Clifton <nickc@redhat.com>
3679 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3680
3681 PR 273
3682 * som.c (setup_sections): Improve estimation of space sizes in
3683 relocatable objects.
3684
225247f0
JT
36852004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
3686 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
3687 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
3688 to targ_selvecs.
3689 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
3690 * configure: Regenerate.
3691 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
3692 case that accepts OSABI=NetBSD and OSABI=SysV.
3693 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
3694 the base of .got or .data (if .got does not exist).
3695 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
3696 set OSABI=NetBSD.
3697 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
3698 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
3699 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
3700 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
3701
3d7f7666
L
37022004-07-27 H.J. Lu <hongjiu.lu@intel.com>
3703
3704 PR 161/251
3705 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
3706 (elf_sec_group): Defined.
3707 (bfd_elf_match_symbols_in_sections): New prototype.
3708 (_bfd_elf_setup_group_pointers): Likewise.
3709
3710 * elf.c (bfd_elf_discard_group): Abort.
3711 (bfd_elf_set_group_contents): Also include relocation sections.
3712 Remove zero-fill for ld -r.
3713 (_bfd_elf_setup_group_pointers): New function.
3714 (elf_sort_elf_symbol): Likewise.
3715 (elf_sym_name_compare): Likewise.
3716 (bfd_elf_match_symbols_in_sections): Likewise.
3717
3718 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
3719
3720 * elflink.c (match_group_member): New.
3721 (elf_link_input_bfd): Check group member for discarded section.
3722 (try_match_symbols_in_sections): New function.
3723 (already_linked): Likewise.
3724 (_bfd_elf_section_already_linked): Support mixing comdat group
3725 and linkonce section.
3726
3727 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
3728 * linker.c (bfd_section_already_linked_table_traverse): New.
3729
3730 * libbfd.h: Regenerated.
3731
670ec21d
NC
37322004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
3733
3734 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
3735 BFD_RELOC_CRX_SWITCH32.
3736 * bfd-in2.h: Regenerate.
6cd7f07e 3737 * libbfd.h: Regenerate.
670ec21d
NC
3738 * elf32-crx.c: Support relocation/relaxation of
3739 BFD_RELOC_CRX_SWITCH* types.
3740
2c66dc6c
AM
37412004-07-27 Alan Modra <amodra@bigpond.net.au>
3742
3743 * elf64-ppc.c: Correct "Linker stubs" comment.
3744
38ce5b11
L
37452004-07-26 H.J. Lu <hongjiu.lu@intel.com>
3746
3747 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
3748 linked-to section.
3749 (elf_linked_to_section): New.
3750
3751 * elf.c (assign_section_numbers): Set up sh_link for
3752 SHF_LINK_ORDER.
3753
3754 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
3755 to sh_link for SHT_IA_64_UNWIND sections.
3756
65da361f
L
37572004-07-22 H.J. Lu <hongjiu.lu@intel.com>
3758
3759 * elflink.c (elf_fixup_link_order): Add _() to error message.
3760
08ccf96b
L
37612004-07-22 H.J. Lu <hongjiu.lu@intel.com>
3762
3763 * elflink.c (elf_fixup_link_order): Issue a warning and flag
3764 an error if failed.
3765
082b7297
L
37662004-07-21 H.J. Lu <hongjiu.lu@intel.com>
3767
3768 * aout-adobe.c (aout_32_section_already_linked): Defined.
3769 * aout-target.h (MY_section_already_linked): Likewise.
3770 * aout-tic30.c (MY_section_already_linked): Likewise.
3771 * binary.c (binary_section_already_linked): Likewise.
3772 * bout.c (b_out_section_already_linked): Likewise.
3773 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
3774 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
3775 * coffcode.h (coff_section_already_linked): Likewise.
3776 * i386msdos.c (msdos_section_already_linked): Likewise.
3777 * i386os9k.c (os9k_section_already_linked): Likewise.
3778 * ieee.c (ieee_section_already_linked): Likewise.
3779 * ihex.c (ihex_section_already_linked): Likewise.
3780 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
3781 * mmo.c (mmo_section_already_linked): Likewise.
3782 * nlm-target.h (nlm_section_already_linked): Likewise.
3783 * oasys.c (oasys_section_already_linked): Likewise.
3784 * pef.c (bfd_pef_section_already_linked): Likewise.
3785 * ppcboot.c (ppcboot_section_already_linked): Likewise.
3786 * som.c (som_bfd_discard_group): Likewise.
3787 * srec.c (srec_section_already_linked): Likewise.
3788 * tekhex.c (tekhex_section_already_linked): Likewise.
3789 * versados.c (versados_section_already_linked): Likewise.
3790 * vms.c (vms_section_already_linked): Likewise.
3791 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
3792 * xsym.c (bfd_sym_section_already_linked): Likewise.
3793
3794 * bfd-in.h (bfd_section_already_linked_table_init): New.
3795 (bfd_section_already_linked_table_free): Likewise.
3796
3797 * coff-rs6000.c (rs6000coff_vec): Add
3798 _bfd_generic_section_already_linked.
3799 (pmac_xcoff_vec): Likewise.
3800 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3801 (aix5coff64_vec): Likewise.
3802
3803 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
3804 * elflink.c (_bfd_elf_section_already_linked): New function.
3805
3806 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
3807
3808 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
3809 (_bfd_generic_section_already_linked): New.
3810 (bfd_section_already_linked_hash_entry): Likewise.
3811 (bfd_section_already_linked): Likewise.
3812 (bfd_section_already_linked_table_lookup): Likewise.
3813 (bfd_section_already_linked_table_insert): Likewise.
3814
3815 * linker.c (bfd_section_already_linked): New.
3816 (_bfd_section_already_linked_table): Likewise.
3817 (bfd_section_already_linked_table_lookup): Likewise.
3818 (bfd_section_already_linked_table_insert): Likewise.
3819 (already_linked_newfunc): Likewise.
3820 (bfd_section_already_linked_table_init): Likewise.
3821 (bfd_section_already_linked_table_free): Likewise.
3822 (_bfd_generic_section_already_linked): Likewise.
3823
3824 * section.c (bfd_section): Remove comdat.
3825 (bfd_comdat_info): Moved to ...
3826 * bfd-in.h (coff_comdat_info): Here.
3827 (bfd_coff_get_comdat_section): New.
3828 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
3829 * libcoff-in.h (coff_section_tdata): Add comdat.
3830 * coffcode.h (handle_COMDAT): Updated.
3831 * cofflink.c (coff_link_add_symbols): Likewise.
3832 * ecoff.c (bfd_debug_section): Likewise.
3833
3834 * targets.c (bfd_target): Add _section_already_linked.
3835 (BFD_JUMP_TABLE_LINK): Updated.
3836
3837 * bfd-in2.h: Regenerated.
3838 * libbfd.h: Likewise.
3839 * libcoff.h: Likewise.
3840
0b52efa6
PB
38412003-07-21 Paul Brook <paul@codesourcery.com>
3842
3843 * elflink.c (elf_get_linked_section_vma, compare_link_order,
3844 elf_fixup_link_order): New functions.
3845 (bfd_elf_final_link): Call elf_fixup_link_order.
3846
7e2294f9
AO
38472004-07-21 Alexandre Oliva <aoliva@redhat.com>
3848
3849 * elf-bfd.h (ELF_COMMON_DEF_P): New.
3850 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
3851 common definitions.
3852 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
3853 _bfd_elf_symbol_refs_local_p.
3854 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
3855 symbols.
3856
e56f61be
L
38572004-07-19 H.J. Lu <hongjiu.lu@intel.com>
3858
3859 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
3860 DYN_NO_NEEDED.
3861 (bfd_elf_get_dyn_lib_class): New prototype.
3862 * elf.c (bfd_elf_get_dyn_lib_class): New function.
3863
3864 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
3865 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
3866 entry is needed. Issue an error if a DT_NEEDED entry is needed
3867 for a file marked DYN_NO_NEEDED.
3868 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
3869 for DT_NEEDED tags.
3870
3871 * bfd-in2.h: Regenerated.
3872
27b56da8
DA
38732004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3874
3875 * elflink.c (elf_section_complain_discarded): Don't complain in
3876 .PARISC.unwind.
3877
bbb268c3
JW
38782004-07-10 James E Wilson <wilson@specifixinc.com>
3879
3880 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
3881 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
3882 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
3883 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
3884 Fix callers.
3885 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
3886 bfd_put_64 to bfd_putl64.
3887 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 3888
e525914f
L
38892004-07-09 H.J. Lu <hongjiu.lu@intel.com>
3890
3891 PR 240
3892 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
3893 .init/.fini sections when trying to relax it.
3894
b1a6d0b1
NC
38952004-07-09 Jie Zhang <zhangjie@magima.com.cn>
3896
3897 * elf.c (assign_file_positions_for_segments): Make sure the
3898 .dynamic section is the first section in the PT_DYNAMIC segment.
3899
1a320fbb
NC
39002004-07-09 Nick Clifton <nickc@redhat.com>
3901
3902 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
3903 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
3904 sh_elf_get_flags_from_mach functions so that they do not conflict
3905 when this target is built with other sh-elf targets.
3906 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
3907 suppression of this function.
3908 (sh_elf_find_flags): Likewise.
3909
1fe1f39c
NC
39102004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
3911
3912 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
3913 (ALL_MACHINES_CFILES): Add cpu-crx.c.
3914 (BFD32_BACKENDS): Add elf32-crx.lo.
3915 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
3916 (cpu-crx.lo): New target.
3917 (elf32-crx.lo): New target.
3918 * Makefile.in: Regenerate.
3919 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
3920 (bfd_archures_list): Add bfd_crx_arch.
3921 * bfd-in2.h: Regenerate.
3922 * config.bfd: Handle crx-*-elf*, crx*.
3923 * configure.in: Handle bfd_elf32_crx_vec.
3924 * configure: Regenerate.
3925 * cpu-crx.c: New file.
3926 * elf32-crx.c: Likewise.
3927 * libbfd.h: Regenerate.
3928 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
3929 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
3930 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
3931 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
3932 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
3933 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
3934 * targets.c (bfd_elf32_crx_vec): Declare.
3935 (bfd_target_vector): Add bfd_elf32_crx_vec.
3936
85fbca6a
NC
39372004-07-06 Nick Clifton <nickc@redhat.com>
3938
3939 * config.bfd: Add sh-symbian-elf target.
3940 * configure.in: Add bfd_elf32_shl_symbian_vec.
3941 * configure: Regenerate.
3942 * elf-bfd.h (struct elf_backend_data): Add new field
3943 'check_directives'.
1fe1f39c 3944 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 3945 check_directives function, if defined.
1fe1f39c 3946 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 3947 check_directives.
1fe1f39c
NC
3948 * targets.c: Add bfd_elf32_shl_symbian_vec.
3949 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 3950 definition.
1fe1f39c 3951 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 3952 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 3953 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 3954 not already been defined.
1fe1f39c
NC
3955 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
3956 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
3957 * sh-symbian-elf target.
3958 * Makefile.am: Add elf32-sh-symbian.c
3959 * Makefile.in: Regenerate.
1fe1f39c 3960
871ec896
JR
39612004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
3962
1fe1f39c
NC
3963 * elf32-sh.c: Include ../opcodes/sh-opc.h.
3964 * Makefile.am: Ran make dep-am.
3965 * Makefile.in: Ran make dep-in.
871ec896 3966
c87db184
CF
39672004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3968
3969 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
3970 externals properly.
3971
06f2f6af
MS
39722004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
3973
3974 * config.bfd: Add want64 to configuration target s390-*-linux*.
3975
b602c853
L
39762004-07-01 H.J. Lu <hongjiu.lu@intel.com>
3977
3978 * bfd.c (bfd_get_section_ident): New.
3979
3980 * elflink.c (elf_link_read_relocs_from_section): Call
3981 bfd_get_section_ident to identify the section when reporting
3982 error.
3983 (_bfd_elf_link_output_relocs): Likewise.
3984 (elf_link_output_extsym): Likewise.
3985 (elf_link_input_bfd): Likewise.
3986 (bfd_elf_gc_record_vtinherit): Likewise.
3987
3988 * bfd-in2.h: Regenerated.
3989
7a2a6943
NC
39902004-07-01 Jie Zhang <zhangjie@magima.com.cn>
3991 Nick Clifton <nickc@redhat.com>
3992
3993 PR 204
3994 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
3995 of section symbols to mips_elf_sort_hash_table ().
3996
cdd3575c
AM
39972004-07-01 Alan Modra <amodra@bigpond.net.au>
3998
3999 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
4000 change. Comment.
4001 (elf_section_complain_discarded): New function. Handle
4002 .gcc_except_table too.
4003 (elf_link_input_bfd): Rewrite handling of relocs against symbols
4004 in discarded sections.
4005 * elf-bfd.h (elf_discarded_section): Protect macro arg.
4006
21a8f7fa
JW
40072004-06-30 James E Wilson <wilson@specifixinc.com>
4008
4009 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
4010 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
4011
2de26f35
L
40122004-06-30 H.J. Lu <hongjiu.lu@intel.com>
4013
4014 PR 233
4015 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
4016 local references to discarded sections and report their
4017 locations.
4018
72d7a15c
AM
40192004-06-30 Alan Modra <amodra@bigpond.net.au>
4020
4021 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
4022 sec_info_type, test section name instead.
4023
e7f0a167
L
40242004-06-29 H.J. Lu <hongjiu.lu@intel.com>
4025
4026 PR 240
4027 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
4028 in .init/.fini sections.
4029
bff5f93a
BW
40302004-06-29 Bob Wilson <bob.wilson@acm.org>
4031
4032 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
4033 bfd_get_section_limit.
4034
b54d4b07
BW
40352004-06-29 Bob Wilson <bob.wilson@acm.org>
4036
4037 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
4038 output section size.
4039
e87a64e1
AM
40402004-06-29 Alan Modra <amodra@bigpond.net.au>
4041
1a23a9e6
AM
4042 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
4043 rawsize.
4044 (mmix_elf_perform_relocation): Adjust for above change.
4045 (mmix_elf_relocate_section): Likewise.
4046 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
4047 (mmix_elf_get_section_contents): Delete.
4048 (bfd_elf64_get_section_contents): Delete.
4049 (mmix_elf_relocate_section): Zero stub area.
4050 * linker.c (default_indirect_link_order): Alloc max of section size
4051 and rawsize.
4052 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
4053 * section.c (bfd_malloc_and_get_section): Likewise.
4054 (struct bfd_section): Update rawsize comment.
4055 * bfd-in2.h: Regenerate.
4056
e87a64e1
AM
4057 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
4058
07515404
AM
40592004-06-29 Alan Modra <amodra@bigpond.net.au>
4060
4061 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 4062 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
4063 (_bfd_final_link_relocate): Use bfd_get_section_limit.
4064 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
4065 * coff-arm.c (coff_arm_relocate_section): Likewise.
4066 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
4067 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
4068 (bfd_ns32k_final_link_relocate): Likewise.
4069 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
4070 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 4071 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 4072 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 4073 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
4074 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
4075 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
4076 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4077 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
4078 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
4079 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
4080 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
4081 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
4082 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
4083 * elf32-v850.c (v850_elf_reloc): Likewise.
4084 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
4085 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
4086 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
4087 * elf64-mips.c (mips_elf64_gprel32_reloc)
4088 (mips16_gprel_reloc): Likewise.
4089 * elf64-mmix.c (mmix_elf_reloc): Likewise.
4090 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
4091 * elf64-sparc.c (init_insn_reloc): Likewise.
4092 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
4093 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
4094 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
4095 (_bfd_mips_elf_generic_reloc): Likewise.
4096 * bfd-in2.h: Regenerate.
4097
3722b82f
AM
40982004-06-28 Alan Modra <amodra@bigpond.net.au>
4099
4100 * bfd-in.h (struct stab_info): Move from stabs.c.
4101 * stabs.c (struct stab_link_includes_table): Delete.
4102 (stab_link_includes_lookup): Delete.
4103 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
4104 level of indirection from sinfo parm.
4105 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
4106 stabstr section. Adjust hash table accesses.
4107 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
4108 alloc. Adjust stab_info test.
4109 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
4110 (_bfd_coff_final_link): Adjust stab_info test.
4111 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
4112 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
4113 in place.
4114 * libcoff-in.h (struct coff_link_hash_table): Likewise.
4115 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
4116 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
4117 stabstr section. Adjust stab_info test.
4118 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
4119 (_bfd_write_stab_strings): Adjust prototypes.
4120 * libbfd.h: Regenerate.
4121 * libcoff.h: Regenerate.
4122 * bfd-in2.h: Regenerate.
4123
727e493d
MK
41242004-06-27 Mark Kettenis <kettenis@gnu.org>
4125
4126 From Miod Vallat <miod@online.fr>:
4127 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
4128
146ccdbb
AO
41292004-06-26 Alexandre Oliva <aoliva@redhat.com>
4130
4131 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
4132 (struct elf32_mn10300_link_hash_entry): Remove
4133 pcrel_relocs_copied.
4134 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
4135 R_MN10300_32. Don't adjust pcrel_relocs_copied.
4136 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
4137 and gotoff relocations if the symbol doesn't bind locally. Use
4138 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
4139 relocation for PCREL32.
4140 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
4141 to test whether a symbol binds locally.
4142 (elf32_mn10300_link_hash_newfunc): Don't initialize
4143 pcrel_relocs_copied.
4144 (_bfd_mn10300_elf_discard_copies): Delete.
4145 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
4146
a5fd0812
MK
41472004-06-26 Mark Kettenis <kettenis@gnu.org>
4148
4149 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
4150
22bfad37
JB
41512004-06-25 Joel Brobecker <brobecker@gnat.com>
4152
4153 * som.c (som_set_reloc_info): Correct small typo.
4154
097f809a
NC
41552004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4156
4157 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
4158 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
4159 (m32r_elf_gcsweep_hook): Likewise.
4160 (m32r_elf_check_relocs): Likewise.
4161 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
4162 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
4163 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
4164 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
4165 * bfd-in2.h: Regenerated.
4166 * libbfd.h: Regenerated.
097f809a 4167
6610a52d
L
41682004-06-24 H.J. Lu <hongjiu.lu@intel.com>
4169
4170 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
4171 relocation symbol.
4172 (elf64_x86_64_relocate_section): Issue an error for
4173 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
4174 against global symbols when building shared library.
4175
eea6121a
AM
41762004-06-24 Alan Modra <amodra@bigpond.net.au>
4177
4178 * section.c (struct sec): Rename "_cooked_size" to "size".
4179 Rename "_raw_size" to "rawsize".
4180 (STD_SECTION): Adjust comments.
4181 (bfd_set_section_size, bfd_get_section_contents): Use size.
4182 (bfd_malloc_and_get_section): New function.
4183 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
4184 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
4185 Correctly free reloc and contents memory.
4186 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
4187 and fake CIE now that we can shink section size to zero.
4188 (_bfd_elf_write_section_eh_frame): Likewise..
4189 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
4190 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
4191 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
4192 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
4193 unneeded indirection.
4194 * elf.c (_bfd_elf_section_offset): .. and update call.
4195 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
4196 * libbfd.h: Regenerate.
4197 * bfd-in2.h: Regenerate.
4198
4199 Replace occurrences of "_raw_size" and "_cooked_size" in most places
4200 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
4201 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
4202 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
4203 Similarly use "rawsize", if non-zero, in reloc functions to validate
4204 reloc addresses. Use new bfd_malloc_and_get_section in most places
4205 where bfd_get_section_contents was called. Expand all occurrences of
4206 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
4207 grok_prstatus and similar functions to "size".
4208 * aix386-core.c (aix386_core_file_p): ..
4209 * aix5ppc-core.c (xcoff64_core_p): ..
4210 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
4211 aout_adobe_set_section_contents): ..
4212 * aout-target.h (callback): ..
4213 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
4214 MY_bfd_final_link): ..
4215 * aoutf1.h (sunos4_core_file_p): ..
4216 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4217 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
4218 final_link, aout_link_input_section): ..
4219 * binary.c (binary_object_p, binary_canonicalize_symtab,
4220 binary_set_section_contents): ..
4221 * bout.c (b_out_callback, b_out_write_object_contents,
4222 b_out_set_section_contents, b_out_bfd_relax_section,
4223 b_out_bfd_get_relocated_section_contents): ..
4224 * cisco-core.c (cisco_core_file_validate): ..
4225 * coff-alpha.c (alpha_ecoff_object_p,
4226 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
4227 * coff-arm.c (coff_arm_relocate_section,
4228 bfd_arm_allocate_interworking_sections): ..
4229 * coff-h8300.c (h8300_reloc16_extra_cases,
4230 h8300_bfd_link_add_symbols): ..
4231 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
4232 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
4233 ppc_bfd_coff_final_link): ..
4234 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
4235 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4236 sh_align_loads, sh_coff_get_relocated_section_contents): ..
4237 * coff64-rs6000.c (xcoff64_write_object_contents,
4238 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
4239 * coffcode.h (coff_compute_section_file_positions,
4240 coff_write_object_contents): ..
4241 * coffgen.c (make_a_section_from_file, coff_write_symbols,
4242 coff_section_symbol, build_debug_section): ..
4243 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
4244 process_embedded_commands, _bfd_coff_link_input_bfd,
4245 _bfd_coff_write_global_sym): ..
4246 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
4247 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
4248 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
4249 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4250 _bfd_dwarf2_find_nearest_line): ..
4251 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
4252 ecoff_compute_section_file_positions,
4253 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
4254 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
4255 _bfd_elf_discard_section_eh_frame_hdr,
4256 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
4257 _bfd_elf_write_section_eh_frame,
4258 _bfd_elf_write_section_eh_frame_hdr): ..
4259 * elf-hppa.h (elf_hppa_sort_unwind): ..
4260 * elf-m10200.c (mn10200_elf_relax_section,
4261 mn10200_elf_relax_delete_bytes,
4262 mn10200_elf_get_relocated_section_contents): ..
4263 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
4264 mn10300_elf_check_relocs, mn10300_elf_relax_section,
4265 mn10300_elf_relax_delete_bytes,
4266 mn10300_elf_get_relocated_section_contents,
4267 _bfd_mn10300_elf_adjust_dynamic_symbol,
4268 _bfd_mn10300_elf_discard_copies,
4269 _bfd_mn10300_elf_size_dynamic_sections,
4270 _bfd_mn10300_elf_finish_dynamic_sections): ..
4271 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
4272 _bfd_elf_make_section_from_phdr, elf_fake_sections,
4273 bfd_elf_set_group_contents, map_sections_to_segments,
4274 elf_sort_sections, assign_file_positions_for_segments,
4275 SECTION_SIZE, copy_private_bfd_data,
4276 _bfd_elf_get_dynamic_reloc_upper_bound,
4277 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
4278 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
4279 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
4280 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
4281 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
4282 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
4283 bfd_elf32_arm_process_before_allocation,
4284 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
4285 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
4286 elf32_arm_write_section): ..
4287 * elf32-cris.c (cris_elf_grok_prstatus,
4288 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
4289 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
4290 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
4291 elf_cris_discard_excess_dso_dynamics,
4292 elf_cris_discard_excess_program_dynamics): ..
4293 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
4294 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
4295 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
4296 _frv_create_got_section, _frvfdpic_assign_plt_entries,
4297 elf32_frvfdpic_size_dynamic_sections,
4298 elf32_frvfdpic_modify_segment_map,
4299 elf32_frvfdpic_finish_dynamic_sections): ..
4300 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
4301 elf32_h8_get_relocated_section_contents): ..
4302 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
4303 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
4304 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
4305 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
4306 elf32_hppa_finish_dynamic_sections): ..
4307 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
4308 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
4309 i370_elf_finish_dynamic_sections): ..
4310 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
4311 allocate_dynrelocs, elf_i386_size_dynamic_sections,
4312 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
4313 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
4314 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
4315 * elf32-ip2k.c (ip2k_is_switch_table_128,
4316 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
4317 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
4318 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
4319 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
4320 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
4321 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
4322 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
4323 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
4324 m32r_elf_get_relocated_section_contents): ..
4325 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
4326 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
4327 m68hc11_elf_relax_delete_bytes): ..
4328 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
4329 m68hc12_elf_size_one_stub): ..
4330 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
4331 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
4332 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
4333 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
4334 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
4335 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4336 elf32_mips_grok_prstatus): ..
4337 * elf32-or32.c (or32_elf_consth_reloc): ..
4338 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
4339 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
4340 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
4341 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
4342 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
4343 ppc_elf_final_write_processing): ..
4344 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4345 allocate_dynrelocs, elf_s390_size_dynamic_sections,
4346 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
4347 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
4348 sh_elf_relax_delete_bytes, sh_elf_align_loads,
4349 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
4350 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
4351 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
4352 * elf32-sh64-com.c (sh64_address_in_cranges,
4353 sh64_get_contents_type): ..
4354 * elf32-sh64.c (sh64_find_section_for_address,
4355 sh64_elf_final_write_processing): ..
4356 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
4357 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
4358 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
4359 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
4360 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
4361 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
4362 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
4363 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
4364 elf_vax_finish_dynamic_sections): ..
4365 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
4366 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
4367 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
4368 xstormy16_elf_finish_dynamic_sections): ..
4369 * elf32-xtensa.c (xtensa_read_table_entries,
4370 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
4371 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
4372 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
4373 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
4374 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
4375 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
4376 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
4377 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
4378 xtensa_callback_required_dependence): ..
4379 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
4380 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
4381 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
4382 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
4383 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
4384 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
4385 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
4386 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
4387 * elf64-hppa.c (allocate_dynrel_entries,
4388 elf64_hppa_size_dynamic_sections,
4389 elf64_hppa_finish_dynamic_sections): ..
4390 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
4391 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
4392 elf64_mips_grok_prstatus): ..
4393 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
4394 mmix_elf_relocate_section, mmix_elf_final_link,
4395 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
4396 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
4397 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
4398 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
4399 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
4400 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
4401 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
4402 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
4403 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
4404 ppc64_elf_finish_dynamic_sections): ..
4405 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4406 allocate_dynrelocs, elf_s390_size_dynamic_sections,
4407 elf_s390_finish_dynamic_sections): ..
4408 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
4409 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
4410 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
4411 sh64_elf64_finish_dynamic_sections): ..
4412 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
4413 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
4414 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
4415 sparc64_elf_finish_dynamic_symbol,
4416 sparc64_elf_finish_dynamic_sections): ..
4417 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
4418 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
4419 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
4420 elf64_x86_64_finish_dynamic_sections): ..
4421 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
4422 * elfcode.h (elf_slurp_reloc_table): ..
4423 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
4424 elf_finalize_dynstr, elf_link_add_object_symbols,
4425 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
4426 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
4427 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4428 elf32_mips_grok_prstatus): ..
4429 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
4430 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
4431 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
4432 elfNN_ia64_finish_dynamic_sections): ..
4433 * elfxx-mips.c (mips_elf_create_procedure_table,
4434 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
4435 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
4436 mips_elf_global_got_index, mips_elf_multi_got,
4437 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
4438 mips_elf_allocate_dynamic_relocations,
4439 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
4440 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
4441 _bfd_mips_elf_always_size_sections,
4442 _bfd_mips_elf_size_dynamic_sections,
4443 _bfd_mips_elf_finish_dynamic_symbol,
4444 _bfd_mips_elf_finish_dynamic_sections,
4445 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
4446 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
4447 _bfd_elf_mips_get_relocated_section_contents,
4448 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
4449 * hp300hpux.c (callback): ..
4450 * hppabsd-core.c (make_bfd_asection): ..
4451 * hpux-core.c (make_bfd_asection): ..
4452 * i386linux.c (linux_link_create_dynamic_sections,
4453 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
4454 * i386msdos.c (msdos_write_object_contents): ..
4455 * i386os9k.c (os9k_callback, os9k_write_object_contents,
4456 os9k_set_section_contents): ..
4457 * ieee.c (parse_expression, ieee_slurp_external_symbols,
4458 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
4459 ieee_write_section_part, do_with_relocs, do_as_repeat,
4460 do_without_relocs, ieee_write_debug_part, init_for_output,
4461 ieee_set_section_contents): ..
4462 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
4463 * irix-core.c (do_sections, make_bfd_asection): ..
4464 * libaout.h (aout_section_merge_with_text_p): ..
4465 * libbfd.c (_bfd_generic_get_section_contents,
4466 _bfd_generic_get_section_contents_in_window): ..
4467 * linker.c (default_indirect_link_order): ..
4468 * lynx-core.c (make_bfd_asection): ..
4469 * m68klinux.c (linux_link_create_dynamic_sections,
4470 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4471 * mach-o.c (bfd_mach_o_make_bfd_section,
4472 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
4473 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
4474 bfd_mach_o_scan_read_segment): ..
4475 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
4476 _bfd_merge_sections): ..
4477 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
4478 mmo_map_set_sizes, mmo_canonicalize_symtab,
4479 mmo_internal_write_section, mmo_write_object_contents): ..
4480 * netbsd-core.c (netbsd_core_file_p): ..
4481 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
4482 nlm_alpha_set_public_section): ..
4483 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
4484 * nlm32-sparc.c (nlm_sparc_write_import): ..
4485 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
4486 nlm_compute_section_file_positions): ..
4487 * oasys.c (oasys_object_p, oasys_slurp_section_data,
4488 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
4489 * opncls.c (get_debug_link_info): ..
4490 * osf-core.c (make_bfd_asection): ..
4491 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4492 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
4493 final_link, aout_link_input_section): ..
4494 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
4495 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
4496 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
4497 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
4498 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
4499 * ptrace-core.c (ptrace_unix_core_file_p): ..
4500 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
4501 _bfd_final_link_relocate, bfd_generic_relax_section,
4502 bfd_generic_get_relocated_section_contents): ..
4503 * reloc16.c (bfd_coff_reloc16_relax_section,
4504 bfd_coff_reloc16_get_relocated_section_c): ..
4505 * riscix.c (riscix_some_aout_object_p): ..
4506 * rs6000-core.c (read_hdr, make_bfd_asection): ..
4507 * sco5-core.c (make_bfd_asection): ..
4508 * simple.c (bfd_simple_get_relocated_section_contents): ..
4509 * som.c (som_object_setup, setup_sections, som_prep_headers,
4510 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
4511 som_set_reloc_info, som_get_section_contents,
4512 som_bfd_link_split_section): ..
4513 * sparclinux.c (linux_link_create_dynamic_sections,
4514 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4515 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
4516 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
4517 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
4518 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
4519 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
4520 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
4521 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
4522 sunos_finish_dynamic_link): ..
4523 * syms.c (_bfd_stab_section_find_nearest_line): ..
4524 * tekhex.c (first_phase, tekhex_set_section_contents,
4525 tekhex_write_object_contents): ..
4526 * trad-core.c (trad_unix_core_file_p): ..
4527 * versados.c (process_esd, process_otr, process_otr): ..
4528 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
4529 * vms-misc.c (add_new_contents): ..
4530 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
4531 * vms.c (vms_set_section_contents): ..
4532 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
4533 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
4534 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
4535 * xsym.c (bfd_sym_scan): .. See above.
4536
bf8b15af
L
45372004-06-21 H.J. Lu <hongjiu.lu@intel.com>
4538
4539 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
4540 calling _bfd_merged_section_offset only for section symbols.
4541
d1c6de6f
AM
45422004-06-22 Alan Modra <amodra@bigpond.net.au>
4543
4544 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
4545 for handling SEC_MERGE symbols in relax_section.
4546
aa02cc63
AO
45472004-06-21 Alexandre Oliva <aoliva@redhat.com>
4548
4549 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
4550 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
4551 linked together. Mark the result as h8300sx code.
4552
aee6f5b4
AO
45532004-06-21 Alexandre Oliva <aoliva@redhat.com>
4554
4555 * elf-bfd.h (struct elf_backend_data): Added
4556 elf_backend_omit_section_dynsym.
4557 (_bfd_elf_link_omit_section_dynsym): Declare.
4558 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
4559 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
4560 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
4561 (_bfd_elf_link_renumber_dynsyms): ... this function.
4562 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
4563 _bfd_elf_link_omit_section_dynsym).
4564 (elfNN_bed): Added elf_backend_omit_section_dynsym.
4565
05576f10
NC
45662004-06-21 Nick Clifton <nickc@redhat.com>
4567
4568 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
4569 flags.
4570
02d5a37b
JG
45712004-06-17 Jerome Guitton <guitton@gnat.com>
4572
4573 * bfd-in.h (bfd_cache_close_all): New function declaration.
4574 * bfd-in2.h: Regenerate.
4575 * cache.c (bfd_cache_close_all): New function definition.
4576
d2bef492
MK
45772004-06-16 Mark Kettenis <kettenis@gnu.org>
4578
4579 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
4580 4.10 and beyond.
4581 * configure: Regenerate.
4582
8528d62e
DJ
45832004-06-16 Daniel Jacobowitz <dan@debian.org>
4584
4585 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
4586 the pre-existing section.
4587
911d08a7
AM
45882004-06-15 Alan Modra <amodra@bigpond.net.au>
4589
4590 * section.c (struct sec): Remove usused flags. Reorganize a little.
4591 (bfd_get_section_size_before_reloc): Delete.
4592 (bfd_get_section_size_after_reloc): Delete.
4593 (STD_SECTION): Update.
4594 (bfd_get_section_size_now): Delete.
4595 (bfd_set_section_contents): Don't referece reloc_done.
4596 (bfd_get_section_contents): Remove reloc_done comment.
4597 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
4598 reloc_done.
4599 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
4600 * ecoff.c (bfd_debug_section): Update initializer.
4601 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
4602 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
4603 * bfd-in.h (bfd_section_size): Expand.
4604 (bfd_get_section_size): New macro.
4605 * bfd-in2.h: Regenerate.
4606 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
4607 bfd_get_section_size_before_reloc with bfd_get_section_size.
4608 * coffcode.h (coff_write_object_contents): Likewise.
4609 * coffgen.c (build_debug_section): Likewise.
4610 * dwarf1.c (parse_line_table): Likewise.
4611 (_bfd_dwarf1_find_nearest_line): Likewise.
4612 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
4613 * i386msdos.c (msdos_write_object_contents): Likewise.
4614 * pdp11.c (squirt_out_relocs): Likewise.
4615 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
4616 * elf64-mmix.c (mmix_elf_final_link): Update comment.
4617
092dcd75
CD
46182004-06-14 Chris Demetriou <cgd@broadcom.com>
4619
4620 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
4621 removal) with updated comment.
4622 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
4623 BFD_RELOC_32_PCREL.
4624 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
4625 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4626
3ffa5234
AM
46272004-06-12 Alan Modra <amodra@bigpond.net.au>
4628
4629 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
4630 overflow on branches to undefweaks.
4631
e9edc808
MR
46322004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4633
4634 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
4635 as ecoff_section_data() does not return a valid lvalue.
4636
a873f25a
AO
46372004-06-09 Alexandre Oliva <aoliva@redhat.com>
4638
a9b881be
AO
4639 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
4640 (elf_link_add_object_symbols): Likewise.
4641
a873f25a
AO
4642 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
4643 (elf_backend_reloc_type_class): New.
4644
eef0f186
MK
46452004-06-08 Mark Kettenis <kettenis@gnu.org>
4646
4647 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
4648 netbsd-core.lo.
4649 * configure: Regenerate.
4650
822392ce
DJ
46512004-06-07 Daniel Jacobowitz <dan@debian.org>
4652
4653 From: Albert Chin-A-Young <china@thewrittenword.com>
4654 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
4655 to unsigned int.
4656
9f2e92c5
L
46572004-05-29 H.J. Lu <hongjiu.lu@intel.com>
4658
4659 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
4660 change.
4661
dd90f1b2
DD
46622004-05-28 DJ Delorie <dj@redhat.com>
4663
4664 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
4665 for linking, but otherwise adjust reloc for merged sections.
4666
5dd23ec1
L
46672004-05-28 H.J. Lu <hongjiu.lu@intel.com>
4668
4669 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
4670 _bfd_merged_section_offset for local symbols.
4671
f6f9408f
JR
46722004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
4673
4674 * Makefile.am: Regenerate dependencies.
4675 * Makefile.in: Regenerate.
4676 * archures.c: Add bfd_mach_sh3_nommu .
4677 * bfd-in2.h: Regenerate.
4678 * cpu-sh.c: Add sh3-nommu architecture.
4679 (bfd_to_arch_table): Create new table.
4680 (sh_get_arch_from_bfd_mach): Create new function.
4681 (sh_get_arch_up_from_bfd_mach): Create new function.
4682 (sh_merge_bfd_arch): Create new function.
4683 * elf32-sh.c (sh_ef_bfd_table): Add table.
4684 (sh_elf_check_relocs): Replace switch statement with
4685 use of sh_ef_bfd_table .
4686 (sh_elf_get_flags_from_mach): Add new function.
4687 (sh_find_elf_flags): Likewise.
4688 (sh_elf_copy_private_data): Replace most of non-elf contents
4689 with a call to sh_merge_bfd_arch() .
4690
d866f350
MC
46912004-05-27 Michael Chastain <mec.gnu@mindspring.com>
4692
4693 * Makefile.am (bfdver.h): Use explicit filename, not $< .
4694 * Makefile.in: Regenerate.
4695
1055df0f
AO
46962004-05-27 Alexandre Oliva <aoliva@redhat.com>
4697
4698 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
4699 custom calling conventions for dynamic symbols.
4700 (mn10300_elf_relax_section): Avoid relaxing a function as a local
4701 symbol if it's an alias to a global one.
4702
b3096250
L
47032004-05-26 H.J. Lu <hongjiu.lu@intel.com>
4704
4705 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
4706 change.
4707
9bb351fd
AO
47082004-05-27 Alexandre Oliva <aoliva@redhat.com>
4709
4710 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
4711 loop over hashes.
4712
e49f5022
AM
47132004-05-26 Alan Modra <amodra@bigpond.net.au>
4714
4715 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
4716 for SHT_GROUP sections.
4717
57ceae94
AM
47182004-05-25 Alan Modra <amodra@bigpond.net.au>
4719
4720 * elflink.c (elf_link_add_object_symbols): Don't set up merge
4721 section data here..
4722 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
4723 * merge.c: Formatting. Remove unnecessary casts. Expand
4724 bfd_get_section_alignment macro.
4725 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
4726 use throughout file.
4727 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
4728 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
4729 section name to determine sinfo group, instead test output section
4730 and alignment.
4731 (_bfd_merge_sections): Add struct bfd_link_info param. Call
4732 _bfd_strip_section_from_output rather than just twiddling flags.
4733 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
4734 (_bfd_merge_sections): Update prototype.
4735 * libbfd.h: Regenerate.
4736
c6f8758f 47372004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
4738
4739 * netbsd-core.c: Correctly indent section that sets architecture
4740 from machine ID.
4741
c6f8758f
NC
4742 From Miod Vallat <miod@online.fr>:
4743 * m88kopenbsd.c: New file.
4744 * targets.c (m88k_openbsd_vec): New.
4745 * config.bfd: Add m88k-*-openbsd*.
4746 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
4747 (m88kopenbsd_vec): New.
4748 * configure: Regenerate.
4749 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
4750 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
4751 Run "make dep-am".
4752 * Makefile.in: Regenerate.
4753 * po/SRC-POTFILES.in: Regenerate.
4754
7d7e6bc4
NC
47552004-05-24 Nick Clifton <nickc@redhat.com>
4756
4757 * hash.c: Remove bogus node "Changing the default Hash Table Size"
4758 introduced by hash table size patch.
4759
bc286f95
BE
47602004-05-22 Ben Elliston <bje@au.ibm.com>
4761
4762 * configure.in (is_release): Remove.
4763 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
4764 (AC_OUTPUT): Don't output bfdver.h from version.h.
4765 * configure: Regenerate.
4766 * Makefile.am (RELEASE): New variable.
4767 (bfdver.h): New target.
4768 * Makefile.in: Regenerate.
4769 * doc/Makefile.in: Likewise.
4770
8b89a4eb
BE
47712004-05-22 Ben Elliston <bje@au.ibm.com>
4772
4773 * Makefile.am (config.status): Don't depend on version.h.
4774 * Makefile.in: Regenerate.
4775
753731ee
AM
47762004-05-22 Alan Modra <amodra@bigpond.net.au>
4777
4778 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
4779 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
4780 * libbfd.h: Regenerate.
4781 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
4782 (_bfd_elf_rel_local_sym): Likewise.
4783 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
4784 (elf_link_input_bfd): Likewise.
4785 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
4786 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4787 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4788 (elfNN_ia64_relocate_section): Likewise.
4789
2d643429
NC
47902004-05-21 Andy Chittenden <achittenden@bluearc.com>
4791
4792 * hash.c (bfd_default_hash_table_size): New variable.
4793 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
4794 (bfd_hash_set_default_size): New function. Set the default size
4795 to a selected prime number close to the argument. Document new
4796 function.
4797 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
4798 * bfd-in2.h: Regenerate.
4799 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
4800 * Makefile.in: Regenerate.
4801
8377c19c
MK
48022004-05-21 Mark Kettenis <kettenis@gnu.org>
4803
4804 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
4805 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
4806 arm, m68k, m88k and hppa core files.
4807
69fd4758
NC
48082004-05-21 Nick Clifton <nickc@redhat.com>
4809
4810 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
4811 (bfd_bwrite): Likewise.
4812 (bfd_tell): Likewise.
4813 (bfd_flush): Likewise.
4814 (bfd_stat): Likewise.
4815 (bfd_seek): Likewise.
4816 (bfd_get_mtime): Likewise.
4817 (bfd_get_size): Likewise.
4818
cd917290
BE
48192004-05-19 Ben Elliston <bje@au.ibm.com>
4820
4821 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
4822
1b09e940
NC
48232004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
4824
4825 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
4826 (bfd_generic_openr_next_archived_file): Likewise.
4827
096c35a7
BW
48282004-05-17 Bob Wilson <bob.wilson@acm.org>
4829
4830 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
4831 section names by inserting a new substring after .gnu.linkonce, except
4832 for .gnu.linkonce.t.* where the "t." is replaced.
4833
eea6121a 48342004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
4835
4836 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
4837 (m68-*-lynxos* case): Likewise.
4838 (powerpc-*-lyxnos* case): New case.
4839 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
4840
80fccad2
BW
48412004-05-17 David Heine <dlheine@tensilica.com>
4842
4843 * aout-target.h (MY_bfd_copy_private_header_data): Define.
4844 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
4845 * bfd.c (bfd_copy_private_header_data): Define.
4846 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
4847 interface.
4848 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
4849 * coffcode.h (coff_bfd_copy_private_header_data): Define.
4850 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
4851 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
4852 segments by calling copy_private_bfd_data.
4853 (_bfd_elf_copy_private_header_data): Define.
4854 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
4855 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
4856 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
4857 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
4858 * mmo.c (mmo_bfd_copy_private_header_data): Define.
4859 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
4860 * som.c (som_bfd_copy_private_header_data): Define.
4861 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
4862 * vms.c (vms_bfd_copy_private_header_data): Define.
4863 * bfd-in2.h: Regenerate.
4864 * libbfd.h: Regenerate.
4865
c5ae1840
TS
48662004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4867
4868 * elfxx-mips.c (MINUS_TWO): Define.
4869 (mips_elf_higher, mips_elf_highest,
4870 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
4871 some bfd_vma values.
4872 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
4873
a99cf92b
DA
48742004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4875
4876 * som.c (log2): Rename to exact_log2. Adjust all callers.
4877
0da76f83
NC
48782004-05-13 Paul Brook <paul@codesourcery.com>
4879
c273895f 4880 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
4881 dwarf3 format CIE entries. Remove comment about the size of the
4882 ra_column field. It is now correctly deduced.
0da76f83 4883
4b363073
NC
48842004-05-13 Joel Sherrill <joel@oarcorp.com>
4885
4886 * config.bfd (or32-*-rtems*): Switch to elf.
4887
9598fbe5
NC
48882004-05-13 Nick Clifton <nickc@redhat.com>
4889
4890 * po/fr.po: Updated French translation.
4891
8c37241b
JJ
48922004-05-11 Jakub Jelinek <jakub@redhat.com>
4893
0306b3bf 4894 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
4895 into .dynsym if elf_section_data (sec)->dynindx <= 0.
4896 Adjust counting of last_local.
4897 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
4898 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
4899 created by the linker nor !SHF_ALLOC.
4900
4901 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
4902 DT_PLTGOT to the start of the .got.plt section instead of the
4903 .got output section. Set sh_entsize for .got section in addition
4904 to .got.plt.
4905 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
4906 is at sgot->output_section->vma.
4907 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
4908 DT_PLTGOT to the start of the .got.plt section instead of the
4909 .got output section.
4910 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
4911 is at sgot->output_section->vma. Set sh_entsize for .got section
4912 in addition to .got.plt.
4913 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
4914 (bfd_section_from_phdr): Likewise.
4915 (map_sections_to_segments): Likewise.
4916 (assign_file_positions_for_segments): Likewise.
4917 (get_program_header_size): Likewise.
4918 * elflink.c (bfd_elf_size_dynamic_sections): Set
4919 elf_tdata (output_bfd)->relro from info->relro.
4920 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
4921
3f980e41
AO
49222004-05-08 Alexandre Oliva <aoliva@redhat.com>
4923
4924 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
4925 a zero symndx for which we hadn't accounted a dynamic relocation.
4926 (_frvfdpic_add_rofixup): Likewise.
4927
d70270c5 49282004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 4929 DJ Delorie <dj@redhat.com>
d70270c5
BF
4930
4931 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
4932 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
4933 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
4934 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
4935
7e9f3bd6
AO
49362004-05-07 Alexandre Oliva <aoliva@redhat.com>
4937
4938 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
4939 immediately if there's no link info.
4940 (elf32_frvfdpic_copy_private_bfd_data): New.
4941 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
4942
eb61d2d6
ZW
49432004-05-06 Zack Weinberg <zack@codesourcery.com>
4944
4945 * dwarf2.c (add_line_info): Also set info->filename to NULL if
4946 filename argument is null; do not call strlen on a null pointer.
4947
ecb2d096
DJ
49482004-05-06 Daniel Jacobowitz <drow@mvista.com>
4949
4950 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
4951 special case.
4952
43850d5b
AO
49532004-05-05 Alexandre Oliva <aoliva@redhat.com>
4954
4955 * configure.in (bfd_elf32_frvfdpic_vec): New.
4956 * configure: Rebuilt.
4957 * targets.c (bfd_elf32_frvfdpic_vec): New.
4958 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
4959 on the latter.
4960 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
4961 frvfdpic instead of frv. Rearrange elf-target macros such that
4962 the FDPIC-specific ones are only defined for this new target
4963 vector.
4964 (bfd_elf32_frvfdpic_vec): Declare.
4965 (IS_FDPIC): New.
4966 (elf32_frv_relocate_section): Use it to enable segment checking
4967 and to control rofixup emission. Add output section vma to
4968 applied relocation in non-LOAD non-ALLOC sections. Use
4969 _bfd_error_handler for errors.
4970 (_frv_create_got_section): Create .rel.got and .rofixup only in
4971 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
4972 linker script.
4973 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
4974 (elf32_frvfdpic_modify_segment_map): Likewise.
4975 (elf32_frv_finish_dynamic_sections): New, do-nothing.
4976 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
4977 error message if we miscompute the rofixup size.
4978 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
4979 (frvfdpic_elf_encode_eh_address): Likewise.
4980 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
4981 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
4982 relocs. Reject unknown relocation types.
4983 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
4984 (frv_elf_merge_private_bfd_data): Likewise.
4985 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
4986 0x4000 for newly-added elf32-frvfdpic.
4987
06fc8a8c
NC
49882004-05-05 Nick Clifton <nickc@redhat.com>
4989
4990 PR/136
4991 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
4992 returning NULL as most users of this function do not check its
4993 return value.
33216455
NC
4994 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
4995 of bfd_cache_lookup().
4996 * sco5-core.c (sco5_core_file_p): Likewise.
4997 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
4998
49992004-05-05 Nick Clifton <nickc@redhat.com>
5000
5001 * cache.c (bfd_cache_lookup): Improve formatting.
5002 * archive.c: Fix formatting.
5003
6b6e92f4
NC
50042004-05-05 Peter Barada <peter@the-baradas.com>
5005
5006 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
5007 * cpu-m68k.c(bfd_m68k_arch): Likewise.
5008 * bfd-in2.h(bfd_architecture): Regenerate.
5009
6a8d1586
AM
50102004-05-03 Alan Modra <amodra@bigpond.net.au>
5011
5012 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
5013 SEC_MERGE sections.
5014 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
5015 those against discarded link-once and SEC_MERGE section symbols.
5016
fafe6678
L
50172004-05-02 H.J. Lu <hongjiu.lu@intel.com>
5018
5019 * section.c (bfd_get_section_by_name_if): New.
5020 * bfd-in2.h: Regenerated.
5021
ad7b9a36
AM
50222004-05-02 Alan Modra <amodra@bigpond.net.au>
5023
5024 * som.c (som_bfd_is_group_section): Define.
5025
73499ab8
AM
50262004-05-01 Alan Modra <amodra@bigpond.net.au>
5027
5028 * section.c (bfd_make_section_anyway): Copy the whole
5029 bfd_hash_entry, not just "next" from existing entry.
5030
45c5e9ed
L
50312004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5032
5033 * elf.c (bfd_section_from_shdr): Maintain the section order in
5034 a section group.
5035 (special_sections): Add ".note.GNU-stack".
5036 (elf_fake_sections): Handle section group for relocatable
5037 link..
5038
bc87dd2e
L
50392004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5040
5041 * section.c (bfd_sections_find_if): New.
5042 * bfd-in2.h: Regenerated.
5043
72adc230
AM
50442004-04-30 Alan Modra <amodra@bigpond.net.au>
5045
5046 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
5047
5048 * elf-bfd.h (bfd_elf_is_group_section): Declare.
5049 * elf.c (bfd_elf_is_group_section): New function.
5050 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
5051 * section.c (bfd_generic_is_group_section): New function.
5052 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
5053 (BFD_JUMP_TABLE_LINK): Adjust.
5054 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
5055 * aout-target.h (MY_bfd_is_group_section): Define.
5056 * aout-tic30.c (MY_bfd_is_group_section): Define.
5057 * bfd.c (bfd_is_group_section): Define.
5058 * binary.c (binary_bfd_is_group_section): Define.
5059 * bout.c (b_out_bfd_is_group_section): Define.
5060 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
5061 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
5062 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
5063 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
5064 * coffcode.h (coff_bfd_is_group_section): Define.
5065 * i386msdos.c (msdos_bfd_is_group_section): Define.
5066 * i386os9k.c (os9k_bfd_is_group_section): Define.
5067 * ieee.c (ieee_bfd_is_group_section): Define.
5068 * ihex.c (ihex_bfd_is_group_section): Define.
5069 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
5070 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
5071 * mmo.c (mmo_bfd_is_group_section): Define.
5072 * nlm-target.h (nlm_bfd_is_group_section): Define.
5073 * oasys.c (oasys_bfd_is_group_section): Define.
5074 * pef.c (bfd_pef_bfd_is_group_section): Define.
5075 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
5076 * srec.c (srec_bfd_is_group_section): Define.
5077 * tekhex.c (tekhex_bfd_is_group_section): Define.
5078 * versados.c (versados_bfd_is_group_section): Define.
5079 * vms.c (vms_bfd_is_group_section): Define.
5080 * xsym.c (bfd_sym_bfd_is_group_section): Define.
5081 * bfd-in2.h: Regenerate.
5082 * libbfd.h: Regenerate.
5083
20f0a1ad
AM
50842004-04-30 Alan Modra <amodra@bigpond.net.au>
5085
5086 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
5087
f7458fc9 50882004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
5089
5090 * configure.in: Update version to 2.15.91.
5091 * configure: Regenerate.
5092
8a7140c3
NC
50932004-04-29 Brian Ford <ford@vss.fsi.com>
5094
5095 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
5096 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
5097 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
5098 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
5099 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
5100 .gnu.linkonce.wi. sections.
5101 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
5102 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
5103 .gnu.linkonce.wi..
5104 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
5105 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5106
3e722fb5
CD
51072004-04-28 Chris Demetriou <cgd@broadcom.com>
5108
5109 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
5110 * bfd-in2.h: Regenerate.
5111 * libbfd.h: Likewise.
5112
351e2b5a
DA
51132004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5114
5115 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
5116 dup_common fields.
5117 (setup_sections): Use som_subspace_dictionary_record struct instead
5118 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
5119 is_comdat, is_common or dup_common.
5120 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
5121 is_comdat, is_common and dup_common in section subspace_dict from
5122 copy_data.
5123 (som_begin_writing): Use som_subspace_dictionary_record struct.
5124 (som_finish_writing): Likewise.
5125 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
5126 is_common and dup_common flags in info for symbol. Add comment
5127 regarding linker support for these fields. Slightly reorganize
5128 function.
5129 (som_build_and_write_symbol_table): Set is_comdat, is_common and
5130 dup_common fields in symbol table from symbol info.
5131 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
5132 arguments. Set corresponding fields in copy_data. Change all callers.
5133 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
5134 symbol table.
5135 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
5136 * som.h (som_subspace_dictionary_record): Define.
5137 (som_copyable_section_data_struct): Add is_comdat, is_common and
5138 dup_common fields.
5139 (som_section_data_struct): Use som_subspace_dictionary_record struct
5140 instead of subspace_dictionary_record.
5141 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
5142
3ba3bc8c
BW
51432004-04-27 Bob Wilson <bob.wilson@acm.org>
5144
5145 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
5146 if set. Check reloc_done flag before applying relocations. Use
5147 output addresses, both when applying relocations and when comparing
5148 against the specified section.
5149 (elf_xtensa_relocate_section): Use output address to check if dynamic
5150 reloc is in a literal pool. Set section's reloc_done flag.
5151
beb8df56
L
51522004-04-27 H.J. Lu <hongjiu.lu@intel.com>
5153
5154 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
5155 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5156 section.
5157 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
5158 section.
5159
1829f4b2
AM
51602004-04-27 Alan Modra <amodra@bigpond.net.au>
5161
5162 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
5163 structure field removed in 2004-04-24 patch.
5164 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
5165
5166 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
5167 Constify hdr arg.
5168 * elf32-arm.h (elf32_arm_section_flags): Likewise.
5169 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
5170 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
5171 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
5172 field before calling elf_backend_section_flags.
5173
4030e8f6
CD
51742004-04-24 Chris Demetriou <cgd@broadcom.com>
5175
5176 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
5177 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
5178 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
5179 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
5180 and BFD_RELOC_32_PCREL.
5181 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
5182 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
5183 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5184 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
5185 (mips_elf_next_relocation): Move comment about matching HI/LO
5186 relocations to...
5187 (_bfd_mips_elf_relocate_section): Here. Remove handling for
5188 R_MIPS_GNU_REL_HI16.
5189
3e27568f
CD
51902004-04-23 Chris Demetriou <cgd@broadcom.com>
5191
5192 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
5193 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
5194 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
5195 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
5196 and update comments to reflect current usage.
5197 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
5198 and MIPS_R_SWITCH, as well as several empty entries. Update comment
5199 for MIPS_R_PCREL16.
5200 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
5201 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
5202 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5203 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
5204 type number to be MIPS_R_PCREL16.
5205 (mips_relocate_section): Remove support for link-time relaxation
5206 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
5207 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5208 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
5209 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
5210 relaxation of branches used by embedded-PIC.
5211 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
5212 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
5213 related members, update comment.
5214 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
5215 code related to embedded-PIC.
5216 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
5217 initialization of now-removed 'adjust' member of
5218 'struct ecoff_debug_info'.
5219
b32de0bc 52202004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
5221
5222 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
5223
955af222
PB
52242004-04-21 Philip Blundell <pb@nexus.co.uk>
5225
5226 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
5227 relocs for locally defined symbols during -shared final link.
5228 (elf32_arm_final_link_relocate): Likewise.
5229
47a9f7b3
JJ
52302004-04-22 Jakub Jelinek <jakub@redhat.com>
5231
5232 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
5233 ELF_LINK_POINTER_EQUALITY_NEEDED.
5234 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
5235 if r_type is not R_X86_64_PC32.
5236 (elf64_x86_64_finish_dynamic_symbol): If
5237 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
5238 SHN_UNDEF symbols.
5239
1f1799d5
KK
52402004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5241
5242 * elf32-sh.c (sh_elf_plt_sym_val): New function.
5243 (elf_backend_plt_sym_val): Define.
5244
0fdea5ce
AC
52452004-04-22 Andrew Cagney <cagney@redhat.com>
5246
5247 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
5248
5198ba8b
DA
52492004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5250
eb61d2d6 5251 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
5252 make_bfd_asection.
5253 * som.c (som_set_section_contents): Constantify second argument.
5254 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
5255 (som_object_setup): Rework to avoid warning.
5256 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
5257 Likewise.
5258
fe2e161a
AC
52592004-04-22 Andrew Cagney <cagney@redhat.com>
5260
5261 * cache.c (bfd_cache_close): Check for a previously closed file.
5262
4c45e5c9
JJ
52632004-04-22 Jakub Jelinek <jakub@redhat.com>
5264
5265 * bfd.c (bfd_get_synthetic_symtab): Define.
5266 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
5267 NAME##_get_synthetic_symtab.
5268 (struct bfd_target): Add _bfd_get_synthetic_symtab.
5269 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
5270 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
5271 relplt_name fields.
5272 (_bfd_elf_get_synthetic_symtab): New prototype.
5273 * elfcode.h (elf_get_synthetic_symtab): Define.
5274 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
5275 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
5276 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
5277 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
5278 * bfd-in2.h: Rebuilt.
5279 * libbfd.h: Rebuilt.
5280 * elf32-i386.c (elf_i386_plt_sym_val): New function.
5281 (elf_backend_plt_sym_val): Define.
5282 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
5283 (elf_backend_plt_sym_val): Define.
5284 * elf32-s390.c (elf_s390_plt_sym_val): New function.
5285 (elf_backend_plt_sym_val): Define.
5286 * elf64-s390.c (elf_s390_plt_sym_val): New function.
5287 (elf_backend_plt_sym_val): Define.
5288 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
5289 (elf_backend_plt_sym_val): Define.
5290 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
5291 (elf_backend_plt_sym_val): Define.
5292 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
5293 (elf_backend_plt_sym_val): Define.
5294 * aout-target.h (MY_get_synthetic_symtab): Define.
5295 * aout-tic30.c (MY_get_synthetic_symtab): Define.
5296 * coff-rs6000.c (rs6000coff_vec): Add
5297 _bfd_nodynamic_get_synthetic_symtab.
5298 (pmac_xcoff_vec): Likewise.
5299 * coff64-rs6000.c (rs6000coff64_vec): Add
5300 _bfd_nodynamic_get_synthetic_symtab.
5301 (aix5coff64_vec): Likewise.
5302 * sunos.c (MY_get_synthetic_symtab): Define.
5303 * vms.c (vms_get_synthetic_symtab): Define.
5304
d2f7ecac
NC
53052004-04-22 Nick Clifton <nickc@redhat.com>
5306
5307 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
5308
fd99574b
NC
53092004-04-22 Peter Barada <peter@the-baradas.com>
5310
5311 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
5312 * bfd2-in.h: Regenerate.
5313 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
5314
23867d67
CD
53152004-04-21 Chris Demetriou <cgd@broadcom.com>
5316
5317 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
5318 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
5319 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
5320 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
5321 * bfd-in2.h: Regenerate.
5322
2c8c90bc
BW
53232004-04-21 Bob Wilson <bob.wilson@acm.org>
5324
5325 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
5326 require relocations against a weak symbol to reference the same
5327 symbol hash entry if not a final, static link.
5328 (get_cached_value, add_value_map): Add final_static_link argument.
5329 (remove_literals): Pass final_static_link argument as needed.
5330
40838a72
AC
53312004-04-21 Andrew Cagney <cagney@redhat.com>
5332
5333 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
5334 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
5335 (opncls_bwrite, opncls_bclose, opncls_bflush)
5336 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
5337 bfd iovec that uses function callbacks.
5338 (bfd_close): Use the iovec's bclose.
5339 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
5340 (cache_bclose, cache_bflush, cache_bstat)
5341 (cache_iovec): New functions and global variable, implement a
5342 cache "iovec", where applicable set bfd_error.
5343 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
5344 * bfdio.c (struct bfd_iovec): Define.
5345 (real_read): Delete function.
5346 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
5347 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
5348 assume that bread and bwrite set bfd_error.
5349 * bfd.c (struct bfd): Add "iovec", update comments.
5350 * bfd-in2.h, libbfd.h: Re-generate.
5351
7f919c84
AC
53522004-04-21 Andrew Cagney <cagney@redhat.com>
5353
5354 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5355
715df9b8
EB
53562004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
5357
5358 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
5359 (bfd_elf_gc_sections): Fail if a shared object is being created.
5360 Do not fail if dynamic sections have been created. Instead call
5361 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
5362 dynamically referenced symbols. Do not mark the whole graph
5363 rooted at .eh_frame, only the section proper.
5364
6482c264
NC
53652004-04-20 DJ Delorie <dj@redhat.com>
5366
5367 * reloc.c: Add BFD_RELOC_32_SECREL.
5368 * bfd-in2.h: Regenerate.
5369 * libbfd.h: Likewise.
5370 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
5371 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
5372 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
5373
4dc570c2
JJ
53742004-04-19 Jakub Jelinek <jakub@redhat.com>
5375
5376 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
5377 relocs against hidden/protected undefweak symbols properly.
5378 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5379
0b60d5d3
MK
53802004-04-18 Mark Kettenis <kettenis@gnu.org>
5381
5382 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5383 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
5384 core files.
5385
d48bdb99
AM
53862004-04-17 Brian Ford <ford@vss.fsi.com>
5387
5388 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
5389 filepos for the SizeOfHeaders field.
5390 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
5391 overflow.
5392 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
5393
57a1784e
AM
53942004-04-16 Alan Modra <amodra@bigpond.net.au>
5395
5396 * simple.c (bfd_simple_get_relocated_section_contents): Don't
5397 change reloc_done. Set and restore _cooked_size.
5398 (RETURN): Delete.
5399
d1ad3f6f
MK
54002004-04-15 Mark Kettenis <kettenis@gnu.org>
5401
5402 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
5403 core files.
5404
3d1bca9d
NC
54052004-04-15 Nick Clifton <nickc@redhat.com>
5406
5407 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
5408
019b892f
AM
54092004-04-15 Alan Modra <amodra@bigpond.net.au>
5410
5411 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
5412
15b43f48
AM
54132004-04-15 H.J. Lu <hongjiu.lu@intel.com>
5414
5415 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
5416 when it is a definition.
5417
6de00a78
AM
54182004-04-14 Alan Modra <amodra@bigpond.net.au>
5419
5420 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
5421 when statically linking PIC code.
5422 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5423
279500de
TS
54242004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5425
5426 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
5427 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
5428 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
5429 * configure: Regenerate.
5430
ccf2f652
RS
54312004-04-08 Richard Sandiford <rsandifo@redhat.com>
5432
5433 * elflink.c: Include libiberty.h.
5434 * Makefile.am (elflink.lo): Depend on libiberty.h.
5435 * Makefile.in: Regenerate.
5436
ca07892d
DJ
54372004-04-06 Daniel Jacobowitz <drow@mvista.com>
5438
5439 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
5440 ".MIPS.stubs".
5441
a5a58ba4
L
54422004-04-05 H.J. Lu <hongjiu.lu@intel.com>
5443
5444 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
5445 reserve the memory for dynamic linker
5446
24d18d30
MK
54472004-04-05 Mark Kettenis <kettenis@gnu.org>
5448
5449 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
5450 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
5451
a4d7b4b5
L
54522004-04-02 H.J. Lu <hongjiu.lu@intel.com>
5453
5454 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
5455 RELOC_FOR_GLOBAL_SYMBOL.
5456 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
5457
1f433d93
L
54582004-04-02 H.J. Lu <hongjiu.lu@intel.com>
5459
5460 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5461 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
5462
e489d0ae
PB
54632004-04-01 Paul Brook <paul@codesourcery.com>
5464
5465 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
5466 * elf32-arm.h (struct elf32_elf_section_map): New.
5467 (struct _arm_elf_section_data): New.
5468 (elf32_arm_section_data): Define.
5469 (struct elf32_arm_link_hash_table): Add byteswap_code.
5470 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
5471 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
5472 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
5473 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
5474 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
5475 (bfd_elf32_new_section_hook, elf_backend_write_section,
5476 elf_backend_link_output_symbol_hook): Define.
5477
66a695f0
NC
54782004-04-01 Andy Chittenden <achittenden@bluearc.com>
5479
5480 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
5481 that keeps the characters in a B_INCL..B_EINCL range.
5482 (_bfd_link_section_stabs): When computing the sum of the
5483 characters in a B_INCL..B_EINCL range also keep a copy of those
5484 characters. Use this information to distinguish between
5485 include sections that have the same sum and the same length
5486 but which are nevertheless unique.
5487
8375c36b
PB
54882004-03-31 Paul Brook <paul@codesourcery.com>
5489
5490 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
5491 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
5492
a56b48eb
NC
54932004-03-31 Andy Chittenden <achittenden@bluearc.com>
5494
5495 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
5496 to 'sum_chars' and add field 'num_chars'.
5497 (_bfd_link_section_stabs): When computing the sum of the
5498 characters in a B_INCL..B_EINCL range also keep a count of the
5499 number of characters. Use this information to help distinguish
5500 between include sections when have the same sum but which
5501 nevertheless are still unique.
5502
1fbc7e7a 55032004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
5504
5505 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
5506
0949843d 55072004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 5508 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
5509
5510 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
5511 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
5512 (BFD32_BACKENDS): Add elf32-cr16c.lo.
5513 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
5514 (cpu-cr16c.lo): New target.
5515 (elf32-cr16c.lo): Likewise.
5516 * Makefile.in: Regenerate.
5517 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
5518 (bfd_archures_list): Add bfd_cr16c_arch.
5519 * config.bfd: Handle cr16c-*-elf*.
5520 * configure.in: Handle bfd_elf32_cr16c_vec.
5521 * configure: Regenerate.
5522 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
5523 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
5524 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
5525 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
5526 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
5527 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
5528 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
5529 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
5530 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
5531 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
5532 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
5533 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
5534 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
5535 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
5536 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
5537 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
5538 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
5539 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
5540 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
5541 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
5542 * targets.c (bfd_elf32_cr16c_vec): Declare.
5543 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
5544 * cpu-cr16c.c: New file.
5545 * elf32-cr16c.c: Likewise.
5546 * libbfd.h: Regenerate.
5547 * bfd-in2.h: Likewise.
5548
baaff79e
JJ
55492004-03-30 Jakub Jelinek <jakub@redhat.com>
5550
5551 * elf.c (map_sections_to_segments): Fix handling of .tbss.
5552
c152c796
AM
55532004-03-27 Alan Modra <amodra@bigpond.net.au>
5554
5555 * Makefile.am: Remove all mention of elflink.h.
5556 * Makefile.in: Regenerate.
5557 * bfd-in.h (bfd_elf_discard_info): Declare.
5558 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
5559 * bfd-in2.h: Regenerate.
5560 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
5561 bfd_elf32_link_record_dynamic_symbol,
5562 bfd_elf64_link_record_dynamic_symbol,
5563 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
5564 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
5565 _bfd_elf32_link_record_local_dynamic_symbol,
5566 _bfd_elf64_link_record_local_dynamic_symbol,
5567 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
5568 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
5569 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
5570 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
5571 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
5572 _bfd_elf32_reloc_symbol_deleted_p,
5573 _bfd_elf64_reloc_symbol_deleted_p): Delete.
5574 (bfd_elf_link_record_dynamic_symbol,
5575 bfd_elf_link_record_local_dynamic_symbol,
5576 bfd_elf_final_link, bfd_elf_gc_sections,
5577 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
5578 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
5579 bfd_elf_reloc_symbol_deleted_p): Declare.
5580 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
5581 * elf32-arm.h: Update for changed function names. Remove local
5582 WILL_CALL_FINISH_DYNAMIC_SECTION define.
5583 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
5584 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
5585 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
5586 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5587 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5588 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
5589 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
5590 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
5591 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
5592 (bfd_elfNN_print_symbol): Define.
5593 * elfcode.h: Don't include elflink.h.
5594 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
5595 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
5596 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
5597 elf_gc_record_vtinherit, elf_gc_record_vtentry,
5598 elf_link_record_local_dynamic_symbol): Don't define.
5599 * elflink.c: Update for changed function names. Move elflink.h
5600 code here.
5601 * elflink.h: Delete file.
5602 * po/SRC-POTFILES.in: Regenerate.
5603 * po/bfd.pot: Regenerate.
5604
6a9cae7f
AM
56052004-03-27 Alan Modra <amodra@bigpond.net.au>
5606
5607 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
5608 "name" for global syms accidentally removed in 2004-03-20 change.
5609
140f6c8e
AM
56102004-03-27 Alan Modra <amodra@bigpond.net.au>
5611
5612 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
5613 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
5614 where Elf_External_* is different for 64 and 32 bit, with
5615 corresponding elf_size_info field.
5616 (struct elf_final_link_info): Use "bfd_byte *" instead
5617 of "Elf_External_Sym *" for external_syms and symbuf.
5618 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
5619 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
5620 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
5621 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
5622 (elf_link_sort_cmp2): Adjust.
5623 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
5624 using ELF_R_SYM macro. Set u.sym_mask.
5625 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
5626 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
5627 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
5628 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
5629 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
5630 swap_syn_out functions. Rearrange dyn swap in/out switch.
5631 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
5632 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
5633 (elf_link_flush_output_syms): Add elf_backend_data arg.
5634 (elf_link_check_versioned_symbol): Likewise.
5635 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
5636 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
5637 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
5638 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
5639 ELF_R_TYPE and ELF_R_INFO macros.
5640 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
5641 based on size rather than using ELF_R_INFO.
5642 (elf_gc_mark): Set up r_sym_shift local var and use instead of
5643 ELF_R_SYM macro.
5644 (struct alloc_got_off_arg): New.
5645 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
5646 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
5647 (elf_gc_allocate_got_offsets): Adjust.
5648 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
5649 ELF_R_SYM. Use bfd_section_from_elf_index.
5650 (elf_bfd_discard_info): Set cookie.r_sym_shift.
5651 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
5652 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
5653
14bde378
SS
56542004-03-26 Stan Shebs <shebs@apple.com>
5655
5656 Remove MPW support, no longer used.
5657 * config.bfd (powerpc-*-mpw*): Remove configuration.
5658 * mpw-config.in, mpw-make.sed: Remove files.
5659 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
5660
555cd476
AM
56612004-03-26 Alan Modra <amodra@bigpond.net.au>
5662
5663 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
5664 (ppc64_elf_add_symbol_hook): New function.
5665 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
5666 const from Elf_Internal_Sym param.
5667 * elflink.c (elf_link_add_object_symbols): Adjust.
5668 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
5669 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
5670 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
5671 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
5672 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
5673 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
5674 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
5675 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
5676 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
5677 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
5678 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
5679 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
5680 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
5681 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
5682 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
5683 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
5684
4ad4eba5
AM
56852004-03-26 Alan Modra <amodra@bigpond.net.au>
5686
5687 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
5688 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
5689 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
5690 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
5691 (bfd_elf64_bfd_link_add_symbols): Delete.
5692 (bfd_elf_link_add_symbols): Declare.
5693 * elfcode.h (elf_bfd_link_add_symbols): Delete.
5694 * elflink.c: Include safe-ctype.h.
5695 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
5696 make static.
5697 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
5698 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
5699 static.
5700 (elf_link_add_archive_symbols): Rename from
5701 _bfd_elf_link_add_archive_symbols, make static.
5702 (elf_link_add_object_symbols): New function. Corresponding
5703 elflink.h function converted to use elf_size_info.
5704 (bfd_elf_link_add_symbols): Likewise.
5705 (bfd_elf_size_dynamic_sections): Adjust.
5706 * elflink.h (elf_bfd_link_add_symbols): Delete.
5707 (elf_link_add_object_symbols): Delete.
5708 * elf32-gen.c (elf32_generic_link_add_symbols): Call
5709 bfd_elf_link_add_symbols.
5710 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
5711
5a580b3a
AM
57122004-03-25 Alan Modra <amodra@bigpond.net.au>
5713
5714 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
5715 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 5716
5a580b3a
AM
5717 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
5718 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
5719 (_bfd_elf_add_dt_needed_tag): Declare.
5720 (_bfd_elf_sort_symbol): Declare.
5721 (_bfd_elf_finalize_dynstr): Declare.
5722 (RELOC_FOR_GLOBAL_SYM): Formatting.
5723 * elfcode.h (elf_add_dynamic_entry): Delete.
5724 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
5725 elflink.h function converted to use elf_size_info.
5726 (_bfd_elf_add_dt_needed_tag): Likewise.
5727 (_bfd_elf_sort_symbol): Likewise.
5728 (_bfd_elf_finalize_dynstr): Likewise.
5729 (compute_bucket_count): Likewise.
5730 (bfd_elf_size_dynamic_sections): Likewise. Check result of
5731 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
5732 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
5733 * elflink.h: ..here.
5734 (sort_symbol, add_dt_needed_tag): Delete.
5735 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
5736 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
5737 Update all users.
5738 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
5739 * elf32-cris.c (add_dynamic_entry): Likewise.
5740 * elf32-hppa.c (add_dynamic_entry): Likewise.
5741 * elf32-i370.c (add_dynamic_entry): Likewise.
5742 * elf32-i386.c (add_dynamic_entry): Likewise.
5743 * elf32-m32r.c (add_dynamic_entry): Likewise.
5744 * elf32-m68k.c (add_dynamic_entry): Likewise.
5745 * elf32-ppc.c (add_dynamic_entry): Likewise.
5746 * elf32-s390.c (add_dynamic_entry): Likewise.
5747 * elf32-sh.c (add_dynamic_entry): Likewise.
5748 * elf32-sparc.c (add_dynamic_entry): Likewise.
5749 * elf32-vax.c (add_dynamic_entry): Likewise.
5750 * elf32-xtensa.c (add_dynamic_entry): Likewise.
5751 * elf64-alpha.c (add_dynamic_entry): Likewise.
5752 * elf64-hppa.c (add_dynamic_entry): Likewise.
5753 * elf64-ppc.c (add_dynamic_entry): Likewise.
5754 * elf64-s390.c (add_dynamic_entry): Likewise.
5755 * elf64-sparc.c (add_dynamic_entry): Likewise.
5756 * elf64-x86-64.c (add_dynamic_entry): Likewise.
5757 * elfxx-ia64.c (add_dynamic_entry): Likewise.
5758 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
5759 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
5760 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
5761 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5762
d507cf36
PB
57632004-03-23 Paul Brook <paul@codesourcery.com>
5764
5765 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
5766
88d65ad6
BW
57672004-03-22 Bob Wilson <bob.wilson@acm.org>
5768
5769 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
5770 literal tables and check for relocs outside of literal pools.
5771 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
5772 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
5773 set DF_TEXTREL.
5774 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
5775 (elf_xtensa_relocate_section): Read literal tables and check for
5776 dynamic relocations in read-only sections and not in literal pools.
c152c796 5777
b9cf773d
AM
57782004-03-23 Alan Modra <amodra@bigpond.net.au>
5779
5780 PR 51.
5781 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
5782
e4a2175c
HPN
57832004-03-22 Hans-Peter Nilsson <hp@axis.com>
5784
5785 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5786 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
5787 not defined by the executable, or defined in a DSO.
5788 <eliding run-time relocation of .got>: Initialize GOT entry for a
5789 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
5790 executable.
5791 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
5792 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
5793 a PLT reloc to GOT for an executable.
5794 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 5795 .got for a DSO and explain why.
e4a2175c
HPN
5796 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
5797 and unreferenced symbols for which a PLT is defined. Adjust
5798 dynamic-symbol pruning correspondingly, to make sure we don't lose
5799 a dynamic symbol also defined by a DSO.
5800
b2a8e766
AM
58012004-03-22 Alan Modra <amodra@bigpond.net.au>
5802
5803 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
5804 and rel args. Group input and output args. Wrap to 80 columns.
5805 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
5806 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
5807 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
5808 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
5809 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5810 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
5811 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
5812 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
5813 RELOC_FOR_GLOBAL_SYMBOL invocation.
5814
59c2e50f
L
58152004-03-20 H.J. Lu <hongjiu.lu@intel.com>
5816
5817 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
5818 unresolved symbols in objects aren't allowed.
5819
5820 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
5821 unresolved symbols.
5822 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
5823 (elf_hppa_unmark_useless_dynamic_symbols):
5824 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5825 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5826 (elf32_hppa_relocate_section): Likewise.
5827 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5828 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5829 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5830 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5831 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5832
5833 * elf-m10200.c (mn10200_elf_relocate_section): Use
5834 RELOC_FOR_GLOBAL_SYMBOL.
5835 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5836 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5837 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5838 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5839 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5840 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
5841 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5842 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5843 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5844 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5845 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5846 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5847
9992270f
DA
58482004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5849
36751eee
DA
5850 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
5851 (final_link_relocate): Likewise.
9992270f
DA
5852 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
5853 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
5854
05864e2a
AM
58552004-03-19 Alan Modra <amodra@bigpond.net.au>
5856
5857 * Makefile.am: Run "make dep-am".
5858 * Makefile.in: Regenerate.
5859 * aclocal.m4: Regenerate.
5860 * config.in: Regenerate.
5861 * po/bfd.pot: Regenerate.
5862
f218a464 58632004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
5864 H.J. Lu <hongjiu.lu@intel.com>
5865
5866 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
5867 type and size change code to where it was previously. Remove
5868 dt_needed param. Treat old weak syms as strong if new sym is
5869 from a shared lib, even when old sym is from another shared
5870 lib. Remove unnecessary tests of oldweak and newweak. Correct
5871 comments.
5872 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
5873 _bfd_elf_merge_symbol calls.
5874 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
5875 dt_needed local var. Update comments.
5876 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
5877 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
5878
5879 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
5880 strong syms in one shared object overriding weak syms in another.
5881
79349b09
AM
58822004-03-18 Alan Modra <amodra@bigpond.net.au>
5883
4a43e768
AM
5884 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
5885 dyn_lib_class field. Rearrange for better packing.
5886 (elf_dt_soname): Delete.
5887 (elf_dyn_lib_class): Define.
5888 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
5889 (bfd_elf_set_dt_needed_soname): Delete.
5890 (bfd_elf_set_dyn_lib_class): New function.
5891 * elflink.h (add_dt_needed_tag): New function. Split out from..
5892 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
5893 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
5894 initialization of soname.
5895 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
5896 elf_dt_soname.
5897 * bfd-in.h (enum dynamic_lib_link_class): New.
5898 (bfd_elf_set_dt_needed_soname): Delete.
5899 (bfd_elf_set_dyn_lib_class): Declare.
5900 * bfd-in2.h: Regenerate.
5901
79349b09
AM
5902 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
5903 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
5904 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
5905 symbol loop. Instead use add_needed to flag tag as written.
5906
d13d89fa
NS
59072004-03-17 Nathan Sidwell <nathan@codesourcery.com>
5908
5909 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
5910 logic for null_input_bfd detection.
5911
9183ed4b
AM
59122004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5913
5914 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
5915
021d7868
MK
59162004-03-16 Mark Kettenis <kettenis@gnu.org>
5917
5918 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
5919 code.
5920
51992aec
AM
59212004-03-16 Alan Modra <amodra@bigpond.net.au>
5922
5923 * elflink.c (elf_link_read_relocs_from_section): Don't use
5924 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
5925 (_bfd_elf_link_read_relocs): ..to here.
5926 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
5927
ccba357f
AM
59282004-03-16 Alan Modra <amodra@bigpond.net.au>
5929
5930 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
5931 values selected in configure.host. Require both to be defined
5932 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
5933 corresponding BFD_HOST vars with quotes.
5934 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
5935 Always require BFD_HOST_64_BIT_DEFINED.
5936 <file_ptr type>: Find off_t size before emitting message. Combine
5937 off_t and ftello64 conditional.
5938 * configure: Regenerate.
5939
41978308
AM
59402004-03-16 Alan Modra <amodra@bigpond.net.au>
5941
5942 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
5943 aliasing warning. Remove trailing whitespace throughout file.
5944
d63b5ed9
DA
59452004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5946
5947 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
5948 input_section in calls to get_dyn_name.
5949 * 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
5950 local symbols.
5951 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
5952
8ce8c090
AM
59532004-03-15 Alan Modra <amodra@bigpond.net.au>
5954
5955 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
5956 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
5957 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
5958 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
5959 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
5960 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
5961 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
5962 when using long.
5963 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
5964 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
5965 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
5966 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
5967 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
5968 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
5969 (read_8_bytes, read_indirect_string, read_address): Likewise.
5970 (read_abbrevs, parse_comp_unit): Likewise.
5971 * targets.c (struct bfd_target): Likewise.
5972 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
5973 * hppabsd-core.c: Likewise. Formatting.
5974 * hpux-core.c: Likewise.
5975 * irix-core.c: Likewise.
5976 * netbsd-core.c: Likewise.
5977 * osf-core.c: Likewise.
5978 * ptrace-core.c: Likewise.
5979 * sco5-core.c: Likewise.
5980 * trad-core.c: Likewise.
5981 * configure: Regenerate.
5982 * bfd-in2.h: Regenerate.
5983
edeb6e24
AM
59842004-03-15 Alan Modra <amodra@bigpond.net.au>
5985
5986 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
5987 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
5988 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
5989 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
5990 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
5991 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
5992 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
5993 * libbfd.c: Likewise in function definitions.
5994 (bfd_put_8): Mask with 0xff rather than casting to char.
5995 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
5996 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
5997 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
5998 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
5999 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
6000 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
6001 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
6002 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
6003 (H_GET_64, H_GET_32, H_GET_16): Likewise.
6004 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
6005 * archive.c (do_slurp_coff_armap): Update swap prototype.
6006 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
6007 (tic54x_getl_signed_32): Likewise.
6008 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
6009 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
6010 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
6011 (bfd_getp_signed_32, bfd_putp32): Likewise.
6012 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
6013 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
6014 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
6015 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
6016 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
6017 bfd_h_getx_signed_16, bfd_h_putx16.
6018 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
6019 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
6020 * hpux-core.c: Likewise.
6021 * irix-core.c: Likewise.
6022 * netbsd-core.c: Likewise.
6023 * osf-core.c: Likewise.
6024 * ptrace-core.c: Likewise.
6025 * sco5-core.c: Likewise.
6026 * trad-core.c: Likewise.
6027 * bfd-in2.h: Regenerate.
6028
c1b954e2
AM
60292004-03-15 Matt Thomas <matt@3am-software.com>
6030
6031 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
6032 selected.
6033
85cfd8d3
MK
60342004-03-13 Mark Kettenis <kettenis@gnu.org>
6035
6036 * config.bfd: Add x86_64-*-openbsd*.
6037 * configure.in (x86_64-*-openbsd*): Set COREFILE to
6038 netbsd-core.lo.
6039 * configure: Regenerate.
6040
d1f161ea
NC
60412004-03-12 Nick Clifton <nickc@redhat.com>
6042 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 6043
d1f161ea
NC
6044 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
6045 if the input bfd does not contain any code.
6046
8b6f2683
JW
60472004-03-09 Steve Ellcey <sje@cup.hp.com>
6048
6049 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
6050
79cda7cf
FF
60512004-03-05 Fred Fish <fnf@redhat.com>
6052
6053 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
6054 mips16 symbols to be even rather than testing first for even/odd.
6055 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
6056
e5caec89
NS
60572004-03-05 Nathan Sidwell <nathan@codesourcery.com>
6058
6059 * elf.c (map_sections_to_segments): Ignore .tbss sections for
6060 layout purposes.
6061
02bb6eae
AO
60622004-03-03 Alexandre Oliva <aoliva@redhat.com>
6063
6064 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
6065 undefined symbols as hash_new.
6066
ae51a426
JR
60672003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
6068
6069 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
6070 * cpu-sh.c: Ditto.
6071 * elf32-sh.c: Ditto.
6072 * bfd-in2.h: Regenerate.
6073
3b712a1a
AO
60742004-03-02 Alexandre Oliva <aoliva@redhat.com>
6075
6076 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
6077 dynrelocs.
6078 (_frv_count_got_plt_entries): Initialize them.
6079 (frv_pic_relocs_info_find): Add insert argument. Adjust all
6080 callers.
6081 (frv_pic_relocs_info_for_global): Likewise.
6082 (frv_pic_relocs_info_for_local): Likewise.
6083 (frv_pic_merge_early_relocs_info): New.
6084 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
6085 another.
6086 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
6087 Check that we don't exceed the allocated count for entry.
6088 (_frv_add_rofixup): Likewise.
6089 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
6090 (elf32_frv_finish_dynamic_sections): Improve error message in case
6091 we emit too few rofixup entries.
6092
676a64f4
RS
60932004-03-01 Richard Sandiford <rsandifo@redhat.com>
6094
6095 * archures.c (bfd_mach_fr450): New.
6096 * bfd-in2.h: Regenerate.
6097 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
6098 (arch_info_500): Link to it.
6099 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
6100 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
6101 (frv_elf_arch_extension_p): New function.
6102 (frv_elf_merge_private_bfd_data): Use it.
6103
0ad989f9
L
61042004-02-28 H.J. Lu <hongjiu.lu@intel.com>
6105
6106 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
6107
6108 * elflink.h (is_global_data_symbol_definition): Moved to
6109 elflink.c.
6110 (elf_link_is_defined_archive_symbol): Likewise.
6111 (elf_link_add_archive_symbols): Likewise. Renamed to
6112 _bfd_elf_link_add_archive_symbols.
6113
6114 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
6115 of ELF symbol table entry from backend.
6116 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
6117 instead of elf_link_add_object_symbols.
6118
ec3391e7
AO
61192004-02-27 Alexandre Oliva <aoliva@redhat.com>
6120
6121 * elf-bfd.h (struct elf_backend_data): Added
6122 elf_backend_can_make_relative_eh_frame,
6123 elf_backend_can_make_lsda_relative_eh_frame and
6124 elf_backend_encode_eh_address.
6125 (_bfd_elf_encode_eh_address): Declare.
6126 (_bfd_elf_can_make_relative): Declare.
6127 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
6128 hooks to decide whether to attempt to make_relative and
6129 make_lsda_relative.
6130 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
6131 (_bfd_elf_can_make_relative): New.
6132 (_bfd_elf_encode_eh_address): New.
6133 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
6134 (frv_elf_encode_eh_address): New.
6135 (elf_backend_can_make_relative_eh_frame): Define.
6136 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6137 (elf_backend_encode_eh_address): Define.
6138 * elfxx-target.h
6139 (elf_backend_can_make_relative_eh_frame): Define.
6140 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6141 (elf_backend_encode_eh_address): Define.
6142 (elfNN_bed): Add them.
6143
e6deed0a
AO
61442004-02-27 Alexandre Oliva <aoliva@redhat.com>
6145
6146 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
6147 complain_on_overflow to signed.
6148
b60d7a1a
L
61492004-02-27 H.J. Lu <hongjiu.lu@intel.com>
6150
6151 * elflink.h (sort_symbol): New.
6152 (elf_link_add_object_symbols): Use a sorted symbol array for
6153 weakdef.
6154
1c3ff0f2
MS
61552004-02-27 Jakub Jelinek <jakub@redhat.com>
6156
6157 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6158 for pc relative relocs.
6159 (elf_s390_relocate_section): Likewise.
6160 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6161 for pc relative relocs.
6162 (elf_s390_relocate_section): Likewise.
6163
de9811af
L
61642004-02-26 H.J. Lu <hongjiu.lu@intel.com>
6165
6166 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
6167 count_dyn_reloc.
6168
ac33696c
L
61692004-02-25 H.J. Lu <hongjiu.lu@intel.com>
6170
6171 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
6172 field to track if a relocation is against readonly section.
6173 (count_dyn_reloc): Take a new argument for rent->reltext.
6174 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
6175 (get_reloc_section): Don't set ia64_info->reltext here.
6176 (allocate_dynrel_entries): Set ia64_info->reltext here.
6177
072c8903
AO
61782004-02-24 Alexandre Oliva <aoliva@redhat.com>
6179
6180 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
6181 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
6182 function's descriptor to symbol+offset, and map local undefweak
6183 symbol to NULL function descriptor.
6184 (elf32_frv_relocate_section): Likewise.
6185
aca305d9
NC
61862004-02-23 Mark Kettenis <kettenis@gnu.org>
6187
6188 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
6189 M_X86_64_NETBSD.
6190 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
6191 (netbsd_core_file_p): Set architecture from machine ID for
6192 selected machines.
6193
646411fb
JJ
61942004-02-23 Jakub Jelinek <jakub@redhat.com>
6195
6196 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
6197 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
6198
1de1a317
L
61992004-02-21 H.J. Lu <hongjiu.lu@intel.com>
6200
6201 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
6202 symbols with non-default visibility.
6203
3c9d0484
DS
62042004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
6205
6206 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
6207 IMAGE_SCN_MEM_WRITE on known sections only.
6208
a876ecf9
JJ
62092004-02-20 Jakub Jelinek <jakub@redhat.com>
6210
6211 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
6212 symbols used in PIE relocs.
6213
a8a6d7ce
JJ
62142004-02-19 Jakub Jelinek <jakub@redhat.com>
6215
6216 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
6217 .plt sh_entsize.
6218
d080fcd2
DJ
62192004-02-18 Daniel Jacobowitz <drow@mvista.com>
6220
6221 * configure.in: Update version to 2.15.90.
6222 * configure: Regenerate.
6223
d25aed71 62242004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 6225 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
6226
6227 * elfxx-mips.c (mips_elf_calculate_relocation): Use
6228 _bfd_elf_symbol_refs_local_p to decide whether to decay
6229 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
6230 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
6231 relocs if the symbol wasn't defined by a regular object file.
6232 Don't check the symbol's dynindx.
6233
d7ce59e3
AC
62342004-02-16 Andrew Cagney <cagney@redhat.com>
6235
6236 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
6237 @bfd_file_ptr@.
6238 * bfd-in2.h: Re-generate.
6239
ca0b7686
AC
62402004-02-14 Andrew Cagney <cagney@redhat.com>
6241
6242 * configure.host (HDEFINES): When hppa*-*-hpux*, define
6243 _LARGEFILE64_SOURCE.
6244
340b6d91
AC
62452004-02-13 Andrew Cagney <cagney@redhat.com>
6246
6247 * elf.c (vma_page_aligned_bias): New function.
6248 (assign_file_positions_except_relocs)
6249 (assign_file_positions_for_segments): Replace broken modulo
6250 arithmetic with call to vma_page_aligned_bias.
6251
1012372a
AC
62522004-02-11 Andrew Cagney <cagney@redhat.com>
6253
7c192733
AC
6254 * bfd-in.h: Update copyright.
6255 (bfd_tell): Change return type to file_ptr.
6256 * bfd-in2.h: Re-generate.
6257 * cache.c: Update copyright.
6258 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
6259 parameter.
6260 (close_one): Use real_ftell.
6261 * bfdio.c: Update copyright.
6262 (real_ftell, real_fseek): New functions.
6263 (bfd_tell): Use real_fseek and real_ftell, change return type to
6264 file_ptr.
6265 (bfd_seek): Use real_ftell and real_fseek, change type of
6266 file_position to a file_ptr.
6267 * libbfd-in.h: Update copyright.
6268 (real_ftell, real_fseek): Declare.
6269 * libbfd.h: Re-generate.
6270
1012372a
AC
6271 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
6272 fseeko and fseeko64. Determine bfd_file_ptr.
6273 * configure: Re-generate.
c1ea0c09 6274 * config.in: Re-generate.
c1b954e2 6275
3255318a
NC
62762004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
6277
6278 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
6279 * elf32-h8300.c: Likewise.
6280
0d5f9994
NC
62812004-02-09 Christian Vogel <vogelchr@vogel.cx>
6282 Nick Clifton <nickc@redhat.com>
6283
6284 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
6285 GOT entries with no associated GOT subsection.
6286
174fd7f9
RS
62872004-02-09 Richard Sandiford <rsandifo@redhat.com>
6288
6289 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
6290 * elf.c (swap_out_syms): Use it to decide whether local section
6291 symbols should be named.
6292 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
6293 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
6294 (elf_backend_name_local_section_symbols): Define.
6295 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
6296
03609792
L
62972004-01-30 H.J. Lu <hongjiu.lu@intel.com>
6298
6299 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
6300 (elfNN_ia64_relax_section): Optimize brl to br during the relax
6301 finalize pass.
6302
ea01195e
AO
63032004-01-30 Alexandre Oliva <aoliva@redhat.com>
6304
6305 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
6306 to bfd_link_hash_entry passed by reference to
6307 _bfd_generic_link_add_one_symbol.
6308
838e70c5
L
63092004-01-25 H.J. Lu <hongjiu.lu@intel.com>
6310
6311 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
6312 relocations against dynamic symbols.
6313
4f199be3
DJ
63142004-01-23 Daniel Jacobowitz <drow@mvista.com>
6315
6316 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
6317 change.
6318
28d39d1a
NC
63192004-01-21 Tom Rix <tcrix@worldnet.att.net>
6320
6321 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
6322 * bfd-in2.h, libbfd.h: Rebuilt.
6323
66bed356
DS
63242004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
6325
6326 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
6327 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
6328 flag has been cleared.
6329
7e89635a
KH
63302004-01-19 Kazu Hirata <kazu@cs.umass.edu>
6331
6332 * coff-h8300.c: Add and adjust comments about relaxation.
6333 * elf32-h8300.c: Likewise.
6334
e804e836
KH
63352004-01-16 Kazu Hirata <kazu@cs.umass.edu>
6336
6337 * coff-h8300.c: Fix comment typos.
6338 * elf32-h8300.c: Likewise.
6339
630a7b0a
KH
63402004-01-16 Kazu Hirata <kazu@cs.umass.edu>
6341
6342 * coff-h8300.c: Add comments about relaxation.
6343 * elf32-h8300.c: Likewise.
6344
f8b73030
MR
63452004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6346
6347 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
6348 throughout.
6349 * aclocal.m4: Regenerate.
6350 * configure: Regenerate.
6351
32159579
ILT
63522004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
6353
6354 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
6355 mips_elf64_rtype_to_howto instead of using howto_table.
6356
c84cd8ee
DJ
63572004-01-13 Daniel Jacobowitz <drow@mvista.com>
6358
6359 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
6360 the .plt section.
6361 (elf32_arm_check_relocs): Don't increment the PLT refcount for
6362 relocs which would not use the PLT.
6363
680a3378
AM
63642004-01-13 Alan Modra <amodra@bigpond.net.au>
6365
6366 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
6367 (ppc64_elf_gc_sweep_hook): Likewise.
6368 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
6369
faca21e5
NC
63702004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
6371
6372 Adds linker relaxation support for bit manipulation insns like
680a3378 6373 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 6374 bst, btst, bxor.
680a3378 6375 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 6376 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 6377 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
6378 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
6379
818a27ac
AM
63802004-01-12 Alan Modra <amodra@bigpond.net.au>
6381
6382 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
6383
96ef1419
KH
63842004-01-11 Kazu Hirata <kazu@cs.umass.edu>
6385
6386 * elf32-h8300.c: Fix formatting.
6387
babfd660
KH
63882004-01-11 Kazu Hirata <kazu@cs.umass.edu>
6389
6390 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
6391 dynamic object is present. Declare r_symndx and h in an inner
6392 scope.
6393 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
6394
7359ea65
DJ
63952004-01-09 Daniel Jacobowitz <drow@mvista.com>
6396
6397 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
6398 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
6399 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
6400 identically. Do not emit PC24 relocations for shared libraries.
6401 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
6402 identically. Don't adjust pc_count.
6403 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
6404 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
6405 adjust count for branch relocations.
6406 (allocate_dynrelocs): Correct typo in call to
6407 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
6408 PC24 or PLT32 relocs when linking.
6409
44e88952
NC
64102004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
6411
6412 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
6413 relocation howto with ARM_26 one for consistency.
6414 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
6415 that will be converted to ARM_26D ones, since we always want 'done'
6416 relocations to be reflected in section's data.
6417 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
6418 offset.
6419 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
6420 requested.
6421
1e7fef1d
NC
64222004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
6423
6424 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
6425 are not partial_inplace during a relocatable link.
6426
4f075348
KH
64272004-01-08 Kazu Hirata <kazu@cs.umass.edu>
6428
babfd660 6429 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
6430 if no dynamic object is present. Declare r_symndx and h in an
6431 inner scope.
6432
de0d9f33
L
64332004-01-07 H.J. Lu <hongjiu.lu@intel.com>
6434
6435 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
6436 trampoline if it is known out of range.
6437
51532845
AO
64382004-01-06 Alexandre Oliva <aoliva@redhat.com>
6439
6440 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
6441 * elf32-frv.c (_frv_osec_readonly_p): New.
6442 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
6443 undefweak symbol.
6444 (_frv_count_got_plt_entries): Adjust expected count accordingly.
6445 (elf32_frv_relocate_section): Likewise. Error out if attempting
6446 to emit rofixups or dynamic relocs in read-only segments. Use
6447 _bfd_elf_section_offset to adjust r_offsets in rofixups and
6448 dynamic relocations.
6449 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
6450 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
6451 relocations or fixups involving merged sections correctly. Avoid
6452 crash when undefined symbol is referenced by R_FRV_32 or
6453 R_FRV_FUNCDESC_VALUE.
6454 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
6455 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
6456 input section holding local symbol to addend of R_FRV_32 or
6457 R_FRV_FUNCDESC_VALUE dynamic relocation.
6458 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
6459 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
6460 (elf32_frv_always_size_sections): Don't store pointer to
6461 __stacksize symbol in sec_info.
6462 (elf32_frv_modify_segment_map): Look it up here.
6463 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
6464 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
6465 of the lazy PLT entry, not only its offset, as the low word of a
6466 function descriptor.
6467 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
6468 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
6469 if a hash table entry already exists but is not a definition.
6470 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
6471 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
6472 (_frv_add_rofixup): Don't inline.
6473 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
6474 for undefweak symbols.
6475 (elf32_frv_relocate_section): Avoid crash while computing
6476 relocation when linking with shared library. Only emit rofixups
6477 and dynamic relocations for alloc&load sections. Mark binaries
6478 with inter-segment relocations for relocation as a unit.
6479 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
6480 (DEFAULT_STACK_SIZE): New.
6481 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
6482 emit rofixups or dynamic relocs when linking dynamic non-PIE
6483 executables.
6484 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
6485 shared libs too. Reserve the last entry for the GOT pointer.
6486 (elf32_frv_finish_dynamic_sections): Emit it.
6487 (elf32_frv_always_size_sections): New.
6488 (elf32_frv_modify_segment_map): New.
6489 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
6490 sections.
6491 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
6492 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
6493 (elf_backend_always_size_sections): New.
6494 (elf_backend_modify_segment_map): New.
6495 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
6496 * config.bfd: Added frv-*-*linux*.
6497 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
6498 ABS section, instead of crashing.
6499 (elf32_frv_relocate_section): Don't crash before warning about
6500 different segments in non-PIC relocation.
6501 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
6502 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
6503 relocs to undefweak symbols.
6504 (elf32_frv_relocate_section): Ditto for undefined symbols.
6505 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
6506 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
6507 gotfixup section was created.
6508 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
6509 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
6510 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
6511 complain_overflow_signed.
6512 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
6513 have not been allocated.
6514 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
6515 privfd only if dynamic sections were created.
6516 (elf32_frv_relocate_section): Compute gprel_segment, and use it
6517 for GPREL relocs. When linking relocatable FDPIC executables,
6518 emit warnings for relocations that would be illegal on PIE or
6519 shared libraries. Emit rofixup for R_FRV_32 only if input object
6520 is not FDPIC.
6521 (_frv_create_got_section): Define _gp symbol in the rofixup
6522 section.
6523 (elf32_frv_finish_dynamic_sections): If rofixups needed but
6524 dynamic sections missing, error out requesting -melf32frvfd.
6525 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
6526 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
6527 computation of addends from section and global or local symbol
6528 value. Change return type to bfd_boolean, and return a failure if
6529 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
6530 nonzero addend is required.
6531 (elf32_frv_relocate_section): Likewise. Print error for
6532 unsupported nonzero addends.
6533 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
6534 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
6535 force everything local.
6536 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
6537 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
6538 (frv_gotfixup_section): New.
6539 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
6540 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
6541 and relocsfdv.
6542 (_frv_add_rofixup): New.
6543 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
6544 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
6545 improve some ugly conditions.
6546 (elf32_frv_relocate_section): Likewise. Reject inter-segment
6547 relocations in fdpic.
6548 (_frv_create_got_section): Create .rofixup.got section.
6549 (struct _frv_dynamic_got_info): Added fixups.
6550 (_frv_count_got_plt_entries): Account in-GOT relocations into
6551 relocs32, relocsfd and relocsfdv. Account them into relocs or
6552 fixups, as appropriate.
6553 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
6554 sizing of gotrel.
6555 (elf32_frv_finish_dynamic_sections): Verify that the right number
6556 of relocations and fixups was generated.
6557 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
6558 relocsfdv.
6559 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
6560 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
6561 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
6562 descriptor of a (formerly-)global symbol is local.
6563 (struct frv_pic_relocs_info): Adjust comments.
6564 (_frv_emit_got_relocs_plt_entries): Adjust.
6565 (elf32_frv_relocate_section): Likewise.
6566 (_frv_count_got_plt_entries): Likewise.
6567 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
6568 symbol's value to addend in the common preamble. Decay dynamic
6569 symbols to section+offset if they bind or call locally, for GOT
6570 and FUNCDESC_VALUE, respectively.
6571 (elf32_frv_relocate_section): Likewise.
6572 (elf32_frv_check_relocs): Don't register as dynamic symbols of
6573 internal or hidden visibility.
6574 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
6575 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
6576 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
6577 (elf32_frv_relocate_section): Pass relocation addend in. Use
6578 original relocation addend to look up the got relocs/plt entries
6579 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
6580 processing relocations that reference .scommon symbols.
6581 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
6582 Introduce support for dynamic linking.
6583 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
6584 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
6585 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
6586 (frv_reloc_type_lookup): Return REL howtos for executables and
6587 dynamic libraries.
6588 (frv_info_to_howto_rel): New.
6589 (struct frv_elf_link_hash_table): New.
6590 (frv_hash_table, frv_got_section, frv_gotrel_section,
6591 frv_plt_section, frv_pltrel_section, frv_relocs_info,
6592 frv_got_initial_offset, frv_plt_initial_offset): New macros.
6593 (frv_elf_link_hash_table_create): New.
6594 (struct frv_pic_relocs_info): New.
6595 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
6596 (frv_pic_relocs_info_find): New.
6597 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
6598 New.
6599 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
6600 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
6601 (_frv_emit_got_relocs_plt_entries): New.
6602 (elf32_frv_relocate_section): Add support for dynamic linking.
6603 Handle new relocations.
6604 (_frv_create_got_section): New.
6605 (elf32_frv_create_dynamic_sections): New.
6606 (ELF_DYNAMIC_INTERPRETER): New.
6607 (struct _frv_dynamic_got_info): New.
6608 (_frv_count_got_plt_entries): New.
6609 (struct _frv_dynamic_got_plt_info): New.
6610 (_frv_compute_got_alloc_data): New.
6611 (_frv_get_got_entry, _frv_get_fd_entry): New.
6612 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
6613 (_frv_resolve_final_relocs_info): New.
6614 (elf32_frv_size_dynamic_sections): New.
6615 (elf32_frv_finish_dynamic_sections): New.
6616 (elf32_frv_adjust_dynamic_symbol): New.
6617 (elf32_frv_finish_dynamic_symbol): New.
6618 (elf32_frv_check_relocs): Handle new relocs. Explain how the
6619 whole thing works.
6620 (elf_info_to_howto_rel): Define.
6621 (bfd_elf32_bfd_link_hash_table_create): Define.
6622 (elf_backend_create_dynamic_sections): Define.
6623 (elf_backend_adjust_dynamic_symbol): Define.
6624 (elf_backend_size_dynamic_sections): Define.
6625 (elf_backend_finish_dynamic_symbol): Define.
6626 (elf_backend_finish_dynamic_sections): Define.
6627 (elf_backend_want_got_sym): Define.
6628 (elf_backend_got_header_size): Define.
6629 (elf_backend_want_got_plt): Define.
6630 (elf_backend_plt_readonly): Define.
6631 (elf_backend_want_plt_sym): Define.
6632 (elf_backend_plt_header_size): Define.
6633 (elf_backend_may_use_rel_p): Define.
6634 (elf_backend_may_use_rela_p): Define.
6635 (elf_backend_default_use_rela_p): Define.
6636 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
6637 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
6638 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
6639 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
6640 (frv_reloc_map): Map the corresponding BFD relocs to them.
6641 (frv_reloc_type_lookup): ... and back to BFD relocs.
6642 * reloc.c: New relocs.
6643 * bfd-in2.h, libbfd.h: Rebuilt.
6644 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
6645 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
6646 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
6647 R_FRV_FUNCDESC_GOTLO): New.
6648 (frv_reloc_map): Map the corresponding BFD relocs to them.
6649 (frv_reloc_type_lookup): ... and back to BFD relocs.
6650 * reloc.c: New relocs.
6651 * bfd-in2.h, libbfd.h: Rebuilt.
6652
4301eeb1
MR
66532004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6654
6655 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6656 targets to support pages of up to 64kB.
6657 (elf32_bed): Redefine to get a separate backend data structure for
6658 traditional targets.
6659 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6660 targets to support pages of up to 64kB.
6661 (elf64_bed): Redefine to get a separate backend data structure for
6662 traditional targets.
6663 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
6664 targets to support pages of up to 64kB.
6665 (elf32_bed): Redefine to get a separate backend data structure for
6666 traditional targets.
6667
0647ed71
MK
66682004-01-04 Mark Kettenis <kettenis@gnu.org>
6669
6670 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
6671
61adc1a4
NC
66722004-01-02 Mark Kettenis <kettenis@gnu.org>
6673
6674 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
6675 (elf_i386_grok_psinfo): Likewise.
6676
b50c15dc
NC
66772004-01-02 Bernardo Innocenti <bernie@develer.com>
6678
6679 * config.bfd: Add m68k-uClinux target.
6680
2627de83
AM
66812004-01-01 Grant Edwards <grante@visi.com>
6682
6683 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
6684 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
6685 (elf32_h8_gc_sweep_hook): New function.
6686 (elf_backend_gc_mark_hook): Define.
6687 (elf_backend_gc_sweep_hook): Define.
6688 (elf_backend_can_gc_sections): Define.
6689
c9e214e5 6690For older changes see ChangeLog-0203
56882138
AM
6691\f
6692Local Variables:
6693mode: change-log
6694left-margin: 8
6695fill-column: 74
6696version-control: never
6697End:
This page took 0.59159 seconds and 4 git commands to generate.