]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
2003-01-30 Michael Chastain <mec@shout.net>
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
38985a1c
AO
12003-01-29 Alexandre Oliva <aoliva@redhat.com>
2
3 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4 entry->abfd when it's NULL.
5
4bb9a95f
AO
62003-01-27 Alexandre Oliva <aoliva@redhat.com>
7
8 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
9 _bfd_elf_section_offset returning -2 the same way as -1.
10
f4416af6
AO
11 * elfxx-mips.c (mips_elf_multi_got): New function.
12 (struct mips_got_entry): Make symndx and gotidx signed. Moved
13 addend into union along with address and link hash entry.
14 (struct mips_got_info): Added bfd2got and next.
15 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
16 (mips_elf_got_section, mips_elf_create_got_section): Use
17 SEC_EXCLUDE bit to tell whether we really need the got
18 section. Take boolean arguments to disregard an excluded
19 section, or to create it as excluded. Adjust all callers.
20 Use mips_elf_got_section all over.
21 (mips_elf_local_got_index, mips_elf_got_page,
22 mips_elf_got16_entry): Take input bfd as argument, and pass it
23 on to mips_elf_create_local_got_entry.
24 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
25 Take input bfd as argument, and manage entries in the
26 appropriate GOT.
27 (mips_elf_got_offset_from_index): Take input bfd as argument,
28 and use it to adjust the GP offset of the bfd.
29 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
30 unreferenced GOT entries of global symbols to the end.
31 (mips_elf_record_global_got_symbol): Take input bfd as
32 argument. Add entries to the master GOT hash table.
33 (struct mips_elf_bfd2got_hash): New.
34 (struct mips_elf_got_per_bfd_arg): New.
35 (struct mips_elf_set_global_got_offset_arg): New.
36 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
37 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
38 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
39 mips_elf_merge_gots, mips_elf_set_global_got_offset,
40 mips_elf_resolve_final_got_entry,
41 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
42 mips_elf_got_for_ibfd): New functions.
43 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
44 (MIPS_ELF_GOT_MAX_SIZE): New macro.
45 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
46 (mips_elf_got_entry_hash): Take new fields into account. Use
47 mips_elf_hash_bfd_vma.
48 (mips_elf_got_entry_eq): Take new fields into account.
49 (mips_elf_create_got_section): Initialize new fields.
50 (mips_elf_calculate_relocation): Pass input_bfd to functions
51 that now take it. Adjust gp for the input_bfd.
52 (mips_elf_allocate_dynamic_relocation,
53 mips_elf_create_dynamic_relocation,
54 _bfd_mips_elf_create_dynamic_sections): Use...
55 (mips_elf_rel_dyn_section): New function. Borrow code from...
56 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
57 now take it. Create the got section if needed, even if
58 excluded, before recording a global got symbol. Move some
59 code to...
60 (mips_elf_record_local_got_symbol): New fn.
61 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
62 Compute multi-got global entries offsets. Move GOT code to...
63 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
64 if the GOT is too big.
65 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
66 undefweak symbol to zero. Generate dynamic relocations for
67 non-primary GOT entries for global symbols.
68 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
69 case. Generate dynamic relocations for local got entries.
70 Sort dynamic relocations on N64 too, using...
71 (sort_dynamic_relocs_64): New fns.
72 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
73 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
74
52b69c9e
AO
752003-01-27 Alexandre Oliva <aoliva@redhat.com>
76
77 * bfd.c (struct _bfd): Added id field.
78 * opncls.c (_bfd_id_counter): New static variable.
79 (_bfd_new_bfd): Use it.
80 * bfd-in2.h: Rebuilt.
81
71e5db1c
AM
822003-01-25 Alan Modra <amodra@bigpond.net.au>
83
84 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
85
b9734f35
JJ
862003-01-25 Jakub Jelinek <jakub@redhat.com>
87
88 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
89 (elf32_sparc_rev32_howto): New variable.
90 (sparc_reloc_map): Add TLS relocs.
91 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
92 Handle REV32.
93 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
94 New functions.
95 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
96 struct elf32_sparc_link_hash_table):
97 New structures.
98 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
99 elf32_sparc_hash_table): Define.
100 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
101 create_got_section, elf32_sparc_create_dynamic_sections,
102 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
103 functions.
104 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
105 reference counting.
106 (elf32_sparc_gc_sweep_hook): Likewise.
107 (elf32_sparc_adjust_dynamic_symbol): Likewise.
108 (elf32_sparc_size_dynamic_sections): Likewise.
109 (elf32_sparc_relocate_section): Likewise.
110 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
111 New functions.
112 (elf32_sparc_object_p): Allocate backend private object data.
113 (bfd_elf32_bfd_link_hash_table_create,
114 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
115 elf_backend_can_refcount): Define.
116 (elf_backend_create_dynamic_sections): Define to
117 elf32_sparc_create_dynamic_sections.
118 * reloc.c: Add SPARC TLS relocs.
119 * bfd-in2.h, libbfd.h: Rebuilt.
120 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
121 (sparc_reloc_map): Likewise.
122
69fc87f1
MS
1232003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
124
125 * bfd-in2.h: Regenerate.
126 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
127 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
128 (elf_howto_table): Add TLS relocs.
129 (elf_s390_reloc_type_lookup): Likewise.
130 (elf_s390_link_hash_entry): Add tls_type.
131 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
132 New macros.
133 (elf_s390_link_hash_table): Add tls_ldm_got.
134 (link_hash_newfunc): Initialize tls_type.
135 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
136 (elf_s390_copy_indirect_symbol): Copy tls_type information.
137 (elf_s390_check_relocs): Support TLS relocs.
138 (elf_s390_gc_sweep_hook): Likewise.
139 (allocate_dynrelocs): Likewise.
140 (elf_s390_size_dynamic_sections): Likewise.
141 (elf_s390_relocate_section): Likewise.
142 (elf_s390_finish_dynamic_symbol): Likewise.
143 (bfd_elf32_mkobject): Define for TLS.
144 * elf64-s390.c: Same changes as for elf32-s390.c.
145 * libbfd.h: Regenerate.
146 * reloc.c: Add s390 TLS relocations.
147
9aa4e505
NC
1482003-01-24 Charles Lepple clepple.ghz.cc
149
150 * aclocal.m4: Fix name of --enable-install-libbfd switch.
151
5177500f
NC
1522003-01-23 Nick Clifton <nickc@redhat.com>
153
154 * Add sh2e support:
155
156 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
157
158 * archures.c (bfd_mach_sh2e): Added.
159 * bfd-in2.h: Rebuilt.
160 * cpu-sh.c (arch_info_struct): Added SH2e.
161 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
162
f0abc2a1
AM
1632003-01-23 Alan Modra <amodra@bigpond.net.au>
164
165 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
166 dynindx to an int. Rearrange for better packing.
167 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
168 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
169 * elf32-sh64.h: New. Split out from include/elf/sh.h.
170 (struct _sh64_elf_section_data): New struct.
171 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
172 * elf32-sh64-com.c: Include elf32-sh64.h.
173 * elf32-sh64.c: Likewise.
174 (sh64_elf_new_section_hook): New function.
175 (bfd_elf32_new_section_hook): Define.
176 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
177 (sh64_bfd_elf_copy_private_section_data): Likewise.
178 (sh64_elf_final_write_processing): Likewise.
179 * elf32-sparc.c (struct elf32_sparc_section_data): New.
180 (elf32_sparc_new_section_hook): New function.
181 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
182 (sec_do_relax): Define.
183 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
184 (elf32_sparc_relocate_section): Likewise.
185 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
186 * elf64-mmix.c (struct _mmix_elf_section_data): New.
187 (mmix_elf_section_data): Define. Use throughout file.
188 (mmix_elf_new_section_hook): New function.
189 (bfd_elf64_new_section_hook): Define.
190 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
191 (ppc64_elf_section_data): Define. Use throughout.
192 (ppc64_elf_new_section_hook): New function.
193 (bfd_elf64_new_section_hook): Define.
194 * elf64-sparc.c (struct sparc64_elf_section_data): New.
195 (sparc64_elf_new_section_hook): New function.
196 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
197 (sec_do_relax): Define.
198 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
199 (sparc64_elf_relocate_section): Likewise.
200 (bfd_elf64_new_section_hook): Define.
201 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
202 * elfxx-mips.c (struct _mips_elf_section_data): New.
203 (mips_elf_section_data): Define. Use throughout.
204 (_bfd_mips_elf_new_section_hook): New function.
205 (mips_elf_create_got_section): Don't alloc used_by_bfd.
206 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
207 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
208 * Makefile.am: Run "make dep-am".
209 * Makefile.in: Regenerate.
210
cc03ec80
RH
2112003-01-21 Richard Henderson <rth@redhat.com>
212
213 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
214 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
215 (elf64_alpha_adjust_dynamic_symbol): Set them.
216 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
217 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
218 symbol index when relaxing LDM to TPREL.
219 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
220 relocs, even if the target isn't locally defined.
221 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
222 (elf64_alpha_relocate_section): Likewise. Force TP-relative
223 relocs vs symndx 0 to the tp base.
224
da896d3f
NC
2252003-01-21 Fabio Alemagna <falemagn@aros.org>
226
227 * config.bfd: Handle i[3456]86-*-aros*.
228
7fce784e
AS
2292003-01-21 Andreas Schwab <schwab@suse.de>
230
231 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
232 (struct ppc_elf_link_hash_entry): Define.
233 (ppc_elf_hash_entry): New function.
234 (struct ppc_elf_link_hash_table): Define.
235 (ppc_elf_hash_table): New function.
236 (ppc_elf_link_hash_newfunc): New function.
237 (ppc_elf_link_hash_table_create): New function.
238 (ppc_elf_copy_indirect_symbol): New function.
239 (allocate_dynrelocs): New function.
240 (readonly_dynrelocs): New function.
241 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
242 relocs and determine DT_TEXTREL.
243 (ppc_elf_check_relocs): Don't do that here, just count the
244 dynamic relocs.
245 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
246 removed section.
247 (bfd_elf32_bfd_link_hash_table_create): Define.
248 (elf_backend_copy_indirect_symbol): Define.
249
1bbc9cec
RH
2502003-01-21 Richard Henderson <rth@redhat.com>
251
252 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
253 TPREL also get a reloc if shared. Remove SREL support.
254 (elf64_alpha_emit_dynrel): New.
255 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
256 and GOTTPREL relocs to local symbols against the tp base.
257 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
258
259 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
260 use count before clobbering r_type.
261 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
262 ordering would mean dataflow inspection is necessary.
263
0da35f8b
SS
2642003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
265
266 * coffcode.h (coff_set_flags): Added get/set arch hooks.
267
571fe01f
NC
2682003-01-20 Fabio Alemagna <falemagn@aros.org>
269
270 * elf32-sh.c: Treat elfNN_bed like other macros defined in
271 elfxx-target.h and #undef it before #define'ing it.
272 * elf32-i386.c: Likewise.
273 * elf32-sh64.c: Likewise.
274 * elf64-alpha.c: Likewise.
275 * elf64-sh64.c: Likewise.
276
5236c819
MS
2772003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
278
279 * bfd-in2.h: Regenerate.
280 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
281 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
282 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
283 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
284 R_390_PLTOFF32 and R_390_PLTOFF64.
285 (elf_s390_reloc_type_lookup): Likewise.
286 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
287 of GOTPLT references to a function.
288 (link_hash_newfunc): Initialize gotplt_refcount.
289 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
290 and creation of the got section out of the main switch. Add support
291 for the gotoff, gotplt and pltoff relocations.
292 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
293 and pltoff.
294 (elf_s390_adjust_gotplt): New function.
295 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
296 plt entries.
297 (allocate_dynrelocs): Add comment.
298 (elf_s390_relocate_section): Change r_type to unsigned. Add support
299 for gotoff, gotplt and pltoff relocations.
300 * elf64-s390.c: Same changes as for elf32-s390.c.
301 * libbfd.h: Regenerate.
302 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
303 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
304 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
305 and BFD_RELOC_390_PLTOFF64.
306
a823975a
JJ
3072003-01-18 Jakub Jelinek <jakub@redhat.com>
308
309 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
310 R_IA64_TPREL64[LM]SB against non-global symbol properly.
311
b3dfd7fe
JJ
3122003-01-16 Jakub Jelinek <jakub@redhat.com>
313
314 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
315 self_dtpmod_done and self_dtpmod_offset.
316 (allocate_global_data_got): Only use one got entry for all
317 dtpmod relocs against local symbols.
318 (allocate_dynrel_entries): Only need .rela.got entry for
319 dtpmod against global symbol.
320 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
321 Reserve space in .rela.got for the local dtpmod entry.
322 (set_got_entry): Initialize the common local dtpmod .got entry.
323 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
324 and R_IA_64_DTPREL64MSB.
325
04c9666a
AM
3262003-01-16 Alan Modra <amodra@bigpond.net.au>
327
328 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
329 (R_PPC_*): Rename all occurrences to R_PPC64_*.
330 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
331 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
332 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
333 relative relocs, not with absolute ones.
334 * Makefile.am: Run "make dep-am".
335 * Makefile.in: Regenerate.
336 * po/SRC-POTFILES.in: Regenerate.
337
c87f1ff7
AS
3382003-01-15 Andreas Schwab <schwab@suse.de>
339
340 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
341 relocation against a non-allocated readonly section.
342
86bbe32f
AM
3432003-01-10 Alan Modra <amodra@bigpond.net.au>
344
345 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
346 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
347
32d95f29
KD
3482002-01-08 Klee Dienes <kdienes@apple.com>
349
350 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
351 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
352 * Makefile.in: Regenerate.
353
ab7d0aa0
AO
3542003-01-08 Alexandre Oliva <aoliva@redhat.com>
355
356 * elfn32-mips.c (prev_reloc_section): New.
357 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
358 (SET_RELOC_ADDEND): Parenthesize macro argument.
359
95d0f04a
DA
3602003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
361
362 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
363 adjust addil instructions if the symbol has no section.
364
5c9e189c
DD
3652003-01-07 DJ Delorie <dj@redhat.com>
366
367 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
368 partial_inplace.
369
3e829b4a
AS
3702003-01-07 Andreas Schwab <schwab@suse.de>
371
372 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
373 PC relative relocations.
374 (elf_m68k_discard_copies): Set it here instead.
375
a75473eb
SC
3762002-01-02 Ben Elliston <bje@redhat.com>
377 Jeff Johnston <jjohnstn@redhat.com>
378
379 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
380 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
381 (BFD32_BACKENDS): Add elf32-iq2000.lo.
382 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
383 (cpu-iq2000.lo): New target.
384 * Makefile.in: Regenerate.
385 * config.bfd: Handle iq2000-*-elf.
386 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
387 (bfd_archures_list): Add bfd_iq2000_arch.
388 * configure.in: Handle bfd_elf32_iq2000_vec.
389 * configure: Regenerate.
390 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
391 and BFD_RELOC_IQ2000_UHI16.
392 * targets.c (bfd_elf32_iq2000_vec): Declare.
393 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
394 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
395 * cpu-iq2000.c: New file.
396 * elf32-iq2000.c: Likewise.
397 * libbfd.h: Regenerate.
398 * bfd-in2.h: Likewise.
399
64543e1a
RS
4002003-01-02 Richard Sandiford <rsandifo@redhat.com>
401
402 * elfxx-mips.c: Include libiberty.h.
403 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
404 (mips_set_isa_flags): New function, split out from...
405 (_bfd_mips_elf_final_write_processing): ...here. Only call
406 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
407 (mips_mach_extensions): New array.
408 (mips_32bit_flags_p): New function.
409 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
410 Use mips_32bit_flags_p to check if one binary is 32-bit and the
411 other is 64-bit. When adopting IBFD's architecture, adopt the
412 bfd_mach as well as the flags.
413
4852a44e
NC
4142003-01-02 Nick Kelsey <nickk@ubicom.com>
415
416 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
417 fix internal errors, fix bad code generation, fix incorrect stabs
418 information, and improve ability to eliminate redundant page
419 instructions. Added code to ip2k_final_link_relocate to self-verify
420 the linker relaxation. Fix formatting problems.
421
af7ee8bf
CD
4222002-12-30 Chris Demetriou <cgd@broadcom.com>
423
424 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
425 * archures.c (bfd_mach_mipsisa32r2): New define.
426 * bfd-in2.h: Regenerate.
427 * cpu-mips.c (I_mipsisa32r2): New enum value.
428 (arch_info_struct): Add entry for I_mipsisa32r2.
429 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
430 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
431 (_bfd_mips_elf_final_write_processing): Add
432 bfd_mach_mipsisa32r2 case.
433 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
434 binaries marked as using MIPS32 Release 2.
435
2469cfa2
NC
4362002-12-30 Dmitry Diky <diwil@mail.ru>
437
438 * Makefile.am: Add msp430 target.
439 * configure.in: Likewise.
440 * Makefile.in: Regenerate.
441 * configure: Regenerate.
442 * archures.c: Add msp430 architecture vector.
443 * config.bfd: Likewise.
444 * reloc.c: Add msp430 relocs.
445 * targets.c: Add msp320 target.
446 * cpu-msp430.c: New file: msp430 cpu detection.
447 * elf32-msp430.c: New file: msp430 reloc processing.
448 * bfd-in2.h: Regenerate.
449 * libbfd.h: Regenerate.
450
eecdbe52
JJ
4512002-12-28 Jakub Jelinek <jakub@redhat.com>
452
453 * elf.c (elf_sort_sections): Don't reorder .tbss.
454 (assign_file_positions_for_segments): Only adjust off/voff
455 for increased alignment in PT_LOAD or PT_NOTE segment,
456 but adjust p_filesz for .tbss too. in PT_LOAD consider
457 .tbss to have zero memory size.
458 (copy_private_bfd_data) [SECTION_SIZE]: Define.
459 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
460 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
461 into PT_TLS segment. Never put SHF_TLS sections in
462 segments other than PT_TLS or PT_LOAD.
463
464 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
465 sh_entsize.
466
213e90f4
DD
4672002-12-23 DJ Delorie <dj@redhat.com>
468
469 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
470
75828352
AM
4712002-12-23 Alan Modra <amodra@bigpond.net.au>
472
473 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
474
312b768e
NC
4752002-12-23 Nick Clifton <nickc@redhat.com>
476
477 * archures.c (bfd_arch_get_compatible): Add third parameter
478 'accept_unknowns'. Only accept unknown format BFDs if
479 accept_unknowns is true, or if the format is "binary".
480 * bfd-in2.h: Regenerate.
481
63222ec9
NC
4822002-12-21 Nick Clifton <nickc@redhat.com>
483
484 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
485 that subtracted 8 from pc relative relocations.
486
19852a2a
KH
4872002-12-20 Kazu Hirata <kazu@cs.umass.edu>
488
489 * coff-h8300.c: Fix comment typos.
490 * coffcode.h: Likewise.
491 * cpu-cris.c: Likewise.
492 * elf32-vax.c: Likewise.
493 * genlink.h: Likewise.
494 * linker.c: Likewise.
495 * som.c: Likewise.
496 * tekhex.c: Likewise.
497 * vms-misc.c: Likewise.
498
5fd63999
DD
4992002-12-20 DJ Delorie <dj@redhat.com>
500
501 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
502 * libbfd.h: Regenerate.
503 * bfd-in2.h: Regenerate.
504 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
505 (xstormy16_reloc_map): Add R_XSTORMY16_12.
506
4ee79850
KH
5072002-12-19 Kazu Hirata <kazu@cs.umass.edu>
508
509 * doc/bfdint.texi: Fix typos.
510
66e25bab
AM
5112002-12-20 Paul Eggert <eggert@twinsun.com>
512
513 Port to POSIX 1003.1-2001.
514 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
515 * configure.in (build-warnings): Likewise.
516 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
517 * aclocal.m4: Regenerate.
518 * config.in: Regenerate.
519 * configure: Regenerate.
520
7dc77aaa
AM
5212002-12-19 Alan Modra <amodra@bigpond.net.au>
522
0171ee92
AM
523 * coff-h8300.c: Include libiberty.h.
524 (h8300_reloc16_extra_cases): Check the hash table creator before
525 referencing h8300 specific fields. Stash the hash table pointer
526 in a local var. Comment typo fixes.
527 (h8300_bfd_link_add_symbols): Likewise.
528
7dc77aaa
AM
529 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
530 dst_mask comments.
531 * bfd-in2.h: Regenerate.
532
47388f4c
AM
5332002-12-18 Alan Modra <amodra@bigpond.net.au>
534
535 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
536 code a little. Comment on dynamic relocs against section symbols.
537
1b3e3744
AM
5382002-12-17 Roger Sayle <roger@eyesopen.com>
539
540 * configure.host (ia64-*-hpux*): Support 64 bit targets using
541 the HP compiler's "long long".
542
46f2b541
DD
5432002-12-16 Andrew MacLeod <amacleod@redhat.com>
544
545 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
546 and R_XSTORMY16_HI16) howto entries.
547 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 548 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
549 determine the start of the second reloc table.
550
af738ea7
NC
5512002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
552
553 * ecofflink.c: Fix the reading of the debugging information
554 of Tru64/Alpha binaries that are produced by recent Compaq
555 compilers.
556 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
557 table.
558 (lookup_line): Because of the strange information sometimes
559 generated by Compaq's recent compilers, change how the FDR
560 table is searched so that PDRs (procedure descriptors) are
561 correctly found. Note that this change is really more of a hack;
562 however, I have included extensive documentation as to why
563 this is the best solution short of an extensive rewrite or
564 another hack.
565 (fdrtab_lookup): Add comments to explain the algorithm.
566
5354b572
AO
5672002-12-12 Alexandre Oliva <aoliva@redhat.com>
568
569 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
570 initializers to match struct declaration.
571
ab3acfbe
AM
5722002-12-12 Alan Modra <amodra@bigpond.net.au>
573
574 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
575 * elf.c (get_program_header_size): Likewise.
576 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
577 (m32r_elf_generic_reloc): Likewise.
578 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
579 * elflink.h (elf_bfd_discard_info): Likewise.
580
6348e046
AM
5812002-12-12 Alan Modra <amodra@bigpond.net.au>
582
583 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
584 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
585 DT_RELSZ adjustment, not output section. Avoid writing tags when
586 unchanged. Don't assume linker script is sane, adjust DT_REL too.
587 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
588 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
589 DT_RELASZ adjustment, not output section. Avoid writing tags when
590 unchanged. Adjust DT_RELA.
591 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
592 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
593
2e7a68a8
AO
5942002-12-12 Alexandre Oliva <aoliva@redhat.com>
595
596 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
597 addend by 4.
598
b15e6682
AO
5992002-12-12 Alexandre Oliva <aoliva@redhat.com>
600
601 * elfxx-mips.c (struct mips_got_entry): New.
602 (struct mips_got_info): Added got_entries field.
603 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
604 (mips_elf_local_got_index, mips_elf_got_page,
605 mips_elf_got16_entry): Re-implement in terms of new...
606 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
607 Change return type.
608 (mips_elf_highest): Warning clean-up.
609 (mips_elf_create_got_section): Initialize got_entries.
610 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
611 local got size.
612 (_bfd_mips_elf_size_dynamic_sections): Do not account for
613 GOT_PAGE entries, since we now reuse GOT16 entries.
614
e6af3a53
NC
6152002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
616
617 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
618 read-only section that lies after .text and before .data to be
619 written into the output file and included in a_text.
620 (translate_to_native_sym_flags): If an otherwise unrepresentable
621 section was merged with .text, convert its symbols to N_TEXT
622 symbols.
623 * libaout.h (aout_section_merge_with_text_p): New macro.
624
cf3d882d
AM
6252002-12-08 Alan Modra <amodra@bigpond.net.au>
626
627 * bfd-in.h: Comment typo fix. Formatting.
628 * bfd-in2.h: Regenerate.
629 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
630 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
631 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
632
2f9bd3f6
RH
6332002-12-05 Richard Henderson <rth@redhat.com>
634
635 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
636 Only send PCREL21B though the plt. Fix installed reloc type.
637 (elfNN_ia64_relocate_section): Give error for dynamic reloc
638 against PCREL22 or PCREL64I; clean up error messages for
639 branch relocs.
640
d0112f73
KB
6412002-12-04 Kevin Buettner <kevinb@redhat.com>
642
643 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
644 New functions.
645 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
646
c10d9d8f
JW
6472002-12-04 David Mosberger <davidm@hpl.hp.com>
648
649 * cpu-ia64-opc.c: Add operand constant "ar.csd".
650
d48770d4
L
6512002-12-04 H.J. Lu <hjl@gnu.org>
652
653 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
654 BFD address when constructing local name.
655
b6152c34
AS
6562002-12-04 Andreas Schwab <schwab@suse.de>
657
658 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
659 member.
660 (elf_m68k_link_hash_table_create): Initialize it.
661 (elf_m68k_check_relocs): Handle symbols that are forced to be
662 local due to visibility changes.
663 (elf_m68k_adjust_dynamic_symbol): Likewise.
664 (elf_m68k_size_dynamic_sections): Likewise.
665 (elf_m68k_discard_copies): Likewise.
666 (elf_m68k_relocate_section): Likewise.
667
73374ef1
AM
6682002-12-04 Alan Modra <amodra@bigpond.net.au>
669
670 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
671
c5c1944d
AM
6722002-12-04 Alan Modra <amodra@bigpond.net.au>
673
674 * srec.c (srec_write_symbols): Restore '$' prefix to address
675 accidentally removed in 2002-04-04 change.
676 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
677
e1a9cb8e
NC
6782002-12-03 Nick Clifton <nickc@redhat.com>
679
680 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
681 (apuinfo_list_add): New function: Add a value to the list.
682 (apuinfo_list_length): New function: Return the number of
683 values on the list.
684 (apuinfo_list_element): New function: Return a value on the
685 list.
686 (apuinfo_list_finish): New function: Free the resources used
687 by the list.
688 (ppc_elf_begin_write_processing): New function. Scan the
689 input bfds for apuinfo sections.
690 (ppc_elf_write_section): New function: Delay the creation of
691 the contents of an apuinfo section in an output bfd.
692 (ppc_elf_final_write_processing): New function. Create the
693 contents of an apuinfo section in an output bfd.
694 (elf_backend_begin_write_processing): Define.
695 (elf_backend_final_write_processing): Define.
696 (elf_backend_write_section): Define.
e1a9cb8e 697
a823923b
RH
6982002-12-03 Richard Henderson <rth@redhat.com>
699
700 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
701
30491647
SC
7022002-12-01 Stephane Carrez <stcarrez@nerim.fr>
703
704 Fix PR savannah/1417:
705 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
706 branch if it goes to the start of the deleted region.
707
bc7c6a90
SC
7082002-12-01 Stephane Carrez <stcarrez@nerim.fr>
709
710 * bfd-in2.h (bfd_mach_m6812): Rebuild.
711 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
712 bfd_mach_m6812s): Declare.
713
714 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
715 (_bfd_m68hc12_elf_set_private_flags): Call it.
716 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
717 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
718 report microcontroller incompatibilities (HC12 vs HCS12).
719 (elf_backend_object_p): Update.
720
b34976b6
AM
7212002-11-30 Alan Modra <amodra@bigpond.net.au>
722
723 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
724 (enum bfd_boolean, boolean): Delete.
725 (bfd_boolean): Typedef to an int.
726 (FALSE, TRUE): Define.
727 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
728 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
729 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
730 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
731 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
732 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
733 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
734 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
735 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
736 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
737 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
738 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
739 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
740 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
741 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
742 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
743 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
744 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
745 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
746 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
747 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
748 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
749 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
750 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
751 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
752 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
753 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
754 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
755 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
756 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
757 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
758 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
759 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
760 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
761 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
762 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
763 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
764 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
765 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
766 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
767 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
768 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
769 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
770 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
771 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
772 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
773 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
774 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 775 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
776 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
777 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
778 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
779 of bfd_boolean vars with TRUE/FALSE. Formatting.
780 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
781
947216bf
AM
7822002-11-28 Alan Modra <amodra@bigpond.net.au>
783
784 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
785 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
786 with Elf_Internal_Rela.
787 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
788 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
789 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
790 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
791 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
792 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
793 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
794 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
795 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
796 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
797 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
798 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
799 throughout instead.
800 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
801 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
802 Remove INLINE keyword.
803 (elf_swap_reloc_in): Likewise. Also clear r_addend.
804 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
805 as a bfd_byte *.
806 (elf_write_relocs): Consolidate REL and RELA code.
807 (elf_slurp_reloc_table_from_section): Simplify REL code.
808 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
809 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
810 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
811 RELA code.
812 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
813 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
814 (elf_link_output_relocs): Likewise.
815 (elf_reloc_link_order): Likewise.
816 (elf_finish_pointer_linker_section): Likewise.
817 (struct elf_link_sort_rela): Remove union.
818 (elf_link_sort_cmp1): Update to suit.
819 (elf_link_sort_cmp2): Here too.
820 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
821 over-allocation for int_rels_per_ext_rel != 1 case.
822 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
823 * elf32-i386.c: Likewise.
824 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
825 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
826 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
827 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
828 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
829 elf64-sparc.c, elf64-x86-64.c: Likewise.
830 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
831 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
832 bfd_elf32_swap_reloc_in.
833
834 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
835 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
836 (mips_elf64_swap_reloc_in): Zero r_addend.
837 (mips_elf64_be_swap_reloc_in): Likewise.
838 (mips_elf64_slurp_one_reloc_table): Simplify.
839
840 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
841 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
842 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
843
1448fa32
KK
8442002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
845
846 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 847 unresolved debugging relocs in dynamic applications.
1448fa32
KK
848 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
849
73722af0
AM
8502002-11-26 Alan Modra <amodra@bigpond.net.au>
851
852 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
853 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
854 on a relocatable link. Comment typos.
855 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
856 in the order they are declared. Clear elf_hash_value too.
857 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
858 eh_info and tls_segment.
859 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
860 sorted when discarding relocs by turning them into R_*_NONE.
861
862 * libbfd.c (warn_deprecated): Comment spelling.
863 * po/SRC-POTFILES.in: Regenerate.
864
7c25b72c
RH
8652002-11-21 Richard Henderson <rth@redhat.com>
866
867 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
868 arch's st_other bits when merging visibilities.
869 (elf_link_output_extsym): Tidy clearing of visibility field.
870
dc12c51f
AM
8712002-11-21 Alan Modra <amodra@bigpond.net.au>
872
873 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
874 (SWAP_OUT_RELOC_OFFSET): Define.
875
963f13ec
AO
8762002-11-20 Alexandre Oliva <aoliva@redhat.com>
877
878 * elf.c (_bfd_elf_link_hash_table_init): Make sure
879 can_refcount is properly extended to the type of
880 init_refcount.
881
ee6423ed
AO
8822002-11-19 Alexandre Oliva <aoliva@redhat.com>
883
4ffba85c
AO
884 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
885 (_bfd_mips_elf_relocate_section): Use it.
886
ee6423ed
AO
887 * elfxx-mips.c (MNAME): New macro.
888 (_bfd_mips_elf_check_relocs): Use it.
889 (_bfd_mips_elf_discard_info): Likewise.
890 (_bfd_mips_elf_final_link): Likewise.
891
cdcf6e38
AM
8922002-11-19 Alan Modra <amodra@bigpond.net.au>
893
894 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
895 rel_hdr.sh_size too.
896
93509525
KD
8972002-11-18 Klee Dienes <kdienes@apple.com>
898
899 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
900 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
901 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
902 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
903 Add dependencies for bfdwin.c, bfdio.c.
904 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
905 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
906 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
907 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
908 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
909 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
910 bfd_get_size (moved from libbfd.c and bfd.c).
911 * bfdwin.c New file. Contains _bfd_window_internal,
912 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
913 libbfd.c and bfd.c).
914 * po/SRC-POTFILES.in: Regenerate.
915 * po/bfd.pot: Regenerate.
916 * libbfd.h: Regenerate.
917 * bfd-in2.h: Regenerate.
918 * aclocal.m4: Regenerate.
919 * Makefile.in: Regenerate.
920 * configure: Regenerate.
921
3ae41454
AM
9222002-11-18 Klee Dienes <kdienes@apple.com>
923
924 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
925
e514ac71
NC
9262002-11-15 Kazu Hirata <kazu@cs.umass.edu>
927
928 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
929 jsr after a short jump.
930 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
931
eddc4f81
KD
9322002-11-15 Klee Dienes <kdienes@apple.com>
933
934 * pef.c (bfd_pef_convert_architecture): Move declaration of
935 ARCH_POWERPC and ARCH_M68K to the start of the function.
936
51908eee
SS
9372002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
938
939 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
940
3416d2e7
HPN
9412002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
942
943 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
944 For bpo_gregs_section->contents, allocate _raw_size, not
945 _cooked_size.
946
b1c58715
AM
9472002-11-13 Klee Dienes <kdienes@apple.com>
948
949 * config.bfd: Add entries for powerpc-*-darwin and cousins.
950
077ca68b
L
9512002-11-13 H.J. Lu <hjl@gnu.org>
952
953 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
954
e84d6fca
AM
9552002-11-13 Klee Dienes <kdienes@apple.com>
956 Alan Modra <amodra@bigpond.net.au>
957
958 * bfd.c (struct bfd_preserve): New.
959 (bfd_preserve_save): New function.
960 (bfd_preserve_restore): Ditto.
961 (bfd_preserve_finish): Ditto.
962 * bfd-in2.h: Regenerate.
963 * mach-o.c: Formatting.
964 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
965 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
966 (bfd_mach_o_core_p): Ditto.
967 (bfd_mach_o_scan): Pass in mdata.
968 * mach-o.h (bfd_mach_o_scan): Update prototype.
969 * pef.c: Formatting.
970 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
971 (bfd_pef_xlib_object_p): Ditto.
972 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
973 * pef.h (bfd_pef_scan): Update prototype.
974 * xsym.c: Formatting, K&R fixes.
975 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
976 (bfd_sym_scan): New function split out from bfd_sym_object_p.
977 * xsym.h (bfd_sym_scan): Declare.
978 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 979 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
980 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
981
cd24c222
NC
9822002-11-12 Nick Clifton <nickc@redhat.com>
983
984 * po/da.po: Updated Danish translation.
985
99eb2ac8
AM
9862002-11-12 Alan Modra <amodra@bigpond.net.au>
987
d6fe2dc1
AM
988 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
989 relocatable link too.
990 (elf_link_input_bfd): When emitting relocs, adjust offsets for
991 eh_frame and stab sections. Zap deleted relocs.
992 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
993 (elf_bfd_discard_info): Run for relocatable link too.
994 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
995 Handle ld -r case.
996 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
997 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
998
126495ed
AM
999 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
1000 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
1001 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
1002 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
1003 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
1004 (struct elf_link_hash_table): Add eh_info.
1005 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
1006 (_bfd_elf_discard_section_eh_frame): Update prototype.
1007 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
1008 (_bfd_elf_write_section_eh_frame): Likewise.
1009 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
1010 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
1011 param. Get "hdr_info" from link hash table.
1012 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
1013 header section from link hash table. Save header section to elf_tdata.
1014 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
1015 header section from link hash table. Don't alloc hdr_info. Clear
1016 hdr_sec instead of setting "strip".
1017 (_bfd_elf_eh_frame_section_offset): Formatting.
1018 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
1019 Get header section from link hash table.
1020 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
1021 Get header section from link hash table.
1022 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
1023 (get_program_header_size): Likewise.
1024 (_bfd_elf_section_offset): Formatting.
1025 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
1026 section pointer in link hash table.
1027 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
1028 and _bfd_elf_write_section_eh_frame calls. Update comment about
1029 eh_frame entries.
1030 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
1031 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
1032
1033 * po/SRC-POTFILES.in: Regenerate.
1034
99eb2ac8
AM
1035 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
1036 relocs for discarded FDEs. Remove dead code.
1037 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
1038 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
1039 Tidy conditions under which stabs are edited. Formatting.
1040 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1041 from discarded relocs.
1042 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
1043 section adjustments after testing magic values.
1044
7c319a27
AM
10452002-11-12 Thomas Moestl <tmm@FreeBSD.org>
1046
1047 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
1048 references to large plt symbols.
1049
a95a4550
AM
10502002-11-12 Klee Dienes <kdienes@apple.com>
1051
1052 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
1053 looking for an unused section name.
1054
bc7eab72
KH
10552002-11-11 Kazu Hirata <kazu@cs.umass.edu>
1056
1057 * coff-h8300.c: Fix formatting.
1058 * elf32-h8300.c: Likewise.
1059 * reloc16.c: Likewise.
1060
52585bb8
AM
10612002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
1062
1063 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
1064 section when dynamic section unused; _bfd_strip_section_from_output
1065 instead.
1066
9f632188
AM
10672002-11-08 Alan Modra <amodra@bigpond.net.au>
1068
207b304b
AM
1069 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
1070 and sym_vec.
3b029f65 1071
9f632188
AM
1072 * dwarf2.c: Revert last change.
1073
ec4530b5
NC
10742002-11-07 Michal Ludvig <mludvig@suse.cz>
1075
1076 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
1077 _bfd_dwarf2_find_nearest_line): Use
1078 bfd_simple_get_relocated_section_contents() instead of
1079 bfd_get_section_contents().
1080 * reloc.c (bfd_perform_relocation): Add sanity check.
1081 * simple.c (simple_get_relocated_section_contents): If the section
1082 does not have any relocs associated with it, just return the
1083 unadjusted contents.
1084
205cfeb0
HPN
10852002-11-07 Hans-Peter Nilsson <hp@axis.com>
1086
1087 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
1088 case R_CRIS_32_GOT>: Correct test for filling in constant .got
1089 contents, enabling for a non-DSO, for symbols defined in the
1090 program with --export-dynamic.
1091
87e226ce
AM
10922002-11-07 Alan Modra <amodra@bigpond.net.au>
1093
1094 * elf64-ppc.c: Comment typo fixes.
1095 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
1096
235c4794
NC
10972002-11-07 Nick Clifton <nickc@redhat.com>
1098
1099 * po/da.po: Updated Danish translation.
1100
49179469
AO
11012002-11-06 Alexandre Oliva <aoliva@redhat.com>
1102
1103 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
1104 exactly three internal relocs per external reloc. Set reloc_count
1105 to the external reloc count.
1106
246178f2
NC
11072002-11-06 Klee Dienes <kdienes@apple.com>
1108
3ae41454 1109 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
1110 Fix comment formatting.
1111
3af9a47b
NC
11122002-11-06 Klee Dienes <kdienes@apple.com>
1113
3ae41454 1114 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
1115 xsym.lo.
1116 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
1117 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
1118 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
1119 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
1120 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
1121 sym.
3ae41454 1122 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
1123 * Makefile.in: Regenerate.
1124 * doc/Makefile.in: Regenerate.
3ae41454 1125 * bfd-in2.h: Regenerate.
3af9a47b
NC
1126 * xsym.c: New file. Contains support for the Apple/Metrowerks
1127 xSYM debugging format.
1128 * xsym.h: New file.
1129 * pef.c: New file. Contains support for the Apple Code Fragment
1130 Manager Preferred Executable Format
1131 * pef.h: New file.
1132 * pef-traceback.h: New file. Contains support for parsing PowerPC
1133 traceback tables as used by PEF executables (and perhaps other
1134 systems as well).
3ae41454 1135 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
1136 format.
1137 * mach-o.h: New file.
1138 * mach-o-target.c: New file. Declares the mach-o targets
1139 themselves. Included three times by mach-o.c; each time with a
1140 different set of macros set.
3ae41454 1141
b6821651 11422002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
1143
1144 * Makefile.am: Remove entries for elf32-qnx.[ch].
1145 * Makefile.in: Regenerate.
1146 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
1147 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
1148 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
1149 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
1150 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
1151 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
1152 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
1153 * configure: Regenerate.
1154 * elf32-qnx.c: Remove.
1155 * elf32-qnx.h: Remove.
1156 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
1157 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
1158 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
1159 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
1160 * elf32-i386.c: Remove QNX extended bfd support.
1161 * elf32-ppc.c: Remove QNX extended bfd support.
1162 * elf32-sh.c: Remove QNX extended bfd support.
1163 * elfarm-nabi.c: Remove QNX extended bfd support.
1164 * targets.c: Remove qnx vectors.
1165 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
1166 (elf_backend_is_contained_by_filepos): Remove.
1167 (elf_backend_copy_private_bfd_data_p): Remove.
1168 * po/SRC-POTFILES.in: Regenerate.
1169
b6821651
AM
11702002-11-06 David O'Brien <obrien@FreeBSD.org>
1171 Alan Modra <amodra@bigpond.net.au>
1172
1173 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
1174 dynamic relocs against section symbols for the output section vma.
1175
11762002-11-05 Alan Modra <amodra@bigpond.net.au>
1177
1178 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
1179 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
1180
08f74004
AM
11812002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1182 Alan Modra <amodra@bigpond.net.au>
1183
1184 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
1185 vectors in target_selvecs.
1186 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
1187 in target_selvecs.
1188 (sh-*-netbsdelf*): Likewise.
1189 * configure.in (assocvecs): New variable. Handle assocvecs like
1190 selvecs.
1191 * configure: Regenerate.
1192 * format.c (bfd_check_format_matches): Store bfd_target pointers
1193 in matching_vector instead of target names. Select first target
1194 from bfd_associated_vector that matches a list of ambiguous targets.
1195 * targets.c (_bfd_associated_vector): New array.
1196 (bfd_associated_vector): New variable.
1197 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
1198 * libbfd-in.h (bfd_associated_vector): Declare.
1199 * libbfd.h: Regenerate.
1200
89117aab
AM
12012002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
1202
1203 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
1204 non-NULL before dereferencing.
1205
5e9aae3e
KK
12062002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1207
1208 * vms.c (vms_object_p): Restore the start address when returning
1209 NULL.
1210
c97e73dd
AM
12112002-11-04 Alan Modra <amodra@bigpond.net.au>
1212 Hans-Peter Nilsson <hp@axis.com>
1213
1214 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
1215 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
1216 Set up a larger symshndxbuf, and write it out. Free it on
1217 exit rather than freeing symbuf twice. Correct section index
1218 on output section symbol loop.
1219 (elf_link_output_sym): Accumulate symbol extension section
1220 indices, reallocating symshndxbuf rather than writing it out.
1221 (elf_link_flush_output_syms): Don't flush symshndxbuf.
1222 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
1223 Use bfd_zalloc to clear i_shdrp[0] too.
1224
3463048e
SC
12252002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
1226
1227 * elf32-sh64-com.c (sh64_address_in_cranges): Use
1228 _raw_size of cranges section if _cooked_size not yet set.
1229
63a23799
HPN
12302002-11-03 Hans-Peter Nilsson <hp@axis.com>
1231
1232 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
1233 for bfd_elf32_swap_symbol_out.
1234
e68cc12e
DB
12352002-10-31 David O'Brien <obrien@FreeBSD.org>
1236
1237 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
1238 signed and unsigned in comparison.
1239
db4b6d01
DJ
12402002-10-30 Daniel Jacobowitz <drow@mvista.com>
1241
1242 * coffcode.h: Remove extraneous '\'.
1243
840f0243
L
12442002-10-28 H.J. Lu <hjl@gnu.org>
1245
1246 * Makefile.am (targets.lo): Depend on Makefile instead of
1247 config.status.
1248 (archures.lo): Likewise.
1249 * Makefile.in: Regenerated.
1250
05a7e2db
JT
12512002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
1252
1253 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
1254 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
1255 targ_selvecs.
1256
a0087177
JW
12572002-10-25 Jim Wilson <wilson@redhat.com>
1258
1259 * elf64-sh64.c (sh_elf64_relocate_section): Call
1260 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
1261 of SHF_MERGE section.
1262
8718ac9c
HPN
12632002-10-25 Hans-Peter Nilsson <hp@axis.com>
1264
1265 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
1266
d45913a0
DA
12672002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
1268
1269 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
1270 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
1271 unsigned int.
1272 (NAME(aout,final_link)): Cast enum used in assignment.
1273 (aout_link_write_symbols): Cast enums in comparisons, int values to
1274 boolean, enums in assignments to int.
1275 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
1276 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
1277 with unsigned ints.
1278 (aout_link_reloc_link_order): Cast enum to int in assignment.
1279 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
1280 calls to char *.
1281 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
1282 assignment.
1283 * bfd-in2.h (bfd_set_section_vma): Likewise.
1284 * bfd.c (bfd_record_phdr): Cast enums in assignments.
1285 * binary.c (bfd_alloc): Cast enum to long.
1286 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
1287 * dwarf2.c (read_abbrevs): Add casts to enum types.
1288 (read_attribute_value): Likewise.
1289 (arange_add): Cast result of bfd_zalloc call.
1290 (comp_unit_contains_address): Return true and false.
1291 (comp_unit_find_nearest_line): Cast return to boolean.
1292 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
1293 * gen-aout.c: define macro '_' if not defined.
1294 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
1295 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
1296 (bfd_write_bigendian_4byte_int): Cast return to boolean.
1297 (bfd_seek): Cast bfd_realloc to bfd_byte *.
1298 (bfd_generic_is_local_label_name): Cast return to boolean.
1299 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
1300 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
1301 struct bfd_hash_entry *.
1302 (_bfd_generic_link_hash_newfunc): likewise.
1303 (_bfd_generic_final_link): Cast enum to unsigned int.
1304 * merge.c (sec_merge_emit): Cast return to boolean.
1305 (merge_strings): Add casts to const unsigned char *.
1306 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
1307 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
1308 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
1309 struct bfd_hash_entry *.
1310 (bfd_set_section_content): Add cast to PTR in comparison.
1311 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
1312 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
1313 simple_dummy_unattached_reloc,
1314 bfd_simple_get_relocated_section_contents): Add K&R declarations and
1315 function definitions.
1316 * srec.c (S3Forced): Initialize to false.
1317 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
1318 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
1319 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
1320 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
1321 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
1322 comparisons.
1323
475c2a7e
JJ
13242002-10-23 Jakub Jelinek <jakub@redhat.com>
1325
1326 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
1327 relocs into shared lib non-allocated reloc sections.
1328
e82ce529
AM
13292002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
1330
1331 * dwarf2.c (add_line_info): Ensure that the line_info_table is
1332 sorted even when given an out-of-order line sequence.
1333 (lookup_address_in_line_info_table): When an exact VMA match is
1334 not found, return line information with the closest VMA.
1335
f2482cb2
NC
13362002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
1337
1338 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
1339 HPUX 11.00 patch PHSS_26559.
1340
c1fd6598
AO
13412002-10-22 Alexandre Oliva <aoliva@redhat.com>
1342
1343 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
1344 the options section into a separate section unless IRIX 6
1345 compatibility is enabled.
1346
033fd5f9
AO
13472002-10-22 Alexandre Oliva <aoliva@redhat.com>
1348
1349 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
1350 into arrays.
1351 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
1352 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
1353 into account.
1354 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
1355 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
1356
ef485c01
AM
13572002-10-21 Graeme Peterson <gp@qnx.com>
1358
1359 * targets.c (_bfd_target_vector): Add missing qnx vectors.
1360
b50afec9
AM
13612002-10-21 Alan Modra <amodra@bigpond.net.au>
1362
1363 * targets.c (bfd_target_list): Don't return the default target twice.
1364
5fe39cae
AM
13652002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
1366
1367 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
1368 perror with bfd_perror.
1369
5d603aa9
L
13702002-10-19 H.J. Lu <hjl@gnu.org>
1371
1372 * elflink.h (elf_link_add_object_symbols): Correctly handle
1373 DT_RPATH and DT_RUNPATH.
1374
e377ab71
MK
13752002-10-19 Mark Kettenis <kettenis@gnu.org>
1376
1377 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
1378
0d09fec6
DC
13792002-10-17 Denis Chertykov <denisc@overta.ru>
1380
1381 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
1382 for ip2k port.
1383
acf8aed4
AM
13842002-10-17 Alan Modra <amodra@bigpond.net.au>
1385
1386 * elfxx-target.h (USE_REL): Don't define as 1.
1387 * elf32-arm.h (USE_REL): Provide a default define of 0.
1388 Use #if rather than #ifdef when testing USE_REL.
1389 * elf32-m32r.c: Likewise.
1390
1391 * elf32-arc.c (USE_REL): Define as 1.
1392 * elf32-d10v.c (USE_REL): Likewise.
1393 * elf32-m32r.c (USE_REL): Likewise.
1394 * elf32-m68hc11.c (USE_REL): Likewise.
1395 * elf32-m68hc12.c (USE_REL): Likewise.
1396 * elf32-or32.c (USE_REL): Likewise.
1397 * elfarm-nabi.c (USE_REL): Likewise.
1398
f52d1d64
JJ
13992002-10-16 Jakub Jelinek <jakub@redhat.com>
1400
1401 * config.bfd (s390-*-linux*): Add targ64_selvecs.
1402 (s390x-*-linux*): Add targ_selvecs.
1403
2bc3c89a
AM
14042002-10-16 Alan Modra <amodra@bigpond.net.au>
1405
1406 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 1407 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
1408 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
1409 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
1410 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
1411 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
1412 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
1413 (SOURCE_HFILES): Add elf32-qnx.h.
1414 (BUILD_HFILES): Add bfdver.h.
1415 Run "make dep-am".
1416 * Makefile.in: Regenerate.
1417 * configure.in Update bfd vector dependencies.
1418 * configure: Regenerate.
1419 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
1420 * elf32-i386qnx.c: Likewise.
1421 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
1422 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
1423 * elf32-sh-lin.c: Likewise.
1424 * elf32-shqnx.c: Likewise.
1425 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
1426 * elf32-sh64-nbsd.c: Likewise.
1427 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
1428 * elf64-sh64-nbsd.c: Likewise.
1429 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
1430 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
1431 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
1432 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
1433 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
1434 (elf_backend_is_contained_by_filepos): Likewise.
1435 (elf_backend_copy_private_bfd_data_p): Likewise.
1436 Globalize and move functions to..
1437 * elf32-qnx.c: ..here. New file.
1438 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
1439 emit target vectors when INCLUDE_SHMEDIA.
1440 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
1441 end of file.
1442 * elf64-sh64.c: Remove ELF_ARCH test.
1443 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
1444 * po/BLD-POTFILES.in: Regenerate.
1445 * po/SRC-POTFILES.in: Regenerate.
1446
90c9df85
AM
14472002-10-16 Alan Modra <amodra@bigpond.net.au>
1448
366f2964
AM
1449 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
1450 loaded with --just-symbols.
1451
90c9df85
AM
1452 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
1453 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
1454 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
1455 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
1456
2238051f
RH
14572002-10-15 Richard Henderson <rth@redhat.com>
1458
1459 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
1460 (BFD64_BACKENDS_CFILES): Likewise.
1461 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
1462 * elf64-alpha-fbsd.c: Remove file, move code ...
1463 * elf64-alpha.c: ... here.
1464 * Makefile.in, configure: Rebuild.
1465
64e04ecd
RH
14662002-10-14 Richard Henderson <rth@redhat.com>
1467
1468 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
1469 VALUE, not ADDEND.
1470
396a6083
SC
14712002-10-14 Stephen Clarke <stephen.clarke@superh.com>
1472
1473 * elf32-sh.c (elf_sh_link_hash_entry): Replace
1474 datalabel_got_offset with union of datalabel_got
1475 offset and refcount.
1476 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
1477 (allocate_dynrelocs): Delete unnecessary code for
1478 STT_DATALABEL type. Create entry in got for
1479 datalabel version of symbol if datalabel_got.refcount > 0.
1480 (sh_elf_relocate_section): Use datalabel_got union.
1481 (sh_elf_gc_sweep_hook): Pull common code to initialize
1482 h and eh out of switch statement. Declare seen_stt_datalabel.
1483 Initialize it. Decrement datalabel_got.refcount for
1484 got relocs when seen_stt_datalabel is true.
1485 Decrement local_got_refcounts entry for datalabel got relocs
1486 of local symbols.
1487 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
1488 (sh_elf_check_relocs): Declare seen_stt_datalabel.
1489 Initialize it. When seen_stt_datalabel is true, increment
1490 datalabel_got refcount rather than got.refcount.
1491 (sh_elf_finish_dynamic_symbol): Create relocs to
1492 initialize got entry for datalabel version of symbol.
1493
6a0735ef
AM
14942002-10-14 Alan Modra <amodra@bigpond.net.au>
1495
1496 * Makefile.am: Run "make dep-am".
1497 (BFD_H_FILES): Remove version.h.
1498 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
1499 * version.h: ..to here.
1500 * configure.in (bfd_version_date): Remove.
1501 (AC_OUTPUT): Make bfdver.h from version.h.
1502 * bfd.c: #include "bfdver.h".
1503 * vms-hdr.c: Likewise.
1504 * Makefile.in: Regenerate.
1505 * bfd-in2.h: Regenerate.
1506 * configure: Regenerate.
1507 * po/SRC-POTFILES.in: Regenerate.
1508
686e4055
AM
15092002-10-14 Alan Modra <amodra@bigpond.net.au>
1510
1511 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
1512 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
1513 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
1514 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
1515 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
1516 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
1517 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
1518 bfd_mach_ip2022, bfd_mach_ip2022ext,
1519 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
1520 * bfd-in2.h: Regenerate.
1521
019dca2b
KK
15222002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1523
1524 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
1525 endian vector to targ_selvecs.
1526
bce03d3d
AO
15272002-10-13 Alexandre Oliva <aoliva@redhat.com>
1528
1529 * elfxx-mips.c (mips_elf_calculate_relocation): Take
1530 save_addend argument. Don't apply the 32-bit mask to a
1531 GPREL32 value if it's to be used in another relocation. Don't
1532 use forced-check computation of local_p to decide whether to
1533 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
1534 of the addend of a non-in-place GPREL16 relocation.
1535 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
1536 mips_elf_calculate_relocation().
1537
9b691193
SC
15382002-10-12 Stephane Carrez <stcarrez@nerim.fr>
1539
1540 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
1541 with symbols in other sections if we relaxed something; the sections
1542 output offsets must be re-computed before.
1543
1f4c5b47
SC
15442002-10-12 Stephane Carrez <stcarrez@nerim.fr>
1545
1546 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
1547 handling to use Elf_Internal_Sym.
1548 (m68hc11_elf_relax_delete_bytes): Likewise.
1549
5dc97655
KK
15502002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1551
1552 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
1553 sh_elf_object_p, dtpoff_base): New functions.
1554 (sh_elf_howto_table): Add TLS relocs.
1555 (sh_reloc_map): Likewise.
1556 (sh_elf_info_to_howto): Support TLS relocs.
1557 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
1558 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
1559 New macros.
1560 (sh_elf_obj_tdata): New.
1561 (elf_sh_link_hash_table): Add tls_ldm_got.
1562 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
1563 (allocate_dynrelocs): Support TLS relocs.
1564 (sh_elf_size_dynamic_sections): Likewise.
1565 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
1566 .rela.got section when found already. Return false after printing
1567 error about unresolvable relocation.
1568 (sh_elf_gc_sweep_hook): Support TLS relocs.
1569 (sh_elf_check_relocs): Likewise.
1570 (sh_elf_finish_dynamic_symbol): Likewise.
1571 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
1572 * reloc.c: Add SH TLS relocs.
1573 * bfd-in2.h, libbfd.h: Regenerate.
1574
6a0735ef
AM
15752002-10-11 Daniel Jacobowitz <drow@mvista.com>
1576
1577 * Makefile.in: Regenerated.
1578
af39267e
DJ
15792002-10-11 Daniel Jacobowitz <drow@mvista.com>
1580
1581 * Makefile.am: Run dep-am.
6a0735ef 1582 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
1583 (BFD32_LIBS): Add simple.lo.
1584 (BFD32_LIBS_CFILES): Add simple.c.
1585 * Makefile.in: Regenerated.
1586 * bfd-in2.h: Regenerated.
1587 * simple.c: New file.
1588
0be617ce
AM
15892002-10-11 Alan Modra <amodra@bigpond.net.au>
1590
14a793b2
AM
1591 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
1592 (record_thumb_to_arm_glue): Likewise.
1593 * ecoff.c (ecoff_link_add_externals): Likewise.
1594 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
1595 (record_thumb_to_arm_glue): Likewise.
1596 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1597 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1598 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1599 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
1600 * elf64-ppc.c (func_desc_adjust): Likewise.
1601 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1602 (sh64_elf64_create_dynamic_sections): Likewise.
1603 * elflink.c (_bfd_elf_create_got_section): Likewise.
1604 (_bfd_elf_create_dynamic_sections): Likewise.
1605 (_bfd_elf_create_linker_section): Likewise.
1606 * elflink.h (elf_add_default_symbol): Likewise.
1607 (elf_link_create_dynamic_sections): Likewise.
1608 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1609 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
1610 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
1611 (_bfd_mips_elf_add_symbol_hook): Likewise.
1612 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1613 * linker.c (generic_link_add_symbol_list): Likewise.
1614 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1615
1616 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
1617
0be617ce 1618 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 1619 completely removed. Correct local sym adjustment.
0be617ce 1620
0a4ef3f4
SC
16212002-10-10 Stephen Clarke <stephen.clarke@superh.com>
1622
1623 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1624 Correct mistake in calculation of address of .got.
1625 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
1626 elf_sh64_pic_plt_entry_le): Likewise.
1627
efacd36e
SC
16282002-10-09 Richard Shann <richard.shann@superh.com>
1629 Stephen Clarke <stephen.clarke@superh.com>
1630
1631 * Makefile.am: Add entries for elf32-sh64-lin.c and
1632 elf64-sh64-lin.c. Regenerate.
1633 * Makefile.in: Regenerate.
1634 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
1635 to use sh64 vectors rather than sh vectors.
1636 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
1637 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
1638 * configure: Regenerate.
1639 * elf32-sh64-lin.c: New file.
1640 * elf64-sh64-lin.c: New file.
1641 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
1642 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
1643
299bf759
L
16442002-10-08 H.J. Lu <hjl@gnu.org>
1645
1646 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
1647 IE->LE transition for R_386_TLS_IE.
1648
51020317
AM
16492002-10-08 Alan Modra <amodra@bigpond.net.au>
1650
1651 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
1652
a8fcf378
NC
16532002-10-07 Mark Elbrecht <snowball3@softhome.net>
1654
51020317
AM
1655 * cofflink.c (mark_relocs): Don't mark relocations in excluded
1656 sections.
a8fcf378 1657
a16d5acb
AM
16582002-10-07 Alan Modra <amodra@bigpond.net.au>
1659
a6b511bd
AM
1660 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
1661 code.
1662
a16d5acb
AM
1663 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
1664
7c4a37eb
AM
16652002-10-06 Alan Modra <amodra@bigpond.net.au>
1666
1667 * opncls.c: Formatting.
1668 (_bfd_new_bfd): Use a smaller section hash table.
1669
7c4ca42d
AO
16702002-10-05 Alexandre Oliva <aoliva@redhat.com>
1671
1672 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
1673 of the other two relocations packed with a REL32 to NONE.
1674
4989d792
SC
16752002-10-02 Stephen Clarke <stephen.clarke@superh.com>
1676
1677 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
1678 (sh_elf_link_hash_newfunc): Initialize it.
1679 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
1680 to got.refcount for symbols that are forced local or when
1681 we have direct got refs.
1682 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
1683 to correctly adjust got.refcount and plt.refcount.
1684 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
1685 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 1686
7c445aa3
JJ
16872002-10-01 Jakub Jelinek <jakub@redhat.com>
1688
1689 * elf32-i386.c (elf_i386_relocate_section): Fix
1690 movl foo@indntpoff, %eax IE->LE transition.
1691
abcf1d52
JJ
16922002-10-01 Jakub Jelinek <jakub@redhat.com>
1693
1694 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
1695 sequence and its transitions.
1696
a45bb67d
JJ
16972002-10-01 Jakub Jelinek <jakub@redhat.com>
1698
1699 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
1700 to st_value + addend in non-code sections.
1701 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
1702 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
1703
00707a0e 17042002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
1705 Ken Raeburn <raeburn@cygnus.com>
1706 Aldy Hernandez <aldyh@redhat.com>
1707 Eric Christopher <echristo@redhat.com>
1708 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
1709
1710 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
1711 (bfd_mach_mips5500): New.
1712 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
1713 (arch_info_struct): Add corresponding entries here.
1714 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
1715 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
1716 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
1717 bfd_mach_mips5400 and bfd_mach_mips5500.
1718 (_bfd_mips_elf_mach_extends_p): New function.
1719 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
1720 the EF_MIPS_MACH flags.
1721 * bfd-in2.h: Regenerate.
1722
624f0b25
JT
17232002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
1724
1725 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
1726 .got sections.
1727
b89fe0ee
AM
17282002-09-28 Alan Modra <amodra@bigpond.net.au>
1729
1730 * elf.c (map_sections_to_segments): Correct test for start of
1731 writable section in the same page as end of read-only section.
1732
b29635ba
JT
17332002-09-27 Matt Thomas <matt@3am-software.com>
1734
1735 * elf32-vax.c (elf_vax_check_relocs): Remove unused
1736 local_got_refcounts usage. Remove allocation of got slot.
1737 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
1738 Remove de-allocation of got slot.
1739 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
1740 traversal for elf_vax_instantiate_got_entries. Allow empty .got
1741 sections to be GC'ed.
1742 (elf_vax_instantiate_got_entries): New function.
1743 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
1744 tests that are now handled by elf_vax_instantiate_got_entries.
1745 Assert GOT entry falls within .got section size. Remove redundant
1746 comparisions. Fix comments.
1747
bffbf940
JJ
17482002-09-27 Jakub Jelinek <jakub@redhat.com>
1749
1750 * reloc.c: Add x86-64 TLS relocs.
1751 * bfd-in2.h, libbfd.h: Rebuilt.
1752 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
1753 relocs. Add TLS relocs.
1754 (x86_64_reloc_map): Add TLS relocs.
1755 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
1756 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
1757 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
1758 (elf64_x86_64_hash_entry): Define.
1759 (struct elf64_x86_64_obj_tdata): New.
1760 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
1761 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
1762 (link_hash_newfunc): Initialize tls_type.
1763 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
1764 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
1765 (elf64_x86_64_mkobject): New.
1766 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
1767 (elf64_x86_64_tls_transition): New.
1768 (elf64_x86_64_check_relocs): Add r_type variable and use it.
1769 Handle TLS relocs.
1770 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
1771 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
1772 (elf64_x86_64_size_dynamic_sections): Likewise.
1773 (dtpoff_base, tpoff): New.
1774 (elf64_x86_64_relocate_section): Handle TLS relocs.
1775 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
1776 entries.
1777 (bfd_elf64_mkobject): Define.
1778
1779 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
1780 DF_STATIC_TLS if shared.
1781
14366460
TS
17822002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1783
1784 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
1785 empty relocation sections.
1786
9f951329
AM
17872002-09-26 Alan Modra <amodra@bigpond.net.au>
1788
1789 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
1790 (ppc64_elf_build_stubs): Build them here instead.
1791
6b3ac709
JJ
17922002-09-24 Jakub Jelinek <jakub@redhat.com>
1793
1794 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
1795 addend into r_addend, not *r_offset.
1796 (elf32_sparc_finish_dynamic_symbol): Likewise.
1797 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
1798 R_SPARC_RELATIVE's r_offset.
1799
e2f6d277
NC
18002002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
1801
1802 * dwarf2.c (decode_line_info): Update to correctly decode
1803 the (non-standard DWARF2) out-of-order address sequences
1804 generated by the Intel C++ 6.0 compiler for ia64-Linux.
1805
f3961b2b
DD
18062002-09-23 Mark Elbrecht <snowball3@softhome.net>
1807
1808 * config.bfd: For DJGPP targets, match with any cpu and any machine.
1809
ad34bc37
AM
18102002-09-23 Alan Modra <amodra@bigpond.net.au>
1811
1812 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
1813 for discarded FDEs. Remove redundant assignment.
1814 * elflink.h (elf_bfd_discard_info): Save edited relocs.
1815
82988bff
L
18162002-09-22 H.J. Lu <hjl@gnu.org>
1817
1818 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
1819 the relocation count between different .reloc sections.
1820
5ad8645c
AM
18212002-09-21 Alan Modra <amodra@bigpond.net.au>
1822
5f819128
AM
1823 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
1824 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
1825 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
1826 R_PPC_EMB_RELSDA.
1827
5ad8645c
AM
1828 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
1829 unsigned. Move "symcount" assignment out of loop.
1830 * Makefile.am: Run "make dep-am".
1831 * Makefile.in: Regenerate.
1832 * configure: Regenerate.
1833 * po/SRC-POTFILES.in: Regnerate.
1834
75936555
NC
18352002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
1836
1837 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
1838 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
1839 (e.g. IRIX64).
1840
2243deae
L
18412002-09-19 Jakub Jelinek <jakub@redhat.com>
1842
1843 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
1844 even if generating R_PPC_RELATIVE reloc.
1845 (ppc_elf_relocate_section): Make sure relocation is performed
1846 if skip == -2. Clear memory at r_offset when creating dynamic
1847 relocation.
1848
37e55690
JJ
18492002-09-19 Jakub Jelinek <jakub@redhat.com>
1850
1851 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
1852 BFD_RELOC_386_TLS_GOTIE): Add.
1853 * bfd-in2.h, libbfd.h: Rebuilt.
1854 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
1855 and R_386_TLS_GOTIE.
1856 (elf_i386_reloc_type_lookup): Handle it.
1857 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
1858 char instead of enum, change GOT_* into defines.
1859 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
1860 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1861 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
1862 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
1863 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
1864 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1865 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1866 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1867 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
1868 tls_type is GOT_TLS_IE_BOTH.
1869 (elf_i386_size_dynamic_sections): Likewise.
1870 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1871 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1872 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
1873 all 4 GOT_TLS_* TLS types.
1874
8e67855b
NC
18752002-09-19 Nick Clifton <nickc@redhat.com>
1876
1877 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
1878 follow indirect links.
1879
1c59ba3f
NC
18802002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
1881
1882 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
1883 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
1884 on 64 bit machines.
1885 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
1886 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
1887 ECOFF information: 'ioptMax' refers to the actual *size*
1888 of the optimization symtab, not the number of entries.
1c59ba3f 1889
9d7404b7
NC
18902002-09-19 Daniel Jacobowitz <drow@mvista.com>
1891
1892 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
1893 ELF_LINK_HASH_NEEDS_PLT logic.
1894
05a487dc
DJ
18952002-09-18 Daniel Jacobowitz <drow@mvista.com>
1896
1897 * elfcode.h (elf_slurp_reloc_table_from_section): Check
1898 correct relocation count.
1899
1f70368c
DJ
19002002-09-17 Daniel Jacobowitz <drow@mvista.com>
1901
1902 * bfd-in.h (bfd_get_dynamic_symcount): Define.
1903 * bfd.c (struct _bfd): Add dynsymcount.
1904 * bfd-in2.h: Regenerated.
1905 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
1906 abfd->dynsymcount.
1907 * elfcode.h (elf_slurp_reloc_table_from_section): Check
1908 for overflow.
1909
51020317 19102002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
1911
1912 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
1913 (mips_elf64_final_gp): Don't make up gp value.
1914 * elfn32-mips.c (mips_elf_final_gp): Likewise.
1915 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
1916 .MIPS.options/.options section.
1917
290062cc
DB
19182002-09-17 David O'Brien <obrien@FreeBSD.org>
1919
1920 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
1921 It is benign for FreeBSD < 4.1. Minor reformatting.
1922 * elf64-alpha-fbsd.c: Likewise.
1923
c5c1f40c
JJ
19242002-09-17 Jakub Jelinek <jakub@redhat.com>
1925
ca1eb0ba
JJ
1926 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
1927 addend.
c5c1f40c 1928
562ace6b
AM
19292002-09-17 Alan Modra <amodra@bigpond.net.au>
1930
1931 * elf64-alpha.c (alpha_elf_size_info): Make static.
1932
5af6ead6
AM
19332002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
1934
1935 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
1936 * cpu-tic4x.c: Ditto.
1937
cb9512fc
TS
19382002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1939
1940 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
1941 duplicate define.
1942
4ada7262
DB
19432002-09-16 Bruno Haible <bruno@clisp.org>
1944
1945 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
1946 by a target variant implementation.
1947 * elf64-alpha.c: Likewise.
1948 * elf32-i386-fbsd.c: New file.
1949 * elf64-alpha-fbsd.c: New file.
1950 * targets.c: Support bfd_elf32_i386_freebsd_vec and
1951 bfd_elf64_alpha_freebsd_vec.
1952 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
1953 bfd_elf64_alpha_freebsd_vec.
1954 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
1955 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
1956 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
1957 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
1958 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
1959 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
1960 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
1961
6a30718d
JJ
19622002-09-12 Jakub Jelinek <jakub@redhat.com>
1963
1964 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
1965 NULL.
1966 (elf_i386_relocate_section): Return false after printing error about
1967 unresolvable relocation.
1968
6cf9e9fe
NC
19692002-09-12 Nick Clifton <nickc@redhat.com>
1970
1971 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
1972 R_ARM_THM_PC11.
1973
10f469bf
DJ
19742002-09-11 Jeffrey Law <law@redhat.com>
1975
1976 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
1977
dc43ada5
NC
19782002-09-11 Andrew Haley <aph@cambridge.redhat.com>
1979
1980 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
1981 line_ptr before deciding we've found a symbol.
1982
e09f4395
NC
19832002-09-11 Nick Clifton <nickc@redhat.com>
1984
1985 * po/da.po: New Danish translation file.
1986 * configure.in (LINGUAS): Add 'da'.
1987 * configure: Regenerate.
1988
b3018b5f
NC
19892002-09-10 Michael Snyder <msnyder@redhat.com>
1990
1991 * irix-core.c (do_sections, do_sections64): New functions.
51020317 1992 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
1993 do_sections64, depending on corefile (32-bit or 64-bit).
1994
2f21f25e
RH
19952002-09-09 Richard Henderson <rth@redhat.com>
1996
1997 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
1998 and PCREL21F like PCREL21B.
1999
28b94e7c
KB
20002002-09-04 Kevin Buettner <kevinb@redhat.com>
2001
51020317
AM
2002 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
2003 vector.
28b94e7c 2004
5cec6941
NC
20052002-09-02 Nick Clifton <nickc@redhat.com>
2006
2007 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
2008 names instead of cryptically overloaded bfd_reloc error
2009 codes.
2010 (v850_elf_relocate_section): Likewise.
2011 (v850_elf_relax_section): Replace caching of external symbols
2012 with caching of internal symbols obtained from calling
2013 bfd_elf_get_elf_syms().
51020317 2014 Fixup problems with freeing cached allocated memory blocks.
5cec6941 2015
3b77b1d5
AM
20162002-09-02 Alan Modra <amodra@bigpond.net.au>
2017
638524b5
AM
2018 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
2019 (bfd_pj_arch): Use bfd_default_scan.
2020 * cpu-v850.c (scan): Remove.
2021 (N): Use bfd_default_scan.
2022 * cpu-z8k.c (scan_mach): Remove.
2023 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
2024 first. Use bfd_default_scan.
2025
250d94fd
AM
2026 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
2027 bfd_mach constants.
2028 (ecoff_get_magic): Likewise.
2029 * elf32-v850.c (v850_elf_object_p): Likewise.
2030 (v850_elf_final_write_processing): Likewise.
2031 * mipsbsd.c (MY(set_arch_mach)): Likewise.
2032 (MY(write_object_contents)): Likewise.
2033 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
2034 * coffcode.h (coff_write_object_contents): Likewise.
2035 (coff_set_arch_mach_hook): Add comment describing machine == 0.
2036 Remove unnecessary "machine" assignments.
2037 (coff_write_relocs): Test for the absolute section sym by testing
2038 section and flags.
2039
3b77b1d5
AM
2040 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
2041 and bfd_mach_i386_i386_intel_syntax.
250d94fd 2042 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 2043
e5b45b83
DA
20442002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
2045
2046 * bfd-in.h (align_power): Cast constants to bfd_vma type.
2047 * bfd-in2.h (align_power): Likewise.
2048
37f45cf8
AM
20492002-08-30 Alan Modra <amodra@bigpond.net.au>
2050
2051 * Makefile.am: Run "make dep-am".
2052 * Makefile.in: Regenerate.
2053
2054 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
2055 * cpu-powerpc.c (powerpc_compatible): Likewise.
2056 * cpu-rs6000.c (rs6000_compatible): Likewise.
2057
86aba9db
NC
20582002-08-28 Catherine Moore <clm@redhat.com>
2059
2060 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
2061 (v850-elf-reloc): Don't resolve pc relative relocs.
2062 (v850_elf_ignore_reloc): New routine.
2063 (v850_elf_final_link_relocate): Handle new relocs.
2064 (v850_elf_relax_delete_bytes ): New routine.
2065 (v850_elf_relax_section): New routine.
2066 (bfd_elf32_bfd_relax_section): Define.
2067 (HOWTO): New entries for new relocs.
2068 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
2069 (BFD_RELOC_V850_LONGJUMP): New reloc.
2070 (BFD_RELOC_V850_ALIGN): New reloc.
2071 * archures.c: Remove redundant v850ea architecture.
2072 * cpu-v850.c: Remove redundant v850ea support.
2073 * libbfd.h: Regenerate.
2074 * bfd-in2.h: Regenerated.
2075
026df7c5
NC
20762002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
2077
2078 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
2079 * configure.in: Add tic4x_coff vector files.
2080 * configure: Regenerate.
2081 * Makefile.am: Add tic4x target.
2082 * Makefile.in: Regenerate.
2083
20842002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2085
2086 * archures.c: Add the BFD arch type tic4x.
2087 * bfd-in.h: Add BFD_IN_MEMORY flag.
2088 * coff-tic4x.c: New file.
2089 * coffswap.h (coff_swap_sym_out): Add preadjuster.
2090 * cpu-tic4x.c: New file.
2091 * targets.c: Added tic4x- in list of xvecs.
2092 * ticoff.h: New file.
2093 * bfd-in2.h: Regenerate.
2094
88f7bcd5
NC
20952002-08-27 Adam Nemet <anemet@lnxw.com>
2096
2097 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
2098 bit of DT_INIT and DT_FINI for Thumb functions.
2099
c8e48751
AM
21002002-08-26 Alan Modra <amodra@bigpond.net.au>
2101
2102 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
2103
2846975a
AM
21042002-08-26 Alan Modra <amodra@bigpond.net.au>
2105
2106 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
2107
067653c5
AM
21082002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2109
2110 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
2111 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
2112 Likewise.
2113 (struct elf_sh_pcrel_relocs_copied): Removed.
2114 (struct elf_sh_dyn_relocs): New.
2115 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
2116 field with dyn_relocs.
2117 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
2118 sections and sym_sec.
2119 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
2120 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
2121 (sh_elf_create_dynamic_sections): Use create_got_section instead
2122 of _bfd_elf_create_got_section.
2123 (sh_elf_check_relocs): Likewise.
2124 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
2125 sections.
2126 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
2127 sh_elf_relocate_section, sh_elf_check_relocs,
2128 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
2129 Likewise.
2130 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
2131 dynamic relocations and avoiding the copy relocation when we
2132 didn't find any dynamic relocations in the section which has
2133 contents or is read-only.
2134 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2135 (sh_elf_size_dynamic_sections): Don't reset the size of
2136 .rela.got section even if dynamic_sections_created flag is off.
2137 Don't use sh_elf_discard_copies. Scan all input bfd and use
2138 allocate_dynrelocs. Call readonly_dynrelocs to determine
2139 whether we need DT_TEXTREL.
2140 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
2141 whether the symbol was never referred to.
2142 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
2143 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
2144 (sh_elf_check_relocs): Call create_got_section if the short-cut
2145 to .got is null. Increment reference counters only instead of
2146 allocating space on dynamic sections here. Don't conditionalize
2147 uninitialized got.offset value when marking the symbol as a
2148 global offset table entry. Keep relocations for symbols satisfied
2149 by a dynamic library to avoid copy relocations for the symbol.
2150 Set dynobj field of an elf hash table if needed.
2151 (sh_elf_finish_dynamic_sections): Handle null section pointer
2152 correctly.
2153 (elf_backend_copy_indirect_symbol): Defined.
2154 (elf_backend_can_refcount): Defined.
2155
7e326afc
NC
21562002-08-23 Nick Clifton <nickc@redhat.com>
2157
2158 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
2159 previous change. Add comment explaining why.
2160
c8614e8e
AM
21612002-08-23 Stephen Clarke <stephen.clarke@superh.com>
2162
2163 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
2164 contents of .got.plt[2] to tr0, not address of .got.plt.
2165 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
2166 patching absolute plt entry. For shmedia plt entry, set bottom bit
2167 of branch to plt0 as this is a branch to an shmedia instruction.
2168 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
2169 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
2170 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
2171 branch to plt0.
2172 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
2173 patching absolute plt entry. For shmedia plt entry, branch to
2174 plt0 is now ptrel, so use relative offset. Set bottom bit of
2175 branch target as it is a branch to an shmedia instruction.
2176
3b587c71
AM
21772002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
2178 Richard Shann <richard.shann@superh.com>
2179
2180 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
2181 value if .init is an SHmedia function. Similarly for DT_FINI.
2182 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 2183
957dcaa8
AM
21842002-08-23 Stephen Clarke <stephen.clarke@superh.com>
2185
3b587c71 2186 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 2187 dynamic section.
3b587c71 2188 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 2189
a4263c47
NC
21902002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2191
2192 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 2193 byte read when reading the return address register column.
a4263c47 2194
db4ed121
NC
21952002-08-22 Nick Clifton <nickc@redhat.com>
2196
2197 * config.bfd: Add powepc64-*-*bsd* target.
2198
ed71e111
NC
21992002-08-22 Graeme Peterson <gp@qnx.com>
2200
2201 * Makefile.am: Add entries for elf32-shqnx.c
2202 * Makefile.in: Regenerate.
2203 * config.bfd: Add support sh-*-nto* target.
2204 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
2205 * configure: Regenerate.
2206 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
2207 * elf32-sh.c: Do not include elf32-target.h if
2208 ELF32_SH_C_INCLUDED is defined.
2209 * elf32-shqnx.c: New file: Support for QNX.
2210 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
2211
0ab72ee2
NC
22122002-08-22 Nick Clifton <nickc@redhat.com>
2213
75c83283
NC
2214 * po/tr.po: Updated Turkish translation.
2215
0ab72ee2
NC
2216 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
2217 symbols are not read.
2218
56780f18
AM
22192002-08-22 Alan Modra <amodra@bigpond.net.au>
2220
2221 * elf32-m68hc11.c: Formatting fixes.
2222 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
2223 * elf32-m68hc12.c: Formatting fixes.
2224 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
2225
b48fa14c
AM
22262002-08-22 Alan Modra <amodra@bigpond.net.au>
2227
a7c71b0c
AM
2228 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
2229 SEC_DATA.
2230 (pmac_xcoff_vec): Likewise.
2231 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2232 (aix5coff64_vec): Likewise.
2233
56780f18
AM
22342002-08-22 Alan Modra <amodra@bigpond.net.au>
2235
b48fa14c
AM
2236 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
2237 param to elf_backend_copy_indirect_symbol.
2238 (_bfd_elf_link_hash_copy_indirect): Likewise.
2239 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
2240 calls to copy_indirect_symbol.
2241 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
2242 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
2243 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
2244 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2245 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
2246 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
2247 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
2248 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2249 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2250 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
2251 test refcounts for "used" values.
2252
8c2ab17d
AM
22532002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
2254
2255 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
2256 argument declaration.
2257
d62b1198 22582002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
2259
2260 * archures.c (bfd_mach_ppc_e500): Added.
2261 * bfd-in2.h: Rebuilt.
d62b1198
EZ
2262 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
2263
9f88ba09
AM
22642002-08-19 Alan Modra <amodra@bigpond.net.au>
2265
2266 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
2267
df622259
AC
22682002-08-17 Andrew Cagney <ac131313@redhat.com>
2269
2270 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 2271 `bfd_byte'.
df622259 2272
44c410de
SC
22732002-08-17 Stan Cox <scox@redhat.com>
2274
2275 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
2276 IRIX 6 segment layout for NEWABI.
2277
4972a8e9
SC
22782002-08-16 Stephen Clarke <stephen.clarke@superh.com>
2279
2280 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
2281 symbols when looking for section referred to by a relocation.
2282 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 2283
c5cd6d62
AM
22842002-08-15 Alan Modra <amodra@bigpond.net.au>
2285
2286 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
2287
0741c7be
HPN
22882002-08-15 Hans-Peter Nilsson <hp@axis.com>
2289
2290 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
2291 missing check for whether the symbol is referenced by DSO before
2292 unexporting it as an unneeded dynamic symbol.
2293
e8d5d179
L
22942002-08-14 H.J. Lu <hjl@gnu.org>
2295
2296 * libbfd.h: Regenerate.
2297
e9229007
L
22982002-08-14 H.J. Lu <hjl@gnu.org>
2299
2300 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
2301
1fd03b5a
SC
23022002-08-14 Stephane Carrez <stcarrez@nerim.fr>
2303
2304 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
2305 instructions.
2306 (m68hc11_direct_relax): New to define table of relaxable instructions.
2307 (find_relaxable_insn): New, find a relaxable insn.
2308 (compare_reloc): New to compare two relocs.
2309 (m68hc11_elf_relax_section): New, relax text sections.
2310 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
2311 (elf32_m68hc11_check_relocs): New function for GC support.
2312 (elf32_m68hc11_relocate_section): New function for GC support.
2313 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
2314 (elf_backend_check_relocs): Likewise.
2315 (elf_backend_relocate_section): Likewise.
2316
c828c771
L
23172002-08-13 H.J. Lu <hjl@gnu.org>
2318
2319 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
2320 definitions in shared objects when checking symbol with
2321 undefined version.
2322
9b701e44
SC
23232002-08-13 Stephane Carrez <stcarrez@nerim.fr>
2324
2325 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
2326 (elf32_m68hc11_gc_sweep_hook): Likewise.
2327 (elf_backend_gc_mark_hook): Define for GC section support.
2328 (elf_backend_gc_sweep_hook): Likewise.
2329 (elf_backend_can_gc_sections): Likewise.
2330
2331 * elf32-m68hc12.c: Likewise.
2332
96405e3c
SC
23332002-08-13 Stephane Carrez <stcarrez@nerim.fr>
2334
2335 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
2336 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
2337 (_bfd_m68hc11_elf_set_private_flags): New function.
2338 Use them to set/check/print ELF flags specific to 68HC11.
2339
2340 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
2341 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
2342 (_bfd_m68hc12_elf_set_private_flags): New function.
2343 Use them to set/check/print ELF flags specific to 68HC12.
2344
dae78fb0
SC
23452002-08-13 Stephane Carrez <stcarrez@nerim.fr>
2346
2347 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
2348 fix masks for PC-rel relocs.
2349 (m68hc11_elf_ignore_reloc): New function.
2350
2351 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
2352 68HC12 banked addressing relocs.
2353 (m68hc12_phys_addr): New to compute physical address of banked memory.
2354 (m68hc12_phys_page): Likewise for page.
2355 (m68hc12_addr_is_banked): New to see if address is in banked area.
2356 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
2357
3dbfec86
SC
23582002-08-13 Stephane Carrez <stcarrez@nerim.fr>
2359
2360 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
2361 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
2362 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
2363 * bfd-in2.h: Regenerate.
2364
871da94f
L
23652002-08-12 H.J. Lu <hjl@gnu.org>
2366
2367 * elflink.h (elf_add_default_symbol): Preserve section across
2368 elf_merge_symbol.
2369
59bc061d
NC
23702002-08-09 Graeme Peterson <gp@qnx.com>
2371
51020317 2372 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
2373 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
2374 * Makefile.in: Regenerate.
2375 * config.bfd: Add support for powerpc{le}-*-nto targets.
2376 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
2377 * configure: Regenerate.
2378 * elf32-i386qnx.c: Moved backend functions into a QNX specific
2379 common file "elf32-qnx.h", and now include that file.
2380 * elf32-qnx.h: New file: QNX specific common elf backend.
2381 * elf32-ppc.c: Do not include elf32-target.h if
2382 ELF32_PPC_C_INCLUDED is defined.
2383 * elf32-ppcqnx.c: New file: Support for QNX.
2384 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
2385 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
2386
2b692c59
NC
23872002-08-09 Nick Clifton <nickc@redhat.com>
2388
2389 * po/sv.po: Updated Swedish translation.
2390
d0c7ff07
TS
23912002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2392
2393 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
2394 g->global_gotsym is NULL.
2395
d8bbe778
L
23962002-08-08 H.J. Lu <hjl@gnu.org>
2397
c5cd6d62 2398 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
2399 overrides an indirect versioned symbol.
2400
c366c25e
JJ
24012002-08-08 Jakub Jelinek <jakub@redhat.com>
2402
2403 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
2404 for R_386_TLS_TPOFF32 relocs against symndx 0.
2405
31941635
L
24062002-08-07 H.J. Lu <hjl@gnu.org>
2407
2408 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
2409 with undefined version if needed.
2410 (elf_link_assign_sym_version): Match a default symbol with a
2411 version without definition. No need to hide the default
2412 definition separately.
2413
0f3bd64f
AM
24142002-08-08 Alan Modra <amodra@bigpond.net.au>
2415
7330fb86
AM
2416 * elflink.h (elf_link_output_extsym): Don't output symbols from
2417 SEC_EXCLUDE sections.
2418
0f3bd64f
AM
2419 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
2420
a4aa0fb7
AM
24212002-08-07 Alan Modra <amodra@bigpond.net.au>
2422
2423 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
2424 entries.
2425
34ea4a36
TS
24262002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2427
2428 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
2429 mismatch.
2430
141ff970
TS
24312002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2432
2433 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
2434
28458e7e
TS
24352002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2436
2437 * elf32-mips.c (mips_reloc_map): Fix typo.
2438
0121a3da
AM
24392002-08-06 Alan Modra <amodra@bigpond.net.au>
2440
2441 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
2442
d006db6c
AM
24432002-08-06 Alan Modra <amodra@bigpond.net.au>
2444
2445 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
2446
8ea80f08
AM
24472002-08-06 Alan Modra <amodra@bigpond.net.au>
2448
2a52da53
AM
2449 * libxcoff.h: Use PARAMS on function declarations.
2450 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
2451 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2452
8ea80f08
AM
2453 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
2454 addend.
2455 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
2456
cf9ab45b
AM
24572002-08-06 Alan Modra <amodra@bigpond.net.au>
2458
2459 * coff-rs6000.c: Formatting fixes.
2460 (xcoff_calculate_relocation): Use PARAMS in declaration.
2461 (xcoff_complain_overflow): Likewise.
2462 (xcoff_ppc_relocate_section): Use old-style function pointer call.
2463 (bfd_xcoff_backend_data): Remove useless comments.
2464 (rs6000coff_vec): Likewise.
2465 (bfd_pmac_xcoff_backend_data): Likewise.
2466 (pmac_xcoff_vec): Likewise.
8ea80f08 2467
cf9ab45b
AM
2468 * coff64-rs6000.c: Formatting fixes.
2469 (xcoff64_calculate_relocation): Use PARAMS in declaration.
2470 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
2471 (bfd_xcoff_backend_data): Remove useless comments.
2472 (rs6000coff64_vec): Likewise.
2473 (bfd_xcoff_aix5_backend_data): Likewise.
2474 (aix5coff64_vec): Likewise.
2475
48bfecdd
AM
24762002-08-06 Alan Modra <amodra@bigpond.net.au>
2477
a78eab4e
AM
2478 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
2479 mask entries. Use complain_overflow_dont for R_REF.
2480 (xcoff_reloc_type_ba): Revert last change.
2481 (xcoff_reloc_type_br): Likewise.
2482 (xcoff_reloc_type_crel): Likewise.
2483 (xcoff_ppc_relocate_section): Likewise.
2484 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
2485 (xcoff64_ppc_relocate_section): Likewise.
2486 (xcoff64_howto_table): Revert some of last change to mask entries.
2487 Use complain_overflow_dont for R_REF.
2488
48bfecdd
AM
2489 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
2490 relocs with bitsize == 16 have size = 1.
2491 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
2492 (xcoff_reloc_type_br): Likewise.
2493 (xcoff_reloc_type_crel): Likewise.
2494 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
2495 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
2496 dst_mask adjustment.
2497 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
2498 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
2499 bitsize == 16 have size = 1.
2500
fd13ed0c
DC
25012002-08-01 Denis Chertykov <denisc@overta.ru>
2502
2503 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
2504 (struct misc): New field isymbuf. All free_* fields removed.
2505 (symbol_value): Pass in internal syms. No need to swap syms in.
2506 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
2507 possibly cached info.
2508 (tidyup_after_error): Removed.
2509 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
2510 misc. Use new field.
2511 (adjust_all_relocations): Use internal syms. No need to swap syms
2512 in and out.
2513 (add_page_insn): Don't use removed fields of struct misc.
2514
24a1ba0f
NC
25152002-08-01 Nick Clifton <nickc@redhat.com>
2516
2517 * elf32-arm.h: Revert previous delta.
2518
a6903459
NC
25192002-08-01 Nick Clifton <nickc@redhat.com>
2520
2521 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
2522 * configure: Regenerate.
2523
39a2a3eb
L
25242002-07-31 H.J. Lu <hjl@gnu.org>
2525
2526 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
2527 selected.
2528
a0dfa6a8
L
25292002-07-31 H.J. Lu <hjl@gnu.org>
2530
2531 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
2532 is selected.
2533
cd67d266
JJ
25342002-07-31 Jakub Jelinek <jakub@redhat.com>
2535
2536 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
2537 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
2538
4eb6b71c
NC
25392002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
2540
2541 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
2542 There is no 8 byte relocation type for this architecture.
2543 (do_ns32k_reloc): Use bfd_vma instead of native types.
2544 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
2545 returns void.
2546 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
2547 rely on generic code to do that.
2548 * aout-ns32k.c (howto_table): Add appropriate overflow detection
2549 to all table entries.
2550 (_bfd_ns32k_relocate_contents): put_data returns void.
2551 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
2552 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
2553 return void.
2554
f7c33884
NC
25552002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
2556
2557 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
2558 archive object is target dependant.
2559
8f64befb
NC
25602002-07-31 Adam Nemet <anemet@lnxw.com>
2561
2562 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
2563 (THUMB_PLT_ENTRY_SIZE): New macro.
2564 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
2565 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
2566 ARM_PLT_ENTRY_SIZE.
2567 (elf32_arm_plt_entry): Likewise.
2568 (elf_backend_plt_header_size): Likewise.
2569 (elf32_thumb_plt0_entry): New global.
2570 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
2571 into .plt.thumb.
2572 (elf32_thumb_plt_entry): New global.
2573 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
2574 Thumb entries. Set the bottom bit of the corresponding GOT entry
2575 for a Thumb PLT entry.
2576 (struct elf32_arm_plt_entry_info): New structure.
2577 (struct elf32_arm_link_hash_entry, plt_info): New member of this
2578 type.
2579 (elf32_arm_link_hash_newfunc): Initialize new member.
2580 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
2581 relocations against the PLT.
2582 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
2583 first_rel_type if this is the first time we encounter the symbol.
2584 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
2585 Determine if relocation needs a PLT entry. Set first_rel_type if
2586 this is the first time we encounter the symbol
2587 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
2588 functions as well.
2589 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
2590 (elf32_arm_create_dynamic_sections): New function. Create the
2591 .plt.thumb section.
2592 (elf_backend_create_dynamic_sections): Call it.
2593
47badb7b
NC
25942002-07-31 Nick Clifton <nickc@redhat.com>
2595
2596 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
2597 'alternative' in order to avoid shadowing global symbol of the
2598 same name.
2599 * bfd-in2.h: Regenerate.
2600 * libbfd.h: Regenerate.
2601 * libcoff.h: Regenerate.
2602
8a397dad
TS
26032002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2604
2605 * Makefile.am: Add n32 ABI support.
2606 * Makefile.in: Regenerate.
2607 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
2608 bit vectors for mips*-*-linux targets as optional.
2609 * configure.in: Add n32 ABI vectors.
2610 * configure: Regenerate.
2611 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
2612 * elfn32-mips.c: New file, n32 ABI support.
2613 * targets.c: Add n32 ABI vectors.
2614
7e392df6 26152002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 2616
7e392df6
NC
2617 * elfarmqnx-nabi.c: New file: Support for QNX.
2618 * config.bfd: Add support for arm-*-nto target.
2619 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
2620 * configure: Regenerate.
2621 * Makefile.am: Add entries for elfarmqnx-nabi.c.
2622 * Makefile.in: Regenerate.
2623 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
2624 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
2625 * elfarm-nabi.c: Do not include elf32-arm.h if
2626 ELFARM_NABI_C_INCLUDED is defined.
2627 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 2628
7e392df6 26292002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 2630
83e1617e
NC
2631 * po/sv.po: Updated Swedish translation.
2632
704afa60
JJ
26332002-07-30 Jakub Jelinek <jakub@redhat.com>
2634
2635 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
2636
487e54f2
AM
26372002-07-30 Alan Modra <amodra@bigpond.net.au>
2638
2639 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
2640 * archive.c (bfd_generic_archive_p): Likewise.
2641 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
2642 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
2643 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
2644 (xcoff64_archive_p): Likewise.
2645 (xcoff64_openr_next_archived_file): Likewise.
2646 (xcoff64_archive_p): Clean up tdata properly on error.
2647 * coffgen.c (coff_real_object_p): Likewise.
2648 (coff_object_p): Release filehdr and opthdr.
2649 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
2650 * ieee.c (ieee_archive_p): Likewise.
2651 * ihex.c (ihex_object_p): Likewise.
2652 (ihex_mkobject): Always allocate tdata.
2653 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
2654 * srec.c (srec_mkobject): Always allocate tdata.
2655 (srec_object_p): Clean up tdata properly on error.
2656 (symbolsrec_object_p): Likewise.
2657 * versados.c (versados_object_p): Likewise.
2658 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
2659 and bfd_realloc instead of realloc.
2660 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
2661 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
2662 place of bfd_malloc, simplifying error freeing. Free hash table too.
2663 (vms_object_p): Clean up tdata on error.
2664 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
2665 (vms_close_and_cleanup): Adjust for bfd_alloc use.
2666
9d46020e
AM
26672002-07-30 Alan Modra <amodra@bigpond.net.au>
2668
2669 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
2670
fb39dac1
RS
26712002-07-26 Chris Demetriou <cgd@broadcom.com>
2672
2673 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
2674 flags into resulting BFD.
2675
7a624474
AM
26762002-07-26 Alan Modra <amodra@bigpond.net.au>
2677
2678 From John Reiser <jreiser@BitWagon.com>
2679 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
2680 tls_ldm_got.refcount.
2681
a4382ec6
TS
26822002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2683
2684 * elf64-mips.c: Update TODO comment.
2685 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
2686 mips_elf64_gprel16_reloca): Remove prototypes.
2687 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
2688 (UNUSED_RELOC): Replace by EMPTY_RELOC.
2689 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
2690 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
2691 R_MIPS_HIGHEST.
2692 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
2693 R_MIPS_GOT16. Remove wrong comments.
2694 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
2695 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
2696 from elf32-mips.c.
2697 (mips_elf64_hi16_reloc): Fix formatting.
2698 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
2699 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
2700 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
2701 (mips_elf64_gprel16_reloc): Make static. Add check for
2702 partial_inplace.
2703 (mips_elf64_gprel16_reloca): Remove.
2704 (mips_elf64_literal_reloc): New function.
2705 (mips_elf64_gprel32_reloc): Fix formatting.
2706 (mips_elf64_shift6_reloc): Fix comment. Make static.
2707 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
2708 elf32-mips.c.
2709 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
2710 elf32-mips.c
2711 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
2712 specific relocations.
2713 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
2714 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
2715 (ELF_MAXPAGESIZE): Add comment.
2716
219576a4
NC
27172002-07-25 Nick Clifton <nickc@redhat.com>
2718
2719 * po/sv.po: Updated Swedish translation.
2720 * po/es.po: Updated Spanish translation.
2721 * po/fr.po: Updated French translation.
2722
8c58d23b
AM
27232002-07-25 Alan Modra <amodra@bigpond.net.au>
2724
2725 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
2726 as elf_link_record_local_dynamic_symbol.
2727 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
2728 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
2729 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
2730 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
2731 attempt is made to record a symbol in a discarded section, and
2732 return `2' in that case.
2733
ff3063f5
NC
27342002-07-24 Nick Clifton <nickc@redhat.com>
2735
2736 * po/sv.po: Updated Swedish translation.
2737 * po/es.po: Updated Spanish translation.
2738
f0fe0e16
AM
27392002-07-23 Alan Modra <amodra@bigpond.net.au>
2740
c1fb5f8a
AM
2741 * po/SRC-POTFILES.in: Regenerate.
2742
f0fe0e16
AM
2743 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
2744 immediately. Remove code handling relocatable linking.
2745 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2746 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2747 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 2748 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
2749 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2750 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2751 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2752 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2753 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2754 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2755 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2756 * elf32-avr.c (elf_backend_rela_normal): Define.
2757 * elf32-cris.c: Likewise.
2758 * elf32-fr30.c: Likewise.
de2d743e 2759 * elf32-frv.c: Likewise.
f0fe0e16
AM
2760 * elf32-h8300.c: Likewise.
2761 * elf32-hppa.c: Likewise.
2762 * elf32-ip2k.c: Likewise.
2763 * elf32-sparc.c: Likewise.
2764 * elf32-v850.c: Likewise.
2765 * elf32-vax.c: Likewise.
2766 * elf64-hppa.c: Likewise.
2767 * elf64-sparc.c: Likewise.
2768 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 2769 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
2770 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2771 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2772 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2773 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2774 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2775 * elf-m10200.c (USE_RELA): Don't define.
2776 * elf-m10300.c: Likewise.
de2d743e 2777 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
2778 * elf32-i370.c: Likewise.
2779 * elf32-ip2k.c: Likewise.
2780 * elf32-m68k.c: Likewise.
2781 * elf32-mcore.c: Likewise.
2782 * elf32-ppc.c: Likewise.
2783 * elf32-s390.c: Likewise.
2784 * elf32-vax.c: Likewise.
2785 * elf64-ppc.c: Likewise.
2786 * elf64-s390.c: Likewise.
2787 * elf64-x86-64.c: Likewise.
2788 * elfxx-ia64.c: Likewise.
2789 * elf32-avr.c (USE_REL): Don't undef.
2790 * elf32-ip2k.c: Likewise.
2791
5e8d7549
NC
27922002-07-23 Nick Clifton <nickc@redhat.com>
2793
2794 * elf-bfd.h (struct elf_backend_data): Add new bitfield
2795 'want_p_paddr_set_to_zero'.
2796 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
2797 to false;
2798 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
2799 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
2800
9e12c7db
NC
28012002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
2802
2803 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
2804 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
2805 show the Copyright string.
2806 Minor formatting tidy ups.
2807
0461a601
NC
28082002-07-23 Nick Clifton <nickc@redhat.com>
2809
ff3063f5
NC
2810 * po/fr.po: Updated French translation.
2811 * po/sv.po: Updated Swedish translation.
0461a601 2812
fad2542d
AM
28132002-07-23 Alan Modra <amodra@bigpond.net.au>
2814
2815 * elflink.h (elf_link_input_bfd): Don't change internal symbols
2816 when outputting relocs.
2817
c0647bfc
JT
28182002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
2819
2820 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
2821 DT_PLTGOT into the dynamic section if there is a PLT.
2822
d01414a5
TS
28232002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2824
2825 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
2826 elf32-mips.c.
2827 (_bfd_mips_elf_write_section): Likewise.
2828 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
2829 (_bfd_mips_elf_write_section): Likewise.
2830 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
2831 (elf32_mips_write_section): Likewise.
2832 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
2833 (_bfd_mips_elf_write_section): Likewise.
2834
40c97fc6
AM
28352002-07-19 Alan Modra <amodra@bigpond.net.au>
2836
2837 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
2838 PT_IA_64_UNWIND segments for a given section.
2839
58378160
L
28402002-07-17 H.J. Lu <hjl@gnu.org>
2841
2842 * Makefile.am: Fix a typo.
2843 * Makefile.in: Regenerate.
2844
cf88bb9f
NC
28452002-07-15 Denis Chertykov <denisc@overta.ru>
2846 Frank Ch. Eigler <fche@redhat.com>
2847 Ben Elliston <bje@redhat.com>
2848 Alan Lehotsky <alehotsky@cygnus.com>
2849 John Healy <jhealy@redhat.com>
2850 Graham Stott <grahams@redhat.com>
2851 Jeff Johnston <jjohnstn@redhat.com>
2852
2853 * Makefile.am: Add support for ip2k.
2854 * Makefile.in: Regenerate.
2855 * doc/Makefile.in: Regenerate.
2856 * archures.c: Add support for ip2k.
2857 * config.bfd: Add support for ip2k.
2858 * configure.in: Add support for ip2k.
2859 * configure: Regenerate.
2860 * reloc.c: Add support for ip2k.
2861 * targets.c: Add support for ip2k.
2862 * bfd-in2.h: Regenerate.
2863 * libbfd.h: Regenerate.
2864 * cpu-ip2k.c: New file.
2865 * elf32-ip2k.c: New file.
2866
0dafd5f6
RE
28672002-07-17 Ian Rickards <irickard@arm.com>
2868
40c97fc6 2869 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
2870 just return the filename.
2871
36b08f12
AM
28722002-07-16 Moritz Jodeit <moritz@jodeit.org>
2873
2874 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
2875
58821868
AM
28762002-07-16 Alan Modra <amodra@bigpond.net.au>
2877
2878 * elflink.h: Formatting fixes, tidy prototypes.
2879 (elf_link_assign_sym_version): Move common code out of loop.
2880
c89583f8
AM
28812002-07-16 Alan Modra <amodra@bigpond.net.au>
2882
2883 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
2884 reloc section size is zero. Correct reloc output location.
2885
ba94744e
AM
28862002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
2887
2888 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
2889 the final type for the e_fsel selector when generating PA2.0W code.
2890 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
2891 relocations.
2892
96a94295
L
28932002-07-14 H.J. Lu <hjl@gnu.org>
2894
2895 * elflink.h (elf_link_assign_sym_version): Hide the default
2896 definition if there is a hidden versioned definition.
2897
6849c52f
HPN
28982002-07-12 Hans-Peter Nilsson <hp@axis.com>
2899
2900 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
2901 dynamic reference test in assertion when initializing GOT with
2902 static contents. Just assert that there are either no dynamic
2903 sections, the symbol is defined in the regular objects or that the
2904 symbol is undef weak. Tweak comment.
2905 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
2906 only if the symbol isn't defined in the program and isn't undef
2907 weak.
2908 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
2909 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
2910 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
2911 (elf_cris_discard_excess_program_dynamics): Don't consider
2912 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
2913
239e1f3a
AM
29142002-07-11 Alan Modra <amodra@bigpond.net.au>
2915
2916 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
2917 unresolved debugging relocs in dynamic applications.
2918 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2919 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2920 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2921 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2922 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2923 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2924
2f6d9989
AM
29252002-07-10 Alan Modra <amodra@bigpond.net.au>
2926
f5e87a1d
AM
2927 * elf64-ppc.c (ONES): Define.
2928 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
2929 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
2930 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
2931
2f6d9989
AM
2932 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
2933 (ppc64_elf_set_private_flags): Delete.
2934 (ppc64_elf_section_from_shdr): Delete.
2935 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
2936 (ppc64_elf_fake_sections): Delete.
2937 (bfd_elf64_bfd_set_private_flags): Don't define.
2938 (bfd_elf64_get_symbol_info): Likewise.
2939 (elf_backend_section_from_shdr): Likewise.
2940 (elf_backend_fake_sections): Likewise.
2941
0594c12d
AM
29422002-07-10 Marco Walther <Marco.Walther@sun.com>
2943
2944 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
2945 when not already set.
2946 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
2947 (elf_backend_fake_sections): Define.
2948
699cb9b8
AM
29492002-07-10 Alan Modra <amodra@bigpond.net.au>
2950
2951 * merge.c (_bfd_merge_section): Remove redundant output_section check.
2952 Formatting.
2953 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
2954
0a4787a0
HPN
29552002-07-09 Hans-Peter Nilsson <hp@axis.com>
2956
2957 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
2958 NULL sym_hashes to just before use.
2959 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
2960 symbol with non-default visibility.
2961 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
2962 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2963 Ditto.
2964 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
2965 symbol with non-default visibility.
2966 (cris_elf_check_relocs): At tests for local symbol before
2967 increasing h->plt.refcount, also check for non-default
2968 visibility. Ditto when checking for local symbol to eliminate
2969 pc-relative runtime relocs.
2970
aecc8f8a
AM
29712002-07-08 Alan Modra <amodra@bigpond.net.au>
2972
2973 * elf.c: Formatting.
2974 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
2975 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
2976 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
2977 segments.
2978
e9168c1e
MM
29792002-07-07 Mark Mitchell <mark@codesourcery.com>
2980 Alan Modra <amodra@bigpond.net.au>
2981
2982 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
2983 account the impact of relocation count overflow when computing
2984 section offsets.
2985 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
2986 or not to apply the PE COFF reloc overflow handling. Fix a
2987 fencepost error in deciding whether or not to use that technique.
2988
6cdc0ccc
AM
29892002-07-07 Alan Modra <amodra@bigpond.net.au>
2990
2991 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
2992 change type of locsyms.
2993 (bfd_elf_get_elf_syms): Declare.
2994 * elf.c (bfd_elf_get_elf_syms): New function.
2995 (group_signature): Use bfd_elf_get_elf_syms.
2996 (bfd_section_from_r_symndx): Likewise.
2997 * elfcode.h (elf_slurp_symbol_table): Likewise.
2998 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2999 (elf_link_add_object_symbols): Likewise. Reorganise to increase
3000 locality of various data structures. Properly free internal relocs.
3001 (elf_bfd_final_link): Properly free internal relocs.
3002 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
3003 (elf_link_input_bfd): Likewise.
3004 (elf_gc_mark): Likewise. Properly free internal relocs.
3005 (elf_gc_sweep): Properly free internal relocs.
3006 (elf_reloc_symbol_deleted_p): No need to swap syms in.
3007 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
3008 internal relocs.
3009 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
3010 Properly free possibly cached info.
3011 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
3012 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
3013 symbol swapping code.
3014 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
3015 Properly free possibly cached info.
3016 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
3017 (mn10300_elf_relax_delete_bytes): Likewise.
3018 (mn10300_elf_symbol_address_p): Likewise.
3019 (mn10300_elf_get_relocated_section_contents): Likewise.
3020 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
3021 (elf32_h8_relax_delete_bytes): Likewise.
3022 (elf32_h8_symbol_address_p): Likewise.
3023 (elf32_h8_get_relocated_section_contents): Likewise.
3024 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
3025 (m32r_elf_relax_delete_bytes): Likewise.
3026 (m32r_elf_get_relocated_section_contents): Likewise.
3027 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
3028 elf_section_data to determine whether cached.
3029 (sh_elf_relax_section): As above for elf-m10200.c.
3030 (sh_elf_relax_delete_bytes): Likewise.
3031 (sh_elf_get_relocated_section_contents): Likewise.
3032 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
3033 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
3034 reading of local syms.
3035 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3036 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
3037 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
3038 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
3039 relocs.
3040 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
3041 free internal relocs and section contents. Don't read symbols.
3042 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
3043 (elf32_hppa_size_stubs): Don't free local syms.
3044 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
3045 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
3046 possibly cached info.
3047 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3048 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
3049 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
3050 all_local_syms.
3051 (get_local_syms): Delete function.
3052 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
3053 on exit.
3054 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
3055
b3212001
JW
30562002-07-05 Jim Wilson <wilson@redhat.com>
3057
3058 * syms.c (decode_section_type): New.
3059 (bfd_decode_symclass): Call decode_section_type.
3060
894bb1ee
JJ
30612002-07-04 Jakub Jelinek <jakub@redhat.com>
3062
3063 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
3064 section content start.
3065 Reported by Michael Schumacher <mike@hightec-rt.com>.
3066
bc0ba537
AM
30672002-07-04 Alan Modra <amodra@bigpond.net.au>
3068
3069 * section.c (_bfd_strip_section_from_output): Remove unnecessary
3070 link order code. Don't actually remove the output section here;
3071 Just set a flag for the linker to do so.
3072 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
3073 sections when setting up output section dynsyms.
3074
797fc050
AM
30752002-07-04 Alan Modra <amodra@bigpond.net.au>
3076
3077 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
3078 fudge.
3079 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
3080 libs here instead.
3081
99881371
MS
30822002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
3083
3084 * elf64-s390.c (create_got_section): Set .got section alignment to
3085 8 bytes.
3086 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
3087
47d9a591
AM
30882002-07-02 Alan Modra <amodra@bigpond.net.au>
3089
3090 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
3091
179d3252
JT
30922002-07-01 Matt Thomas <matt@3am-software.com>
3093
3094 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
3095 to EF_VAX_*.
3096
4a14403c
TS
30972002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3098
3099 * elfxx-mips.c (ABI_64_P): Fix comment.
3100 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
3101 new section names for N64 ABI.
3102 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
3103 (mips_elf_calculate_relocation): Code formatting.
3104 (mips_elf_create_dynamic_relocation): Likewise.
3105 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
3106 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
3107 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
3108 in any NewABI.
3109 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
3110 for NewABI.
3111 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
3112 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
3113 here, too.
3114
607c0e09
AS
31152002-07-01 Andreas Schwab <schwab@suse.de>
3116
3117 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
3118 R_X86_64_64 to R_X86_64_RELATIVE.
3119
ba26fd96
AM
31202002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
3121
3122 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
3123 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
3124 Run "make dep-am".
3125 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
3126 host_aout_vec.
3127 * configure.in (vaxbsd_vec): Add.
3128 * targets.c (vaxbsd_vec): Add.
3129 * Makefile.in: Rebuild.
3130 * configure: Rebuild.
3131 * po/SRC-POTFILES.in: Rebuild.
3132
1e2f5b6e
AM
31332002-07-01 Alan Modra <amodra@bigpond.net.au>
3134
3135 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
3136 examining to gc_mark_hook, rather than the bfd.
3137 (elf_gc_sections): Adjust.
3138 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
3139 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
3140 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
3141 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
3142 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
3143 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
3144 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
3145 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
3146 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
3147 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
3148 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
3149 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
3150 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
3151 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
3152 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
3153 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
3154 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
3155 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
3156 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
3157 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
3158 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
3159 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
3160 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
3161 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
3162 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
3163 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
3164 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
3165 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
3166 redundant local sym tests.
3167 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
3168 (link_hash_newfunc): Init is_entry.
3169 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
3170 (ppc64_elf_link_hash_table_create): Init all_local_syms.
3171 (create_linkage_sections): Use bfd_make_section_anyway rather than
3172 bfd_make_section.
3173 (ppc64_elf_mark_entry_syms): New function.
3174 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
3175 up opd entry to function section map.
3176 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
3177 relocs that reference the opd section.
3178 (edit_opd): New function.
3179 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
3180 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
3181 (get_local_syms): Do so here. Exit if we already have local syms.
3182 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
3183 read local syms on non-ELF input.
3184 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
3185 than duplicating it's function here. Adjust free of internal
3186 relocs to suit.
3187 (ppc64_elf_relocate_section): Adjust local syms in opd section.
3188 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
3189 * elf32-hppa.c (elf32_hppa_size_stubs): Call
3190 _bfd_elf32_link_read_relocs rather than duplicating it's function
3191 here. Adjust free of internal relocs to suit.
3192
1b71fb54
AJ
31932002-07-01 Andreas Jaeger <aj@suse.de>
3194
3195 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
3196 are not allowed in shared libs code, enforce -fPIC.
3197
8d28f606
HPN
31982002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
3199
3200 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
3201 trailing zero-sequences when there's previous left-over data.
3202
5ac81c74
JL
32032002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
3204
3205 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
3206 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
3207 and opd_rel_sec in order for starting rela section. Check _raw_size.
3208 (elf_backend_reloc_type_class): Define.
3209
91a4d569
AM
32102002-06-27 Kevin Buettner <kevinb@redhat.com>
3211
3212 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
3213 DWARF2 formats.
3214
feee612b
AM
32152002-06-27 Alan Modra <amodra@bigpond.net.au>
3216
3217 * cpu-powerpc.c: Comment on ordering of arch_info.
3218 * elf32-ppc.c (ppc_elf_object_p): New function.
3219 (elf_backend_object_p): Define.
3220 * elf64-ppc.c (ppc64_elf_object_p): New function.
3221 (elf_backend_object_p): Define.
3222
a4e6cefc
JT
32232002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
3224
3225 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
3226 * configure: Regenerate.
3227
dae2dd0d
NC
32282002-06-25 Jason Eckhardt <jle@rice.edu>
3229
3230 * dwarf2.c (decode_line_info): Check unit->addr_size
3231 to read in the proper number of prologue bytes.
3232
680f9d5c
NC
32332002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
3234
3235 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
3236 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
3237 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
3238 been enabled.
dae2dd0d 3239
680f9d5c
NC
3240 * targets.c (_bfd_target_vector[]): Only include
3241 aix5coff64_vec if 64-bit bfd support has been enabled.
3242
d4c88bbb
AM
32432002-06-25 Alan Modra <amodra@bigpond.net.au>
3244
3245 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
3246 * elf32-hppa.c (hppa_add_stub): Likewise.
3247 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
3248 * elflink.h (elf_add_default_symbol): Fix comment typo.
3249 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
3250 (elf_link_add_object_symbols): Likewise.
3251 (elf_link_assign_sym_version): Likewise.
3252 * hash.c (bfd_hash_lookup): Likewise.
3253 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
3254 * section.c (bfd_get_unique_section_name): Likewise.
3255 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
3256 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
3257 (assign_section_numbers): Likewise.
3258 (_bfd_elfcore_make_pseudosection): Likewise.
3259 (elfcore_grok_lwpstatus): Likewise.
3260 (elfcore_grok_win32pstatus): Likewise.
3261 (elfcore_write_note): Constify input params. Use PTR instead of
3262 void *. Include terminating NUL in namesz. Correct padding.
3263 Support NULL "name" param. Use memcpy instead of strcpy.
3264 (elfcore_write_prpsinfo): Constify input params.
3265 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
3266 (elfcore_write_lwpstatus): Likewise.
3267 (elfcore_write_pstatus): Likewise.
3268 (elfcore_write_prfpreg): Likewise.
3269 (elfcore_write_prxfpreg): Likewise.
3270 * elf-bfd.h (elfcore_write_note): Update declaration.
3271 (elfcore_write_prpsinfo): Likewise.
3272 (elfcore_write_prstatus): Likewise.
3273 (elfcore_write_pstatus): Likewise.
3274 (elfcore_write_prfpreg): Likewise.
3275 (elfcore_write_prxfpreg): Likewise.
3276 (elfcore_write_lwpstatus): Likewise.
3277
b0ac09d2
NC
32782002-06-25 Jason Eckhardt <jle@rice.edu>
3279
3280 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
3281 symbols of type stProc and stStaticProc.
3282
32832002-06-25 Nick Clifton <nickc@redhat.com>
3284
3285 * ecoff.c: VArious formatting fixes.
3286
021d6096
AM
32872002-06-25 Alan Modra <amodra@bigpond.net.au>
3288
3289 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
3290
82e51918
AM
32912002-06-25 Alan Modra <amodra@bigpond.net.au>
3292
3293 * aout-adobe.c: Don't compare against "true" or "false.
3294 * aout-target.h: Likewise.
3295 * aoutx.h: Likewise.
3296 * archive.c: Likewise.
3297 * bout.c: Likewise.
3298 * cache.c: Likewise.
3299 * coff-a29k.c: Likewise.
3300 * coff-alpha.c: Likewise.
3301 * coff-i386.c: Likewise.
3302 * coff-mips.c: Likewise.
3303 * coff-or32.c: Likewise.
3304 * coff64-rs6000.c: Likewise.
3305 * coffcode.h: Likewise.
3306 * coffgen.c: Likewise.
3307 * cpu-ns32k.c: Likewise.
3308 * ecoff.c: Likewise.
3309 * ecofflink.c: Likewise.
3310 * elf.c: Likewise.
3311 * elf32-arm.h: Likewise.
3312 * elf32-cris.c: Likewise.
3313 * elf32-d30v.c: Likewise.
3314 * elf32-i386.c: Likewise.
3315 * elf32-mcore.c: Likewise.
3316 * elf32-ppc.c: Likewise.
3317 * elf32-sh.c: Likewise.
3318 * elf32-sh64.c: Likewise.
3319 * elf32-v850.c: Likewise.
3320 * elf64-alpha.c: Likewise.
3321 * elf64-sh64.c: Likewise.
3322 * elfcode.h: Likewise.
3323 * elfcore.h: Likewise.
3324 * elflink.h: Likewise.
3325 * elfxx-mips.c: Likewise.
3326 * i386os9k.c: Likewise.
3327 * ieee.c: Likewise.
3328 * libbfd.c: Likewise.
3329 * linker.c: Likewise.
3330 * mmo.c: Likewise.
3331 * nlm32-alpha.c: Likewise.
3332 * nlm32-i386.c: Likewise.
3333 * nlm32-ppc.c: Likewise.
3334 * nlm32-sparc.c: Likewise.
3335 * nlmcode.h: Likewise.
3336 * oasys.c: Likewise.
3337 * pdp11.c: Likewise.
3338 * peicode.h: Likewise.
3339 * reloc.c: Likewise.
3340 * som.c: Likewise.
3341 * srec.c: Likewise.
3342 * tekhex.c: Likewise.
3343 * vms.c: Likewise.
3344 * xcofflink.c: Likewise.
3345 * elf64-sparc.c: Edit comment to not use "== false".
3346
3347 * aoutf1.h: Don't use "? true : false".
3348 * ecoff.c: Likewise.
3349 * format.c: Likewise.
3350 * ieee.c: Likewise.
3351 * linker.c: Likewise.
3352 * mmo.c: Likewise.
3353 * oasys.c: Likewise.
3354
48fc70a2
AM
33552002-06-23 H.J. Lu <hjl@gnu.org>
3356
3357 * elflink.h (elf_link_add_archive_symbols): For the default
3358 version, check references with only one `@' first.
3359
47b7c2db
AM
33602002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
3361
3362 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
3363 function.
3364 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
3365 symbol table.
3366 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
3367 (elf64_hppa_size_dynamic_sections): Revise to use
3368 elf64_hppa_mark_milli_and_exported_functions.
3369 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
3370 symbols out of dynamic symbol table.
3371
f5d44ba0
AM
33722002-06-23 Alan Modra <amodra@bigpond.net.au>
3373
bb3fff1e
AM
3374 * Makefile.in: Regenerate.
3375 * libbfd.h: Regenerate.
3376 * bfd-in2.h: Regenerate.
3377 * configure: Regenerate.
3378 * po/SRC-POTFILES.in: Regenerate.
3379
f5d44ba0
AM
3380 * elflink.h: Comment typo fixes.
3381
33822002-06-23 H.J. Lu <hjl@gnu.org>
3383
3384 * elf-bfd.h (elf_link_loaded_list): New structure.
3385 (elf_link_hash_table): Add "loaded".
3386 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
3387 * elflink.h (elf_link_check_versioned_symbol): New function.
3388 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
3389
cc36acdf
NC
33902002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
3391
3392 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 3393 support an ELF style hash table, return true, indicating that
cc36acdf
NC
3394 nothing needed to be done, rather than false, indicating that the
3395 section's size could not be computed.
3396
4e5ba5b7
DB
33972002-06-18 Dave Brolley <brolley@redhat.com>
3398
3399 From Catherine Moore, Michael Meissner, Dave Brolley:
3400 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
3401 * targets.c: Support bfd_elf32_frv_vec.
3402 * reloc.c: Add FRV relocs.
3403 * configure.in: Add support for bfd-elf32-frv-vec.
3404 * config.bfd (targ_cpu): Add support for frv-*-elf.
3405 * archures.c: Add frv arch and machines.
3406 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
3407 (ALL_MACHINES_CFILES): Add cpu-frv.c.
3408 (BFD32_BACKENDS): Add elf32-frv.lo.
3409 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
3410 (cpu-frv.lo): New target.
3411 (elf32-frv.lo): New target.
3412 * cpu-frv.c: New file.
3413 * elf32-frv.c: New file.
3414
7ece0d85
JJ
34152002-06-18 Jakub Jelinek <jakub@redhat.com>
3416
3417 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
3418 e_shnum == 0.
3419 Only read the first section header if e_shoff is non-zero.
3420 Don't consider e_shstrndx if there are no sections.
3421
57fb03ac
TR
34222002-06-17 Tom Rix <trix@redhat.com>
3423
3424 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 3425 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
3426 complain_overflow_bitfield.
3427
341ca622
AM
34282002-06-17 Alan Modra <amodra@bigpond.net.au>
3429
767e34d1
AM
3430 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
3431 (bfd_fdopenr): Likewise.
3432 (bfd_openstreamr): Likewise.
3433 (bfd_openw): Likewise.
3434
341ca622
AM
3435 * targets.c: Sort target vecs.
3436 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
3437 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
3438 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
3439 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
3440 * configure.in: Sort target vecs. Add m88kmach3_vec.
3441 * configure: Regenerate.
3442
dfbbae4c
HPN
34432002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
3444
3445 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
3446 bpo_reloc_no to break sort order ties, not address of items.
3447
d663e1cd
JL
34482002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
3449
3450 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
3451 Skip excluded sections in determing __gp value.
3452 (elf_hppa_final_link_relocate): Use the symbol's address in
3453 R_PARISC_FPTR64 relocations that don't need an opd entry.
3454 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
3455 (elf64_hppa_finalize_dynreloc): Likewise.
3456 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
3457 (elf64_hppa_finish_dynamic_symbol): Break up assert.
3458
a8295218
NC
34592002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
3460
3461 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3462 alignment for .bss, .data and .text sections so that sse and sse2
3463 code will work.
3464 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3465
34662002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
3467
3468 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
3469 sh[1234]*-elf*.
3470
3db4b612
JL
34712002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
3472
2cb69dd3
JL
3473 * elflink.h (elf_bfd_final_link): Improve error handling for missing
3474 dynamic sections.
3475
3db4b612
JL
3476 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
3477 for a symbol that has no output section.
3478 (allocate_dynrel_entries): Correct comment.
3479 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
3480 unless we want one.
3481 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
3482 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
3483 with no section. Remove unnecessary parentheses.
3484
f3813499
TR
34852002-06-11 Tom Rix <trix@redhat.com>
3486
3487 * coffcode.h (coff_compute_section_file_positions): Add data
3488 section to AIX loader alignment check.
3489
f5d44ba0 3490 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
3491 alignment to 4 bytes.
3492 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
3493 power accessor macro.
3494 (do_shared_object_padding): Remove invalid assertion.
3495
0ebaf185
RS
34962002-06-10 Richard Sandiford <rsandifo@redhat.com>
3497
3498 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
3499 for removed output sections.
3500
ebe3e2d1
NC
35012002-06-10 Geoffrey Keating <geoffk@redhat.com>
3502
3503 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
3504 htab_alloc.
3505 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
3506
0b14c2aa
L
35072002-06-08 H.J. Lu <hjl@gnu.org>
3508
3509 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
3510 work around a long long bug in gcc 2.96 on mips.
3511
3c2bfad6
JT
35122002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
3513
3514 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
3515 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
3516 Regenerate dependency lists.
3517 * Makefile.in: Regenerate.
3518 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
3519 vax1knetbsd_vec to targ_selvecs.
3520 * configure.in: Add vax1knetbsd_vec.
3521 * configure: Regenerate.
3522 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
3523 * vax1knetbsd.c: New file.
3524 * vaxnetbsd.c: Update copyright years.
3525 (TARGET_PAGE_SIZE): Set to 0x1000.
3526 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
3527
91149be3
JT
35282002-06-08 Matt Thomas <matt@3am-software.com>
3529
3530 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
3531
21e15248
AM
35322002-06-08 Alan Modra <amodra@bigpond.net.au>
3533
3534 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
3535
986b7daa
AM
35362002-06-08 Alan Modra <amodra@bigpond.net.au>
3537
e90b95f6
AM
3538 * Makefile.am: Run "make dep-am".
3539 * Makefile.in: Regenerate.
3540
3f9c735e
AM
3541 * armnetbsd.c: Replace CONST with const.
3542 * corefile.c: Likewise.
3543 * elf32-dlx.c: Likewise.
3544 * elf64-mips.c: Likewise.
3545 * mmo.c: Likewise.
3546 * ns32knetbsd.c: Likewise.
3547
986b7daa
AM
3548 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
3549 table is elf64-sparc.
3550
5a659663
TS
35512002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3552
3553 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
3554 Fix RELA addends to get not shifted in the result. Don't do special
3555 handling of R_MIPS_64 for NewABI.
3556
9bab7074
AM
35572002-06-07 Alan Modra <amodra@bigpond.net.au>
3558
3559 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
3560 (NAME(aout,slurp_reloc_table)): Likewise.
3561 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
3562 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
3563 (xcoff_write_archive_contents_big): Likewise.
3564 (xcoff_generate_rtinit): Likewise.
3565 (xcoff_generate_rtinit): Likewise, and check error return.
3566 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
3567 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
3568 (coff_get_normalized_symtab): Likewise.
3569 (coff_make_empty_symbol): Likewise.
3570 (bfd_coff_set_symbol_class): Likewise.
3571 * cofflink.c (coff_link_add_symbols): Likewise.
3572 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
3573 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
3574 (bfd_ecoff_write_accumulated_debug): Likewise.
3575 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
3576 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
3577 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
3578 * ieee.c (do_with_relocs): Use bfd_zalloc.
3579 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
3580 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
3581 (NAME(aout,slurp_reloc_table)): Likewise.
3582 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
3583 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
3584 * som.c (som_build_and_write_symbol_table): Likewise.
3585 (som_slurp_string_table): Likewise.
3586 (som_slurp_symbol_table): Likewise.
3587 (som_bfd_ar_write_symbol_stuff): Likewise.
3588 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
3589 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
3590 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
3591 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
3592 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
3593
1126897b
AM
35942002-06-07 Alan Modra <amodra@bigpond.net.au>
3595
3596 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
3597 "group" union.
3598 (elf_group_name): Update.
3599 (elf_group_id): Define.
3600 (bfd_elf_set_group_contents): Declare.
3601 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
3602 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
3603 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
3604 that sym for the signature.
3605 (_bfd_elf_compute_section_file_positions): Don't call
3606 set_group_contents for "ld -r" case.
3607 (swap_out_syms): Use bfd_zalloc.
3608 * elflink.h (elf_link_add_archive_symbols): Likewise.
3609 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3610 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
3611
3fad3c7c
AM
36122002-06-07 Alan Modra <amodra@bigpond.net.au>
3613
3614 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
3615 relocs in opd for non-shared too.
3616
10f469bf 36172002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
3618
3619 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
3620 relocations.
3621
7217313c
NC
36222002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
3623
3624 * merge.c: Include libiberty.h.
3625 * elf-strtab.c: Include libiberty.h.
3626
6cb22815
AM
36272002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
3628
3629 * peXXigen.c (pe_print_idata): Remove unused variable.
3630
1ed89aa9
NC
36312002-06-06 David Heine <dlheine@tensilica.com>
3632
3633 * elf.c (assign_file_positions_for_segments): Remove unallocated
3634 sections from the section to segment mapping for PT_LOAD segments.
3635 Update comment about empty loadable segments.
3636
644c4c80
RS
36372002-06-06 Richard Sandiford <rsandifo@redhat.com>
3638
3639 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
3640 is within the .stabstr section.
3641
f8ecb12b
AM
36422002-06-06 Alan Modra <amodra@bigpond.net.au>
3643
3644 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
3645 are "const PTR", not "const PTR *".
3646 (bfd_elf32_swap_symbol_in): Likewise.
3647 (bfd_elf64_swap_symbol_in): Likewise.
3648 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
3649 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
3650 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3651 (elf_link_add_object_symbols): Likewise.
3652 (elf_link_record_local_dynamic_symbol): Likewise.
3653 (elf_link_input_bfd): Likewise.
3654 (elf_gc_mark): Likewise.
3655 (elf_reloc_symbol_deleted_p): Likewise.
3656 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3657 (mn10200_elf_relax_delete_bytes): Likewise.
3658 (mn10200_elf_symbol_address_p): Likewise.
3659 (mn10200_elf_get_relocated_section_contents): Likewise.
3660 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3661 (mn10300_elf_relax_section): Likewise.
3662 (mn10300_elf_relax_delete_bytes): Likewise.
3663 (mn10300_elf_symbol_address_p): Likewise.
3664 (mn10300_elf_get_relocated_section_contents): Likewise.
3665 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3666 (elf32_h8_relax_delete_bytes): Likewise.
3667 (elf32_h8_symbol_address_p): Likewise.
3668 (elf32_h8_get_relocated_section_contents): Likewise.
3669 * elf32-hppa.c (get_local_syms): Likewise.
3670 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3671 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3672 * elf32-sh.c (sh_elf_relax_section): Likewise.
3673 (sh_elf_relax_delete_bytes): Likewise.
3674 (sh_elf_get_relocated_section_contents): Likewise.
3675 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3676 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3677 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3678 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3679 * elf64-ppc.c (get_local_syms): Likewise.
3680 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3681 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3682
1ed89aa9 36832002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
3684
3685 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
3686
73ff0d56
AM
36872002-06-05 Alan Modra <amodra@bigpond.net.au>
3688
9dce4196
AM
3689 * elf.c (group_signature): Swap in the whole symbol, and handle
3690 extracting section symbol names.
3691 (setup_group): Add comment.
3692 (set_group_contents): When called from objcopy or ld, arrange for
3693 section contents to be written. Write group member output section
3694 indices to allow objcopy to reorganize sections.
3695 (_bfd_elf_copy_private_section_data): Copy group info.
3696
73ff0d56
AM
3697 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
3698 (bfd_elf32_swap_symbol_in): Update prototype.
3699 (bfd_elf64_swap_symbol_in): Likewise.
3700 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
3701 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
3702 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3703 (elf_link_add_object_symbols): Likewise.
3704 (elf_link_record_local_dynamic_symbol): Likewise.
3705 (elf_link_input_bfd): Likewise.
3706 (elf_gc_mark): Likewise.
3707 (elf_reloc_symbol_deleted_p): Likewise.
3708 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3709 (mn10200_elf_relax_delete_bytes): Likewise.
3710 (mn10200_elf_symbol_address_p): Likewise.
3711 (mn10200_elf_get_relocated_section_contents): Likewise.
3712 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3713 (mn10300_elf_relax_section): Likewise.
3714 (mn10300_elf_relax_delete_bytes): Likewise.
3715 (mn10300_elf_symbol_address_p): Likewise.
3716 (mn10300_elf_get_relocated_section_contents): Likewise.
3717 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3718 (elf32_h8_relax_delete_bytes): Likewise.
3719 (elf32_h8_symbol_address_p): Likewise.
3720 (elf32_h8_get_relocated_section_contents): Likewise.
3721 * elf32-hppa.c (get_local_syms): Likewise.
3722 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3723 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3724 * elf32-sh.c (sh_elf_relax_section): Likewise.
3725 (sh_elf_relax_delete_bytes): Likewise.
3726 (sh_elf_get_relocated_section_contents): Likewise.
3727 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3728 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3729 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3730 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3731 * elf64-ppc.c (get_local_syms): Likewise.
3732 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3733 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3734 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
3735 * elf64-alpha.c (alpha_elf_size_info): Likewise.
3736 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3737 * elf64-mips.c (mips_elf64_size_info): Likewise.
3738 * elf64-s390.c (s390_elf64_size_info): Likewise.
3739 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3740
53bfd6b4
MR
37412002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3742
3743 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
3744 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
3745 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
3746 _bfd_mips_elf_ignore_discarded_relocs.
3747 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
3748
d4df96e6
L
37492002-06-05 H.J. Lu <hjl@gnu.org>
3750
3751 * elfxx-mips.c (mips_elf_calculate_relocation): Call
3752 _bfd_elf_rel_local_sym for STT_SECTION relocations against
3753 the SEC_MERGE section.
3754
e61463e1
AM
37552002-06-05 Alan Modra <amodra@bigpond.net.au>
3756
3cac74d0
AM
3757 * coff-alpha.c: Update copyright date.
3758 * coff-mips.c: Likewise.
3759 * xcoff-target.h: Likewise.
3760
e61463e1
AM
3761 * bfd-in.h: Remove "taken from the source" comment.
3762 * libbfd-in.h: Likewise.
3763 * libcoff-in.h: Likewise.
3764 * bfd-in2.h: Regenerate.
3765 * libbfd.h: Regenerate.
3766 * libcoff.h: Regenerate.
3767
3768 * elf.c (bfd_elf_discard_group): Return true.
3769 * elf-bfd.h (bfd_elf_discard_group): Declare.
3770 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
3771 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
3772 * bfd.c (bfd_discard_group): Define.
3773 * targets.c (struct bfd_target): Add _bfd_discard_group.
3774 (BFD_JUMP_TABLE_LINK): Here too.
3775 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
3776 * aout-adobe.c (aout_32_bfd_discard_group): Define.
3777 * aout-target.h (MY_bfd_discard_group): Define.
3778 * aout-tic30.c (MY_bfd_discard_group): Define.
3779 * binary.c (binary_bfd_discard_group): Define.
3780 * bout.c (b_out_bfd_discard_group): Define.
3781 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
3782 * coffcode.h (coff_bfd_discard_group): Define.
3783 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
3784 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
3785 * i386msdos.c (msdos_bfd_discard_group): Define.
3786 * i386os9k.c (os9k_bfd_discard_group): Define.
3787 * ieee.c (ieee_bfd_discard_group): Define.
3788 * ihex.c (ihex_bfd_discard_group): Define.
3789 * mmo.c (mmo_bfd_discard_group): Define.
3790 * nlm-target.h (nlm_bfd_discard_group): Define.
3791 * oasys.c (oasys_bfd_discard_group): Define.
3792 * ppcboot.c (ppcboot_bfd_discard_group): Define.
3793 * som.c (som_bfd_discard_group): Define.
3794 * srec.c (srec_bfd_discard_group): Define.
3795 * tekhex.c (tekhex_bfd_discard_group): Define.
3796 * versados.c (versados_bfd_discard_group): Define.
3797 * vms.c (vms_bfd_discard_group): Define.
3798 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
3799 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
3800 (aix5coff64_vec): Likewise.
3801 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
3802
9cba27b2
JT
38032002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
3804
3805 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
3806 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
3807 (elf32-sh64-com.lo): New dependency list.
3808 * Makefile.in: Regenerate.
3809 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
3810 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
3811 elf32-sh64-com.lo.
3812 * configure: Regenerate.
3813 * elf32-sh64.c (sh64_address_in_cranges)
3814 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
3815 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
3816 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
3817 * elf32-sh64-com.c: ...here. New file.
3818
8d2c33be
AM
38192002-06-04 Alan Modra <amodra@bigpond.net.au>
3820
3821 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
3822 ATTRIBUTE_UNUSED on used params.
3823 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
3824 before calling bfd_section_from_elf_index on local syms.
3825 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
3826
5b0e55b6
JT
38272002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
3828
3829 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
3830 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
3831 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
3832 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
3833 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
3834 * Makefile.in: Regenerate.
3835 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
3836 (sh64-*-netbsd*): New targets.
3837 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
3838 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
3839 * configure: Regenerate.
3840 * elf32-sh64-nbsd.c: New file.
3841 * elf64-sh64-nbsd.c: New file.
3842 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
3843 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
3844 bfd_elf64_sh64lnbsd_vec.
3845
b885599b
AM
38462002-06-04 Alan Modra <amodra@bigpond.net.au>
3847
3848 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
3849 (bfd_section_from_shdr): Likewise. Set section name of group
3850 sections from signature.
3851 (group_signature): Split out from setup_group. Ensure symbol table
3852 is available.
3853 (bfd_elf_discard_group): New function.
3854 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
3855 .gnu.linkonce* sections if they are members of a group.
3856 (set_group_contents): Set GRP_COMDAT flag.
3857 * section.c (bfd_discard_group): New function.
3858 * bfd-in.h (bfd_elf_discard_group): Declare.
3859 * bfd-in2.h: Regenerate.
3860 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
3861 (elf_linkonce_p): Define.
3862
90937f86
AM
38632002-06-04 Alan Modra <amodra@bigpond.net.au>
3864
3865 * elf.c (bfd_section_from_shdr): Make "name" const.
3866 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
3867 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
3868 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3869 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3870 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3871 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3872 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3873 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
3874 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3875 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3876 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3877
cf6fb9ce
MR
38782002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3879
3880 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
3881 ABI.
3882
cedb70c5
KH
38832002-06-02 Kazu Hirata <kazu@cs.umass.edu>
3884
3885 * elf32-arc.c: Fix formatting.
3886 * elf32-arm.h: Likewise.
3887 * elf32-cris.c: Likewise.
3888 * elf32-dlx.c: Likewise.
3889 * elf32-hppa.c: Likewise.
3890 * elf32-i386.c: Likewise.
3891 * elf32-i386qnx.c: Likewise.
3892 * elf32-or32.c: Likewise.
3893 * elf32-s390.c: Likewise.
3894 * elf32-sh64.c: Likewise.
3895 * elf32-vax.c: Likewise.
3896 * elf32-xstormy16.c: Likewise.
3897 * elf64-alpha.c: Likewise.
3898 * elf64-mmix.c: Likewise.
3899 * elf64-ppc.c: Likewise.
3900 * elf64-s390.c: Likewise.
3901 * elf64-sh64.c: Likewise.
3902 * elf64-x86-64.c: Likewise.
3903
048d873d
RH
39042002-06-02 Richard Henderson <rth@redhat.com>
3905
3906 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
3907 null when there are no got entries for a symbol.
3908 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
3909 uninitialized variable warning.
3910
4a67a098
RH
39112002-06-01 Richard Henderson <rth@redhat.com>
3912
3913 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
3914 undefined symbols here.
3915 (elf64_alpha_relax_section): Do it here. Also test for not
3916 defined in the current module.
3917 (elf64_alpha_relocate_section_r): Split out of ...
3918 (elf64_alpha_relocate_section): ... here. Don't dereference
3919 NULL when looking up local got entries.
3920
f44f99a5
RH
39212002-06-01 Richard Henderson <rth@redhat.com>
3922
3923 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
3924 symbols from JSR relaxation.
3925 (elf64_alpha_size_plt_section_1): New.
3926 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
3927 (elf64_alpha_size_rela_got_1): ... here.
3928 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
3929 (elf64_alpha_size_rela_got_section): ... here.
3930 (elf64_alpha_size_plt_section): New.
3931 (elf64_alpha_relax_section): Call them.
3932 (elf64_alpha_size_got_sections): Remove output_bfd arg.
3933 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
3934
9e756d64
RH
39352002-06-01 Richard Henderson <rth@redhat.com>
3936
3937 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
3938 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
3939 in shared libraries. Fix DTPRELHI and TPRELHI value.
3940 (INSN_ADDQ, INSN_RDUNIQ): New.
3941 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
3942 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
3943 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
3944 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
3945 Handle GOTDTPREL and GOTTPREL relocations.
3946 (elf64_alpha_relax_gprelhilo): New.
3947 (elf64_alpha_relax_tls_get_addr): New.
3948 (elf64_alpha_relax_find_tls_segment): New.
3949 (elf64_alpha_relax_section): Handle TLS relocations.
3950 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
3951 (elf64_alpha_check_relocs): Set it.
3952
c853d7f6
RH
39532002-06-01 Richard Henderson <rth@redhat.com>
3954
b646261c
RH
3955 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
3956
c853d7f6
RH
3957 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
3958 check; don't suppress dynamic relocs for non-allocated sections.
3959
d7e41a96
RH
3960 * elf64-alpha.c: Remove dead code.
3961
5f333394
AM
39622002-05-31 Alan Modra <amodra@bigpond.net.au>
3963
08e0ee05
AM
3964 * bfd-in2.h: Regenerate.
3965 * libbfd.h: Regenerate.
3966 * po/SRC-POTFILES.in: Regenerate.
3967
5f333394
AM
3968 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
3969 space for bss .plt.
3970
caf47ea6
AM
39712002-05-31 Graeme Peterson <gp@qnx.com>
3972
3973 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
3974 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
3975 Run "make dep-am".
3976 * Makefile.in: Regenerate.
3977 * config.bfd: Add i[3456]86-*-nto-qnx* support.
3978 * configure.in: Add bfd_elf32_i386qnx_vec support.
3979 * configure: Regenerate.
3980 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
3981 is_contained_by_filepos, and copy_private_bfd_data_p.
3982 * elf.c (assign_file_positions_for_segments): Call backend
3983 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
3984 (IS_CONTAINED_BY_FILEPOS): Define.
3985 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
3986 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
3987 Fix non-K&R call to _bfd_error_handler.
3988 (_bfd_elf_copy_private_section_data): Use backend
3989 copy_private_bfd_data_p.
3990 * elf32-i386.c: Don't include elfxx-target.h when
3991 ELF32_I386_C_INCLUDED is defined.
3992 * elf32-i386qnx.c: New QNX elf backend file.
3993 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
3994 elf_backend_is_contained_by_filepos, and
3995 elf_backend_do_copy_private_bfd_data.
3996 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
3997
5bc56484
AM
39982002-05-31 Alan Modra <amodra@bigpond.net.au>
3999
4000 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
4001 Move other similar defines to start of file.
4002
1b164155
TR
40032002-05-30 Tom Rix <trix@redhat.com>
4004
4005 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
4006 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
4007
3765b1be
RH
40082002-05-30 Richard Henderson <rth@redhat.com>
4009
4010 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
4011 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
4012 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
4013 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
4014 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
4015 (struct alpha_elf_obj_tdata): Rename total_got_entries and
4016 n_local_got_entries to total_got_size and local_got_size.
4017 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
4018 (alpha_got_entry_size): New.
4019 (elf64_alpha_relax_with_lituse): Use it.
4020 (elf64_alpha_relax_without_lituse): Likewise.
4021 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
4022 (get_got_entry): New.
4023 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
4024 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
4025 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
4026 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
4027 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
4028 (elf64_alpha_calc_got_offsets): Likewise.
4029 (alpha_dynamic_entries_for_reloc): New.
4030 (elf64_alpha_calc_dynrel_sizes): Use it.
4031 (elf64_alpha_size_dynamic_sections): Likewise.
4032 (elf64_alpha_relocate_section): Handle TLS relocations.
4033 * reloc.c: Add Alpha TLS relocations.
4034 * bfd-in2.h, libbfd.h: Rebuild.
4035
5e226794
NC
40362002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4037
4038 * peXXigen.c (pe_print_idata): Remove double printed
4039 import table lines; add Bound-To comment.
4040
90ace9e9
JT
40412002-05-29 Matt Thomas <matt@3am-software.com>
4042
4043 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
4044 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
4045 (elf32-vax.lo): New rule.
4046 * Makefile.in: Regenerate.
4047 * configure.in (bfd_elf32_vax_vec)
4048 (vaxnetbsd_vec): New vectors.
4049 * configure: Regenerate.
4050 * config.bfd (vax-*-netbsdelf*)
4051 (vax-*-netbsdaout*)
4052 (vax-*-netbsd*): New targets.
4053 * elf32-vax.c: New file.
4054 * reloc.c: Add VAX relocations.
4055 * bfd-in2.h: Regenerate.
4056 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
4057
4a253e81
JT
40582002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
4059
4060 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
4061 and bfd_elf32_bigarm_vec to targ_selvecs.
4062
6e7c73dd
CF
40632002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4064
4065 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
4066 with auto-imported symbols.
4067
8afb0e02
NC
40682002-05-29 Adam Nemet <anemet@lnxw.com>
4069
4070 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
4071 sections only record bfd.
9bab7074 4072 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 4073 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 4074 * bfd-in2.h: Regenerate.
8afb0e02 4075
a95653f5
NC
40762002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
4077
4078 * syms.c (_bfd_stab_section_find_nearest_line): Move
4079 declaration and initialisation of saw_line and saw_func out of
4080 for loop.
4081
7cdc5bba
AM
40822002-05-29 Alan Modra <amodra@bigpond.net.au>
4083
4084 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
4085 (bfd_elf64_get_symbol_info): Define.
4086 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
4087
4c7aad1c
AM
40882002-05-29 Andrey Volkov <avolkov@transas.com>
4089
4090 * cpu-h8300.c: Make default h8300 machine first in machine list.
4091
d172d4ba
NC
40922002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
4093
4094 * config.bfd: Added DLX configuraton.
4095 * Makefile.am: Added DLX configuraton.
4096 * configure.in: Added DLX configuraton.
4097 * archures.c: Add DLX architecure.
4098 * reloc.c: Add DLX relocs.
4099 * targets.c: Added DLX target vector.
4100 * configure: Regenerate.
4101 * Makefile.in: Regenreate.
4102 * bfd-in2.h: Regenreate.
4103 * elf32-dlx.c: New file: Support DLX target.
4104 * cpu-dlx.c: New file: Support DLX target.
4105
d1329ca3
AM
41062002-05-25 Alan Modra <amodra@bigpond.net.au>
4107
428d0de3
AM
4108 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
4109
d1329ca3
AM
4110 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
4111 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
4112 strings to point inside function code sym string.
4113 (func_desc_adjust): Likewise.
4114 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
4115
3bab7989
ML
41162002-05-24 Michal Ludvig <mludvig@suse.cz>
4117
4118 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
4119 (elf64_x86_64_grok_psinfo): Added.
4120
436e8db0
NC
41212002-05-24 TAMURA Kent <kent@netbsd.org>
4122
4123 * config.bfd: Add a target for i386-netbsdpe.
4124
ea1e4b0d
AM
41252002-05-24 Alan Modra <amodra@bigpond.net.au>
4126
4127 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
4128 and is_func_descriptor.
4129 (func_desc_adjust): Hide function code sym in shared libs unless
4130 there is a matching exported function descriptor sym.
4131
13ae64f3
JJ
41322002-05-23 Jakub Jelinek <jakub@redhat.com>
4133
4134 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
4135 for symbols from SHF_TLS section.
4136 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
4137 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
4138 (map_sections_to_segments): Build PT_TLS segment if necessary.
4139 (assign_file_positions_for_segments): Likewise.
4140 (get_program_header_size): Account for PT_TLS segment.
4141 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
4142 SEC_THREAD_LOCAL sections to STT_TLS.
4143 * reloc.c: Add 386 and IA-64 TLS relocs.
4144 * section.c (SEC_THREAD_LOCAL): Define.
4145 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
4146 Remove.
4147 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
4148 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
4149 unconditionally.
4150 (struct elf_final_link_info): Add first_tls_sec.
4151 (elf_bfd_final_link): Set first_tls_sec.
4152 Compute elf_hash_table (info)->tls_segment.
4153 (elf_link_output_extsym): Handle STT_TLS symbols.
4154 (elf_link_input_bfd): Likewise.
4155 * syms.c (BSF_THREAD_LOCAL): Define.
4156 * bfd-in2.h: Rebuilt.
4157 * libbfd.h: Rebuilt.
4158 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
4159 elf_i386_mkobject, elf_i386_object_p): New functions.
4160 (elf_howto_table): Add TLS relocs.
4161 (elf_i386_reloc_type_lookup): Support TLS relocs.
4162 (elf_i386_info_to_howto_rel): Likewise.
4163 (struct elf_i386_link_hash_entry): Add tls_type.
4164 (struct elf_i386_obj_tdata): New.
4165 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
4166 New macros.
4167 (struct elf_i386_link_hash_table): Add tls_ldm_got.
4168 (link_hash_newfunc): Clear tls_type.
4169 (elf_i386_check_relocs): Support TLS relocs.
4170 (elf_i386_gc_sweep_hook): Likewise.
4171 (allocate_dynrelocs): Likewise.
4172 (elf_i386_size_dynamic_sections): Likewise.
4173 (elf_i386_relocate_section): Likewise.
4174 (elf_i386_finish_dynamic_symbol): Likewise.
4175 (bfd_elf32_mkobject, elf_backend_object_p): Define.
4176 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
4177 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
4178 want_tprel, want_dtpmod, want_dtprel.
4179 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
4180 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
4181 R_IA64_LTOFF_TPREL22.
4182 (elf_code_to_howto_index): Add TLS relocs.
4183 (elfNN_ia64_check_relocs): Support TLS relocs.
4184 (allocate_global_data_got): Account for TLS .got data.
4185 (allocate_dynrel_entries): Account for TLS dynamic relocations.
4186 (elfNN_ia64_install_value): Supprt TLS relocs.
4187 (set_got_entry): Support TLS relocs.
4188 (elfNN_ia64_relocate_section): Likewise.
4189
c62e1cc3
NC
41902002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4191
4192 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
4193 BLX reloc round the relocation up rather than down.
4194 * coff-arm.c (coff_arm_relocate_section): Likewise.
4195
c5a43a5d
L
41962002-05-21 H.J. Lu (hjl@gnu.org)
4197
4198 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
4199 definition.
4200
afbe61cf
AM
42012002-05-22 Alan Modra <amodra@bigpond.net.au>
4202
4203 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
4204 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
4205
9c07fe7c
AM
42062002-05-22 Alan Modra <amodra@bigpond.net.au>
4207
4208 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
4209 unresolved relocs.
4210 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
4211
21611032
TS
42122002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4213
c5cd6d62 4214 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
4215 non-ELF targets.
4216
41241523
TS
42172002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4218
4219 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
4220 an error value.
4221 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
4222 return with false on error.
4223 (elf_link_input_bfd): Check reloc_emitter return value.
4224
658f2588
JT
42252002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
4226
4227 * config.bfd (armeb-*-netbsdelf*): New target.
4228
c862ae31
AM
42292002-05-20 Alan Modra <amodra@bigpond.net.au>
4230
4231 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
4232 at the plt call stub.
4233
6dd14845
TS
42342002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4235
4236 * cpu-mips.c (mips_compatible): Don't try to check machine
4237 compatibility.
4238
a58d9c34
TR
42392002-05-18 Tom Rix <trix@redhat.com>
4240
4241 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
4242
ef60b7ff
AM
42432002-05-17 Alan Modra <amodra@bigpond.net.au>
4244
4245 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
4246 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
4247 we've already warned about an undefined symbol. Report more
4248 detail on reloc errors.
4249
a703a6ea
AM
42502002-05-17 Alan Modra <amodra@bigpond.net.au>
4251
4252 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
4253 * configure.in: Invoke AM_INSTALL_LIBBFD.
4254 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
4255 (install_libbfd): .. New target.
4256 (uninstall_libbfd): Likewise.
4257 (install-bfdlibLTLIBRARIES): Likewise.
4258 (uninstall-bfdlibLTLIBRARIES): Likewise.
4259 (bfdlibdir): New.
4260 (bfdincludedir): New.
4261 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
4262 * aclocal.m4: Regenerate.
4263 * configure: Regenerate.
4264 * Makefile.in: Regenerate.
4265
2c13d98b
NC
42662002-05-17 Stuart Balfour <sbalfour@cisco.com>
4267
4268 * hash.c (bfd_hash_lookup): Remove computation of len from inside
4269 hash loop.
4270
629936c5
NC
42712002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
4272
4273 * config.bfd: Add targets for sh64-linux (little endian and
4274 big endian).
4275
e4cf60a8
NC
42762002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
4277
4278 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
4279 is located in the same section as the import table. Instead
4280 check, and if necessary load the section containing the thunk.
4281
d1e66cd4
NC
42822002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
4283
4284 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
4285 bfd_bread.
4286 (xcoff64_core_file_matches_executable_p): Replace bfd_read
4287 with bfd_bread.
d1e66cd4 4288
2d653fc7
AM
42892002-05-15 Alan Modra <amodra@bigpond.net.au>
4290
4291 * aix5ppc-core.c: Warning fixes.
4292 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
4293 * aout-target.h (MY_bfd_link_just_syms): Define.
4294 * aout-tic30.c (MY_bfd_link_just_syms): Define.
4295 * bfd.c (bfd_link_just_syms): Define.
4296 * binary.c (binary_bfd_link_just_syms): Define.
4297 * bout.c (b_out_bfd_link_just_syms): Define.
4298 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
4299 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
4300 * coffcode.h (coff_bfd_link_just_syms): Define.
4301 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
4302 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
4303 (_bfd_elf_link_just_syms): Declare.
4304 * elf.c (_bfd_elf_link_just_syms): New function.
4305 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
4306 sections haven't already been discarded by the linker.
4307 * elflink.h (elf_link_add_object_symbols): Likewise for stab
4308 sections and SEC_MERGE sections.
4309 (elf_bfd_discard_info): Similarly here.
4310 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
4311 * i386msdos.c (msdos_bfd_link_just_syms): Define.
4312 * i386os9k.c (os9k_bfd_link_just_syms): Define.
4313 * ieee.c (ieee_bfd_link_just_syms): Define.
4314 * ihex.c (ihex_bfd_link_just_syms): Define.
4315 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
4316 (_bfd_generic_link_just_syms): Declare.
4317 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
4318 * linker.c (_bfd_generic_link_just_syms): New function.
4319 * mmo.c (mmo_bfd_link_just_syms): Define.
4320 * nlm-target.h (nlm_bfd_link_just_syms): Define.
4321 * oasys.c (oasys_bfd_link_just_syms): Define.
4322 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
4323 * som.c (som_bfd_link_just_syms): Define.
4324 * srec.c (srec_bfd_link_just_syms): Define.
4325 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
4326 (BFD_JUMP_TABLE_LINK): And here.
4327 * tekhex.c (tekhex_bfd_link_just_syms): Define.
4328 * versados.c (versados_bfd_link_just_syms): Define.
4329 * vms.c (vms_bfd_link_just_syms): Define.
4330 * libbfd.h: Regenerate.
4331 * bfd-in2.h: Regenerate.
4332
cb7394f2
TS
43332002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4334
4335 * elf32-mips.c: Remove superfluous definitions copied from
4336 elfxx-mips.c.
4337 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
4338 SGIish vectors to check the special case.
4339 (mips_elf_hi16_reloc): Fix comment.
4340 (mips_elf_got16_reloc): Likewise.
4341 (_bfd_mips_elf32_gprel16_reloc): Likewise.
4342 (elf_reloc_map): Code cleanup.
4343 (mips_reloc_map): Add comment.
4344 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
4345 (mips_elf32_rtype_to_howto): Likewise.
4346 (mips_elf32_discard_info): Likewise.
4347 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
4348 lead to IRIX compatibility now.
4349
8dc1a139
TS
43502002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4351
4352 * elfxx-mips.c: Call it IRIX, not Irix in comments.
4353
2051e1b5
JT
43542002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
4355
4356 * config.bfd (shle-*-netbsdelf*): Add target which includes
4357 sh64 support.
4358
83954261
AM
43592002-05-13 David Edelsohn <edelsohn@gnu.org>
4360
4361 * configure.in: Revert 2002-04-07. Instead, auto-configure
4362 HAVE_ST_C_IMPL.
4363 * configure: Regenerate.
4364 * config.in: Regenerate.
4365 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
4366 or AIX_5_CORE.
4367
a9bf1154
NC
43682002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
4369
4370 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
4371 corefiles as well.2
4372 * configure: Regenerate.
4373
3129eb7a
AM
43742002-05-13 Alan Modra <amodra@bigpond.net.au>
4375
4376 * Makefile.am (install-data-local): Install headers to
4377 $(exec_prefix)/include.
4378 * Makefile.in: Regenerate.
4379
a9a32010
DJ
43802002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
4381 Daniel Jacobowitz <drow@mvista.com>
4382
4383 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
4384 map BFD_RELOC_RVA.
4385
43862002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
4387
4388 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
4389 hppa*-*-openbsd*): New targets.
4390 * configure.in (alpha*-*-openbsd*): Set COREFILE.
4391 * configure: Regenerate.
4392
f1f0d9ab
TR
43932002-05-10 Tom Rix <trix@redhat.com>
4394
ea1e4b0d 4395 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
4396 xcoff64_ppc_relocate_section.
4397 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
4398 * libxcoff.h: Common xcoff_reloc_type function declaration.
4399
c432ba1a
AM
44002002-05-10 Alan Modra <amodra@bigpond.net.au>
4401
16a10388 4402 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 4403 added in 2002-05-09 commit.
16a10388 4404
c432ba1a
AM
4405 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
4406 don't look for stubs on all undefined syms.
4407
4a335f3d
AM
44082002-05-09 Alan Modra <amodra@bigpond.net.au>
4409
8fc39d5d
AM
4410 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
4411 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
4412 pcrel_offset.
4413
4a335f3d
AM
4414 * elf32-i386.c (elf_howto_table): Comments.
4415 (elf_i386_relocate_section): Handle more relocs for relocatable
4416 linking and against SEC_MERGE sections.
4417
41fcb14e
AM
44182002-05-08 Alan Modra <amodra@bigpond.net.au>
4419
4420 * elf32-ppc.c (ppc_elf_create_got): New function.
4421 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 4422 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
4423 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
4424 _bfd_elf_create_got_section.
4425
b491616a
AM
44262002-05-07 Alan Modra <amodra@bigpond.net.au>
4427
4428 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
4429 * elfxx-target.h (elf_backend_rela_normal): Define.
4430 (elfNN_bed): Init rela_normal.
4431 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
4432 for section symbols here if rela_normal. Simplify abs section test.
4433 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
4434 return immediately. Remove code handling relocatable linking.
4435 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4436 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4437 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4438 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4439 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4440 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4441 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4442 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4443 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4444 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4445 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4446 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4447 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4448 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4449 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
4450 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4451 * elf-m10200.c (elf_backend_rela_normal): Define.
4452 * elf-m10300.c (elf_backend_rela_normal): Define.
4453 * elf32-fr30.c (elf_backend_rela_normal): Define.
4454 * elf32-i370.c (elf_backend_rela_normal): Define.
4455 * elf32-i860.c (elf_backend_rela_normal): Define.
4456 * elf32-m68k.c (elf_backend_rela_normal): Define.
4457 * elf32-mcore.c (elf_backend_rela_normal): Define.
4458 * elf32-openrisc.c (elf_backend_rela_normal): Define.
4459 * elf32-ppc.c (elf_backend_rela_normal): Define.
4460 * elf32-s390.c (elf_backend_rela_normal): Define.
4461 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
4462 * elf64-ppc.c (elf_backend_rela_normal): Define.
4463 * elf64-s390.c (elf_backend_rela_normal): Define.
4464 * elf64-x86-64.c (elf_backend_rela_normal): Define.
4465 * elfxx-ia64.c (elf_backend_rela_normal): Define.
4466 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
4467 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
4468
df212a7e
NC
44692002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
4470
4471 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
4472 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
4473
3decf53c
AM
44742002-05-06 Alan Modra <amodra@bigpond.net.au>
4475
4476 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
4477 when not relocatable. Fix reloc_emitter call for K&R.
4478
f46c2da6
AM
44792002-05-04 Alan Modra <amodra@bigpond.net.au>
4480
4481 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
4482 reloading local sym addend mistakenly removed in 2002-05-01 change.
4483
4484 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
4485 (read_abbrevs): Change "offset" param to bfd_vma.
4486 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
4487 Change "abbrev_offset" to bfd_vma.
4488 (read_indirect_string): Use correct conversion chars in error
4489 message format string, cast bfd_vma's to unsigned long.
4490 (read_abbrevs): Likewise.
4491 (read_attribute_value): Likewise.
4492 (decode_line_info): Likewise.
4493 (scan_unit_for_functions): Likewise.
4494 (parse_comp_unit): Likewise.
4495
59862849
TR
44962002-05-04 Tom Rix <trix@redhat.com>
4497
4498 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
4499 (coff_swap_reloc_out): Same.
4500 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
4501 (xcoff_swap_reloc_out): Same.
4502 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
4503 case some 16 bit relocs. Add reloc value to output.
4504 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 4505 R_RBR. Improve names.
59862849
TR
4506 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
4507 (bfd_xcoff_backend_data): Update with new reloc swap names.
4508 (bfd_pmac_xcoff_backend_data) : Same.
4509 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
4510 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 4511 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 4512 R_POS. Add reloc value to output.
ea1e4b0d
AM
4513 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
4514 bit R_RBR. Improve names, masks.
59862849
TR
4515 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
4516 (bfd_xcoff_backend_data): Update with new reloc swap names.
4517 (bfd_xcoff_aix5_backend_data) : Same.
4518
b4655ea9
AM
45192002-05-04 Alan Modra <amodra@bigpond.net.au>
4520
4521 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
4522 bfd_count top_index, input_list, all_local_syms.
4523 (elf32_hppa_setup_section_lists): New function, split from
4524 elf32_hppa_size_stubs.
4525 (elf32_hppa_next_input_section): Likewise.
4526 (group_sections): Likewise.
4527 (get_local_syms): Likewise.
4528 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
4529 stubs on undefined syms too.
4530 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 4531 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
4532 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
4533 (elf32_hppa_next_input_section): Declare.
4534
301e3139
AM
45352002-05-04 Bob Byrnes <byrnes@curl.com>
4536
4537 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
4538 _bfd_new_bfd.
4539
7c5fcef7
L
45402002-05-03 H.J. Lu (hjl@gnu.org)
4541
4542 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
4543 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
4544 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
4545 to hide a global symbol.
4546 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 4547 forced_local to true.
7c5fcef7 4548
84de6048
RH
45492002-05-02 Richard Henderson <rth@redhat.com>
4550
4551 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
4552 vs SHN_UNDEF to zero.
4553
805fc799
AM
45542002-05-02 Alan Modra <amodra@bigpond.net.au>
4555
c061c2d8
AM
4556 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
4557 16 bit reloc.
4558 <R_PPC64_SECTOFF_DS>: Likewise.
4559 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
4560 SECTOFF reloc.
4561 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
4562 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
4563 SECTOFF reloc.
4564
805fc799
AM
4565 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
4566 (ppc64_elf_ha_reloc): New function.
4567 (ppc64_elf_brtaken_reloc): New function.
4568 (ppc64_elf_sectoff_reloc): New function.
4569 (ppc64_elf_sectoff_ha_reloc): New function.
4570 (ppc64_elf_toc_reloc): New function.
4571 (ppc64_elf_toc_ha_reloc): New function.
4572 (ppc64_elf_toc64_reloc): New function.
4573 (ppc64_elf_unhandled_reloc): New function.
4574 (ppc64_elf_howto_raw): Use the above.
4575 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
4576 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
4577 <R_PPC64_SECTOFF_DS>: Likewise.
4578 (IS_ABSOLUTE_RELOC): Update.
4579 (struct ppc_link_hash_table): Add have_undefweak.
4580 (ppc64_elf_link_hash_table_create): Init.
4581 (func_desc_adjust): Set have_undefweak.
4582 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
4583 add the .sfpr blr when have_undefweak.
4584 (ppc64_elf_setup_section_lists): Check hash table flavour.
4585 (ppc64_elf_next_input_section): Move output_section->owner test to
4586 ppc64elf.em.
4587 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
4588 and relocatable test. Return TOCstart and don't set elf_gp.
4589 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
4590 offset calculation. Add assert on weak sym branch tweaks.
4591 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
4592 (ppc64_elf_toc): Declare.
4593 (ppc64_elf_next_input_section): Update.
ea1e4b0d 4594
818c39a3
AM
45952002-05-01 Alan Modra <amodra@bigpond.net.au>
4596
4597 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
4598 file_name.
4599
721956f4
AM
46002002-05-01 Alan Modra <amodra@bigpond.net.au>
4601
4602 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
4603 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
4604 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
4605 call branches. Correct undefined weak destination.
4606 (ppc64_elf_func_desc_adjust): Always create at least one blr in
4607 .sfpr, and correct case where either only savef* or restf* is
4608 needed.
4609
4610 Long branch stubs, multiple stub sections.
4611 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
4612 (ppc64_elf_next_input_section): Declare.
4613 * elf64-ppc.c: Move linker-only prototypes.
4614 (STUB_SUFFIX): Define.
4615 (enum ppc_stub_type): New.
4616 (struct ppc_stub_hash_entry): New.
4617 (struct ppc_branch_hash_entry): New.
4618 (struct ppc_link_hash_entry): Add stub_cache, oh.
4619 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
4620 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
4621 Rename plt_overflow to stub_error.
4622 (ppc_stub_hash_lookup): Define.
4623 (ppc_branch_hash_lookup): Define.
4624 (stub_hash_newfunc): New function.
4625 (branch_hash_newfunc): New function.
4626 (link_hash_newfunc): Init new fields.
4627 (ppc64_elf_link_hash_table_create): Likewise.
4628 (ppc64_elf_link_hash_table_free): New function.
4629 (ppc_stub_name): New function.
4630 (ppc_get_stub_entry): New function.
4631 (ppc_add_stub): New function.
4632 (create_linkage_sections): Use bfd_make_section_anyway. Create
4633 .branch_lt and .rela.branch_lt sections. Don't create .stub.
4634 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
4635 and set up for plt call stubs. Link func and func desc syms.
4636 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
4637 (func_desc_adjust): Avoid hash lookup when func desc sym available
4638 via shortcut, and set links when processing.
4639 (ppc64_elf_hide_symbol): Likewise.
4640 (allocate_dynrelocs): Don't allocate stub section here.
4641 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
4642 Remove sstub code.
4643 (ppc_type_of_stub): New function.
4644 (build_one_stub): Delete.
4645 (ppc_build_one_stub): New function.
4646 (ppc_size_one_stub): New function.
4647 (ppc64_elf_setup_section_lists): New function.
4648 (ppc64_elf_next_input_section): New function.
4649 (group_sections): New function.
4650 (get_local_syms): New function.
4651 (ppc64_elf_size_stubs): Rewrite.
4652 (ppc64_elf_build_stubs): Rewrite.
4653 (ppc64_elf_relocate_section): Look up stub entry for REL24
4654 relocs. Don't propagate REL14* to dynamic objects. Look for long
4655 branch stubs if REL14* or REL24 relocs won't reach.
4656 (bfd_elf64_bfd_link_hash_table_free): Define.
4657
09c2219b
MM
46582002-04-30 Mark Mitchell <mark@codesourcery.com>
4659
c5cd6d62 4660 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 4661
07b678c0
TR
46622002-04-30 Tom Rix <trix@redhat.com>
4663
4664 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
4665 symbol names into the hash table.
4666
dbe341c6
TR
46672002-04-28 Tom Rix <trix@redhat.com>
4668
4669 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 4670 calulating relocations.
dbe341c6 4671 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
4672 (xcoff_ppc_relocate_section): Use relocation and complain function
4673 tables.
4674 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
4675 (xcoff_complain_overflow_signed_func): Same.
4676 (xcoff_complain_overflow_bitfield_func): Same.
4677 (xcoff_complain_overflow_dont_func): Same.
4678 (xcoff_reloc_type_crel): New recot function.
4679 (xcoff_reloc_type_br): Same.
4680 (xcoff_reloc_type_ba): Same.
4681 (xcoff_reloc_type_toc): Same.
4682 (xcoff_reloc_type_rel): Same.
4683 (xcoff_reloc_type_neg): Same.
4684 (xcoff_reloc_type_pos): Same.
4685 (xcoff_reloc_type_fail): Same.
4686 (xcoff_reloc_type_noop): Same.
4687 * libxcoff.h : Declare common parts for xcoff64.
4688 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 4689 and complain function tables.
dbe341c6 4690
985142a4
AM
46912002-04-28 Alan Modra <amodra@bigpond.net.au>
4692
4693 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
4694 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
4695
eba91044
AM
46962002-04-26 Alan Modra <amodra@bigpond.net.au>
4697
e54fdaa5
AM
4698 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
4699 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
4700
a50c1845
AM
4701 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
4702 same as the output before calling elf_link_input_bfd.
4703
eba91044
AM
4704 * coffcode.h (coff_compute_section_file_positions): Set
4705 section_tail after shuffling section list.
4706
3c25c5f6
NC
47072002-04-24 Christian Groessler <chris@groessler.org>
4708
4709 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
4710 addresses are 23bit with a special layout, not plain 32bit
4711 values. Prevent relocation of immediate values.
4712
40d32fc6
CD
47132002-04-24 Chris G. Demetriou <cgd@broadcom.com>
4714
4715 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
4716 MIPS-16 ASE flags are set, print something to indicate that.
4717
067fa4a6
AM
47182002-04-23 Alan Modra <amodra@bigpond.net.au>
4719
4720 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
4721 under which a plt call stub is used.
4722 (final_link_relocate): Similarly.
4723 (allocate_plt_static): Clear h-plabel except when plt entry is
4724 exclusively used for a plabel.
4725 (allocate_dynrelocs): Use the above to simplify plt sizing.
4726 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
4727 (elf32_hppa_link_hash_table_create): Init.
4728 (BL22_RP): Define.
4729 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
4730 (elf32_hppa_check_relocs): Set has_22bit_branch.
4731
4732 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
4733 (final_link_relocate): Likewise.
4734
af40ce3c
JJ
47352002-04-22 Jakub Jelinek <jakub@redhat.com>
4736
4737 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
4738 search table if some FDE is DW_EH_PE_aligned encoded either.
4739 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
4740
09ae86c2
JJ
47412002-04-22 Richard Smith <richard@ex-parrot.com>
4742 Jakub Jelinek <jakub@redhat.com>
4743
4744 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
4745 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
4746 encoded personality.
4747 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
4748 for CIE/FDE removal.
4749
deeb2cd7
TR
47502002-04-20 Tom Rix <trix@redhat.com>
4751
4752 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
4753
99dc0092
AM
47542002-04-20 Alan Modra <amodra@bigpond.net.au>
4755
aa3d5824
AM
4756 * archures.c (bfd_lookup_arch): Move the list order comment..
4757 (struct bfd_arch_info): ..to where it belongs.
4758 * bfd-in2.h: Regenerate.
4759
99dc0092
AM
4760 * archures.c (bfd_lookup_arch): Add comment on list order.
4761 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
4762 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
4763 is always at head of list.
4764
7831a775
NC
47652002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
4766
4767 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
4768 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
4769 definition of these functions for ARM_WINCE builds as they are
4770 not used.
ea1e4b0d 4771 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
4772 for ARM_WINCE builds.
4773
47742002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
4775
ea1e4b0d 4776 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
4777
47782002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
4779
4780 * cpu-sh.c (scan_mach): Delete.
4781 (arch_info_struct): Replace scan_mach with bfd_default_scan.
4782 (bfd_sh_arch): Likewise.
4783
3d8dbe36
NC
47842002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
4785
4786 * ihex.c (ihex_write_object_contents): Fix check for records
4787 crossing 64K boundaries.
4788
4ab82700
AM
47892002-04-16 Alan Modra <amodra@bigpond.net.au>
4790
4791 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
4792 type rather than just assuming entries are ELF.
4793 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4794 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4795 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
4796 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
4797 rather than elf_link_hash_entry.
4798
036fe0fe
RH
47992002-04-15 Richard Henderson <rth@redhat.com>
4800
4801 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
4802 n32 binaries.
4803
c4f3d130
NC
48042002-04-15 Michael Snyder <msnyder@redhat.com>
4805
4806 * opncls.c (bfd_close): Write contents if writeable.
4807 Minor formatting tidy-ups.
4808
4ab82700 48092002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
4810
4811 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
4812
0c04d169
MS
48132002-04-12 Michael Snyder <msnyder@redhat.com>
4814
4815 * bfd-in.h (bfd_get_section_lma): New access macro.
4816 Minor white-space fix-up.
4817
89d4966f
AM
48182002-04-12 Alan Modra <amodra@bigpond.net.au>
4819
4820 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
4821 header pad.
4822
8d0da3c2
DD
48232002-04-09 DJ Delorie <dj@redhat.com>
4824
4825 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
4826
05793179
NC
48272002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
4828
4829 * coffcode.h (coff_read_word): New.
4830 (coff_compute_checksum): New.
4831 (coff_apply_checksum): New.
4832 (coff_write_object_contents): Call coff_apply_checksum () to
4833 apply checksum to PE image.
4834
46fe4e66
AM
48352002-04-08 Randolph Chung <tausq@debian.org>
4836
4837 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
4838 (elf32_hppa_final_link): Split out sorting logic to..
4839 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
4840 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
4841
3b5b409c
AC
48422002-04-07 Andrew Cagney <ac131313@redhat.com>
4843
4844 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
4845 pattern.
4846 * configure: Re-generate.
4847
ac7b6ceb
AC
48482002-04-07 Andrew Cagney <ac131313@redhat.com>
4849
4850 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
4851 is greater or equal to 4.3.3.
4852 * configure: Regenerate.
4853 Fix PR gdb/344.
4854
44aa49bb
HPN
48552002-04-05 Hans-Peter Nilsson <hp@axis.com>
4856
4857 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
4858 R_CRIS_32_PCREL>: Fix typo in name.
4859 (cris_elf_check_relocs): Always create .rela.got here when
4860 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
4861 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
4862 assume it's created.
4863
e2d34d7d
DJ
48642002-04-04 Daniel Jacobowitz <drow@mvista.com>
4865
4866 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
4867 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
4868 define.
4869 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
4870 * bfd.c (bfd_link_hash_table_free): Define.
4871 * binary.c (binary_bfd_link_hash_table_free): Define.
4872 * bout.c (b_out_bfd_link_hash_table_free): Define.
4873 * coff-rs6000.c (rs6000coff_vec): Include
4874 _bfd_generic_link_hash_table_free.
4875 (pmac_xcoff_vec): Likewise.
4876 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4877 (aix5coff64_vec): Likewise.
4878 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
4879 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
4880 (bfd_elf32_bfd_link_hash_table_free): Define.
4881 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
4882 (bfd_elf32_bfd_link_hash_table_free): Define.
4883 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
4884 define.
4885 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
4886 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
4887 * ieee.c (ieee_bfd_link_hash_table_free): Define.
4888 * ihex.c (ihex_bfd_link_hash_table_free): Define.
4889 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
4890 (_bfd_generic_link_hash_table_free): Add prototype.
4891 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
4892 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
4893 * linker.c (_bfd_generic_link_hash_table_free): New function.
4894 * mmo.c (mmo_bfd_link_hash_table_free): Define.
4895 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
4896 * oasys.c (oasys_bfd_link_hash_table_free): Define.
4897 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
4898 * som.c (som_bfd_link_hash_table_free): Define.
4899 * srec.c (srec_bfd_link_hash_table_free): Define.
4900 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
4901 * versados.c (versados_bfd_link_hash_table_free): Define.
4902 * vms.c (vms_bfd_link_hash_table_free): New function.
4903 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
4904
4905 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
4906 instead of bfd_alloc.
4907 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
4908 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
4909 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
4910 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
4911 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
4912 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
4913 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
4914 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
4915 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
4916 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
4917 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
4918 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
4919 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
4920 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
4921 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
4922 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
4923 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
4924 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
4925 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
4926 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
4927 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
4928 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
4929 * m68klinux.c (linux_link_hash_table_create): Likewise.
4930 * sparclinux.c (linux_link_hash_table_create): Likewise.
4931 * sunos.c (sunos_link_hash_table_create): Likewise.
4932 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
4933
4934 * targets.c: Add _bfd_link_hash_table_free to xvec.
4935
4936 * bfd-in2.h: Regenerate.
4937 * libbfd.h: Regenerate.
4938 * libcoff.h: Regenerate.
4939
830629ab
AM
49402002-04-04 Alan Modra <amodra@bigpond.net.au>
4941
4942 * dep-in.sed: Cope with absolute paths.
4943 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
4944 Run "make dep-am".
4945 * Makefile.in: Regenerate.
4946 * coff-arm.c: Fix copyright date.
4947 * cpu-h8300.c: Likewise.
4948 * cpu-i370.c: Likewise.
4949 * cpu-s390.c: Likewise.
4950 * cpu-mips.c: Likewise.
4951 * po/SRC-POTFILES.in: Regenerate.
4952
c6e90b02
TS
49532002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4954
4955 * Makefile.am: Add elfxx-mips.c to the known backends.
4956 (elf32-mips.lo): remove dependency to coff/external.h.
4957 * Makefile.in: Regenerate.
4958 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
4959 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
4960 accordingly.
4961 * configure: Regenerate.
4962 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
4963 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
4964 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
4965 MIPS specific backend functions.
4966 * elf32-mips.c: Moved most code to elfxx-mips.c.
4967 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
4968 static.
4969 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
4970 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
4971 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
4972 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
4973 interface to allow selection of the right REL or RELA howto table.
4974 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
4975 static. Let it refuse n32 objects.
4976 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
4977 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
4978 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
4979 (elf32_mips_ignore_discarded_relocs): Rename from
4980 _bfd_elf32_mips_ignore_discarded_relocs.
4981 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
4982 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
4983 (elf_mips_howto_table_rela): Remove.
4984 * elf64-mips.c: Moved most code to elfxx-mips.c.
4985 (bfd_elf64_bfd_reloc_type_lookup): Make static.
4986 (mips_elf64_rtype_to_howto): New function.
4987 (mips_elf64_object_p): Likewise.
4988 (elf64_mips_irix_compat): Likewise.
4989 * elfxx-mips.c: New file containing common code merged together from
4990 elf32-mips.c and elf64-mips.c.
4991 * elfxx-mips.h: New file containing MIPS specific prototypes from
4992 elf-bfd.h.
4993 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
4994 elf_backend_mips_rtype_to_howto.
4995
d8dce692
AM
49962002-04-04 Alan Modra <amodra@bigpond.net.au>
4997
4998 * srec.c (MAXCHUNK, Chunk): Revise comments.
4999 (srec_write_record): Correct buffer size.
5000 (srec_write_header): Do without intermediate buffer.
5001 (srec_write_section): Validate Chunk.
5002 (srec_write_terminator): Pass NULL instead of dummy buffer.
5003 (srec_write_symbols): Pass file and symbol names directly to
5004 bfd_bwrite so sprintf won't overflow buffer.
5005
b88a866a
JJ
50062002-04-03 Jakub Jelinek <jakub@redhat.com>
5007
5008 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
5009 PC relative relocs against hidden symbols.
5010 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5011
d7866f04
AM
50122002-04-03 Alan Modra <amodra@bigpond.net.au>
5013
5014 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
5015 LMAs, loop over segments until p_vaddr and p_memsz specify an
5016 extent enclosing the section.
5017
9e81ee67
NC
50182002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
5019
5020 * ihex.c (ihex_write_object_contents): Do not allow records to
5021 cross a 64K boundary - wrap if necessary.
5022
d2b64500
JT
50232002-04-01 Nathan Williams <nathanw@wasabisystems.com>
5024
5025 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
5026 which caused the returned LWP ID to always be 0.
5027
e36f7d53
RH
50282002-04-01 Richard Henderson <rth@redhat.com>
5029
5030 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5031 (elf32_sparc_relocate_section): Use it to figure out when to
5032 initialize .got entries.
5033 * elf64-sparc.c: Similarly.
5034
e92d460e
AM
50352002-03-28 Alan Modra <amodra@bigpond.net.au>
5036
5037 * linker.c (link_action): Ignore duplicate warning syms.
5038 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
5039 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
5040 (elf_adjust_dynamic_symbol): Likewise.
5041 (elf_export_symbol): Likewise.
5042 (elf_link_find_version_dependencies): Likewise.
5043 (elf_link_assign_sym_version): Likewise.
5044 (elf_link_sec_merge_syms): Likewise.
5045 (elf_link_output_extsym): Likewise.
5046 (elf_gc_sweep_symbol): Likewise.
5047 (elf_gc_propagate_vtable_entries_used): Likewise.
5048 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5049 (elf_gc_allocate_got_offsets): Likewise.
5050 (elf_collect_hash_codes): Likewise.
5051 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
5052 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
5053 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
5054 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
5055 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
5056 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
5057 (elf_cris_discard_excess_dso_dynamics): Likewise.
5058 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
5059 (mark_PIC_calls): Likewise.
5060 (allocate_plt_static): Likewise.
5061 (allocate_dynrelocs): Likewise.
5062 (readonly_dynrelocs): Likewise.
5063 * elf32-i386.c (allocate_dynrelocs): Likewise.
5064 (readonly_dynrelocs): Likewise.
5065 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
5066 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
5067 * elf32-mips.c (mips_elf_output_extsym): Likewise.
5068 (mips_elf_sort_hash_table_f): Likewise.
5069 (mips_elf_check_mips16_stubs): Likewise.
5070 * elf32-s390.c (allocate_dynrelocs): Likewise.
5071 (readonly_dynrelocs): Likewise.
5072 * elf32-sh.c (sh_elf_discard_copies): Likewise.
5073 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
5074 (xstormy16_relax_plt_realloc): Likewise.
5075 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
5076 (elf64_alpha_output_extsym): Likewise.
5077 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
5078 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
5079 (mips_elf64_check_mips16_stubs): Likewise.
5080 (mips_elf64_output_extsym): Likewise.
5081 * elf64-ppc.c (func_desc_adjust): Likewise.
5082 (allocate_dynrelocs): Likewise.
5083 (readonly_dynrelocs): Likewise.
5084 * elf64-s390.c (allocate_dynrelocs): Likewise.
5085 (readonly_dynrelocs): Likewise.
5086 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
5087 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
5088 (readonly_dynrelocs): Likewise.
5089 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
5090 * aoutx.h (aout_link_write_other_symbol): Likewise.
5091 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
5092 (_bfd_coff_write_global_sym): Likewise.
5093 * i386linux.c (linux_tally_symbols): Likewise.
5094 * m68klinux.c (linux_tally_symbols): Likewise.
5095 * sparclinux.c (linux_tally_symbols): Likewise.
5096 * pdp11.c (aout_link_write_other_symbol): Likewise.
5097 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
5098 * xcofflink.c (xcoff_build_ldsyms): Likewise.
5099 (xcoff_write_global_symbol): Likewise.
5100
5101 * cofflink.c (_bfd_coff_final_link): Formatting.
5102 * cpu-mips.c (mips_compatible): Make static, prototype.
5103 * elf32-i386.c (elf_i386_check_relocs): Formatting.
5104 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
5105 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
5106 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
5107 (mips_elf64_final_link): Likewise.
5108 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
5109 prototype.
5110
2106126f
NC
51112002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
5112
5113 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
5114 (SWAP_OUT_RELOC_OFFSET): Define.
5115
b99d1833
AM
51162002-03-27 Gregory Steuck <greg@nest.cx>
5117
5118 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
5119 terminating NULL if empty symbol table.
5120 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
5121
ad43ed4c
L
51222002-03-26 H.J. Lu (hjl@gnu.org)
5123
5124 * elflink.h (elf_link_input_bfd): Revert the last change since
5125 the gcc exception handling isn't fixed yet.
5126
3851fca4
L
51272002-03-26 H.J. Lu (hjl@gnu.org)
5128
5129 * elflink.h (elf_link_input_bfd): Complain about relocations
5130 against local symbols in discarded sections.
5131
b91afed7
AM
51322002-03-26 Alan Modra <amodra@bigpond.net.au>
5133
5134 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
5135
dba143ef
AM
51362002-03-23 Alan Modra <amodra@bigpond.net.au>
5137
5138 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
5139 section file offset for !SEC_LOAD sections.
5140
ee29b9fb
RE
51412002-03-21 Richard Earnshaw <rearnsha@arm.com>
5142
830629ab
AM
5143 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
5144 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 5145
54327882
AM
51462002-03-21 Alan Modra <amodra@bigpond.net.au>
5147
5148 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
5149 Whitespace changes.
5150 * archive.c: Update copyright date.
5151 * bfd-in2.h: Regenerate.
5152 * libbfd.h: Regenerate.
5153 * Makefile.am: Run "make dep-am"
5154 * Makefile.in: Regenerate.
5155 * po/SRC-POTFILES.in: Regenerate.
5156
1ee24f27
DJ
51572002-03-20 Daniel Jacobowitz <drow@mvista.com>
5158
5159 * dwarf2.c (struct funcinfo): Move up.
5160 (lookup_address_in_function_table): New argument function_ptr.
5161 Set it.
5162 (lookup_address_in_line_table): New argument function. If function
5163 is non-NULL, use it to handle ``addr'' before the first line note of
5164 the function.
5165 (comp_unit_find_nearest_line): Update and swap calls to
5166 lookup_address_in_function_table and lookup_address_in_line_table.
5167 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
5168 N_SLINE encountered if we see an N_FUN before any N_SLINE.
5169
51b9608c
TR
51702002-03-20 Tom Rix <trix@redhat.com>
5171
ea1e4b0d 5172 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 5173 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 5174 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 5175
789c90aa
TR
51762002-03-19 Tom Rix <trix@redhat.com>
5177
ea1e4b0d 5178 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
5179 dynamic objects in archives.
5180
1da54d81
HPN
51812002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
5182
5183 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
5184 STT_NOTYPE symbols to STT_OBJECT.
5185
7831a775 51862002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
5187
5188 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
5189
eb1e0e80
NC
51902002-03-18 Tom Rix <trix@redhat.com>
5191
5192 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
5193 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
5194 * coff-rs6000 (do_pad) : New function for archive padding.
5195 (do_copy) : New function for object file copying in archives.
5196 (do_shared_object_padding) : New function for padding shared
5197 objects to their text section alignment in archives.
5198 (bfd_xcoff_ar_achive_set_magic) : Stub.
5199 (xcoff_write_armap_big) : Use do_copy and do_pad.
5200 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
5201 do_copy and do_pad.
5202 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 5203 bfd_xcoff_magic_number.
eb1e0e80
NC
5204 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
5205 fop.
5206 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
5207 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
5208 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
5209 * rs6000-core.c : Update copyright date.
ea1e4b0d 5210 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
5211 csectpp.
5212 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
5213 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
5214 (coff_set_flags) : Use bfd_xcoff_magic_number.
5215 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
5216 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
5217 * Makefile.am : Same.
5218 * config.bfd : Same.
5219 * targets.c : Same.
5220 * configure : Regnerate.
5221 * Makefile.in : Same.
5222 * bfd-in2.h : Same.
5223
a1c259a1
NC
52242002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
5225
5226 * po/fr.po: Updated version.
5227
4dae1ae7
AM
52282002-03-18 Alan Modra <amodra@bigpond.net.au>
5229
5230 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
5231 * libbfd.h: Regenerate.
5232 * archive.c (coff_write_armap): Pass on failures from
5233 bfd_write_bigendian_4byte_int.
5234
36b4f6e7
L
52352002-03-14 H.J. Lu <hjl@gnu.org>
5236
5237 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
5238 error to bfd_error_nonrepresentable_section for reinit_array
5239 section in DSO.
5240
a1aefc76
NC
52412002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
5242
a181be0a
NC
5243 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
5244 OR it in rather than replacing previously selected flags.
5245
a1aefc76
NC
5246 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
5247 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
5248
c119f9b8
AM
52492002-03-14 Alan Modra <amodra@bigpond.net.au>
5250
5251 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
5252 (N): Use the above.
5253 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
5254 ensure reloc size matches before calling elf_link_input_bfd.
5255 Add an assert to check reloc size when counting output relocs.
5256
c295a511
NC
52572002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
5258
5259 * mmo.c (mmo_get_loc): Return NULL rather than false.
5260
9ce88e60
NC
52612002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
5262
5263 * po/fr.po: Updated version.
5264
4ddafab0
AM
52652002-03-13 Alan Modra <amodra@bigpond.net.au>
5266
b74fa2cd
AM
5267 * archures.c (bfd_default_compatible): Test bits_per_word.
5268 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
5269 bfd_default_compatible.
5270 * cpu-i370.c (i370_compatible): Likewise.
5271 * cpu-sparc.c (sparc_compatible): Likewise.
5272 * cpu-h8300.c (compatible): Test in->arch == out->arch.
5273
40b829d4
AM
5274 * elflink.h: Formatting fixes.
5275 (elf_link_output_extsym): Merge undefined and undef weak cases.
5276
4ddafab0
AM
5277 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
5278 when word size of input matches output word size.
5279
dd53c801
AJ
52802002-03-12 Andreas Jaeger <aj@suse.de>
5281
5282 * cpu-i386.c (i386_compatible): New. Use it instead of
5283 bfd_default_compatible.
5284
aa066ac8
L
52852002-03-07 H.J. Lu (hjl@gnu.org)
5286
5287 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
5288 as the type for bfd_reloc_val.
5289
1bf42538
JL
52902002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
5291
5292 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
5293 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
5294 (elf_hppa_final_link_relocate): Correct relocations for indirect
5295 references to local data through the DLT. Fix .opd creation for
5296 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
5297 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
5298 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
5299 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
5300 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
5301 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
5302 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
5303
86eaf01e
JJ
53042002-03-05 Jakub Jelinek <jakub@redhat.com>
5305
5306 * merge.c (_bfd_merge_sections): Don't segfault if there
5307 is nothing to merge due to GC.
5308
c44233aa
AM
53092002-03-05 Alan Modra <amodra@bigpond.net.au>
5310
039cc25f
AM
5311 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
5312 symbols that have been forced local.
5313
c44233aa
AM
5314 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
5315 to output forced local syms for non-shared link.
5316 (elf_link_output_extsym): Tweak condition for calling backend
5317 adjust_dynamic_symbol so that previous behaviour is kept.
5318 Whitespace changes throughout file.
5319
25e27870
L
53202002-03-04 H.J. Lu <hjl@gnu.org>
5321
5322 * elf.c (bfd_section_from_shdr): Handle special sections,
5323 .init_array, .fini_array and .preinit_array.
5324 (elf_fake_sections): Likewise.
5325
5326 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
5327 DT entry only if the section is in output for .init_array,
5328 .fini_array and .preinit_array. Complain about .preinit_array
5329 section in DSO.
5330 (elf_bfd_final_link): Warn zero size for .init_array,
5331 .fini_array and .preinit_array sections.
5332
5333 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
5334 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
5335 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
5336 .preinit_array.
5337
bb2a49f2
AM
53382002-03-04 Alan Modra <amodra@bigpond.net.au>
5339
5340 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
5341 * configure: Regenerate.
5342
38487e5e
TR
53432002-03-02 Tom Rix <trix@redhat.com>
5344
c44233aa
AM
5345 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
5346 symbolic equiv.
38487e5e
TR
5347 * coff-rs6000.c (xcoff_howto_table): Same.
5348
30831527
RH
53492002-03-01 David Mosberger <davidm@hpl.hp.com>
5350
5351 * elflink.h (size_dynamic_sections): If section named
5352 ".preinit_array" exists, create DT_PREINIT_ARRAY and
5353 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
5354 ".init_array" and ".fini_array".
5355 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
5356 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
5357 DT_FINI_ARRAY.
5358
c8e5ddc8
AM
53592002-02-26 Andrew Macleod <amacleod@cygnus.com>
5360
5361 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
5362 dynsyms.
5363
96e0dda4
AM
53642002-02-25 Alan Modra <amodra@bigpond.net.au>
5365
1c5b6bf8
AM
5366 * elf64-hppa.h: Update copyright date.
5367
96e0dda4
AM
5368 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
5369 (ppc64_elf_relocate_section): Don't generate power4 style branch
5370 hints for *_BRTAKEN and *_BRNTAKEN relocs.
5371
0fb19cbc
JJ
53722002-02-22 Jakub Jelinek <jakub@redhat.com>
5373
5374 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
5375 last patch.
5376 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5377
c434dee6
AJ
53782002-02-21 Andreas Jaeger <aj@suse.de>
5379
5380 * elf64-x86-64.c: Major rework that introduces all recent changes
5381 to the x86-64 backend. Get a closer match to elf32-i386.
5382 (struct elf64_x86_64_dyn_relocs): Rename from
5383 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
5384 all users.
5385 (struct elf64_x86_64_link_hash_table): Add short cuts to some
5386 sections.
5387 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
5388 remove casts, initialize new hash members.
5389 (create_got_section): New.
5390 (elf64_x86_64_create_dynamic_sections): New.
5391 (elf64_x86_64_copy_indirect_symbol): New.
5392 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
5393 relocs, .got or .relgot here but do it in allocate_dynrelocs.
5394 Reference count possible .plt and .got entries. Don't test input
5395 section SEC_READONLY here to try to avoid copy relocs, and keep
5396 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
5397 DF_TEXTREL here. Delay setting of variables until needed. Cache
5398 pointer to "sreloc" section in elf_section_data. Tweak condition
5399 under which .got created. Report files with bad relocation
5400 section names.
5401 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
5402 Reference count possible .plt entries. Don't deallocate .got and
5403 .relgot space here.
5404 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
5405 do copy reloc processing for weakdefs. Remove redundant casts and
5406 aborts. Delay setting of vars until needed. Move creation of
5407 dynamic symbols and allocation of .plt and .rela.plt to
5408 allocate_dynrelocs. Replace BFD_ASSERT with abort.
5409 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5410 (allocate_dynrelocs): New.
5411 (readonly_dynrelocs): New.
5412 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
5413 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
5414 Zero out the dynamic allocated content space.
5415 (elf64_x86_64_discard_copies): Removed.
5416 (elf64_x86_64_relocate_section): Make use of dynamic section
5417 short-cuts. Localise vars, and delay setting. Better error
5418 reporting, replace BFD_ASSERT with abort. Check
5419 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
5420 regular object file and tread the weak definition as the normal
5421 one. Don't discard relocs for undefweak or undefined symbols and
5422 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
5423 relocs.
5424 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
5425 symbols that have been forced local. Use same test to decide if
5426 we can use a relative reloc for got as relocate_section. Expand
5427 SHN_UNDEF comment. Move expressions out of function calls.
5428 Replace BFD_ASSERT with abort.
5429 (bfd_elf64_bfd_final_link): Removed.
5430 (elf_backend_copy_indirect_symbol): Define.
5431
ff3a6ee3
TR
54322002-02-20 Tom Rix <trix@redhat.com>
5433
5434 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
5435 (_bfd_xcoff_reloc_type_lookup): Use it.
5436 * coff64-rs6000.c (xcoff64_howto_table): Same.
5437 (xcoff64_reloc_type_lookup): Same.
c434dee6 5438
a68d41fb
AM
54392002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
5440
5441 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
5442 little endian.
5443
befc3abb
MS
54442002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
5445
5446 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
5447 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
5448 * bfd-in2.h: Regenerate.
5449 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
5450 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
5451 with "s390:64-bit".
5452 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
5453 (elf_s390_reloc_type_lookup): Likewise.
5454 (elf_s390_check_relocs): Likewise.
5455 (elf_s390_gc_sweep_hook): Likewise.
5456 (elf_s390_relocate_section): Likewise.
5457 (elf_s390_object_p): Use renamed architecture define.
5458 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
5459
6eeeec9b
FCE
54602002-02-19 Frank Ch. Eigler <fche@redhat.com>
5461
5462 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
5463
0bb2d96a
JJ
54642002-02-19 Jakub Jelinek <jakub@redhat.com>
5465
5466 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
5467 absptr -> pcrel optimization for shared libs.
5468 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
5469 library cannot be converted to pcrel.
5470 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
5471 relative.
5472 * elf32-i386.c (elf_i386_relocate_section): If
5473 _bfd_elf_section_offset returned -2, skip, but make sure the
5474 relocation is installed.
5475 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
5476 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5477 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5478 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5479 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5480 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5481 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5482 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5483 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5484 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5485 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5486 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5487 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5488 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5489 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
5490 _bfd_elf_section_offset returning -2 the same way as -1.
5491 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
5492 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
5493 and BFD_ASSERT.
5494 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
5495
69f284c7
TR
54962002-02-18 Tom Rix <trix@redhat.com>
5497
5498 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
5499 (bfd_xcoff_size_dynamic_sections): Same.
5500 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
5501 (bfd_xcoff_size_dynamic_sections): Same.
5502 * coff-rs6000.c (xcoff_generate_rtinit): Same.
5503 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
5504 * libxcoff.h (struct xcoff_backend_data_rec): Same.
5505 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
5506 * bfd-in2.h: Regenerate.
5507
82bd7b59
AM
55082002-02-18 Alan Modra <amodra@bigpond.net.au>
5509
5510 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
5511 (struct ppc_link_hash_table): Add sfpr.
5512 (ppc64_elf_link_hash_table_create): Init it.
5513 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
5514 .glink out to..
5515 (create_linkage_sections): ..here. Make .sfpr too.
5516 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
5517 dynobj early.
5518 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
5519 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
5520 ._restf* functions, and create as needed.
5521 (func_desc_adjust): Only force_local for shared libs.
5522
ef1355e8
NC
55232002-02-18 David O'Brien <obrien@FreeBSD.org>
5524
5525 * configure.in: Bump version number post 2.12 branching.
5526 * configure: Regenerate.
5527
dfa36a69
HPN
55282002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
5529
5530 * mmo.c: Correct and improve comments.
5531 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
5532 zero-pad. Use input to fill up non-empty bfd buffer.
5533 (mmo_flush_chunk): New function.
5534 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
5535 changed. Don't emit location specifier if VMA is same as
5536 *LAST_VMAP after omitting leading zero contents. Call
5537 mmo_flush_chunk before emitting location specifier.
5538 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
5539 with mmo_write_loc_chunk calls.
5540 (mmo_internal_write_section): Call mmo_flush_chunk after
5541 mmo_write_chunk.
5542 (mmo_write_symbols_and_terminator): Move :Main to first position
5543 in symbol array. Add faked one if it does not exist if there are
5544 other symbols. Don't add it if there are no symbols at all. Move
5545 out test for value of :Main from symbol loop. Rename table
5546 fakemain to maintable and variable mainsym to fakemain.
5547
ccf00ab6
RH
55482002-02-15 Richard Henderson <rth@redhat.com>
5549
5550 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
5551 section with no got matches any got. Simplify error generaion.
5552
88eaccc2
AM
55532002-02-15 Alan Modra <amodra@bigpond.net.au>
5554
fd96f80f
AM
5555 Support arbitrary length fill patterns.
5556 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
5557 (_bfd_default_link_order): Remove bfd_fill_link_order code.
5558 Call default_data_link_order.
5559 (default_fill_link_order): Delete.
5560 (default_data_link_order): New function.
5561 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
5562 of bfd_fill_link_order with bfd_data_link_order.
5563 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
5564 * elf64-mips.c (mips_elf64_final_link): Likewise.
5565
88eaccc2
AM
5566 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
5567 Correct value returned in "end" for "0x<non-hex>".
5568
e2fd756b
NC
55692002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
5570
5571 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
5572 (scan): Test against 'mach' field in info structure.
5573
edd29cf9
AM
55742002-02-14 Alan Modra <amodra@bigpond.net.au>
5575
5576 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
5577
1e30956e 55782002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
5579
5580 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
5581 EF_M68000.
5582
bf36db18
NC
55832002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
5584
5585 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
5586 non-zero physical addresses when adjusting the LMAs of new
5587 sections.
bf36db18 5588
189c6563
AM
55892002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
5590
5591 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
5592 from _bfd_elf_hppa_gen_reloc_type.
5593 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
5594 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
5595 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
5596 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
5597
e948afaf
AO
55982002-02-12 Alexandre Oliva <aoliva@redhat.com>
5599
5600 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
5601 loading its contents if there's nothing to do in it.
5602
19397422
AM
56032002-02-12 Alan Modra <amodra@bigpond.net.au>
5604
0ad3a73b
AM
5605 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
5606 64k boundary.
5607
19397422
AM
5608 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
5609 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
5610 (ppc64_elf_finish_dynamic_sections): Set values for them.
5611
51316059
MS
56122002-02-11 Michael Snyder <msnyder@redhat.com>
5613
5614 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
5615 * elf.c (elfcore_grok_pstatus): Add prototype.
5616 (elfcore_grok_lwpstatus): Add prototype.
5617 (elfcore_write_lwpstatus): New function.
5618 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
5619
518313c3
AO
56202002-02-11 Alexandre Oliva <aoliva@redhat.com>
5621
5622 * elf32-sh.c: Added missing prototypes.
5623 * elf32-sh64.c: Likewise.
5624 (sh_elf_align_loads): Mark unused args as such.
5625 * elf64-sh64.c: Added missing prototypes.
5626 (struct elf_sh64_link_hash_entry): Fix typo.
5627 (sh_elf64_relocate_section): Fix info argument passed to
5628 _bfd_elf_section_offset.
5629
2c73f9d8
AM
56302002-02-11 Alan Modra <amodra@bigpond.net.au>
5631
5632 * Makefile.am: "make dep-am".
5633 * Makefile.in: Regenerate.
5634 * aclocal.m4: Regenerate.
5635 * config.in: Regenerate.
5636 * configure: Regenerate.
5637
d426c6b0
DJ
56382002-02-10 Daniel Jacobowitz <drow@mvista.com>
5639
5640 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
5641 variable warnings.
5642 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
5643 comparison warning.
5644 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
5645 cast warnings for the common case.
5646
e58ee0cd
HPN
56472002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
5648
5649 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
5650 vectors.
5651 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
5652 vectors.
5653
7793f4d0
RH
56542002-02-09 Richard Henderson <rth@redhat.com>
5655
5656 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
5657 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
5658 (elf64_alpha_relocate_section): Likewise.
5659 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
5660 * bfd-in2.h, libbfd.h: Rebuild.
5661
7e799044
HPN
56622002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
5663
5664 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
5665 that base-plus-offset reloc accounting is consistent.
5666 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
5667 up to date for undefined symbols.
5668
027d73eb
EC
56692002-02-08 Eric Christopher <echristo@redhat.com>
5670
5671 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5672
5673 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
5674 sections for the O32 ABI.
5675
517662d4
CD
56762002-02-08 Chris Demetriou <cgd@broadcom.com>
5677
5678 * elf32-arm.h: Fix formatting of _("...").
5679 * elf32-d10v.c: Likewise.
5680 * elf32-m68k.c: Likewise.
5681 * elf32-mips.c: Likewise.
5682
5e37cc46
NC
56832002-02-08 Ivan Guzvinec <ivang@opencores.org>
5684
5685 * coff-or32.c: Fix compile time warning messages.
5686
fbca6ad9
AO
56872002-02-08 Alexandre Oliva <aoliva@redhat.com>
5688
5689 Contribute sh64-elf.
5690 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
5691 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
5692 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
5693 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
5694 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
5695 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
5696 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
5697 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
5698 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
5699 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
5700 New relocs.
5701 * libbfd.h, bfd-in2.h: Rebuilt.
5702 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
5703 (sh_reloc_map): Map them.
5704 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5705 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
5706 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
5707 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5708 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
5709 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
5710 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
5711 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
5712 datalabel_got_offset.
5713 (sh_elf_link_hash_newfunc): Initialize it.
5714 (sh_elf_relocate_section): Augment the scope of
5715 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
5716 GOT and GOTOFF handling to new SHmedia relocation types. Support
5717 GOT_BIAS.
5718 (sh_elf_check_relocs): Likewise.
5719 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
5720 PLT entries using movi_shori_putval. Support GOT_BIAS.
5721 (sh_elf_finish_dynamic_sections): Likewise.
5722 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
5723 relocation, it's now done by the caller.
5724 (GOT_BIAS): New.
5725 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
5726 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
5727 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
5728 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
5729 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
5730 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
5731 sh64_elf64_hash_table): New.
5732 (sh_elf64_howto_table): Introduce new relocs.
5733 (sh_elf64_info_to_howto): Accept new PIC relocs.
5734 (sh_elf64_relocate_section): Augment the scope of
5735 seen_stt_datalabel. Support new PIC relocs.
5736 (sh_elf64_check_relocs): Support new PIC relocs.
5737 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
5738 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
5739 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
5740 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
5741 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
5742 movi_shori_putval, movi_3shori_putval,
5743 sh64_elf64_create_dynamic_sections,
5744 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
5745 sh64_elf64_size_dynamic_sections,
5746 sh64_elf64_finish_dynamic_symbol,
5747 sh64_elf64_finish_dynamic_sections): New.
5748 (elf_backend_create_dynamic-sections,
5749 bfd_elf64_bfd_link_hash_table_create,
5750 elf_backend_adjust_dynamic_symbol,
5751 elf_backend_size_dynamic_sections,
5752 elf_backend_finish_dynamic_symbol,
5753 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5754 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5755 elf_backend_got_header_size, elf_backend_plt_header_size):
5756 Define.
5757 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
5758 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
5759 match official numbers and names; moved unmaching ones to the
5760 range 0xf2-0xff.
5761 * elf32-sh64.c, elf64-sh64.c: Likewise.
5762 2001-03-12 DJ Delorie <dj@redhat.com>
5763 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
5764 sections.
5765 2001-03-12 DJ Delorie <dj@redhat.com>
5766 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
5767 be aligned.
5768 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
5769 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
5770 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
5771 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
5772 .cranges section with SEC_SORT_ENTRIES set.
5773 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
5774 incoming sorted .cranges section.
5775 (sh64_bfd_elf_copy_private_section_data): New.
5776 (sh64_elf_final_write_processing): Only sort .cranges and modify
5777 start address if called by linker.
5778 2001-01-08 Ben Elliston <bje@redhat.com>
5779 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
5780 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
5781 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
5782 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
5783 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
5784 line. Add comments before all entries.
5785 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
5786 comment.
5787 (sh_elf64_reloc): Correct head comment.
5788 (sh_elf64_relocate_section): Correct spacing.
5789 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
5790 instead call reloc_dangerous callback.
5791 <case R_SH_SHMEDIA_CODE>: New case.
5792 (sh_elf64_gc_mark_hook): Correct spacing.
5793 (sh_elf64_check_relocs): Ditto.
5794 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
5795 New case.
5796 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
5797 functions.
5798 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
5799 clarify describing comment. Add comments before all entries.
5800 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
5801 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
5802 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
5803 Sort .cranges section in final link. Prepare to set bit 0 on
5804 entry address.
5805 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
5806 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
5807 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
5808 .cranges section.
5809 (sh64_backend_section_from_shdr): New, to recognize
5810 SHT_SH5_CR_SORTED on incoming .cranges section.
5811 (elf_backend_section_from_shdr): Define.
5812 (sh64_elf_final_write_processing): Sort outgoing .cranges
5813 section. (New, temporarily disabled:) Set bit 0 on entry address
5814 according to ISA type.
5815 (sh64_find_section_for_address): New.
5816 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
5817 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
5818 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
5819 bfd_malloc, not xmalloc.
5820 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
5821 global.
5822 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
5823 temporarily disabled) setting bit 0 on entry address.
5824 (elf_backend_final_write_processing): Define.
5825 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
5826 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
5827 be a proper relocation for PTA and PTB rather than a marker.
5828 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
5829 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
5830 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
5831 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
5832 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
5833 Zero src_mask.
5834 * elf64-sh64.c: Ditto.
5835 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
5836 * elf32-sh64.c: Include opcodes/sh64-opc.h
5837 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
5838 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
5839 parameters. No unused parameters. Caller changed.
5840 <case R_SH_PT_16>: New case.
5841 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
5842 * Makefile.in: Regenerate.
5843 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
5844 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
5845 all code sections.
5846 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5847 (sh64_elf_merge_private_data): Ditto.
5848 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
5849 to access stored section flags.
5850 (sh64_elf_final_write_processing): Return immediately unless
5851 called by linker. Use sh64_elf_section_data (cranges) to get size
5852 of linker-generated cranges entries.
5853 (sh64_elf_copy_private_data): Add missing "return true".
5854 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5855 (sh_elf64_merge_private_data): Ditto.
5856 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
5857 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
5858 elf64-sh64.c:sh64_elf_fake_sections.
5859 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
5860 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
5861 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
5862 (sh64_elf_final_write_processing): New.
5863 (elf_backend_final_write_processing): Define.
5864 (sh64_elf_fake_sections): Get header flags from tdata field.
5865 (sh64_elf_copy_private_data): Do not call
5866 sh64_elf_copy_private_data_internal, just copy e_flags field.
5867 (sh64_elf_merge_private_data): Do not call
5868 sh64_elf_copy_private_data_internal.
5869 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
5870 Remove EF_SH64_ABI64, let ELF size make difference.
5871 Remove SH64-specific BFD section flag.
5872 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
5873 containing SHmedia through elf_section_data (asect)->tdata
5874 non-zero, not using a BFD section flag.
5875 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
5876 (sh64_elf_merge_private_data): Similar.
5877 (elf_backend_section_flags): Don't define.
5878 (sh64_elf_backend_section_flags): Delete.
5879 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
5880 not EF_SH64_ABI64.
5881 (sh_elf64_merge_private_data): Similar.
5882 * section.c (Section flags definitions): Don't define
5883 SEC_SH_ISA_SHMEDIA.
5884 (bfd-in2.h): Regenerate.
5885 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
5886 Make DataLabel references work with partial linking.
5887 * elf32-sh64.c: Fix formatting.
5888 (sh64_elf_link_output_symbol_hook): New.
5889 (elf_backend_link_output_symbol_hook): Define to
5890 sh64_elf_link_output_symbol_hook.
5891 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
5892 undefined if partial linking. Adjust sanity check.
5893 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
5894 (elf_backend_link_output_symbol_hook): Define to
5895 sh64_elf64_link_output_symbol_hook.
5896 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
5897 undefined if partial linking. Adjust sanity check.
5898 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
5899 Implement semantics for inter-file DataLabel references.
5900 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
5901 (sh64_elf64_add_symbol_hook): New.
5902 (sh_elf64_relocate_section): If passing an indirect symbol with
5903 st_type STT_DATALABEL on the way to a symbol with st_other
5904 STO_SH5_ISA32, do not bitor 1 to the relocation.
5905 (elf_backend_add_symbol_hook): Define to
5906 sh64_elf64_add_symbol_hook.
5907 * elf64-sh32.c: Tweak comments.
5908 (DATALABEL_SUFFIX): Define.
5909 (sh64_elf_add_symbol_hook): New.
5910 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
5911 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
5912 symbol with st_type STT_DATALABEL on the way to a symbol with
5913 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
5914 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
5915 Pass through STT_DATALABEL.
5916 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
5917 (elf_backend_get_symbol_type): Define.
5918 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
5919 (elf_backend_get_symbol_type): Define.
5920 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
5921 * elf32-sh64.c: Tweak comments.
5922 (sh64_elf_copy_private_data_internal): Add prototype.
5923 (bfd_elf32_bfd_set_private_flags): Define.
5924 (sh64_elf_copy_private_data_internal): Compare machine name, not
5925 textual BFD target name, to check whether to copy section flag
5926 SHF_SH5_ISA32.
5927 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
5928 Tweak section-contents-type-mismatch message.
5929 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
5930 Validize reloc-types.
5931 * elf64-sh64.c: New file.
5932 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
5933 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
5934 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
5935 Regenerate dependencies.
5936 * Makefile.in: Regenerate.
5937 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
5938 bfd_elf64_sh64l_vec.
5939 * configure.in: Handle bfd_elf64_sh64_vec and
5940 bfd_elf64_sh64l_vec.
5941 * configure: Regenerate.
5942 * po/POTFILES.in: Regenerate.
5943 * po/bfd.pot: Regenerate.
5944 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
5945 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
5946 anything else but EF_SH64 and EF_SH64_ABI64.
5947 (sh64_elf_merge_private_data): Emit error for anything else but
5948 EF_SH64 and EF_SH64_ABI64.
5949 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
5950 from targ_selvecs.
5951 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
5952 bfd_elf32_sh64l_vec as a temporary measure.
5953 * configure: Regenerate.
5954 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
5955 * cpu-sh.c (arch_info_struct): Include sh5 item
5956 unconditionalized.
5957 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
5958 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
5959 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
5960 * elf32-sh64.c: Tweak comments.
5961 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
5962 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
5963 (sh64_elf_copy_private_data_internal): Wrap long line.
5964 (sh64_elf_merge_private_data): Rewrite to allow objects from
5965 SH64 subsets to be linked together.
5966 (INCLUDE_SHMEDIA): Define.
5967 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
5968 Parenthesize plus-expression inside or-expression.
5969 <global symbol>: Ditto.
5970 (sh_elf_set_mach_from_flags): Remove code refusing
5971 deleted EF_SH64_32BIT_ABI flag.
5972 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
5973 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
5974 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
5975 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
5976 (sh_elf_relocate_section) <local symbol>: Or 1 in
5977 calculation of relocation if sym->st_other & STO_SH5_ISA32.
5978 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
5979 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
5980 relocation.
5981 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
5982 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
5983 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
5984 Regenerate dependencies.
5985 * Makefile.in: Regenerate.
5986 * archures.c: Add bfd_mach_sh5.
5987 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
5988 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
5989 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
5990 * configure: Regenerate.
5991 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
5992 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
5993 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
5994 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
5995 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
5996 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
5997 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
5998 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
5999 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
6000 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
6001 in item for SH5.
6002 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
6003 for SHmedia relocs.
6004 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
6005 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
6006 shmedia_prepare_reloc, goto final_link_relocate if it returns
6007 non-zero, else fail as before.
6008 (sh_elf_set_mach_from_flags): Provide function only if not defined
6009 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
6010 (sh_elf_set_private_flags): Provide function only if not defined
6011 as a macro.
6012 (sh_elf_copy_private_data): Similar.
6013 (sh_elf_merge_private_data): Similar.
6014 * section.c (SEC_SH_ISA_SHMEDIA): New.
6015 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
6016 * elf32-sh64.c: New file.
6017 * libbfd.h: Regenerate.
6018 * bfd-in2.h: Regenerate.
6019 * po/POTFILES.in: Regenerate.
6020 * po/bfd.pot: Regenerate.
6021 * bfd-in2.h: Regenerate.
6022 * libbfd.h: Regenerate.
6023
e108f470
DJ
60242002-02-07 Daniel Jacobowitz <drow@mvista.com>
6025
6026 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
6027 been included, not drag it in.
6028 * bfd-in2.h: Regenerate.
6029
259d18a3
L
60302002-02-06 H.J. Lu (hjl@gnu.org)
6031
6032 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
6033 the mach and ISA fields if necessary.
6034
f13b834e
NC
60352002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
6036
6037 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
6038 ARM architecture when an F_ARM_5 flag is detected, since we cannot
6039 be sure exactly which architecture this represents.
6040
82f6addb
NC
60412002-02-05 Nick Clifton <nickc@redhat.com>
6042
6043 * po/tr.po: Updated translation.
6044
899f54f5
AM
60452002-02-05 Alan Modra <amodra@bigpond.net.au>
6046
6047 From Jimi X <jimix@watson.ibm.com>
6048 * archures (bfd_mach_ppc64): Define.
6049 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
6050 (bfd_powerpc_arch): Define.
6051 * bfd-in2.h: Regenerate.
6052 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
6053 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
6054 (bfd_powerpc_archs): Add default powerpc64 arch.
6055
248866a8
AM
60562002-02-05 Alan Modra <amodra@bigpond.net.au>
6057
6058 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
6059 against section syms in readonly sections. Don't do the global
6060 sym check if we find one.
6061 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
6062 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 6063 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
6064 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
6065 (elf_s390_grok_prstatus): Add missing prototype.
6066
4fa5c2a8
HPN
60672002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
6068
6069 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
6070 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
6071 Call bfd_get_section_by_name only once. Initialize
6072 bpodata->n_bpo_relocs_this_section.
6073 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
6074 referring to DSOs.
6075 (bpo_reloc_request_sort_fn): Don't use difference of values as
6076 return-value.
6077
537c972e
DB
60782002-02-02 David O'Brien <obrien@FreeBSD>
6079
6080 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
6081 version 4.5 and later the same as 5-CURRENT.
6082 * configure: Re-generate.
6083
006336b8
JT
60842002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
6085
6086 * config.bfd (hppa*-*-netbsd*): New target.
6087
6c571f00
PT
60882002-01-31 Philipp Thomas <pthomas@suse.de>
6089
19397422
AM
6090 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
6091 to front of message. Unify messages with elf32-arm.h. Use
6092 commas where neccessary.
6093 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
6094 ERROR in messages. Unify messages with coff-arm.c. Correct
6095 VFP/FPA error message.
6096 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
6097 APCS-32 for translation.
6c571f00 6098
930b4cb2
HPN
60992002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
6100
6101 Perform on-demand global register allocation from
6102 R_MMIX_BASE_PLUS_OFFSET relocs.
6103 * elf64-mmix.c (struct bpo_reloc_section_info, struct
6104 bpo_reloc_request, struct bpo_greg_section_info): New.
6105 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
6106 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
6107 _bfd_mmix_check_all_relocs,
6108 _bfd_mmix_prepare_linker_allocated_gregs,
6109 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
6110 (elf_mmix_howto_table): Correct src_mask for most relocs.
6111 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
6112 case.
6113 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
6114 case. Fix typo in comment. New label do_mmix_reloc.
6115 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
6116 store first object file with a base-plus-offset reloc. Call
6117 mmix_elf_check_common_relocs for the part common with mmo.
6118 (mmix_elf_final_link): Write out linker-allocated register
6119 contents section.
6120 (elf_backend_gc_sweep_hook): Define.
6121 (bfd_elf64_bfd_relax_section): Define.
6122
6123 * mmo.c: Don't include <ctype.h>
6124 (mmo_init): Correct init-once logic.
6125
3e36d993
TR
61262002-02-01 Tom Rix <trix@redhat.com>
6127
6128 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
6129
ba323545
AM
61302002-02-01 Alan Modra <amodra@bigpond.net.au>
6131
6132 * Makefile.am: Run "make dep-am"
6133 * Makefile.in: Regenerate.
6134
012884d6
DB
61352002-01-31 David O'Brien <obrien@FreeBSD>
6136
6137 * configure.in: Recognize the differences in core files from FreeBSD
6138 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
6139 5-CURRENT.
6140 * configure: Regenerate.
6141
3b16e843
NC
61422002-01-31 Ivan Guzvinec <ivang@opencores.org>
6143
6144 * coff-or32.c: New file.
6145 * cpu-or32.c: New file.
6146 * elf32-or32.c: New file.
6147 * archures.c: Add support for or32.
6148 * targets.c: Add support for or32.
6149 * bfd-in2.h: Regenerate.
7dc0ab31 6150 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
6151 coff_write_object_contents): Add support for or32.
6152 * config.bfd: Add target.
6153 * configure.in: Add support for or32.
6154 * configure: Regenerate.
6155 * Makefile.am: Add support for or32.
6156 * Makefile.in: Regenerate.
3b16e843
NC
6157 * po/SRC-POTFILES.in: Add or32 files.
6158 * po/bfd.pot: Regenerate.
7dc0ab31 6159
caf8ca8e
NC
61602002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
6161 Don Lindsay <lindsayd@cisco.com>
6162
6163 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
6164 false' with a return of a bfd_reloc_ error code.
6165
e5dfef09
HPN
61662002-01-31 Hans-Peter Nilsson <hp@axis.com>
6167
6168 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
6169 unexport unreferenced symbols when --export-dynamic. Call
6170 _bfd_elf_strtab_delref when unexporting.
6171
4e4770d0
DJ
61722002-01-30 Daniel Jacobowitz <drow@mvista.com>
6173
6174 * bfd-in.h: Include <stdbool.h> if it is available.
6175 * bfd-in2.h: Regenerated.
6176
e1fa50e7
AM
61772002-01-31 Alan Modra <amodra@bigpond.net.au>
6178
6179 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
6180 not go via the plt.
6181
b5f79c76
NC
61822002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
6183
b5f79c76
NC
6184 * archures.c: Tidy up formatting of embedded comments.
6185 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 6186 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
6187 * reloc.c: Tidy up formatting of ordinary & embedded comments.
6188 * section.c: Tidy up formatting of embedded comments.
6189 * syms.c: Tidy up formatting of embedded comments.
6190 * targets.c: Tidy up formatting of embedded comments.
6191
6192 * bfd-in2.h: Regenerate.
6193
ca09e32b
NC
61942002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
6195
6196 * vms-tir.c (cmd_name): New function.
6197 (tir_cmd_name): New function.
6198 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
6199 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
6200 Fix formatting.
7dc0ab31 6201
ca09e32b
NC
6202 * peXXigen.c (pe_print_idata): Rearrange message to aid in
6203 translation.
6204 (pe_print_pdata): Rearrange message to aid in translation.
6205
6206 * libbfd.c (warn_deprecated): Rearrange error message to aid in
6207 translation.
6208
6209 * ihex.c (ihex_write_object_contents): Fix spelling typo.
6210
6211 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
6212
6213 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
6214 message to aid in translation.
6215
6216 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
6217 to aid in translation.
6218
6219 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
6220
7dc0ab31 62212002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
6222
6223 * coff-arm.c, elf32-elf.h: Unify messages.
6224
05f64ac6
NC
62252002-01-30 Nick Clifton <nickc@redhat.com>
6226
6227 * po/sv.po: Updated translation.
6228
f5a3e38a
NC
62292002-01-30 Philipp Thomas <pthomas@suse.de>
6230
6231 * dwarf2.c (read_abbrev): Use full section name in error message.
6232 (decode_line_info): Likewise.
661a3fd4
NC
6233
6234 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
6235 message.
6236
d926e03d
AM
62372002-01-30 Alan Modra <amodra@bigpond.net.au>
6238
6239 * elf64-ppc.c (func_desc_adjust): Only provide missing function
6240 descriptor symbols for undefined function code syms. Clear
6241 ELF_LINK_NON_ELF so that they can stay weak.
6242
030d18fb 62432002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 6244 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
6245
6246 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
6247 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
6248 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
6249 generation.
6250 * bfd-in2.h: Regenerate.
6251
fcc76bea
CD
62522002-01-29 Chris Demetriou <cgd@broadcom.com>
6253
6254 * elf32-mips.c: Add additional comments about HI16 relocation
6255 processing.
6256 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
6257 pc-relative relocations. (Reverts change made on 2001-10-31.)
6258 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
6259 for pc-relative relocations.
6260 (mips_elf_calculate_relocation): Add a comment about a kludge
6261 in the R_MIPS_GNU_REL_HI16 handling.
6262 (_bfd_mips_elf_relocate_section): Implement that kludge;
6263 adjust pc-relative HI16 relocation for difference in HI16 and
6264 LO16 addresses, since it can't easily be done in
6265 mips_elf_calculate_relocation.
6266
f9cd9119
MS
62672002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
6268
6269 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
6270 relocations with PC32 relocations for undefined or weak symbols.
6271 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
6272 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
6273
702248bb
JT
62742002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
6275
6276 * elfcore.h (elf_core_file_p): Improve comment for last change.
6277
4867be41
DJ
62782002-01-27 Daniel Jacobowitz <drow@mvista.com>
6279
6280 * configure: Regenerated.
6281
a94cef6a
JT
62822002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
6283
6284 * elfcore.h (elf_core_file_p): Set the machine architecture
6285 before processing the program headers.
6286
7562a296
HPN
62872002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
6288
966abd70
HPN
6289 * configure.in <64-bit configuration>: If using gcc, check and
6290 emit error for egcs-1.1.2.
6291 * configure: Regenerate.
6292
e8eab623
NC
62932002-01-26 Egor Duda <deo@logos-m.ru>
6294
6295 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
6296 as possible to avoid stack corruption.
6297
73896efb
RH
62982002-01-26 Richard Henderson <rth@redhat.com>
6299
6300 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
6301 for non-allocated sections.
6302
63032002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
6304
6305 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
6306 prstat.pr_reg even if it is a struct.
6307
73896efb 63082002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 6309
c5cd6d62 6310 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 6311
3d66c4f7
NC
63122002-01-25 Philipp Thomas <pthomas@suse.de>
6313
6314 * coffgen.c (coff_print_symbol): Don't mark info message
6315 for translation.
6316
9460ecda
NC
63172002-01-25 Nick Clifton <nickc@redhat.com>
6318
6319 * po/fr.po: Updated translation.
6320 * po/es.po: Updated translation.
6321
cc9ff76a
AM
63222002-01-25 Philipp Thomas <pthomas@suse.de>
6323
6324 * coff-alpha.c (alpha_relocate_section): Unify warning message
6325 for GP relative relocations without GP defined.
6326 * coff-mips.c (mips_relocate_section): Likewise.
6327
c68836a9
AM
63282002-01-25 Alan Modra <amodra@bigpond.net.au>
6329
6330 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
6331 unsigned overflow when new_offset < old_offset.
6332
e8eab623 63332002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
6334
6335 * bfd.c (_bfd_abort): Fix typo.
6336
8ba89f17
RH
63372002-01-23 Richard Henderson <rth@redhat.com>
6338
6339 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
6340 plt entries for undefweak symbols.
6341
c6953948
NC
63422002-01-23 Steve Ellcey <sje@cup.hp.com>
6343
c5cd6d62 6344 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
6345 (bfd_elf64_ia64_hpux_big_vec): Ditto.
6346 (bfd_elf32_h8300_vec): Ditto.
6347
41bd81ab
AM
63482002-01-23 Alan Modra <amodra@bigpond.net.au>
6349
6350 * elf64-ppc.c: Remove stale part of ABI comment.
6351 (NO_OPD_RELOCS): Define.
6352 (ppc64_elf_check_relocs): Use it.
6353 (ppc64_elf_relocate_section): Here too.
6354 (build_one_stub): Don't point function syms at the stub. Instead,
6355 hijack plt.offset.
6356 (ppc64_elf_relocate_section): Check whether REL24 relocs should
6357 really go to the stub. Make all dynamic relocs in opd against
6358 locals.
6359 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
6360 plt.offset.
6361
f304919d
RH
63622002-01-22 Richard Henderson <rth@redhat.com>
6363
6364 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
6365
c0ef99a7
AM
63662002-01-22 Alan Modra <amodra@bigpond.net.au>
6367
60ee0d4a
AM
6368 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
6369 TOC_BASE_OFF adjustment.
6370
c0ef99a7
AM
6371 * Makefile.am: Run "make dep-am".
6372 * Makefile.in: Regenerate.
6373 * po/SRC-POTFILES.in: Regenerate.
6374
64328b46
AM
63752002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
6376
6377 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
6378 host defines.
6379
59953665 63802002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
6381
6382 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
6383 Check for and emit error if sgot is NULL at this point.
6384
9596feea
JT
63852002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
6386
6387 * config.bfd (ia64*-*-netbsd*): New target.
6388
7b45c6e1
AM
63892002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
6390
6391 * som.c (som_write_space_strings): Comment typo fix.
6392
e5094212
AM
63932002-01-21 Alan Modra <amodra@bigpond.net.au>
6394
e86ce104
AM
6395 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
6396 is_func_descriptor fields.
6397 (link_hash_newfunc): Init them.
6398 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
6399 dot are candidates for plt entries. When processing .opd relocs,
6400 set function descriptor strings to point inside function code
6401 string, and set new ppc_link_hash_entry fields.
6402 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
6403 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
6404 function descriptors. It's now done in..
6405 (func_desc_adjust): New.
6406 (ppc64_elf_func_desc_adjust): New.
6407 (define elf_backend_always_size_sections): Define.
6408 (ppc64_elf_hide_symbol): New.
6409 (define elf_backend_hide_symbol): Define.
6410 (allocate_dynrelocs): Remove code looking up function descriptors
6411 as that has been done earlier.
6412 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
6413 table.
6414 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
6415 up function descriptor.
6416 (build_one_stub): Look up the function code sym. Check for
6417 invalid plt offsets.
6418 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
6419 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
6420
e5094212
AM
6421 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
6422 boolean param.
6423 (_bfd_elf_link_hash_hide_symbol): Likewise.
6424 * elflink.h (elf_link_add_object_symbols): Adjust call to
6425 elf_backend_hide_symbol.
6426 (elf_fix_symbol_flags): Likewise.
6427 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
6428 than bfd_alloc.
6429 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
6430 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
6431 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
6432 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
6433 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
6434 and adjust to suit.
6435 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
6436 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
6437 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
6438
40b8271b
AM
64392002-01-18 Alan Modra <amodra@bigpond.net.au>
6440
6441 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
6442 dynamic function descriptor symbol, not the associated function
6443 symbol.
6444
55baa95b
EC
64452002-01-17 Eric Christopher <echristo@redhat.com>
6446
6447 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
6448
328577ad
NC
64492002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
6450
6451 * po/bfd.pot: Regenerate.
6452 * po/fr.po: Regenerate.
6453
af746e92
AM
64542002-01-17 Alan Modra <amodra@bigpond.net.au>
6455
6456 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
6457 Remove "Elf_Internal_Shdr *" param.
6458 (_bfd_mips_elf_section_from_bfd_section): Ditto.
6459 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
6460 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
6461 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
6462 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
6463 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
6464 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
6465 function to override special sections. Remove hdr arg from
6466 backend call, and don't loop.
6467
175e9962
EC
64682002-01-16 Eric Christopher <echristo@redhat.com>
6469
6470 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
6471 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
6472 relocations requiring gp0 and gp.
6473
96a846ea
RE
64742002-01-16 Richard Earnshaw <rearnsha@arm.com>
6475
175e9962 6476 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
6477 EF_ARM_VFP_FLOAT.
6478 (elf32_arm_print_private_bfd_data): Likewise.
6479
af3ae48d
NC
64802002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
6481
6482 * po/tr.po: Import new version.
6483
10ed1bba
AM
64842002-01-16 Alan Modra <amodra@bigpond.net.au>
6485
6486 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
6487 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
6488 (ORI_R0_R0_0): Correct.
6489
5d1634d7
AM
64902002-01-16 Alan Modra <amodra@bigpond.net.au>
6491
6492 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
6493 when plt_not_loaded.
6494 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
6495 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
6496 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
6497 (ppc64_elf_glink_code): Delete.
6498 (PPC64_ELF_GLINK_SIZE): Delete.
6499 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
6500 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
6501 ORI_R0_R0_0): Define.
6502 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
6503 (struct ppc_link_hash_table): Add sstub and plt_overflow.
6504 (ppc64_elf_link_hash_table_create): Init them.
6505 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
6506 Don't copy to shared lib.
6507 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
6508 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
6509 (allocate_dynrelocs <plt>): Don't change function sym here. Make
6510 room for .stub and .glink code.
6511 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
6512 DT_PPC64_GLINK.
6513 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
6514 bfd_elf64_bfd_final_link.
6515 (bfd_elf64_bfd_final_link): Don't define.
6516 (ppc64_elf_size_stubs): New.
6517 (build_plt_stub): New.
6518 (build_one_stub): New.
6519 (ppc64_elf_build_stubs): New.
6520 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
6521 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
6522 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
6523 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
6524 case output sections not separate. Adjust DT_RELASZ to not
6525 include plt relocs. Set reserved got entry. Set got and plt
6526 entry size.
6527 (elf_backend_got_header_size): Set to 8.
6528 * elf64-ppc.h: New file.
6529
c601ffdb
AM
65302002-01-16 Alan Modra <amodra@bigpond.net.au>
6531
6532 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
6533 sections, use bfd_section_list_remove.
6534 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6535 * elflink.h (elf_link_add_object_symbols): When removing all
6536 sections, use bfd_section_list_clear.
6537
8fb4cb7f
NC
65382002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
6539
6540 * po/sv.po: New file: Swedish translation.
6541 * configure.in (ALL_LINGUAS): Add sv.
6542 * configure: Regenerate.
6543
d3c456e9
JJ
65442002-01-15 Jakub Jelinek <jakub@redhat.com>
6545
6546 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
6547 * elf.c (merge_sections_remove_hook): New function.
6548 (_bfd_elf_merge_sections): Pass it as 3rd argument to
6549 _bfd_merge_sections.
6550 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
6551 * libbfd.h: Rebuilt.
6552 * merge.c (_bfd_merge_sections): Add remove_hook argument.
6553 Call remove_hook if a SEC_EXCLUDE section is encountered.
6554
1f7fd478
NC
65552002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
6556
6557 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
6558 (xstormy16_reloc_map): Initialise new field with correct howto
6559 table.
6560 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
6561 howto entry.
6562
b87011e9
MS
65632002-01-10 Michael Snyder <msnyder@redhat.com>
6564
6565 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
6566 (elfcore_write_pstatus): Use long instead of pid_t;
6567 * elf-bfd.h: Change prototypes to use long instead of pid_t;
6568
175e9962 65692002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
6570
6571 * elf.c: Update copyright years.
6572 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
6573 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
6574
7c76fa91
MS
65752002-01-08 Michael Snyder <msnyder@redhat.com>
6576
6577 Add capability to write corefile note sections, for gdb.
6578 * elf.c (elfcore_write_note): New function.
6579 (elfcore_write_prpsinfo): New function.
6580 (elfcore_write_prstatus): New function.
6581 (elfcore_write_pstatus): New function.
6582 (elfcore_write_prfpreg): New function.
6583 (elfcore_write_prxfpreg): New function.
97996af6 6584 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 6585
e1fddb6b
AO
65862002-01-08 Alexandre Oliva <aoliva@redhat.com>
6587
6588 * elf.c (elf_fake_sections): Propagate errors from
6589 elf_backend_fake_section.
6590
8d05742f
JT
65912002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
6592
6593 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
6594 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
6595 (elf32-sh-nbsd.lo): New rule.
6596 * Makefile.in: Regenerate.
6597 * config.bfd (sh*le-*-netbsdelf*): New target.
6598 (sh*-*-netbsdelf*): New target.
6599 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
6600 (bfd_elf32_shnbsd_vec): New vector.
6601 (bfd_elf32_shlnbsd_vec): New vector.
6602 * configure: Regenerate.
6603 * elf32-sh-nbsd.c: New file.
6604 * targets.c: Update copyright years.
175e9962 6605 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
6606 bfd_elf32_shnbsd_vec.
6607
1dba4cb4
AH
66082002-01-07 Aldy Hernandez <aldyh@redhat.com>
6609
6610 * coff-rs6000.c (READ20): Use bfd_scan_vma.
6611
47b22aef
GK
66122002-01-07 Geoffrey Keating <geoffk@redhat.com>
6613
6614 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
6615 of a symbol in a section that will be deleted.
6616
be2d1673
NC
66172002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
6618
6619 * po/es.po: New file: Spanish translation.
6620 * configure.in (ALL_LINGUAS): Add es.
6621 * configure: Regenerate.
6622
d9cf1b54
AM
66232002-01-06 Steve Ellcey <sje@cup.hp.com>
6624
6625 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
6626 argument so we can handle HP-UX specially.
6627 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
6628 (elfNN_hpux_backend_section_from_bfd_section): New for support
6629 of SHN_IA_64_ANSI_COMMON.
6630 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
6631 (is_unwind_section_name): Add special HP-UX support.
6632 (elfNN_ia64_section_from_shdr): Add support for more sections.
6633 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
6634 add support for more sections.
6635 (elfNN_ia64_additional_program_headers): Modify
6636 is_unwind_section_name call.
6637 (elfNN_ia64_modify_segment_map): Remove assumption that there is
6638 only one unwind section in segment.
6639
3f3c5c34
AM
66402002-01-06 Alan Modra <amodra@bigpond.net.au>
6641
6642 * syms.c (_bfd_generic_make_empty_symbol): New function.
6643 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
6644 _bfd_generic_make_empty_symbol.
6645 * libbfd.h: Regenerate.
6646 * bfd-in2.h: Regenerate.
6647 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
6648 (hppabsd_core_get_symtab_upper_bound): Don't define.
6649 (hppabsd_core_get_symtab): Likewise.
6650 (hppabsd_core_print_symbol): Likewise.
6651 (hppabsd_core_get_symbol_info): Likewise.
6652 (hppabsd_core_bfd_is_local_label_name): Likewise.
6653 (hppabsd_core_get_lineno): Likewise.
6654 (hppabsd_core_find_nearest_line): Likewise.
6655 (hppabsd_core_bfd_make_debug_symbol): Likewise.
6656 (hppabsd_core_read_minisymbols): Likewise.
6657 (hppabsd_core_minisymbol_to_symbol): Likewise.
6658 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
6659 Formatting fixes.
6660 * hpux-core.c: Similarly.
6661 * irix-core.c: Similarly.
6662 * osf-core.c: Similarly.
6663 * sco5-core.c: Similarly.
6664 * binary.c (binary_make_empty_symbol): Remove function, define as
6665 _bfd_generic_make_empty_symbol.
6666 * ihex.c (ihex_make_empty_symbol): Likewise.
6667 * mmo.c (mmo_make_empty_symbol): Likewise.
6668 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
6669 * srec.c (srec_make_empty_symbol): Likewise.
6670 * versados.c (versados_make_empty_symbol): Likewise.
6671 * vms.c (_bfd_vms_make_empty_symbol): Remove.
6672 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
6673 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
6674 rather than _bfd_vms_make_empty_symbol.
6675 * vms-misc.c (new_symbol): Likewise.
6676
3f0a7f7f
AM
66772002-01-05 Alan Modra <amodra@bigpond.net.au>
6678
9e7b37b3
AM
6679 * section.c (bfd_section_init): Remove unnecessary initialisations.
6680 (bfd_section_list_clear): New function.
6681 (bfd_section_list_remove, bfd_section_list_insert): New macros.
6682 (_bfd_strip_section_from_output): Use them.
6683 * coffcode.h (coff_set_alignment_hook): Likewise.
6684 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
6685 * elf64-mips.c (mips_elf64_final_link): Likewise.
6686 * elf64-mmix.c (mmix_elf_final_link): Likewise.
6687 * sunos.c (sunos_add_dynamic_symbols): Likewise.
6688 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
6689 * bfd-in2.h: Regenerate.
6690
6691 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
6692 rather than doing our own section handling. Clean up after errors
6693 with bfd_release and bfd_section_list_clear. Handle unexpected
6694 flags.
6695 * aoutf1.h (sunos4_core_file_p): Likewise.
6696 * aix386-core.c (aix386_core_file_p): Likewise.
6697 * cisco-core.c (cisco_core_file_validate): Likewise.
6698 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
6699 * trad-core.c (trad_unix_core_file_p): Likewise.
6700
6701 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
6702 with bfd_release and bfd_section_list_clear.
6703 * hpux-core.c (hpux_core_core_file_p): Likewise.
6704 * irix-core.c (irix_core_core_file_p): Likewise.
6705 * lynx-core.c (lynx_core_file_p): Likewise.
6706 * osf-core.c (osf_core_core_file_p): Likewise.
6707 * rs6000-core.c (rs6000coff_core_p): Likewise.
6708 * sco5-core.c (sco5_core_file_p): Likewise.
6709
3f0a7f7f
AM
6710 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
6711 sign extension adjustments without conditionals.
6712
a3aa38ee
JJ
67132002-01-04 Jakub Jelinek <jakub@redhat.com>
6714
6715 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
6716 CIE at .eh_frame start is removed due to no FDEs referencing it.
6717
8a8b2d4b
AJ
67182002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
6719
6720 * config.bfd (x86_64-*-netbsd*): New target.
6721 * configure.in (x86_64-*-netbsd*): Set COREFILE
6722 to netbsd-core.lo.
6723 * configure: Regenerated.
6724
04b5af89
TR
67252002-01-03 Tom Rix <trix@redhat.com>
6726
6727 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
6728 for recent bfd_make_section_anyway change.
6729
51c5503b
NC
67302002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
6731
6732 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6733 R_ARM_THM_PC11 reloc.
6734
07f7c046
NC
67352002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
6736
6737 * configure.in (LINGUAS): Add ja.
6738 * configure: Regenerate.
6739 * po/ja.po: Import from translation project's web site.
6740
5eefb65f
NC
67412002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
6742
6743 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
6744 messages to ease translation into other languages.
6745
39e90f10 6746For older changes see ChangeLog-0001
56882138
AM
6747\f
6748Local Variables:
6749mode: change-log
6750left-margin: 8
6751fill-column: 74
6752version-control: never
6753End: