b0ca9d0c901142f2222fcf75bba895f420e7fcbb
[binutils-gdb.git] / bfd / ChangeLog
1 2002-06-05 H.J. Lu <hjl@gnu.org>
2
3 * elfxx-mips.c (mips_elf_calculate_relocation): Call
4 _bfd_elf_rel_local_sym for STT_SECTION relocations against
5 the SEC_MERGE section.
6
7 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8
9 * coff-alpha.c: Update copyright date.
10 * coff-mips.c: Likewise.
11 * xcoff-target.h: Likewise.
12
13 * bfd-in.h: Remove "taken from the source" comment.
14 * libbfd-in.h: Likewise.
15 * libcoff-in.h: Likewise.
16 * bfd-in2.h: Regenerate.
17 * libbfd.h: Regenerate.
18 * libcoff.h: Regenerate.
19
20 * elf.c (bfd_elf_discard_group): Return true.
21 * elf-bfd.h (bfd_elf_discard_group): Declare.
22 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
23 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
24 * bfd.c (bfd_discard_group): Define.
25 * targets.c (struct bfd_target): Add _bfd_discard_group.
26 (BFD_JUMP_TABLE_LINK): Here too.
27 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
28 * aout-adobe.c (aout_32_bfd_discard_group): Define.
29 * aout-target.h (MY_bfd_discard_group): Define.
30 * aout-tic30.c (MY_bfd_discard_group): Define.
31 * binary.c (binary_bfd_discard_group): Define.
32 * bout.c (b_out_bfd_discard_group): Define.
33 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
34 * coffcode.h (coff_bfd_discard_group): Define.
35 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
36 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
37 * i386msdos.c (msdos_bfd_discard_group): Define.
38 * i386os9k.c (os9k_bfd_discard_group): Define.
39 * ieee.c (ieee_bfd_discard_group): Define.
40 * ihex.c (ihex_bfd_discard_group): Define.
41 * mmo.c (mmo_bfd_discard_group): Define.
42 * nlm-target.h (nlm_bfd_discard_group): Define.
43 * oasys.c (oasys_bfd_discard_group): Define.
44 * ppcboot.c (ppcboot_bfd_discard_group): Define.
45 * som.c (som_bfd_discard_group): Define.
46 * srec.c (srec_bfd_discard_group): Define.
47 * tekhex.c (tekhex_bfd_discard_group): Define.
48 * versados.c (versados_bfd_discard_group): Define.
49 * vms.c (vms_bfd_discard_group): Define.
50 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
51 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
52 (aix5coff64_vec): Likewise.
53 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
54
55 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
56
57 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
58 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
59 (elf32-sh64-com.lo): New dependency list.
60 * Makefile.in: Regenerate.
61 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
62 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
63 elf32-sh64-com.lo.
64 * configure: Regenerate.
65 * elf32-sh64.c (sh64_address_in_cranges)
66 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
67 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
68 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
69 * elf32-sh64-com.c: ...here. New file.
70
71 2002-06-04 Alan Modra <amodra@bigpond.net.au>
72
73 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
74 ATTRIBUTE_UNUSED on used params.
75 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
76 before calling bfd_section_from_elf_index on local syms.
77 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
78
79 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
80
81 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
82 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
83 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
84 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
85 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
86 * Makefile.in: Regenerate.
87 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
88 (sh64-*-netbsd*): New targets.
89 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
90 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
91 * configure: Regenerate.
92 * elf32-sh64-nbsd.c: New file.
93 * elf64-sh64-nbsd.c: New file.
94 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
95 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
96 bfd_elf64_sh64lnbsd_vec.
97
98 2002-06-04 Alan Modra <amodra@bigpond.net.au>
99
100 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
101 (bfd_section_from_shdr): Likewise. Set section name of group
102 sections from signature.
103 (group_signature): Split out from setup_group. Ensure symbol table
104 is available.
105 (bfd_elf_discard_group): New function.
106 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
107 .gnu.linkonce* sections if they are members of a group.
108 (set_group_contents): Set GRP_COMDAT flag.
109 * section.c (bfd_discard_group): New function.
110 * bfd-in.h (bfd_elf_discard_group): Declare.
111 * bfd-in2.h: Regenerate.
112 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
113 (elf_linkonce_p): Define.
114
115 2002-06-04 Alan Modra <amodra@bigpond.net.au>
116
117 * elf.c (bfd_section_from_shdr): Make "name" const.
118 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
119 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
120 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
121 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
122 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
123 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
124 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
125 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
126 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
127 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
128 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
129
130 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
131
132 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
133 ABI.
134
135 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
136
137 * elf32-arc.c: Fix formatting.
138 * elf32-arm.h: Likewise.
139 * elf32-cris.c: Likewise.
140 * elf32-dlx.c: Likewise.
141 * elf32-hppa.c: Likewise.
142 * elf32-i386.c: Likewise.
143 * elf32-i386qnx.c: Likewise.
144 * elf32-or32.c: Likewise.
145 * elf32-s390.c: Likewise.
146 * elf32-sh64.c: Likewise.
147 * elf32-vax.c: Likewise.
148 * elf32-xstormy16.c: Likewise.
149 * elf64-alpha.c: Likewise.
150 * elf64-mmix.c: Likewise.
151 * elf64-ppc.c: Likewise.
152 * elf64-s390.c: Likewise.
153 * elf64-sh64.c: Likewise.
154 * elf64-x86-64.c: Likewise.
155
156 2002-06-02 Richard Henderson <rth@redhat.com>
157
158 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
159 null when there are no got entries for a symbol.
160 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
161 uninitialized variable warning.
162
163 2002-06-01 Richard Henderson <rth@redhat.com>
164
165 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
166 undefined symbols here.
167 (elf64_alpha_relax_section): Do it here. Also test for not
168 defined in the current module.
169 (elf64_alpha_relocate_section_r): Split out of ...
170 (elf64_alpha_relocate_section): ... here. Don't dereference
171 NULL when looking up local got entries.
172
173 2002-06-01 Richard Henderson <rth@redhat.com>
174
175 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
176 symbols from JSR relaxation.
177 (elf64_alpha_size_plt_section_1): New.
178 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
179 (elf64_alpha_size_rela_got_1): ... here.
180 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
181 (elf64_alpha_size_rela_got_section): ... here.
182 (elf64_alpha_size_plt_section): New.
183 (elf64_alpha_relax_section): Call them.
184 (elf64_alpha_size_got_sections): Remove output_bfd arg.
185 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
186
187 2002-06-01 Richard Henderson <rth@redhat.com>
188
189 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
190 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
191 in shared libraries. Fix DTPRELHI and TPRELHI value.
192 (INSN_ADDQ, INSN_RDUNIQ): New.
193 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
194 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
195 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
196 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
197 Handle GOTDTPREL and GOTTPREL relocations.
198 (elf64_alpha_relax_gprelhilo): New.
199 (elf64_alpha_relax_tls_get_addr): New.
200 (elf64_alpha_relax_find_tls_segment): New.
201 (elf64_alpha_relax_section): Handle TLS relocations.
202 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
203 (elf64_alpha_check_relocs): Set it.
204
205 2002-06-01 Richard Henderson <rth@redhat.com>
206
207 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
208
209 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
210 check; don't suppress dynamic relocs for non-allocated sections.
211
212 * elf64-alpha.c: Remove dead code.
213
214 2002-05-31 Alan Modra <amodra@bigpond.net.au>
215
216 * bfd-in2.h: Regenerate.
217 * libbfd.h: Regenerate.
218 * po/SRC-POTFILES.in: Regenerate.
219
220 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
221 space for bss .plt.
222
223 2002-05-31 Graeme Peterson <gp@qnx.com>
224
225 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
226 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
227 Run "make dep-am".
228 * Makefile.in: Regenerate.
229 * config.bfd: Add i[3456]86-*-nto-qnx* support.
230 * configure.in: Add bfd_elf32_i386qnx_vec support.
231 * configure: Regenerate.
232 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
233 is_contained_by_filepos, and copy_private_bfd_data_p.
234 * elf.c (assign_file_positions_for_segments): Call backend
235 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
236 (IS_CONTAINED_BY_FILEPOS): Define.
237 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
238 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
239 Fix non-K&R call to _bfd_error_handler.
240 (_bfd_elf_copy_private_section_data): Use backend
241 copy_private_bfd_data_p.
242 * elf32-i386.c: Don't include elfxx-target.h when
243 ELF32_I386_C_INCLUDED is defined.
244 * elf32-i386qnx.c: New QNX elf backend file.
245 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
246 elf_backend_is_contained_by_filepos, and
247 elf_backend_do_copy_private_bfd_data.
248 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
249
250 2002-05-31 Alan Modra <amodra@bigpond.net.au>
251
252 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
253 Move other similar defines to start of file.
254
255 2002-05-30 Tom Rix <trix@redhat.com>
256
257 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
258 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
259
260 2002-05-30 Richard Henderson <rth@redhat.com>
261
262 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
263 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
264 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
265 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
266 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
267 (struct alpha_elf_obj_tdata): Rename total_got_entries and
268 n_local_got_entries to total_got_size and local_got_size.
269 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
270 (alpha_got_entry_size): New.
271 (elf64_alpha_relax_with_lituse): Use it.
272 (elf64_alpha_relax_without_lituse): Likewise.
273 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
274 (get_got_entry): New.
275 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
276 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
277 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
278 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
279 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
280 (elf64_alpha_calc_got_offsets): Likewise.
281 (alpha_dynamic_entries_for_reloc): New.
282 (elf64_alpha_calc_dynrel_sizes): Use it.
283 (elf64_alpha_size_dynamic_sections): Likewise.
284 (elf64_alpha_relocate_section): Handle TLS relocations.
285 * reloc.c: Add Alpha TLS relocations.
286 * bfd-in2.h, libbfd.h: Rebuild.
287
288 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
289
290 * peXXigen.c (pe_print_idata): Remove double printed
291 import table lines; add Bound-To comment.
292
293 2002-05-29 Matt Thomas <matt@3am-software.com>
294
295 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
296 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
297 (elf32-vax.lo): New rule.
298 * Makefile.in: Regenerate.
299 * configure.in (bfd_elf32_vax_vec)
300 (vaxnetbsd_vec): New vectors.
301 * configure: Regenerate.
302 * config.bfd (vax-*-netbsdelf*)
303 (vax-*-netbsdaout*)
304 (vax-*-netbsd*): New targets.
305 * elf32-vax.c: New file.
306 * reloc.c: Add VAX relocations.
307 * bfd-in2.h: Regenerate.
308 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
309
310 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
311
312 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
313 and bfd_elf32_bigarm_vec to targ_selvecs.
314
315 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
316
317 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
318 with auto-imported symbols.
319
320 2002-05-29 Adam Nemet <anemet@lnxw.com>
321
322 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
323 sections only record bfd.
324 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
325 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
326 * bfd-in2.h: Regenerate.
327
328 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
329
330 * syms.c (_bfd_stab_section_find_nearest_line): Move
331 declaration and initialisation of saw_line and saw_func out of
332 for loop.
333
334 2002-05-29 Alan Modra <amodra@bigpond.net.au>
335
336 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
337 (bfd_elf64_get_symbol_info): Define.
338 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
339
340 2002-05-29 Andrey Volkov <avolkov@transas.com>
341
342 * cpu-h8300.c: Make default h8300 machine first in machine list.
343
344 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
345
346 * config.bfd: Added DLX configuraton.
347 * Makefile.am: Added DLX configuraton.
348 * configure.in: Added DLX configuraton.
349 * archures.c: Add DLX architecure.
350 * reloc.c: Add DLX relocs.
351 * targets.c: Added DLX target vector.
352 * configure: Regenerate.
353 * Makefile.in: Regenreate.
354 * bfd-in2.h: Regenreate.
355 * elf32-dlx.c: New file: Support DLX target.
356 * cpu-dlx.c: New file: Support DLX target.
357
358 2002-05-25 Alan Modra <amodra@bigpond.net.au>
359
360 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
361
362 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
363 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
364 strings to point inside function code sym string.
365 (func_desc_adjust): Likewise.
366 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
367
368 2002-05-24 Michal Ludvig <mludvig@suse.cz>
369
370 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
371 (elf64_x86_64_grok_psinfo): Added.
372
373 2002-05-24 TAMURA Kent <kent@netbsd.org>
374
375 * config.bfd: Add a target for i386-netbsdpe.
376
377 2002-05-24 Alan Modra <amodra@bigpond.net.au>
378
379 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
380 and is_func_descriptor.
381 (func_desc_adjust): Hide function code sym in shared libs unless
382 there is a matching exported function descriptor sym.
383
384 2002-05-23 Jakub Jelinek <jakub@redhat.com>
385
386 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
387 for symbols from SHF_TLS section.
388 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
389 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
390 (map_sections_to_segments): Build PT_TLS segment if necessary.
391 (assign_file_positions_for_segments): Likewise.
392 (get_program_header_size): Account for PT_TLS segment.
393 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
394 SEC_THREAD_LOCAL sections to STT_TLS.
395 * reloc.c: Add 386 and IA-64 TLS relocs.
396 * section.c (SEC_THREAD_LOCAL): Define.
397 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
398 Remove.
399 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
400 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
401 unconditionally.
402 (struct elf_final_link_info): Add first_tls_sec.
403 (elf_bfd_final_link): Set first_tls_sec.
404 Compute elf_hash_table (info)->tls_segment.
405 (elf_link_output_extsym): Handle STT_TLS symbols.
406 (elf_link_input_bfd): Likewise.
407 * syms.c (BSF_THREAD_LOCAL): Define.
408 * bfd-in2.h: Rebuilt.
409 * libbfd.h: Rebuilt.
410 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
411 elf_i386_mkobject, elf_i386_object_p): New functions.
412 (elf_howto_table): Add TLS relocs.
413 (elf_i386_reloc_type_lookup): Support TLS relocs.
414 (elf_i386_info_to_howto_rel): Likewise.
415 (struct elf_i386_link_hash_entry): Add tls_type.
416 (struct elf_i386_obj_tdata): New.
417 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
418 New macros.
419 (struct elf_i386_link_hash_table): Add tls_ldm_got.
420 (link_hash_newfunc): Clear tls_type.
421 (elf_i386_check_relocs): Support TLS relocs.
422 (elf_i386_gc_sweep_hook): Likewise.
423 (allocate_dynrelocs): Likewise.
424 (elf_i386_size_dynamic_sections): Likewise.
425 (elf_i386_relocate_section): Likewise.
426 (elf_i386_finish_dynamic_symbol): Likewise.
427 (bfd_elf32_mkobject, elf_backend_object_p): Define.
428 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
429 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
430 want_tprel, want_dtpmod, want_dtprel.
431 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
432 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
433 R_IA64_LTOFF_TPREL22.
434 (elf_code_to_howto_index): Add TLS relocs.
435 (elfNN_ia64_check_relocs): Support TLS relocs.
436 (allocate_global_data_got): Account for TLS .got data.
437 (allocate_dynrel_entries): Account for TLS dynamic relocations.
438 (elfNN_ia64_install_value): Supprt TLS relocs.
439 (set_got_entry): Support TLS relocs.
440 (elfNN_ia64_relocate_section): Likewise.
441
442 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
443
444 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
445 BLX reloc round the relocation up rather than down.
446 * coff-arm.c (coff_arm_relocate_section): Likewise.
447
448 2002-05-21 H.J. Lu (hjl@gnu.org)
449
450 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
451 definition.
452
453 2002-05-22 Alan Modra <amodra@bigpond.net.au>
454
455 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
456 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
457
458 2002-05-22 Alan Modra <amodra@bigpond.net.au>
459
460 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
461 unresolved relocs.
462 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
463
464 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
465
466 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
467 non-ELF targets.
468
469 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
470
471 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
472 an error value.
473 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
474 return with false on error.
475 (elf_link_input_bfd): Check reloc_emitter return value.
476
477 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
478
479 * config.bfd (armeb-*-netbsdelf*): New target.
480
481 2002-05-20 Alan Modra <amodra@bigpond.net.au>
482
483 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
484 at the plt call stub.
485
486 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
487
488 * cpu-mips.c (mips_compatible): Don't try to check machine
489 compatibility.
490
491 2002-05-18 Tom Rix <trix@redhat.com>
492
493 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
494
495 2002-05-17 Alan Modra <amodra@bigpond.net.au>
496
497 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
498 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
499 we've already warned about an undefined symbol. Report more
500 detail on reloc errors.
501
502 2002-05-17 Alan Modra <amodra@bigpond.net.au>
503
504 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
505 * configure.in: Invoke AM_INSTALL_LIBBFD.
506 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
507 (install_libbfd): .. New target.
508 (uninstall_libbfd): Likewise.
509 (install-bfdlibLTLIBRARIES): Likewise.
510 (uninstall-bfdlibLTLIBRARIES): Likewise.
511 (bfdlibdir): New.
512 (bfdincludedir): New.
513 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
514 * aclocal.m4: Regenerate.
515 * configure: Regenerate.
516 * Makefile.in: Regenerate.
517
518 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
519
520 * hash.c (bfd_hash_lookup): Remove computation of len from inside
521 hash loop.
522
523 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
524
525 * config.bfd: Add targets for sh64-linux (little endian and
526 big endian).
527
528 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
529
530 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
531 is located in the same section as the import table. Instead
532 check, and if necessary load the section containing the thunk.
533
534 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
535
536 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
537 bfd_bread.
538 (xcoff64_core_file_matches_executable_p): Replace bfd_read
539 with bfd_bread.
540
541 2002-05-15 Alan Modra <amodra@bigpond.net.au>
542
543 * aix5ppc-core.c: Warning fixes.
544 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
545 * aout-target.h (MY_bfd_link_just_syms): Define.
546 * aout-tic30.c (MY_bfd_link_just_syms): Define.
547 * bfd.c (bfd_link_just_syms): Define.
548 * binary.c (binary_bfd_link_just_syms): Define.
549 * bout.c (b_out_bfd_link_just_syms): Define.
550 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
551 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
552 * coffcode.h (coff_bfd_link_just_syms): Define.
553 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
554 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
555 (_bfd_elf_link_just_syms): Declare.
556 * elf.c (_bfd_elf_link_just_syms): New function.
557 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
558 sections haven't already been discarded by the linker.
559 * elflink.h (elf_link_add_object_symbols): Likewise for stab
560 sections and SEC_MERGE sections.
561 (elf_bfd_discard_info): Similarly here.
562 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
563 * i386msdos.c (msdos_bfd_link_just_syms): Define.
564 * i386os9k.c (os9k_bfd_link_just_syms): Define.
565 * ieee.c (ieee_bfd_link_just_syms): Define.
566 * ihex.c (ihex_bfd_link_just_syms): Define.
567 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
568 (_bfd_generic_link_just_syms): Declare.
569 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
570 * linker.c (_bfd_generic_link_just_syms): New function.
571 * mmo.c (mmo_bfd_link_just_syms): Define.
572 * nlm-target.h (nlm_bfd_link_just_syms): Define.
573 * oasys.c (oasys_bfd_link_just_syms): Define.
574 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
575 * som.c (som_bfd_link_just_syms): Define.
576 * srec.c (srec_bfd_link_just_syms): Define.
577 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
578 (BFD_JUMP_TABLE_LINK): And here.
579 * tekhex.c (tekhex_bfd_link_just_syms): Define.
580 * versados.c (versados_bfd_link_just_syms): Define.
581 * vms.c (vms_bfd_link_just_syms): Define.
582 * libbfd.h: Regenerate.
583 * bfd-in2.h: Regenerate.
584
585 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
586
587 * elf32-mips.c: Remove superfluous definitions copied from
588 elfxx-mips.c.
589 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
590 SGIish vectors to check the special case.
591 (mips_elf_hi16_reloc): Fix comment.
592 (mips_elf_got16_reloc): Likewise.
593 (_bfd_mips_elf32_gprel16_reloc): Likewise.
594 (elf_reloc_map): Code cleanup.
595 (mips_reloc_map): Add comment.
596 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
597 (mips_elf32_rtype_to_howto): Likewise.
598 (mips_elf32_discard_info): Likewise.
599 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
600 lead to IRIX compatibility now.
601
602 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
603
604 * elfxx-mips.c: Call it IRIX, not Irix in comments.
605
606 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
607
608 * config.bfd (shle-*-netbsdelf*): Add target which includes
609 sh64 support.
610
611 2002-05-13 David Edelsohn <edelsohn@gnu.org>
612
613 * configure.in: Revert 2002-04-07. Instead, auto-configure
614 HAVE_ST_C_IMPL.
615 * configure: Regenerate.
616 * config.in: Regenerate.
617 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
618 or AIX_5_CORE.
619
620 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
621
622 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
623 corefiles as well.2
624 * configure: Regenerate.
625
626 2002-05-13 Alan Modra <amodra@bigpond.net.au>
627
628 * Makefile.am (install-data-local): Install headers to
629 $(exec_prefix)/include.
630 * Makefile.in: Regenerate.
631
632 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
633 Daniel Jacobowitz <drow@mvista.com>
634
635 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
636 map BFD_RELOC_RVA.
637
638 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
639
640 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
641 hppa*-*-openbsd*): New targets.
642 * configure.in (alpha*-*-openbsd*): Set COREFILE.
643 * configure: Regenerate.
644
645 2002-05-10 Tom Rix <trix@redhat.com>
646
647 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
648 xcoff64_ppc_relocate_section.
649 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
650 * libxcoff.h: Common xcoff_reloc_type function declaration.
651
652 2002-05-10 Alan Modra <amodra@bigpond.net.au>
653
654 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
655 added in 2002-05-09 commit.
656
657 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
658 don't look for stubs on all undefined syms.
659
660 2002-05-09 Alan Modra <amodra@bigpond.net.au>
661
662 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
663 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
664 pcrel_offset.
665
666 * elf32-i386.c (elf_howto_table): Comments.
667 (elf_i386_relocate_section): Handle more relocs for relocatable
668 linking and against SEC_MERGE sections.
669
670 2002-05-08 Alan Modra <amodra@bigpond.net.au>
671
672 * elf32-ppc.c (ppc_elf_create_got): New function.
673 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
674 _bfd_elf_create_dynamic_sections. Correct .plt flags.
675 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
676 _bfd_elf_create_got_section.
677
678 2002-05-07 Alan Modra <amodra@bigpond.net.au>
679
680 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
681 * elfxx-target.h (elf_backend_rela_normal): Define.
682 (elfNN_bed): Init rela_normal.
683 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
684 for section symbols here if rela_normal. Simplify abs section test.
685 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
686 return immediately. Remove code handling relocatable linking.
687 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
688 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
689 * elf32-i370.c (i370_elf_relocate_section): Likewise.
690 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
691 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
692 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
693 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
694 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
695 * elf32-s390.c (elf_s390_relocate_section): Likewise.
696 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
697 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
698 * elf64-s390.c (elf_s390_relocate_section): Likewise.
699 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
700 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
701 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
702 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
703 * elf-m10200.c (elf_backend_rela_normal): Define.
704 * elf-m10300.c (elf_backend_rela_normal): Define.
705 * elf32-fr30.c (elf_backend_rela_normal): Define.
706 * elf32-i370.c (elf_backend_rela_normal): Define.
707 * elf32-i860.c (elf_backend_rela_normal): Define.
708 * elf32-m68k.c (elf_backend_rela_normal): Define.
709 * elf32-mcore.c (elf_backend_rela_normal): Define.
710 * elf32-openrisc.c (elf_backend_rela_normal): Define.
711 * elf32-ppc.c (elf_backend_rela_normal): Define.
712 * elf32-s390.c (elf_backend_rela_normal): Define.
713 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
714 * elf64-ppc.c (elf_backend_rela_normal): Define.
715 * elf64-s390.c (elf_backend_rela_normal): Define.
716 * elf64-x86-64.c (elf_backend_rela_normal): Define.
717 * elfxx-ia64.c (elf_backend_rela_normal): Define.
718 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
719 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
720
721 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
722
723 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
724 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
725
726 2002-05-06 Alan Modra <amodra@bigpond.net.au>
727
728 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
729 when not relocatable. Fix reloc_emitter call for K&R.
730
731 2002-05-04 Alan Modra <amodra@bigpond.net.au>
732
733 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
734 reloading local sym addend mistakenly removed in 2002-05-01 change.
735
736 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
737 (read_abbrevs): Change "offset" param to bfd_vma.
738 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
739 Change "abbrev_offset" to bfd_vma.
740 (read_indirect_string): Use correct conversion chars in error
741 message format string, cast bfd_vma's to unsigned long.
742 (read_abbrevs): Likewise.
743 (read_attribute_value): Likewise.
744 (decode_line_info): Likewise.
745 (scan_unit_for_functions): Likewise.
746 (parse_comp_unit): Likewise.
747
748 2002-05-04 Tom Rix <trix@redhat.com>
749
750 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
751 (coff_swap_reloc_out): Same.
752 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
753 (xcoff_swap_reloc_out): Same.
754 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
755 case some 16 bit relocs. Add reloc value to output.
756 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
757 R_RBR. Improve names.
758 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
759 (bfd_xcoff_backend_data): Update with new reloc swap names.
760 (bfd_pmac_xcoff_backend_data) : Same.
761 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
762 (xcoff64_swap_reloc_out): Same.
763 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
764 R_POS. Add reloc value to output.
765 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
766 bit R_RBR. Improve names, masks.
767 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
768 (bfd_xcoff_backend_data): Update with new reloc swap names.
769 (bfd_xcoff_aix5_backend_data) : Same.
770
771 2002-05-04 Alan Modra <amodra@bigpond.net.au>
772
773 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
774 bfd_count top_index, input_list, all_local_syms.
775 (elf32_hppa_setup_section_lists): New function, split from
776 elf32_hppa_size_stubs.
777 (elf32_hppa_next_input_section): Likewise.
778 (group_sections): Likewise.
779 (get_local_syms): Likewise.
780 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
781 stubs on undefined syms too.
782 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
783 Only access htab elf fields when we have an elf hash table.
784 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
785 (elf32_hppa_next_input_section): Declare.
786
787 2002-05-04 Bob Byrnes <byrnes@curl.com>
788
789 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
790 _bfd_new_bfd.
791
792 2002-05-03 H.J. Lu (hjl@gnu.org)
793
794 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
795 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
796 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
797 to hide a global symbol.
798 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
799 forced_local to true.
800
801 2002-05-02 Richard Henderson <rth@redhat.com>
802
803 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
804 vs SHN_UNDEF to zero.
805
806 2002-05-02 Alan Modra <amodra@bigpond.net.au>
807
808 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
809 16 bit reloc.
810 <R_PPC64_SECTOFF_DS>: Likewise.
811 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
812 SECTOFF reloc.
813 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
814 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
815 SECTOFF reloc.
816
817 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
818 (ppc64_elf_ha_reloc): New function.
819 (ppc64_elf_brtaken_reloc): New function.
820 (ppc64_elf_sectoff_reloc): New function.
821 (ppc64_elf_sectoff_ha_reloc): New function.
822 (ppc64_elf_toc_reloc): New function.
823 (ppc64_elf_toc_ha_reloc): New function.
824 (ppc64_elf_toc64_reloc): New function.
825 (ppc64_elf_unhandled_reloc): New function.
826 (ppc64_elf_howto_raw): Use the above.
827 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
828 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
829 <R_PPC64_SECTOFF_DS>: Likewise.
830 (IS_ABSOLUTE_RELOC): Update.
831 (struct ppc_link_hash_table): Add have_undefweak.
832 (ppc64_elf_link_hash_table_create): Init.
833 (func_desc_adjust): Set have_undefweak.
834 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
835 add the .sfpr blr when have_undefweak.
836 (ppc64_elf_setup_section_lists): Check hash table flavour.
837 (ppc64_elf_next_input_section): Move output_section->owner test to
838 ppc64elf.em.
839 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
840 and relocatable test. Return TOCstart and don't set elf_gp.
841 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
842 offset calculation. Add assert on weak sym branch tweaks.
843 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
844 (ppc64_elf_toc): Declare.
845 (ppc64_elf_next_input_section): Update.
846
847 2002-05-01 Alan Modra <amodra@bigpond.net.au>
848
849 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
850 file_name.
851
852 2002-05-01 Alan Modra <amodra@bigpond.net.au>
853
854 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
855 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
856 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
857 call branches. Correct undefined weak destination.
858 (ppc64_elf_func_desc_adjust): Always create at least one blr in
859 .sfpr, and correct case where either only savef* or restf* is
860 needed.
861
862 Long branch stubs, multiple stub sections.
863 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
864 (ppc64_elf_next_input_section): Declare.
865 * elf64-ppc.c: Move linker-only prototypes.
866 (STUB_SUFFIX): Define.
867 (enum ppc_stub_type): New.
868 (struct ppc_stub_hash_entry): New.
869 (struct ppc_branch_hash_entry): New.
870 (struct ppc_link_hash_entry): Add stub_cache, oh.
871 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
872 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
873 Rename plt_overflow to stub_error.
874 (ppc_stub_hash_lookup): Define.
875 (ppc_branch_hash_lookup): Define.
876 (stub_hash_newfunc): New function.
877 (branch_hash_newfunc): New function.
878 (link_hash_newfunc): Init new fields.
879 (ppc64_elf_link_hash_table_create): Likewise.
880 (ppc64_elf_link_hash_table_free): New function.
881 (ppc_stub_name): New function.
882 (ppc_get_stub_entry): New function.
883 (ppc_add_stub): New function.
884 (create_linkage_sections): Use bfd_make_section_anyway. Create
885 .branch_lt and .rela.branch_lt sections. Don't create .stub.
886 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
887 and set up for plt call stubs. Link func and func desc syms.
888 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
889 (func_desc_adjust): Avoid hash lookup when func desc sym available
890 via shortcut, and set links when processing.
891 (ppc64_elf_hide_symbol): Likewise.
892 (allocate_dynrelocs): Don't allocate stub section here.
893 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
894 Remove sstub code.
895 (ppc_type_of_stub): New function.
896 (build_one_stub): Delete.
897 (ppc_build_one_stub): New function.
898 (ppc_size_one_stub): New function.
899 (ppc64_elf_setup_section_lists): New function.
900 (ppc64_elf_next_input_section): New function.
901 (group_sections): New function.
902 (get_local_syms): New function.
903 (ppc64_elf_size_stubs): Rewrite.
904 (ppc64_elf_build_stubs): Rewrite.
905 (ppc64_elf_relocate_section): Look up stub entry for REL24
906 relocs. Don't propagate REL14* to dynamic objects. Look for long
907 branch stubs if REL14* or REL24 relocs won't reach.
908 (bfd_elf64_bfd_link_hash_table_free): Define.
909
910 2002-04-30 Mark Mitchell <mark@codesourcery.com>
911
912 * bfd/config.bfd: Add support for powerpc-*-windiss.
913
914 2002-04-30 Tom Rix <trix@redhat.com>
915
916 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
917 symbol names into the hash table.
918
919 2002-04-28 Tom Rix <trix@redhat.com>
920
921 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
922 calulating relocations.
923 (xcoff_complain_overflow) : Function table for relocation errors.
924 (xcoff_ppc_relocate_section): Use relocation and complain function
925 tables.
926 (xcoff_complain_overflow_unsigned_func): New complain function.
927 (xcoff_complain_overflow_signed_func): Same.
928 (xcoff_complain_overflow_bitfield_func): Same.
929 (xcoff_complain_overflow_dont_func): Same.
930 (xcoff_reloc_type_crel): New recot function.
931 (xcoff_reloc_type_br): Same.
932 (xcoff_reloc_type_ba): Same.
933 (xcoff_reloc_type_toc): Same.
934 (xcoff_reloc_type_rel): Same.
935 (xcoff_reloc_type_neg): Same.
936 (xcoff_reloc_type_pos): Same.
937 (xcoff_reloc_type_fail): Same.
938 (xcoff_reloc_type_noop): Same.
939 * libxcoff.h : Declare common parts for xcoff64.
940 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
941 and complain function tables.
942
943 2002-04-28 Alan Modra <amodra@bigpond.net.au>
944
945 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
946 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
947
948 2002-04-26 Alan Modra <amodra@bigpond.net.au>
949
950 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
951 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
952
953 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
954 same as the output before calling elf_link_input_bfd.
955
956 * coffcode.h (coff_compute_section_file_positions): Set
957 section_tail after shuffling section list.
958
959 2002-04-24 Christian Groessler <chris@groessler.org>
960
961 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
962 addresses are 23bit with a special layout, not plain 32bit
963 values. Prevent relocation of immediate values.
964
965 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
966
967 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
968 MIPS-16 ASE flags are set, print something to indicate that.
969
970 2002-04-23 Alan Modra <amodra@bigpond.net.au>
971
972 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
973 under which a plt call stub is used.
974 (final_link_relocate): Similarly.
975 (allocate_plt_static): Clear h-plabel except when plt entry is
976 exclusively used for a plabel.
977 (allocate_dynrelocs): Use the above to simplify plt sizing.
978 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
979 (elf32_hppa_link_hash_table_create): Init.
980 (BL22_RP): Define.
981 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
982 (elf32_hppa_check_relocs): Set has_22bit_branch.
983
984 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
985 (final_link_relocate): Likewise.
986
987 2002-04-22 Jakub Jelinek <jakub@redhat.com>
988
989 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
990 search table if some FDE is DW_EH_PE_aligned encoded either.
991 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
992
993 2002-04-22 Richard Smith <richard@ex-parrot.com>
994 Jakub Jelinek <jakub@redhat.com>
995
996 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
997 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
998 encoded personality.
999 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1000 for CIE/FDE removal.
1001
1002 2002-04-20 Tom Rix <trix@redhat.com>
1003
1004 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1005
1006 2002-04-20 Alan Modra <amodra@bigpond.net.au>
1007
1008 * archures.c (bfd_lookup_arch): Move the list order comment..
1009 (struct bfd_arch_info): ..to where it belongs.
1010 * bfd-in2.h: Regenerate.
1011
1012 * archures.c (bfd_lookup_arch): Add comment on list order.
1013 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1014 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1015 is always at head of list.
1016
1017 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1018
1019 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1020 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1021 definition of these functions for ARM_WINCE builds as they are
1022 not used.
1023 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
1024 for ARM_WINCE builds.
1025
1026 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1027
1028 * coff-arm.c (bfd_arm_process_before_allocation):
1029
1030 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
1031
1032 * cpu-sh.c (scan_mach): Delete.
1033 (arch_info_struct): Replace scan_mach with bfd_default_scan.
1034 (bfd_sh_arch): Likewise.
1035
1036 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
1037
1038 * ihex.c (ihex_write_object_contents): Fix check for records
1039 crossing 64K boundaries.
1040
1041 2002-04-16 Alan Modra <amodra@bigpond.net.au>
1042
1043 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1044 type rather than just assuming entries are ELF.
1045 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1046 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1047 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1048 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1049 rather than elf_link_hash_entry.
1050
1051 2002-04-15 Richard Henderson <rth@redhat.com>
1052
1053 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1054 n32 binaries.
1055
1056 2002-04-15 Michael Snyder <msnyder@redhat.com>
1057
1058 * opncls.c (bfd_close): Write contents if writeable.
1059 Minor formatting tidy-ups.
1060
1061 2002-04-15 Alan Modra <amodra@bigpond.net.au>
1062
1063 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1064
1065 2002-04-12 Michael Snyder <msnyder@redhat.com>
1066
1067 * bfd-in.h (bfd_get_section_lma): New access macro.
1068 Minor white-space fix-up.
1069
1070 2002-04-12 Alan Modra <amodra@bigpond.net.au>
1071
1072 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1073 header pad.
1074
1075 2002-04-09 DJ Delorie <dj@redhat.com>
1076
1077 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1078
1079 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
1080
1081 * coffcode.h (coff_read_word): New.
1082 (coff_compute_checksum): New.
1083 (coff_apply_checksum): New.
1084 (coff_write_object_contents): Call coff_apply_checksum () to
1085 apply checksum to PE image.
1086
1087 2002-04-08 Randolph Chung <tausq@debian.org>
1088
1089 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1090 (elf32_hppa_final_link): Split out sorting logic to..
1091 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1092 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1093
1094 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1095
1096 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1097 pattern.
1098 * configure: Re-generate.
1099
1100 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1101
1102 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1103 is greater or equal to 4.3.3.
1104 * configure: Regenerate.
1105 Fix PR gdb/344.
1106
1107 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
1108
1109 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1110 R_CRIS_32_PCREL>: Fix typo in name.
1111 (cris_elf_check_relocs): Always create .rela.got here when
1112 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1113 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1114 assume it's created.
1115
1116 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
1117
1118 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1119 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1120 define.
1121 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1122 * bfd.c (bfd_link_hash_table_free): Define.
1123 * binary.c (binary_bfd_link_hash_table_free): Define.
1124 * bout.c (b_out_bfd_link_hash_table_free): Define.
1125 * coff-rs6000.c (rs6000coff_vec): Include
1126 _bfd_generic_link_hash_table_free.
1127 (pmac_xcoff_vec): Likewise.
1128 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1129 (aix5coff64_vec): Likewise.
1130 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1131 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1132 (bfd_elf32_bfd_link_hash_table_free): Define.
1133 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1134 (bfd_elf32_bfd_link_hash_table_free): Define.
1135 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1136 define.
1137 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1138 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1139 * ieee.c (ieee_bfd_link_hash_table_free): Define.
1140 * ihex.c (ihex_bfd_link_hash_table_free): Define.
1141 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1142 (_bfd_generic_link_hash_table_free): Add prototype.
1143 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1144 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1145 * linker.c (_bfd_generic_link_hash_table_free): New function.
1146 * mmo.c (mmo_bfd_link_hash_table_free): Define.
1147 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1148 * oasys.c (oasys_bfd_link_hash_table_free): Define.
1149 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1150 * som.c (som_bfd_link_hash_table_free): Define.
1151 * srec.c (srec_bfd_link_hash_table_free): Define.
1152 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1153 * versados.c (versados_bfd_link_hash_table_free): Define.
1154 * vms.c (vms_bfd_link_hash_table_free): New function.
1155 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1156
1157 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1158 instead of bfd_alloc.
1159 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1160 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1161 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1162 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1163 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1164 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1165 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1166 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1167 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1168 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1169 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1170 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1171 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1172 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1173 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1174 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1175 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1176 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1177 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1178 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1179 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1180 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1181 * m68klinux.c (linux_link_hash_table_create): Likewise.
1182 * sparclinux.c (linux_link_hash_table_create): Likewise.
1183 * sunos.c (sunos_link_hash_table_create): Likewise.
1184 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1185
1186 * targets.c: Add _bfd_link_hash_table_free to xvec.
1187
1188 * bfd-in2.h: Regenerate.
1189 * libbfd.h: Regenerate.
1190 * libcoff.h: Regenerate.
1191
1192 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1193
1194 * dep-in.sed: Cope with absolute paths.
1195 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1196 Run "make dep-am".
1197 * Makefile.in: Regenerate.
1198 * coff-arm.c: Fix copyright date.
1199 * cpu-h8300.c: Likewise.
1200 * cpu-i370.c: Likewise.
1201 * cpu-s390.c: Likewise.
1202 * cpu-mips.c: Likewise.
1203 * po/SRC-POTFILES.in: Regenerate.
1204
1205 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1206
1207 * Makefile.am: Add elfxx-mips.c to the known backends.
1208 (elf32-mips.lo): remove dependency to coff/external.h.
1209 * Makefile.in: Regenerate.
1210 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1211 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1212 accordingly.
1213 * configure: Regenerate.
1214 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1215 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1216 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1217 MIPS specific backend functions.
1218 * elf32-mips.c: Moved most code to elfxx-mips.c.
1219 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1220 static.
1221 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1222 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1223 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1224 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1225 interface to allow selection of the right REL or RELA howto table.
1226 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1227 static. Let it refuse n32 objects.
1228 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1229 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1230 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1231 (elf32_mips_ignore_discarded_relocs): Rename from
1232 _bfd_elf32_mips_ignore_discarded_relocs.
1233 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1234 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1235 (elf_mips_howto_table_rela): Remove.
1236 * elf64-mips.c: Moved most code to elfxx-mips.c.
1237 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1238 (mips_elf64_rtype_to_howto): New function.
1239 (mips_elf64_object_p): Likewise.
1240 (elf64_mips_irix_compat): Likewise.
1241 * elfxx-mips.c: New file containing common code merged together from
1242 elf32-mips.c and elf64-mips.c.
1243 * elfxx-mips.h: New file containing MIPS specific prototypes from
1244 elf-bfd.h.
1245 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1246 elf_backend_mips_rtype_to_howto.
1247
1248 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1249
1250 * srec.c (MAXCHUNK, Chunk): Revise comments.
1251 (srec_write_record): Correct buffer size.
1252 (srec_write_header): Do without intermediate buffer.
1253 (srec_write_section): Validate Chunk.
1254 (srec_write_terminator): Pass NULL instead of dummy buffer.
1255 (srec_write_symbols): Pass file and symbol names directly to
1256 bfd_bwrite so sprintf won't overflow buffer.
1257
1258 2002-04-03 Jakub Jelinek <jakub@redhat.com>
1259
1260 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1261 PC relative relocs against hidden symbols.
1262 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1263
1264 2002-04-03 Alan Modra <amodra@bigpond.net.au>
1265
1266 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1267 LMAs, loop over segments until p_vaddr and p_memsz specify an
1268 extent enclosing the section.
1269
1270 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1271
1272 * ihex.c (ihex_write_object_contents): Do not allow records to
1273 cross a 64K boundary - wrap if necessary.
1274
1275 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1276
1277 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1278 which caused the returned LWP ID to always be 0.
1279
1280 2002-04-01 Richard Henderson <rth@redhat.com>
1281
1282 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1283 (elf32_sparc_relocate_section): Use it to figure out when to
1284 initialize .got entries.
1285 * elf64-sparc.c: Similarly.
1286
1287 2002-03-28 Alan Modra <amodra@bigpond.net.au>
1288
1289 * linker.c (link_action): Ignore duplicate warning syms.
1290 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1291 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1292 (elf_adjust_dynamic_symbol): Likewise.
1293 (elf_export_symbol): Likewise.
1294 (elf_link_find_version_dependencies): Likewise.
1295 (elf_link_assign_sym_version): Likewise.
1296 (elf_link_sec_merge_syms): Likewise.
1297 (elf_link_output_extsym): Likewise.
1298 (elf_gc_sweep_symbol): Likewise.
1299 (elf_gc_propagate_vtable_entries_used): Likewise.
1300 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1301 (elf_gc_allocate_got_offsets): Likewise.
1302 (elf_collect_hash_codes): Likewise.
1303 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1304 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1305 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1306 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1307 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1308 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1309 (elf_cris_discard_excess_dso_dynamics): Likewise.
1310 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1311 (mark_PIC_calls): Likewise.
1312 (allocate_plt_static): Likewise.
1313 (allocate_dynrelocs): Likewise.
1314 (readonly_dynrelocs): Likewise.
1315 * elf32-i386.c (allocate_dynrelocs): Likewise.
1316 (readonly_dynrelocs): Likewise.
1317 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1318 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1319 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1320 (mips_elf_sort_hash_table_f): Likewise.
1321 (mips_elf_check_mips16_stubs): Likewise.
1322 * elf32-s390.c (allocate_dynrelocs): Likewise.
1323 (readonly_dynrelocs): Likewise.
1324 * elf32-sh.c (sh_elf_discard_copies): Likewise.
1325 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1326 (xstormy16_relax_plt_realloc): Likewise.
1327 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1328 (elf64_alpha_output_extsym): Likewise.
1329 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1330 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1331 (mips_elf64_check_mips16_stubs): Likewise.
1332 (mips_elf64_output_extsym): Likewise.
1333 * elf64-ppc.c (func_desc_adjust): Likewise.
1334 (allocate_dynrelocs): Likewise.
1335 (readonly_dynrelocs): Likewise.
1336 * elf64-s390.c (allocate_dynrelocs): Likewise.
1337 (readonly_dynrelocs): Likewise.
1338 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1339 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1340 (readonly_dynrelocs): Likewise.
1341 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1342 * aoutx.h (aout_link_write_other_symbol): Likewise.
1343 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1344 (_bfd_coff_write_global_sym): Likewise.
1345 * i386linux.c (linux_tally_symbols): Likewise.
1346 * m68klinux.c (linux_tally_symbols): Likewise.
1347 * sparclinux.c (linux_tally_symbols): Likewise.
1348 * pdp11.c (aout_link_write_other_symbol): Likewise.
1349 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1350 * xcofflink.c (xcoff_build_ldsyms): Likewise.
1351 (xcoff_write_global_symbol): Likewise.
1352
1353 * cofflink.c (_bfd_coff_final_link): Formatting.
1354 * cpu-mips.c (mips_compatible): Make static, prototype.
1355 * elf32-i386.c (elf_i386_check_relocs): Formatting.
1356 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1357 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1358 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1359 (mips_elf64_final_link): Likewise.
1360 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1361 prototype.
1362
1363 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
1364
1365 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1366 (SWAP_OUT_RELOC_OFFSET): Define.
1367
1368 2002-03-27 Gregory Steuck <greg@nest.cx>
1369
1370 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1371 terminating NULL if empty symbol table.
1372 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1373
1374 2002-03-26 H.J. Lu (hjl@gnu.org)
1375
1376 * elflink.h (elf_link_input_bfd): Revert the last change since
1377 the gcc exception handling isn't fixed yet.
1378
1379 2002-03-26 H.J. Lu (hjl@gnu.org)
1380
1381 * elflink.h (elf_link_input_bfd): Complain about relocations
1382 against local symbols in discarded sections.
1383
1384 2002-03-26 Alan Modra <amodra@bigpond.net.au>
1385
1386 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
1387
1388 2002-03-23 Alan Modra <amodra@bigpond.net.au>
1389
1390 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1391 section file offset for !SEC_LOAD sections.
1392
1393 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
1394
1395 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
1396 <case R_ARM_GOT>): Handle relocations to Thumb functions.
1397
1398 2002-03-21 Alan Modra <amodra@bigpond.net.au>
1399
1400 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
1401 Whitespace changes.
1402 * archive.c: Update copyright date.
1403 * bfd-in2.h: Regenerate.
1404 * libbfd.h: Regenerate.
1405 * Makefile.am: Run "make dep-am"
1406 * Makefile.in: Regenerate.
1407 * po/SRC-POTFILES.in: Regenerate.
1408
1409 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
1410
1411 * dwarf2.c (struct funcinfo): Move up.
1412 (lookup_address_in_function_table): New argument function_ptr.
1413 Set it.
1414 (lookup_address_in_line_table): New argument function. If function
1415 is non-NULL, use it to handle ``addr'' before the first line note of
1416 the function.
1417 (comp_unit_find_nearest_line): Update and swap calls to
1418 lookup_address_in_function_table and lookup_address_in_line_table.
1419 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
1420 N_SLINE encountered if we see an N_FUN before any N_SLINE.
1421
1422 2002-03-20 Tom Rix <trix@redhat.com>
1423
1424 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
1425 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
1426 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
1427
1428 2002-03-19 Tom Rix <trix@redhat.com>
1429
1430 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
1431 dynamic objects in archives.
1432
1433 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
1434
1435 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
1436 STT_NOTYPE symbols to STT_OBJECT.
1437
1438 2002-03-18 Jan Hubicka <jh@suse.cz>
1439
1440 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
1441
1442 2002-03-18 Tom Rix <trix@redhat.com>
1443
1444 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
1445 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
1446 * coff-rs6000 (do_pad) : New function for archive padding.
1447 (do_copy) : New function for object file copying in archives.
1448 (do_shared_object_padding) : New function for padding shared
1449 objects to their text section alignment in archives.
1450 (bfd_xcoff_ar_achive_set_magic) : Stub.
1451 (xcoff_write_armap_big) : Use do_copy and do_pad.
1452 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
1453 do_copy and do_pad.
1454 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
1455 bfd_xcoff_magic_number.
1456 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
1457 fop.
1458 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
1459 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
1460 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
1461 * rs6000-core.c : Update copyright date.
1462 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
1463 csectpp.
1464 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
1465 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
1466 (coff_set_flags) : Use bfd_xcoff_magic_number.
1467 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
1468 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
1469 * Makefile.am : Same.
1470 * config.bfd : Same.
1471 * targets.c : Same.
1472 * configure : Regnerate.
1473 * Makefile.in : Same.
1474 * bfd-in2.h : Same.
1475
1476 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
1477
1478 * po/fr.po: Updated version.
1479
1480 2002-03-18 Alan Modra <amodra@bigpond.net.au>
1481
1482 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
1483 * libbfd.h: Regenerate.
1484 * archive.c (coff_write_armap): Pass on failures from
1485 bfd_write_bigendian_4byte_int.
1486
1487 2002-03-14 H.J. Lu <hjl@gnu.org>
1488
1489 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
1490 error to bfd_error_nonrepresentable_section for reinit_array
1491 section in DSO.
1492
1493 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1494
1495 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
1496 OR it in rather than replacing previously selected flags.
1497
1498 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
1499 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
1500
1501 2002-03-14 Alan Modra <amodra@bigpond.net.au>
1502
1503 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
1504 (N): Use the above.
1505 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
1506 ensure reloc size matches before calling elf_link_input_bfd.
1507 Add an assert to check reloc size when counting output relocs.
1508
1509 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
1510
1511 * mmo.c (mmo_get_loc): Return NULL rather than false.
1512
1513 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
1514
1515 * po/fr.po: Updated version.
1516
1517 2002-03-13 Alan Modra <amodra@bigpond.net.au>
1518
1519 * archures.c (bfd_default_compatible): Test bits_per_word.
1520 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
1521 bfd_default_compatible.
1522 * cpu-i370.c (i370_compatible): Likewise.
1523 * cpu-sparc.c (sparc_compatible): Likewise.
1524 * cpu-h8300.c (compatible): Test in->arch == out->arch.
1525
1526 * elflink.h: Formatting fixes.
1527 (elf_link_output_extsym): Merge undefined and undef weak cases.
1528
1529 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
1530 when word size of input matches output word size.
1531
1532 2002-03-12 Andreas Jaeger <aj@suse.de>
1533
1534 * cpu-i386.c (i386_compatible): New. Use it instead of
1535 bfd_default_compatible.
1536
1537 2002-03-07 H.J. Lu (hjl@gnu.org)
1538
1539 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
1540 as the type for bfd_reloc_val.
1541
1542 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
1543
1544 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
1545 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
1546 (elf_hppa_final_link_relocate): Correct relocations for indirect
1547 references to local data through the DLT. Fix .opd creation for
1548 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
1549 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
1550 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
1551 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1552 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
1553 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
1554 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1555
1556 2002-03-05 Jakub Jelinek <jakub@redhat.com>
1557
1558 * merge.c (_bfd_merge_sections): Don't segfault if there
1559 is nothing to merge due to GC.
1560
1561 2002-03-05 Alan Modra <amodra@bigpond.net.au>
1562
1563 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
1564 symbols that have been forced local.
1565
1566 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
1567 to output forced local syms for non-shared link.
1568 (elf_link_output_extsym): Tweak condition for calling backend
1569 adjust_dynamic_symbol so that previous behaviour is kept.
1570 Whitespace changes throughout file.
1571
1572 2002-03-04 H.J. Lu <hjl@gnu.org>
1573
1574 * elf.c (bfd_section_from_shdr): Handle special sections,
1575 .init_array, .fini_array and .preinit_array.
1576 (elf_fake_sections): Likewise.
1577
1578 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
1579 DT entry only if the section is in output for .init_array,
1580 .fini_array and .preinit_array. Complain about .preinit_array
1581 section in DSO.
1582 (elf_bfd_final_link): Warn zero size for .init_array,
1583 .fini_array and .preinit_array sections.
1584
1585 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
1586 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
1587 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
1588 .preinit_array.
1589
1590 2002-03-04 Alan Modra <amodra@bigpond.net.au>
1591
1592 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
1593 * configure: Regenerate.
1594
1595 2002-03-02 Tom Rix <trix@redhat.com>
1596
1597 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
1598 symbolic equiv.
1599 * coff-rs6000.c (xcoff_howto_table): Same.
1600
1601 2002-03-01 David Mosberger <davidm@hpl.hp.com>
1602
1603 * elflink.h (size_dynamic_sections): If section named
1604 ".preinit_array" exists, create DT_PREINIT_ARRAY and
1605 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
1606 ".init_array" and ".fini_array".
1607 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
1608 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
1609 DT_FINI_ARRAY.
1610
1611 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
1612
1613 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
1614 dynsyms.
1615
1616 2002-02-25 Alan Modra <amodra@bigpond.net.au>
1617
1618 * elf64-hppa.h: Update copyright date.
1619
1620 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
1621 (ppc64_elf_relocate_section): Don't generate power4 style branch
1622 hints for *_BRTAKEN and *_BRNTAKEN relocs.
1623
1624 2002-02-22 Jakub Jelinek <jakub@redhat.com>
1625
1626 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
1627 last patch.
1628 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1629
1630 2002-02-21 Andreas Jaeger <aj@suse.de>
1631
1632 * elf64-x86-64.c: Major rework that introduces all recent changes
1633 to the x86-64 backend. Get a closer match to elf32-i386.
1634 (struct elf64_x86_64_dyn_relocs): Rename from
1635 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
1636 all users.
1637 (struct elf64_x86_64_link_hash_table): Add short cuts to some
1638 sections.
1639 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
1640 remove casts, initialize new hash members.
1641 (create_got_section): New.
1642 (elf64_x86_64_create_dynamic_sections): New.
1643 (elf64_x86_64_copy_indirect_symbol): New.
1644 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
1645 relocs, .got or .relgot here but do it in allocate_dynrelocs.
1646 Reference count possible .plt and .got entries. Don't test input
1647 section SEC_READONLY here to try to avoid copy relocs, and keep
1648 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
1649 DF_TEXTREL here. Delay setting of variables until needed. Cache
1650 pointer to "sreloc" section in elf_section_data. Tweak condition
1651 under which .got created. Report files with bad relocation
1652 section names.
1653 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1654 Reference count possible .plt entries. Don't deallocate .got and
1655 .relgot space here.
1656 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
1657 do copy reloc processing for weakdefs. Remove redundant casts and
1658 aborts. Delay setting of vars until needed. Move creation of
1659 dynamic symbols and allocation of .plt and .rela.plt to
1660 allocate_dynrelocs. Replace BFD_ASSERT with abort.
1661 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1662 (allocate_dynrelocs): New.
1663 (readonly_dynrelocs): New.
1664 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
1665 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
1666 Zero out the dynamic allocated content space.
1667 (elf64_x86_64_discard_copies): Removed.
1668 (elf64_x86_64_relocate_section): Make use of dynamic section
1669 short-cuts. Localise vars, and delay setting. Better error
1670 reporting, replace BFD_ASSERT with abort. Check
1671 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
1672 regular object file and tread the weak definition as the normal
1673 one. Don't discard relocs for undefweak or undefined symbols and
1674 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
1675 relocs.
1676 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
1677 symbols that have been forced local. Use same test to decide if
1678 we can use a relative reloc for got as relocate_section. Expand
1679 SHN_UNDEF comment. Move expressions out of function calls.
1680 Replace BFD_ASSERT with abort.
1681 (bfd_elf64_bfd_final_link): Removed.
1682 (elf_backend_copy_indirect_symbol): Define.
1683
1684 2002-02-20 Tom Rix <trix@redhat.com>
1685
1686 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
1687 (_bfd_xcoff_reloc_type_lookup): Use it.
1688 * coff64-rs6000.c (xcoff64_howto_table): Same.
1689 (xcoff64_reloc_type_lookup): Same.
1690
1691 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
1692
1693 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
1694 little endian.
1695
1696 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
1697
1698 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
1699 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
1700 * bfd-in2.h: Regenerate.
1701 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
1702 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
1703 with "s390:64-bit".
1704 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
1705 (elf_s390_reloc_type_lookup): Likewise.
1706 (elf_s390_check_relocs): Likewise.
1707 (elf_s390_gc_sweep_hook): Likewise.
1708 (elf_s390_relocate_section): Likewise.
1709 (elf_s390_object_p): Use renamed architecture define.
1710 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
1711
1712 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
1713
1714 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
1715
1716 2002-02-19 Jakub Jelinek <jakub@redhat.com>
1717
1718 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
1719 absptr -> pcrel optimization for shared libs.
1720 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
1721 library cannot be converted to pcrel.
1722 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
1723 relative.
1724 * elf32-i386.c (elf_i386_relocate_section): If
1725 _bfd_elf_section_offset returned -2, skip, but make sure the
1726 relocation is installed.
1727 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
1728 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1729 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1730 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1731 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1732 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1733 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1734 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1735 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1736 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1737 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1738 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1739 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1740 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1741 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
1742 _bfd_elf_section_offset returning -2 the same way as -1.
1743 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
1744 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
1745 and BFD_ASSERT.
1746 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
1747
1748 2002-02-18 Tom Rix <trix@redhat.com>
1749
1750 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
1751 (bfd_xcoff_size_dynamic_sections): Same.
1752 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
1753 (bfd_xcoff_size_dynamic_sections): Same.
1754 * coff-rs6000.c (xcoff_generate_rtinit): Same.
1755 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
1756 * libxcoff.h (struct xcoff_backend_data_rec): Same.
1757 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
1758 * bfd-in2.h: Regenerate.
1759
1760 2002-02-18 Alan Modra <amodra@bigpond.net.au>
1761
1762 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
1763 (struct ppc_link_hash_table): Add sfpr.
1764 (ppc64_elf_link_hash_table_create): Init it.
1765 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
1766 .glink out to..
1767 (create_linkage_sections): ..here. Make .sfpr too.
1768 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
1769 dynobj early.
1770 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
1771 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
1772 ._restf* functions, and create as needed.
1773 (func_desc_adjust): Only force_local for shared libs.
1774
1775 2002-02-18 David O'Brien <obrien@FreeBSD.org>
1776
1777 * configure.in: Bump version number post 2.12 branching.
1778 * configure: Regenerate.
1779
1780 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
1781
1782 * mmo.c: Correct and improve comments.
1783 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
1784 zero-pad. Use input to fill up non-empty bfd buffer.
1785 (mmo_flush_chunk): New function.
1786 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
1787 changed. Don't emit location specifier if VMA is same as
1788 *LAST_VMAP after omitting leading zero contents. Call
1789 mmo_flush_chunk before emitting location specifier.
1790 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
1791 with mmo_write_loc_chunk calls.
1792 (mmo_internal_write_section): Call mmo_flush_chunk after
1793 mmo_write_chunk.
1794 (mmo_write_symbols_and_terminator): Move :Main to first position
1795 in symbol array. Add faked one if it does not exist if there are
1796 other symbols. Don't add it if there are no symbols at all. Move
1797 out test for value of :Main from symbol loop. Rename table
1798 fakemain to maintable and variable mainsym to fakemain.
1799
1800 2002-02-15 Richard Henderson <rth@redhat.com>
1801
1802 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
1803 section with no got matches any got. Simplify error generaion.
1804
1805 2002-02-15 Alan Modra <amodra@bigpond.net.au>
1806
1807 Support arbitrary length fill patterns.
1808 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
1809 (_bfd_default_link_order): Remove bfd_fill_link_order code.
1810 Call default_data_link_order.
1811 (default_fill_link_order): Delete.
1812 (default_data_link_order): New function.
1813 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
1814 of bfd_fill_link_order with bfd_data_link_order.
1815 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
1816 * elf64-mips.c (mips_elf64_final_link): Likewise.
1817
1818 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
1819 Correct value returned in "end" for "0x<non-hex>".
1820
1821 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
1822
1823 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
1824 (scan): Test against 'mach' field in info structure.
1825
1826 2002-02-14 Alan Modra <amodra@bigpond.net.au>
1827
1828 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
1829
1830 2002-02-14 Matt Fredette <fredette@netbsd.org>
1831
1832 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
1833 EF_M68000.
1834
1835 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
1836
1837 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
1838 non-zero physical addresses when adjusting the LMAs of new
1839 sections.
1840
1841 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1842
1843 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
1844 from _bfd_elf_hppa_gen_reloc_type.
1845 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
1846 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
1847 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
1848 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
1849
1850 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
1851
1852 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
1853 loading its contents if there's nothing to do in it.
1854
1855 2002-02-12 Alan Modra <amodra@bigpond.net.au>
1856
1857 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
1858 64k boundary.
1859
1860 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
1861 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
1862 (ppc64_elf_finish_dynamic_sections): Set values for them.
1863
1864 2002-02-11 Michael Snyder <msnyder@redhat.com>
1865
1866 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
1867 * elf.c (elfcore_grok_pstatus): Add prototype.
1868 (elfcore_grok_lwpstatus): Add prototype.
1869 (elfcore_write_lwpstatus): New function.
1870 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
1871
1872 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
1873
1874 * elf32-sh.c: Added missing prototypes.
1875 * elf32-sh64.c: Likewise.
1876 (sh_elf_align_loads): Mark unused args as such.
1877 * elf64-sh64.c: Added missing prototypes.
1878 (struct elf_sh64_link_hash_entry): Fix typo.
1879 (sh_elf64_relocate_section): Fix info argument passed to
1880 _bfd_elf_section_offset.
1881
1882 2002-02-11 Alan Modra <amodra@bigpond.net.au>
1883
1884 * Makefile.am: "make dep-am".
1885 * Makefile.in: Regenerate.
1886 * aclocal.m4: Regenerate.
1887 * config.in: Regenerate.
1888 * configure: Regenerate.
1889
1890 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
1891
1892 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
1893 variable warnings.
1894 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
1895 comparison warning.
1896 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
1897 cast warnings for the common case.
1898
1899 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
1900
1901 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
1902 vectors.
1903 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
1904 vectors.
1905
1906 2002-02-09 Richard Henderson <rth@redhat.com>
1907
1908 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
1909 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
1910 (elf64_alpha_relocate_section): Likewise.
1911 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
1912 * bfd-in2.h, libbfd.h: Rebuild.
1913
1914 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
1915
1916 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
1917 that base-plus-offset reloc accounting is consistent.
1918 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
1919 up to date for undefined symbols.
1920
1921 2002-02-08 Eric Christopher <echristo@redhat.com>
1922
1923 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1924
1925 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
1926 sections for the O32 ABI.
1927
1928 2002-02-08 Chris Demetriou <cgd@broadcom.com>
1929
1930 * elf32-arm.h: Fix formatting of _("...").
1931 * elf32-d10v.c: Likewise.
1932 * elf32-m68k.c: Likewise.
1933 * elf32-mips.c: Likewise.
1934
1935 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
1936
1937 * coff-or32.c: Fix compile time warning messages.
1938
1939 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
1940
1941 Contribute sh64-elf.
1942 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
1943 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
1944 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
1945 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
1946 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
1947 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
1948 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
1949 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
1950 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
1951 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
1952 New relocs.
1953 * libbfd.h, bfd-in2.h: Rebuilt.
1954 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
1955 (sh_reloc_map): Map them.
1956 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1957 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
1958 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
1959 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1960 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
1961 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
1962 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
1963 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
1964 datalabel_got_offset.
1965 (sh_elf_link_hash_newfunc): Initialize it.
1966 (sh_elf_relocate_section): Augment the scope of
1967 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
1968 GOT and GOTOFF handling to new SHmedia relocation types. Support
1969 GOT_BIAS.
1970 (sh_elf_check_relocs): Likewise.
1971 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
1972 PLT entries using movi_shori_putval. Support GOT_BIAS.
1973 (sh_elf_finish_dynamic_sections): Likewise.
1974 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
1975 relocation, it's now done by the caller.
1976 (GOT_BIAS): New.
1977 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
1978 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
1979 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
1980 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
1981 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
1982 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
1983 sh64_elf64_hash_table): New.
1984 (sh_elf64_howto_table): Introduce new relocs.
1985 (sh_elf64_info_to_howto): Accept new PIC relocs.
1986 (sh_elf64_relocate_section): Augment the scope of
1987 seen_stt_datalabel. Support new PIC relocs.
1988 (sh_elf64_check_relocs): Support new PIC relocs.
1989 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
1990 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
1991 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
1992 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
1993 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
1994 movi_shori_putval, movi_3shori_putval,
1995 sh64_elf64_create_dynamic_sections,
1996 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
1997 sh64_elf64_size_dynamic_sections,
1998 sh64_elf64_finish_dynamic_symbol,
1999 sh64_elf64_finish_dynamic_sections): New.
2000 (elf_backend_create_dynamic-sections,
2001 bfd_elf64_bfd_link_hash_table_create,
2002 elf_backend_adjust_dynamic_symbol,
2003 elf_backend_size_dynamic_sections,
2004 elf_backend_finish_dynamic_symbol,
2005 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2006 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2007 elf_backend_got_header_size, elf_backend_plt_header_size):
2008 Define.
2009 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2010 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2011 match official numbers and names; moved unmaching ones to the
2012 range 0xf2-0xff.
2013 * elf32-sh64.c, elf64-sh64.c: Likewise.
2014 2001-03-12 DJ Delorie <dj@redhat.com>
2015 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2016 sections.
2017 2001-03-12 DJ Delorie <dj@redhat.com>
2018 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2019 be aligned.
2020 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2021 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
2022 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2023 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2024 .cranges section with SEC_SORT_ENTRIES set.
2025 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2026 incoming sorted .cranges section.
2027 (sh64_bfd_elf_copy_private_section_data): New.
2028 (sh64_elf_final_write_processing): Only sort .cranges and modify
2029 start address if called by linker.
2030 2001-01-08 Ben Elliston <bje@redhat.com>
2031 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2032 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
2033 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2034 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2035 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2036 line. Add comments before all entries.
2037 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2038 comment.
2039 (sh_elf64_reloc): Correct head comment.
2040 (sh_elf64_relocate_section): Correct spacing.
2041 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2042 instead call reloc_dangerous callback.
2043 <case R_SH_SHMEDIA_CODE>: New case.
2044 (sh_elf64_gc_mark_hook): Correct spacing.
2045 (sh_elf64_check_relocs): Ditto.
2046 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2047 New case.
2048 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2049 functions.
2050 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2051 clarify describing comment. Add comments before all entries.
2052 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2053 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2054 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2055 Sort .cranges section in final link. Prepare to set bit 0 on
2056 entry address.
2057 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2058 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2059 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2060 .cranges section.
2061 (sh64_backend_section_from_shdr): New, to recognize
2062 SHT_SH5_CR_SORTED on incoming .cranges section.
2063 (elf_backend_section_from_shdr): Define.
2064 (sh64_elf_final_write_processing): Sort outgoing .cranges
2065 section. (New, temporarily disabled:) Set bit 0 on entry address
2066 according to ISA type.
2067 (sh64_find_section_for_address): New.
2068 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2069 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2070 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
2071 bfd_malloc, not xmalloc.
2072 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
2073 global.
2074 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2075 temporarily disabled) setting bit 0 on entry address.
2076 (elf_backend_final_write_processing): Define.
2077 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
2078 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2079 be a proper relocation for PTA and PTB rather than a marker.
2080 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2081 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2082 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2083 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2084 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2085 Zero src_mask.
2086 * elf64-sh64.c: Ditto.
2087 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2088 * elf32-sh64.c: Include opcodes/sh64-opc.h
2089 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2090 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
2091 parameters. No unused parameters. Caller changed.
2092 <case R_SH_PT_16>: New case.
2093 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2094 * Makefile.in: Regenerate.
2095 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
2096 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2097 all code sections.
2098 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2099 (sh64_elf_merge_private_data): Ditto.
2100 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2101 to access stored section flags.
2102 (sh64_elf_final_write_processing): Return immediately unless
2103 called by linker. Use sh64_elf_section_data (cranges) to get size
2104 of linker-generated cranges entries.
2105 (sh64_elf_copy_private_data): Add missing "return true".
2106 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2107 (sh_elf64_merge_private_data): Ditto.
2108 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
2109 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2110 elf64-sh64.c:sh64_elf_fake_sections.
2111 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2112 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
2113 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2114 (sh64_elf_final_write_processing): New.
2115 (elf_backend_final_write_processing): Define.
2116 (sh64_elf_fake_sections): Get header flags from tdata field.
2117 (sh64_elf_copy_private_data): Do not call
2118 sh64_elf_copy_private_data_internal, just copy e_flags field.
2119 (sh64_elf_merge_private_data): Do not call
2120 sh64_elf_copy_private_data_internal.
2121 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
2122 Remove EF_SH64_ABI64, let ELF size make difference.
2123 Remove SH64-specific BFD section flag.
2124 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2125 containing SHmedia through elf_section_data (asect)->tdata
2126 non-zero, not using a BFD section flag.
2127 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2128 (sh64_elf_merge_private_data): Similar.
2129 (elf_backend_section_flags): Don't define.
2130 (sh64_elf_backend_section_flags): Delete.
2131 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2132 not EF_SH64_ABI64.
2133 (sh_elf64_merge_private_data): Similar.
2134 * section.c (Section flags definitions): Don't define
2135 SEC_SH_ISA_SHMEDIA.
2136 (bfd-in2.h): Regenerate.
2137 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
2138 Make DataLabel references work with partial linking.
2139 * elf32-sh64.c: Fix formatting.
2140 (sh64_elf_link_output_symbol_hook): New.
2141 (elf_backend_link_output_symbol_hook): Define to
2142 sh64_elf_link_output_symbol_hook.
2143 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2144 undefined if partial linking. Adjust sanity check.
2145 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2146 (elf_backend_link_output_symbol_hook): Define to
2147 sh64_elf64_link_output_symbol_hook.
2148 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2149 undefined if partial linking. Adjust sanity check.
2150 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
2151 Implement semantics for inter-file DataLabel references.
2152 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2153 (sh64_elf64_add_symbol_hook): New.
2154 (sh_elf64_relocate_section): If passing an indirect symbol with
2155 st_type STT_DATALABEL on the way to a symbol with st_other
2156 STO_SH5_ISA32, do not bitor 1 to the relocation.
2157 (elf_backend_add_symbol_hook): Define to
2158 sh64_elf64_add_symbol_hook.
2159 * elf64-sh32.c: Tweak comments.
2160 (DATALABEL_SUFFIX): Define.
2161 (sh64_elf_add_symbol_hook): New.
2162 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2163 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2164 symbol with st_type STT_DATALABEL on the way to a symbol with
2165 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2166 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
2167 Pass through STT_DATALABEL.
2168 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2169 (elf_backend_get_symbol_type): Define.
2170 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2171 (elf_backend_get_symbol_type): Define.
2172 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
2173 * elf32-sh64.c: Tweak comments.
2174 (sh64_elf_copy_private_data_internal): Add prototype.
2175 (bfd_elf32_bfd_set_private_flags): Define.
2176 (sh64_elf_copy_private_data_internal): Compare machine name, not
2177 textual BFD target name, to check whether to copy section flag
2178 SHF_SH5_ISA32.
2179 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2180 Tweak section-contents-type-mismatch message.
2181 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2182 Validize reloc-types.
2183 * elf64-sh64.c: New file.
2184 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2185 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2186 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2187 Regenerate dependencies.
2188 * Makefile.in: Regenerate.
2189 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2190 bfd_elf64_sh64l_vec.
2191 * configure.in: Handle bfd_elf64_sh64_vec and
2192 bfd_elf64_sh64l_vec.
2193 * configure: Regenerate.
2194 * po/POTFILES.in: Regenerate.
2195 * po/bfd.pot: Regenerate.
2196 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
2197 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2198 anything else but EF_SH64 and EF_SH64_ABI64.
2199 (sh64_elf_merge_private_data): Emit error for anything else but
2200 EF_SH64 and EF_SH64_ABI64.
2201 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2202 from targ_selvecs.
2203 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2204 bfd_elf32_sh64l_vec as a temporary measure.
2205 * configure: Regenerate.
2206 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2207 * cpu-sh.c (arch_info_struct): Include sh5 item
2208 unconditionalized.
2209 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2210 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2211 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2212 * elf32-sh64.c: Tweak comments.
2213 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2214 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2215 (sh64_elf_copy_private_data_internal): Wrap long line.
2216 (sh64_elf_merge_private_data): Rewrite to allow objects from
2217 SH64 subsets to be linked together.
2218 (INCLUDE_SHMEDIA): Define.
2219 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2220 Parenthesize plus-expression inside or-expression.
2221 <global symbol>: Ditto.
2222 (sh_elf_set_mach_from_flags): Remove code refusing
2223 deleted EF_SH64_32BIT_ABI flag.
2224 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2225 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2226 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2227 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2228 (sh_elf_relocate_section) <local symbol>: Or 1 in
2229 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2230 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2231 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2232 relocation.
2233 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2234 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2235 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2236 Regenerate dependencies.
2237 * Makefile.in: Regenerate.
2238 * archures.c: Add bfd_mach_sh5.
2239 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2240 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2241 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2242 * configure: Regenerate.
2243 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2244 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2245 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2246 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2247 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2248 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2249 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2250 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2251 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2252 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2253 in item for SH5.
2254 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2255 for SHmedia relocs.
2256 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2257 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2258 shmedia_prepare_reloc, goto final_link_relocate if it returns
2259 non-zero, else fail as before.
2260 (sh_elf_set_mach_from_flags): Provide function only if not defined
2261 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2262 (sh_elf_set_private_flags): Provide function only if not defined
2263 as a macro.
2264 (sh_elf_copy_private_data): Similar.
2265 (sh_elf_merge_private_data): Similar.
2266 * section.c (SEC_SH_ISA_SHMEDIA): New.
2267 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2268 * elf32-sh64.c: New file.
2269 * libbfd.h: Regenerate.
2270 * bfd-in2.h: Regenerate.
2271 * po/POTFILES.in: Regenerate.
2272 * po/bfd.pot: Regenerate.
2273 * bfd-in2.h: Regenerate.
2274 * libbfd.h: Regenerate.
2275
2276 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
2277
2278 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2279 been included, not drag it in.
2280 * bfd-in2.h: Regenerate.
2281
2282 2002-02-06 H.J. Lu (hjl@gnu.org)
2283
2284 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2285 the mach and ISA fields if necessary.
2286
2287 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2288
2289 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2290 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2291 be sure exactly which architecture this represents.
2292
2293 2002-02-05 Nick Clifton <nickc@redhat.com>
2294
2295 * po/tr.po: Updated translation.
2296
2297 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2298
2299 From Jimi X <jimix@watson.ibm.com>
2300 * archures (bfd_mach_ppc64): Define.
2301 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2302 (bfd_powerpc_arch): Define.
2303 * bfd-in2.h: Regenerate.
2304 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2305 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2306 (bfd_powerpc_archs): Add default powerpc64 arch.
2307
2308 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2309
2310 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2311 against section syms in readonly sections. Don't do the global
2312 sym check if we find one.
2313 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2314 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2315 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2316 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2317 (elf_s390_grok_prstatus): Add missing prototype.
2318
2319 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
2320
2321 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2322 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2323 Call bfd_get_section_by_name only once. Initialize
2324 bpodata->n_bpo_relocs_this_section.
2325 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2326 referring to DSOs.
2327 (bpo_reloc_request_sort_fn): Don't use difference of values as
2328 return-value.
2329
2330 2002-02-02 David O'Brien <obrien@FreeBSD>
2331
2332 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
2333 version 4.5 and later the same as 5-CURRENT.
2334 * configure: Re-generate.
2335
2336 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
2337
2338 * config.bfd (hppa*-*-netbsd*): New target.
2339
2340 2002-01-31 Philipp Thomas <pthomas@suse.de>
2341
2342 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2343 to front of message. Unify messages with elf32-arm.h. Use
2344 commas where neccessary.
2345 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2346 ERROR in messages. Unify messages with coff-arm.c. Correct
2347 VFP/FPA error message.
2348 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2349 APCS-32 for translation.
2350
2351 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
2352
2353 Perform on-demand global register allocation from
2354 R_MMIX_BASE_PLUS_OFFSET relocs.
2355 * elf64-mmix.c (struct bpo_reloc_section_info, struct
2356 bpo_reloc_request, struct bpo_greg_section_info): New.
2357 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2358 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2359 _bfd_mmix_check_all_relocs,
2360 _bfd_mmix_prepare_linker_allocated_gregs,
2361 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2362 (elf_mmix_howto_table): Correct src_mask for most relocs.
2363 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2364 case.
2365 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2366 case. Fix typo in comment. New label do_mmix_reloc.
2367 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2368 store first object file with a base-plus-offset reloc. Call
2369 mmix_elf_check_common_relocs for the part common with mmo.
2370 (mmix_elf_final_link): Write out linker-allocated register
2371 contents section.
2372 (elf_backend_gc_sweep_hook): Define.
2373 (bfd_elf64_bfd_relax_section): Define.
2374
2375 * mmo.c: Don't include <ctype.h>
2376 (mmo_init): Correct init-once logic.
2377
2378 2002-02-01 Tom Rix <trix@redhat.com>
2379
2380 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2381
2382 2002-02-01 Alan Modra <amodra@bigpond.net.au>
2383
2384 * Makefile.am: Run "make dep-am"
2385 * Makefile.in: Regenerate.
2386
2387 2002-01-31 David O'Brien <obrien@FreeBSD>
2388
2389 * configure.in: Recognize the differences in core files from FreeBSD
2390 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
2391 5-CURRENT.
2392 * configure: Regenerate.
2393
2394 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
2395
2396 * coff-or32.c: New file.
2397 * cpu-or32.c: New file.
2398 * elf32-or32.c: New file.
2399 * archures.c: Add support for or32.
2400 * targets.c: Add support for or32.
2401 * bfd-in2.h: Regenerate.
2402 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
2403 coff_write_object_contents): Add support for or32.
2404 * config.bfd: Add target.
2405 * configure.in: Add support for or32.
2406 * configure: Regenerate.
2407 * Makefile.am: Add support for or32.
2408 * Makefile.in: Regenerate.
2409 * po/SRC-POTFILES.in: Add or32 files.
2410 * po/bfd.pot: Regenerate.
2411
2412 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
2413 Don Lindsay <lindsayd@cisco.com>
2414
2415 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
2416 false' with a return of a bfd_reloc_ error code.
2417
2418 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
2419
2420 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2421 unexport unreferenced symbols when --export-dynamic. Call
2422 _bfd_elf_strtab_delref when unexporting.
2423
2424 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
2425
2426 * bfd-in.h: Include <stdbool.h> if it is available.
2427 * bfd-in2.h: Regenerated.
2428
2429 2002-01-31 Alan Modra <amodra@bigpond.net.au>
2430
2431 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
2432 not go via the plt.
2433
2434 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2435
2436 * archures.c: Tidy up formatting of embedded comments.
2437 * bfd.c: Tidy up formatting of embedded comments.
2438 * bfd-in.h: Fix formatting of comments.
2439 * reloc.c: Tidy up formatting of ordinary & embedded comments.
2440 * section.c: Tidy up formatting of embedded comments.
2441 * syms.c: Tidy up formatting of embedded comments.
2442 * targets.c: Tidy up formatting of embedded comments.
2443
2444 * bfd-in2.h: Regenerate.
2445
2446 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
2447
2448 * vms-tir.c (cmd_name): New function.
2449 (tir_cmd_name): New function.
2450 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
2451 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
2452 Fix formatting.
2453
2454 * peXXigen.c (pe_print_idata): Rearrange message to aid in
2455 translation.
2456 (pe_print_pdata): Rearrange message to aid in translation.
2457
2458 * libbfd.c (warn_deprecated): Rearrange error message to aid in
2459 translation.
2460
2461 * ihex.c (ihex_write_object_contents): Fix spelling typo.
2462
2463 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
2464
2465 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
2466 message to aid in translation.
2467
2468 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
2469 to aid in translation.
2470
2471 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2472
2473 2002-01-30 Philipp Thomas <pthomas@suse.de>
2474
2475 * coff-arm.c, elf32-elf.h: Unify messages.
2476
2477 2002-01-30 Nick Clifton <nickc@redhat.com>
2478
2479 * po/sv.po: Updated translation.
2480
2481 2002-01-30 Philipp Thomas <pthomas@suse.de>
2482
2483 * dwarf2.c (read_abbrev): Use full section name in error message.
2484 (decode_line_info): Likewise.
2485
2486 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
2487 message.
2488
2489 2002-01-30 Alan Modra <amodra@bigpond.net.au>
2490
2491 * elf64-ppc.c (func_desc_adjust): Only provide missing function
2492 descriptor symbols for undefined function code syms. Clear
2493 ELF_LINK_NON_ELF so that they can stay weak.
2494
2495 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2496 Mitch Lichtenberg <mpl@broadcom.com>
2497
2498 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
2499 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
2500 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
2501 generation.
2502 * bfd-in2.h: Regenerate.
2503
2504 2002-01-29 Chris Demetriou <cgd@broadcom.com>
2505
2506 * elf32-mips.c: Add additional comments about HI16 relocation
2507 processing.
2508 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
2509 pc-relative relocations. (Reverts change made on 2001-10-31.)
2510 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
2511 for pc-relative relocations.
2512 (mips_elf_calculate_relocation): Add a comment about a kludge
2513 in the R_MIPS_GNU_REL_HI16 handling.
2514 (_bfd_mips_elf_relocate_section): Implement that kludge;
2515 adjust pc-relative HI16 relocation for difference in HI16 and
2516 LO16 addresses, since it can't easily be done in
2517 mips_elf_calculate_relocation.
2518
2519 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
2520
2521 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
2522 relocations with PC32 relocations for undefined or weak symbols.
2523 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
2524 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
2525
2526 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
2527
2528 * elfcore.h (elf_core_file_p): Improve comment for last change.
2529
2530 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
2531
2532 * configure: Regenerated.
2533
2534 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
2535
2536 * elfcore.h (elf_core_file_p): Set the machine architecture
2537 before processing the program headers.
2538
2539 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
2540
2541 * configure.in <64-bit configuration>: If using gcc, check and
2542 emit error for egcs-1.1.2.
2543 * configure: Regenerate.
2544
2545 2002-01-26 Egor Duda <deo@logos-m.ru>
2546
2547 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
2548 as possible to avoid stack corruption.
2549
2550 2002-01-26 Richard Henderson <rth@redhat.com>
2551
2552 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
2553 for non-allocated sections.
2554
2555 2002-01-25 Mark Kettenis <kettenis@gnu.org>
2556
2557 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
2558 prstat.pr_reg even if it is a struct.
2559
2560 2002-01-25 Steve Ellcey <sje@cup.hp.com>
2561
2562 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
2563
2564 2002-01-25 Philipp Thomas <pthomas@suse.de>
2565
2566 * coffgen.c (coff_print_symbol): Don't mark info message
2567 for translation.
2568
2569 2002-01-25 Nick Clifton <nickc@redhat.com>
2570
2571 * po/fr.po: Updated translation.
2572 * po/es.po: Updated translation.
2573
2574 2002-01-25 Philipp Thomas <pthomas@suse.de>
2575
2576 * coff-alpha.c (alpha_relocate_section): Unify warning message
2577 for GP relative relocations without GP defined.
2578 * coff-mips.c (mips_relocate_section): Likewise.
2579
2580 2002-01-25 Alan Modra <amodra@bigpond.net.au>
2581
2582 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
2583 unsigned overflow when new_offset < old_offset.
2584
2585 2002-01-24 Philipp Thomas <pthomas@suse.de>
2586
2587 * bfd.c (_bfd_abort): Fix typo.
2588
2589 2002-01-23 Richard Henderson <rth@redhat.com>
2590
2591 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
2592 plt entries for undefweak symbols.
2593
2594 2002-01-23 Steve Ellcey <sje@cup.hp.com>
2595
2596 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
2597 DEFAULT_VECTOR.
2598 (bfd_elf64_ia64_hpux_big_vec): Ditto.
2599 (bfd_elf32_h8300_vec): Ditto.
2600
2601 2002-01-23 Alan Modra <amodra@bigpond.net.au>
2602
2603 * elf64-ppc.c: Remove stale part of ABI comment.
2604 (NO_OPD_RELOCS): Define.
2605 (ppc64_elf_check_relocs): Use it.
2606 (ppc64_elf_relocate_section): Here too.
2607 (build_one_stub): Don't point function syms at the stub. Instead,
2608 hijack plt.offset.
2609 (ppc64_elf_relocate_section): Check whether REL24 relocs should
2610 really go to the stub. Make all dynamic relocs in opd against
2611 locals.
2612 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
2613 plt.offset.
2614
2615 2002-01-22 Richard Henderson <rth@redhat.com>
2616
2617 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
2618
2619 2002-01-22 Alan Modra <amodra@bigpond.net.au>
2620
2621 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
2622 TOC_BASE_OFF adjustment.
2623
2624 * Makefile.am: Run "make dep-am".
2625 * Makefile.in: Regenerate.
2626 * po/SRC-POTFILES.in: Regenerate.
2627
2628 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
2629
2630 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
2631 host defines.
2632
2633 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
2634
2635 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
2636 Check for and emit error if sgot is NULL at this point.
2637
2638 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
2639
2640 * config.bfd (ia64*-*-netbsd*): New target.
2641
2642 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
2643
2644 * som.c (som_write_space_strings): Comment typo fix.
2645
2646 2002-01-21 Alan Modra <amodra@bigpond.net.au>
2647
2648 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
2649 is_func_descriptor fields.
2650 (link_hash_newfunc): Init them.
2651 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
2652 dot are candidates for plt entries. When processing .opd relocs,
2653 set function descriptor strings to point inside function code
2654 string, and set new ppc_link_hash_entry fields.
2655 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
2656 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
2657 function descriptors. It's now done in..
2658 (func_desc_adjust): New.
2659 (ppc64_elf_func_desc_adjust): New.
2660 (define elf_backend_always_size_sections): Define.
2661 (ppc64_elf_hide_symbol): New.
2662 (define elf_backend_hide_symbol): Define.
2663 (allocate_dynrelocs): Remove code looking up function descriptors
2664 as that has been done earlier.
2665 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
2666 table.
2667 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
2668 up function descriptor.
2669 (build_one_stub): Look up the function code sym. Check for
2670 invalid plt offsets.
2671 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
2672 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
2673
2674 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
2675 boolean param.
2676 (_bfd_elf_link_hash_hide_symbol): Likewise.
2677 * elflink.h (elf_link_add_object_symbols): Adjust call to
2678 elf_backend_hide_symbol.
2679 (elf_fix_symbol_flags): Likewise.
2680 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
2681 than bfd_alloc.
2682 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
2683 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
2684 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2685 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
2686 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
2687 and adjust to suit.
2688 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
2689 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
2690 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2691
2692 2002-01-18 Alan Modra <amodra@bigpond.net.au>
2693
2694 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
2695 dynamic function descriptor symbol, not the associated function
2696 symbol.
2697
2698 2002-01-17 Eric Christopher <echristo@redhat.com>
2699
2700 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
2701
2702 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
2703
2704 * po/bfd.pot: Regenerate.
2705 * po/fr.po: Regenerate.
2706
2707 2002-01-17 Alan Modra <amodra@bigpond.net.au>
2708
2709 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
2710 Remove "Elf_Internal_Shdr *" param.
2711 (_bfd_mips_elf_section_from_bfd_section): Ditto.
2712 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
2713 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
2714 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
2715 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
2716 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
2717 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
2718 function to override special sections. Remove hdr arg from
2719 backend call, and don't loop.
2720
2721 2002-01-16 Eric Christopher <echristo@redhat.com>
2722
2723 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
2724 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
2725 relocations requiring gp0 and gp.
2726
2727 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
2728
2729 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
2730 EF_ARM_VFP_FLOAT.
2731 (elf32_arm_print_private_bfd_data): Likewise.
2732
2733 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
2734
2735 * po/tr.po: Import new version.
2736
2737 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2738
2739 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
2740 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
2741 (ORI_R0_R0_0): Correct.
2742
2743 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2744
2745 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
2746 when plt_not_loaded.
2747 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
2748 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
2749 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
2750 (ppc64_elf_glink_code): Delete.
2751 (PPC64_ELF_GLINK_SIZE): Delete.
2752 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
2753 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
2754 ORI_R0_R0_0): Define.
2755 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
2756 (struct ppc_link_hash_table): Add sstub and plt_overflow.
2757 (ppc64_elf_link_hash_table_create): Init them.
2758 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
2759 Don't copy to shared lib.
2760 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
2761 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
2762 (allocate_dynrelocs <plt>): Don't change function sym here. Make
2763 room for .stub and .glink code.
2764 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
2765 DT_PPC64_GLINK.
2766 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
2767 bfd_elf64_bfd_final_link.
2768 (bfd_elf64_bfd_final_link): Don't define.
2769 (ppc64_elf_size_stubs): New.
2770 (build_plt_stub): New.
2771 (build_one_stub): New.
2772 (ppc64_elf_build_stubs): New.
2773 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
2774 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
2775 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
2776 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
2777 case output sections not separate. Adjust DT_RELASZ to not
2778 include plt relocs. Set reserved got entry. Set got and plt
2779 entry size.
2780 (elf_backend_got_header_size): Set to 8.
2781 * elf64-ppc.h: New file.
2782
2783 2002-01-16 Alan Modra <amodra@bigpond.net.au>
2784
2785 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
2786 sections, use bfd_section_list_remove.
2787 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2788 * elflink.h (elf_link_add_object_symbols): When removing all
2789 sections, use bfd_section_list_clear.
2790
2791 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
2792
2793 * po/sv.po: New file: Swedish translation.
2794 * configure.in (ALL_LINGUAS): Add sv.
2795 * configure: Regenerate.
2796
2797 2002-01-15 Jakub Jelinek <jakub@redhat.com>
2798
2799 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
2800 * elf.c (merge_sections_remove_hook): New function.
2801 (_bfd_elf_merge_sections): Pass it as 3rd argument to
2802 _bfd_merge_sections.
2803 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
2804 * libbfd.h: Rebuilt.
2805 * merge.c (_bfd_merge_sections): Add remove_hook argument.
2806 Call remove_hook if a SEC_EXCLUDE section is encountered.
2807
2808 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
2809
2810 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
2811 (xstormy16_reloc_map): Initialise new field with correct howto
2812 table.
2813 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
2814 howto entry.
2815
2816 2002-01-10 Michael Snyder <msnyder@redhat.com>
2817
2818 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
2819 (elfcore_write_pstatus): Use long instead of pid_t;
2820 * elf-bfd.h: Change prototypes to use long instead of pid_t;
2821
2822 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
2823
2824 * elf.c: Update copyright years.
2825 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
2826 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
2827
2828 2002-01-08 Michael Snyder <msnyder@redhat.com>
2829
2830 Add capability to write corefile note sections, for gdb.
2831 * elf.c (elfcore_write_note): New function.
2832 (elfcore_write_prpsinfo): New function.
2833 (elfcore_write_prstatus): New function.
2834 (elfcore_write_pstatus): New function.
2835 (elfcore_write_prfpreg): New function.
2836 (elfcore_write_prxfpreg): New function.
2837 * elf-bfd.h: Add prototypes for above functions.
2838
2839 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
2840
2841 * elf.c (elf_fake_sections): Propagate errors from
2842 elf_backend_fake_section.
2843
2844 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
2845
2846 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
2847 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
2848 (elf32-sh-nbsd.lo): New rule.
2849 * Makefile.in: Regenerate.
2850 * config.bfd (sh*le-*-netbsdelf*): New target.
2851 (sh*-*-netbsdelf*): New target.
2852 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
2853 (bfd_elf32_shnbsd_vec): New vector.
2854 (bfd_elf32_shlnbsd_vec): New vector.
2855 * configure: Regenerate.
2856 * elf32-sh-nbsd.c: New file.
2857 * targets.c: Update copyright years.
2858 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
2859 bfd_elf32_shnbsd_vec.
2860
2861 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
2862
2863 * coff-rs6000.c (READ20): Use bfd_scan_vma.
2864
2865 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
2866
2867 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
2868 of a symbol in a section that will be deleted.
2869
2870 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
2871
2872 * po/es.po: New file: Spanish translation.
2873 * configure.in (ALL_LINGUAS): Add es.
2874 * configure: Regenerate.
2875
2876 2002-01-06 Steve Ellcey <sje@cup.hp.com>
2877
2878 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
2879 argument so we can handle HP-UX specially.
2880 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
2881 (elfNN_hpux_backend_section_from_bfd_section): New for support
2882 of SHN_IA_64_ANSI_COMMON.
2883 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
2884 (is_unwind_section_name): Add special HP-UX support.
2885 (elfNN_ia64_section_from_shdr): Add support for more sections.
2886 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
2887 add support for more sections.
2888 (elfNN_ia64_additional_program_headers): Modify
2889 is_unwind_section_name call.
2890 (elfNN_ia64_modify_segment_map): Remove assumption that there is
2891 only one unwind section in segment.
2892
2893 2002-01-06 Alan Modra <amodra@bigpond.net.au>
2894
2895 * syms.c (_bfd_generic_make_empty_symbol): New function.
2896 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
2897 _bfd_generic_make_empty_symbol.
2898 * libbfd.h: Regenerate.
2899 * bfd-in2.h: Regenerate.
2900 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
2901 (hppabsd_core_get_symtab_upper_bound): Don't define.
2902 (hppabsd_core_get_symtab): Likewise.
2903 (hppabsd_core_print_symbol): Likewise.
2904 (hppabsd_core_get_symbol_info): Likewise.
2905 (hppabsd_core_bfd_is_local_label_name): Likewise.
2906 (hppabsd_core_get_lineno): Likewise.
2907 (hppabsd_core_find_nearest_line): Likewise.
2908 (hppabsd_core_bfd_make_debug_symbol): Likewise.
2909 (hppabsd_core_read_minisymbols): Likewise.
2910 (hppabsd_core_minisymbol_to_symbol): Likewise.
2911 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
2912 Formatting fixes.
2913 * hpux-core.c: Similarly.
2914 * irix-core.c: Similarly.
2915 * osf-core.c: Similarly.
2916 * sco5-core.c: Similarly.
2917 * binary.c (binary_make_empty_symbol): Remove function, define as
2918 _bfd_generic_make_empty_symbol.
2919 * ihex.c (ihex_make_empty_symbol): Likewise.
2920 * mmo.c (mmo_make_empty_symbol): Likewise.
2921 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
2922 * srec.c (srec_make_empty_symbol): Likewise.
2923 * versados.c (versados_make_empty_symbol): Likewise.
2924 * vms.c (_bfd_vms_make_empty_symbol): Remove.
2925 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
2926 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
2927 rather than _bfd_vms_make_empty_symbol.
2928 * vms-misc.c (new_symbol): Likewise.
2929
2930 2002-01-05 Alan Modra <amodra@bigpond.net.au>
2931
2932 * section.c (bfd_section_init): Remove unnecessary initialisations.
2933 (bfd_section_list_clear): New function.
2934 (bfd_section_list_remove, bfd_section_list_insert): New macros.
2935 (_bfd_strip_section_from_output): Use them.
2936 * coffcode.h (coff_set_alignment_hook): Likewise.
2937 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
2938 * elf64-mips.c (mips_elf64_final_link): Likewise.
2939 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2940 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2941 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2942 * bfd-in2.h: Regenerate.
2943
2944 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
2945 rather than doing our own section handling. Clean up after errors
2946 with bfd_release and bfd_section_list_clear. Handle unexpected
2947 flags.
2948 * aoutf1.h (sunos4_core_file_p): Likewise.
2949 * aix386-core.c (aix386_core_file_p): Likewise.
2950 * cisco-core.c (cisco_core_file_validate): Likewise.
2951 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
2952 * trad-core.c (trad_unix_core_file_p): Likewise.
2953
2954 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
2955 with bfd_release and bfd_section_list_clear.
2956 * hpux-core.c (hpux_core_core_file_p): Likewise.
2957 * irix-core.c (irix_core_core_file_p): Likewise.
2958 * lynx-core.c (lynx_core_file_p): Likewise.
2959 * osf-core.c (osf_core_core_file_p): Likewise.
2960 * rs6000-core.c (rs6000coff_core_p): Likewise.
2961 * sco5-core.c (sco5_core_file_p): Likewise.
2962
2963 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
2964 sign extension adjustments without conditionals.
2965
2966 2002-01-04 Jakub Jelinek <jakub@redhat.com>
2967
2968 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
2969 CIE at .eh_frame start is removed due to no FDEs referencing it.
2970
2971 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
2972
2973 * config.bfd (x86_64-*-netbsd*): New target.
2974 * configure.in (x86_64-*-netbsd*): Set COREFILE
2975 to netbsd-core.lo.
2976 * configure: Regenerated.
2977
2978 2002-01-03 Tom Rix <trix@redhat.com>
2979
2980 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
2981 for recent bfd_make_section_anyway change.
2982
2983 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
2984
2985 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2986 R_ARM_THM_PC11 reloc.
2987
2988 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
2989
2990 * configure.in (LINGUAS): Add ja.
2991 * configure: Regenerate.
2992 * po/ja.po: Import from translation project's web site.
2993
2994 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
2995
2996 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
2997 messages to ease translation into other languages.
2998
2999 For older changes see ChangeLog-0001
3000 \f
3001 Local Variables:
3002 mode: change-log
3003 left-margin: 8
3004 fill-column: 74
3005 version-control: never
3006 End: