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