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