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