ae96c5a3c4b9ed77a1cdbe9820ac6746c607f5a9
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2
3 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5 bfd_mach_m6812s): Declare.
6
7 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
8 (_bfd_m68hc12_elf_set_private_flags): Call it.
9 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
10 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
11 report microcontroller incompatibilities (HC12 vs HCS12).
12 (elf_backend_object_p): Update.
13
14 2002-11-30 Alan Modra <amodra@bigpond.net.au>
15
16 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
17 (enum bfd_boolean, boolean): Delete.
18 (bfd_boolean): Typedef to an int.
19 (FALSE, TRUE): Define.
20 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
21 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
22 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
23 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
24 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
25 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
26 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
27 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
28 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
29 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
30 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
31 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
32 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
33 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
34 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
35 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
36 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
37 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
38 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
39 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
40 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
41 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
42 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
43 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
44 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
45 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
46 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
47 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
48 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
49 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
50 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
51 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
52 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
53 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
54 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
55 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
56 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
57 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
58 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
59 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
60 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
61 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
62 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
63 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
64 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
65 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
66 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
67 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
68 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
69 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
70 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
71 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
72 of bfd_boolean vars with TRUE/FALSE. Formatting.
73 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
74
75 2002-11-28 Alan Modra <amodra@bigpond.net.au>
76
77 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
78 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
79 with Elf_Internal_Rela.
80 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
81 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
82 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
83 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
84 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
85 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
86 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
87 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
88 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
89 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
90 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
91 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
92 throughout instead.
93 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
94 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
95 Remove INLINE keyword.
96 (elf_swap_reloc_in): Likewise. Also clear r_addend.
97 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
98 as a bfd_byte *.
99 (elf_write_relocs): Consolidate REL and RELA code.
100 (elf_slurp_reloc_table_from_section): Simplify REL code.
101 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
102 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
103 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
104 RELA code.
105 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
106 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
107 (elf_link_output_relocs): Likewise.
108 (elf_reloc_link_order): Likewise.
109 (elf_finish_pointer_linker_section): Likewise.
110 (struct elf_link_sort_rela): Remove union.
111 (elf_link_sort_cmp1): Update to suit.
112 (elf_link_sort_cmp2): Here too.
113 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
114 over-allocation for int_rels_per_ext_rel != 1 case.
115 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
116 * elf32-i386.c: Likewise.
117 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
118 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
119 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
120 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
121 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
122 elf64-sparc.c, elf64-x86-64.c: Likewise.
123 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
124 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
125 bfd_elf32_swap_reloc_in.
126
127 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
128 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
129 (mips_elf64_swap_reloc_in): Zero r_addend.
130 (mips_elf64_be_swap_reloc_in): Likewise.
131 (mips_elf64_slurp_one_reloc_table): Simplify.
132
133 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
134 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
135 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
136
137 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
138
139 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
140 unresolved debugging relocs in dynamic applications.
141 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
142
143 2002-11-26 Alan Modra <amodra@bigpond.net.au>
144
145 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
146 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
147 on a relocatable link. Comment typos.
148 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
149 in the order they are declared. Clear elf_hash_value too.
150 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
151 eh_info and tls_segment.
152 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
153 sorted when discarding relocs by turning them into R_*_NONE.
154
155 * libbfd.c (warn_deprecated): Comment spelling.
156 * po/SRC-POTFILES.in: Regenerate.
157
158 2002-11-21 Richard Henderson <rth@redhat.com>
159
160 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
161 arch's st_other bits when merging visibilities.
162 (elf_link_output_extsym): Tidy clearing of visibility field.
163
164 2002-11-21 Alan Modra <amodra@bigpond.net.au>
165
166 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
167 (SWAP_OUT_RELOC_OFFSET): Define.
168
169 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
170
171 * elf.c (_bfd_elf_link_hash_table_init): Make sure
172 can_refcount is properly extended to the type of
173 init_refcount.
174
175 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
176
177 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
178 (_bfd_mips_elf_relocate_section): Use it.
179
180 * elfxx-mips.c (MNAME): New macro.
181 (_bfd_mips_elf_check_relocs): Use it.
182 (_bfd_mips_elf_discard_info): Likewise.
183 (_bfd_mips_elf_final_link): Likewise.
184
185 2002-11-19 Alan Modra <amodra@bigpond.net.au>
186
187 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
188 rel_hdr.sh_size too.
189
190 2002-11-18 Klee Dienes <kdienes@apple.com>
191
192 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
193 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
194 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
195 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
196 Add dependencies for bfdwin.c, bfdio.c.
197 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
198 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
199 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
200 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
201 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
202 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
203 bfd_get_size (moved from libbfd.c and bfd.c).
204 * bfdwin.c New file. Contains _bfd_window_internal,
205 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
206 libbfd.c and bfd.c).
207 * po/SRC-POTFILES.in: Regenerate.
208 * po/bfd.pot: Regenerate.
209 * libbfd.h: Regenerate.
210 * bfd-in2.h: Regenerate.
211 * aclocal.m4: Regenerate.
212 * Makefile.in: Regenerate.
213 * configure: Regenerate.
214
215 2002-11-18 Klee Dienes <kdienes@apple.com>
216
217 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
218
219 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
220
221 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
222 jsr after a short jump.
223 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
224
225 2002-11-15 Klee Dienes <kdienes@apple.com>
226
227 * pef.c (bfd_pef_convert_architecture): Move declaration of
228 ARCH_POWERPC and ARCH_M68K to the start of the function.
229
230 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
231
232 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
233
234 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
235
236 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
237 For bpo_gregs_section->contents, allocate _raw_size, not
238 _cooked_size.
239
240 2002-11-13 Klee Dienes <kdienes@apple.com>
241
242 * config.bfd: Add entries for powerpc-*-darwin and cousins.
243
244 2002-11-13 H.J. Lu <hjl@gnu.org>
245
246 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
247
248 2002-11-13 Klee Dienes <kdienes@apple.com>
249 Alan Modra <amodra@bigpond.net.au>
250
251 * bfd.c (struct bfd_preserve): New.
252 (bfd_preserve_save): New function.
253 (bfd_preserve_restore): Ditto.
254 (bfd_preserve_finish): Ditto.
255 * bfd-in2.h: Regenerate.
256 * mach-o.c: Formatting.
257 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
258 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
259 (bfd_mach_o_core_p): Ditto.
260 (bfd_mach_o_scan): Pass in mdata.
261 * mach-o.h (bfd_mach_o_scan): Update prototype.
262 * pef.c: Formatting.
263 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
264 (bfd_pef_xlib_object_p): Ditto.
265 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
266 * pef.h (bfd_pef_scan): Update prototype.
267 * xsym.c: Formatting, K&R fixes.
268 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
269 (bfd_sym_scan): New function split out from bfd_sym_object_p.
270 * xsym.h (bfd_sym_scan): Declare.
271 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
272 * elfcore.h (elf_core_file_p): Likewise.
273 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
274
275 2002-11-12 Nick Clifton <nickc@redhat.com>
276
277 * po/da.po: Updated Danish translation.
278
279 2002-11-12 Alan Modra <amodra@bigpond.net.au>
280
281 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
282 relocatable link too.
283 (elf_link_input_bfd): When emitting relocs, adjust offsets for
284 eh_frame and stab sections. Zap deleted relocs.
285 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
286 (elf_bfd_discard_info): Run for relocatable link too.
287 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
288 Handle ld -r case.
289 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
290 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
291
292 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
293 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
294 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
295 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
296 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
297 (struct elf_link_hash_table): Add eh_info.
298 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
299 (_bfd_elf_discard_section_eh_frame): Update prototype.
300 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
301 (_bfd_elf_write_section_eh_frame): Likewise.
302 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
303 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
304 param. Get "hdr_info" from link hash table.
305 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
306 header section from link hash table. Save header section to elf_tdata.
307 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
308 header section from link hash table. Don't alloc hdr_info. Clear
309 hdr_sec instead of setting "strip".
310 (_bfd_elf_eh_frame_section_offset): Formatting.
311 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
312 Get header section from link hash table.
313 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
314 Get header section from link hash table.
315 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
316 (get_program_header_size): Likewise.
317 (_bfd_elf_section_offset): Formatting.
318 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
319 section pointer in link hash table.
320 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
321 and _bfd_elf_write_section_eh_frame calls. Update comment about
322 eh_frame entries.
323 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
324 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
325
326 * po/SRC-POTFILES.in: Regenerate.
327
328 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
329 relocs for discarded FDEs. Remove dead code.
330 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
331 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
332 Tidy conditions under which stabs are edited. Formatting.
333 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
334 from discarded relocs.
335 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
336 section adjustments after testing magic values.
337
338 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
339
340 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
341 references to large plt symbols.
342
343 2002-11-12 Klee Dienes <kdienes@apple.com>
344
345 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
346 looking for an unused section name.
347
348 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
349
350 * coff-h8300.c: Fix formatting.
351 * elf32-h8300.c: Likewise.
352 * reloc16.c: Likewise.
353
354 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
355
356 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
357 section when dynamic section unused; _bfd_strip_section_from_output
358 instead.
359
360 2002-11-08 Alan Modra <amodra@bigpond.net.au>
361
362 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
363 and sym_vec.
364
365 * dwarf2.c: Revert last change.
366
367 2002-11-07 Michal Ludvig <mludvig@suse.cz>
368
369 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
370 _bfd_dwarf2_find_nearest_line): Use
371 bfd_simple_get_relocated_section_contents() instead of
372 bfd_get_section_contents().
373 * reloc.c (bfd_perform_relocation): Add sanity check.
374 * simple.c (simple_get_relocated_section_contents): If the section
375 does not have any relocs associated with it, just return the
376 unadjusted contents.
377
378 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
379
380 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
381 case R_CRIS_32_GOT>: Correct test for filling in constant .got
382 contents, enabling for a non-DSO, for symbols defined in the
383 program with --export-dynamic.
384
385 2002-11-07 Alan Modra <amodra@bigpond.net.au>
386
387 * elf64-ppc.c: Comment typo fixes.
388 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
389
390 2002-11-07 Nick Clifton <nickc@redhat.com>
391
392 * po/da.po: Updated Danish translation.
393
394 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
395
396 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
397 exactly three internal relocs per external reloc. Set reloc_count
398 to the external reloc count.
399
400 2002-11-06 Klee Dienes <kdienes@apple.com>
401
402 * coff-stgo32.c (stub_bytes): Mark as const.
403 Fix comment formatting.
404
405 2002-11-06 Klee Dienes <kdienes@apple.com>
406
407 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
408 xsym.lo.
409 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
410 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
411 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
412 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
413 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
414 sym.
415 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
416 * Makefile.in: Regenerate.
417 * doc/Makefile.in: Regenerate.
418 * bfd-in2.h: Regenerate.
419 * xsym.c: New file. Contains support for the Apple/Metrowerks
420 xSYM debugging format.
421 * xsym.h: New file.
422 * pef.c: New file. Contains support for the Apple Code Fragment
423 Manager Preferred Executable Format
424 * pef.h: New file.
425 * pef-traceback.h: New file. Contains support for parsing PowerPC
426 traceback tables as used by PEF executables (and perhaps other
427 systems as well).
428 * mach-o.c: New file. Contains support for the Mach-O object file
429 format.
430 * mach-o.h: New file.
431 * mach-o-target.c: New file. Declares the mach-o targets
432 themselves. Included three times by mach-o.c; each time with a
433 different set of macros set.
434
435 2002-11-06 Graeme Peterson <gp@qnx.com>
436
437 * Makefile.am: Remove entries for elf32-qnx.[ch].
438 * Makefile.in: Regenerate.
439 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
440 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
441 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
442 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
443 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
444 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
445 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
446 * configure: Regenerate.
447 * elf32-qnx.c: Remove.
448 * elf32-qnx.h: Remove.
449 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
450 is_contained_by_filepos, and copy_private_bfd_data_p.
451 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
452 is_contained_by_filepos, and copy_private_bfd_data_p.
453 * elf32-i386.c: Remove QNX extended bfd support.
454 * elf32-ppc.c: Remove QNX extended bfd support.
455 * elf32-sh.c: Remove QNX extended bfd support.
456 * elfarm-nabi.c: Remove QNX extended bfd support.
457 * targets.c: Remove qnx vectors.
458 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
459 (elf_backend_is_contained_by_filepos): Remove.
460 (elf_backend_copy_private_bfd_data_p): Remove.
461 * po/SRC-POTFILES.in: Regenerate.
462
463 2002-11-06 David O'Brien <obrien@FreeBSD.org>
464 Alan Modra <amodra@bigpond.net.au>
465
466 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
467 dynamic relocs against section symbols for the output section vma.
468
469 2002-11-05 Alan Modra <amodra@bigpond.net.au>
470
471 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
472 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
473
474 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
475 Alan Modra <amodra@bigpond.net.au>
476
477 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
478 vectors in target_selvecs.
479 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
480 in target_selvecs.
481 (sh-*-netbsdelf*): Likewise.
482 * configure.in (assocvecs): New variable. Handle assocvecs like
483 selvecs.
484 * configure: Regenerate.
485 * format.c (bfd_check_format_matches): Store bfd_target pointers
486 in matching_vector instead of target names. Select first target
487 from bfd_associated_vector that matches a list of ambiguous targets.
488 * targets.c (_bfd_associated_vector): New array.
489 (bfd_associated_vector): New variable.
490 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
491 * libbfd-in.h (bfd_associated_vector): Declare.
492 * libbfd.h: Regenerate.
493
494 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
495
496 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
497 non-NULL before dereferencing.
498
499 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
500
501 * vms.c (vms_object_p): Restore the start address when returning
502 NULL.
503
504 2002-11-04 Alan Modra <amodra@bigpond.net.au>
505 Hans-Peter Nilsson <hp@axis.com>
506
507 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
508 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
509 Set up a larger symshndxbuf, and write it out. Free it on
510 exit rather than freeing symbuf twice. Correct section index
511 on output section symbol loop.
512 (elf_link_output_sym): Accumulate symbol extension section
513 indices, reallocating symshndxbuf rather than writing it out.
514 (elf_link_flush_output_syms): Don't flush symshndxbuf.
515 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
516 Use bfd_zalloc to clear i_shdrp[0] too.
517
518 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
519
520 * elf32-sh64-com.c (sh64_address_in_cranges): Use
521 _raw_size of cranges section if _cooked_size not yet set.
522
523 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
524
525 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
526 for bfd_elf32_swap_symbol_out.
527
528 2002-10-31 David O'Brien <obrien@FreeBSD.org>
529
530 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
531 signed and unsigned in comparison.
532
533 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
534
535 * coffcode.h: Remove extraneous '\'.
536
537 2002-10-28 H.J. Lu <hjl@gnu.org>
538
539 * Makefile.am (targets.lo): Depend on Makefile instead of
540 config.status.
541 (archures.lo): Likewise.
542 * Makefile.in: Regenerated.
543
544 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
545
546 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
547 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
548 targ_selvecs.
549
550 2002-10-25 Jim Wilson <wilson@redhat.com>
551
552 * elf64-sh64.c (sh_elf64_relocate_section): Call
553 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
554 of SHF_MERGE section.
555
556 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
557
558 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
559
560 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
561
562 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
563 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
564 unsigned int.
565 (NAME(aout,final_link)): Cast enum used in assignment.
566 (aout_link_write_symbols): Cast enums in comparisons, int values to
567 boolean, enums in assignments to int.
568 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
569 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
570 with unsigned ints.
571 (aout_link_reloc_link_order): Cast enum to int in assignment.
572 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
573 calls to char *.
574 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
575 assignment.
576 * bfd-in2.h (bfd_set_section_vma): Likewise.
577 * bfd.c (bfd_record_phdr): Cast enums in assignments.
578 * binary.c (bfd_alloc): Cast enum to long.
579 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
580 * dwarf2.c (read_abbrevs): Add casts to enum types.
581 (read_attribute_value): Likewise.
582 (arange_add): Cast result of bfd_zalloc call.
583 (comp_unit_contains_address): Return true and false.
584 (comp_unit_find_nearest_line): Cast return to boolean.
585 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
586 * gen-aout.c: define macro '_' if not defined.
587 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
588 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
589 (bfd_write_bigendian_4byte_int): Cast return to boolean.
590 (bfd_seek): Cast bfd_realloc to bfd_byte *.
591 (bfd_generic_is_local_label_name): Cast return to boolean.
592 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
593 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
594 struct bfd_hash_entry *.
595 (_bfd_generic_link_hash_newfunc): likewise.
596 (_bfd_generic_final_link): Cast enum to unsigned int.
597 * merge.c (sec_merge_emit): Cast return to boolean.
598 (merge_strings): Add casts to const unsigned char *.
599 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
600 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
601 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
602 struct bfd_hash_entry *.
603 (bfd_set_section_content): Add cast to PTR in comparison.
604 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
605 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
606 simple_dummy_unattached_reloc,
607 bfd_simple_get_relocated_section_contents): Add K&R declarations and
608 function definitions.
609 * srec.c (S3Forced): Initialize to false.
610 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
611 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
612 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
613 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
614 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
615 comparisons.
616
617 2002-10-23 Jakub Jelinek <jakub@redhat.com>
618
619 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
620 relocs into shared lib non-allocated reloc sections.
621
622 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
623
624 * dwarf2.c (add_line_info): Ensure that the line_info_table is
625 sorted even when given an out-of-order line sequence.
626 (lookup_address_in_line_info_table): When an exact VMA match is
627 not found, return line information with the closest VMA.
628
629 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
630
631 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
632 HPUX 11.00 patch PHSS_26559.
633
634 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
635
636 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
637 the options section into a separate section unless IRIX 6
638 compatibility is enabled.
639
640 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
641
642 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
643 into arrays.
644 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
645 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
646 into account.
647 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
648 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
649
650 2002-10-21 Graeme Peterson <gp@qnx.com>
651
652 * targets.c (_bfd_target_vector): Add missing qnx vectors.
653
654 2002-10-21 Alan Modra <amodra@bigpond.net.au>
655
656 * targets.c (bfd_target_list): Don't return the default target twice.
657
658 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
659
660 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
661 perror with bfd_perror.
662
663 2002-10-19 H.J. Lu <hjl@gnu.org>
664
665 * elflink.h (elf_link_add_object_symbols): Correctly handle
666 DT_RPATH and DT_RUNPATH.
667
668 2002-10-19 Mark Kettenis <kettenis@gnu.org>
669
670 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
671
672 2002-10-17 Denis Chertykov <denisc@overta.ru>
673
674 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
675 for ip2k port.
676
677 2002-10-17 Alan Modra <amodra@bigpond.net.au>
678
679 * elfxx-target.h (USE_REL): Don't define as 1.
680 * elf32-arm.h (USE_REL): Provide a default define of 0.
681 Use #if rather than #ifdef when testing USE_REL.
682 * elf32-m32r.c: Likewise.
683
684 * elf32-arc.c (USE_REL): Define as 1.
685 * elf32-d10v.c (USE_REL): Likewise.
686 * elf32-m32r.c (USE_REL): Likewise.
687 * elf32-m68hc11.c (USE_REL): Likewise.
688 * elf32-m68hc12.c (USE_REL): Likewise.
689 * elf32-or32.c (USE_REL): Likewise.
690 * elfarm-nabi.c (USE_REL): Likewise.
691
692 2002-10-16 Jakub Jelinek <jakub@redhat.com>
693
694 * config.bfd (s390-*-linux*): Add targ64_selvecs.
695 (s390x-*-linux*): Add targ_selvecs.
696
697 2002-10-16 Alan Modra <amodra@bigpond.net.au>
698
699 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
700 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
701 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
702 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
703 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
704 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
705 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
706 (SOURCE_HFILES): Add elf32-qnx.h.
707 (BUILD_HFILES): Add bfdver.h.
708 Run "make dep-am".
709 * Makefile.in: Regenerate.
710 * configure.in Update bfd vector dependencies.
711 * configure: Regenerate.
712 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
713 * elf32-i386qnx.c: Likewise.
714 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
715 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
716 * elf32-sh-lin.c: Likewise.
717 * elf32-shqnx.c: Likewise.
718 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
719 * elf32-sh64-nbsd.c: Likewise.
720 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
721 * elf64-sh64-nbsd.c: Likewise.
722 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
723 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
724 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
725 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
726 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
727 (elf_backend_is_contained_by_filepos): Likewise.
728 (elf_backend_copy_private_bfd_data_p): Likewise.
729 Globalize and move functions to..
730 * elf32-qnx.c: ..here. New file.
731 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
732 emit target vectors when INCLUDE_SHMEDIA.
733 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
734 end of file.
735 * elf64-sh64.c: Remove ELF_ARCH test.
736 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
737 * po/BLD-POTFILES.in: Regenerate.
738 * po/SRC-POTFILES.in: Regenerate.
739
740 2002-10-16 Alan Modra <amodra@bigpond.net.au>
741
742 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
743 loaded with --just-symbols.
744
745 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
746 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
747 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
748 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
749
750 2002-10-15 Richard Henderson <rth@redhat.com>
751
752 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
753 (BFD64_BACKENDS_CFILES): Likewise.
754 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
755 * elf64-alpha-fbsd.c: Remove file, move code ...
756 * elf64-alpha.c: ... here.
757 * Makefile.in, configure: Rebuild.
758
759 2002-10-14 Richard Henderson <rth@redhat.com>
760
761 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
762 VALUE, not ADDEND.
763
764 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
765
766 * elf32-sh.c (elf_sh_link_hash_entry): Replace
767 datalabel_got_offset with union of datalabel_got
768 offset and refcount.
769 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
770 (allocate_dynrelocs): Delete unnecessary code for
771 STT_DATALABEL type. Create entry in got for
772 datalabel version of symbol if datalabel_got.refcount > 0.
773 (sh_elf_relocate_section): Use datalabel_got union.
774 (sh_elf_gc_sweep_hook): Pull common code to initialize
775 h and eh out of switch statement. Declare seen_stt_datalabel.
776 Initialize it. Decrement datalabel_got.refcount for
777 got relocs when seen_stt_datalabel is true.
778 Decrement local_got_refcounts entry for datalabel got relocs
779 of local symbols.
780 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
781 (sh_elf_check_relocs): Declare seen_stt_datalabel.
782 Initialize it. When seen_stt_datalabel is true, increment
783 datalabel_got refcount rather than got.refcount.
784 (sh_elf_finish_dynamic_symbol): Create relocs to
785 initialize got entry for datalabel version of symbol.
786
787 2002-10-14 Alan Modra <amodra@bigpond.net.au>
788
789 * Makefile.am: Run "make dep-am".
790 (BFD_H_FILES): Remove version.h.
791 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
792 * version.h: ..to here.
793 * configure.in (bfd_version_date): Remove.
794 (AC_OUTPUT): Make bfdver.h from version.h.
795 * bfd.c: #include "bfdver.h".
796 * vms-hdr.c: Likewise.
797 * Makefile.in: Regenerate.
798 * bfd-in2.h: Regenerate.
799 * configure: Regenerate.
800 * po/SRC-POTFILES.in: Regenerate.
801
802 2002-10-14 Alan Modra <amodra@bigpond.net.au>
803
804 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
805 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
806 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
807 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
808 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
809 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
810 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
811 bfd_mach_ip2022, bfd_mach_ip2022ext,
812 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
813 * bfd-in2.h: Regenerate.
814
815 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
816
817 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
818 endian vector to targ_selvecs.
819
820 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
821
822 * elfxx-mips.c (mips_elf_calculate_relocation): Take
823 save_addend argument. Don't apply the 32-bit mask to a
824 GPREL32 value if it's to be used in another relocation. Don't
825 use forced-check computation of local_p to decide whether to
826 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
827 of the addend of a non-in-place GPREL16 relocation.
828 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
829 mips_elf_calculate_relocation().
830
831 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
832
833 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
834 with symbols in other sections if we relaxed something; the sections
835 output offsets must be re-computed before.
836
837 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
838
839 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
840 handling to use Elf_Internal_Sym.
841 (m68hc11_elf_relax_delete_bytes): Likewise.
842
843 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
844
845 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
846 sh_elf_object_p, dtpoff_base): New functions.
847 (sh_elf_howto_table): Add TLS relocs.
848 (sh_reloc_map): Likewise.
849 (sh_elf_info_to_howto): Support TLS relocs.
850 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
851 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
852 New macros.
853 (sh_elf_obj_tdata): New.
854 (elf_sh_link_hash_table): Add tls_ldm_got.
855 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
856 (allocate_dynrelocs): Support TLS relocs.
857 (sh_elf_size_dynamic_sections): Likewise.
858 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
859 .rela.got section when found already. Return false after printing
860 error about unresolvable relocation.
861 (sh_elf_gc_sweep_hook): Support TLS relocs.
862 (sh_elf_check_relocs): Likewise.
863 (sh_elf_finish_dynamic_symbol): Likewise.
864 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
865 * reloc.c: Add SH TLS relocs.
866 * bfd-in2.h, libbfd.h: Regenerate.
867
868 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
869
870 * Makefile.in: Regenerated.
871
872 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
873
874 * Makefile.am: Run dep-am.
875 (BFD_H_DEP): Add simple.c and linker.c.
876 (BFD32_LIBS): Add simple.lo.
877 (BFD32_LIBS_CFILES): Add simple.c.
878 * Makefile.in: Regenerated.
879 * bfd-in2.h: Regenerated.
880 * simple.c: New file.
881
882 2002-10-11 Alan Modra <amodra@bigpond.net.au>
883
884 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
885 (record_thumb_to_arm_glue): Likewise.
886 * ecoff.c (ecoff_link_add_externals): Likewise.
887 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
888 (record_thumb_to_arm_glue): Likewise.
889 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
890 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
891 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
892 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
893 * elf64-ppc.c (func_desc_adjust): Likewise.
894 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
895 (sh64_elf64_create_dynamic_sections): Likewise.
896 * elflink.c (_bfd_elf_create_got_section): Likewise.
897 (_bfd_elf_create_dynamic_sections): Likewise.
898 (_bfd_elf_create_linker_section): Likewise.
899 * elflink.h (elf_add_default_symbol): Likewise.
900 (elf_link_create_dynamic_sections): Likewise.
901 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
902 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
903 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
904 (_bfd_mips_elf_add_symbol_hook): Likewise.
905 (_bfd_mips_elf_create_dynamic_sections): Likewise.
906 * linker.c (generic_link_add_symbol_list): Likewise.
907 * xcofflink.c (xcoff_link_add_symbols): Likewise.
908
909 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
910
911 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
912 completely removed. Correct local sym adjustment.
913
914 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
915
916 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
917 Correct mistake in calculation of address of .got.
918 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
919 elf_sh64_pic_plt_entry_le): Likewise.
920
921 2002-10-09 Richard Shann <richard.shann@superh.com>
922 Stephen Clarke <stephen.clarke@superh.com>
923
924 * Makefile.am: Add entries for elf32-sh64-lin.c and
925 elf64-sh64-lin.c. Regenerate.
926 * Makefile.in: Regenerate.
927 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
928 to use sh64 vectors rather than sh vectors.
929 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
930 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
931 * configure: Regenerate.
932 * elf32-sh64-lin.c: New file.
933 * elf64-sh64-lin.c: New file.
934 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
935 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
936
937 2002-10-08 H.J. Lu <hjl@gnu.org>
938
939 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
940 IE->LE transition for R_386_TLS_IE.
941
942 2002-10-08 Alan Modra <amodra@bigpond.net.au>
943
944 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
945
946 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
947
948 * cofflink.c (mark_relocs): Don't mark relocations in excluded
949 sections.
950
951 2002-10-07 Alan Modra <amodra@bigpond.net.au>
952
953 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
954 code.
955
956 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
957
958 2002-10-06 Alan Modra <amodra@bigpond.net.au>
959
960 * opncls.c: Formatting.
961 (_bfd_new_bfd): Use a smaller section hash table.
962
963 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
964
965 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
966 of the other two relocations packed with a REL32 to NONE.
967
968 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
969
970 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
971 (sh_elf_link_hash_newfunc): Initialize it.
972 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
973 to got.refcount for symbols that are forced local or when
974 we have direct got refs.
975 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
976 to correctly adjust got.refcount and plt.refcount.
977 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
978 (sh_elf_check_relocs): Increment gotplt_refcount.
979
980 2002-10-01 Jakub Jelinek <jakub@redhat.com>
981
982 * elf32-i386.c (elf_i386_relocate_section): Fix
983 movl foo@indntpoff, %eax IE->LE transition.
984
985 2002-10-01 Jakub Jelinek <jakub@redhat.com>
986
987 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
988 sequence and its transitions.
989
990 2002-10-01 Jakub Jelinek <jakub@redhat.com>
991
992 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
993 to st_value + addend in non-code sections.
994 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
995 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
996
997 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
998 Ken Raeburn <raeburn@cygnus.com>
999 Aldy Hernandez <aldyh@redhat.com>
1000 Eric Christopher <echristo@redhat.com>
1001 Richard Sandiford <rsandifo@redhat.com>
1002
1003 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
1004 (bfd_mach_mips5500): New.
1005 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
1006 (arch_info_struct): Add corresponding entries here.
1007 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
1008 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
1009 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
1010 bfd_mach_mips5400 and bfd_mach_mips5500.
1011 (_bfd_mips_elf_mach_extends_p): New function.
1012 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
1013 the EF_MIPS_MACH flags.
1014 * bfd-in2.h: Regenerate.
1015
1016 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
1017
1018 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
1019 .got sections.
1020
1021 2002-09-28 Alan Modra <amodra@bigpond.net.au>
1022
1023 * elf.c (map_sections_to_segments): Correct test for start of
1024 writable section in the same page as end of read-only section.
1025
1026 2002-09-27 Matt Thomas <matt@3am-software.com>
1027
1028 * elf32-vax.c (elf_vax_check_relocs): Remove unused
1029 local_got_refcounts usage. Remove allocation of got slot.
1030 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
1031 Remove de-allocation of got slot.
1032 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
1033 traversal for elf_vax_instantiate_got_entries. Allow empty .got
1034 sections to be GC'ed.
1035 (elf_vax_instantiate_got_entries): New function.
1036 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
1037 tests that are now handled by elf_vax_instantiate_got_entries.
1038 Assert GOT entry falls within .got section size. Remove redundant
1039 comparisions. Fix comments.
1040
1041 2002-09-27 Jakub Jelinek <jakub@redhat.com>
1042
1043 * reloc.c: Add x86-64 TLS relocs.
1044 * bfd-in2.h, libbfd.h: Rebuilt.
1045 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
1046 relocs. Add TLS relocs.
1047 (x86_64_reloc_map): Add TLS relocs.
1048 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
1049 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
1050 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
1051 (elf64_x86_64_hash_entry): Define.
1052 (struct elf64_x86_64_obj_tdata): New.
1053 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
1054 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
1055 (link_hash_newfunc): Initialize tls_type.
1056 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
1057 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
1058 (elf64_x86_64_mkobject): New.
1059 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
1060 (elf64_x86_64_tls_transition): New.
1061 (elf64_x86_64_check_relocs): Add r_type variable and use it.
1062 Handle TLS relocs.
1063 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
1064 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
1065 (elf64_x86_64_size_dynamic_sections): Likewise.
1066 (dtpoff_base, tpoff): New.
1067 (elf64_x86_64_relocate_section): Handle TLS relocs.
1068 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
1069 entries.
1070 (bfd_elf64_mkobject): Define.
1071
1072 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
1073 DF_STATIC_TLS if shared.
1074
1075 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1076
1077 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
1078 empty relocation sections.
1079
1080 2002-09-26 Alan Modra <amodra@bigpond.net.au>
1081
1082 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
1083 (ppc64_elf_build_stubs): Build them here instead.
1084
1085 2002-09-24 Jakub Jelinek <jakub@redhat.com>
1086
1087 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
1088 addend into r_addend, not *r_offset.
1089 (elf32_sparc_finish_dynamic_symbol): Likewise.
1090 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
1091 R_SPARC_RELATIVE's r_offset.
1092
1093 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
1094
1095 * dwarf2.c (decode_line_info): Update to correctly decode
1096 the (non-standard DWARF2) out-of-order address sequences
1097 generated by the Intel C++ 6.0 compiler for ia64-Linux.
1098
1099 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
1100
1101 * config.bfd: For DJGPP targets, match with any cpu and any machine.
1102
1103 2002-09-23 Alan Modra <amodra@bigpond.net.au>
1104
1105 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
1106 for discarded FDEs. Remove redundant assignment.
1107 * elflink.h (elf_bfd_discard_info): Save edited relocs.
1108
1109 2002-09-22 H.J. Lu <hjl@gnu.org>
1110
1111 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
1112 the relocation count between different .reloc sections.
1113
1114 2002-09-21 Alan Modra <amodra@bigpond.net.au>
1115
1116 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
1117 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
1118 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
1119 R_PPC_EMB_RELSDA.
1120
1121 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
1122 unsigned. Move "symcount" assignment out of loop.
1123 * Makefile.am: Run "make dep-am".
1124 * Makefile.in: Regenerate.
1125 * configure: Regenerate.
1126 * po/SRC-POTFILES.in: Regnerate.
1127
1128 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
1129
1130 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
1131 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
1132 (e.g. IRIX64).
1133
1134 2002-09-19 Jakub Jelinek <jakub@redhat.com>
1135
1136 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
1137 even if generating R_PPC_RELATIVE reloc.
1138 (ppc_elf_relocate_section): Make sure relocation is performed
1139 if skip == -2. Clear memory at r_offset when creating dynamic
1140 relocation.
1141
1142 2002-09-19 Jakub Jelinek <jakub@redhat.com>
1143
1144 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
1145 BFD_RELOC_386_TLS_GOTIE): Add.
1146 * bfd-in2.h, libbfd.h: Rebuilt.
1147 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
1148 and R_386_TLS_GOTIE.
1149 (elf_i386_reloc_type_lookup): Handle it.
1150 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
1151 char instead of enum, change GOT_* into defines.
1152 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
1153 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1154 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
1155 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
1156 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
1157 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1158 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1159 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1160 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
1161 tls_type is GOT_TLS_IE_BOTH.
1162 (elf_i386_size_dynamic_sections): Likewise.
1163 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1164 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1165 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
1166 all 4 GOT_TLS_* TLS types.
1167
1168 2002-09-19 Nick Clifton <nickc@redhat.com>
1169
1170 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
1171 follow indirect links.
1172
1173 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
1174
1175 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
1176 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
1177 on 64 bit machines.
1178 (ecoff_swap_sym_in) <iss>: Likewise.
1179 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
1180 ECOFF information: 'ioptMax' refers to the actual *size*
1181 of the optimization symtab, not the number of entries.
1182
1183 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
1184
1185 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
1186 ELF_LINK_HASH_NEEDS_PLT logic.
1187
1188 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
1189
1190 * elfcode.h (elf_slurp_reloc_table_from_section): Check
1191 correct relocation count.
1192
1193 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
1194
1195 * bfd-in.h (bfd_get_dynamic_symcount): Define.
1196 * bfd.c (struct _bfd): Add dynsymcount.
1197 * bfd-in2.h: Regenerated.
1198 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
1199 abfd->dynsymcount.
1200 * elfcode.h (elf_slurp_reloc_table_from_section): Check
1201 for overflow.
1202
1203 2002-09-17 Stan Cox <scox@redhat.com>
1204
1205 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
1206 (mips_elf64_final_gp): Don't make up gp value.
1207 * elfn32-mips.c (mips_elf_final_gp): Likewise.
1208 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
1209 .MIPS.options/.options section.
1210
1211 2002-09-17 David O'Brien <obrien@FreeBSD.org>
1212
1213 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
1214 It is benign for FreeBSD < 4.1. Minor reformatting.
1215 * elf64-alpha-fbsd.c: Likewise.
1216
1217 2002-09-17 Jakub Jelinek <jakub@redhat.com>
1218
1219 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
1220 addend.
1221
1222 2002-09-17 Alan Modra <amodra@bigpond.net.au>
1223
1224 * elf64-alpha.c (alpha_elf_size_info): Make static.
1225
1226 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
1227
1228 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
1229 * cpu-tic4x.c: Ditto.
1230
1231 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1232
1233 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
1234 duplicate define.
1235
1236 2002-09-16 Bruno Haible <bruno@clisp.org>
1237
1238 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
1239 by a target variant implementation.
1240 * elf64-alpha.c: Likewise.
1241 * elf32-i386-fbsd.c: New file.
1242 * elf64-alpha-fbsd.c: New file.
1243 * targets.c: Support bfd_elf32_i386_freebsd_vec and
1244 bfd_elf64_alpha_freebsd_vec.
1245 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
1246 bfd_elf64_alpha_freebsd_vec.
1247 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
1248 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
1249 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
1250 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
1251 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
1252 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
1253 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
1254
1255 2002-09-12 Jakub Jelinek <jakub@redhat.com>
1256
1257 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
1258 NULL.
1259 (elf_i386_relocate_section): Return false after printing error about
1260 unresolvable relocation.
1261
1262 2002-09-12 Nick Clifton <nickc@redhat.com>
1263
1264 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
1265 R_ARM_THM_PC11.
1266
1267 2002-09-11 Jeffrey Law <law@redhat.com>
1268
1269 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
1270
1271 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
1272
1273 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
1274 line_ptr before deciding we've found a symbol.
1275
1276 2002-09-11 Nick Clifton <nickc@redhat.com>
1277
1278 * po/da.po: New Danish translation file.
1279 * configure.in (LINGUAS): Add 'da'.
1280 * configure: Regenerate.
1281
1282 2002-09-10 Michael Snyder <msnyder@redhat.com>
1283
1284 * irix-core.c (do_sections, do_sections64): New functions.
1285 (irix_core_core_file_p): Call new functions do_sections,
1286 do_sections64, depending on corefile (32-bit or 64-bit).
1287
1288 2002-09-09 Richard Henderson <rth@redhat.com>
1289
1290 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
1291 and PCREL21F like PCREL21B.
1292
1293 2002-09-04 Kevin Buettner <kevinb@redhat.com>
1294
1295 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
1296 vector.
1297
1298 2002-09-02 Nick Clifton <nickc@redhat.com>
1299
1300 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
1301 names instead of cryptically overloaded bfd_reloc error
1302 codes.
1303 (v850_elf_relocate_section): Likewise.
1304 (v850_elf_relax_section): Replace caching of external symbols
1305 with caching of internal symbols obtained from calling
1306 bfd_elf_get_elf_syms().
1307 Fixup problems with freeing cached allocated memory blocks.
1308
1309 2002-09-02 Alan Modra <amodra@bigpond.net.au>
1310
1311 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
1312 (bfd_pj_arch): Use bfd_default_scan.
1313 * cpu-v850.c (scan): Remove.
1314 (N): Use bfd_default_scan.
1315 * cpu-z8k.c (scan_mach): Remove.
1316 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
1317 first. Use bfd_default_scan.
1318
1319 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
1320 bfd_mach constants.
1321 (ecoff_get_magic): Likewise.
1322 * elf32-v850.c (v850_elf_object_p): Likewise.
1323 (v850_elf_final_write_processing): Likewise.
1324 * mipsbsd.c (MY(set_arch_mach)): Likewise.
1325 (MY(write_object_contents)): Likewise.
1326 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
1327 * coffcode.h (coff_write_object_contents): Likewise.
1328 (coff_set_arch_mach_hook): Add comment describing machine == 0.
1329 Remove unnecessary "machine" assignments.
1330 (coff_write_relocs): Test for the absolute section sym by testing
1331 section and flags.
1332
1333 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
1334 and bfd_mach_i386_i386_intel_syntax.
1335 * pdp11.c (NAME(aout,machine_type)): Likewise.
1336
1337 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
1338
1339 * bfd-in.h (align_power): Cast constants to bfd_vma type.
1340 * bfd-in2.h (align_power): Likewise.
1341
1342 2002-08-30 Alan Modra <amodra@bigpond.net.au>
1343
1344 * Makefile.am: Run "make dep-am".
1345 * Makefile.in: Regenerate.
1346
1347 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
1348 * cpu-powerpc.c (powerpc_compatible): Likewise.
1349 * cpu-rs6000.c (rs6000_compatible): Likewise.
1350
1351 2002-08-28 Catherine Moore <clm@redhat.com>
1352
1353 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
1354 (v850-elf-reloc): Don't resolve pc relative relocs.
1355 (v850_elf_ignore_reloc): New routine.
1356 (v850_elf_final_link_relocate): Handle new relocs.
1357 (v850_elf_relax_delete_bytes ): New routine.
1358 (v850_elf_relax_section): New routine.
1359 (bfd_elf32_bfd_relax_section): Define.
1360 (HOWTO): New entries for new relocs.
1361 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
1362 (BFD_RELOC_V850_LONGJUMP): New reloc.
1363 (BFD_RELOC_V850_ALIGN): New reloc.
1364 * archures.c: Remove redundant v850ea architecture.
1365 * cpu-v850.c: Remove redundant v850ea support.
1366 * libbfd.h: Regenerate.
1367 * bfd-in2.h: Regenerated.
1368
1369 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
1370
1371 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
1372 * configure.in: Add tic4x_coff vector files.
1373 * configure: Regenerate.
1374 * Makefile.am: Add tic4x target.
1375 * Makefile.in: Regenerate.
1376
1377 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
1378
1379 * archures.c: Add the BFD arch type tic4x.
1380 * bfd-in.h: Add BFD_IN_MEMORY flag.
1381 * coff-tic4x.c: New file.
1382 * coffswap.h (coff_swap_sym_out): Add preadjuster.
1383 * cpu-tic4x.c: New file.
1384 * targets.c: Added tic4x- in list of xvecs.
1385 * ticoff.h: New file.
1386 * bfd-in2.h: Regenerate.
1387
1388 2002-08-27 Adam Nemet <anemet@lnxw.com>
1389
1390 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
1391 bit of DT_INIT and DT_FINI for Thumb functions.
1392
1393 2002-08-26 Alan Modra <amodra@bigpond.net.au>
1394
1395 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
1396
1397 2002-08-26 Alan Modra <amodra@bigpond.net.au>
1398
1399 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
1400
1401 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1402
1403 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
1404 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
1405 Likewise.
1406 (struct elf_sh_pcrel_relocs_copied): Removed.
1407 (struct elf_sh_dyn_relocs): New.
1408 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
1409 field with dyn_relocs.
1410 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
1411 sections and sym_sec.
1412 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
1413 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
1414 (sh_elf_create_dynamic_sections): Use create_got_section instead
1415 of _bfd_elf_create_got_section.
1416 (sh_elf_check_relocs): Likewise.
1417 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
1418 sections.
1419 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
1420 sh_elf_relocate_section, sh_elf_check_relocs,
1421 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
1422 Likewise.
1423 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
1424 dynamic relocations and avoiding the copy relocation when we
1425 didn't find any dynamic relocations in the section which has
1426 contents or is read-only.
1427 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1428 (sh_elf_size_dynamic_sections): Don't reset the size of
1429 .rela.got section even if dynamic_sections_created flag is off.
1430 Don't use sh_elf_discard_copies. Scan all input bfd and use
1431 allocate_dynrelocs. Call readonly_dynrelocs to determine
1432 whether we need DT_TEXTREL.
1433 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
1434 whether the symbol was never referred to.
1435 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
1436 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
1437 (sh_elf_check_relocs): Call create_got_section if the short-cut
1438 to .got is null. Increment reference counters only instead of
1439 allocating space on dynamic sections here. Don't conditionalize
1440 uninitialized got.offset value when marking the symbol as a
1441 global offset table entry. Keep relocations for symbols satisfied
1442 by a dynamic library to avoid copy relocations for the symbol.
1443 Set dynobj field of an elf hash table if needed.
1444 (sh_elf_finish_dynamic_sections): Handle null section pointer
1445 correctly.
1446 (elf_backend_copy_indirect_symbol): Defined.
1447 (elf_backend_can_refcount): Defined.
1448
1449 2002-08-23 Nick Clifton <nickc@redhat.com>
1450
1451 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
1452 previous change. Add comment explaining why.
1453
1454 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
1455
1456 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
1457 contents of .got.plt[2] to tr0, not address of .got.plt.
1458 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
1459 patching absolute plt entry. For shmedia plt entry, set bottom bit
1460 of branch to plt0 as this is a branch to an shmedia instruction.
1461 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
1462 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
1463 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
1464 branch to plt0.
1465 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
1466 patching absolute plt entry. For shmedia plt entry, branch to
1467 plt0 is now ptrel, so use relative offset. Set bottom bit of
1468 branch target as it is a branch to an shmedia instruction.
1469
1470 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
1471 Richard Shann <richard.shann@superh.com>
1472
1473 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
1474 value if .init is an SHmedia function. Similarly for DT_FINI.
1475 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
1476
1477 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
1478
1479 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
1480 dynamic section.
1481 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1482
1483 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1484
1485 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
1486 byte read when reading the return address register column.
1487
1488 2002-08-22 Nick Clifton <nickc@redhat.com>
1489
1490 * config.bfd: Add powepc64-*-*bsd* target.
1491
1492 2002-08-22 Graeme Peterson <gp@qnx.com>
1493
1494 * Makefile.am: Add entries for elf32-shqnx.c
1495 * Makefile.in: Regenerate.
1496 * config.bfd: Add support sh-*-nto* target.
1497 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
1498 * configure: Regenerate.
1499 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
1500 * elf32-sh.c: Do not include elf32-target.h if
1501 ELF32_SH_C_INCLUDED is defined.
1502 * elf32-shqnx.c: New file: Support for QNX.
1503 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
1504
1505 2002-08-22 Nick Clifton <nickc@redhat.com>
1506
1507 * po/tr.po: Updated Turkish translation.
1508
1509 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
1510 symbols are not read.
1511
1512 2002-08-22 Alan Modra <amodra@bigpond.net.au>
1513
1514 * elf32-m68hc11.c: Formatting fixes.
1515 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
1516 * elf32-m68hc12.c: Formatting fixes.
1517 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
1518
1519 2002-08-22 Alan Modra <amodra@bigpond.net.au>
1520
1521 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
1522 SEC_DATA.
1523 (pmac_xcoff_vec): Likewise.
1524 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1525 (aix5coff64_vec): Likewise.
1526
1527 2002-08-22 Alan Modra <amodra@bigpond.net.au>
1528
1529 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
1530 param to elf_backend_copy_indirect_symbol.
1531 (_bfd_elf_link_hash_copy_indirect): Likewise.
1532 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
1533 calls to copy_indirect_symbol.
1534 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1535 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1536 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1537 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1538 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1539 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
1540 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1541 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1542 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1543 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
1544 test refcounts for "used" values.
1545
1546 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
1547
1548 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
1549 argument declaration.
1550
1551 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
1552
1553 * archures.c (bfd_mach_ppc_e500): Added.
1554 * bfd-in2.h: Rebuilt.
1555 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
1556
1557 2002-08-19 Alan Modra <amodra@bigpond.net.au>
1558
1559 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
1560
1561 2002-08-17 Andrew Cagney <ac131313@redhat.com>
1562
1563 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
1564 `bfd_byte'.
1565
1566 2002-08-17 Stan Cox <scox@redhat.com>
1567
1568 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
1569 IRIX 6 segment layout for NEWABI.
1570
1571 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
1572
1573 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
1574 symbols when looking for section referred to by a relocation.
1575 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
1576
1577 2002-08-15 Alan Modra <amodra@bigpond.net.au>
1578
1579 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
1580
1581 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
1582
1583 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
1584 missing check for whether the symbol is referenced by DSO before
1585 unexporting it as an unneeded dynamic symbol.
1586
1587 2002-08-14 H.J. Lu <hjl@gnu.org>
1588
1589 * libbfd.h: Regenerate.
1590
1591 2002-08-14 H.J. Lu <hjl@gnu.org>
1592
1593 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
1594
1595 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
1596
1597 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
1598 instructions.
1599 (m68hc11_direct_relax): New to define table of relaxable instructions.
1600 (find_relaxable_insn): New, find a relaxable insn.
1601 (compare_reloc): New to compare two relocs.
1602 (m68hc11_elf_relax_section): New, relax text sections.
1603 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
1604 (elf32_m68hc11_check_relocs): New function for GC support.
1605 (elf32_m68hc11_relocate_section): New function for GC support.
1606 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
1607 (elf_backend_check_relocs): Likewise.
1608 (elf_backend_relocate_section): Likewise.
1609
1610 2002-08-13 H.J. Lu <hjl@gnu.org>
1611
1612 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
1613 definitions in shared objects when checking symbol with
1614 undefined version.
1615
1616 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1617
1618 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
1619 (elf32_m68hc11_gc_sweep_hook): Likewise.
1620 (elf_backend_gc_mark_hook): Define for GC section support.
1621 (elf_backend_gc_sweep_hook): Likewise.
1622 (elf_backend_can_gc_sections): Likewise.
1623
1624 * elf32-m68hc12.c: Likewise.
1625
1626 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1627
1628 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
1629 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
1630 (_bfd_m68hc11_elf_set_private_flags): New function.
1631 Use them to set/check/print ELF flags specific to 68HC11.
1632
1633 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
1634 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
1635 (_bfd_m68hc12_elf_set_private_flags): New function.
1636 Use them to set/check/print ELF flags specific to 68HC12.
1637
1638 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1639
1640 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
1641 fix masks for PC-rel relocs.
1642 (m68hc11_elf_ignore_reloc): New function.
1643
1644 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
1645 68HC12 banked addressing relocs.
1646 (m68hc12_phys_addr): New to compute physical address of banked memory.
1647 (m68hc12_phys_page): Likewise for page.
1648 (m68hc12_addr_is_banked): New to see if address is in banked area.
1649 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
1650
1651 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1652
1653 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
1654 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
1655 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
1656 * bfd-in2.h: Regenerate.
1657
1658 2002-08-12 H.J. Lu <hjl@gnu.org>
1659
1660 * elflink.h (elf_add_default_symbol): Preserve section across
1661 elf_merge_symbol.
1662
1663 2002-08-09 Graeme Peterson <gp@qnx.com>
1664
1665 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
1666 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
1667 * Makefile.in: Regenerate.
1668 * config.bfd: Add support for powerpc{le}-*-nto targets.
1669 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
1670 * configure: Regenerate.
1671 * elf32-i386qnx.c: Moved backend functions into a QNX specific
1672 common file "elf32-qnx.h", and now include that file.
1673 * elf32-qnx.h: New file: QNX specific common elf backend.
1674 * elf32-ppc.c: Do not include elf32-target.h if
1675 ELF32_PPC_C_INCLUDED is defined.
1676 * elf32-ppcqnx.c: New file: Support for QNX.
1677 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
1678 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
1679
1680 2002-08-09 Nick Clifton <nickc@redhat.com>
1681
1682 * po/sv.po: Updated Swedish translation.
1683
1684 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1685
1686 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
1687 g->global_gotsym is NULL.
1688
1689 2002-08-08 H.J. Lu <hjl@gnu.org>
1690
1691 * elflink.h (elf_add_default_symbol): Don't warn if a definition
1692 overrides an indirect versioned symbol.
1693
1694 2002-08-08 Jakub Jelinek <jakub@redhat.com>
1695
1696 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
1697 for R_386_TLS_TPOFF32 relocs against symndx 0.
1698
1699 2002-08-07 H.J. Lu <hjl@gnu.org>
1700
1701 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
1702 with undefined version if needed.
1703 (elf_link_assign_sym_version): Match a default symbol with a
1704 version without definition. No need to hide the default
1705 definition separately.
1706
1707 2002-08-08 Alan Modra <amodra@bigpond.net.au>
1708
1709 * elflink.h (elf_link_output_extsym): Don't output symbols from
1710 SEC_EXCLUDE sections.
1711
1712 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
1713
1714 2002-08-07 Alan Modra <amodra@bigpond.net.au>
1715
1716 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
1717 entries.
1718
1719 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1720
1721 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
1722 mismatch.
1723
1724 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1725
1726 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
1727
1728 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1729
1730 * elf32-mips.c (mips_reloc_map): Fix typo.
1731
1732 2002-08-06 Alan Modra <amodra@bigpond.net.au>
1733
1734 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
1735
1736 2002-08-06 Alan Modra <amodra@bigpond.net.au>
1737
1738 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
1739
1740 2002-08-06 Alan Modra <amodra@bigpond.net.au>
1741
1742 * libxcoff.h: Use PARAMS on function declarations.
1743 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
1744 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1745
1746 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
1747 addend.
1748 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
1749
1750 2002-08-06 Alan Modra <amodra@bigpond.net.au>
1751
1752 * coff-rs6000.c: Formatting fixes.
1753 (xcoff_calculate_relocation): Use PARAMS in declaration.
1754 (xcoff_complain_overflow): Likewise.
1755 (xcoff_ppc_relocate_section): Use old-style function pointer call.
1756 (bfd_xcoff_backend_data): Remove useless comments.
1757 (rs6000coff_vec): Likewise.
1758 (bfd_pmac_xcoff_backend_data): Likewise.
1759 (pmac_xcoff_vec): Likewise.
1760
1761 * coff64-rs6000.c: Formatting fixes.
1762 (xcoff64_calculate_relocation): Use PARAMS in declaration.
1763 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
1764 (bfd_xcoff_backend_data): Remove useless comments.
1765 (rs6000coff64_vec): Likewise.
1766 (bfd_xcoff_aix5_backend_data): Likewise.
1767 (aix5coff64_vec): Likewise.
1768
1769 2002-08-06 Alan Modra <amodra@bigpond.net.au>
1770
1771 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
1772 mask entries. Use complain_overflow_dont for R_REF.
1773 (xcoff_reloc_type_ba): Revert last change.
1774 (xcoff_reloc_type_br): Likewise.
1775 (xcoff_reloc_type_crel): Likewise.
1776 (xcoff_ppc_relocate_section): Likewise.
1777 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
1778 (xcoff64_ppc_relocate_section): Likewise.
1779 (xcoff64_howto_table): Revert some of last change to mask entries.
1780 Use complain_overflow_dont for R_REF.
1781
1782 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
1783 relocs with bitsize == 16 have size = 1.
1784 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
1785 (xcoff_reloc_type_br): Likewise.
1786 (xcoff_reloc_type_crel): Likewise.
1787 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1788 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
1789 dst_mask adjustment.
1790 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1791 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
1792 bitsize == 16 have size = 1.
1793
1794 2002-08-01 Denis Chertykov <denisc@overta.ru>
1795
1796 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
1797 (struct misc): New field isymbuf. All free_* fields removed.
1798 (symbol_value): Pass in internal syms. No need to swap syms in.
1799 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
1800 possibly cached info.
1801 (tidyup_after_error): Removed.
1802 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
1803 misc. Use new field.
1804 (adjust_all_relocations): Use internal syms. No need to swap syms
1805 in and out.
1806 (add_page_insn): Don't use removed fields of struct misc.
1807
1808 2002-08-01 Nick Clifton <nickc@redhat.com>
1809
1810 * elf32-arm.h: Revert previous delta.
1811
1812 2002-08-01 Nick Clifton <nickc@redhat.com>
1813
1814 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
1815 * configure: Regenerate.
1816
1817 2002-07-31 H.J. Lu <hjl@gnu.org>
1818
1819 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
1820 selected.
1821
1822 2002-07-31 H.J. Lu <hjl@gnu.org>
1823
1824 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
1825 is selected.
1826
1827 2002-07-31 Jakub Jelinek <jakub@redhat.com>
1828
1829 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
1830 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
1831
1832 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1833
1834 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
1835 There is no 8 byte relocation type for this architecture.
1836 (do_ns32k_reloc): Use bfd_vma instead of native types.
1837 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
1838 returns void.
1839 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
1840 rely on generic code to do that.
1841 * aout-ns32k.c (howto_table): Add appropriate overflow detection
1842 to all table entries.
1843 (_bfd_ns32k_relocate_contents): put_data returns void.
1844 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
1845 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
1846 return void.
1847
1848 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1849
1850 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
1851 archive object is target dependant.
1852
1853 2002-07-31 Adam Nemet <anemet@lnxw.com>
1854
1855 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
1856 (THUMB_PLT_ENTRY_SIZE): New macro.
1857 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
1858 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
1859 ARM_PLT_ENTRY_SIZE.
1860 (elf32_arm_plt_entry): Likewise.
1861 (elf_backend_plt_header_size): Likewise.
1862 (elf32_thumb_plt0_entry): New global.
1863 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
1864 into .plt.thumb.
1865 (elf32_thumb_plt_entry): New global.
1866 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
1867 Thumb entries. Set the bottom bit of the corresponding GOT entry
1868 for a Thumb PLT entry.
1869 (struct elf32_arm_plt_entry_info): New structure.
1870 (struct elf32_arm_link_hash_entry, plt_info): New member of this
1871 type.
1872 (elf32_arm_link_hash_newfunc): Initialize new member.
1873 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
1874 relocations against the PLT.
1875 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
1876 first_rel_type if this is the first time we encounter the symbol.
1877 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
1878 Determine if relocation needs a PLT entry. Set first_rel_type if
1879 this is the first time we encounter the symbol
1880 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
1881 functions as well.
1882 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
1883 (elf32_arm_create_dynamic_sections): New function. Create the
1884 .plt.thumb section.
1885 (elf_backend_create_dynamic_sections): Call it.
1886
1887 2002-07-31 Nick Clifton <nickc@redhat.com>
1888
1889 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
1890 'alternative' in order to avoid shadowing global symbol of the
1891 same name.
1892 * bfd-in2.h: Regenerate.
1893 * libbfd.h: Regenerate.
1894 * libcoff.h: Regenerate.
1895
1896 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1897
1898 * Makefile.am: Add n32 ABI support.
1899 * Makefile.in: Regenerate.
1900 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
1901 bit vectors for mips*-*-linux targets as optional.
1902 * configure.in: Add n32 ABI vectors.
1903 * configure: Regenerate.
1904 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
1905 * elfn32-mips.c: New file, n32 ABI support.
1906 * targets.c: Add n32 ABI vectors.
1907
1908 2002-07-30 Graeme Peterson <gp@qnx.com>
1909
1910 * elfarmqnx-nabi.c: New file: Support for QNX.
1911 * config.bfd: Add support for arm-*-nto target.
1912 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
1913 * configure: Regenerate.
1914 * Makefile.am: Add entries for elfarmqnx-nabi.c.
1915 * Makefile.in: Regenerate.
1916 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
1917 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
1918 * elfarm-nabi.c: Do not include elf32-arm.h if
1919 ELFARM_NABI_C_INCLUDED is defined.
1920 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
1921
1922 2002-07-30 Nick Clifton <nickc@redhat.com>
1923
1924 * po/sv.po: Updated Swedish translation.
1925
1926 2002-07-30 Jakub Jelinek <jakub@redhat.com>
1927
1928 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
1929
1930 2002-07-30 Alan Modra <amodra@bigpond.net.au>
1931
1932 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
1933 * archive.c (bfd_generic_archive_p): Likewise.
1934 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
1935 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
1936 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1937 (xcoff64_archive_p): Likewise.
1938 (xcoff64_openr_next_archived_file): Likewise.
1939 (xcoff64_archive_p): Clean up tdata properly on error.
1940 * coffgen.c (coff_real_object_p): Likewise.
1941 (coff_object_p): Release filehdr and opthdr.
1942 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
1943 * ieee.c (ieee_archive_p): Likewise.
1944 * ihex.c (ihex_object_p): Likewise.
1945 (ihex_mkobject): Always allocate tdata.
1946 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
1947 * srec.c (srec_mkobject): Always allocate tdata.
1948 (srec_object_p): Clean up tdata properly on error.
1949 (symbolsrec_object_p): Likewise.
1950 * versados.c (versados_object_p): Likewise.
1951 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
1952 and bfd_realloc instead of realloc.
1953 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
1954 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
1955 place of bfd_malloc, simplifying error freeing. Free hash table too.
1956 (vms_object_p): Clean up tdata on error.
1957 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
1958 (vms_close_and_cleanup): Adjust for bfd_alloc use.
1959
1960 2002-07-30 Alan Modra <amodra@bigpond.net.au>
1961
1962 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
1963
1964 2002-07-26 Chris Demetriou <cgd@broadcom.com>
1965
1966 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
1967 flags into resulting BFD.
1968
1969 2002-07-26 Alan Modra <amodra@bigpond.net.au>
1970
1971 From John Reiser <jreiser@BitWagon.com>
1972 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
1973 tls_ldm_got.refcount.
1974
1975 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1976
1977 * elf64-mips.c: Update TODO comment.
1978 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
1979 mips_elf64_gprel16_reloca): Remove prototypes.
1980 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
1981 (UNUSED_RELOC): Replace by EMPTY_RELOC.
1982 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
1983 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
1984 R_MIPS_HIGHEST.
1985 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
1986 R_MIPS_GOT16. Remove wrong comments.
1987 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
1988 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
1989 from elf32-mips.c.
1990 (mips_elf64_hi16_reloc): Fix formatting.
1991 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
1992 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
1993 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
1994 (mips_elf64_gprel16_reloc): Make static. Add check for
1995 partial_inplace.
1996 (mips_elf64_gprel16_reloca): Remove.
1997 (mips_elf64_literal_reloc): New function.
1998 (mips_elf64_gprel32_reloc): Fix formatting.
1999 (mips_elf64_shift6_reloc): Fix comment. Make static.
2000 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
2001 elf32-mips.c.
2002 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
2003 elf32-mips.c
2004 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
2005 specific relocations.
2006 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
2007 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
2008 (ELF_MAXPAGESIZE): Add comment.
2009
2010 2002-07-25 Nick Clifton <nickc@redhat.com>
2011
2012 * po/sv.po: Updated Swedish translation.
2013 * po/es.po: Updated Spanish translation.
2014 * po/fr.po: Updated French translation.
2015
2016 2002-07-25 Alan Modra <amodra@bigpond.net.au>
2017
2018 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
2019 as elf_link_record_local_dynamic_symbol.
2020 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
2021 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
2022 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
2023 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
2024 attempt is made to record a symbol in a discarded section, and
2025 return `2' in that case.
2026
2027 2002-07-24 Nick Clifton <nickc@redhat.com>
2028
2029 * po/sv.po: Updated Swedish translation.
2030 * po/es.po: Updated Spanish translation.
2031
2032 2002-07-23 Alan Modra <amodra@bigpond.net.au>
2033
2034 * po/SRC-POTFILES.in: Regenerate.
2035
2036 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
2037 immediately. Remove code handling relocatable linking.
2038 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2039 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2040 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
2041 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2042 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2043 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2044 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2045 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2046 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2047 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2048 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2049 * elf32-avr.c (elf_backend_rela_normal): Define.
2050 * elf32-cris.c: Likewise.
2051 * elf32-fr30.c: Likewise.
2052 * elf32-frv.c: Likewise.
2053 * elf32-h8300.c: Likewise.
2054 * elf32-hppa.c: Likewise.
2055 * elf32-ip2k.c: Likewise.
2056 * elf32-sparc.c: Likewise.
2057 * elf32-v850.c: Likewise.
2058 * elf32-vax.c: Likewise.
2059 * elf64-hppa.c: Likewise.
2060 * elf64-sparc.c: Likewise.
2061 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
2062 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2063 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2064 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2065 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2066 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2067 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2068 * elf-m10200.c (USE_RELA): Don't define.
2069 * elf-m10300.c: Likewise.
2070 * elfarm-oabi.c: Likewise.
2071 * elf32-i370.c: Likewise.
2072 * elf32-ip2k.c: Likewise.
2073 * elf32-m68k.c: Likewise.
2074 * elf32-mcore.c: Likewise.
2075 * elf32-ppc.c: Likewise.
2076 * elf32-s390.c: Likewise.
2077 * elf32-vax.c: Likewise.
2078 * elf64-ppc.c: Likewise.
2079 * elf64-s390.c: Likewise.
2080 * elf64-x86-64.c: Likewise.
2081 * elfxx-ia64.c: Likewise.
2082 * elf32-avr.c (USE_REL): Don't undef.
2083 * elf32-ip2k.c: Likewise.
2084
2085 2002-07-23 Nick Clifton <nickc@redhat.com>
2086
2087 * elf-bfd.h (struct elf_backend_data): Add new bitfield
2088 'want_p_paddr_set_to_zero'.
2089 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
2090 to false;
2091 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
2092 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
2093
2094 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
2095
2096 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
2097 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
2098 show the Copyright string.
2099 Minor formatting tidy ups.
2100
2101 2002-07-23 Nick Clifton <nickc@redhat.com>
2102
2103 * po/fr.po: Updated French translation.
2104 * po/sv.po: Updated Swedish translation.
2105
2106 2002-07-23 Alan Modra <amodra@bigpond.net.au>
2107
2108 * elflink.h (elf_link_input_bfd): Don't change internal symbols
2109 when outputting relocs.
2110
2111 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
2112
2113 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
2114 DT_PLTGOT into the dynamic section if there is a PLT.
2115
2116 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2117
2118 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
2119 elf32-mips.c.
2120 (_bfd_mips_elf_write_section): Likewise.
2121 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
2122 (_bfd_mips_elf_write_section): Likewise.
2123 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
2124 (elf32_mips_write_section): Likewise.
2125 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
2126 (_bfd_mips_elf_write_section): Likewise.
2127
2128 2002-07-19 Alan Modra <amodra@bigpond.net.au>
2129
2130 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
2131 PT_IA_64_UNWIND segments for a given section.
2132
2133 2002-07-17 H.J. Lu <hjl@gnu.org>
2134
2135 * Makefile.am: Fix a typo.
2136 * Makefile.in: Regenerate.
2137
2138 2002-07-15 Denis Chertykov <denisc@overta.ru>
2139 Frank Ch. Eigler <fche@redhat.com>
2140 Ben Elliston <bje@redhat.com>
2141 Alan Lehotsky <alehotsky@cygnus.com>
2142 John Healy <jhealy@redhat.com>
2143 Graham Stott <grahams@redhat.com>
2144 Jeff Johnston <jjohnstn@redhat.com>
2145
2146 * Makefile.am: Add support for ip2k.
2147 * Makefile.in: Regenerate.
2148 * doc/Makefile.in: Regenerate.
2149 * archures.c: Add support for ip2k.
2150 * config.bfd: Add support for ip2k.
2151 * configure.in: Add support for ip2k.
2152 * configure: Regenerate.
2153 * reloc.c: Add support for ip2k.
2154 * targets.c: Add support for ip2k.
2155 * bfd-in2.h: Regenerate.
2156 * libbfd.h: Regenerate.
2157 * cpu-ip2k.c: New file.
2158 * elf32-ip2k.c: New file.
2159
2160 2002-07-17 Ian Rickards <irickard@arm.com>
2161
2162 * dwarf2.c (concat_filename): If we can't establish the directory
2163 just return the filename.
2164
2165 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
2166
2167 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
2168
2169 2002-07-16 Alan Modra <amodra@bigpond.net.au>
2170
2171 * elflink.h: Formatting fixes, tidy prototypes.
2172 (elf_link_assign_sym_version): Move common code out of loop.
2173
2174 2002-07-16 Alan Modra <amodra@bigpond.net.au>
2175
2176 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
2177 reloc section size is zero. Correct reloc output location.
2178
2179 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
2180
2181 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
2182 the final type for the e_fsel selector when generating PA2.0W code.
2183 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
2184 relocations.
2185
2186 2002-07-14 H.J. Lu <hjl@gnu.org>
2187
2188 * elflink.h (elf_link_assign_sym_version): Hide the default
2189 definition if there is a hidden versioned definition.
2190
2191 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
2192
2193 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
2194 dynamic reference test in assertion when initializing GOT with
2195 static contents. Just assert that there are either no dynamic
2196 sections, the symbol is defined in the regular objects or that the
2197 symbol is undef weak. Tweak comment.
2198 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
2199 only if the symbol isn't defined in the program and isn't undef
2200 weak.
2201 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
2202 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
2203 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
2204 (elf_cris_discard_excess_program_dynamics): Don't consider
2205 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
2206
2207 2002-07-11 Alan Modra <amodra@bigpond.net.au>
2208
2209 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
2210 unresolved debugging relocs in dynamic applications.
2211 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2212 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2213 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2214 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2215 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2216 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2217
2218 2002-07-10 Alan Modra <amodra@bigpond.net.au>
2219
2220 * elf64-ppc.c (ONES): Define.
2221 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
2222 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
2223 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
2224
2225 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
2226 (ppc64_elf_set_private_flags): Delete.
2227 (ppc64_elf_section_from_shdr): Delete.
2228 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
2229 (ppc64_elf_fake_sections): Delete.
2230 (bfd_elf64_bfd_set_private_flags): Don't define.
2231 (bfd_elf64_get_symbol_info): Likewise.
2232 (elf_backend_section_from_shdr): Likewise.
2233 (elf_backend_fake_sections): Likewise.
2234
2235 2002-07-10 Marco Walther <Marco.Walther@sun.com>
2236
2237 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
2238 when not already set.
2239 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
2240 (elf_backend_fake_sections): Define.
2241
2242 2002-07-10 Alan Modra <amodra@bigpond.net.au>
2243
2244 * merge.c (_bfd_merge_section): Remove redundant output_section check.
2245 Formatting.
2246 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
2247
2248 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
2249
2250 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
2251 NULL sym_hashes to just before use.
2252 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
2253 symbol with non-default visibility.
2254 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
2255 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2256 Ditto.
2257 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
2258 symbol with non-default visibility.
2259 (cris_elf_check_relocs): At tests for local symbol before
2260 increasing h->plt.refcount, also check for non-default
2261 visibility. Ditto when checking for local symbol to eliminate
2262 pc-relative runtime relocs.
2263
2264 2002-07-08 Alan Modra <amodra@bigpond.net.au>
2265
2266 * elf.c: Formatting.
2267 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
2268 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
2269 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
2270 segments.
2271
2272 2002-07-07 Mark Mitchell <mark@codesourcery.com>
2273 Alan Modra <amodra@bigpond.net.au>
2274
2275 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
2276 account the impact of relocation count overflow when computing
2277 section offsets.
2278 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
2279 or not to apply the PE COFF reloc overflow handling. Fix a
2280 fencepost error in deciding whether or not to use that technique.
2281
2282 2002-07-07 Alan Modra <amodra@bigpond.net.au>
2283
2284 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
2285 change type of locsyms.
2286 (bfd_elf_get_elf_syms): Declare.
2287 * elf.c (bfd_elf_get_elf_syms): New function.
2288 (group_signature): Use bfd_elf_get_elf_syms.
2289 (bfd_section_from_r_symndx): Likewise.
2290 * elfcode.h (elf_slurp_symbol_table): Likewise.
2291 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2292 (elf_link_add_object_symbols): Likewise. Reorganise to increase
2293 locality of various data structures. Properly free internal relocs.
2294 (elf_bfd_final_link): Properly free internal relocs.
2295 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
2296 (elf_link_input_bfd): Likewise.
2297 (elf_gc_mark): Likewise. Properly free internal relocs.
2298 (elf_gc_sweep): Properly free internal relocs.
2299 (elf_reloc_symbol_deleted_p): No need to swap syms in.
2300 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
2301 internal relocs.
2302 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
2303 Properly free possibly cached info.
2304 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
2305 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
2306 symbol swapping code.
2307 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
2308 Properly free possibly cached info.
2309 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
2310 (mn10300_elf_relax_delete_bytes): Likewise.
2311 (mn10300_elf_symbol_address_p): Likewise.
2312 (mn10300_elf_get_relocated_section_contents): Likewise.
2313 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
2314 (elf32_h8_relax_delete_bytes): Likewise.
2315 (elf32_h8_symbol_address_p): Likewise.
2316 (elf32_h8_get_relocated_section_contents): Likewise.
2317 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
2318 (m32r_elf_relax_delete_bytes): Likewise.
2319 (m32r_elf_get_relocated_section_contents): Likewise.
2320 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
2321 elf_section_data to determine whether cached.
2322 (sh_elf_relax_section): As above for elf-m10200.c.
2323 (sh_elf_relax_delete_bytes): Likewise.
2324 (sh_elf_get_relocated_section_contents): Likewise.
2325 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
2326 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
2327 reading of local syms.
2328 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2329 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
2330 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
2331 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
2332 relocs.
2333 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
2334 free internal relocs and section contents. Don't read symbols.
2335 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
2336 (elf32_hppa_size_stubs): Don't free local syms.
2337 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
2338 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
2339 possibly cached info.
2340 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2341 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
2342 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
2343 all_local_syms.
2344 (get_local_syms): Delete function.
2345 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
2346 on exit.
2347 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
2348
2349 2002-07-05 Jim Wilson <wilson@redhat.com>
2350
2351 * syms.c (decode_section_type): New.
2352 (bfd_decode_symclass): Call decode_section_type.
2353
2354 2002-07-04 Jakub Jelinek <jakub@redhat.com>
2355
2356 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
2357 section content start.
2358 Reported by Michael Schumacher <mike@hightec-rt.com>.
2359
2360 2002-07-04 Alan Modra <amodra@bigpond.net.au>
2361
2362 * section.c (_bfd_strip_section_from_output): Remove unnecessary
2363 link order code. Don't actually remove the output section here;
2364 Just set a flag for the linker to do so.
2365 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
2366 sections when setting up output section dynsyms.
2367
2368 2002-07-04 Alan Modra <amodra@bigpond.net.au>
2369
2370 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
2371 fudge.
2372 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
2373 libs here instead.
2374
2375 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
2376
2377 * elf64-s390.c (create_got_section): Set .got section alignment to
2378 8 bytes.
2379 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
2380
2381 2002-07-02 Alan Modra <amodra@bigpond.net.au>
2382
2383 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
2384
2385 2002-07-01 Matt Thomas <matt@3am-software.com>
2386
2387 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
2388 to EF_VAX_*.
2389
2390 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2391
2392 * elfxx-mips.c (ABI_64_P): Fix comment.
2393 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
2394 new section names for N64 ABI.
2395 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
2396 (mips_elf_calculate_relocation): Code formatting.
2397 (mips_elf_create_dynamic_relocation): Likewise.
2398 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
2399 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
2400 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
2401 in any NewABI.
2402 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
2403 for NewABI.
2404 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
2405 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
2406 here, too.
2407
2408 2002-07-01 Andreas Schwab <schwab@suse.de>
2409
2410 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
2411 R_X86_64_64 to R_X86_64_RELATIVE.
2412
2413 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
2414
2415 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
2416 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
2417 Run "make dep-am".
2418 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
2419 host_aout_vec.
2420 * configure.in (vaxbsd_vec): Add.
2421 * targets.c (vaxbsd_vec): Add.
2422 * Makefile.in: Rebuild.
2423 * configure: Rebuild.
2424 * po/SRC-POTFILES.in: Rebuild.
2425
2426 2002-07-01 Alan Modra <amodra@bigpond.net.au>
2427
2428 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
2429 examining to gc_mark_hook, rather than the bfd.
2430 (elf_gc_sections): Adjust.
2431 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
2432 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
2433 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
2434 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
2435 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
2436 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
2437 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
2438 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
2439 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
2440 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
2441 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
2442 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
2443 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
2444 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
2445 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
2446 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
2447 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
2448 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
2449 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
2450 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
2451 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
2452 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
2453 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
2454 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2455 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
2456 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
2457 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
2458 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
2459 redundant local sym tests.
2460 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
2461 (link_hash_newfunc): Init is_entry.
2462 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
2463 (ppc64_elf_link_hash_table_create): Init all_local_syms.
2464 (create_linkage_sections): Use bfd_make_section_anyway rather than
2465 bfd_make_section.
2466 (ppc64_elf_mark_entry_syms): New function.
2467 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
2468 up opd entry to function section map.
2469 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
2470 relocs that reference the opd section.
2471 (edit_opd): New function.
2472 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
2473 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
2474 (get_local_syms): Do so here. Exit if we already have local syms.
2475 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
2476 read local syms on non-ELF input.
2477 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
2478 than duplicating it's function here. Adjust free of internal
2479 relocs to suit.
2480 (ppc64_elf_relocate_section): Adjust local syms in opd section.
2481 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
2482 * elf32-hppa.c (elf32_hppa_size_stubs): Call
2483 _bfd_elf32_link_read_relocs rather than duplicating it's function
2484 here. Adjust free of internal relocs to suit.
2485
2486 2002-07-01 Andreas Jaeger <aj@suse.de>
2487
2488 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
2489 are not allowed in shared libs code, enforce -fPIC.
2490
2491 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
2492
2493 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
2494 trailing zero-sequences when there's previous left-over data.
2495
2496 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
2497
2498 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
2499 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
2500 and opd_rel_sec in order for starting rela section. Check _raw_size.
2501 (elf_backend_reloc_type_class): Define.
2502
2503 2002-06-27 Kevin Buettner <kevinb@redhat.com>
2504
2505 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
2506 DWARF2 formats.
2507
2508 2002-06-27 Alan Modra <amodra@bigpond.net.au>
2509
2510 * cpu-powerpc.c: Comment on ordering of arch_info.
2511 * elf32-ppc.c (ppc_elf_object_p): New function.
2512 (elf_backend_object_p): Define.
2513 * elf64-ppc.c (ppc64_elf_object_p): New function.
2514 (elf_backend_object_p): Define.
2515
2516 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
2517
2518 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
2519 * configure: Regenerate.
2520
2521 2002-06-25 Jason Eckhardt <jle@rice.edu>
2522
2523 * dwarf2.c (decode_line_info): Check unit->addr_size
2524 to read in the proper number of prologue bytes.
2525
2526 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
2527
2528 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
2529 aix5coff64_vec if 64-bit bfd support has been enabled.
2530 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
2531 been enabled.
2532
2533 * targets.c (_bfd_target_vector[]): Only include
2534 aix5coff64_vec if 64-bit bfd support has been enabled.
2535
2536 2002-06-25 Alan Modra <amodra@bigpond.net.au>
2537
2538 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
2539 * elf32-hppa.c (hppa_add_stub): Likewise.
2540 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2541 * elflink.h (elf_add_default_symbol): Fix comment typo.
2542 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
2543 (elf_link_add_object_symbols): Likewise.
2544 (elf_link_assign_sym_version): Likewise.
2545 * hash.c (bfd_hash_lookup): Likewise.
2546 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2547 * section.c (bfd_get_unique_section_name): Likewise.
2548 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2549 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
2550 (assign_section_numbers): Likewise.
2551 (_bfd_elfcore_make_pseudosection): Likewise.
2552 (elfcore_grok_lwpstatus): Likewise.
2553 (elfcore_grok_win32pstatus): Likewise.
2554 (elfcore_write_note): Constify input params. Use PTR instead of
2555 void *. Include terminating NUL in namesz. Correct padding.
2556 Support NULL "name" param. Use memcpy instead of strcpy.
2557 (elfcore_write_prpsinfo): Constify input params.
2558 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
2559 (elfcore_write_lwpstatus): Likewise.
2560 (elfcore_write_pstatus): Likewise.
2561 (elfcore_write_prfpreg): Likewise.
2562 (elfcore_write_prxfpreg): Likewise.
2563 * elf-bfd.h (elfcore_write_note): Update declaration.
2564 (elfcore_write_prpsinfo): Likewise.
2565 (elfcore_write_prstatus): Likewise.
2566 (elfcore_write_pstatus): Likewise.
2567 (elfcore_write_prfpreg): Likewise.
2568 (elfcore_write_prxfpreg): Likewise.
2569 (elfcore_write_lwpstatus): Likewise.
2570
2571 2002-06-25 Jason Eckhardt <jle@rice.edu>
2572
2573 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
2574 symbols of type stProc and stStaticProc.
2575
2576 2002-06-25 Nick Clifton <nickc@redhat.com>
2577
2578 * ecoff.c: VArious formatting fixes.
2579
2580 2002-06-25 Alan Modra <amodra@bigpond.net.au>
2581
2582 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
2583
2584 2002-06-25 Alan Modra <amodra@bigpond.net.au>
2585
2586 * aout-adobe.c: Don't compare against "true" or "false.
2587 * aout-target.h: Likewise.
2588 * aoutx.h: Likewise.
2589 * archive.c: Likewise.
2590 * bout.c: Likewise.
2591 * cache.c: Likewise.
2592 * coff-a29k.c: Likewise.
2593 * coff-alpha.c: Likewise.
2594 * coff-i386.c: Likewise.
2595 * coff-mips.c: Likewise.
2596 * coff-or32.c: Likewise.
2597 * coff64-rs6000.c: Likewise.
2598 * coffcode.h: Likewise.
2599 * coffgen.c: Likewise.
2600 * cpu-ns32k.c: Likewise.
2601 * ecoff.c: Likewise.
2602 * ecofflink.c: Likewise.
2603 * elf.c: Likewise.
2604 * elf32-arm.h: Likewise.
2605 * elf32-cris.c: Likewise.
2606 * elf32-d30v.c: Likewise.
2607 * elf32-i386.c: Likewise.
2608 * elf32-mcore.c: Likewise.
2609 * elf32-ppc.c: Likewise.
2610 * elf32-sh.c: Likewise.
2611 * elf32-sh64.c: Likewise.
2612 * elf32-v850.c: Likewise.
2613 * elf64-alpha.c: Likewise.
2614 * elf64-sh64.c: Likewise.
2615 * elfcode.h: Likewise.
2616 * elfcore.h: Likewise.
2617 * elflink.h: Likewise.
2618 * elfxx-mips.c: Likewise.
2619 * i386os9k.c: Likewise.
2620 * ieee.c: Likewise.
2621 * libbfd.c: Likewise.
2622 * linker.c: Likewise.
2623 * mmo.c: Likewise.
2624 * nlm32-alpha.c: Likewise.
2625 * nlm32-i386.c: Likewise.
2626 * nlm32-ppc.c: Likewise.
2627 * nlm32-sparc.c: Likewise.
2628 * nlmcode.h: Likewise.
2629 * oasys.c: Likewise.
2630 * pdp11.c: Likewise.
2631 * peicode.h: Likewise.
2632 * reloc.c: Likewise.
2633 * som.c: Likewise.
2634 * srec.c: Likewise.
2635 * tekhex.c: Likewise.
2636 * vms.c: Likewise.
2637 * xcofflink.c: Likewise.
2638 * elf64-sparc.c: Edit comment to not use "== false".
2639
2640 * aoutf1.h: Don't use "? true : false".
2641 * ecoff.c: Likewise.
2642 * format.c: Likewise.
2643 * ieee.c: Likewise.
2644 * linker.c: Likewise.
2645 * mmo.c: Likewise.
2646 * oasys.c: Likewise.
2647
2648 2002-06-23 H.J. Lu <hjl@gnu.org>
2649
2650 * elflink.h (elf_link_add_archive_symbols): For the default
2651 version, check references with only one `@' first.
2652
2653 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
2654
2655 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
2656 function.
2657 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
2658 symbol table.
2659 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
2660 (elf64_hppa_size_dynamic_sections): Revise to use
2661 elf64_hppa_mark_milli_and_exported_functions.
2662 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
2663 symbols out of dynamic symbol table.
2664
2665 2002-06-23 Alan Modra <amodra@bigpond.net.au>
2666
2667 * Makefile.in: Regenerate.
2668 * libbfd.h: Regenerate.
2669 * bfd-in2.h: Regenerate.
2670 * configure: Regenerate.
2671 * po/SRC-POTFILES.in: Regenerate.
2672
2673 * elflink.h: Comment typo fixes.
2674
2675 2002-06-23 H.J. Lu <hjl@gnu.org>
2676
2677 * elf-bfd.h (elf_link_loaded_list): New structure.
2678 (elf_link_hash_table): Add "loaded".
2679 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
2680 * elflink.h (elf_link_check_versioned_symbol): New function.
2681 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
2682
2683 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
2684
2685 * elflink.h (size_dynamic_sections): If the target does not
2686 support an ELF style hash table, return true, indicating that
2687 nothing needed to be done, rather than false, indicating that the
2688 section's size could not be computed.
2689
2690 2002-06-18 Dave Brolley <brolley@redhat.com>
2691
2692 From Catherine Moore, Michael Meissner, Dave Brolley:
2693 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
2694 * targets.c: Support bfd_elf32_frv_vec.
2695 * reloc.c: Add FRV relocs.
2696 * configure.in: Add support for bfd-elf32-frv-vec.
2697 * config.bfd (targ_cpu): Add support for frv-*-elf.
2698 * archures.c: Add frv arch and machines.
2699 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
2700 (ALL_MACHINES_CFILES): Add cpu-frv.c.
2701 (BFD32_BACKENDS): Add elf32-frv.lo.
2702 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
2703 (cpu-frv.lo): New target.
2704 (elf32-frv.lo): New target.
2705 * cpu-frv.c: New file.
2706 * elf32-frv.c: New file.
2707
2708 2002-06-18 Jakub Jelinek <jakub@redhat.com>
2709
2710 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
2711 e_shnum == 0.
2712 Only read the first section header if e_shoff is non-zero.
2713 Don't consider e_shstrndx if there are no sections.
2714
2715 2002-06-17 Tom Rix <trix@redhat.com>
2716
2717 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
2718 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
2719 complain_overflow_bitfield.
2720
2721 2002-06-17 Alan Modra <amodra@bigpond.net.au>
2722
2723 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
2724 (bfd_fdopenr): Likewise.
2725 (bfd_openstreamr): Likewise.
2726 (bfd_openw): Likewise.
2727
2728 * targets.c: Sort target vecs.
2729 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
2730 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
2731 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
2732 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
2733 * configure.in: Sort target vecs. Add m88kmach3_vec.
2734 * configure: Regenerate.
2735
2736 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
2737
2738 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
2739 bpo_reloc_no to break sort order ties, not address of items.
2740
2741 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
2742
2743 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
2744 Skip excluded sections in determing __gp value.
2745 (elf_hppa_final_link_relocate): Use the symbol's address in
2746 R_PARISC_FPTR64 relocations that don't need an opd entry.
2747 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
2748 (elf64_hppa_finalize_dynreloc): Likewise.
2749 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
2750 (elf64_hppa_finish_dynamic_symbol): Break up assert.
2751
2752 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
2753
2754 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2755 alignment for .bss, .data and .text sections so that sse and sse2
2756 code will work.
2757 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2758
2759 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
2760
2761 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
2762 sh[1234]*-elf*.
2763
2764 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2765
2766 * elflink.h (elf_bfd_final_link): Improve error handling for missing
2767 dynamic sections.
2768
2769 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
2770 for a symbol that has no output section.
2771 (allocate_dynrel_entries): Correct comment.
2772 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
2773 unless we want one.
2774 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
2775 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
2776 with no section. Remove unnecessary parentheses.
2777
2778 2002-06-11 Tom Rix <trix@redhat.com>
2779
2780 * coffcode.h (coff_compute_section_file_positions): Add data
2781 section to AIX loader alignment check.
2782
2783 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
2784 alignment to 4 bytes.
2785 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
2786 power accessor macro.
2787 (do_shared_object_padding): Remove invalid assertion.
2788
2789 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
2790
2791 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
2792 for removed output sections.
2793
2794 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
2795
2796 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
2797 htab_alloc.
2798 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
2799
2800 2002-06-08 H.J. Lu <hjl@gnu.org>
2801
2802 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
2803 work around a long long bug in gcc 2.96 on mips.
2804
2805 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
2806
2807 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
2808 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
2809 Regenerate dependency lists.
2810 * Makefile.in: Regenerate.
2811 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
2812 vax1knetbsd_vec to targ_selvecs.
2813 * configure.in: Add vax1knetbsd_vec.
2814 * configure: Regenerate.
2815 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
2816 * vax1knetbsd.c: New file.
2817 * vaxnetbsd.c: Update copyright years.
2818 (TARGET_PAGE_SIZE): Set to 0x1000.
2819 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
2820
2821 2002-06-08 Matt Thomas <matt@3am-software.com>
2822
2823 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
2824
2825 2002-06-08 Alan Modra <amodra@bigpond.net.au>
2826
2827 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
2828
2829 2002-06-08 Alan Modra <amodra@bigpond.net.au>
2830
2831 * Makefile.am: Run "make dep-am".
2832 * Makefile.in: Regenerate.
2833
2834 * armnetbsd.c: Replace CONST with const.
2835 * corefile.c: Likewise.
2836 * elf32-dlx.c: Likewise.
2837 * elf64-mips.c: Likewise.
2838 * mmo.c: Likewise.
2839 * ns32knetbsd.c: Likewise.
2840
2841 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
2842 table is elf64-sparc.
2843
2844 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2845
2846 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
2847 Fix RELA addends to get not shifted in the result. Don't do special
2848 handling of R_MIPS_64 for NewABI.
2849
2850 2002-06-07 Alan Modra <amodra@bigpond.net.au>
2851
2852 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2853 (NAME(aout,slurp_reloc_table)): Likewise.
2854 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
2855 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
2856 (xcoff_write_archive_contents_big): Likewise.
2857 (xcoff_generate_rtinit): Likewise.
2858 (xcoff_generate_rtinit): Likewise, and check error return.
2859 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2860 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
2861 (coff_get_normalized_symtab): Likewise.
2862 (coff_make_empty_symbol): Likewise.
2863 (bfd_coff_set_symbol_class): Likewise.
2864 * cofflink.c (coff_link_add_symbols): Likewise.
2865 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
2866 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
2867 (bfd_ecoff_write_accumulated_debug): Likewise.
2868 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
2869 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
2870 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
2871 * ieee.c (do_with_relocs): Use bfd_zalloc.
2872 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
2873 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2874 (NAME(aout,slurp_reloc_table)): Likewise.
2875 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
2876 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
2877 * som.c (som_build_and_write_symbol_table): Likewise.
2878 (som_slurp_string_table): Likewise.
2879 (som_slurp_symbol_table): Likewise.
2880 (som_bfd_ar_write_symbol_stuff): Likewise.
2881 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
2882 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
2883 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
2884 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
2885 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
2886
2887 2002-06-07 Alan Modra <amodra@bigpond.net.au>
2888
2889 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
2890 "group" union.
2891 (elf_group_name): Update.
2892 (elf_group_id): Define.
2893 (bfd_elf_set_group_contents): Declare.
2894 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
2895 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
2896 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
2897 that sym for the signature.
2898 (_bfd_elf_compute_section_file_positions): Don't call
2899 set_group_contents for "ld -r" case.
2900 (swap_out_syms): Use bfd_zalloc.
2901 * elflink.h (elf_link_add_archive_symbols): Likewise.
2902 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2903 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
2904
2905 2002-06-07 Alan Modra <amodra@bigpond.net.au>
2906
2907 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
2908 relocs in opd for non-shared too.
2909
2910 2002-06-06 Jeffrey Law <law@redhat.com>
2911
2912 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
2913 relocations.
2914
2915 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
2916
2917 * merge.c: Include libiberty.h.
2918 * elf-strtab.c: Include libiberty.h.
2919
2920 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
2921
2922 * peXXigen.c (pe_print_idata): Remove unused variable.
2923
2924 2002-06-06 David Heine <dlheine@tensilica.com>
2925
2926 * elf.c (assign_file_positions_for_segments): Remove unallocated
2927 sections from the section to segment mapping for PT_LOAD segments.
2928 Update comment about empty loadable segments.
2929
2930 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
2931
2932 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
2933 is within the .stabstr section.
2934
2935 2002-06-06 Alan Modra <amodra@bigpond.net.au>
2936
2937 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
2938 are "const PTR", not "const PTR *".
2939 (bfd_elf32_swap_symbol_in): Likewise.
2940 (bfd_elf64_swap_symbol_in): Likewise.
2941 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
2942 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2943 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2944 (elf_link_add_object_symbols): Likewise.
2945 (elf_link_record_local_dynamic_symbol): Likewise.
2946 (elf_link_input_bfd): Likewise.
2947 (elf_gc_mark): Likewise.
2948 (elf_reloc_symbol_deleted_p): Likewise.
2949 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2950 (mn10200_elf_relax_delete_bytes): Likewise.
2951 (mn10200_elf_symbol_address_p): Likewise.
2952 (mn10200_elf_get_relocated_section_contents): Likewise.
2953 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2954 (mn10300_elf_relax_section): Likewise.
2955 (mn10300_elf_relax_delete_bytes): Likewise.
2956 (mn10300_elf_symbol_address_p): Likewise.
2957 (mn10300_elf_get_relocated_section_contents): Likewise.
2958 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2959 (elf32_h8_relax_delete_bytes): Likewise.
2960 (elf32_h8_symbol_address_p): Likewise.
2961 (elf32_h8_get_relocated_section_contents): Likewise.
2962 * elf32-hppa.c (get_local_syms): Likewise.
2963 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2964 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2965 * elf32-sh.c (sh_elf_relax_section): Likewise.
2966 (sh_elf_relax_delete_bytes): Likewise.
2967 (sh_elf_get_relocated_section_contents): Likewise.
2968 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2969 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2970 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2971 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2972 * elf64-ppc.c (get_local_syms): Likewise.
2973 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2974 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2975
2976 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
2977
2978 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
2979
2980 2002-06-05 Alan Modra <amodra@bigpond.net.au>
2981
2982 * elf.c (group_signature): Swap in the whole symbol, and handle
2983 extracting section symbol names.
2984 (setup_group): Add comment.
2985 (set_group_contents): When called from objcopy or ld, arrange for
2986 section contents to be written. Write group member output section
2987 indices to allow objcopy to reorganize sections.
2988 (_bfd_elf_copy_private_section_data): Copy group info.
2989
2990 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
2991 (bfd_elf32_swap_symbol_in): Update prototype.
2992 (bfd_elf64_swap_symbol_in): Likewise.
2993 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
2994 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2995 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2996 (elf_link_add_object_symbols): Likewise.
2997 (elf_link_record_local_dynamic_symbol): Likewise.
2998 (elf_link_input_bfd): Likewise.
2999 (elf_gc_mark): Likewise.
3000 (elf_reloc_symbol_deleted_p): Likewise.
3001 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3002 (mn10200_elf_relax_delete_bytes): Likewise.
3003 (mn10200_elf_symbol_address_p): Likewise.
3004 (mn10200_elf_get_relocated_section_contents): Likewise.
3005 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3006 (mn10300_elf_relax_section): Likewise.
3007 (mn10300_elf_relax_delete_bytes): Likewise.
3008 (mn10300_elf_symbol_address_p): Likewise.
3009 (mn10300_elf_get_relocated_section_contents): Likewise.
3010 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3011 (elf32_h8_relax_delete_bytes): Likewise.
3012 (elf32_h8_symbol_address_p): Likewise.
3013 (elf32_h8_get_relocated_section_contents): Likewise.
3014 * elf32-hppa.c (get_local_syms): Likewise.
3015 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3016 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3017 * elf32-sh.c (sh_elf_relax_section): Likewise.
3018 (sh_elf_relax_delete_bytes): Likewise.
3019 (sh_elf_get_relocated_section_contents): Likewise.
3020 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3021 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3022 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3023 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3024 * elf64-ppc.c (get_local_syms): Likewise.
3025 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3026 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3027 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
3028 * elf64-alpha.c (alpha_elf_size_info): Likewise.
3029 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3030 * elf64-mips.c (mips_elf64_size_info): Likewise.
3031 * elf64-s390.c (s390_elf64_size_info): Likewise.
3032 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3033
3034 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3035
3036 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
3037 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
3038 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
3039 _bfd_mips_elf_ignore_discarded_relocs.
3040 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
3041
3042 2002-06-05 H.J. Lu <hjl@gnu.org>
3043
3044 * elfxx-mips.c (mips_elf_calculate_relocation): Call
3045 _bfd_elf_rel_local_sym for STT_SECTION relocations against
3046 the SEC_MERGE section.
3047
3048 2002-06-05 Alan Modra <amodra@bigpond.net.au>
3049
3050 * coff-alpha.c: Update copyright date.
3051 * coff-mips.c: Likewise.
3052 * xcoff-target.h: Likewise.
3053
3054 * bfd-in.h: Remove "taken from the source" comment.
3055 * libbfd-in.h: Likewise.
3056 * libcoff-in.h: Likewise.
3057 * bfd-in2.h: Regenerate.
3058 * libbfd.h: Regenerate.
3059 * libcoff.h: Regenerate.
3060
3061 * elf.c (bfd_elf_discard_group): Return true.
3062 * elf-bfd.h (bfd_elf_discard_group): Declare.
3063 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
3064 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
3065 * bfd.c (bfd_discard_group): Define.
3066 * targets.c (struct bfd_target): Add _bfd_discard_group.
3067 (BFD_JUMP_TABLE_LINK): Here too.
3068 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
3069 * aout-adobe.c (aout_32_bfd_discard_group): Define.
3070 * aout-target.h (MY_bfd_discard_group): Define.
3071 * aout-tic30.c (MY_bfd_discard_group): Define.
3072 * binary.c (binary_bfd_discard_group): Define.
3073 * bout.c (b_out_bfd_discard_group): Define.
3074 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
3075 * coffcode.h (coff_bfd_discard_group): Define.
3076 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
3077 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
3078 * i386msdos.c (msdos_bfd_discard_group): Define.
3079 * i386os9k.c (os9k_bfd_discard_group): Define.
3080 * ieee.c (ieee_bfd_discard_group): Define.
3081 * ihex.c (ihex_bfd_discard_group): Define.
3082 * mmo.c (mmo_bfd_discard_group): Define.
3083 * nlm-target.h (nlm_bfd_discard_group): Define.
3084 * oasys.c (oasys_bfd_discard_group): Define.
3085 * ppcboot.c (ppcboot_bfd_discard_group): Define.
3086 * som.c (som_bfd_discard_group): Define.
3087 * srec.c (srec_bfd_discard_group): Define.
3088 * tekhex.c (tekhex_bfd_discard_group): Define.
3089 * versados.c (versados_bfd_discard_group): Define.
3090 * vms.c (vms_bfd_discard_group): Define.
3091 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
3092 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
3093 (aix5coff64_vec): Likewise.
3094 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
3095
3096 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
3097
3098 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
3099 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
3100 (elf32-sh64-com.lo): New dependency list.
3101 * Makefile.in: Regenerate.
3102 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
3103 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
3104 elf32-sh64-com.lo.
3105 * configure: Regenerate.
3106 * elf32-sh64.c (sh64_address_in_cranges)
3107 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
3108 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
3109 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
3110 * elf32-sh64-com.c: ...here. New file.
3111
3112 2002-06-04 Alan Modra <amodra@bigpond.net.au>
3113
3114 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
3115 ATTRIBUTE_UNUSED on used params.
3116 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
3117 before calling bfd_section_from_elf_index on local syms.
3118 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
3119
3120 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
3121
3122 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
3123 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
3124 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
3125 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
3126 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
3127 * Makefile.in: Regenerate.
3128 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
3129 (sh64-*-netbsd*): New targets.
3130 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
3131 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
3132 * configure: Regenerate.
3133 * elf32-sh64-nbsd.c: New file.
3134 * elf64-sh64-nbsd.c: New file.
3135 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
3136 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
3137 bfd_elf64_sh64lnbsd_vec.
3138
3139 2002-06-04 Alan Modra <amodra@bigpond.net.au>
3140
3141 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
3142 (bfd_section_from_shdr): Likewise. Set section name of group
3143 sections from signature.
3144 (group_signature): Split out from setup_group. Ensure symbol table
3145 is available.
3146 (bfd_elf_discard_group): New function.
3147 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
3148 .gnu.linkonce* sections if they are members of a group.
3149 (set_group_contents): Set GRP_COMDAT flag.
3150 * section.c (bfd_discard_group): New function.
3151 * bfd-in.h (bfd_elf_discard_group): Declare.
3152 * bfd-in2.h: Regenerate.
3153 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
3154 (elf_linkonce_p): Define.
3155
3156 2002-06-04 Alan Modra <amodra@bigpond.net.au>
3157
3158 * elf.c (bfd_section_from_shdr): Make "name" const.
3159 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
3160 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
3161 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3162 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3163 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3164 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3165 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3166 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
3167 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3168 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3169 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3170
3171 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3172
3173 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
3174 ABI.
3175
3176 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
3177
3178 * elf32-arc.c: Fix formatting.
3179 * elf32-arm.h: Likewise.
3180 * elf32-cris.c: Likewise.
3181 * elf32-dlx.c: Likewise.
3182 * elf32-hppa.c: Likewise.
3183 * elf32-i386.c: Likewise.
3184 * elf32-i386qnx.c: Likewise.
3185 * elf32-or32.c: Likewise.
3186 * elf32-s390.c: Likewise.
3187 * elf32-sh64.c: Likewise.
3188 * elf32-vax.c: Likewise.
3189 * elf32-xstormy16.c: Likewise.
3190 * elf64-alpha.c: Likewise.
3191 * elf64-mmix.c: Likewise.
3192 * elf64-ppc.c: Likewise.
3193 * elf64-s390.c: Likewise.
3194 * elf64-sh64.c: Likewise.
3195 * elf64-x86-64.c: Likewise.
3196
3197 2002-06-02 Richard Henderson <rth@redhat.com>
3198
3199 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
3200 null when there are no got entries for a symbol.
3201 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
3202 uninitialized variable warning.
3203
3204 2002-06-01 Richard Henderson <rth@redhat.com>
3205
3206 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
3207 undefined symbols here.
3208 (elf64_alpha_relax_section): Do it here. Also test for not
3209 defined in the current module.
3210 (elf64_alpha_relocate_section_r): Split out of ...
3211 (elf64_alpha_relocate_section): ... here. Don't dereference
3212 NULL when looking up local got entries.
3213
3214 2002-06-01 Richard Henderson <rth@redhat.com>
3215
3216 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
3217 symbols from JSR relaxation.
3218 (elf64_alpha_size_plt_section_1): New.
3219 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
3220 (elf64_alpha_size_rela_got_1): ... here.
3221 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
3222 (elf64_alpha_size_rela_got_section): ... here.
3223 (elf64_alpha_size_plt_section): New.
3224 (elf64_alpha_relax_section): Call them.
3225 (elf64_alpha_size_got_sections): Remove output_bfd arg.
3226 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
3227
3228 2002-06-01 Richard Henderson <rth@redhat.com>
3229
3230 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
3231 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
3232 in shared libraries. Fix DTPRELHI and TPRELHI value.
3233 (INSN_ADDQ, INSN_RDUNIQ): New.
3234 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
3235 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
3236 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
3237 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
3238 Handle GOTDTPREL and GOTTPREL relocations.
3239 (elf64_alpha_relax_gprelhilo): New.
3240 (elf64_alpha_relax_tls_get_addr): New.
3241 (elf64_alpha_relax_find_tls_segment): New.
3242 (elf64_alpha_relax_section): Handle TLS relocations.
3243 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
3244 (elf64_alpha_check_relocs): Set it.
3245
3246 2002-06-01 Richard Henderson <rth@redhat.com>
3247
3248 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
3249
3250 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
3251 check; don't suppress dynamic relocs for non-allocated sections.
3252
3253 * elf64-alpha.c: Remove dead code.
3254
3255 2002-05-31 Alan Modra <amodra@bigpond.net.au>
3256
3257 * bfd-in2.h: Regenerate.
3258 * libbfd.h: Regenerate.
3259 * po/SRC-POTFILES.in: Regenerate.
3260
3261 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
3262 space for bss .plt.
3263
3264 2002-05-31 Graeme Peterson <gp@qnx.com>
3265
3266 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
3267 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
3268 Run "make dep-am".
3269 * Makefile.in: Regenerate.
3270 * config.bfd: Add i[3456]86-*-nto-qnx* support.
3271 * configure.in: Add bfd_elf32_i386qnx_vec support.
3272 * configure: Regenerate.
3273 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
3274 is_contained_by_filepos, and copy_private_bfd_data_p.
3275 * elf.c (assign_file_positions_for_segments): Call backend
3276 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
3277 (IS_CONTAINED_BY_FILEPOS): Define.
3278 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
3279 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
3280 Fix non-K&R call to _bfd_error_handler.
3281 (_bfd_elf_copy_private_section_data): Use backend
3282 copy_private_bfd_data_p.
3283 * elf32-i386.c: Don't include elfxx-target.h when
3284 ELF32_I386_C_INCLUDED is defined.
3285 * elf32-i386qnx.c: New QNX elf backend file.
3286 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
3287 elf_backend_is_contained_by_filepos, and
3288 elf_backend_do_copy_private_bfd_data.
3289 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
3290
3291 2002-05-31 Alan Modra <amodra@bigpond.net.au>
3292
3293 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
3294 Move other similar defines to start of file.
3295
3296 2002-05-30 Tom Rix <trix@redhat.com>
3297
3298 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
3299 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
3300
3301 2002-05-30 Richard Henderson <rth@redhat.com>
3302
3303 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
3304 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
3305 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
3306 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
3307 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
3308 (struct alpha_elf_obj_tdata): Rename total_got_entries and
3309 n_local_got_entries to total_got_size and local_got_size.
3310 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
3311 (alpha_got_entry_size): New.
3312 (elf64_alpha_relax_with_lituse): Use it.
3313 (elf64_alpha_relax_without_lituse): Likewise.
3314 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
3315 (get_got_entry): New.
3316 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
3317 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
3318 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
3319 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
3320 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
3321 (elf64_alpha_calc_got_offsets): Likewise.
3322 (alpha_dynamic_entries_for_reloc): New.
3323 (elf64_alpha_calc_dynrel_sizes): Use it.
3324 (elf64_alpha_size_dynamic_sections): Likewise.
3325 (elf64_alpha_relocate_section): Handle TLS relocations.
3326 * reloc.c: Add Alpha TLS relocations.
3327 * bfd-in2.h, libbfd.h: Rebuild.
3328
3329 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
3330
3331 * peXXigen.c (pe_print_idata): Remove double printed
3332 import table lines; add Bound-To comment.
3333
3334 2002-05-29 Matt Thomas <matt@3am-software.com>
3335
3336 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
3337 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
3338 (elf32-vax.lo): New rule.
3339 * Makefile.in: Regenerate.
3340 * configure.in (bfd_elf32_vax_vec)
3341 (vaxnetbsd_vec): New vectors.
3342 * configure: Regenerate.
3343 * config.bfd (vax-*-netbsdelf*)
3344 (vax-*-netbsdaout*)
3345 (vax-*-netbsd*): New targets.
3346 * elf32-vax.c: New file.
3347 * reloc.c: Add VAX relocations.
3348 * bfd-in2.h: Regenerate.
3349 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
3350
3351 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
3352
3353 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
3354 and bfd_elf32_bigarm_vec to targ_selvecs.
3355
3356 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
3357
3358 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
3359 with auto-imported symbols.
3360
3361 2002-05-29 Adam Nemet <anemet@lnxw.com>
3362
3363 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
3364 sections only record bfd.
3365 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
3366 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
3367 * bfd-in2.h: Regenerate.
3368
3369 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
3370
3371 * syms.c (_bfd_stab_section_find_nearest_line): Move
3372 declaration and initialisation of saw_line and saw_func out of
3373 for loop.
3374
3375 2002-05-29 Alan Modra <amodra@bigpond.net.au>
3376
3377 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
3378 (bfd_elf64_get_symbol_info): Define.
3379 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
3380
3381 2002-05-29 Andrey Volkov <avolkov@transas.com>
3382
3383 * cpu-h8300.c: Make default h8300 machine first in machine list.
3384
3385 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
3386
3387 * config.bfd: Added DLX configuraton.
3388 * Makefile.am: Added DLX configuraton.
3389 * configure.in: Added DLX configuraton.
3390 * archures.c: Add DLX architecure.
3391 * reloc.c: Add DLX relocs.
3392 * targets.c: Added DLX target vector.
3393 * configure: Regenerate.
3394 * Makefile.in: Regenreate.
3395 * bfd-in2.h: Regenreate.
3396 * elf32-dlx.c: New file: Support DLX target.
3397 * cpu-dlx.c: New file: Support DLX target.
3398
3399 2002-05-25 Alan Modra <amodra@bigpond.net.au>
3400
3401 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
3402
3403 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
3404 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
3405 strings to point inside function code sym string.
3406 (func_desc_adjust): Likewise.
3407 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
3408
3409 2002-05-24 Michal Ludvig <mludvig@suse.cz>
3410
3411 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
3412 (elf64_x86_64_grok_psinfo): Added.
3413
3414 2002-05-24 TAMURA Kent <kent@netbsd.org>
3415
3416 * config.bfd: Add a target for i386-netbsdpe.
3417
3418 2002-05-24 Alan Modra <amodra@bigpond.net.au>
3419
3420 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
3421 and is_func_descriptor.
3422 (func_desc_adjust): Hide function code sym in shared libs unless
3423 there is a matching exported function descriptor sym.
3424
3425 2002-05-23 Jakub Jelinek <jakub@redhat.com>
3426
3427 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
3428 for symbols from SHF_TLS section.
3429 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
3430 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
3431 (map_sections_to_segments): Build PT_TLS segment if necessary.
3432 (assign_file_positions_for_segments): Likewise.
3433 (get_program_header_size): Account for PT_TLS segment.
3434 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
3435 SEC_THREAD_LOCAL sections to STT_TLS.
3436 * reloc.c: Add 386 and IA-64 TLS relocs.
3437 * section.c (SEC_THREAD_LOCAL): Define.
3438 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
3439 Remove.
3440 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
3441 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
3442 unconditionally.
3443 (struct elf_final_link_info): Add first_tls_sec.
3444 (elf_bfd_final_link): Set first_tls_sec.
3445 Compute elf_hash_table (info)->tls_segment.
3446 (elf_link_output_extsym): Handle STT_TLS symbols.
3447 (elf_link_input_bfd): Likewise.
3448 * syms.c (BSF_THREAD_LOCAL): Define.
3449 * bfd-in2.h: Rebuilt.
3450 * libbfd.h: Rebuilt.
3451 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
3452 elf_i386_mkobject, elf_i386_object_p): New functions.
3453 (elf_howto_table): Add TLS relocs.
3454 (elf_i386_reloc_type_lookup): Support TLS relocs.
3455 (elf_i386_info_to_howto_rel): Likewise.
3456 (struct elf_i386_link_hash_entry): Add tls_type.
3457 (struct elf_i386_obj_tdata): New.
3458 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
3459 New macros.
3460 (struct elf_i386_link_hash_table): Add tls_ldm_got.
3461 (link_hash_newfunc): Clear tls_type.
3462 (elf_i386_check_relocs): Support TLS relocs.
3463 (elf_i386_gc_sweep_hook): Likewise.
3464 (allocate_dynrelocs): Likewise.
3465 (elf_i386_size_dynamic_sections): Likewise.
3466 (elf_i386_relocate_section): Likewise.
3467 (elf_i386_finish_dynamic_symbol): Likewise.
3468 (bfd_elf32_mkobject, elf_backend_object_p): Define.
3469 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
3470 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
3471 want_tprel, want_dtpmod, want_dtprel.
3472 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
3473 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
3474 R_IA64_LTOFF_TPREL22.
3475 (elf_code_to_howto_index): Add TLS relocs.
3476 (elfNN_ia64_check_relocs): Support TLS relocs.
3477 (allocate_global_data_got): Account for TLS .got data.
3478 (allocate_dynrel_entries): Account for TLS dynamic relocations.
3479 (elfNN_ia64_install_value): Supprt TLS relocs.
3480 (set_got_entry): Support TLS relocs.
3481 (elfNN_ia64_relocate_section): Likewise.
3482
3483 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3484
3485 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
3486 BLX reloc round the relocation up rather than down.
3487 * coff-arm.c (coff_arm_relocate_section): Likewise.
3488
3489 2002-05-21 H.J. Lu (hjl@gnu.org)
3490
3491 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
3492 definition.
3493
3494 2002-05-22 Alan Modra <amodra@bigpond.net.au>
3495
3496 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
3497 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
3498
3499 2002-05-22 Alan Modra <amodra@bigpond.net.au>
3500
3501 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
3502 unresolved relocs.
3503 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
3504
3505 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3506
3507 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
3508 non-ELF targets.
3509
3510 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3511
3512 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
3513 an error value.
3514 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
3515 return with false on error.
3516 (elf_link_input_bfd): Check reloc_emitter return value.
3517
3518 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
3519
3520 * config.bfd (armeb-*-netbsdelf*): New target.
3521
3522 2002-05-20 Alan Modra <amodra@bigpond.net.au>
3523
3524 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
3525 at the plt call stub.
3526
3527 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3528
3529 * cpu-mips.c (mips_compatible): Don't try to check machine
3530 compatibility.
3531
3532 2002-05-18 Tom Rix <trix@redhat.com>
3533
3534 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
3535
3536 2002-05-17 Alan Modra <amodra@bigpond.net.au>
3537
3538 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
3539 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
3540 we've already warned about an undefined symbol. Report more
3541 detail on reloc errors.
3542
3543 2002-05-17 Alan Modra <amodra@bigpond.net.au>
3544
3545 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
3546 * configure.in: Invoke AM_INSTALL_LIBBFD.
3547 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
3548 (install_libbfd): .. New target.
3549 (uninstall_libbfd): Likewise.
3550 (install-bfdlibLTLIBRARIES): Likewise.
3551 (uninstall-bfdlibLTLIBRARIES): Likewise.
3552 (bfdlibdir): New.
3553 (bfdincludedir): New.
3554 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
3555 * aclocal.m4: Regenerate.
3556 * configure: Regenerate.
3557 * Makefile.in: Regenerate.
3558
3559 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
3560
3561 * hash.c (bfd_hash_lookup): Remove computation of len from inside
3562 hash loop.
3563
3564 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
3565
3566 * config.bfd: Add targets for sh64-linux (little endian and
3567 big endian).
3568
3569 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
3570
3571 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
3572 is located in the same section as the import table. Instead
3573 check, and if necessary load the section containing the thunk.
3574
3575 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
3576
3577 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
3578 bfd_bread.
3579 (xcoff64_core_file_matches_executable_p): Replace bfd_read
3580 with bfd_bread.
3581
3582 2002-05-15 Alan Modra <amodra@bigpond.net.au>
3583
3584 * aix5ppc-core.c: Warning fixes.
3585 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
3586 * aout-target.h (MY_bfd_link_just_syms): Define.
3587 * aout-tic30.c (MY_bfd_link_just_syms): Define.
3588 * bfd.c (bfd_link_just_syms): Define.
3589 * binary.c (binary_bfd_link_just_syms): Define.
3590 * bout.c (b_out_bfd_link_just_syms): Define.
3591 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
3592 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
3593 * coffcode.h (coff_bfd_link_just_syms): Define.
3594 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
3595 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
3596 (_bfd_elf_link_just_syms): Declare.
3597 * elf.c (_bfd_elf_link_just_syms): New function.
3598 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
3599 sections haven't already been discarded by the linker.
3600 * elflink.h (elf_link_add_object_symbols): Likewise for stab
3601 sections and SEC_MERGE sections.
3602 (elf_bfd_discard_info): Similarly here.
3603 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
3604 * i386msdos.c (msdos_bfd_link_just_syms): Define.
3605 * i386os9k.c (os9k_bfd_link_just_syms): Define.
3606 * ieee.c (ieee_bfd_link_just_syms): Define.
3607 * ihex.c (ihex_bfd_link_just_syms): Define.
3608 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
3609 (_bfd_generic_link_just_syms): Declare.
3610 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
3611 * linker.c (_bfd_generic_link_just_syms): New function.
3612 * mmo.c (mmo_bfd_link_just_syms): Define.
3613 * nlm-target.h (nlm_bfd_link_just_syms): Define.
3614 * oasys.c (oasys_bfd_link_just_syms): Define.
3615 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
3616 * som.c (som_bfd_link_just_syms): Define.
3617 * srec.c (srec_bfd_link_just_syms): Define.
3618 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
3619 (BFD_JUMP_TABLE_LINK): And here.
3620 * tekhex.c (tekhex_bfd_link_just_syms): Define.
3621 * versados.c (versados_bfd_link_just_syms): Define.
3622 * vms.c (vms_bfd_link_just_syms): Define.
3623 * libbfd.h: Regenerate.
3624 * bfd-in2.h: Regenerate.
3625
3626 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3627
3628 * elf32-mips.c: Remove superfluous definitions copied from
3629 elfxx-mips.c.
3630 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
3631 SGIish vectors to check the special case.
3632 (mips_elf_hi16_reloc): Fix comment.
3633 (mips_elf_got16_reloc): Likewise.
3634 (_bfd_mips_elf32_gprel16_reloc): Likewise.
3635 (elf_reloc_map): Code cleanup.
3636 (mips_reloc_map): Add comment.
3637 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
3638 (mips_elf32_rtype_to_howto): Likewise.
3639 (mips_elf32_discard_info): Likewise.
3640 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
3641 lead to IRIX compatibility now.
3642
3643 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3644
3645 * elfxx-mips.c: Call it IRIX, not Irix in comments.
3646
3647 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
3648
3649 * config.bfd (shle-*-netbsdelf*): Add target which includes
3650 sh64 support.
3651
3652 2002-05-13 David Edelsohn <edelsohn@gnu.org>
3653
3654 * configure.in: Revert 2002-04-07. Instead, auto-configure
3655 HAVE_ST_C_IMPL.
3656 * configure: Regenerate.
3657 * config.in: Regenerate.
3658 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
3659 or AIX_5_CORE.
3660
3661 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
3662
3663 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
3664 corefiles as well.2
3665 * configure: Regenerate.
3666
3667 2002-05-13 Alan Modra <amodra@bigpond.net.au>
3668
3669 * Makefile.am (install-data-local): Install headers to
3670 $(exec_prefix)/include.
3671 * Makefile.in: Regenerate.
3672
3673 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
3674 Daniel Jacobowitz <drow@mvista.com>
3675
3676 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
3677 map BFD_RELOC_RVA.
3678
3679 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
3680
3681 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
3682 hppa*-*-openbsd*): New targets.
3683 * configure.in (alpha*-*-openbsd*): Set COREFILE.
3684 * configure: Regenerate.
3685
3686 2002-05-10 Tom Rix <trix@redhat.com>
3687
3688 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
3689 xcoff64_ppc_relocate_section.
3690 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
3691 * libxcoff.h: Common xcoff_reloc_type function declaration.
3692
3693 2002-05-10 Alan Modra <amodra@bigpond.net.au>
3694
3695 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
3696 added in 2002-05-09 commit.
3697
3698 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
3699 don't look for stubs on all undefined syms.
3700
3701 2002-05-09 Alan Modra <amodra@bigpond.net.au>
3702
3703 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
3704 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
3705 pcrel_offset.
3706
3707 * elf32-i386.c (elf_howto_table): Comments.
3708 (elf_i386_relocate_section): Handle more relocs for relocatable
3709 linking and against SEC_MERGE sections.
3710
3711 2002-05-08 Alan Modra <amodra@bigpond.net.au>
3712
3713 * elf32-ppc.c (ppc_elf_create_got): New function.
3714 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
3715 _bfd_elf_create_dynamic_sections. Correct .plt flags.
3716 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
3717 _bfd_elf_create_got_section.
3718
3719 2002-05-07 Alan Modra <amodra@bigpond.net.au>
3720
3721 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
3722 * elfxx-target.h (elf_backend_rela_normal): Define.
3723 (elfNN_bed): Init rela_normal.
3724 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
3725 for section symbols here if rela_normal. Simplify abs section test.
3726 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
3727 return immediately. Remove code handling relocatable linking.
3728 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3729 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3730 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3731 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3732 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3733 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3734 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3735 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3736 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3737 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3738 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3739 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3740 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3741 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3742 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
3743 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3744 * elf-m10200.c (elf_backend_rela_normal): Define.
3745 * elf-m10300.c (elf_backend_rela_normal): Define.
3746 * elf32-fr30.c (elf_backend_rela_normal): Define.
3747 * elf32-i370.c (elf_backend_rela_normal): Define.
3748 * elf32-i860.c (elf_backend_rela_normal): Define.
3749 * elf32-m68k.c (elf_backend_rela_normal): Define.
3750 * elf32-mcore.c (elf_backend_rela_normal): Define.
3751 * elf32-openrisc.c (elf_backend_rela_normal): Define.
3752 * elf32-ppc.c (elf_backend_rela_normal): Define.
3753 * elf32-s390.c (elf_backend_rela_normal): Define.
3754 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
3755 * elf64-ppc.c (elf_backend_rela_normal): Define.
3756 * elf64-s390.c (elf_backend_rela_normal): Define.
3757 * elf64-x86-64.c (elf_backend_rela_normal): Define.
3758 * elfxx-ia64.c (elf_backend_rela_normal): Define.
3759 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
3760 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
3761
3762 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
3763
3764 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
3765 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
3766
3767 2002-05-06 Alan Modra <amodra@bigpond.net.au>
3768
3769 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
3770 when not relocatable. Fix reloc_emitter call for K&R.
3771
3772 2002-05-04 Alan Modra <amodra@bigpond.net.au>
3773
3774 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
3775 reloading local sym addend mistakenly removed in 2002-05-01 change.
3776
3777 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
3778 (read_abbrevs): Change "offset" param to bfd_vma.
3779 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
3780 Change "abbrev_offset" to bfd_vma.
3781 (read_indirect_string): Use correct conversion chars in error
3782 message format string, cast bfd_vma's to unsigned long.
3783 (read_abbrevs): Likewise.
3784 (read_attribute_value): Likewise.
3785 (decode_line_info): Likewise.
3786 (scan_unit_for_functions): Likewise.
3787 (parse_comp_unit): Likewise.
3788
3789 2002-05-04 Tom Rix <trix@redhat.com>
3790
3791 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
3792 (coff_swap_reloc_out): Same.
3793 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
3794 (xcoff_swap_reloc_out): Same.
3795 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
3796 case some 16 bit relocs. Add reloc value to output.
3797 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
3798 R_RBR. Improve names.
3799 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
3800 (bfd_xcoff_backend_data): Update with new reloc swap names.
3801 (bfd_pmac_xcoff_backend_data) : Same.
3802 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
3803 (xcoff64_swap_reloc_out): Same.
3804 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
3805 R_POS. Add reloc value to output.
3806 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
3807 bit R_RBR. Improve names, masks.
3808 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
3809 (bfd_xcoff_backend_data): Update with new reloc swap names.
3810 (bfd_xcoff_aix5_backend_data) : Same.
3811
3812 2002-05-04 Alan Modra <amodra@bigpond.net.au>
3813
3814 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
3815 bfd_count top_index, input_list, all_local_syms.
3816 (elf32_hppa_setup_section_lists): New function, split from
3817 elf32_hppa_size_stubs.
3818 (elf32_hppa_next_input_section): Likewise.
3819 (group_sections): Likewise.
3820 (get_local_syms): Likewise.
3821 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
3822 stubs on undefined syms too.
3823 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
3824 Only access htab elf fields when we have an elf hash table.
3825 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
3826 (elf32_hppa_next_input_section): Declare.
3827
3828 2002-05-04 Bob Byrnes <byrnes@curl.com>
3829
3830 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
3831 _bfd_new_bfd.
3832
3833 2002-05-03 H.J. Lu (hjl@gnu.org)
3834
3835 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
3836 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
3837 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
3838 to hide a global symbol.
3839 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
3840 forced_local to true.
3841
3842 2002-05-02 Richard Henderson <rth@redhat.com>
3843
3844 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
3845 vs SHN_UNDEF to zero.
3846
3847 2002-05-02 Alan Modra <amodra@bigpond.net.au>
3848
3849 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
3850 16 bit reloc.
3851 <R_PPC64_SECTOFF_DS>: Likewise.
3852 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3853 SECTOFF reloc.
3854 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
3855 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3856 SECTOFF reloc.
3857
3858 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
3859 (ppc64_elf_ha_reloc): New function.
3860 (ppc64_elf_brtaken_reloc): New function.
3861 (ppc64_elf_sectoff_reloc): New function.
3862 (ppc64_elf_sectoff_ha_reloc): New function.
3863 (ppc64_elf_toc_reloc): New function.
3864 (ppc64_elf_toc_ha_reloc): New function.
3865 (ppc64_elf_toc64_reloc): New function.
3866 (ppc64_elf_unhandled_reloc): New function.
3867 (ppc64_elf_howto_raw): Use the above.
3868 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
3869 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
3870 <R_PPC64_SECTOFF_DS>: Likewise.
3871 (IS_ABSOLUTE_RELOC): Update.
3872 (struct ppc_link_hash_table): Add have_undefweak.
3873 (ppc64_elf_link_hash_table_create): Init.
3874 (func_desc_adjust): Set have_undefweak.
3875 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
3876 add the .sfpr blr when have_undefweak.
3877 (ppc64_elf_setup_section_lists): Check hash table flavour.
3878 (ppc64_elf_next_input_section): Move output_section->owner test to
3879 ppc64elf.em.
3880 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
3881 and relocatable test. Return TOCstart and don't set elf_gp.
3882 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
3883 offset calculation. Add assert on weak sym branch tweaks.
3884 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
3885 (ppc64_elf_toc): Declare.
3886 (ppc64_elf_next_input_section): Update.
3887
3888 2002-05-01 Alan Modra <amodra@bigpond.net.au>
3889
3890 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
3891 file_name.
3892
3893 2002-05-01 Alan Modra <amodra@bigpond.net.au>
3894
3895 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
3896 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
3897 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
3898 call branches. Correct undefined weak destination.
3899 (ppc64_elf_func_desc_adjust): Always create at least one blr in
3900 .sfpr, and correct case where either only savef* or restf* is
3901 needed.
3902
3903 Long branch stubs, multiple stub sections.
3904 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
3905 (ppc64_elf_next_input_section): Declare.
3906 * elf64-ppc.c: Move linker-only prototypes.
3907 (STUB_SUFFIX): Define.
3908 (enum ppc_stub_type): New.
3909 (struct ppc_stub_hash_entry): New.
3910 (struct ppc_branch_hash_entry): New.
3911 (struct ppc_link_hash_entry): Add stub_cache, oh.
3912 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
3913 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
3914 Rename plt_overflow to stub_error.
3915 (ppc_stub_hash_lookup): Define.
3916 (ppc_branch_hash_lookup): Define.
3917 (stub_hash_newfunc): New function.
3918 (branch_hash_newfunc): New function.
3919 (link_hash_newfunc): Init new fields.
3920 (ppc64_elf_link_hash_table_create): Likewise.
3921 (ppc64_elf_link_hash_table_free): New function.
3922 (ppc_stub_name): New function.
3923 (ppc_get_stub_entry): New function.
3924 (ppc_add_stub): New function.
3925 (create_linkage_sections): Use bfd_make_section_anyway. Create
3926 .branch_lt and .rela.branch_lt sections. Don't create .stub.
3927 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
3928 and set up for plt call stubs. Link func and func desc syms.
3929 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
3930 (func_desc_adjust): Avoid hash lookup when func desc sym available
3931 via shortcut, and set links when processing.
3932 (ppc64_elf_hide_symbol): Likewise.
3933 (allocate_dynrelocs): Don't allocate stub section here.
3934 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
3935 Remove sstub code.
3936 (ppc_type_of_stub): New function.
3937 (build_one_stub): Delete.
3938 (ppc_build_one_stub): New function.
3939 (ppc_size_one_stub): New function.
3940 (ppc64_elf_setup_section_lists): New function.
3941 (ppc64_elf_next_input_section): New function.
3942 (group_sections): New function.
3943 (get_local_syms): New function.
3944 (ppc64_elf_size_stubs): Rewrite.
3945 (ppc64_elf_build_stubs): Rewrite.
3946 (ppc64_elf_relocate_section): Look up stub entry for REL24
3947 relocs. Don't propagate REL14* to dynamic objects. Look for long
3948 branch stubs if REL14* or REL24 relocs won't reach.
3949 (bfd_elf64_bfd_link_hash_table_free): Define.
3950
3951 2002-04-30 Mark Mitchell <mark@codesourcery.com>
3952
3953 * config.bfd: Add support for powerpc-*-windiss.
3954
3955 2002-04-30 Tom Rix <trix@redhat.com>
3956
3957 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
3958 symbol names into the hash table.
3959
3960 2002-04-28 Tom Rix <trix@redhat.com>
3961
3962 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
3963 calulating relocations.
3964 (xcoff_complain_overflow) : Function table for relocation errors.
3965 (xcoff_ppc_relocate_section): Use relocation and complain function
3966 tables.
3967 (xcoff_complain_overflow_unsigned_func): New complain function.
3968 (xcoff_complain_overflow_signed_func): Same.
3969 (xcoff_complain_overflow_bitfield_func): Same.
3970 (xcoff_complain_overflow_dont_func): Same.
3971 (xcoff_reloc_type_crel): New recot function.
3972 (xcoff_reloc_type_br): Same.
3973 (xcoff_reloc_type_ba): Same.
3974 (xcoff_reloc_type_toc): Same.
3975 (xcoff_reloc_type_rel): Same.
3976 (xcoff_reloc_type_neg): Same.
3977 (xcoff_reloc_type_pos): Same.
3978 (xcoff_reloc_type_fail): Same.
3979 (xcoff_reloc_type_noop): Same.
3980 * libxcoff.h : Declare common parts for xcoff64.
3981 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
3982 and complain function tables.
3983
3984 2002-04-28 Alan Modra <amodra@bigpond.net.au>
3985
3986 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
3987 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
3988
3989 2002-04-26 Alan Modra <amodra@bigpond.net.au>
3990
3991 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
3992 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
3993
3994 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
3995 same as the output before calling elf_link_input_bfd.
3996
3997 * coffcode.h (coff_compute_section_file_positions): Set
3998 section_tail after shuffling section list.
3999
4000 2002-04-24 Christian Groessler <chris@groessler.org>
4001
4002 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
4003 addresses are 23bit with a special layout, not plain 32bit
4004 values. Prevent relocation of immediate values.
4005
4006 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
4007
4008 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
4009 MIPS-16 ASE flags are set, print something to indicate that.
4010
4011 2002-04-23 Alan Modra <amodra@bigpond.net.au>
4012
4013 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
4014 under which a plt call stub is used.
4015 (final_link_relocate): Similarly.
4016 (allocate_plt_static): Clear h-plabel except when plt entry is
4017 exclusively used for a plabel.
4018 (allocate_dynrelocs): Use the above to simplify plt sizing.
4019 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
4020 (elf32_hppa_link_hash_table_create): Init.
4021 (BL22_RP): Define.
4022 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
4023 (elf32_hppa_check_relocs): Set has_22bit_branch.
4024
4025 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
4026 (final_link_relocate): Likewise.
4027
4028 2002-04-22 Jakub Jelinek <jakub@redhat.com>
4029
4030 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
4031 search table if some FDE is DW_EH_PE_aligned encoded either.
4032 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
4033
4034 2002-04-22 Richard Smith <richard@ex-parrot.com>
4035 Jakub Jelinek <jakub@redhat.com>
4036
4037 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
4038 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
4039 encoded personality.
4040 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
4041 for CIE/FDE removal.
4042
4043 2002-04-20 Tom Rix <trix@redhat.com>
4044
4045 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
4046
4047 2002-04-20 Alan Modra <amodra@bigpond.net.au>
4048
4049 * archures.c (bfd_lookup_arch): Move the list order comment..
4050 (struct bfd_arch_info): ..to where it belongs.
4051 * bfd-in2.h: Regenerate.
4052
4053 * archures.c (bfd_lookup_arch): Add comment on list order.
4054 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
4055 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
4056 is always at head of list.
4057
4058 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
4059
4060 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
4061 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
4062 definition of these functions for ARM_WINCE builds as they are
4063 not used.
4064 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
4065 for ARM_WINCE builds.
4066
4067 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
4068
4069 * coff-arm.c (bfd_arm_process_before_allocation):
4070
4071 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
4072
4073 * cpu-sh.c (scan_mach): Delete.
4074 (arch_info_struct): Replace scan_mach with bfd_default_scan.
4075 (bfd_sh_arch): Likewise.
4076
4077 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
4078
4079 * ihex.c (ihex_write_object_contents): Fix check for records
4080 crossing 64K boundaries.
4081
4082 2002-04-16 Alan Modra <amodra@bigpond.net.au>
4083
4084 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
4085 type rather than just assuming entries are ELF.
4086 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4087 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4088 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
4089 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
4090 rather than elf_link_hash_entry.
4091
4092 2002-04-15 Richard Henderson <rth@redhat.com>
4093
4094 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
4095 n32 binaries.
4096
4097 2002-04-15 Michael Snyder <msnyder@redhat.com>
4098
4099 * opncls.c (bfd_close): Write contents if writeable.
4100 Minor formatting tidy-ups.
4101
4102 2002-04-15 Alan Modra <amodra@bigpond.net.au>
4103
4104 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
4105
4106 2002-04-12 Michael Snyder <msnyder@redhat.com>
4107
4108 * bfd-in.h (bfd_get_section_lma): New access macro.
4109 Minor white-space fix-up.
4110
4111 2002-04-12 Alan Modra <amodra@bigpond.net.au>
4112
4113 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
4114 header pad.
4115
4116 2002-04-09 DJ Delorie <dj@redhat.com>
4117
4118 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
4119
4120 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
4121
4122 * coffcode.h (coff_read_word): New.
4123 (coff_compute_checksum): New.
4124 (coff_apply_checksum): New.
4125 (coff_write_object_contents): Call coff_apply_checksum () to
4126 apply checksum to PE image.
4127
4128 2002-04-08 Randolph Chung <tausq@debian.org>
4129
4130 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
4131 (elf32_hppa_final_link): Split out sorting logic to..
4132 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
4133 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
4134
4135 2002-04-07 Andrew Cagney <ac131313@redhat.com>
4136
4137 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
4138 pattern.
4139 * configure: Re-generate.
4140
4141 2002-04-07 Andrew Cagney <ac131313@redhat.com>
4142
4143 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
4144 is greater or equal to 4.3.3.
4145 * configure: Regenerate.
4146 Fix PR gdb/344.
4147
4148 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
4149
4150 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
4151 R_CRIS_32_PCREL>: Fix typo in name.
4152 (cris_elf_check_relocs): Always create .rela.got here when
4153 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
4154 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
4155 assume it's created.
4156
4157 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
4158
4159 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
4160 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
4161 define.
4162 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
4163 * bfd.c (bfd_link_hash_table_free): Define.
4164 * binary.c (binary_bfd_link_hash_table_free): Define.
4165 * bout.c (b_out_bfd_link_hash_table_free): Define.
4166 * coff-rs6000.c (rs6000coff_vec): Include
4167 _bfd_generic_link_hash_table_free.
4168 (pmac_xcoff_vec): Likewise.
4169 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4170 (aix5coff64_vec): Likewise.
4171 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
4172 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
4173 (bfd_elf32_bfd_link_hash_table_free): Define.
4174 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
4175 (bfd_elf32_bfd_link_hash_table_free): Define.
4176 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
4177 define.
4178 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
4179 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
4180 * ieee.c (ieee_bfd_link_hash_table_free): Define.
4181 * ihex.c (ihex_bfd_link_hash_table_free): Define.
4182 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
4183 (_bfd_generic_link_hash_table_free): Add prototype.
4184 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
4185 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
4186 * linker.c (_bfd_generic_link_hash_table_free): New function.
4187 * mmo.c (mmo_bfd_link_hash_table_free): Define.
4188 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
4189 * oasys.c (oasys_bfd_link_hash_table_free): Define.
4190 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
4191 * som.c (som_bfd_link_hash_table_free): Define.
4192 * srec.c (srec_bfd_link_hash_table_free): Define.
4193 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
4194 * versados.c (versados_bfd_link_hash_table_free): Define.
4195 * vms.c (vms_bfd_link_hash_table_free): New function.
4196 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
4197
4198 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
4199 instead of bfd_alloc.
4200 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
4201 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
4202 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
4203 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
4204 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
4205 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
4206 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
4207 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
4208 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
4209 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
4210 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
4211 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
4212 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
4213 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
4214 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
4215 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
4216 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
4217 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
4218 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
4219 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
4220 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
4221 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
4222 * m68klinux.c (linux_link_hash_table_create): Likewise.
4223 * sparclinux.c (linux_link_hash_table_create): Likewise.
4224 * sunos.c (sunos_link_hash_table_create): Likewise.
4225 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
4226
4227 * targets.c: Add _bfd_link_hash_table_free to xvec.
4228
4229 * bfd-in2.h: Regenerate.
4230 * libbfd.h: Regenerate.
4231 * libcoff.h: Regenerate.
4232
4233 2002-04-04 Alan Modra <amodra@bigpond.net.au>
4234
4235 * dep-in.sed: Cope with absolute paths.
4236 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
4237 Run "make dep-am".
4238 * Makefile.in: Regenerate.
4239 * coff-arm.c: Fix copyright date.
4240 * cpu-h8300.c: Likewise.
4241 * cpu-i370.c: Likewise.
4242 * cpu-s390.c: Likewise.
4243 * cpu-mips.c: Likewise.
4244 * po/SRC-POTFILES.in: Regenerate.
4245
4246 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4247
4248 * Makefile.am: Add elfxx-mips.c to the known backends.
4249 (elf32-mips.lo): remove dependency to coff/external.h.
4250 * Makefile.in: Regenerate.
4251 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
4252 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
4253 accordingly.
4254 * configure: Regenerate.
4255 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
4256 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
4257 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
4258 MIPS specific backend functions.
4259 * elf32-mips.c: Moved most code to elfxx-mips.c.
4260 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
4261 static.
4262 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
4263 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
4264 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
4265 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
4266 interface to allow selection of the right REL or RELA howto table.
4267 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
4268 static. Let it refuse n32 objects.
4269 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
4270 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
4271 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
4272 (elf32_mips_ignore_discarded_relocs): Rename from
4273 _bfd_elf32_mips_ignore_discarded_relocs.
4274 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
4275 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
4276 (elf_mips_howto_table_rela): Remove.
4277 * elf64-mips.c: Moved most code to elfxx-mips.c.
4278 (bfd_elf64_bfd_reloc_type_lookup): Make static.
4279 (mips_elf64_rtype_to_howto): New function.
4280 (mips_elf64_object_p): Likewise.
4281 (elf64_mips_irix_compat): Likewise.
4282 * elfxx-mips.c: New file containing common code merged together from
4283 elf32-mips.c and elf64-mips.c.
4284 * elfxx-mips.h: New file containing MIPS specific prototypes from
4285 elf-bfd.h.
4286 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
4287 elf_backend_mips_rtype_to_howto.
4288
4289 2002-04-04 Alan Modra <amodra@bigpond.net.au>
4290
4291 * srec.c (MAXCHUNK, Chunk): Revise comments.
4292 (srec_write_record): Correct buffer size.
4293 (srec_write_header): Do without intermediate buffer.
4294 (srec_write_section): Validate Chunk.
4295 (srec_write_terminator): Pass NULL instead of dummy buffer.
4296 (srec_write_symbols): Pass file and symbol names directly to
4297 bfd_bwrite so sprintf won't overflow buffer.
4298
4299 2002-04-03 Jakub Jelinek <jakub@redhat.com>
4300
4301 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
4302 PC relative relocs against hidden symbols.
4303 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4304
4305 2002-04-03 Alan Modra <amodra@bigpond.net.au>
4306
4307 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
4308 LMAs, loop over segments until p_vaddr and p_memsz specify an
4309 extent enclosing the section.
4310
4311 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
4312
4313 * ihex.c (ihex_write_object_contents): Do not allow records to
4314 cross a 64K boundary - wrap if necessary.
4315
4316 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
4317
4318 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
4319 which caused the returned LWP ID to always be 0.
4320
4321 2002-04-01 Richard Henderson <rth@redhat.com>
4322
4323 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4324 (elf32_sparc_relocate_section): Use it to figure out when to
4325 initialize .got entries.
4326 * elf64-sparc.c: Similarly.
4327
4328 2002-03-28 Alan Modra <amodra@bigpond.net.au>
4329
4330 * linker.c (link_action): Ignore duplicate warning syms.
4331 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
4332 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
4333 (elf_adjust_dynamic_symbol): Likewise.
4334 (elf_export_symbol): Likewise.
4335 (elf_link_find_version_dependencies): Likewise.
4336 (elf_link_assign_sym_version): Likewise.
4337 (elf_link_sec_merge_syms): Likewise.
4338 (elf_link_output_extsym): Likewise.
4339 (elf_gc_sweep_symbol): Likewise.
4340 (elf_gc_propagate_vtable_entries_used): Likewise.
4341 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4342 (elf_gc_allocate_got_offsets): Likewise.
4343 (elf_collect_hash_codes): Likewise.
4344 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
4345 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
4346 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4347 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
4348 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
4349 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
4350 (elf_cris_discard_excess_dso_dynamics): Likewise.
4351 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
4352 (mark_PIC_calls): Likewise.
4353 (allocate_plt_static): Likewise.
4354 (allocate_dynrelocs): Likewise.
4355 (readonly_dynrelocs): Likewise.
4356 * elf32-i386.c (allocate_dynrelocs): Likewise.
4357 (readonly_dynrelocs): Likewise.
4358 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
4359 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
4360 * elf32-mips.c (mips_elf_output_extsym): Likewise.
4361 (mips_elf_sort_hash_table_f): Likewise.
4362 (mips_elf_check_mips16_stubs): Likewise.
4363 * elf32-s390.c (allocate_dynrelocs): Likewise.
4364 (readonly_dynrelocs): Likewise.
4365 * elf32-sh.c (sh_elf_discard_copies): Likewise.
4366 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
4367 (xstormy16_relax_plt_realloc): Likewise.
4368 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
4369 (elf64_alpha_output_extsym): Likewise.
4370 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
4371 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
4372 (mips_elf64_check_mips16_stubs): Likewise.
4373 (mips_elf64_output_extsym): Likewise.
4374 * elf64-ppc.c (func_desc_adjust): Likewise.
4375 (allocate_dynrelocs): Likewise.
4376 (readonly_dynrelocs): Likewise.
4377 * elf64-s390.c (allocate_dynrelocs): Likewise.
4378 (readonly_dynrelocs): Likewise.
4379 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
4380 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
4381 (readonly_dynrelocs): Likewise.
4382 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
4383 * aoutx.h (aout_link_write_other_symbol): Likewise.
4384 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
4385 (_bfd_coff_write_global_sym): Likewise.
4386 * i386linux.c (linux_tally_symbols): Likewise.
4387 * m68klinux.c (linux_tally_symbols): Likewise.
4388 * sparclinux.c (linux_tally_symbols): Likewise.
4389 * pdp11.c (aout_link_write_other_symbol): Likewise.
4390 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
4391 * xcofflink.c (xcoff_build_ldsyms): Likewise.
4392 (xcoff_write_global_symbol): Likewise.
4393
4394 * cofflink.c (_bfd_coff_final_link): Formatting.
4395 * cpu-mips.c (mips_compatible): Make static, prototype.
4396 * elf32-i386.c (elf_i386_check_relocs): Formatting.
4397 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
4398 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
4399 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
4400 (mips_elf64_final_link): Likewise.
4401 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
4402 prototype.
4403
4404 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
4405
4406 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
4407 (SWAP_OUT_RELOC_OFFSET): Define.
4408
4409 2002-03-27 Gregory Steuck <greg@nest.cx>
4410
4411 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
4412 terminating NULL if empty symbol table.
4413 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
4414
4415 2002-03-26 H.J. Lu (hjl@gnu.org)
4416
4417 * elflink.h (elf_link_input_bfd): Revert the last change since
4418 the gcc exception handling isn't fixed yet.
4419
4420 2002-03-26 H.J. Lu (hjl@gnu.org)
4421
4422 * elflink.h (elf_link_input_bfd): Complain about relocations
4423 against local symbols in discarded sections.
4424
4425 2002-03-26 Alan Modra <amodra@bigpond.net.au>
4426
4427 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
4428
4429 2002-03-23 Alan Modra <amodra@bigpond.net.au>
4430
4431 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
4432 section file offset for !SEC_LOAD sections.
4433
4434 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
4435
4436 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
4437 <case R_ARM_GOT>): Handle relocations to Thumb functions.
4438
4439 2002-03-21 Alan Modra <amodra@bigpond.net.au>
4440
4441 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
4442 Whitespace changes.
4443 * archive.c: Update copyright date.
4444 * bfd-in2.h: Regenerate.
4445 * libbfd.h: Regenerate.
4446 * Makefile.am: Run "make dep-am"
4447 * Makefile.in: Regenerate.
4448 * po/SRC-POTFILES.in: Regenerate.
4449
4450 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
4451
4452 * dwarf2.c (struct funcinfo): Move up.
4453 (lookup_address_in_function_table): New argument function_ptr.
4454 Set it.
4455 (lookup_address_in_line_table): New argument function. If function
4456 is non-NULL, use it to handle ``addr'' before the first line note of
4457 the function.
4458 (comp_unit_find_nearest_line): Update and swap calls to
4459 lookup_address_in_function_table and lookup_address_in_line_table.
4460 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
4461 N_SLINE encountered if we see an N_FUN before any N_SLINE.
4462
4463 2002-03-20 Tom Rix <trix@redhat.com>
4464
4465 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
4466 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
4467 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
4468
4469 2002-03-19 Tom Rix <trix@redhat.com>
4470
4471 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
4472 dynamic objects in archives.
4473
4474 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
4475
4476 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
4477 STT_NOTYPE symbols to STT_OBJECT.
4478
4479 2002-03-18 Jan Hubicka <jh@suse.cz>
4480
4481 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
4482
4483 2002-03-18 Tom Rix <trix@redhat.com>
4484
4485 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
4486 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
4487 * coff-rs6000 (do_pad) : New function for archive padding.
4488 (do_copy) : New function for object file copying in archives.
4489 (do_shared_object_padding) : New function for padding shared
4490 objects to their text section alignment in archives.
4491 (bfd_xcoff_ar_achive_set_magic) : Stub.
4492 (xcoff_write_armap_big) : Use do_copy and do_pad.
4493 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
4494 do_copy and do_pad.
4495 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
4496 bfd_xcoff_magic_number.
4497 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
4498 fop.
4499 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
4500 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
4501 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
4502 * rs6000-core.c : Update copyright date.
4503 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
4504 csectpp.
4505 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
4506 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
4507 (coff_set_flags) : Use bfd_xcoff_magic_number.
4508 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
4509 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
4510 * Makefile.am : Same.
4511 * config.bfd : Same.
4512 * targets.c : Same.
4513 * configure : Regnerate.
4514 * Makefile.in : Same.
4515 * bfd-in2.h : Same.
4516
4517 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
4518
4519 * po/fr.po: Updated version.
4520
4521 2002-03-18 Alan Modra <amodra@bigpond.net.au>
4522
4523 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
4524 * libbfd.h: Regenerate.
4525 * archive.c (coff_write_armap): Pass on failures from
4526 bfd_write_bigendian_4byte_int.
4527
4528 2002-03-14 H.J. Lu <hjl@gnu.org>
4529
4530 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
4531 error to bfd_error_nonrepresentable_section for reinit_array
4532 section in DSO.
4533
4534 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
4535
4536 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
4537 OR it in rather than replacing previously selected flags.
4538
4539 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
4540 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
4541
4542 2002-03-14 Alan Modra <amodra@bigpond.net.au>
4543
4544 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
4545 (N): Use the above.
4546 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
4547 ensure reloc size matches before calling elf_link_input_bfd.
4548 Add an assert to check reloc size when counting output relocs.
4549
4550 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
4551
4552 * mmo.c (mmo_get_loc): Return NULL rather than false.
4553
4554 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
4555
4556 * po/fr.po: Updated version.
4557
4558 2002-03-13 Alan Modra <amodra@bigpond.net.au>
4559
4560 * archures.c (bfd_default_compatible): Test bits_per_word.
4561 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
4562 bfd_default_compatible.
4563 * cpu-i370.c (i370_compatible): Likewise.
4564 * cpu-sparc.c (sparc_compatible): Likewise.
4565 * cpu-h8300.c (compatible): Test in->arch == out->arch.
4566
4567 * elflink.h: Formatting fixes.
4568 (elf_link_output_extsym): Merge undefined and undef weak cases.
4569
4570 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
4571 when word size of input matches output word size.
4572
4573 2002-03-12 Andreas Jaeger <aj@suse.de>
4574
4575 * cpu-i386.c (i386_compatible): New. Use it instead of
4576 bfd_default_compatible.
4577
4578 2002-03-07 H.J. Lu (hjl@gnu.org)
4579
4580 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
4581 as the type for bfd_reloc_val.
4582
4583 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
4584
4585 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
4586 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
4587 (elf_hppa_final_link_relocate): Correct relocations for indirect
4588 references to local data through the DLT. Fix .opd creation for
4589 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
4590 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
4591 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
4592 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4593 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
4594 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
4595 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4596
4597 2002-03-05 Jakub Jelinek <jakub@redhat.com>
4598
4599 * merge.c (_bfd_merge_sections): Don't segfault if there
4600 is nothing to merge due to GC.
4601
4602 2002-03-05 Alan Modra <amodra@bigpond.net.au>
4603
4604 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
4605 symbols that have been forced local.
4606
4607 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
4608 to output forced local syms for non-shared link.
4609 (elf_link_output_extsym): Tweak condition for calling backend
4610 adjust_dynamic_symbol so that previous behaviour is kept.
4611 Whitespace changes throughout file.
4612
4613 2002-03-04 H.J. Lu <hjl@gnu.org>
4614
4615 * elf.c (bfd_section_from_shdr): Handle special sections,
4616 .init_array, .fini_array and .preinit_array.
4617 (elf_fake_sections): Likewise.
4618
4619 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
4620 DT entry only if the section is in output for .init_array,
4621 .fini_array and .preinit_array. Complain about .preinit_array
4622 section in DSO.
4623 (elf_bfd_final_link): Warn zero size for .init_array,
4624 .fini_array and .preinit_array sections.
4625
4626 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
4627 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
4628 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
4629 .preinit_array.
4630
4631 2002-03-04 Alan Modra <amodra@bigpond.net.au>
4632
4633 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
4634 * configure: Regenerate.
4635
4636 2002-03-02 Tom Rix <trix@redhat.com>
4637
4638 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
4639 symbolic equiv.
4640 * coff-rs6000.c (xcoff_howto_table): Same.
4641
4642 2002-03-01 David Mosberger <davidm@hpl.hp.com>
4643
4644 * elflink.h (size_dynamic_sections): If section named
4645 ".preinit_array" exists, create DT_PREINIT_ARRAY and
4646 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
4647 ".init_array" and ".fini_array".
4648 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
4649 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
4650 DT_FINI_ARRAY.
4651
4652 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
4653
4654 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
4655 dynsyms.
4656
4657 2002-02-25 Alan Modra <amodra@bigpond.net.au>
4658
4659 * elf64-hppa.h: Update copyright date.
4660
4661 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
4662 (ppc64_elf_relocate_section): Don't generate power4 style branch
4663 hints for *_BRTAKEN and *_BRNTAKEN relocs.
4664
4665 2002-02-22 Jakub Jelinek <jakub@redhat.com>
4666
4667 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
4668 last patch.
4669 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4670
4671 2002-02-21 Andreas Jaeger <aj@suse.de>
4672
4673 * elf64-x86-64.c: Major rework that introduces all recent changes
4674 to the x86-64 backend. Get a closer match to elf32-i386.
4675 (struct elf64_x86_64_dyn_relocs): Rename from
4676 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
4677 all users.
4678 (struct elf64_x86_64_link_hash_table): Add short cuts to some
4679 sections.
4680 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
4681 remove casts, initialize new hash members.
4682 (create_got_section): New.
4683 (elf64_x86_64_create_dynamic_sections): New.
4684 (elf64_x86_64_copy_indirect_symbol): New.
4685 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
4686 relocs, .got or .relgot here but do it in allocate_dynrelocs.
4687 Reference count possible .plt and .got entries. Don't test input
4688 section SEC_READONLY here to try to avoid copy relocs, and keep
4689 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
4690 DF_TEXTREL here. Delay setting of variables until needed. Cache
4691 pointer to "sreloc" section in elf_section_data. Tweak condition
4692 under which .got created. Report files with bad relocation
4693 section names.
4694 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
4695 Reference count possible .plt entries. Don't deallocate .got and
4696 .relgot space here.
4697 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
4698 do copy reloc processing for weakdefs. Remove redundant casts and
4699 aborts. Delay setting of vars until needed. Move creation of
4700 dynamic symbols and allocation of .plt and .rela.plt to
4701 allocate_dynrelocs. Replace BFD_ASSERT with abort.
4702 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4703 (allocate_dynrelocs): New.
4704 (readonly_dynrelocs): New.
4705 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
4706 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
4707 Zero out the dynamic allocated content space.
4708 (elf64_x86_64_discard_copies): Removed.
4709 (elf64_x86_64_relocate_section): Make use of dynamic section
4710 short-cuts. Localise vars, and delay setting. Better error
4711 reporting, replace BFD_ASSERT with abort. Check
4712 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
4713 regular object file and tread the weak definition as the normal
4714 one. Don't discard relocs for undefweak or undefined symbols and
4715 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
4716 relocs.
4717 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
4718 symbols that have been forced local. Use same test to decide if
4719 we can use a relative reloc for got as relocate_section. Expand
4720 SHN_UNDEF comment. Move expressions out of function calls.
4721 Replace BFD_ASSERT with abort.
4722 (bfd_elf64_bfd_final_link): Removed.
4723 (elf_backend_copy_indirect_symbol): Define.
4724
4725 2002-02-20 Tom Rix <trix@redhat.com>
4726
4727 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
4728 (_bfd_xcoff_reloc_type_lookup): Use it.
4729 * coff64-rs6000.c (xcoff64_howto_table): Same.
4730 (xcoff64_reloc_type_lookup): Same.
4731
4732 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
4733
4734 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
4735 little endian.
4736
4737 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
4738
4739 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
4740 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
4741 * bfd-in2.h: Regenerate.
4742 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
4743 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
4744 with "s390:64-bit".
4745 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
4746 (elf_s390_reloc_type_lookup): Likewise.
4747 (elf_s390_check_relocs): Likewise.
4748 (elf_s390_gc_sweep_hook): Likewise.
4749 (elf_s390_relocate_section): Likewise.
4750 (elf_s390_object_p): Use renamed architecture define.
4751 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
4752
4753 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
4754
4755 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
4756
4757 2002-02-19 Jakub Jelinek <jakub@redhat.com>
4758
4759 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
4760 absptr -> pcrel optimization for shared libs.
4761 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
4762 library cannot be converted to pcrel.
4763 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
4764 relative.
4765 * elf32-i386.c (elf_i386_relocate_section): If
4766 _bfd_elf_section_offset returned -2, skip, but make sure the
4767 relocation is installed.
4768 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
4769 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4770 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4771 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4772 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4773 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4774 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4775 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4776 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4777 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4778 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4779 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4780 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4781 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4782 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
4783 _bfd_elf_section_offset returning -2 the same way as -1.
4784 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
4785 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
4786 and BFD_ASSERT.
4787 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
4788
4789 2002-02-18 Tom Rix <trix@redhat.com>
4790
4791 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
4792 (bfd_xcoff_size_dynamic_sections): Same.
4793 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
4794 (bfd_xcoff_size_dynamic_sections): Same.
4795 * coff-rs6000.c (xcoff_generate_rtinit): Same.
4796 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
4797 * libxcoff.h (struct xcoff_backend_data_rec): Same.
4798 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
4799 * bfd-in2.h: Regenerate.
4800
4801 2002-02-18 Alan Modra <amodra@bigpond.net.au>
4802
4803 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
4804 (struct ppc_link_hash_table): Add sfpr.
4805 (ppc64_elf_link_hash_table_create): Init it.
4806 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
4807 .glink out to..
4808 (create_linkage_sections): ..here. Make .sfpr too.
4809 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
4810 dynobj early.
4811 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
4812 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
4813 ._restf* functions, and create as needed.
4814 (func_desc_adjust): Only force_local for shared libs.
4815
4816 2002-02-18 David O'Brien <obrien@FreeBSD.org>
4817
4818 * configure.in: Bump version number post 2.12 branching.
4819 * configure: Regenerate.
4820
4821 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
4822
4823 * mmo.c: Correct and improve comments.
4824 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
4825 zero-pad. Use input to fill up non-empty bfd buffer.
4826 (mmo_flush_chunk): New function.
4827 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
4828 changed. Don't emit location specifier if VMA is same as
4829 *LAST_VMAP after omitting leading zero contents. Call
4830 mmo_flush_chunk before emitting location specifier.
4831 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
4832 with mmo_write_loc_chunk calls.
4833 (mmo_internal_write_section): Call mmo_flush_chunk after
4834 mmo_write_chunk.
4835 (mmo_write_symbols_and_terminator): Move :Main to first position
4836 in symbol array. Add faked one if it does not exist if there are
4837 other symbols. Don't add it if there are no symbols at all. Move
4838 out test for value of :Main from symbol loop. Rename table
4839 fakemain to maintable and variable mainsym to fakemain.
4840
4841 2002-02-15 Richard Henderson <rth@redhat.com>
4842
4843 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
4844 section with no got matches any got. Simplify error generaion.
4845
4846 2002-02-15 Alan Modra <amodra@bigpond.net.au>
4847
4848 Support arbitrary length fill patterns.
4849 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
4850 (_bfd_default_link_order): Remove bfd_fill_link_order code.
4851 Call default_data_link_order.
4852 (default_fill_link_order): Delete.
4853 (default_data_link_order): New function.
4854 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
4855 of bfd_fill_link_order with bfd_data_link_order.
4856 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
4857 * elf64-mips.c (mips_elf64_final_link): Likewise.
4858
4859 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
4860 Correct value returned in "end" for "0x<non-hex>".
4861
4862 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
4863
4864 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
4865 (scan): Test against 'mach' field in info structure.
4866
4867 2002-02-14 Alan Modra <amodra@bigpond.net.au>
4868
4869 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
4870
4871 2002-02-14 Matt Fredette <fredette@netbsd.org>
4872
4873 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
4874 EF_M68000.
4875
4876 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
4877
4878 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
4879 non-zero physical addresses when adjusting the LMAs of new
4880 sections.
4881
4882 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4883
4884 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
4885 from _bfd_elf_hppa_gen_reloc_type.
4886 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
4887 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
4888 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
4889 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
4890
4891 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
4892
4893 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
4894 loading its contents if there's nothing to do in it.
4895
4896 2002-02-12 Alan Modra <amodra@bigpond.net.au>
4897
4898 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
4899 64k boundary.
4900
4901 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
4902 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
4903 (ppc64_elf_finish_dynamic_sections): Set values for them.
4904
4905 2002-02-11 Michael Snyder <msnyder@redhat.com>
4906
4907 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
4908 * elf.c (elfcore_grok_pstatus): Add prototype.
4909 (elfcore_grok_lwpstatus): Add prototype.
4910 (elfcore_write_lwpstatus): New function.
4911 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
4912
4913 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
4914
4915 * elf32-sh.c: Added missing prototypes.
4916 * elf32-sh64.c: Likewise.
4917 (sh_elf_align_loads): Mark unused args as such.
4918 * elf64-sh64.c: Added missing prototypes.
4919 (struct elf_sh64_link_hash_entry): Fix typo.
4920 (sh_elf64_relocate_section): Fix info argument passed to
4921 _bfd_elf_section_offset.
4922
4923 2002-02-11 Alan Modra <amodra@bigpond.net.au>
4924
4925 * Makefile.am: "make dep-am".
4926 * Makefile.in: Regenerate.
4927 * aclocal.m4: Regenerate.
4928 * config.in: Regenerate.
4929 * configure: Regenerate.
4930
4931 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
4932
4933 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
4934 variable warnings.
4935 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
4936 comparison warning.
4937 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
4938 cast warnings for the common case.
4939
4940 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
4941
4942 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
4943 vectors.
4944 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
4945 vectors.
4946
4947 2002-02-09 Richard Henderson <rth@redhat.com>
4948
4949 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
4950 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
4951 (elf64_alpha_relocate_section): Likewise.
4952 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
4953 * bfd-in2.h, libbfd.h: Rebuild.
4954
4955 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
4956
4957 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
4958 that base-plus-offset reloc accounting is consistent.
4959 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
4960 up to date for undefined symbols.
4961
4962 2002-02-08 Eric Christopher <echristo@redhat.com>
4963
4964 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4965
4966 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
4967 sections for the O32 ABI.
4968
4969 2002-02-08 Chris Demetriou <cgd@broadcom.com>
4970
4971 * elf32-arm.h: Fix formatting of _("...").
4972 * elf32-d10v.c: Likewise.
4973 * elf32-m68k.c: Likewise.
4974 * elf32-mips.c: Likewise.
4975
4976 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
4977
4978 * coff-or32.c: Fix compile time warning messages.
4979
4980 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
4981
4982 Contribute sh64-elf.
4983 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
4984 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
4985 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
4986 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
4987 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
4988 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
4989 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
4990 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
4991 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
4992 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
4993 New relocs.
4994 * libbfd.h, bfd-in2.h: Rebuilt.
4995 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
4996 (sh_reloc_map): Map them.
4997 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
4998 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
4999 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
5000 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5001 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
5002 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
5003 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
5004 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
5005 datalabel_got_offset.
5006 (sh_elf_link_hash_newfunc): Initialize it.
5007 (sh_elf_relocate_section): Augment the scope of
5008 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
5009 GOT and GOTOFF handling to new SHmedia relocation types. Support
5010 GOT_BIAS.
5011 (sh_elf_check_relocs): Likewise.
5012 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
5013 PLT entries using movi_shori_putval. Support GOT_BIAS.
5014 (sh_elf_finish_dynamic_sections): Likewise.
5015 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
5016 relocation, it's now done by the caller.
5017 (GOT_BIAS): New.
5018 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
5019 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
5020 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
5021 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
5022 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
5023 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
5024 sh64_elf64_hash_table): New.
5025 (sh_elf64_howto_table): Introduce new relocs.
5026 (sh_elf64_info_to_howto): Accept new PIC relocs.
5027 (sh_elf64_relocate_section): Augment the scope of
5028 seen_stt_datalabel. Support new PIC relocs.
5029 (sh_elf64_check_relocs): Support new PIC relocs.
5030 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
5031 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
5032 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
5033 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
5034 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
5035 movi_shori_putval, movi_3shori_putval,
5036 sh64_elf64_create_dynamic_sections,
5037 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
5038 sh64_elf64_size_dynamic_sections,
5039 sh64_elf64_finish_dynamic_symbol,
5040 sh64_elf64_finish_dynamic_sections): New.
5041 (elf_backend_create_dynamic-sections,
5042 bfd_elf64_bfd_link_hash_table_create,
5043 elf_backend_adjust_dynamic_symbol,
5044 elf_backend_size_dynamic_sections,
5045 elf_backend_finish_dynamic_symbol,
5046 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5047 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5048 elf_backend_got_header_size, elf_backend_plt_header_size):
5049 Define.
5050 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
5051 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
5052 match official numbers and names; moved unmaching ones to the
5053 range 0xf2-0xff.
5054 * elf32-sh64.c, elf64-sh64.c: Likewise.
5055 2001-03-12 DJ Delorie <dj@redhat.com>
5056 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
5057 sections.
5058 2001-03-12 DJ Delorie <dj@redhat.com>
5059 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
5060 be aligned.
5061 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
5062 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
5063 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
5064 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
5065 .cranges section with SEC_SORT_ENTRIES set.
5066 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
5067 incoming sorted .cranges section.
5068 (sh64_bfd_elf_copy_private_section_data): New.
5069 (sh64_elf_final_write_processing): Only sort .cranges and modify
5070 start address if called by linker.
5071 2001-01-08 Ben Elliston <bje@redhat.com>
5072 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
5073 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
5074 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
5075 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
5076 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
5077 line. Add comments before all entries.
5078 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
5079 comment.
5080 (sh_elf64_reloc): Correct head comment.
5081 (sh_elf64_relocate_section): Correct spacing.
5082 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
5083 instead call reloc_dangerous callback.
5084 <case R_SH_SHMEDIA_CODE>: New case.
5085 (sh_elf64_gc_mark_hook): Correct spacing.
5086 (sh_elf64_check_relocs): Ditto.
5087 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
5088 New case.
5089 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
5090 functions.
5091 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
5092 clarify describing comment. Add comments before all entries.
5093 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
5094 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
5095 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
5096 Sort .cranges section in final link. Prepare to set bit 0 on
5097 entry address.
5098 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
5099 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
5100 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
5101 .cranges section.
5102 (sh64_backend_section_from_shdr): New, to recognize
5103 SHT_SH5_CR_SORTED on incoming .cranges section.
5104 (elf_backend_section_from_shdr): Define.
5105 (sh64_elf_final_write_processing): Sort outgoing .cranges
5106 section. (New, temporarily disabled:) Set bit 0 on entry address
5107 according to ISA type.
5108 (sh64_find_section_for_address): New.
5109 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
5110 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
5111 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
5112 bfd_malloc, not xmalloc.
5113 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
5114 global.
5115 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
5116 temporarily disabled) setting bit 0 on entry address.
5117 (elf_backend_final_write_processing): Define.
5118 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
5119 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
5120 be a proper relocation for PTA and PTB rather than a marker.
5121 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
5122 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
5123 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
5124 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
5125 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
5126 Zero src_mask.
5127 * elf64-sh64.c: Ditto.
5128 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
5129 * elf32-sh64.c: Include opcodes/sh64-opc.h
5130 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
5131 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
5132 parameters. No unused parameters. Caller changed.
5133 <case R_SH_PT_16>: New case.
5134 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
5135 * Makefile.in: Regenerate.
5136 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
5137 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
5138 all code sections.
5139 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5140 (sh64_elf_merge_private_data): Ditto.
5141 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
5142 to access stored section flags.
5143 (sh64_elf_final_write_processing): Return immediately unless
5144 called by linker. Use sh64_elf_section_data (cranges) to get size
5145 of linker-generated cranges entries.
5146 (sh64_elf_copy_private_data): Add missing "return true".
5147 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5148 (sh_elf64_merge_private_data): Ditto.
5149 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
5150 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
5151 elf64-sh64.c:sh64_elf_fake_sections.
5152 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
5153 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
5154 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
5155 (sh64_elf_final_write_processing): New.
5156 (elf_backend_final_write_processing): Define.
5157 (sh64_elf_fake_sections): Get header flags from tdata field.
5158 (sh64_elf_copy_private_data): Do not call
5159 sh64_elf_copy_private_data_internal, just copy e_flags field.
5160 (sh64_elf_merge_private_data): Do not call
5161 sh64_elf_copy_private_data_internal.
5162 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
5163 Remove EF_SH64_ABI64, let ELF size make difference.
5164 Remove SH64-specific BFD section flag.
5165 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
5166 containing SHmedia through elf_section_data (asect)->tdata
5167 non-zero, not using a BFD section flag.
5168 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
5169 (sh64_elf_merge_private_data): Similar.
5170 (elf_backend_section_flags): Don't define.
5171 (sh64_elf_backend_section_flags): Delete.
5172 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
5173 not EF_SH64_ABI64.
5174 (sh_elf64_merge_private_data): Similar.
5175 * section.c (Section flags definitions): Don't define
5176 SEC_SH_ISA_SHMEDIA.
5177 (bfd-in2.h): Regenerate.
5178 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
5179 Make DataLabel references work with partial linking.
5180 * elf32-sh64.c: Fix formatting.
5181 (sh64_elf_link_output_symbol_hook): New.
5182 (elf_backend_link_output_symbol_hook): Define to
5183 sh64_elf_link_output_symbol_hook.
5184 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
5185 undefined if partial linking. Adjust sanity check.
5186 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
5187 (elf_backend_link_output_symbol_hook): Define to
5188 sh64_elf64_link_output_symbol_hook.
5189 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
5190 undefined if partial linking. Adjust sanity check.
5191 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
5192 Implement semantics for inter-file DataLabel references.
5193 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
5194 (sh64_elf64_add_symbol_hook): New.
5195 (sh_elf64_relocate_section): If passing an indirect symbol with
5196 st_type STT_DATALABEL on the way to a symbol with st_other
5197 STO_SH5_ISA32, do not bitor 1 to the relocation.
5198 (elf_backend_add_symbol_hook): Define to
5199 sh64_elf64_add_symbol_hook.
5200 * elf64-sh32.c: Tweak comments.
5201 (DATALABEL_SUFFIX): Define.
5202 (sh64_elf_add_symbol_hook): New.
5203 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
5204 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
5205 symbol with st_type STT_DATALABEL on the way to a symbol with
5206 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
5207 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
5208 Pass through STT_DATALABEL.
5209 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
5210 (elf_backend_get_symbol_type): Define.
5211 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
5212 (elf_backend_get_symbol_type): Define.
5213 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
5214 * elf32-sh64.c: Tweak comments.
5215 (sh64_elf_copy_private_data_internal): Add prototype.
5216 (bfd_elf32_bfd_set_private_flags): Define.
5217 (sh64_elf_copy_private_data_internal): Compare machine name, not
5218 textual BFD target name, to check whether to copy section flag
5219 SHF_SH5_ISA32.
5220 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
5221 Tweak section-contents-type-mismatch message.
5222 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
5223 Validize reloc-types.
5224 * elf64-sh64.c: New file.
5225 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
5226 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
5227 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
5228 Regenerate dependencies.
5229 * Makefile.in: Regenerate.
5230 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
5231 bfd_elf64_sh64l_vec.
5232 * configure.in: Handle bfd_elf64_sh64_vec and
5233 bfd_elf64_sh64l_vec.
5234 * configure: Regenerate.
5235 * po/POTFILES.in: Regenerate.
5236 * po/bfd.pot: Regenerate.
5237 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
5238 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
5239 anything else but EF_SH64 and EF_SH64_ABI64.
5240 (sh64_elf_merge_private_data): Emit error for anything else but
5241 EF_SH64 and EF_SH64_ABI64.
5242 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
5243 from targ_selvecs.
5244 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
5245 bfd_elf32_sh64l_vec as a temporary measure.
5246 * configure: Regenerate.
5247 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
5248 * cpu-sh.c (arch_info_struct): Include sh5 item
5249 unconditionalized.
5250 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
5251 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
5252 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
5253 * elf32-sh64.c: Tweak comments.
5254 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
5255 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
5256 (sh64_elf_copy_private_data_internal): Wrap long line.
5257 (sh64_elf_merge_private_data): Rewrite to allow objects from
5258 SH64 subsets to be linked together.
5259 (INCLUDE_SHMEDIA): Define.
5260 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
5261 Parenthesize plus-expression inside or-expression.
5262 <global symbol>: Ditto.
5263 (sh_elf_set_mach_from_flags): Remove code refusing
5264 deleted EF_SH64_32BIT_ABI flag.
5265 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
5266 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
5267 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
5268 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
5269 (sh_elf_relocate_section) <local symbol>: Or 1 in
5270 calculation of relocation if sym->st_other & STO_SH5_ISA32.
5271 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
5272 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
5273 relocation.
5274 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
5275 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
5276 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
5277 Regenerate dependencies.
5278 * Makefile.in: Regenerate.
5279 * archures.c: Add bfd_mach_sh5.
5280 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
5281 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
5282 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
5283 * configure: Regenerate.
5284 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
5285 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
5286 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
5287 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
5288 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
5289 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
5290 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
5291 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
5292 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
5293 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
5294 in item for SH5.
5295 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
5296 for SHmedia relocs.
5297 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
5298 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
5299 shmedia_prepare_reloc, goto final_link_relocate if it returns
5300 non-zero, else fail as before.
5301 (sh_elf_set_mach_from_flags): Provide function only if not defined
5302 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
5303 (sh_elf_set_private_flags): Provide function only if not defined
5304 as a macro.
5305 (sh_elf_copy_private_data): Similar.
5306 (sh_elf_merge_private_data): Similar.
5307 * section.c (SEC_SH_ISA_SHMEDIA): New.
5308 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
5309 * elf32-sh64.c: New file.
5310 * libbfd.h: Regenerate.
5311 * bfd-in2.h: Regenerate.
5312 * po/POTFILES.in: Regenerate.
5313 * po/bfd.pot: Regenerate.
5314 * bfd-in2.h: Regenerate.
5315 * libbfd.h: Regenerate.
5316
5317 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
5318
5319 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
5320 been included, not drag it in.
5321 * bfd-in2.h: Regenerate.
5322
5323 2002-02-06 H.J. Lu (hjl@gnu.org)
5324
5325 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
5326 the mach and ISA fields if necessary.
5327
5328 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
5329
5330 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
5331 ARM architecture when an F_ARM_5 flag is detected, since we cannot
5332 be sure exactly which architecture this represents.
5333
5334 2002-02-05 Nick Clifton <nickc@redhat.com>
5335
5336 * po/tr.po: Updated translation.
5337
5338 2002-02-05 Alan Modra <amodra@bigpond.net.au>
5339
5340 From Jimi X <jimix@watson.ibm.com>
5341 * archures (bfd_mach_ppc64): Define.
5342 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
5343 (bfd_powerpc_arch): Define.
5344 * bfd-in2.h: Regenerate.
5345 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
5346 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
5347 (bfd_powerpc_archs): Add default powerpc64 arch.
5348
5349 2002-02-05 Alan Modra <amodra@bigpond.net.au>
5350
5351 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
5352 against section syms in readonly sections. Don't do the global
5353 sym check if we find one.
5354 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
5355 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
5356 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
5357 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
5358 (elf_s390_grok_prstatus): Add missing prototype.
5359
5360 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
5361
5362 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
5363 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
5364 Call bfd_get_section_by_name only once. Initialize
5365 bpodata->n_bpo_relocs_this_section.
5366 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
5367 referring to DSOs.
5368 (bpo_reloc_request_sort_fn): Don't use difference of values as
5369 return-value.
5370
5371 2002-02-02 David O'Brien <obrien@FreeBSD>
5372
5373 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
5374 version 4.5 and later the same as 5-CURRENT.
5375 * configure: Re-generate.
5376
5377 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
5378
5379 * config.bfd (hppa*-*-netbsd*): New target.
5380
5381 2002-01-31 Philipp Thomas <pthomas@suse.de>
5382
5383 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
5384 to front of message. Unify messages with elf32-arm.h. Use
5385 commas where neccessary.
5386 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
5387 ERROR in messages. Unify messages with coff-arm.c. Correct
5388 VFP/FPA error message.
5389 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
5390 APCS-32 for translation.
5391
5392 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
5393
5394 Perform on-demand global register allocation from
5395 R_MMIX_BASE_PLUS_OFFSET relocs.
5396 * elf64-mmix.c (struct bpo_reloc_section_info, struct
5397 bpo_reloc_request, struct bpo_greg_section_info): New.
5398 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
5399 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
5400 _bfd_mmix_check_all_relocs,
5401 _bfd_mmix_prepare_linker_allocated_gregs,
5402 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
5403 (elf_mmix_howto_table): Correct src_mask for most relocs.
5404 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
5405 case.
5406 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
5407 case. Fix typo in comment. New label do_mmix_reloc.
5408 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
5409 store first object file with a base-plus-offset reloc. Call
5410 mmix_elf_check_common_relocs for the part common with mmo.
5411 (mmix_elf_final_link): Write out linker-allocated register
5412 contents section.
5413 (elf_backend_gc_sweep_hook): Define.
5414 (bfd_elf64_bfd_relax_section): Define.
5415
5416 * mmo.c: Don't include <ctype.h>
5417 (mmo_init): Correct init-once logic.
5418
5419 2002-02-01 Tom Rix <trix@redhat.com>
5420
5421 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
5422
5423 2002-02-01 Alan Modra <amodra@bigpond.net.au>
5424
5425 * Makefile.am: Run "make dep-am"
5426 * Makefile.in: Regenerate.
5427
5428 2002-01-31 David O'Brien <obrien@FreeBSD>
5429
5430 * configure.in: Recognize the differences in core files from FreeBSD
5431 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
5432 5-CURRENT.
5433 * configure: Regenerate.
5434
5435 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
5436
5437 * coff-or32.c: New file.
5438 * cpu-or32.c: New file.
5439 * elf32-or32.c: New file.
5440 * archures.c: Add support for or32.
5441 * targets.c: Add support for or32.
5442 * bfd-in2.h: Regenerate.
5443 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
5444 coff_write_object_contents): Add support for or32.
5445 * config.bfd: Add target.
5446 * configure.in: Add support for or32.
5447 * configure: Regenerate.
5448 * Makefile.am: Add support for or32.
5449 * Makefile.in: Regenerate.
5450 * po/SRC-POTFILES.in: Add or32 files.
5451 * po/bfd.pot: Regenerate.
5452
5453 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
5454 Don Lindsay <lindsayd@cisco.com>
5455
5456 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
5457 false' with a return of a bfd_reloc_ error code.
5458
5459 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
5460
5461 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
5462 unexport unreferenced symbols when --export-dynamic. Call
5463 _bfd_elf_strtab_delref when unexporting.
5464
5465 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
5466
5467 * bfd-in.h: Include <stdbool.h> if it is available.
5468 * bfd-in2.h: Regenerated.
5469
5470 2002-01-31 Alan Modra <amodra@bigpond.net.au>
5471
5472 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
5473 not go via the plt.
5474
5475 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
5476
5477 * archures.c: Tidy up formatting of embedded comments.
5478 * bfd.c: Tidy up formatting of embedded comments.
5479 * bfd-in.h: Fix formatting of comments.
5480 * reloc.c: Tidy up formatting of ordinary & embedded comments.
5481 * section.c: Tidy up formatting of embedded comments.
5482 * syms.c: Tidy up formatting of embedded comments.
5483 * targets.c: Tidy up formatting of embedded comments.
5484
5485 * bfd-in2.h: Regenerate.
5486
5487 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
5488
5489 * vms-tir.c (cmd_name): New function.
5490 (tir_cmd_name): New function.
5491 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
5492 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
5493 Fix formatting.
5494
5495 * peXXigen.c (pe_print_idata): Rearrange message to aid in
5496 translation.
5497 (pe_print_pdata): Rearrange message to aid in translation.
5498
5499 * libbfd.c (warn_deprecated): Rearrange error message to aid in
5500 translation.
5501
5502 * ihex.c (ihex_write_object_contents): Fix spelling typo.
5503
5504 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
5505
5506 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
5507 message to aid in translation.
5508
5509 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
5510 to aid in translation.
5511
5512 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
5513
5514 2002-01-30 Philipp Thomas <pthomas@suse.de>
5515
5516 * coff-arm.c, elf32-elf.h: Unify messages.
5517
5518 2002-01-30 Nick Clifton <nickc@redhat.com>
5519
5520 * po/sv.po: Updated translation.
5521
5522 2002-01-30 Philipp Thomas <pthomas@suse.de>
5523
5524 * dwarf2.c (read_abbrev): Use full section name in error message.
5525 (decode_line_info): Likewise.
5526
5527 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
5528 message.
5529
5530 2002-01-30 Alan Modra <amodra@bigpond.net.au>
5531
5532 * elf64-ppc.c (func_desc_adjust): Only provide missing function
5533 descriptor symbols for undefined function code syms. Clear
5534 ELF_LINK_NON_ELF so that they can stay weak.
5535
5536 2002-01-29 Chris Demetriou <cgd@broadcom.com>
5537 Mitch Lichtenberg <mpl@broadcom.com>
5538
5539 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
5540 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
5541 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
5542 generation.
5543 * bfd-in2.h: Regenerate.
5544
5545 2002-01-29 Chris Demetriou <cgd@broadcom.com>
5546
5547 * elf32-mips.c: Add additional comments about HI16 relocation
5548 processing.
5549 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
5550 pc-relative relocations. (Reverts change made on 2001-10-31.)
5551 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
5552 for pc-relative relocations.
5553 (mips_elf_calculate_relocation): Add a comment about a kludge
5554 in the R_MIPS_GNU_REL_HI16 handling.
5555 (_bfd_mips_elf_relocate_section): Implement that kludge;
5556 adjust pc-relative HI16 relocation for difference in HI16 and
5557 LO16 addresses, since it can't easily be done in
5558 mips_elf_calculate_relocation.
5559
5560 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
5561
5562 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
5563 relocations with PC32 relocations for undefined or weak symbols.
5564 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
5565 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
5566
5567 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
5568
5569 * elfcore.h (elf_core_file_p): Improve comment for last change.
5570
5571 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
5572
5573 * configure: Regenerated.
5574
5575 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
5576
5577 * elfcore.h (elf_core_file_p): Set the machine architecture
5578 before processing the program headers.
5579
5580 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
5581
5582 * configure.in <64-bit configuration>: If using gcc, check and
5583 emit error for egcs-1.1.2.
5584 * configure: Regenerate.
5585
5586 2002-01-26 Egor Duda <deo@logos-m.ru>
5587
5588 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
5589 as possible to avoid stack corruption.
5590
5591 2002-01-26 Richard Henderson <rth@redhat.com>
5592
5593 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
5594 for non-allocated sections.
5595
5596 2002-01-25 Mark Kettenis <kettenis@gnu.org>
5597
5598 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
5599 prstat.pr_reg even if it is a struct.
5600
5601 2002-01-25 Steve Ellcey <sje@cup.hp.com>
5602
5603 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
5604
5605 2002-01-25 Philipp Thomas <pthomas@suse.de>
5606
5607 * coffgen.c (coff_print_symbol): Don't mark info message
5608 for translation.
5609
5610 2002-01-25 Nick Clifton <nickc@redhat.com>
5611
5612 * po/fr.po: Updated translation.
5613 * po/es.po: Updated translation.
5614
5615 2002-01-25 Philipp Thomas <pthomas@suse.de>
5616
5617 * coff-alpha.c (alpha_relocate_section): Unify warning message
5618 for GP relative relocations without GP defined.
5619 * coff-mips.c (mips_relocate_section): Likewise.
5620
5621 2002-01-25 Alan Modra <amodra@bigpond.net.au>
5622
5623 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
5624 unsigned overflow when new_offset < old_offset.
5625
5626 2002-01-24 Philipp Thomas <pthomas@suse.de>
5627
5628 * bfd.c (_bfd_abort): Fix typo.
5629
5630 2002-01-23 Richard Henderson <rth@redhat.com>
5631
5632 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
5633 plt entries for undefweak symbols.
5634
5635 2002-01-23 Steve Ellcey <sje@cup.hp.com>
5636
5637 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
5638 (bfd_elf64_ia64_hpux_big_vec): Ditto.
5639 (bfd_elf32_h8300_vec): Ditto.
5640
5641 2002-01-23 Alan Modra <amodra@bigpond.net.au>
5642
5643 * elf64-ppc.c: Remove stale part of ABI comment.
5644 (NO_OPD_RELOCS): Define.
5645 (ppc64_elf_check_relocs): Use it.
5646 (ppc64_elf_relocate_section): Here too.
5647 (build_one_stub): Don't point function syms at the stub. Instead,
5648 hijack plt.offset.
5649 (ppc64_elf_relocate_section): Check whether REL24 relocs should
5650 really go to the stub. Make all dynamic relocs in opd against
5651 locals.
5652 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
5653 plt.offset.
5654
5655 2002-01-22 Richard Henderson <rth@redhat.com>
5656
5657 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
5658
5659 2002-01-22 Alan Modra <amodra@bigpond.net.au>
5660
5661 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
5662 TOC_BASE_OFF adjustment.
5663
5664 * Makefile.am: Run "make dep-am".
5665 * Makefile.in: Regenerate.
5666 * po/SRC-POTFILES.in: Regenerate.
5667
5668 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
5669
5670 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
5671 host defines.
5672
5673 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
5674
5675 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
5676 Check for and emit error if sgot is NULL at this point.
5677
5678 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
5679
5680 * config.bfd (ia64*-*-netbsd*): New target.
5681
5682 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
5683
5684 * som.c (som_write_space_strings): Comment typo fix.
5685
5686 2002-01-21 Alan Modra <amodra@bigpond.net.au>
5687
5688 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
5689 is_func_descriptor fields.
5690 (link_hash_newfunc): Init them.
5691 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
5692 dot are candidates for plt entries. When processing .opd relocs,
5693 set function descriptor strings to point inside function code
5694 string, and set new ppc_link_hash_entry fields.
5695 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
5696 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
5697 function descriptors. It's now done in..
5698 (func_desc_adjust): New.
5699 (ppc64_elf_func_desc_adjust): New.
5700 (define elf_backend_always_size_sections): Define.
5701 (ppc64_elf_hide_symbol): New.
5702 (define elf_backend_hide_symbol): Define.
5703 (allocate_dynrelocs): Remove code looking up function descriptors
5704 as that has been done earlier.
5705 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
5706 table.
5707 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
5708 up function descriptor.
5709 (build_one_stub): Look up the function code sym. Check for
5710 invalid plt offsets.
5711 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
5712 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
5713
5714 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
5715 boolean param.
5716 (_bfd_elf_link_hash_hide_symbol): Likewise.
5717 * elflink.h (elf_link_add_object_symbols): Adjust call to
5718 elf_backend_hide_symbol.
5719 (elf_fix_symbol_flags): Likewise.
5720 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
5721 than bfd_alloc.
5722 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
5723 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
5724 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
5725 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
5726 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
5727 and adjust to suit.
5728 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
5729 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
5730 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
5731
5732 2002-01-18 Alan Modra <amodra@bigpond.net.au>
5733
5734 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
5735 dynamic function descriptor symbol, not the associated function
5736 symbol.
5737
5738 2002-01-17 Eric Christopher <echristo@redhat.com>
5739
5740 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
5741
5742 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
5743
5744 * po/bfd.pot: Regenerate.
5745 * po/fr.po: Regenerate.
5746
5747 2002-01-17 Alan Modra <amodra@bigpond.net.au>
5748
5749 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
5750 Remove "Elf_Internal_Shdr *" param.
5751 (_bfd_mips_elf_section_from_bfd_section): Ditto.
5752 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
5753 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
5754 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
5755 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
5756 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
5757 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
5758 function to override special sections. Remove hdr arg from
5759 backend call, and don't loop.
5760
5761 2002-01-16 Eric Christopher <echristo@redhat.com>
5762
5763 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
5764 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
5765 relocations requiring gp0 and gp.
5766
5767 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
5768
5769 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
5770 EF_ARM_VFP_FLOAT.
5771 (elf32_arm_print_private_bfd_data): Likewise.
5772
5773 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
5774
5775 * po/tr.po: Import new version.
5776
5777 2002-01-16 Alan Modra <amodra@bigpond.net.au>
5778
5779 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
5780 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
5781 (ORI_R0_R0_0): Correct.
5782
5783 2002-01-16 Alan Modra <amodra@bigpond.net.au>
5784
5785 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
5786 when plt_not_loaded.
5787 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
5788 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
5789 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
5790 (ppc64_elf_glink_code): Delete.
5791 (PPC64_ELF_GLINK_SIZE): Delete.
5792 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
5793 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
5794 ORI_R0_R0_0): Define.
5795 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
5796 (struct ppc_link_hash_table): Add sstub and plt_overflow.
5797 (ppc64_elf_link_hash_table_create): Init them.
5798 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
5799 Don't copy to shared lib.
5800 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
5801 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
5802 (allocate_dynrelocs <plt>): Don't change function sym here. Make
5803 room for .stub and .glink code.
5804 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
5805 DT_PPC64_GLINK.
5806 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
5807 bfd_elf64_bfd_final_link.
5808 (bfd_elf64_bfd_final_link): Don't define.
5809 (ppc64_elf_size_stubs): New.
5810 (build_plt_stub): New.
5811 (build_one_stub): New.
5812 (ppc64_elf_build_stubs): New.
5813 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
5814 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
5815 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
5816 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
5817 case output sections not separate. Adjust DT_RELASZ to not
5818 include plt relocs. Set reserved got entry. Set got and plt
5819 entry size.
5820 (elf_backend_got_header_size): Set to 8.
5821 * elf64-ppc.h: New file.
5822
5823 2002-01-16 Alan Modra <amodra@bigpond.net.au>
5824
5825 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
5826 sections, use bfd_section_list_remove.
5827 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
5828 * elflink.h (elf_link_add_object_symbols): When removing all
5829 sections, use bfd_section_list_clear.
5830
5831 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5832
5833 * po/sv.po: New file: Swedish translation.
5834 * configure.in (ALL_LINGUAS): Add sv.
5835 * configure: Regenerate.
5836
5837 2002-01-15 Jakub Jelinek <jakub@redhat.com>
5838
5839 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
5840 * elf.c (merge_sections_remove_hook): New function.
5841 (_bfd_elf_merge_sections): Pass it as 3rd argument to
5842 _bfd_merge_sections.
5843 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
5844 * libbfd.h: Rebuilt.
5845 * merge.c (_bfd_merge_sections): Add remove_hook argument.
5846 Call remove_hook if a SEC_EXCLUDE section is encountered.
5847
5848 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5849
5850 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
5851 (xstormy16_reloc_map): Initialise new field with correct howto
5852 table.
5853 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
5854 howto entry.
5855
5856 2002-01-10 Michael Snyder <msnyder@redhat.com>
5857
5858 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
5859 (elfcore_write_pstatus): Use long instead of pid_t;
5860 * elf-bfd.h: Change prototypes to use long instead of pid_t;
5861
5862 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
5863
5864 * elf.c: Update copyright years.
5865 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
5866 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
5867
5868 2002-01-08 Michael Snyder <msnyder@redhat.com>
5869
5870 Add capability to write corefile note sections, for gdb.
5871 * elf.c (elfcore_write_note): New function.
5872 (elfcore_write_prpsinfo): New function.
5873 (elfcore_write_prstatus): New function.
5874 (elfcore_write_pstatus): New function.
5875 (elfcore_write_prfpreg): New function.
5876 (elfcore_write_prxfpreg): New function.
5877 * elf-bfd.h: Add prototypes for above functions.
5878
5879 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
5880
5881 * elf.c (elf_fake_sections): Propagate errors from
5882 elf_backend_fake_section.
5883
5884 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
5885
5886 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
5887 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
5888 (elf32-sh-nbsd.lo): New rule.
5889 * Makefile.in: Regenerate.
5890 * config.bfd (sh*le-*-netbsdelf*): New target.
5891 (sh*-*-netbsdelf*): New target.
5892 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
5893 (bfd_elf32_shnbsd_vec): New vector.
5894 (bfd_elf32_shlnbsd_vec): New vector.
5895 * configure: Regenerate.
5896 * elf32-sh-nbsd.c: New file.
5897 * targets.c: Update copyright years.
5898 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
5899 bfd_elf32_shnbsd_vec.
5900
5901 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
5902
5903 * coff-rs6000.c (READ20): Use bfd_scan_vma.
5904
5905 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
5906
5907 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
5908 of a symbol in a section that will be deleted.
5909
5910 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
5911
5912 * po/es.po: New file: Spanish translation.
5913 * configure.in (ALL_LINGUAS): Add es.
5914 * configure: Regenerate.
5915
5916 2002-01-06 Steve Ellcey <sje@cup.hp.com>
5917
5918 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
5919 argument so we can handle HP-UX specially.
5920 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
5921 (elfNN_hpux_backend_section_from_bfd_section): New for support
5922 of SHN_IA_64_ANSI_COMMON.
5923 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
5924 (is_unwind_section_name): Add special HP-UX support.
5925 (elfNN_ia64_section_from_shdr): Add support for more sections.
5926 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
5927 add support for more sections.
5928 (elfNN_ia64_additional_program_headers): Modify
5929 is_unwind_section_name call.
5930 (elfNN_ia64_modify_segment_map): Remove assumption that there is
5931 only one unwind section in segment.
5932
5933 2002-01-06 Alan Modra <amodra@bigpond.net.au>
5934
5935 * syms.c (_bfd_generic_make_empty_symbol): New function.
5936 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
5937 _bfd_generic_make_empty_symbol.
5938 * libbfd.h: Regenerate.
5939 * bfd-in2.h: Regenerate.
5940 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
5941 (hppabsd_core_get_symtab_upper_bound): Don't define.
5942 (hppabsd_core_get_symtab): Likewise.
5943 (hppabsd_core_print_symbol): Likewise.
5944 (hppabsd_core_get_symbol_info): Likewise.
5945 (hppabsd_core_bfd_is_local_label_name): Likewise.
5946 (hppabsd_core_get_lineno): Likewise.
5947 (hppabsd_core_find_nearest_line): Likewise.
5948 (hppabsd_core_bfd_make_debug_symbol): Likewise.
5949 (hppabsd_core_read_minisymbols): Likewise.
5950 (hppabsd_core_minisymbol_to_symbol): Likewise.
5951 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
5952 Formatting fixes.
5953 * hpux-core.c: Similarly.
5954 * irix-core.c: Similarly.
5955 * osf-core.c: Similarly.
5956 * sco5-core.c: Similarly.
5957 * binary.c (binary_make_empty_symbol): Remove function, define as
5958 _bfd_generic_make_empty_symbol.
5959 * ihex.c (ihex_make_empty_symbol): Likewise.
5960 * mmo.c (mmo_make_empty_symbol): Likewise.
5961 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
5962 * srec.c (srec_make_empty_symbol): Likewise.
5963 * versados.c (versados_make_empty_symbol): Likewise.
5964 * vms.c (_bfd_vms_make_empty_symbol): Remove.
5965 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
5966 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
5967 rather than _bfd_vms_make_empty_symbol.
5968 * vms-misc.c (new_symbol): Likewise.
5969
5970 2002-01-05 Alan Modra <amodra@bigpond.net.au>
5971
5972 * section.c (bfd_section_init): Remove unnecessary initialisations.
5973 (bfd_section_list_clear): New function.
5974 (bfd_section_list_remove, bfd_section_list_insert): New macros.
5975 (_bfd_strip_section_from_output): Use them.
5976 * coffcode.h (coff_set_alignment_hook): Likewise.
5977 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
5978 * elf64-mips.c (mips_elf64_final_link): Likewise.
5979 * elf64-mmix.c (mmix_elf_final_link): Likewise.
5980 * sunos.c (sunos_add_dynamic_symbols): Likewise.
5981 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
5982 * bfd-in2.h: Regenerate.
5983
5984 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
5985 rather than doing our own section handling. Clean up after errors
5986 with bfd_release and bfd_section_list_clear. Handle unexpected
5987 flags.
5988 * aoutf1.h (sunos4_core_file_p): Likewise.
5989 * aix386-core.c (aix386_core_file_p): Likewise.
5990 * cisco-core.c (cisco_core_file_validate): Likewise.
5991 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
5992 * trad-core.c (trad_unix_core_file_p): Likewise.
5993
5994 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
5995 with bfd_release and bfd_section_list_clear.
5996 * hpux-core.c (hpux_core_core_file_p): Likewise.
5997 * irix-core.c (irix_core_core_file_p): Likewise.
5998 * lynx-core.c (lynx_core_file_p): Likewise.
5999 * osf-core.c (osf_core_core_file_p): Likewise.
6000 * rs6000-core.c (rs6000coff_core_p): Likewise.
6001 * sco5-core.c (sco5_core_file_p): Likewise.
6002
6003 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
6004 sign extension adjustments without conditionals.
6005
6006 2002-01-04 Jakub Jelinek <jakub@redhat.com>
6007
6008 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
6009 CIE at .eh_frame start is removed due to no FDEs referencing it.
6010
6011 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
6012
6013 * config.bfd (x86_64-*-netbsd*): New target.
6014 * configure.in (x86_64-*-netbsd*): Set COREFILE
6015 to netbsd-core.lo.
6016 * configure: Regenerated.
6017
6018 2002-01-03 Tom Rix <trix@redhat.com>
6019
6020 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
6021 for recent bfd_make_section_anyway change.
6022
6023 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
6024
6025 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6026 R_ARM_THM_PC11 reloc.
6027
6028 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
6029
6030 * configure.in (LINGUAS): Add ja.
6031 * configure: Regenerate.
6032 * po/ja.po: Import from translation project's web site.
6033
6034 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
6035
6036 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
6037 messages to ease translation into other languages.
6038
6039 For older changes see ChangeLog-0001
6040 \f
6041 Local Variables:
6042 mode: change-log
6043 left-margin: 8
6044 fill-column: 74
6045 version-control: never
6046 End:
This page took 0.158011 seconds and 3 git commands to generate.