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