Oops - omitted from patch that added a second parameter to lang_memory_region_lookup.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
9c3ed942
MS
12003-10-23 Michael Snyder <msnyder@redhat.com>
2
3 * section.c (asection): Fix typo in comment.
4
0d4792f7
AM
52003-10-23 Alan Modra <amodra@bigpond.net.au>
6
7 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
8 reloc symbol index to it. Don't allow gd syms in shared libs
9 to be optimized.
10 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
11 (ppc64_elf_size_stubs): Likewise.
12 (ppc64_elf_relocate_section): Check that tls relocs are only used
13 with tls syms, and similarly for non-tls. Correct symbol used
14 when optimizing toc tls code.
15
c9ac8978
NC
162003-10-22 Nick Clifton <nickc@redhat.com>
17
18 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
19 processing an executable.
20
108ba305
JJ
212003-10-22 Jakub Jelinek <jakub@redhat.com>
22
23 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
24 field changes.
25 (_bfd_elf_link_assign_sym_version): Likewise.
26 * elflink.h (size_dynamic_sections): Likewise.
27
af9ba621
CV
282003-10-21 Alexandre Oliva <aoliva@redhat.com>,
29 Michael Snyder <msnyder@redhat.com>
30
31 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
32 bfd_mach_sh4a_nofpu): New machine types.
33 * bfd-in2.h: Rebuilt.
34 * cpu-sh.c (compatible): Remove unused function.
35 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
36 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
37 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
38
5a21e886
NC
392003-10-21 Wouter van Heyst <wouter@vidicode.nl>
40
41 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
42 describing mismatched formats involving the Maverick FP type.
43
b749473b
NC
442003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
45
46 * binary.c (binary_object_p): Pass machine flag along with
47 architecture.
48
3e602632
NC
492003-10-21 Thorsten Brehm <brehm@gmx.net>
50
51 * archures.c (bfd_default_scan): Add support for mcf528x.
52 * ieee.c (ieee_write_processor): Likewise.
53
542003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
55 Bernardo Innocenti <bernie@develer.com>
56
57 * archures.c: Add MCF528x (MCFv4) support.
58 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
59 * bfd-in2.h: Regenerate.
60
198beae2
AC
612003-10-20 Andrew Cagney <cagney@redhat.com>
62
63 * targets.c: Replace "struct sec" with "struct bfd_section"
64 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
65 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
66 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
67 * aout-tic30.c, aout-target.h:
68 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
69
4e2147ff
HPN
702003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
71
f60ebe14
HPN
72 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
73 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
74 (struct _mmix_elf_section_data): New member pjs.
75 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
76 functions.
77 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
78 (mmix_reloc_map): Ditto.
79 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
80 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
81 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
82 unused.
83 (mmix_elf_check_relocs): Move early return to after
84 mmix_elf_check_common_relocs call.
85 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
86 (_bfd_mmix_before_linker_allocation): Rename from
87 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
88 Arrange to set the initial relaxable size of sections.
89 (_bfd_mmix_after_linker_allocation): Rename from
90 _bfd_mmix_finalize_linker_allocated_gregs.
91 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
92 (bfd_elf64_get_section_contents): Define.
93 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
94 * libbfd.h, bfd-in2.h: Regenerate.
95
4e2147ff
HPN
96 * reloc.c (bfd_generic_relax_section): Default-set
97 section->_cooked_size here.
98 (bfd_generic_get_relocated_section_contents): Don't set it here.
99 Explain why.
100
4b71bec0
DA
1012003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
102
103 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
104 output section has been discarded.
105
d4e2de6b
NC
1062003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
107
108 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
109 (h8300_reloc16_extra_cases): Likewise.
110 (h8300_bfd_link_add_symbols): Likewise.
111
1122003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
113
114 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
115 (h8300sn_info_struct): Likewise.
116 (h8300hn_info_struct): Likewise.
117
98a96df7
CF
1182003-10-16 Pavel Roskin <proski@gnu.org>
119
120 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
121 for sections which lack size info.
122
2cefff79
DS
1232003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
124
125 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
126 mingw32.
127
3e0e1ef1
L
1282003-10-16 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
131 undefined patterns with '*'.
132
9da84788
L
1332003-10-16 H.J. Lu <hongjiu.lu@intel.com>
134
135 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
136 use the last CIE from a different section.
137 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
138 size of the output section.
139
ac393995
RM
1402003-10-07 Roland McGrath <roland@redhat.com>
141
142 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
143 new section from p_align header field.
144
7aaa0689
L
1452003-10-16 H.J. Lu <hongjiu.lu@intel.com>
146
147 * elf32-xtensa.c (xtensa_read_table_entries): The external size
148 of entry is 8 bytes.
149
6cee3f79
AC
1502003-10-15 Andrew Cagney <cagney@redhat.com>
151
152 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
153 with NAME##_canonicalize_symtab.
154 * libcoff-in.h (coff_canonicalize_symtab): Update.
155 * xsym.h (bfd_sym_canonicalize_symtab): Update.
156 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
157 * coffgen.c (coff_canonicalize_symtab): Update.
158 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
159 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
160 * ieee.c (ieee_vec): Update comment.
161 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
162 * mmo.c (mmo_canonicalize_symtab): Update.
163 * nlm-target.h (nlm_canonicalize_symtab): Update.
164 * nlmcode.h (nlm_canonicalize_symtab): Update.
165 * i386msdos.c (msdos_canonicalize_symtab): Update.
166 * hp300hpux.c (MY (canonicalize_symtab)): Update.
167 * oasys.c (oasys_canonicalize_symtab): Update.
168 * som.c (som_canonicalize_symtab): Update.
169 * pef.c (bfd_pef_canonicalize_symtab): Update.
170 * nlmcode.h (nlm_canonicalize_symtab): Update.
171 * xsym.c (bfd_sym_canonicalize_symtab): Update.
172 * vms.c (vms_canonicalize_symtab): Update.
173 * versados.c (versados_canonicalize_symtab): Update.
174 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
175 * ieee.c (ieee_canonicalize_symtab): Update.
176 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
177 * reloc.c: Update comment.
178 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
179 * coff64-rs6000.c (aix5coff64_vec): Update.
180 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
181 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
182 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
183 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
184 * hp300hpux.c (MY_canonicalize_symtab): Update.
185 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
186 * aout-tic30.c (MY_canonicalize_symtab): Update.
187 * aout-target.h (MY_canonicalize_symtab): Update.
188 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
189 * elf.c (_bfd_elf_canonicalize_symtab): Update.
190 * elfcode.h (elf_canonicalize_symtab): Update.
191 * ihex.c (ihex_canonicalize_symtab): Update.
192 * tekhex.c (tekhex_canonicalize_symtab): Update.
193 * binary.c (binary_canonicalize_symtab): Update.
194 * srec.c (srec_canonicalize_symtab): Update.
195
6288878d
KH
1962003-10-15 Kazu Hirata <kazu@cs.umass.edu>
197
198 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
199
46e993b9
KK
2002003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
201
202 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
203 relocations.
204 (sh_elf_check_relocs): Likewise.
205
206 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
207 (sh64_elf_merge_symbol_attribute): New.
208 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
209 (sh64_elf64_merge_symbol_attribute): New.
210
9bf7216d
KK
2112003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
212
213 * elf-bfd.h (struct elf_backend_data): New function pointer member
214 elf_backend_merge_symbol_attribute.
215 * elflink.h (elf_link_add_object_symbols): Adjust call to
216 elf_backend_merge_symbol_attribute if the backend defined it.
217 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
218 (elfNN_bed): Add that to the initializer.
219
b614a702
BW
2202003-10-14 Bob Wilson <bob.wilson@acm.org>
221
222 * elf32-xtensa.c (get_is_linkonce_section): Delete.
223 (xtensa_is_property_section, xtensa_is_littable_section): Use
224 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
225 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
226 (xtensa_get_property_section_name): Check section name instead of
227 calling get_is_linkonce_section. Remove unused bfd parameter. Use
228 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
229 linkonce section names by appending ".xt.insn" or ".xt.lit".
230 (xtensa_read_table_entries): Remove bfd argument in call to
231 xtensa_get_property_section_name. Free section name when done.
232 (elf_xtensa_combine_prop_entries): Free leaking table.
233
98a8deaf
RS
2342003-10-13 Richard Sandiford <rsandifo@redht.com>
235
236 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
237 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
238 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
239 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
240 that were needed.
241 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
242 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
243
3f7deb8a
L
2442003-10-13 H.J. Lu <hongjiu.lu@intel.com>
245
246 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
247 (bfd_elf64_ia64_after_parse): Likewise.
248 * bfd-in2.h: Regenerated.
249
250 * elfxx-ia64.c (oor_ip): New.
251 (oor_branch_size): Likewise.
252 (bfd_elfNN_ia64_after_parse): Likewise.
253 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
254 equals sizeof (oor_ip).
255
0c72ffe0
KK
2562003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
257
258 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
259 renumbering of some relocation numbers.
260
8d6ad26e
AM
2612003-10-11 Alan Modra <amodra@bigpond.net.au>
262
263 * coff-sh.c: Move definition of MAP and guard more code with
264 COFF_IMAGE_WITH_PE.
a7f49d81
AM
265
266 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 267 * bfd-in2.h: Regenerate.
a7f49d81 268
ede6aaf3
L
2692003-10-10 H.J. Lu <hongjiu.lu@intel.com>
270
271 * Makefile.am: Run "make dep-am".
272 * Makefile.in: Regenerate.
273 * doc/Makefile.in: Likewise.
274
a3aa4448
L
2752003-10-09 H.J. Lu <hongjiu.lu@intel.com>
276
277 * cofflink.c: Include "safe-ctype.h".
278 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
279
9c8ee639
DB
2802003-10-08 Dave Brolley <brolley@redhat.com>
281 On behalf of Michael Snyder <msnyder@redhat.com>
282
283 * archures.c: Add FRV fr550 machine.
284 * cpu-frv.c: Ditto.
285 * elf32-frv.c: Ditto.
286 * bfd-in2.h: Regenerate.
287
6a691779
TS
2882003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
289
290 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
291 for non-SGI N64 ABI. Improve code consitency.
292
b15b52ef
AO
2932003-10-07 Alexandre Oliva <aoliva@redhat.com>
294
295 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
296 rightshift to 2.
297
cd339148
NS
2982003-10-07 Nathan Sidwell <nathan@codesourcery.com>
299
29ca8dc5
NS
300 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
301 parameter.
302 * cofflink.c (coff_link_add_symbols): Deal with split stab
303 sections.
304 * elflink.h (elf_link_add_object_symbols): Deal with split stab
305 sections.
306 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
307 * libbfd.h: Regenerated.
308
cd339148
NS
309 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
310 overflow, set reloc start position to after the count
311 reloc. Subtract one from num relocs. Give error on 0xffff relocs
312 and no overflow.
313 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
314 overflow.
315 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
316 0xffff.
317
10cf14ea
L
3182003-10-06 H.J. Lu <hongjiu.lu@intel.com>
319
320 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
321 last CIE/FDE if needed.
322
afa105f8
NC
3232003-10-06 Nick Clifton <nickc@redhat.com>
324
325 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
326 BFD64 is enabled.
327
85cf2a8a
NC
3282003-10-06 Matt Thomas <matt@3am-software.com>
329
8d6ad26e 330 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 331
4615568e
NC
3322003-10-06 Robert Millan <robertmh@gnu.org>
333
334 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
335 * config.bfd: Likewise.
336 * configure: Regenerate.
337
8b7cf393
CG
3382003-10-04 Christian Groessler <chris@groessler.org>
339
340 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
341 and R_CALLR.
342
0a6a3ebe
SC
3432003-10-04 Stephane Carrez <stcarrez@nerim.fr>
344
345 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
346 * elf32-m68hc11.c: Likewise.
347 * elf32-m68hc12.c: Likewise.
348 * elf32-m68hc1x.h: Likewise.
349
17e58af0
SC
3502003-10-04 Stephane Carrez <stcarrez@nerim.fr>
351
352 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
353 of flags between HC12 and HCS12.
354
27c630ba
NC
3552003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
356
357 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
358 which become empty after merging.
359
1fc0d173
JJ
3602003-09-30 Jakub Jelinek <jakub@redhat.com>
361
362 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
363 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
364
5f74bc13
CD
3652003-09-30 Chris Demetriou <cgd@broadcom.com>
366
367 * archures.c (bfd_mach_mipsisa64r2): New define.
368 * bfd-in2.h: Regenerate.
369 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
370 * cpu-mips.c (I_mipsisa64r2): New enum value.
371 (arch_info_struct): Add entry for I_mipsisa64r2.
372 * elfxx-mips.c (_bfd_elf_mips_mach)
373 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
374 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
375 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
376
b59dd4a5
L
3772003-09-29 H.J. Lu <hongjiu.lu@intel.com>
378
379 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
380 Handle SHN_IA_64_ANSI_COMMON.
381 (elf_backend_section_from_bfd_section): Defined.
382
243ef1e0
L
3832003-09-26 H.J. Lu <hongjiu.lu@intel.com>
384
385 * elflink.c (elf_link_read_relocs_from_section): Add an argument
386 of a pointer to section. Check bad symbol index.
387 (_bfd_elf_link_read_relocs): Modify calls to
388 elf_link_read_relocs_from_section.
389
d38eb334
DD
3902003-09-23 DJ Delorie <dj@redhat.com>
391
392 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
393 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
394 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
395 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
396 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
397 R_SH_PSHA, R_SH_PSHL added.
398 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
399 (sh_elf_relocate_section): Support new relocs.
400
f0578e28
BW
4012003-09-23 Bob Wilson <bob.wilson@acm.org>
402
403 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
404 dynamic relocation offsets.
405
010b84c1
AM
4062003-09-23 Alan Modra <alan@modra.org>
407
408 * simple.c (bfd_simple_get_relocated_section_contents): Free the
409 hash table using _bfd_generic_link_hash_table_free.
410
7dcb9820
AM
4112003-09-23 Alan Modra <alan@modra.org>
412
413 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
414 type of prefix_length and suffix_length to int. Rename "attributes"
415 to "attr". Comment.
416 (_bfd_elf_get_sec_type_attr): Update prototype.
417 * elf.c (get_special_section): Rewrite.
418 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
419 attr and type pointers.
420 (_bfd_elf_new_section_hook): Adjust for above.
421 (special_sections): Merge suffix with prefix. Set
422 prefix_length for all entries. Set suffix_length appropriately.
423 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
424 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
425 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
426 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
427 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
428 * elf32-v850.c (v850_elf_special_sections): Likewise.
429 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
430 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
431 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
432 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
433 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
434 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
435 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
436 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
437
61bcf373
DJ
4382003-09-21 Daniel Jacobowitz <drow@mvista.com>
439
440 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
441 ->got if the section already exists.
442
8bfd78b3
NS
4432003-09-19 Nathan Sidwell <nathan@codesourcery.com>
444
445 * dwarf2.c (decode_line_info): Cope with an initially empty
446 filename table.
447
6726e1ea
L
4482003-09-18 H.J. Lu <hongjiu.lu@intel.com>
449
450 * acinclude.m4: Include ../config/accross.m4.
451 * aclocal.m4: Regenerated.
452
453 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
454 or long long.
455 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
456 (host64): Remove if HOST_64BIT_TYPE is set to long.
457
458 * configure.in (HOST_64BIT_TYPE): Set according to the size of
459 long and long long.
460 (HOST_U_64BIT_TYPE): Likewise.
461 (host64): Likewise.
462 * configure: Regenerated.
463
5de3bf90
AM
4642003-09-19 Alan Modra <amodra@bigpond.net.au>
465
466 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
467 since some ABIs round up the size of the struct.
468
9e4d8df3
L
4692003-09-18 H.J. Lu <hongjiu.lu@intel.com>
470
471 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
472 the old symbol is undefined and the new symbol is defined.
473
228ce064
AS
4742003-09-18 Andreas Schwab <schwab@suse.de>
475
476 * simple.c (bfd_simple_get_relocated_section_contents): Use
477 _bfd_generic_link_hash_table_create instead of
478 bfd_link_hash_table_create.
479
fdbdabdd
L
4802003-09-10 H.J. Lu <hongjiu.lu@intel.com>
481
482 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
483 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
484
a252afa4
DA
4852003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
486 Randolph Chung <randolph@tausq.org>
487
488 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
489 hppa_link_hash_newfunc, hppa_build_one_stub,
490 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
491 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
492 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
493 for generating import stubs for calls to statically linked PIC
494 functions.
495 (hppa_type_of_stub): Don't generate an import stub for calls to
496 statically linked pic functions. Generate import stubs for calls
497 in a shared object, to functions not in a regular file, and to
498 defined weak functions. Add new argument INFO.
499 (hppa_build_one_stub): Don't undef ADDIL_DP.
500 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
501 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
502 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
503 non-shared link. Convert instructions that use the the linkage table
504 pointer, or a facsimile thereof, to use the global data pointer when
505 the reloc has been changed.
506
42acdc7c
JB
5072003-09-08 Joel Brobecker <brobecker@gnat.com>
508
509 * archures.c: Add new machine names for hppa.
510 * bfd-in2.h: Regenerate.
511 * cpu-hppa.c: Use the new machine names.
512
2a0e29b4
SC
5132003-09-06 Stephane Carrez <stcarrez@nerim.fr>
514
515 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
516 all_local_syms member.
517 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
518 to get the local symbols.
519
3f533aa9
SC
5202003-09-06 Stephane Carrez <stcarrez@nerim.fr>
521
522 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
523 (elf_backend_special_sections): Define.a
524
525 PR savannah/4950:
526 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
527 section is read-only.
528
8ad30312
NC
5292003-09-04 Nick Clifton <nickc@redhat.com>
530
531 * archures.c (bfd_mach_v850e1): Define.
532 * bfd-in2.h: Regenerate.
533 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
534 (arch_info_struct): Include an entry for bfd_mach_v850e1.
535 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
536 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
537 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
538 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
539 linked with v850e binaries. Mark the output as v850e.
5de3bf90 540
3922a8c1
NC
5412003-09-03 Nick Clifton <nickc@redhat.com>
542
5de3bf90 543 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
544 symbols that are used in relocs.
545
13dfd2d0
NC
5462003-08-30 Robert Millan <robertmh@gnu.org>
547
548 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
549 * config.bfd: Likewise.
550 * configure: Regenerate.
551
1c0881dd
CG
5522003-08-31 Christian Groessler <chris@groessler.org>
553
554 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
555 instead of returning bfd_reloc_continue.
556
ac0e732e
AJ
5572003-08-31 Andreas Jaeger <aj@suse.de>
558
559 * merge.c: Update to ISO C90.
560
ec317fb1
ILT
5612003-08-27 Ian Lance Taylor <ian@airs.com>
562
49c97a80
ILT
563 * configure.in: Check for strtoull.
564 * bfd.c (bfd_scan_vma): Use strtoull when available.
565 * configure, config.in: Regenerate.
566
ec317fb1
ILT
567 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
568 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
569 __GNUC__ when deciding whether to use long long for
570 BFD_HOST_64_BIT.
571 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
572
d539b3aa
CG
5732003-08-27 Christian Groessler <chris@groessler.org>
574
575 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
576 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
577 functions.
578 (elf32_i860_howto_table): Insert the new functions as
579 'special_function's in the proper reloc type entries.
580
73052b5e
RS
5812003-08-27 Richard Sandiford <rsandifo@redhat.com>
582
583 * elf32-frv.c (elf32_frv_relocate_section): Use
584 _bfd_elf_rela_local_sym.
585
2c848f79
MS
5862003-08-26 Michael Snyder <msnyder@redhat.com>
587
588 * cpu-frv.c: Remove unused enum.
589
980491e6
MR
5902003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
591
592 * reloc.c: Fix documentation for MIPS ELF relocations.
593 libbfd.h: Regenerate.
594 bfd-in2.h: Regenerate.
595
6d1227b8
JE
5962003-08-24 Jason Eckhardt <jle@rice.edu>
597
5de3bf90 598 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 599
f680ea79
JE
6002003-08-24 Jason Eckhardt <jle@rice.edu>
601
602 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
603 shift by 2 before storing the relocated value.
604
c28b1c28
JE
6052003-08-23 Jason Eckhardt <jle@rice.edu>
606
5de3bf90 607 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
608 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
609 LOWn, SPLITn, and BRADDR.
610 (RTYPE2HOWTO): Check that the r_type is within the howto_table
611 before trying to access the entry.
612 (coff_i860_rtype_to_howto): Likewise.
613 (coff_i860_reloc_type_lookup): New function.
614 (i860_reloc_processing): New function.
615 (coff_bfd_reloc_type_lookup): Define macro.
616 (RELOC_PROCESSING): Define macro.
617 Minor formatting adjustments.
618
40a0491a
AM
6192003-08-23 Alan Modra <amodra@bigpond.net.au>
620
621 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
622
69bbc4c0
L
6232003-08-22 H.J. Lu <hongjiu.lu@intel.com>
624
625 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
626 .got section at 8 bytes.
627
8b956130
NC
6282003-08-21 Nick Clifton <nickc@redhat.com>
629
85db1db4 630 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 631
6c21aa76
NC
6322003-08-21 Randolph Chung <tausq@debian.org>
633
634 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
635 can have OSABI=Linux or OSABI=SysV. Check for both.
636 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
637
3673a93e
NC
6382003-08-21 Nick Clifton <nickc@redhat.com>
639
640 * po/sv.po: Updated Swedish translation.
641
427b80f4
RS
6422003-08-20 Richard Sandiford <rsandifo@redhat.com>
643
644 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
645
560e09e9
NC
6462003-08-20 Nick Clifton <nickc@redhat.com>
647
648 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
649 replace some duplicated code in most elfxx-xxxx.c files. This
650 version uses the new fields in bfd_link_info.
651
40a0491a
AM
652 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
653 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
654 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
655 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
656 * elf32-i386.c (elf_i386_relocate_section): Likewise.
657 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
658 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
659 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
660 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
661 * elf32-s390.c (elf_s390_relocate_section): Likewise.
662 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
663 * elf32-vax.c (elf_vax_relocate_section): Likewise.
664 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
665 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
666 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
667 * elf64-s390.c (elf_s390_relocate_section): Likewise.
668 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
669 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
670 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
671
672 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
673 elf_hppa_remark_useless_dynamic_symbols,
674 elf_hppa_relocate_section): Use the new fields in
675 bfd_link_info structure.
676 * elf32-sh.c (sh_elf_relocate_section): Likewise.
677 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
678 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
679 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
680 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
681 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
682
683 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
684 undefined symbols in shared libraries. Remove redundant test
685 of shlib_undefined when reporting references to forced local
686 symbols.
560e09e9 687
4091ea4e
L
6882003-08-18 Andreas Schwab <schwab@suse.de>
689
690 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
691 executables.
692
b0cdc7bc
HPN
6932003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
694
695 * simple.c (bfd_simple_get_relocated_section_contents): Move
696 reloc_done hack to before first bfd_section_size call. Change all
697 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
698
c1993d04
AM
6992003-08-16 Alan Modra <amodra@bigpond.net.au>
700
701 * elf64-ppc.c: Don't include elf/ppc.h.
702
792b4a53
RS
7032003-08-14 Richard Sandiford <rsandifo@redhat.com>
704
705 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
706 code to work with 64-bit bfds.
707
fdc09da8
AM
7082003-08-14 Alan Modra <amodra@bigpond.net.au>
709
710 * dep-in.sed: Remove libintl.h.
711 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
712 (POTFILES.in): Remove target.
713 * Makefile.in: Regenerate.
714
ee87f2da
AM
7152003-08-12 Alan Modra <amodra@bigpond.net.au>
716
717 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
718 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
719 use the function sym from the previous reloc.
720
15f40dfc
JJ
7212003-08-11 Jakub Jelinek <jakub@redhat.com>
722
723 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
724 fatal if -pie.
725 * elf32-s390.c (elf_s390_relocate_section): Likewise.
726 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
727 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
728 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
729 * elf64-s390.c (elf_s390_relocate_section): Likewise.
730 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
731 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
732 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
733 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
734 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
735 on undefined symbols if -pie.
736 * elf32-sh.c (sh_elf_relocate_section): Likewise.
737
6ab189d5
AM
7382003-08-11 Alan Modra <amodra@bigpond.net.au>
739
740 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
741 branch to __libc_start_main.
742
3b260895
NC
7432003-08-08 Dmitry Diky <diwil@mail.ru>
744
6ab189d5
AM
745 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
746 gcc order.
3b260895
NC
747 * cpu-msp430.c: Likewise.
748 * elf32-msp430.c: Likewise.
749 * bfd-in2.h: Regenerate.
750
c39a58e6
AM
7512003-08-07 Alan Modra <amodra@bigpond.net.au>
752
9c5bfbb7
AM
753 * elfxx-target.h: Remove PTR cast.
754 * targets.c (bfd_target): Make backend_data const void *.
755 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
756 * elf-m10300.c: Likewise.
757 * elf.c: Likewise.
758 * elf32-hppa.c: Likewise.
759 * elf32-i386.c: Likewise.
760 * elf32-m68hc1x.c: Likewise.
761 * elf32-ppc.c: Likewise.
762 * elf32-s390.c: Likewise.
763 * elf32-sh.c: Likewise.
764 * elf32-sh64.c: Likewise.
765 * elf32-sparc.c: Likewise.
766 * elf32-xtensa.c: Likewise.
767 * elf64-mips.c: Likewise.
768 * elf64-ppc.c: Likewise.
769 * elf64-s390.c: Likewise.
770 * elf64-sh64.c: Likewise.
771 * elf64-sparc.c: Likewise.
772 * elf64-x86-64.c: Likewise.
773 * elfcode.h: Likewise.
774 * elfcore.h: Likewise.
775 * elflink.c: Likewise.
776 * elflink.h: Likewise.
777 * elfxx-ia64.c: Likewise.
778 * elfxx-mips.c: Likewise.
779 * elfxx-mips.h: Likewise.
780 * elf.c (prep_headers): Remove useless check for null backend_data.
781 * bfd-in2.h: Regenerate.
782
c39a58e6
AM
783 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
784 (NAME): Use ## rather than CONCAT4 macro.
785 * elfcode.h: Remove one remaining PARAMS macro.
786 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
787 * elf-strtab.c: Likewise.
788 * elf-hppa.h: Likewise.
789 * elf32-hppa.h: Likewise.
790 * elf32-hppa.c: Likewise.
791 (elf32_hppa_add_symbol_hook): Delete.
792 (elf_backend_add_symbol_hook): Don't define.
793 * libhppa.h: Convert to C90. Replace INLINE with inline.
794
97b639ba
AM
7952003-08-06 Alan Modra <amodra@bigpond.net.au>
796
797 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
798 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
799 function descriptors, but warn.
800 (ppc_build_one_stub): Remove a couple of vars. Move code creating
801 stub syms so that we can avoid a stub sym if we already have a
802 plt sym. Do not redefine an existing symbol.
803 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
804 glink.
805
9e7d479d
NC
8062003-08-06 Nick Clifton <nickc@redhat.com>
807
808 * po/fr.po: Updated French translation.
809
77f3d027
AM
8102003-08-06 Alan Modra <amodra@bigpond.net.au>
811
812 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
813 SEC_LINKER_CREATED.
814
50d6c878
DJ
8152003-08-05 Daniel Jacobowitz <drow@mvista.com>
816
817 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
818 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
819
14abcef9
NC
8202003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
821
4a21a492 822 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
823 message if the line number table could not be read.
824
8c675694
NC
8252003-08-04 Nick Clifton <nickc@redhat.com>
826
827 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
828 to messages produced for .gnu.warning.SYMBOL sections.
829
268b6b39
AM
8302003-08-04 Alan Modra <amodra@bigpond.net.au>
831
832 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
833 * elfcore.h: Likewise.
834 * elflink.c: Likewise.
835 * elflink.h: Likewise.
836 * elf.c (sym_is_global): Remove INLINE.
837 (align_file_position): Replace INLINE with inline.
838 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
839 (elf_file_p): Replace INLINE with inline.
840
866f48b7
KK
8412003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
842
843 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
844
8651fcf9
L
8452003-08-01 H.J. Lu <hongjiu.lu@intel.com>
846
847 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
848
37cd2629
L
8492003-08-01 H.J. Lu <hongjiu.lu@intel.com>
850
851 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
852 ElfNN_External_Rela instead of Elf64_External_Rela.
853
91fb2a9d
NC
8542003-08-01 Nick Clifton <nickc@redhat.com>
855
856 * config.bfd: Add code to catch obsolete configurations and warn
857 about them unless --enable-obsolete is used. Use this to mark
858 vax-vms port as obsolete.
859
e656e369
AM
8602003-07-30 Alan Modra <amodra@bigpond.net.au>
861
862 * elf32-ppc.c (ppc_elf_install_value): Tidy.
863 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
864 Formatting.
865 * elfxx-target.h: Remove PARAMS macro. Formatting.
866
50bc7936
AM
8672003-07-30 Alan Modra <amodra@bigpond.net.au>
868
869 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
870 * elf64-ppc.c (get_fdh): New function, split out from
871 ppc64_elf_edit_opd.
872 (ppc64_elf_check_relocs): Use get_fdh.
873 (func_desc_adjust): Likewise. Tidy.
874 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
875 exit. Use get_fdh. Account for superfluous dynamic relocs.
876 (ppc64_elf_relocate_section): Warning fix.
877
a62d170c
JE
8782003-07-30 Jason Eckhardt <jle@rice.edu>
879
880 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
881
7734b6e9
JE
8822003-07-30 Jason Eckhardt <jle@rice.edu>
883
884 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
885
37f4508b
AM
8862003-07-30 Randolph Chung <tausq@debian.org>
887
888 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
889 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
890
217aa764
AM
8912003-07-30 Alan Modra <amodra@bigpond.net.au>
892
893 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
894 Replace PTR with void *. Formatting.
895 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
896 (make_mapping): Likewise.
897
494dac0c
AM
8982003-07-29 Alan Modra <amodra@bigpond.net.au>
899
900 * elf64-ppc.c (func_desc_adjust): Give linker created function
901 descriptor symbols a size and type.
902 (ppc64_elf_relocate_section): Correct lq insn test.
903
deaaf2f3
EC
9042003-07-28 Eric Christopher <echristo@redhat.com>
905
906 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
907 (ppc_elf_install_value): New function.
908 (ppc_elf_sort_rela): Remove.
909 (ppc_elf_relax_section): Rewrite. Remove old relaxation
910 and replace with out of range branch stubs.
911 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
912
709e685d
AO
9132003-07-29 Alexandre Oliva <aoliva@redhat.com>
914
915 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
916 from input_bfd.
917
36c506c5
AM
9182003-07-28 Alan Modra <amodra@bigpond.net.au>
919
920 * elf.c (special_sections): Set attributes for .got and .plt.
921
5d35169e
AM
9222003-07-27 Alan Modra <amodra@bigpond.net.au>
923
924 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
925 on function descriptors.
926 (ELIMINATE_COPY_RELOCS): Expand comment.
927 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
928 Do include ".toc1".
929
3cddba1e
L
9302003-07-25 H.J. Lu <hongjiu.lu@intel.com>
931
932 * elf.c (_bfd_elf_new_section_hook): Set the default section
933 type to SHT_NULL.
934 (elf_fake_sections): Set the section type based on asect->flags
935 if it is SHT_NULL. Don't abort on processor specific section
936 types.
937
d622ef4b
L
9382003-07-25 H.J. Lu <hongjiu.lu@intel.com>
939
940 * bfd-in2.h: Regenerated.
941
2f89ff8d
L
9422003-07-25 H.J. Lu <hongjiu.lu@intel.com>
943
944 * elf-bfd.h (bfd_elf_special_section): New.
945 (elf_backend_data): Add special_sections, a pointer to
946 bfd_elf_special_section.
947 (elf_section_type). New.
948 (elf_section_flags): New.
949 (_bfd_elf_get_sec_type_attr): New.
950
951 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
952 real section type/flags.
953 (special_sections): New.
954 (get_special_section): New.
955 (_bfd_elf_get_sec_type_attr): New.
956 (_bfd_elf_new_section_hook): Check special_section to set
957 elf_section_type and elf_section_flags.
958 (elf_fake_sections): Don't use section name to set ELF section
959 data.
960
961 * elf32-m32r.c (m32r_elf_special_sections): New.
962 (elf_backend_special_sections): Defined.
963
964 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
965 (elf_backend_special_sections): Defined.
966
967 * elf32-mcore.c (mcore_elf_special_sections): New.
968 (elf_backend_special_sections): Defined.
969
970 * elf32-ppc.c (ppc_elf_special_sections): New.
971 (elf_backend_special_sections): Defined.
972
973 * elf32-sh64.c (sh64_elf_special_sections): New.
974 (elf_backend_special_sections): Defined.
975
976 * elf32-v850.c (v850_elf_special_sections): New.
977 (elf_backend_special_sections): Defined.
978
979 * elf32-xtensa.c (elf_xtensa_special_sections): New.
980 (elf_backend_special_sections): Defined.
981
982 * elf64-alpha.c (elf64_alpha_special_sections): New.
983 (elf_backend_special_sections): Defined.
984
985 * elf64-hppa.c (elf64_hppa_special_sections): New.
986 (elf_backend_special_sections): Defined.
987
988 * elf64-ppc.c (ppc64_elf_special_sections): New.
989 (elf_backend_special_sections): Defined.
990
991 * elf64-sh64.c (sh64_elf64_special_sections): New.
992 (elf_backend_special_sections): Defined.
993
994 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
995 (elf_backend_special_sections): Defined.
996
997 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
998
999 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1000 (elf_backend_special_sections): Defined.
1001
1002 * elfxx-target.h (elf_backend_special_sections): New. Default
1003 to NULL.
1004 (elfNN_bed): Initialize special_sections.
1005
1006 * section.c (bfd_abs_section): Remove const.
1007 (bfd_und_section): Likewise.
1008 (bfd_com_section): Likewise.
1009 (bfd_ind_section): Likewise.
1010
20650579
NC
10112003-07-24 Nick Clifton <nickc@redhat.com>
1012
1013 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1014 sections are assigned the LOAD attribute.
1015
deaaf2f3 10162003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
1017
1018 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1019 * elf32-sh64-com.c: Likewise.
1020 * elf32-sh64.c: Likewise.
1021 * elf32-sh64.h: Likewise.
1022 * elf64-sh64.c: Likewise.
1023
3d85aebe
KK
10242003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1025
1026 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1027 (allocate_dynrelocs): Likewise.
1028 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1029 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1030
834d807b
NC
10312003-07-24 Nick Clifton <nickc@redhat.com>
1032
1033 * po/fr.po: Updated French translation.
1034
571b5725
BW
10352003-07-23 Bob Wilson <bob.wilson@acm.org>
1036
1037 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1038 near the beginning of the file. Swap order of arguments. Call
1039 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1040 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1041 (elf_xtensa_relocate_section): Likewise.
1042 (shrink_dynamic_reloc_sections): Likewise.
1043
b536dc1e
BW
10442003-07-23 Bob Wilson <bob.wilson@acm.org>
1045
1046 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1047 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1048 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1049 first printing an error message.
1050 (elf_xtensa_finish_dynamic_sections): Likewise.
1051 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1052 discarding literal table entries.
1053 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1054 (elf_xtensa_do_asm_simplify): Likewise.
1055
7f888330
SC
10562003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1057
1058 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1059 we have a local symbol in common section.
1060
ecc27c31
L
10612003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1062
1063 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1064 weak symbols.
1065
f9f3cf65
NC
10662003-07-22 Nick Clifton <nickc@redhat.com>
1067
1068 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1069 expected RS6000 storage classes.
1070
bb32e54f
L
10712003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1072
1073 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1074 output_bfd unused to silence gcc.
1075
796f2a93
NC
10762003-07-21 Nick Clifton <nickc@redhat.com>
1077
1078 * po/sv.po: Updated Swedish translation.
1079
f6c52c13
AM
10802003-07-21 Alan Modra <amodra@bigpond.net.au>
1081
1082 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1083 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1084 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1085 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1086 now done in _bfd_elf_symbol_refs_local_p.
1087 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1088 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1089 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1090
aa37626c
L
10912003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1092
1093 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1094
1e364ec9
L
10952003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1098 (SYMBOL_CALLS_LOCAL): Likewise.
1099
1100 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1101 immediately if symbol isn't defined locally.
1102
986a241f
RH
11032003-07-18 Richard Henderson <rth@redhat.com>
1104
1105 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1106 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1107 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1108 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1109 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1110 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1111 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1112 Update all callers to provide the relocation being resolved.
1113
ac4b3dd8
NC
11142003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1115
1116 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1117 targ_cflags.
1118
6c37ac4d
NC
11192003-07-17 Nick Clifton <nickc@redhat.com>
1120
1121 * po/es.po: New Spanish translation.
1122 * po/sv.po: New Swedish translation.
1123 * po/opcodes.pot: Regenerate.
1124
02e6ad56
RH
11252003-07-16 Richard Henderson <rth@redhat.com>
1126
1127 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1128 * elfxx-ia64.c, targets.c: Likewise.
1129
5686517c
RH
11302003-07-16 Richard Henderson <rth@redhat.com>
1131
1132 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1133 for symbols defined locally plus -Bsymbolic. Tidy logic.
1134
5a7ea749
RS
11352003-07-15 Richard Sandiford <rsandifo@redhat.com>
1136
1137 * archures.c (bfd_mach_mips7000): New.
1138 * bfd-in2.h: Regenerated.
1139 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1140 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1141 (mips_mach_extensions): Add an entry for it.
1142
76bff705
NC
11432003-07-14 Nick Clifton <nickc@redhat.com>
1144
1145 * po/tr.po: Update with latest version.
1146 * po/SRC-POTFILES.in: Regenerate.
1147 * po/bfd.pot: Regenerate.
1148 * Makfile.in: Regenerate.
1149 * configure: Regenerate.
1150
d0facd1b
NC
11512003-07-12 Jeff Baker <jbaker@qnx.com>
1152
1153 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1154 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1155 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1156 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1157
bcb9b88d
NC
11582003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1159
1160 * coffcode.h (coff_set_section_contents): Set the
1161 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1162
7a9823f1
RS
11632003-07-11 Richard Sandiford <rsandifo@redhat.com>
1164
1165 * bfd-in.h (bfd_h8300_pad_address): Declare.
1166 * bfd-in2.h: Regenerate.
1167 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1168 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1169 addresses before checking whether they can be relaxed.
1170 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1171 Don't complain about overflows in general 8-bit relocations.
1172 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1173 Fix handling of R_H8_DIR24A8.
1174
c6baf75e
RS
11752003-07-11 Richard Sandiford <rsandifo@redhat.com>
1176
1177 * elf32-h8300.c: Convert function prototypes and definitions
1178 to C90 syntax.
1179 * coff-h8300.c: Likewise.
1180 * cpu-h8300.c: Likewise.
1181
fce00800
AM
11822003-07-11 Alan Modra <amodra@bigpond.net.au>
1183
1184 * po/SRC-POTFILES.in: Regenerate.
1185 * po/bfd.pot: Likewise.
1186
e901de89
BW
11872003-07-10 Bob Wilson <bob.wilson@acm.org>
1188
1189 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1190 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1191 .xt.lit.plt section.
1192 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1193 and allocate memory for it.
1194 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1195 section to the .got.loc section.
1196 (elf_xtensa_finish_dynamic_sections): Fix up call to
1197 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1198 the address of .got.loc.
1199 (relax_property_section): Shrink .got.loc to match changes in any
1200 literal table section.
1201 (xtensa_is_property_section): Change to match
1202 xtensa_get_property_section_name.
1203 (xtensa_is_littable_section): New.
1204
eff26f78
L
12052003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1206
1207 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1208 -1LL.
1209
942e0f42
AM
12102003-07-10 Alan Modra <amodra@bigpond.net.au>
1211
1212 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1213 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1214 Run "make dep-am".
1215 * Makefile.in: Regenerate.
1216
73c3cd1c
AO
12172003-07-10 Alexandre Oliva <aoliva@redhat.com>
1218
1219 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1220 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1221 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1222 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1223 * elf32-am33lin.c: Rename global functions.
1224 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1225 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1226 * configure.in (bfd_elf32_am33lin_vec): Added.
1227 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1228 (elf32-am33lin.lo): List dependencies.
1229 * aclocal.m4, configure, Makefile.in: Rebuilt.
1230 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1231 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1232 ELF_ARCH was not defined before.
1233 (elf_symbol_leading_char): Define if not defined.
1234 * elf32-am33lin.c: Override the definitions above.
1235 * targets.c (bfd_elf32_am33lin_vec): New.
1236
03a12831
AO
12372003-07-09 Alexandre Oliva <aoliva@redhat.com>
1238
1239 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1240 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1241 pcrel_relocs_copied.
1242 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1243 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1244 ld-linux.so.2 to ld.so.1.
1245 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1246 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1247 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1248 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1249 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1250 .rela.* section contents with bfd_zalloc.
1251 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1252 * elf-m10300.c: Added declarations for functions missing them.
1253 Merge some shared-library changes from the i386 back-end. Use
1254 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1255 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1256 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1257 members of elf_link_hash_entry. Adjusted references.
1258 (mn10300_elf_final_link_relocate): dynobj was already loaded
1259 into a local variable, use it.
1260 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1261 * elf-m10300.c: Add missing function prototypes.
1262 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1263 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1264 relocation for dynamic relocations.
1265 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1266 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1267 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1268 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1269 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1270 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1271 adress is already known at the time we compute relaxations.
1272 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1273 and PLT32 to narrower relocations.
1274 * libbfd.h, bfd-in2.h: Rebuilt.
1275 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1276 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1277 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1278 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1279 BFD_RELOC_MN10300_RELATIVE): New relocs.
1280 * libbfd.h, bfd-in2.h: Rebuilt.
1281 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1282 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1283 fields.
1284 (elf_mn10300_howto): Defined new relocation types.
1285 (mn10300_reloc_map): Map them.
1286 (_bfd_mn10300_elf_create_got_section): New fn.
1287 (mn10300_elf_check_relocs): Handle PIC relocs.
1288 (mn10300_elf_final_link_relocate): Likewise.
1289 (mn10300_elf_relocate_section): Handle DSOs.
1290 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1291 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1292 elf_mn10300_pic_plt_entry): New.
1293 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1294 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1295 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1296 elf_mn10300_plt_reloc_offset: New macros.
1297 (ELF_DYNAMIC_INTERPRETER): Likewise.
1298 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1299 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1300 (_bfd_mn10300_elf_discard_copies): Likewise.
1301 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1302 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1303 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1304 (elf_backend_can_gc_sections,
1305 elf_backend_create_dynamic_sections,
1306 elf_backend_adjust_dynamic_sections,
1307 elf_backend_size_dynamic_sections,
1308 elf_backend_finish_dynamic_symbol,
1309 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1310 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1311 elf_backend_got_header_size, elf_backend_plt_header_size): New
1312 macros.
1313
b08fa4d3
AO
13142003-07-09 Alexandre Oliva <aoliva@redhat.com>
1315
1316 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1317 * elf-m10300.c (compute_function_info): Account for AM33
1318 registers in `movm' when computing stack space for `call' when
1319 linking for AM33/2.0 link.
1320 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1321 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1322 * bfd-in2.h: Rebuilt.
1323 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1324 * elf-m10300.c: Updated.
1325 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1326 * archures.c (bfd_mach_am332): Defined.
1327 * bfd-in2.h: Rebuilt.
1328 * cpu-m10300.c (bfd_am332_arch): Defined.
1329 (bfd_am33_arch): Chained with am33-2.
1330 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1331 (_bfd_mn10300_elf_final_write_processing): Likewise.
1332
201933ea
L
13332003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1334
1335 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1336
e717da7e
AM
13372003-07-10 Alan Modra <amodra@bigpond.net.au>
1338
1339 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1340 (struct ppc64_elf_obj_tdata): New.
1341 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1342 (ppc64_elf_mkobject): New function.
1343 (struct got_entry): Add "owner". Move "tls_type".
1344 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1345 (ppc64_elf_init_stub_bfd): New function.
1346 (create_got_section): Create header .got in dynobj. Create .got
1347 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1348 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1349 Look for dynobj .got, and test it.
1350 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1351 (update_local_sym_info): Likewise.
1352 (ppc64_elf_check_relocs): Likewise.
1353 (ppc64_elf_gc_sweep_hook): Likewise.
1354 (ppc64_elf_tls_optimize): Likewise.
1355 (allocate_dynrelocs): Likewise.
1356 (ppc64_elf_size_dynamic_sections): Likewise.
1357 (ppc64_elf_relocate_section): Likewise.
1358 (ppc64_elf_next_toc_section): Update comment.
1359 (toc_adjusting_stub_needed): Remove unneeded cast.
1360 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1361 testing section flags.
1362 (ppc64_elf_build_stubs): Likewise.
1363 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1364 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1365 (func_desc_adjust): Copy over dynamic info for undef weaks.
1366 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1367 (ppc64_elf_size_stubs): Update prototype.
1368 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1369 input sections rather than scanning dynobj.
1370
18ad015f
RS
13712003-07-09 Richard Sandiford <rsandifo@redhat.com>
1372
1373 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1374 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1375 (mips_elf_create_msym_section): Delete.
1376 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1377 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1378 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1379 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1380 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1381 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1382 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1383
e10609d3
RS
13842003-07-09 Richard Sandiford <rsandifo@redhat.com>
1385
1386 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1387 symbols protected.
1388
0d591ff7
RS
13892003-07-09 Richard Sandiford <rsandifo@redhat.com>
1390
1391 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1392 of relocations whose offset is -2.
1393
fdd07405
RS
13942003-07-09 Richard Sandiford <rsandifo@redhat.com>
1395
1396 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1397 forced-local symbols like other locals. Don't create relocations
1398 against STN_UNDEF in irix objects.
1399
d2fba50d
RS
14002003-07-09 Richard Sandiford <rsandifo@redhat.com>
1401
1402 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1403 compatible objects, add the values of defined external symbols
1404 to the addend.
1405
6eaa6adc
RS
14062003-07-09 Richard Sandiford <rsandifo@redhat.com>
1407
1408 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1409 initialize a GOT entry to the symbol's st_value.
1410
0c83546a
AM
14112003-07-08 Alan Modra <amodra@bigpond.net.au>
1412
43c40ab2
AM
1413 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1414 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1415 (ppc_elf_tdata): Define.
1416 (elf_local_ptr_offsets): Adjust.
1417 (ppc_elf_mkobject): New function.
1418 (bfd_elf32_mkobject): Define.
1419
0c83546a
AM
1420 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1421 * elfcore.h (elf_core_file_p): Likewise.
1422 * section.c (bfd_section_init): Remove prototype.
1423
58111eb7
AM
14242003-07-08 Alan Modra <amodra@bigpond.net.au>
1425
1426 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1427 field.
1428 (enum elf_linker_section_enum): Delete.
1429 (struct elf_linker_section): Delete.
1430 (struct elf_linker_section_pointers): Delete.
1431 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1432 Make linker_section_pointers a void**.
1433 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1434 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1435 of old item in elf-bfd.h.
1436 (struct elf_linker_section): Likewise.
1437 (struct elf_linker_section_pointers): Likewise.
1438 (elf_local_ptr_offsets): Define.
1439 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1440 (ppc_elf_link_hash_newfunc): Init it.
1441 (struct ppc_elf_link_hash_table): Add sbss.
1442 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1443 individual fields.
1444 (elf_create_linker_section): Fold into..
1445 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1446 Make rela section here if shared.
1447 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1448 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1449 clearing in a loop.
1450 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1451 section here.
1452 (ppc_elf_check_relocs): Adjust.
1453 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1454 creating .sbss by hand.
1455 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1456
15f8604d
JJ
14572003-07-04 Jakub Jelinek <jakub@redhat.com>
1458
1459 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1460 complain_overflow_bitfield.
1461 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1462 complain_overflow_bitfield.
1463
3368a7fb
JJ
14642003-07-04 Jakub Jelinek <jakub@redhat.com>
1465
1466 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1467 true even if -pie.
1468
9203ba99
JJ
14692003-07-04 Jakub Jelinek <jakub@redhat.com>
1470
1471 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1472 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1473 !info->executable.
1474 (get_fptr): For -pie create .opd as writable section and create
1475 .rela.opd as well.
1476 (elfNN_ia64_check_relocs): Change info->shared into
1477 !info->executable.
1478 (allocate_fptr): Likewise.
1479 (allocate_dynrel_entries): Account for a relative reloc for -pie
1480 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1481 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1482 section if -pie.
1483 (set_got_entry): Don't create a relative reloc if -pie
1484 want_ltoff_fptr for undefweak symbol.
1485 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1486 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1487 @fptr().
1488
1489 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1490 even if -pie.
1491 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1492 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1493 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1494 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1495 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1496 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1497 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1498 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1499 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1500
e0a868d1 15012003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1502
1503 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1504 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1505 <R_H8_DIR32A16>: Fix type of relocation.
1506
35cad4c4
KK
15072003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1508
1509 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1510 sections were created already. Remove unnecessary tests of
1511 the previous change.
1512
03151a5a
KK
15132003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1514
1515 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1516 bfd_make_section for existing sections.
1517
003d627e
AM
15182003-07-04 Alan Modra <amodra@bigpond.net.au>
1519
2293c499
AM
1520 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1521 create_got_section if we already have done so.
1522 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1523 (sh_elf_check_relocs): Likewise.
1524 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1525 htab->root.dynobj instead.
1526 (sh_elf_check_relocs): Likewise.
1527 (sh_elf_finish_dynamic_sections): Likewise.
1528
003d627e
AM
1529 * section.c (bfd_make_section): Return NULL for existing section.
1530
fa681e5d
AM
15312003-07-04 Alan Modra <amodra@bigpond.net.au>
1532
1533 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1534 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1535
1536 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1537 (_bfd_elf_find_pointer_linker_section): Likewise.
1538 (bfd_elf32_create_pointer_linker_section): Likewise.
1539 (bfd_elf32_finish_pointer_linker_section): Likewise.
1540 (bfd_elf64_create_pointer_linker_section): Likewise.
1541 (bfd_elf64_finish_pointer_linker_section): Likewise.
1542 (_bfd_elf_make_linker_section_rela): Likewise.
1543 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1544 (elf_finish_pointer_linker_section): Likewise.
1545 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1546 (_bfd_elf_create_linker_section): Move this function..
1547 (_bfd_elf_find_pointer_linker_section): ..and this..
1548 * elflink.h (elf_create_pointer_linker_section): ..and this..
1549 (elf_finish_pointer_linker_section): ..and this..
1550 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1551 calls.
1552 (elf_create_linker_section): Convert to C90, tidy.
1553 (elf_find_pointer_linker_section): Likewise.
1554 (elf_create_pointer_linker_section): Likewise.
1555 (elf_finish_pointer_linker_section): Likewise.
1556 * elf32-i370.c: Delete #if 0 code.
1557
772119ce
AM
15582003-07-02 Alan Modra <amodra@bigpond.net.au>
1559
1560 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1561 _restf* to be satisfied by shared libs, and always force them local.
1562 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1563 Correct test for "bl".
1564 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1565 primary opcode 31.
1566
bd1ea41b
MS
15672003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1568
1569 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1570 (s390_tls_reloc): New function.
1571 (elf_howto_table): Add long displacement relocations R_390_20,
1572 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1573 (elf_s390_reloc_type_lookup): Likewise.
1574 (elf_s390_check_relocs): Likewise.
1575 (elf_s390_gc_sweep_hook): Likewise.
1576 (elf_s390_relocate_section): Likewise.
1577 * elf64-s390.c: Same changes as for elf32-s390.c.
1578 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1579 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1580 BFD_RELOC_390_TLS_GOTIE20.
1581 * bfd-in2.h: Regenerate.
1582 * libbfd.h: Likewise.
1583
113202d6
AM
15842003-06-30 Alan Modra <amodra@bigpond.net.au>
1585
1586 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1587 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1588
c58b9523
AM
15892003-06-29 Alan Modra <amodra@bigpond.net.au>
1590
1591 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1592 Replace PTR with void *. Formatting.
1593 * archive64.c: Likewise.
1594 * archures.c: Likewise.
1595 * bfd-in.h: Likewise.
1596 * bfd.c: Likewise.
1597 * bfdio.c: Likewise.
1598 * bfdwin.c: Likewise.
1599 * cache.c: Likewise.
1600 * corefile.c: Likewise.
1601 * format.c: Likewise.
1602 * init.c: Likewise.
1603 * libbfd-in.h: Likewise.
1604 * libbfd.c: Likewise.
1605 * linker.c: Likewise.
1606 * opncls.c: Likewise.
1607 * reloc.c: Likewise.
1608 * section.c: Likewise.
1609 * simple.c: Likewise.
1610 * syms.c: Likewise.
1611 * targets.c: Likewise.
1612 * bfd-in2.h: Regenerate.
1613 * libbfd.h: Regenerate.
1614
1615 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1616 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1617 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1618 (bfd_getb64): Rewrite without parens.
1619 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1620 * cache.c (insert, snip): Remove INLINE.
1621 * linker.c (bfd_link_add_undef): Likewise.
1622
27482721
AJ
16232003-06-29 Andreas Jaeger <aj@suse.de>
1624
1625 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1626 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1627 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1628 trim plt entries. Move undefweak non-default visibility test ...
1629 (allocate_dynrelocs): ... from here.
1630 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1631 Change all callers.
1632 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1633 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1634 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1635 dynreloc and .got relocs.
1636 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1637 for .got relocs.
27482721 1638
2b86c02e
TS
16392003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1640
1641 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1642
e7c81c25
NC
16432003-06-27 Nick Clifton <nickc@redhat.com>
1644
1645 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1646 bfd_add_gnu_debuglink_section and only create the section, do not
1647 fill in its contents.
1648 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1649 contents of a .gnu-debuglink section.
1650 * bfd-in2.h: Regenerate.
1651
72b4917c
TS
16522003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1653
1654 * elfxx-mips.c: Revert .got alignment to 2**4.
1655
91709090
TS
16562003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1657
1658 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1659
7a79a000
TS
16602003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1661
1662 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1663 relocation header setup.
1664
e47cd125
AM
16652003-06-25 Alan Modra <amodra@bigpond.net.au>
1666
1667 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1668 (ppc_elf_reloc_type_lookup): Modify comment.
1669 (ppc_elf_info_to_howto): Ditto.
1670 (ppc_elf_relocate_section): Ditto.
1671 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1672
1049f94e
AM
16732003-06-25 Alan Modra <amodra@bigpond.net.au>
1674
1675 * aout-ns32k.c: Correct spelling of "relocatable".
1676 * aoutx.h: Likewise.
1677 * bfd-in.h: Likewise.
1678 * bfd.c: Likewise.
1679 * bout.c: Likewise.
1680 * coff-a29k.c: Likewise.
1681 * coff-alpha.c: Likewise.
1682 * coff-arm.c: Likewise.
1683 * coff-i386.c: Likewise.
1684 * coff-i860.c: Likewise.
1685 * coff-i960.c: Likewise.
1686 * coff-m68k.c: Likewise.
1687 * coff-m88k.c: Likewise.
1688 * coff-mcore.c: Likewise.
1689 * coff-mips.c: Likewise.
1690 * coff-or32.c: Likewise.
1691 * coff-ppc.c: Likewise.
1692 * coff-rs6000.c: Likewise.
1693 * coff-sh.c: Likewise.
1694 * coff-tic80.c: Likewise.
1695 * coff64-rs6000.c: Likewise.
1696 * cofflink.c: Likewise.
1697 * cpu-ns32k.c: Likewise.
1698 * ecoff.c: Likewise.
1699 * ecofflink.c: Likewise.
1700 * elf-bfd.h: Likewise.
1701 * elf-eh-frame.c: Likewise.
1702 * elf-hppa.h: Likewise.
1703 * elf-m10200.c: Likewise.
1704 * elf-m10300.c: Likewise.
1705 * elf.c: Likewise.
1706 * elf32-arm.h: Likewise.
1707 * elf32-avr.c: Likewise.
1708 * elf32-cris.c: Likewise.
1709 * elf32-d10v.c: Likewise.
1710 * elf32-dlx.c: Likewise.
1711 * elf32-fr30.c: Likewise.
1712 * elf32-frv.c: Likewise.
1713 * elf32-h8300.c: Likewise.
1714 * elf32-hppa.c: Likewise.
1715 * elf32-i370.c: Likewise.
1716 * elf32-i386.c: Likewise.
1717 * elf32-i860.c: Likewise.
1718 * elf32-i960.c: Likewise.
1719 * elf32-ip2k.c: Likewise.
1720 * elf32-iq2000.c: Likewise.
1721 * elf32-m32r.c: Likewise.
1722 * elf32-m68hc11.c: Likewise.
1723 * elf32-m68hc1x.c: Likewise.
1724 * elf32-m68k.c: Likewise.
1725 * elf32-mcore.c: Likewise.
1726 * elf32-mips.c: Likewise.
1727 * elf32-msp430.c: Likewise.
1728 * elf32-openrisc.c: Likewise.
1729 * elf32-ppc.c: Likewise.
1730 * elf32-s390.c: Likewise.
1731 * elf32-sh.c: Likewise.
1732 * elf32-sh64.c: Likewise.
1733 * elf32-sparc.c: Likewise.
1734 * elf32-v850.c: Likewise.
1735 * elf32-vax.c: Likewise.
1736 * elf32-xstormy16.c: Likewise.
1737 * elf32-xtensa.c: Likewise.
1738 * elf64-alpha.c: Likewise.
1739 * elf64-hppa.c: Likewise.
1740 * elf64-mips.c: Likewise.
1741 * elf64-mmix.c: Likewise.
1742 * elf64-ppc.c: Likewise.
1743 * elf64-s390.c: Likewise.
1744 * elf64-sh64.c: Likewise.
1745 * elf64-sparc.c: Likewise.
1746 * elf64-x86-64.c: Likewise.
1747 * elfcode.h: Likewise.
1748 * elflink.h: Likewise.
1749 * elfn32-mips.c: Likewise.
1750 * elfxx-ia64.c: Likewise.
1751 * elfxx-mips.c: Likewise.
1752 * i386linux.c: Likewise.
1753 * ieee.c: Likewise.
1754 * libcoff-in.h: Likewise.
1755 * linker.c: Likewise.
1756 * m68klinux.c: Likewise.
1757 * pdp11.c: Likewise.
1758 * pe-mips.c: Likewise.
1759 * peXXigen.c: Likewise.
1760 * reloc.c: Likewise.
1761 * reloc16.c: Likewise.
1762 * sparclinux.c: Likewise.
1763 * sunos.c: Likewise.
1764 * syms.c: Likewise.
1765 * versados.c: Likewise.
1766 * vms.c: Likewise.
1767 * xcofflink.c: Likewise.
1768 * bfd-in2.h: Regenerate.
1769 * libcoff.h: Regenerate.
1770 * libbfd.h: Regenerate.
1771
55fd94b0
AM
17722003-06-24 Alan Modra <amodra@bigpond.net.au>
1773
d85f2c7d
AM
1774 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1775 local sym errors.
1776
55fd94b0
AM
1777 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1778 prototypes and casts. Replace PTR with void *. Formatting.
1779 * elf32-ppc.c: Likewise. Break long strings too.
1780 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1781 (ppc_elf_unhandled_reloc): Internationalize error message.
1782 * elf32-ppc.h: Remove PARAMS.
1783
88810f8c
MM
17842003-06-23 Mark Mitchell <mark@codesourcery.com>
1785
1786 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1787 APUinfo slots.
1788 (ppc_elf_final_write_processing): Likewise.
1789
6e35c4da
L
17902003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1791
1792 * elflink.h (elf_link_input_bfd): Check raw size when using
1793 kept_section to preserve debug information discarded by
1794 linkonce.
1795
8f3bab57
AM
17962003-06-20 Alan Modra <amodra@bigpond.net.au>
1797
1798 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1799 (ppc64_elf_setup_section_lists): Set it.
1800 (ppc64_elf_relocate_section): Check sym section id against top_id.
1801 (ppc_build_one_stub): Comment on top_id.
1802
efbc813e
NC
18032003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1804
1805 * config.bfd: Add tic4x-*-rtems*.
1806
4ce794b7
AM
18072003-06-20 Alan Modra <amodra@bigpond.net.au>
1808
1809 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1810 prototypes and casts. Replace PTR with void *. Format copyright.
1811 Mention ABI links.
1812 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1813 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1814 (ppc_type_of_stub): Make r_type an enum.
1815 (ppc64_elf_size_stubs): Likewise.
1816 * elf64-ppc.h: Remove PARAMS macro.
1817
d2a300cf
AM
18182003-06-19 Alan Modra <amodra@bigpond.net.au>
1819
3254fd24
AM
1820 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1821 elf hash tab fields.
1822
d2a300cf
AM
1823 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1824 (ppc64_elf_info_to_howto): Likewise.
1825 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1826 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1827
83615de0
AM
18282003-06-19 Alan Modra <amodra@bigpond.net.au>
1829
1830 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1831 reloc overflow on discarded eh_frame entries.
1832
9b5ecbd0
AM
18332003-06-19 Alan Modra <amodra@bigpond.net.au>
1834
1835 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1836 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1837 Return error condition.
1838 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1839 that have has_gp_reloc set.
1840 (struct ppc_link_hash_table): Add stub_count.
1841 (ppc_build_one_stub): Increment it.
1842 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1843 individual fields.
1844 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1845
64c456e1
AM
18462003-06-18 Alan Modra <amodra@bigpond.net.au>
1847
1848 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1849 size calculation from addend. Round size up.
1850
3dab95d3
HPN
18512003-06-18 Hans-Peter Nilsson <hp@axis.com>
1852
1853 * elf32-cris.c (cris_elf_relocate_section) <case
1854 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1855 symbol from a normal object or an undefined weak symbol.
1856
0b13192e
AM
18572003-06-18 Alan Modra <amodra@bigpond.net.au>
1858
1859 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1860 R_PPC64_TOC relocs.
1861
f97b9cb8
L
18622003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1863
1864 * section.c (struct sec): Put back kept_section.
1865 (STD_SECTION): Put back kept_section initialization.
1866 * bfd-in2.h: Regenerate.
1867
1868 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1869 sections for relocateable output. Use kept_section to preserve
1870 debug information discarded by linkonce.
1871
9f1c3a0a
L
18722003-06-17 Roland McGrath <roland@redhat.com>
1873
1874 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1875 segment-relative relocation between different segments.
1876
734b6cf9
AM
18772003-06-17 Alan Modra <amodra@bigpond.net.au>
1878
1cf1f670
AM
1879 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1880 optimizations earlier.
1881
734b6cf9
AM
1882 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1883 Restore previous input_list type.
1884 (ppc64_elf_link_hash_table_create): Undo last change.
1885 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1886 per output section, but don't bother with bfd_abs_section marker.
1887 (ppc64_elf_next_input_section): Adjust for multiple input section
1888 lists.
1889 (group_sections): Likewise.
1890
23fbd6fa
JJ
18912003-06-17 Jakub Jelinek <jakub@redhat.com>
1892
1893 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1894 *r_offset == r_addend for RELATIVE relocs against .got.
1895
dad27d18
AM
18962003-06-17 Alan Modra <amodra@bigpond.net.au>
1897
1898 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1899
b613960a
NC
19002003-06-17 Nick Clifton <nickc@redhat.com>
1901
1902 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1903 in the vtable_entries_used array to allow for the accessing
1904 the largest element.
b613960a 1905
000732f7
AM
19062003-06-17 Alan Modra <amodra@bigpond.net.au>
1907
3d6f9012
AM
1908 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1909 input_list.
1910 (ppc64_elf_link_hash_table_create): Init input_list here.
1911 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1912 per output section. Set toc_off for abs and other standard sections.
1913 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1914 (ppc64_elf_next_input_section): Adjust for single input section list.
1915 Don't set toc_curr from input bfds that haven't set elf_gp.
1916 (group_sections): Adjust for single input section list.
1917
000732f7
AM
1918 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1919
81407a69
AM
19202003-06-16 Alan Modra <amodra@bigpond.net.au>
1921
1922 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1923 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1924 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1925 got section for RELATIVE relocs. Fix wrong comment. Change condition
1926 under which dynamic relocs update the section contents.
1927
a06a29f2
NC
19282003-06-13 Robert Millan <zeratul2@wanadoo.es>
1929
1930 * config.bfd: Add i386-netbsd-gnu target.
1931
7d1ebfb2
NC
19322003-06-12 Nick Clifton <nickc@redhat.com>
1933
1934 * opncls.c (calc_crc32): Rename to
1935 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1936 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1937 hard-coded ".gnu_debuglink" in the code.
81407a69 1938 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1939 xmalloc with a call to malloc.
81407a69 1940 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1941 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1942 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1943 section to a bfd.
1944 * bfd-in2.h: Regenerate.
1945
19462003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1947
7d1ebfb2
NC
1948 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1949 New target (was i[3-7]86-*-openbsd* before).
1950 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1951 (vax-*-openbsd*): New target.
1952
d80dcc6a
TS
19532003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1954
1955 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1956 for n32, too.
1957 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1958 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1959 (mips_elf_create_got_section): Likewise.
1960 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1961
a7ebbfdf
TS
19622003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1963
1964 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1965 (elf_mips_howto_table_rel): Use it.
1966 (gprel32_with_gp): Move prototype.
1967 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1968 Use mips_elf_generic_reloc.
1969 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1970 Code cleanup.
1971 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1972 zero addend.
1973 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1974 as in the other *_gprel*_reloc functions.
1975 (gprel32_with_gp): Handle partial_inplace properly.
1976 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1977 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1978 Do addend handling directly instead of calling
1979 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1980 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1981 of zero addend. Handle partial_inplace properly.
1982 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1983 addend.
1984 (mips_elf64_gprel16_reloc): Likewise.
1985 (mips_elf64_literal_reloc): Likewise.
1986 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1987 logic as in the other *_gprel*_reloc functions. Handle
1988 partial_inplace properly.
1989 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1990 addend. Handle partial_inplace properly.
1991 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1992 of calling _bfd_mips_elf_gprel16_with_gp.
1993 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1994 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1995 of zero addend.
1996 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1997 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1998 of calling _bfd_mips_elf_gprel16_with_gp.
1999 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2000 partial_inplace properly. Fix wrong addend handling. Fix overflow
2001 check.
2002 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2003 exported.
2004 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2005 (_bfd_mips_elf_relocate_section): Likewise.
2006 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2007 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2008 (_bfd_mips_elf_sign_extend): New prototype.
2009
49ba19a4 20102003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2011
49ba19a4
NC
2012 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2013 New target (was sparc-*-openbsd* before).
2014 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 2015
de6e5e1a
NC
2016 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2017 * configure: Regenerate.
2018
3b443373
L
20192003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2020
2021 * po/Make-in (DESTDIR): New.
2022 (install-data-yes): Support $(DESTDIR).
2023 (uninstall): Likewise.
2024
795bb480
AM
20252003-06-11 Alan Modra <amodra@bigpond.net.au>
2026
2027 * Makefile.am (config.status): Depend on version.h.
2028 Run "make dep-am".
2029 * Makefile.in: Regenerate.
2030 * po/SRC-POTFILES.in: Regenerate.
2031
adadcc0c
AM
20322003-06-10 Alan Modra <amodra@bigpond.net.au>
2033 Gary Hade <garyhade@us.ibm.com>
2034
2035 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2036
f4984206
RS
20372003-06-10 Richard Sandiford <rsandifo@redhat.com>
2038
2039 * archures.c (bfd_mach_h8300sxn): New architecture.
2040 * bfd-in2.h: Regenerate.
2041 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2042 (h8300sxn_info_struct): New.
2043 (h8300sx_info_struct): Link to it.
2044 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2045 (elf32_h8_final_write_processing): Likewise.
2046
ad8e1ba5
AM
20472003-06-08 Alan Modra <amodra@bigpond.net.au>
2048
2049 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2050 elfxx-target.h so that we can use elf_backend_got_header_size.
2051 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2052 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2053 associated macros.
2054 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2055 dst_mask.
2056 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2057 ppc_stub_plt_branch_r2off.
2058 (struct ppc_stub_hash_entry): Reorganize.
2059 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2060 toc_curr, toc_off and emit_stub_syms.
2061 (ppc64_elf_link_hash_table_create): Init them.
2062 (ppc_stub_name): Correct string size.
2063 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2064 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2065 used.
2066 (ppc_type_of_stub): Tweak root.type test.
2067 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2068 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2069 ppc_stub_plt_branch_r2off.
2070 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2071 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2072 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2073 Initialize elf_gp and toc_curr.
2074 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2075 (ppc64_elf_next_input_section): Set toc_off.
2076 (group_sections): Ensure groups have the same TOC.
2077 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2078 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2079 Build new glink stub.
2080 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2081 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2082 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2083 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2084 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2085 (STD_SECTION): Update.
2086 * ecoff.c (bfd_debug_section): Update comment.
2087 * bfd-in2.h: Regenerate.
2088
90fff0d4
DJ
20892003-06-05 Daniel Jacobowitz <drow@mvista.com>
2090
2091 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2092 NULL function pointers.
2093
c82b20e4
DJ
20942003-06-05 Daniel Jacobowitz <drow@mvista.com>
2095
2096 * simple.c (bfd_simple_get_relocated_section_contents): Call
2097 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2098
53d4437a
SS
20992003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2100
5a5b9651
SS
2101 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2102 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2103 swaptables.
2104 * coff-tic4x.c: Ditto
53d4437a
SS
2105 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2106 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
2107 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2108 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2109 swap tables.
53d4437a
SS
2110 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2111 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2112 * coff-apollo.c: Ditto
2113 * coff-arm.c: Ditto
2114 * coff-h8300.c: Ditto
2115 * coff-h8500.c: Ditto
2116 * coff-i960.c: Ditto
2117 * coff-m68k.c: Ditto
2118 * coff-m88k.c: Ditto
2119 * coff-mcore.c: Ditto
2120 * coff-sh.c: Ditto
2121 * coff-sparc.c: Ditto
2122 * coff-tic80.c: Ditto
2123 * coff-we32k.c: Ditto
2124 * coff-z8k.c: Ditto
2125 * coff-w65.c: Ditto
2126
736694c8
SS
21272003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2128
2129 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2130 initialization bug
2131
9ee5e499
JJ
21322003-06-03 Jakub Jelinek <jakub@redhat.com>
2133
2134 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2135 (bfd_section_from_phdr): Likewise.
2136 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2137 (get_program_header_size): Count with PT_GNU_STACK.
2138 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2139 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2140
6f6f27f8
L
21412003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2142
2143 * elflink.h (elf_link_input_bfd): Call linker error_handler
2144 for discarded definitions.
2145
a3b6428f
NC
21462003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2147
2148 * syms.c (decode_section_type): Return 'n' if section flags are
2149 SEC_HAS_CONTENTS && SEC_READONLY.
2150
e30ddb24
NC
21512003-06-03 Nick Clifton <nickc@redhat.com>
2152
2153 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2154 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2155 (v850_elf_reloc_map): Likewise.
2156 (v850_elf_check_relocs): Likewise.
2157 (v850_elf_perform_relocation): Likewise.
2158 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2159 to make R_V850_REl32 pc-relative.
adadcc0c 2160
2558b9a9
KK
21612003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2162
2163 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2164 and DT_DEBUG dynamic tag even for position independent executables.
2165 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2166
f15398ef
DJ
21672003-06-02 Daniel Jacobowitz <drow@mvista.com>
2168
2169 * config.bfd: Move obsolete entries out of the range of the
2170 targmatch sed script.
2171
cad28985
DJ
21722003-06-02 Daniel Jacobowitz <drow@mvista.com>
2173
2174 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2175
f2c822e3
JJ
21762003-05-31 Jakub Jelinek <jakub@redhat.com>
2177
2178 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2179 plt entries, not just 8191.
2180
c9c27aad
DJ
21812003-05-30 Daniel Jacobowitz <drow@mvista.com>
2182
2183 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2184 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2185
36af4a4e
JJ
21862003-05-30 Ulrich Drepper <drepper@redhat.com>
2187 Jakub Jelinek <jakub@redhat.com>
2188
2189 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2190 instead of info->shared where appropriate.
2191 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2192 * elflink.c (_bfd_elf_create_got_section): Likewise.
2193 (_bfd_elf_link_create_dynamic_sections): Likewise.
2194 (_bfd_elf_link_assign_sym_version): Likewise.
2195 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2196 and DT_DEBUG dynamic tag even for position independent executables.
2197 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2198 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2199 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2200 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2201 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2202 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2203 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2204 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2205 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2206
f8843e87
AM
22072003-05-30 Kris Warkentin <kewarken@qnx.com>
2208
2209 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2210 signalled thread.
2211 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2212
29e1a6e4
NC
22132003-05-29 Nick Clifton <nickc@redhat.com>
2214
2215 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2216 Tidy up formatting.
2217 * Makefile.am: Add dependency on safe-ctype.h.
2218 * Makefile.in: Regenerate.
2219
4b555070
TS
22202003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2221
2222 * elfxx-mips.c: Don't force symbols local unconditionally.
2223
0236e03e
L
22242003-05-28 Alan Modra <amodra@bigpond.net.au>
2225
2226 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2227 undefined_symbol call.
2228
9e4aeb93
RS
22292003-05-27 Richard Sandiford <rsandifo@redhat.com>
2230
2231 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2232 (mips_elf_link_hash_table): Likewise.
2233
d0c728db
TS
22342003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2235
2236 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2237 R_MIPS_GNU_REL16_S2 support.
2238 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2239 (mips_elf64_rtype_to_howto): Use it.
2240 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2241 R_MIPS_GNU_REL16_S2 support.
2242 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2243 (mips_elf_n32_rtype_to_howto): Use it.
2244
759ebd76
DA
22452003-05-21 Stuart F. Downing <sdowning@fame.com>
2246
2247 * som.h: Define PA_2_0 before including a.out.h
2248
143d77c5
EC
22492003-05-07 Eric Christopher <echristo@redhat.com>
2250 Alexandre Oliva <aoliva@redhat.com>
2251
2252 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2253 pic tests, change to warning.
2254 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2255
cea3d58d
NC
22562003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2257
2258 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2259 well as shle-...-netbsdelf. Remove duplicate entry.
2260
385a4c14
NC
22612003-05-21 Nick Clifton <nickc@redhat.com>
2262
60e42408
NC
2263 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2264 for X_STORMY16_REL_12 reloc.
2265
385a4c14 2266 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2267 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2268 (bfd_elf_get_runpath_list): Likewise.
2269
129b8c20
RM
22702003-05-19 Roland McGrath <roland@redhat.com>
2271
2272 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2273 * bfd-in.h: Declare it.
2274 * bfd-in2.h: Regenerated.
2275 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2276 * elf-bfd.h (struct elf_backend_data): New function pointer member
2277 elf_backend_bfd_from_remote_memory.
2278 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2279 Declare them.
2280 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2281 (elfNN_bed): Add that to the initializer.
2282
22832003-05-15 Roland McGrath <roland@redhat.com>
2284
2285 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2286
22d5e339
L
22872003-05-20 Jakub Jelinek <jakub@redhat.com>
2288
2289 * elflink.h (elf_link_output_extsym): Only issue error about !=
2290 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2291
22922003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2293
2294 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2295 when removing the old definition for symbols with non-default
2296 visibility.
2297
b645cb17
JE
22982003-05-18 Jason Eckhardt <jle@rice.edu>
2299
2300 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2301
d2ff124f
AS
23022003-05-17 Andreas Schwab <schwab@suse.de>
2303
2304 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2305 elf_section_data during processing of pc-relative and absolute
2306 relocations.
2307 (elf_m68k_relocate_section): Use the cached reloc section instead
2308 of computing it again. Fix handling of visibility. Don't modify
2309 addend when copying over a relocation into the output.
2310
9c7a29a3
AM
23112003-05-17 Alan Modra <amodra@bigpond.net.au>
2312
2313 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2314 to trim plt entries. Move undefweak non-default visibility test..
2315 (allocate_dynrelocs): ..from here.
2316 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2317 dynamic_sections_created here. Update comment. Move undefweak
2318 non-default visibility test..
2319 (allocate_dynrelocs): ..from here. Fix comment.
2320 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2321 to trim plt entries. Move undefweak non-default visibility test..
2322 (allocate_dynrelocs): ..from here. Fix comment.
2323 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2324 STV_DEFAULT rather than comparing with zero.
2325 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2326 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2327
9bcf4de0
TS
23282003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2329
2330 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2331 pointers.
2332 (_bfd_set_gp_value): Likewise.
2333
5d1db417
MS
23342003-05-16 Michael Snyder <msnyder@redhat.com>
2335 From Bernd Schmidt <bernds@redhat.com>
2336 * archures.c (bfd_mach_h8300sx): New.
2337 * bfd-in2.h: Regenerate.
2338 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2339 (h8300sx_info_struct): New.
2340 (h8300s_info_struct): Link to it.
2341 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2342 (elf32_h8_final_write_processing): Likewise.
2343 (elf32_h8_relax_section): Likewise.
2344
80c7c40a
NC
23452003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2346
2347 * config.bfd: Accept i[3-7]86 variants.
2348 * configure.host: Likewise.
2349 * configure.in: Likewise.
2350 * configure: Regenerate.
2351
c1be741f
L
23522003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2353
2354 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2355 symbol.
2356
a15d9d3a
L
23572003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2358
2359 * elflink.h (elf_link_check_versioned_symbol): Also allow
2360 the base version.
2361
09695f56
AM
23622003-05-15 Alan Modra <amodra@bigpond.net.au>
2363 H.J. Lu <hongjiu.lu@intel.com>
2364
2365 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2366 (elf_i386_relocate_section): Likewise.
2367 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2368 (ppc_elf_relocate_section): Likewise.
2369 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2370 (ppc64_elf_relocate_section): Likewise.
2371
40f62fa0
TS
23722003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2373
2374 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2375
47247ced
SC
23762003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2377
2378 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2379 processor capability, allow merge of HC12 and HCS12 in some cases.
2380 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2381 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2382 (bfd_m68hc12_arch): Link it.
2383 (scan_mach): New function.
2384
32dfa85d
AH
23852003-05-13 Andrew Haley <aph@redhat.com>
2386
2387 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2388
586119b3
AM
23892003-05-13 Alan Modra <amodra@bigpond.net.au>
2390 H.J. Lu <hongjiu.lu@intel.com>
2391
2392 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2393 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2394 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2395 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2396 (ppc_elf_relocate_section): Likewise.
2397 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2398 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2399 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2400 relocs need no other types.
2401 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2402 dynreloc check.
2403 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2404 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2405 .got relocs.
2406
04e534c3
KK
24072003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2408
2409 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2410 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2411 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2412 visibility, a) don't allocate plt entries, b) don't allocate
2413 .got relocs, c) discard dyn rel space
adadcc0c
AM
2414 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2415 don't generate dynamic relocs.
04e534c3
KK
2416 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2417 for weakdefs when symbol already adjusted.
2418
0afb2dc0
NC
24192003-05-12 Nick Clifton <nickc@redhat.com>
2420
2421 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2422 overflow detection for R_XSTORMY16_16 reloc.
2423
9d29900b
NC
24242003-05-12 Paul Clarke <paulc@senet.com.au>
2425
2426 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2427
a48c6a54
JE
24282003-05-11 Jason Eckhardt <jle@rice.edu>
2429
2430 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2431 adjust upper bits.
2432 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2433 proper place.
2434 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2435 proper place.
2436
44f745a6
AS
24372003-05-11 Andreas Schwab <schwab@suse.de>
2438
2439 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2440 complicated tests for unresolvable relocs with a simple direct
2441 scheme using "unresolved_reloc" var. Report some detail on
2442 bfd_reloc_outofrange and similar errors.
2443
4ec72bde
MS
24442003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2445
2446 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2447 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2448 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2449 * elf64-s390.c: Likewise.
2450
64285810
MS
24512003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2452
2453 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2454 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2455 ELF_LINK_NON_GOT_REF from weakdef.
2456 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2457 already been adjusted before treating it specially.
2458 * el64-s390.c: Likwise.
2459
82058a73
MS
24602003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2461
2462 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2463 non-default visibility, a) don't make them dynamic, b) discard
2464 space for dynamic relocs.
2465 (elf_s390_relocate_section): Initialize the GOT entries and skip
2466 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2467 symbols with non-default visibility.
2468 * elf64-s390.c: Likewise.
2469
60d8b524
AM
24702003-05-09 Alan Modra <amodra@bigpond.net.au>
2471
2472 * cpu-arm.c (arm_check_note): Warning fix.
2473 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2474 to keep relocs if edited.
2475 (iq2000_elf_print_private_bfd_data): Return TRUE.
2476 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2477 ELF64_R_SYM.
2478 (elfNN_ia64_relax_ldxmov): Warning fix.
2479 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2480 * xtensa-modules.c (get_num_opcodes): Warning fix.
2481
e57b5356
AM
24822003-05-09 Andrey Petrov <petrov@netbsd.org>
2483
2484 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2485
45d6a902
AM
24862003-05-09 Alan Modra <amodra@bigpond.net.au>
2487
2488 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2489 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2490 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2491 (bfd_elf_record_link_assignment): Move from elflink.h.
2492 (_bfd_elf_merge_symbol): Likewise.
2493 (_bfd_elf_add_default_symbol): Likewise.
2494 (_bfd_elf_export_symbol): Likewise.
2495 (_bfd_elf_link_find_version_dependencies): Likewise.
2496 (_bfd_elf_link_assign_sym_version): Likewise.
2497 (_bfd_elf_link_read_relocs): Likewise.
2498 (_bfd_elf_link_size_reloc_section): Likewise.
2499 (_bfd_elf_fix_symbol_flags): Likewise.
2500 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2501 (_bfd_elf_link_sec_merge_syms): Likewise.
2502 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2503 and bed->s->sizeof_rela.
2504 (_bfd_elf_link_output_relocs): Likewise.
2505 * elf-bfd.h (struct elf_size_info): Rename file_align to
2506 log_file_align.
2507 (struct elf_info_failed): Move from elflink.h.
2508 (struct elf_assign_sym_version_info): Likewise.
2509 (struct elf_find_verdep_info): Likewise.
2510 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2511 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2512 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2513 _bfd_elf_link_assign_sym_version,
2514 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2515 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2516 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2517 _bfd_elf_link_sec_merge_syms): Declare.
2518 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2519 (_bfd_elf32_link_read_relocs): Likewise.
2520 (bfd_elf64_link_create_dynamic_sections): Likewise.
2521 (_bfd_elf64_link_read_relocs): Likewise.
2522 * elflink.h: Move lots o' stuff elsewhere.
2523 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2524 (bfd_elf64_record_link_assignment): Likewise.
2525 (bfd_elf_record_link_assignment): Declare.
2526 * bfd-in2.h: Regenerate.
2527 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2528 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2529 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2530 (assign_file_positions_for_segments): Likewise.
2531 (assign_file_positions_except_relocs): Likewise.
2532 (swap_out_syms, elfcore_write_note): Likewise.
2533 * elf-m10200.c: Adjust for changed function names.
2534 * elf-m10300.c: Likewise.
2535 * elf32-arm.h: Likewise.
2536 * elf32-h8300.c: Likewise.
2537 * elf32-hppa.c: Likewise.
2538 * elf32-ip2k.c: Likewise.
2539 * elf32-m32r.c: Likewise.
2540 * elf32-m68hc11.c: Likewise.
2541 * elf32-m68hc1x.c: Likewise.
2542 * elf32-m68k.c: Likewise.
2543 * elf32-mips.c: Likewise.
2544 * elf32-ppc.c: Likewise.
2545 * elf32-sh.c: Likewise.
2546 * elf32-v850.c: Likewise.
2547 * elf32-xtensa.c: Likewise.
2548 * elf64-alpha.c: Likewise.
2549 * elf64-hppa.c: Likewise.
2550 * elf64-mmix.c: Likewise.
2551 * elf64-ppc.c: Likewise.
2552 * elf64-sh64.c: Likewise.
2553 * elfxx-ia64.c: Likewise.
2554 * elfxx-mips.c: Likewise.
2555 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2556 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2557 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2558 * elf64-mips.c (mips_elf64_size_info): Likewise.
2559 * elf64-s390.c (s390_elf64_size_info): Likewise.
2560 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2561
bf1e742e
L
25622003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2563
2564 * elflink.h (elf_add_default_symbol): After skipping the
2565 unversioned symbol, go to non-default one.
2566
6a32c710
L
25672003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2568
2569 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2570 want_plt field.
2571 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2572 for symbols with non-default visibility.
2573
71552942
L
25742003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2575
2576 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2577 case that a DSO references a hidden symbol which may be
2578 satisfied by a versioned symbol in another DSO.
2579 (elf_link_output_extsym): Check versioned definition for hidden
2580 symbol referenced by a DSO.
2581
208c2cd6
NC
25822003-05-07 Nick Clifton <nickc@redhat.com>
2583
2584 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2585 R_XSTORMY16_16 reloc to ignore overflows.
2586
aa701218
AO
25872003-05-06 Alexandre Oliva <aoliva@redhat.com>
2588
2589 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2590 error message for mixing different-endian files. Check for ABI
2591 compatibility of input files with the selected emulation.
2592
4e795f50
AM
25932003-05-05 Alan Modra <amodra@bigpond.net.au>
2594
2595 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2596 non-default visibility, a) don't make them dynamic, b) discard
2597 space for dynamic relocs.
2598 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2599
2600 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2601 non-default visibility, a) don't allocate plt entries, b) don't
2602 allocate .got relocs, c) discard dyn rel space,
2603 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2604 don't generate dynamic relocs.
2605 * elf64-ppc.c (allocate_dynrelocs): As above.
2606 (ppc64_elf_relocate_section): As above.
2607
4bc6e03a
AJ
26082003-05-05 Andreas Jaeger <aj@suse.de>
2609
2610 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2611 relocation entries for weak undefined symbols with non-default
2612 visibility.
2613 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2614 skip R_386_32/R_386_PC32 for weak undefined symbols with
2615 non-default visibility.
2616
ef5aade5
L
26172003-05-04 H.J. Lu <hjl@gnu.org>
2618
2619 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2620 relocation entries for weak undefined symbols with non-default
2621 visibility.
2622 (elf_i386_relocate_section): Initialize the GOT entries and
2623 skip R_386_32/R_386_PC32 for weak undefined symbols with
2624 non-default visibility.
129b8c20 2625
ef5aade5
L
2626 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2627 descriptors for weak undefined symbols with non-default
2628 visibility.
2629 (allocate_dynrel_entries): Don't allocate relocation entries
2630 for symbols resolved to 0.
2631 (set_got_entry): Don't install dynamic relocation for weak
2632 undefined symbols with non-default visibility.
2633 (set_pltoff_entry): Likewise.
2634
2635 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2636 with non-default visibility.
2637 (elf_link_output_extsym): Don't make weak undefined symbols
2638 with non-default visibility dynamic.
2639
c424e0e9
L
26402003-05-04 H.J. Lu <hjl@gnu.org>
2641
2642 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2643
d31e3dfe
L
26442003-05-04 H.J. Lu <hjl@gnu.org>
2645
2646 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2647 symbol dynamic. Check indirection when removing the old
2648 definition for symbols with non-default visibility.
2649 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2650
4d2e1ff0
NC
26512003-05-02 Nick Clifton <nickc@redhat.com>
2652
2653 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2654 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2655 unsigned overflow.
2656
d40d037c
AJ
26572003-05-02 Andreas Jaeger <aj@suse.de>
2658
2659 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2660 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2661 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2662 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2663 ELF_LINK_NON_GOT_REF from weakdef.
2664
c5d1701e
NC
26652003-05-02 Charles Lepple <clepple@ghz.cc>
2666 Nick Clifton <nickc@redhat.com>
2667
2668 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2669 * aclocal.m4: Regenerate.
2670 * configure: Regenerate.
2671 * Makefile.in: Regenerate.
2672
81848ca0
AM
26732003-05-01 Alan Modra <amodra@bigpond.net.au>
2674
2675 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2676 weakdef sym has already been adjusted before treating it specially.
2677 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2678 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2679 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2680 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2681
c7996ad6
L
26822003-04-28 H.J. Lu <hjl@gnu.org>
2683
2684 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2685 the relax finalize pass.
2686
2687 * section.c (struct sec): Add need_finalize_relax and remove
2688 flag11.
2689 (STD_SECTION): Update struct sec initializer.
2690 * bfd-in2.h: Regenerated.
2691
f006af20
L
26922003-04-28 H.J. Lu <hjl@gnu.org>
2693
2694 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2695 to copy any information related to dynamic linking when we flip
2696 the indirection.
2697
1b1fe8fe
L
26982003-04-27 H.J. Lu <hjl@gnu.org>
2699
2700 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2701 (ELF_LINK_DYNAMIC_WEAK): New.
2702
2703 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2704 a symbol should be skipped. Ignore definitions in dynamic
2705 objects for symbols with non-default visibility.
2706 (elf_add_default_symbol): Adjusted.
2707 (elf_link_add_object_symbols): Check if a symbol should be
2708 skipped. Don't merge the visibility field with the one from
2709 a dynamic object.
2710 (elf_link_check_versioned_symbol): Use undef_bfd.
2711 (elf_link_output_extsym): Warn if a forced local symbol is
2712 referenced from dynamic objects. Make non-weak undefined symbol
2713 with non-default visibility a fatal error.
2714
052a450c
DJ
27152003-04-27 Daniel Jacobowitz <drow@mvista.com>
2716
2717 * configure.in: Bump version on HEAD to 2.14.90.
2718 * configure: Regenerated.
2719
d204f4c0
SC
27202003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2721
2722 PR savannah/3331:
2723 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2724 when we couldn't relax something.
2725
3c0a515d
L
27262003-04-25 Alan Modra <amodra@bigpond.net.au>
2727
2728 * elflink.h (elf_merge_symbol): When we find a regular definition
2729 for an indirect symbol, flip the indirection so that the old
2730 direct symbol now points to the new definition.
2731
d145330d
RM
27322003-04-24 Roland McGrath <roland@redhat.com>
2733
2734 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2735
fc0bffd6
AM
27362003-04-24 Alan Modra <amodra@bigpond.net.au>
2737
2738 * elf32-ppc.c: Formatting and comment fixes.
2739 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2740 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2741
27422003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2743
2744 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2745 * bfd-in2.h: Rebuilt.
2746 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2747 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2748 & H8300SNMAGIC.
2749 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2750 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2751 (h8300sn_info_struct, h8300hn_info_struct): New.
2752 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2753 (elf32_h8_final_write_processing): Likewise.
2754
267fb3c1
KK
27552003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2756
2757 * elf32-sh.c (tpoff): New.
2758 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2759 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2760 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2761 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2762 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2763 (dtpoff_base): Fix wrong indentation.
2764 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2765 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2766 R_SH_TLS_TPOFF32 relocations.
2767
ef230218
JR
27682003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2769
2770 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2771 * cpu-sh.c: Likewise.
2772 * elf32-sh.c: Likewise.
2773 * reloc.c (bfd_reloc_code_real): Likewise.
2774 * elf32-sh64-com.c: Change comment to refer to SuperH.
2775 * elf32-sh64.c: Likewise.
2776 * elf64-sh64.c: Likewise.
2777 * bfd-in2.h (enum bfd_architecture): Regenerate.
2778
8c29f035
AM
27792003-04-23 Alan Modra <amodra@bigpond.net.au>
2780
2781 From Julien LEMOINE <speedblue@debian.org>
2782 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2783 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2784
26597c86
NC
27852003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2786
2787 * archures.c: Replace references to Mitsubishi M32R with references
2788 to Renesas M32R.
2789 * relocs.c: Likewise.
2790 * bfd-in2.h: Regenerate.
2791
cc13e3ef
RH
27922003-04-21 Richard Henderson <rth@redhat.com>
2793
2794 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2795 executable when a symbol is defined both regular and dynamic.
2796
f5a6f915
SC
27972003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2798
2799 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2800 (elf32-m68hc1x.lo): Update dependencies
2801 * configure.in: Add elf32-m68hc1x.lo.
2802 * configure: Rebuild.
2803 * Makefile.in: Rebuild.
2804
3a65329d
SC
28052003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2806
2807 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2808 (m68hc11_elf_hash_table_create): New function.
2809 (elf32_m68hc11_link_hash_table_free): New function.
2810 (stub_hash_newfunc): New function.
2811 (m68hc11_add_stub): New function.
2812 (elf32_m68hc11_add_symbol_hook): New function.
2813 (elf32_m68hc11_setup_section_lists): New function.
2814 (elf32_m68hc11_next_input_section): New function.
2815 (elf32_m68hc11_size_stubs): New function.
2816 (elf32_m68hc11_build_stubs): New function.
2817 (m68hc11_get_relocation_value): New function.
2818 (elf32_m68hc11_relocate_section): Call the above to redirect
2819 some relocations to the trampoline code.
2820 (m68hc11_elf_export_one_stub): New function.
2821 (m68hc11_elf_set_symbol): New function.
2822 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2823 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2824 is not yet initialized.
2825
2826 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2827 (elf32_m68hc11_stub_hash_entry): New struct.
2828 (m68hc11_page_info): Add trampoline handler address.
2829 (m68hc11_elf_link_hash_table): Add stubs generation members.
2830 (elf32_m68hc11_add_symbol_hook): Declare.
2831 (elf32_m68hc11_setup_section_lists): Declare.
2832 (elf32_m68hc11_size_stubs): Declare.
2833 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2834
3a65329d
SC
2835 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2836 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2837 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2838 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2839 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2840 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2841 (bfd_elf32_bfd_link_hash_table_create): Define.
2842 (elf_backend_add_symbol_hook): Define.
2843 (m68hc11_elf_bfd_link_hash_table_create): New function.
2844 (m68hc11_elf_build_one_stub): New function.
2845 (m68hc11_elf_size_one_stub): New function.
2846 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2847 (bfd_elf32_bfd_link_hash_table_create): Define.
2848
2849 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2850 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2851 (m68hc12_phys_addr): Ditto.
2852 (m68hc12_phys_page): Ditto.
2853 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2854 (elf32_m68hc11_gc_mark_hook): Likewise.
2855 (elf32_m68hc11_gc_sweep_hook): Likewise.
2856 (elf32_m68hc11_check_relocs): Likewise.
2857 (elf32_m68hc11_relocate_section): Likewise.
2858 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2859 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2860 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2861 (m68hc12_elf_build_one_stub): New function.
2862 (m68hc12_elf_size_one_stub): New function.
2863 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2864 (elf_backend_add_symbol_hook): Define.
2865 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2866
4081944f
NC
28672003-04-18 Nick Clifton <nickc@redhat.com>
2868
2869 * format.c (bfd_check_format_matches): Only check associated
2870 vector if the matching_vector has been created.
2871
060dc71d
AO
28722003-04-15 Alexandre Oliva <aoliva@redhat.com>
2873
2874 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2875 2003-04-09's change.
2876
a3476bef
NC
28772003-04-15 Brian Ford <ford@vss.fsi.com>
2878
2879 * peicode.h (coff_swap_scnhdr_in): If a section holds
2880 uninitialized data and is from an object file or from an
2881 executable image that has not initialized the s_size field, or if
2882 the physical size is padded, use the virtual size (stored in
2883 s_paddr) instead.
2884
ca4fa240
NC
28852003-04-15 H.J. Lu <hjl@gnu.org>
2886
2887 * elflink.h (elf_link_add_object_symbols): Properly report
2888 filename for alignment reduction.
2889
c2dcd04e
NC
28902003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2891
2892 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2893 * reloc.c: Likewise.
2894 * coff-h8300.c: Likewise.
2895 * coff-h8500.c: Likewise.
2896 * coff-sh.c: Likewise.
2897 * cpu-h8300.c: Likewise.
2898 * cpu-sh.c: Likewise.
2899 * elf32-h8300.c: Likewise.
2900 * elf32-sh.c: Likewise.
2901 * elf32-sh64-com.c: Likewise.
2902 * elf32-sh64.c: Likewise.
2903 * elf64-sh64.c: Likewise.
2904 * bfd-in2.h: Regenerate.
2905
f7661995
NC
29062003-04-14 H.J. Lu <hjl@gnu.org>
2907
2908 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2909 alignment for common symbols. Warn reducing alignment for
2910 common symbols. Report old filename when symbol size changes.
2911
93a2b7ae
AO
29122003-04-12 Alexandre Oliva <aoliva@redhat.com>
2913
2914 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2915 occurrences of the same test changed in the previous patch.
2916 Optimize.
2917
0176c794
AO
29182003-04-11 Alexandre Oliva <aoliva@redhat.com>
2919
2920 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2921 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2922 GOT_DISP/addend only if the symbol got a global GOT entry.
2923
0fdc1bf1
AO
29242003-04-10 Alexandre Oliva <aoliva@redhat.com>
2925
2926 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2927 GOT_PAGE/GOT_OFST referencing overridable symbol to
2928 GOT_DISP/addend.
2929 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2930 global symbol as GOT_DISP.
2931
9b8c98a4
BW
29322003-04-10 Bob Wilson <bob.wilson@acm.org>
2933
2934 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2935 next relocation on an undefined symbol.
2936
ec1659c8
RH
29372003-04-09 Richard Henderson <rth@redhat.com>
2938
2939 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2940 Ignore relocations against r_symndx == 0.
2941
7dfb07f7
L
29422003-04-09 H.J. Lu <hjl@gnu.org>
2943
2944 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2945 FALSE for undefined symbols.
2946 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2947
a3805e4e
AO
29482003-04-09 Alexandre Oliva <aoliva@redhat.com>
2949
2950 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2951 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2952 addr_size.
2953
69931e60
AO
29542003-04-08 Alexandre Oliva <aoliva@redhat.com>
2955
2956 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2957 pointer size from ABI, not arch_bits_per_address.
2958
59a8c196
KB
29592003-04-07 Kevin Buettner <kevinb@redhat.com>
2960
2961 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2962 constants for n32 ABI.
2963
8e16317c
NC
29642003-04-06 Andrew Cagney <cagney@redhat.com>
2965
2966 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2967 free that leads to GDB vs BFD memory corruption.
2968
196486be
SC
29692003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2970
2971 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2972 symbols that mark the end of the section.
2973 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2974 converting to a relative branch so that the offset is computed after
2975 the relaxation; also relocate a jsr into a bsr if possible but don't
2976 relax them if they are to a far symbol as we need to call the
2977 trampoline code.
2978 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2979
be33c5dd
SS
29802003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2981
2982 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2983 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2984 * bfd-in2.h: Regenerate
2985 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2986 * cpu-tic4x.c: Ditto
2987
ff0c9faf
NC
29882003-04-03 Nick Clifton <nickc@redhat.com>
2989
2990 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2991 differently for object files and executables.
2992 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2993 for object files or for executables who have not already
2994 initialised the field.
2995 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2996 the PE format bfd is an executable.
2997
2b98e6c0
AM
29982003-04-03 Alan Modra <amodra@bigpond.net.au>
2999
3000 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3001 here as it's too early to reliably determine locality.
3002 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 3003 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 3004
92403579
BW
30052003-04-02 Bob Wilson <bob.wilson@acm.org>
3006
3007 * xtensa-modules.c: Remove comment indicating that this is a
3008 generated file.
3009
c45a316a
AM
30102003-04-02 Alan Modra <amodra@bigpond.net.au>
3011
3012 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3013
e0001a05
NC
30142003-04-01 Bob Wilson <bob.wilson@acm.org>
3015
8c29f035
AM
3016 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3017 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3018 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3019 xtensa-modules.lo.
3020 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3021 xtensa-modules.c.
3022 (cpu-xtensa.lo): New target.
3023 (elf32-xtensa.lo): Likewise.
3024 (xtensa-isa.lo): Likewise.
3025 (xtensa-modules.lo): Likewise.
3026 * Makefile.in: Regenerate.
3027 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3028 (bfd_archures_list): Add bfd_xtensa_arch.
3029 * config.bfd: Handle xtensa-*-*.
3030 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3031 * configure: Regenerate.
3032 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3033 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3034 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3035 (bfd_elf32_xtensa_le_vec): Likewise.
3036 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3037 * cpu-xtensa.c: New file.
3038 * elf32-xtensa.c: Likewise.
3039 * xtensa-isa.c: Likewise.
3040 * xtensa-modules.c: Likewise.
3041 * libbfd.h: Regenerate.
3042 * bfd-in2.h: Likewise.
e0001a05 3043
5a6c6817
NC
30442003-04-01 Nick Clifton <nickc@redhat.com>
3045
3046 * archures.c (bfd_mach_arm_unknown): Define.
3047 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3048 bfd_arm_get_mach_from_notes): Prototype.
3049 * bfd-in2.h: Regenerate.
3050 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3051 bfd_arm_merge_machines.
3052 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3053 * coffcode.h (coff_set_arch_mach_hook): Call
3054 bfd_arm_get_mach_from_notes.
3055 * coffgen.c (coff_real_object_p): Revert previous delta.
3056 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3057 .note section.
3058 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3059 binaries compiled for different architectures..
3060 (bfd_arm_update_notes): New function: Update an ARM note section.
3061 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3062 number from an ARM note section.
3063 * elf32-arm.h (elf32_arm_object_p): Use
3064 bfd_arm_get_mach_from_notes.
3065 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3066 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 3067
0cc1cf99
BE
30682003-04-01 Ben Elliston <bje@wasabisystems.com>
3069
3070 * dwarf2.c (read_attribute_value): Correct typo in comment.
3071
af3ef9fe
NC
30722003-04-01 Nick Clifton <nickc@redhat.com>
3073
3074 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3075 instead of concat().
3076 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
3077 (add_line_info): Make a copy of the filename when storing it into
3078 the info structure.
af3ef9fe 3079
6e84a906
DJ
30802003-03-31 Andreas Schwab <schwab@suse.de>
3081 Daniel Jacobowitz <drow@mvista.com>
3082
3083 * simple.c (bfd_simple_get_relocated_section_contents): Add
3084 parameter symbol_table. Optionally use it instead of the symbol
3085 table from the bfd. Save and restore output offsets and output
3086 sections around bfd_get_relocated_section_contents. Fix a memory
3087 leak.
3088 (simple_save_output_info, simple_restore_output_info): New
3089 functions.
3090 * bfd-in2.h: Regenerate.
3091 * dwarf2.c (read_abbrevs): Use
3092 bfd_simple_get_relocated_section_contents instead of
3093 bfd_get_section_contents.
3094 (decode_line_info): Likewise.
3095 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3096 find_rela_addend.
3097 (find_rela_addend): Remove.
3098 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3099 debugging sections.
3100 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3101 not bfd_zalloc.
3102
5ed6aba4
NC
31032003-03-31 David Heine <dlheine@suif.stanford.edu>
3104
3105 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3106 bfd_alloc.
3107 * dwarf2.c (concat_filename): Always allocate space for the
3108 returned filename.
3109 (decode_line_info): Free the allocated filename returned by
3110 concat_filename.
3111 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3112 * elf.c (copy_private_bfd_data): Likewise.
3113 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3114 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3115 * format.c (bfd_check_format_matches): Likewise.
3116 * linker.c (bfd_generic_final_link): Likewise.
3117 * opncls.c (find_separate_debug_info): Likewise.
3118 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3119
5941afc1
L
31202003-03-28 H.J. Lu <hjl@gnu.org>
3121
3122 * elflink.h (elf_link_add_object_symbols): Correctly combine
3123 visibilities.
3124
9d73f260
JJ
31252003-03-27 Jakub Jelinek <jakub@redhat.com>
3126
3127 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3128 to -1 before recomputing got offsets.
3129
a5ad465a
AS
31302003-03-26 Andreas Schwab <schwab@suse.de>
3131
3132 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3133 (elf_m68k_relocate_section): Use it to correctly handle symbols
3134 forced to be local.
3135 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3136 entries for symbols that are forced to be local.
3137
d0647110
AO
31382003-03-25 Alexandre Oliva <aoliva@redhat.com>
3139
3140 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3141 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3142 * elfn32-mips.c, elf64-mips.c: Use it.
3143
e16bb312
NC
31442003-03-25 Stan Cox <scox@redhat.com>
3145 Nick Clifton <nickc@redhat.com>
8c29f035 3146
9b5ecbd0 3147 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3148
3149 * archures.c: Add bfd_mach_arm_iWMMXt.
3150 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3151 * bfd-in2.h: Regenerate.
3152 * libbfd.h: Regenerate.
3153 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3154 object files to be linked with XScale ones.
3155 (coff_arm_final_link_postscript): Update note section.
3156 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3157 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3158 after identifying a coff binary.
3159 * cpu-arm.c (processors): Add iWMMXt.
3160 (arch_inf): Likewise.
3161 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3162 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3163 be linked with XScale ones.
3164 (elf32_arm_section_flags): New function: Set flags on note section.
3165 (elf32_arm_final_write_processing): Handle note section.
3166
25f14c34
DD
31672003-03-21 DJ Delorie <dj@redhat.com>
3168
3169 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3170 _bfd_elf_rela_local_sym.
3171
04b3329b
L
31722003-03-20 H.J. Lu <hjl@gnu.org>
3173
3174 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3175 non-ELF outputs.
3176
c25cfdf8
NC
31772003-03-20 Nick Clifton <nickc@redhat.com>
3178
3179 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3180 $idata5 in case bfd_coff_final_link is not called.
3181
3e1d7f19
JJ
31822003-03-19 Jakub Jelinek <jakub@redhat.com>
3183
3184 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3185 field.
3186 (canon_reloc_count): Define.
3187 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3188 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3189 reloc_count.
3190 (sparc64_elf_canonicalize_reloc): New routine.
3191 (bfd_elf64_canonicalize_reloc): Define.
3192
3fa1d917
JJ
31932003-03-18 Jakub Jelinek <jakub@redhat.com>
3194
3195 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3196 againt mergeable sections. Take r_addend into account when caching
3197 trampolines.
3198
f86b235a
RH
31992003-03-18 Richard Henderson <rth@redhat.com>
3200
8c29f035
AM
3201 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3202 local symbols that have no dyninfo.
f86b235a 3203
49ae03bf
NC
32042003-03-14 Gene Smith <gene.smith@siemens.com>
3205
3206 * ieee.c (ieee_write_expression): Handle the case where symbol is
3207 NULL.
3208 General formatting improvements.
3209
6a457e5c
NC
32102003-03-13 Nick Clifton <nickc@redhat.com>
3211
3212 * configure.in (LINGUAS): Add zh_CN.
3213 * configure: Regenerate.
3214 * po/zh_CN.po: New file.
3215
93516ec3
NC
32162003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3217
3218 * aout-cris.c (BYTES_IN_WORD): Don't define.
3219 aout-encap.c: Likewise.
3220 aout-ns32k.c: Likewise.
3221 aout-tic30.c: Likewise.
3222 hp300bsd.c: Likewise.
3223 i386aout.c: Likewise.
3224 i386dynix.c: Likewise.
3225 i386linux.c: Likewise.
3226 i386lynx.c: Likewise.
3227 i386mach3.c: Likewise.
3228 m68k4knetbsd.c: Likewise.
3229 m68klinux.c: Likewise.
3230 m68klynx.c: Likewise.
3231 m68knetbsd.c: Likewise.
3232 m88kmach3.c: Likewise.
3233 mipsbsd.c: Likewise.
3234 newsos3.c: Likewise.
3235 sparclinux.c: Likewise.
3236 sparclynx.c: Likewise.
3237 sparcnetbsd.c: Likewise.
3238 vaxbsd.c: Likewise. Fix comment formatting.
3239
fee24f1c
AO
32402003-03-12 Alexandre Oliva <aoliva@redhat.com>
3241
0b25d3e6
AO
3242 * Reverted 2003-03-02's patch.
3243
fee24f1c
AO
3244 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3245 overridable.
3246 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3247 mips_elf64_get_dynamic_reloc_upper_bound,
3248 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3249 (bfd_elf64_get_canonicalize_reloc,
3250 bfd_elf64_get_dynamic_reloc_upper_bound,
3251 bfd_elf64_canonicalize_dynamic_reloc): Define.
3252 (mips_elf64_slurp_reloc_table): Support dynamic.
3253 (mips_elf64_slurp_one_reloc_table): Adjust.
3254
64fb1839
NC
32552003-03-12 Nick Clifton <nickc@redhat.com>
3256
3257 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3258 'index' to 'offset' in test for zero value.
3259
908488f1
AO
32602003-03-11 Alexandre Oliva <aoliva@redhat.com>
3261
3262 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3263 dynamic relocations pointing to local or section symbols, use the
3264 NULL symbol instead. Document the choice to not emit an
3265 additional R_MIPS_64 relocation.
3266
e515b051
AM
32672003-03-11 Alan Modra <amodra@bigpond.net.au>
3268
3269 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3270 zero index dynamic tls relocs generated for the GOT. Tidy code.
3271 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3272 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3273
a23b6845
AM
32742003-03-07 Alan Modra <amodra@bigpond.net.au>
3275
87d243f1
AM
3276 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3277 a tls_get_addr call.
3278
a23b6845
AM
3279 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3280 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3281 ELF_LINK_NON_GOT_REF from weakdef.
3282 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3283 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3284 ELF_LINK_NON_GOT_REF from weakdef.
3285 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3286 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3287 ELF_LINK_NON_GOT_REF from weakdef.
3288
2d36fe5f
AH
32892003-03-06 Jakub Jelinek <jakub@redhat.com>
3290 Andrew Haley <aph@redhat.com>
3291
3292 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3293 output is relocateable.
3294
34f304a7
NC
32952003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3296
3297 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3298 R_COMMENT.
3299
7b609f53
AM
33002003-03-06 Alan Modra <amodra@bigpond.net.au>
3301
3302 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3303 error messages.
3304 (ELIMINATE_COPY_RELOCS): Define to zero.
3305 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3306 TLSLD relocs. Report reloc types on a number of errors. Optimize
3307 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3308 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3309 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3310 calculating TLSLD relocs. Report reloc types on a number of errors.
3311 Don't capitalize error messages.
3312
6a0fb186
L
33132003-03-03 H.J. Lu <hjl@gnu.org>
3314
3315 * elfxx-ia64.c (USE_BRL): Removed.
3316 (oor_ip): Removed.
3317
34f304a7 33182003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3319
3320 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3321 relocation (no special function), and make it non-partial_inplace.
3322 (sh_elf_relax_section): When creating a bsr, use a consistent value
3323 no matter if the symbol is extern or not; set addend to -4.
3324 Don't swap load / non-load instructions for SH4.
3325 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3326 rather than if the symbol is external to determine if adjusting the
3327 offset makes sense. Adjust the addend too if appropriate.
3328 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3329 relocation.
3330
a9d68a1e
NC
33312003-03-03 Nick Clifton <nickc@redhat.com>
3332
3333 * po/da.po: Installed latest translation.
3334
7c2be35c
TS
33352003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3336
3337 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3338 R_MIPS_PC16 to rightshift 2.
3339 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3340 (bfd_elf32_bfd_reloc_type_lookup): Support
3341 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3342 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3343 R_MIPS_PC16 to rightshift 2.
3344 (mips_elf64_howto_table_rela): Likewise.
3345 (mips_reloc_map): Map to rightshifted BFD reloc.
3346 * elfn32-mips.c: The same as in elf64-mips.c.
3347 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3348 (mips_elf_calculate_relocation): Handle rightshifted addends for
3349 R_MIPS_PC16.
3350 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3351 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3352 * libbfd.h: Regenerate.
3353 * bfd-in2.h: Regenerate.
3354
484a4f9c
RH
33552003-02-28 Richard Henderson <rth@redhat.com>
3356
3357 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3358 for ltoff22x relaxation.
3359
2ce40c65
AM
33602003-03-01 Alan Modra <amodra@bigpond.net.au>
3361
3362 * bfd-in.h (_bfd): Don't define.
3363 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3364 * syms.c: Likewise.
3365 * bfd-in2.h: Regenerate.
3366
2c4c2bc0
RH
33672003-02-27 Richard Henderson <rth@redhat.com>
3368
3369 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3370 (elfNN_ia64_check_relocs): Set it.
3371 (allocate_global_data_got): Check it.
3372 (allocate_local_got): Likewise.
3373 (allocate_dynrel_entries): Likewise.
3374 (elfNN_ia64_relax_ldxmov): New.
3375 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3376 (elfNN_ia64_choose_gp): Split out from ...
3377 (elfNN_ia64_final_link): ... here.
8c29f035 3378
c2852e88
AC
33792003-02-27 Andrew Cagney <cagney@redhat.com>
3380
3381 * bfd.c (struct bfd): Rename "struct _bfd".
3382 * bfd-in.h: Update copyright.
3383 (struct bfd): Rename "struct _bfd".
3384 (_bfd): Define for backward compatibility.
3385 * bfd-in2.h: Regenerate.
3386
3f87cb70
AM
33872003-02-25 Alan Modra <amodra@bigpond.net.au>
3388
3f9a32bd
AM
3389 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3390 and rel_hdr2 when initially counting input relocs rather than after
3391 creating output reloc sections.
4fabe71e
AM
3392 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3393 sizes.
3f9a32bd 3394
3f87cb70
AM
3395 * Makefile.am: Run "make dep-am".
3396 * Makefile.in: Regenerate.
3397
07c6e936
NC
33982003-02-24 Kris Warkentin <kewarken@qnx.com>
3399
3400 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3401 (elfcore_grog_nto_note): New function.
3402 (elfcore_grog_nto_gregs): New function.
3403 (elfcore_grog_nto_status): New function.
3404
aad5d350
AM
34052003-02-24 Alan Modra <amodra@bigpond.net.au>
3406
3407 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3408 section flags before concluding that we've already been called.
3409 Don't use register keyword.
3410 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3411 (_bfd_elf_create_linker_section): Formatting.
3412
2ab1486e
NC
34132003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3414
3415 * coff-h8300.c: Fix typo: intial -> initial.
3416 * coff-ppc.c: Likewise.
3417
70bccea4
AM
34182003-02-20 Alan Modra <amodra@bigpond.net.au>
3419
3420 * elf32-ppc.c: Formatting.
3421 (allocate_dynrelocs): LD and GD relocs against the same sym need
3422 separate GOT entries.
3423 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3424 entries per symbol.
3425
ee05f2fe
AM
34262003-02-19 Alan Modra <amodra@bigpond.net.au>
3427
26e41594
AM
3428 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3429 removal. Localize vars. Remove unnecessary dynobj test.
3430 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3431 of INFO.
3432 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3433 and optimize.
3434 (elf_i386_relocate_section): Likewise.
3435 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3436 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3437 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3438 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3439 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3440 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3441 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3442 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3443 Formatting.
3444
f4656909
AM
3445 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3446 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3447 test.
3448 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3449 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3450 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3451 and optimize. Use ELIMINATE_COPY_RELOCS.
3452 (ppc64_elf_relocate_section): Likewise.
3453
ee05f2fe
AM
3454 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3455 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3456 (ELIMINATE_COPY_RELOCS): Define.
3457 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3458 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3459 (MUST_BE_DYN_RELOC): Define.
3460 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3461 and optimize. Trim dyn_relocs.
3462 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3463 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3464 track of pc_rel dyn relocs.
3465 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3466 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3467 allocate_dynrelocs. Don't recalculate "sec".
3468
7619e7c7
AM
34692003-02-18 Alan Modra <amodra@bigpond.net.au>
3470
d881513a
AM
3471 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3472 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3473 on invalid LD relocs.
3474 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3475 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3476 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3477
7619e7c7
AM
3478 * elf32-ppc.h: New file.
3479 * elf32-ppc.c: Include elf32-ppc.h.
3480 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3481 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3482 Add "tls_mask" field.
3483 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3484 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3485 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3486 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3487 Make use of htab shortcuts throughout file.
3488 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3489 (ppc_elf_link_hash_table_create): Init new fields.
3490 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3491 (ppc_elf_howto_raw): Add tls relocs.
3492 (ppc_elf_reloc_type_lookup): Handle them.
3493 (ppc_elf_unhandled_reloc): New function.
3494 (ppc_elf_create_got): Stash got section pointer in hash table,
3495 return status. Make .rela.got too.
3496 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3497 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3498 NON_GOT_REF set. Don't allocate space in .plt here..
3499 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3500 not allocating plt entries unnecessarily. Allocate got entries here.
3501 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3502 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3503 "info" during allocate_dynrelocs hash traversal. Use htab section
3504 shortcuts rather than searching for named sections. Get rid of
3505 "plt" and "strip" booleans.
3506 (update_local_sym_info, bad_shared_reloc): New functions.
3507 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3508 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3509 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3510 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3511 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3512 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3513 relocs that might use a plt entry. Set NON_GOT_REF too.
3514 Enumerate all do-nothing relocs.
3515 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3516 tls relocs and all plt relocs.
3517 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3518 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3519 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3520 shortcuts.
3521 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3522 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3523 entries and got relocs here. Warn on non-zero got reloc addend.
3524 Split out branch taken/not taken reloc code into a separate switch
3525 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3526 Split out HA reloc adjustments to separate switch statement. Don't
3527 warn on reloc overflow if we've already warned about undefined.
3528 Don't rebuild sym name when reporting errors. Report all possible
3529 errors from _bfd_final_link_relocate.
3530 (bfd_elf32_bfd_final_link): Don't define.
3531
cd27b276
AM
35322003-02-18 Alan Modra <amodra@bigpond.net.au>
3533
3534 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3535 rebuild sym name when reporting errors.
3536
ae9a127f
NC
35372003-02-17 Nick Clifton <nickc@redhat.com>
3538
3f9a32bd 3539 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3540 allow_shlib_undefined for shared libraries.
3541 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3542 of allow_shlib_undefined.
3543 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3544 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3545 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3546 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3547 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3548 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3549 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3550 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3551 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3552 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3553 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3554 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3555 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3556 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3557 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3558 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3559
b5f852ea
NC
35602003-02-17 Nick Clifton <nickc@redhat.com>
3561
3562 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3563 address field to use in the comparison.
3f9a32bd 3564 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3565
3193e234
NC
35662003-02-14 Bob Wilson <bob.wilson@acm.org>
3567
3568 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3569 backends when checking if the generic ELF target should be used.
3570
21efdc8d
NC
3571 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3572 outside of functions, treat values as absolute addresses.
3573
ed781d5d
NC
3574 * bfd.c: Change embedded documentation to use consistent indentation
3575 and to split up long lines. Change informal style of description
3576 for functions lacking real documentation.
3577 * coffcode.h: Break up long lines in embedded documentation.
3578 * format.c: Likewise.
3579 * targets.c: Likewise.
3580 * libcoff.h: Regenerate.
3581 * bfd-in2.h: Regenerate.
3582
58ac9f71
AM
35832003-02-14 Alan Modra <amodra@bigpond.net.au>
3584
3585 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3586 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3587 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3588 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3589 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3590 (group_sections): Don't share a stub section if stubs are for a large
3591 section. Adjust comment.
3592 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3593 !stubs_always_before_branch.
3594 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3595 treat undefined and undefweak specially when processing dyn relocs.
3596
9147e853
JJ
35972003-02-13 Jakub Jelinek <jakub@redhat.com>
3598
3599 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3600
427bfd90
NC
36012003-02-13 Nick Clifton <nickc@redhat.com>
3602
3603 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3604 in computation of offset to insert into BL instruction.
3605
42b5d0ea
NC
36062003-02-11 Uwe Stieber <uwe@wwws.de>
3607
3608 * config.bfd: Add support for kaOS as cross build target system.
3609
a48ebf4d
AM
36102003-02-11 Alan Modra <amodra@bigpond.net.au>
3611
3612 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3613 .__tls_get_addr too.
3614 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3615
c95b8a7a
KK
36162003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3617
3618 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3619 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3620 (sh_elf_link_hash_newfunc): Remove the initialization of
3621 tls_tpoff32 field.
3622 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3623 for which tls_tpoff32 flag is set.
3624 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3625 of the symbol includes the entry matched with the input_section
3626 and having tls_tpoff32 flag on. When linking statically, set
3627 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3628 is defined in this executable.
3629 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3630
a779acda
JJ
36312003-02-10 Jakub Jelinek <jakub@redhat.com>
3632
3633 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3634 even if there is just non-empty .rela.plt.
3635
fde78edd
NC
36362003-02-10 Nick Clifton <nickc@redhat.com>
3637
3638 * archures.c (bfd_mach_arm_ep9312): Define.
3639 * bfd-in2.h: Regenerate.
3640 * cpu-arm.c (processors[]): Add ep9312.
3641 (bfd_arm_arch): Add ep9312.
3642 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3643 messages and add test for Maverick floating point support.
3644 (elf32_arm_print_private_bfd_data): Handle
3645 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3646 (elf32_arm_object_p): New function.
3647 (elf_backend_object_p): Define.
fde78edd 3648
e7b938ca
AM
36492003-02-10 Alan Modra <amodra@bigpond.net.au>
3650
3651 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3652 variables, structure fields or function params to tls_mask or
3653 similar to better reflect usage.
3654 (struct got_entry): Comment.
9b5ecbd0 3655 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3656 (get_tls_mask): Rename from get_tls_type.
3657
951fd09b
AM
36582003-02-09 Alan Modra <amodra@bigpond.net.au>
3659
3660 * elf64-ppc.c (TLS_GD_LD): Don't define..
3661 (TLS_GD): ..define this instead and update all uses.
3662 (TLS_TPRELGD): Define.
3663 (ppc64_elf_link_hash_table_create): Tweak initialization of
3664 init_refcount and init_offset.
3665 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3666 Mark second slot of GD or LD toc entries.
3667 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3668 from other tls types.
3669 (ppc64_elf_tls_setup): New function, split out from..
3670 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3671 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3672 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3673 return value to properly decide whether toc GD and LD entries can
3674 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3675 to determine GD or LD rather than looking at TLS_LD flag. Don't
3676 attempt to adjust got entry tls_type here..
3677 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3678 look for possible merges.
3679 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3680 optimization.
3681 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3682 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3683 Make use of return value from get_tls_type to properly detect GD and
3684 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3685 handle tls_get_addr removal when looking at REL24 relocs, do it when
3686 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3687 GD or LD.
3688 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3689
acc990f2
AM
36902003-02-08 Alan Modra <amodra@bigpond.net.au>
3691
00b28bb0
AM
3692 * elf32-hppa.c (group_sections): Don't share a stub section if
3693 stubs are for a large section.
3694
acc990f2
AM
3695 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3696 stubs if !stubs_always_before_branch.
3697
589e6347
NC
36982003-02-07 Nick Clifton <nickc@redhat.com>
3699
3700 * elf.c (swap_out_syms): Generate an error message if an
3701 equivalent output section cannot be found for a symbol.
3702
c328dc3f
JJ
37032003-02-07 Jakub Jelinek <jakub@redhat.com>
3704
3705 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3706 local_got_entries is NULL.
3707
84f97cb6
AS
37082003-02-06 Andreas Schwab <schwab@suse.de>
3709
3710 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3711 (read_value): Add parameter is_signed, use signed extraction if
3712 the value is signed.
3713 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3714 encoding to read_value.
3715
6349e628
AM
37162003-02-06 Alan Modra <amodra@bigpond.net.au>
3717
3718 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3719 plt info when called to transfer weak sym info.
3720
411e1bfb
AM
37212003-02-05 Alan Modra <amodra@bigpond.net.au>
3722
3723 * reloc.c: Add PPC and PPC64 TLS relocs.
3724 * libbfd.h: Regenerate.
3725 * bfd-in2.h: Regenerate.
3726 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3727 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3728 against a 32 bit field.
3729 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3730 (_ppc64_elf_section_data): Add t_symndx and comments.
3731 (ppc64_elf_section_data): Use elf_section_data macro.
3732 (ppc64_elf_new_section_hook): American spelling.
3733 (struct got_entry, struct plt_entry): New.
3734 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3735 (struct ppc_stub_hash_entry): Add "addend" field.
3736 (struct ppc_link_hash_entry): Add "tls_type".
3737 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3738 TLS_EXPLICIT): Define.
3739 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3740 (link_hash_newfunc): Init new fields.
58ac9f71 3741 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3742 init_offset to NULL.
3743 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3744 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3745 there.
3746 (update_local_sym_info, update_plt_info): New functions.
3747 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3748 handling to use got.glist rather than got.refcount. Likewise for PLT.
3749 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3750 (func_desc_adjust): Adjust for new PLT list.
3751 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3752 (get_sym_h, get_tls_type): New functions.
3753 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3754 (ppc64_elf_tls_optimize): New function.
3755 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3756 TLS relocs.
3757 (ppc64_elf_size_dynamic_sections): Likewise.
3758 (ppc_type_of_stub): Adjust for new PLT list.
3759 (ppc_build_one_stub): Likewise.
3760 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3761 calls specially.
3762 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3763 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3764 init GOT entries that have a reloc. Generate GOT relocs here..
3765 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3766 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3767
0cca5f05
AS
37682003-02-04 Andreas Schwab <schwab@suse.de>
3769
3770 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3771 (elf_m68k_link_hash_traverse): Remove.
3772 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3773 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3774 reduce casting.
3775 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3776 casting.
3777 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3778 instead of elf_m68k_link_hash_traverse.
3779 (elf_m68k_discard_copies): Change first parameter to pointer to
3780 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3781 elf_m68k_link_hash_entry is needed.
3782
5cab59f6
AM
37832003-02-04 Alan Modra <amodra@bigpond.net.au>
3784
3785 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3786 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3787 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3788 "plt" field.
3789 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3790 Add "init_offset" field.
3791 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3792 (elf_local_got_ents): Declare.
3793 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3794 and "plt".
3795 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3796 (_bfd_elf_link_hash_table_init): Set "init_offset".
3797 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3798 from init_offset.
3799 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3800
3801 * elf.c (bfd_elf_local_sym_name): Split out from..
3802 (group_signature): ..here.
3803 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3804
68bfbfcc
AM
38052003-02-04 Alan Modra <amodra@bigpond.net.au>
3806
3807 * elf-bfd.h (enum elf_link_info_type): Remove.
3808 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3809 to struct sec. Remove linkonce_p field.
3810 (elf_linkonce_p): Delete.
3811 (elf_discarded_section): Update for sec_info_type change.
3812 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3813 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3814 (ELF_INFO_TYPE_NONE): Define.
3815 (ELF_INFO_TYPE_STABS): Define.
3816 (ELF_INFO_TYPE_MERGE): Define.
3817 (ELF_INFO_TYPE_EH_FRAME): Define.
3818 (ELF_INFO_TYPE_JUST_SYMS): Define.
3819 (STD_SECTION): Update struct sec initializer.
3820 * ecoff.c (bfd_debug_section): Likewise.
3821 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3822 * elflink.h: Likewise.
3823 * elf-eh-frame.c: Likewise.
3824 * elf64-alpha.c: Likewise.
3825 * elfxx-ia64.c: Likewise.
3826 * elfxx-mips.c: Likewise.
3827 * bfd-in2.h: Regenerate.
3828
3829 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3830 referring to used_by_bfd.
3831 * elf64-sparc.c (sec_do_relax): Likewise.
3832 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3833 * elfxx-mips.c (mips_elf_section_data): Likewise.
3834 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3835 (ieee_get_section_contents): Likewise.
3836 (ieee_new_section_hook): Formatting.
3837 (ieee_canonicalize_reloc): Remove commented out code.
3838 * mmo.c (mmo_section_data): Define. Use throughout file.
3839 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3840
31f7ba04
NC
38412003-01-31 Graydon Hoare <graydon@redhat.com>
3842
3843 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3844 * Makefile.in: Regenerate.
3845 * opncls.c (calc_crc32, get_debug_link_info,
3846 seperate_debug_file_exists, find_seperate_debug_file): New
3847 internal functions.
3848 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3849 contained inside a .gnu_debuglink section.
3850 * bfd-in2.h: Regenerate.
3851
38985a1c
AO
38522003-01-29 Alexandre Oliva <aoliva@redhat.com>
3853
3854 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3855 entry->abfd when it's NULL.
3856
4bb9a95f
AO
38572003-01-27 Alexandre Oliva <aoliva@redhat.com>
3858
3859 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3860 _bfd_elf_section_offset returning -2 the same way as -1.
3861
f4416af6
AO
3862 * elfxx-mips.c (mips_elf_multi_got): New function.
3863 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3864 addend into union along with address and link hash entry.
3865 (struct mips_got_info): Added bfd2got and next.
3866 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3867 (mips_elf_got_section, mips_elf_create_got_section): Use
3868 SEC_EXCLUDE bit to tell whether we really need the got
3869 section. Take boolean arguments to disregard an excluded
3870 section, or to create it as excluded. Adjust all callers.
3871 Use mips_elf_got_section all over.
3872 (mips_elf_local_got_index, mips_elf_got_page,
3873 mips_elf_got16_entry): Take input bfd as argument, and pass it
3874 on to mips_elf_create_local_got_entry.
3875 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3876 Take input bfd as argument, and manage entries in the
3877 appropriate GOT.
3878 (mips_elf_got_offset_from_index): Take input bfd as argument,
3879 and use it to adjust the GP offset of the bfd.
3880 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3881 unreferenced GOT entries of global symbols to the end.
3882 (mips_elf_record_global_got_symbol): Take input bfd as
3883 argument. Add entries to the master GOT hash table.
3884 (struct mips_elf_bfd2got_hash): New.
3885 (struct mips_elf_got_per_bfd_arg): New.
3886 (struct mips_elf_set_global_got_offset_arg): New.
3887 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3888 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3889 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3890 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3891 mips_elf_resolve_final_got_entry,
3892 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3893 mips_elf_got_for_ibfd): New functions.
3894 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3895 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3896 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3897 (mips_elf_got_entry_hash): Take new fields into account. Use
3898 mips_elf_hash_bfd_vma.
3899 (mips_elf_got_entry_eq): Take new fields into account.
3900 (mips_elf_create_got_section): Initialize new fields.
3901 (mips_elf_calculate_relocation): Pass input_bfd to functions
3902 that now take it. Adjust gp for the input_bfd.
3903 (mips_elf_allocate_dynamic_relocation,
3904 mips_elf_create_dynamic_relocation,
3905 _bfd_mips_elf_create_dynamic_sections): Use...
3906 (mips_elf_rel_dyn_section): New function. Borrow code from...
3907 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3908 now take it. Create the got section if needed, even if
3909 excluded, before recording a global got symbol. Move some
3910 code to...
3911 (mips_elf_record_local_got_symbol): New fn.
3912 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3913 Compute multi-got global entries offsets. Move GOT code to...
3914 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3915 if the GOT is too big.
3916 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3917 undefweak symbol to zero. Generate dynamic relocations for
3918 non-primary GOT entries for global symbols.
3919 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3920 case. Generate dynamic relocations for local got entries.
3921 Sort dynamic relocations on N64 too, using...
3922 (sort_dynamic_relocs_64): New fns.
3923 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3924 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3925
52b69c9e
AO
39262003-01-27 Alexandre Oliva <aoliva@redhat.com>
3927
3928 * bfd.c (struct _bfd): Added id field.
3929 * opncls.c (_bfd_id_counter): New static variable.
3930 (_bfd_new_bfd): Use it.
3931 * bfd-in2.h: Rebuilt.
3932
71e5db1c
AM
39332003-01-25 Alan Modra <amodra@bigpond.net.au>
3934
3935 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3936
b9734f35
JJ
39372003-01-25 Jakub Jelinek <jakub@redhat.com>
3938
3939 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3940 (elf32_sparc_rev32_howto): New variable.
3941 (sparc_reloc_map): Add TLS relocs.
3942 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3943 Handle REV32.
3944 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3945 New functions.
3946 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3947 struct elf32_sparc_link_hash_table):
3948 New structures.
3949 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3950 elf32_sparc_hash_table): Define.
3951 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3952 create_got_section, elf32_sparc_create_dynamic_sections,
3953 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3954 functions.
3955 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3956 reference counting.
3957 (elf32_sparc_gc_sweep_hook): Likewise.
3958 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3959 (elf32_sparc_size_dynamic_sections): Likewise.
3960 (elf32_sparc_relocate_section): Likewise.
3961 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3962 New functions.
3963 (elf32_sparc_object_p): Allocate backend private object data.
3964 (bfd_elf32_bfd_link_hash_table_create,
3965 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3966 elf_backend_can_refcount): Define.
3967 (elf_backend_create_dynamic_sections): Define to
3968 elf32_sparc_create_dynamic_sections.
3969 * reloc.c: Add SPARC TLS relocs.
3970 * bfd-in2.h, libbfd.h: Rebuilt.
3971 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3972 (sparc_reloc_map): Likewise.
3973
69fc87f1
MS
39742003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3975
3976 * bfd-in2.h: Regenerate.
3977 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3978 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3979 (elf_howto_table): Add TLS relocs.
3980 (elf_s390_reloc_type_lookup): Likewise.
3981 (elf_s390_link_hash_entry): Add tls_type.
3982 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3983 New macros.
3984 (elf_s390_link_hash_table): Add tls_ldm_got.
3985 (link_hash_newfunc): Initialize tls_type.
3986 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3987 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3988 (elf_s390_check_relocs): Support TLS relocs.
3989 (elf_s390_gc_sweep_hook): Likewise.
3990 (allocate_dynrelocs): Likewise.
3991 (elf_s390_size_dynamic_sections): Likewise.
3992 (elf_s390_relocate_section): Likewise.
3993 (elf_s390_finish_dynamic_symbol): Likewise.
3994 (bfd_elf32_mkobject): Define for TLS.
3995 * elf64-s390.c: Same changes as for elf32-s390.c.
3996 * libbfd.h: Regenerate.
3997 * reloc.c: Add s390 TLS relocations.
3998
c5d1701e 39992003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
4000
4001 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4002
5177500f
NC
40032003-01-23 Nick Clifton <nickc@redhat.com>
4004
4005 * Add sh2e support:
5177500f 4006 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
4007 * archures.c (bfd_mach_sh2e): Added.
4008 * bfd-in2.h: Rebuilt.
4009 * cpu-sh.c (arch_info_struct): Added SH2e.
4010 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 4011
f0abc2a1
AM
40122003-01-23 Alan Modra <amodra@bigpond.net.au>
4013
4014 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4015 dynindx to an int. Rearrange for better packing.
4016 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4017 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4018 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4019 (struct _sh64_elf_section_data): New struct.
4020 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4021 * elf32-sh64-com.c: Include elf32-sh64.h.
4022 * elf32-sh64.c: Likewise.
4023 (sh64_elf_new_section_hook): New function.
4024 (bfd_elf32_new_section_hook): Define.
4025 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4026 (sh64_bfd_elf_copy_private_section_data): Likewise.
4027 (sh64_elf_final_write_processing): Likewise.
4028 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4029 (elf32_sparc_new_section_hook): New function.
4030 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4031 (sec_do_relax): Define.
4032 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4033 (elf32_sparc_relocate_section): Likewise.
4034 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4035 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4036 (mmix_elf_section_data): Define. Use throughout file.
4037 (mmix_elf_new_section_hook): New function.
4038 (bfd_elf64_new_section_hook): Define.
4039 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4040 (ppc64_elf_section_data): Define. Use throughout.
4041 (ppc64_elf_new_section_hook): New function.
4042 (bfd_elf64_new_section_hook): Define.
4043 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4044 (sparc64_elf_new_section_hook): New function.
4045 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4046 (sec_do_relax): Define.
4047 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4048 (sparc64_elf_relocate_section): Likewise.
4049 (bfd_elf64_new_section_hook): Define.
4050 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4051 * elfxx-mips.c (struct _mips_elf_section_data): New.
4052 (mips_elf_section_data): Define. Use throughout.
4053 (_bfd_mips_elf_new_section_hook): New function.
4054 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4055 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4056 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4057 * Makefile.am: Run "make dep-am".
4058 * Makefile.in: Regenerate.
4059
cc03ec80
RH
40602003-01-21 Richard Henderson <rth@redhat.com>
4061
4062 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4063 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4064 (elf64_alpha_adjust_dynamic_symbol): Set them.
4065 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4066 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4067 symbol index when relaxing LDM to TPREL.
4068 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4069 relocs, even if the target isn't locally defined.
4070 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4071 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4072 relocs vs symndx 0 to the tp base.
4073
da896d3f
NC
40742003-01-21 Fabio Alemagna <falemagn@aros.org>
4075
4076 * config.bfd: Handle i[3456]86-*-aros*.
4077
7fce784e
AS
40782003-01-21 Andreas Schwab <schwab@suse.de>
4079
4080 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4081 (struct ppc_elf_link_hash_entry): Define.
4082 (ppc_elf_hash_entry): New function.
4083 (struct ppc_elf_link_hash_table): Define.
4084 (ppc_elf_hash_table): New function.
4085 (ppc_elf_link_hash_newfunc): New function.
4086 (ppc_elf_link_hash_table_create): New function.
4087 (ppc_elf_copy_indirect_symbol): New function.
4088 (allocate_dynrelocs): New function.
4089 (readonly_dynrelocs): New function.
4090 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4091 relocs and determine DT_TEXTREL.
4092 (ppc_elf_check_relocs): Don't do that here, just count the
4093 dynamic relocs.
4094 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4095 removed section.
4096 (bfd_elf32_bfd_link_hash_table_create): Define.
4097 (elf_backend_copy_indirect_symbol): Define.
4098
1bbc9cec
RH
40992003-01-21 Richard Henderson <rth@redhat.com>
4100
4101 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4102 TPREL also get a reloc if shared. Remove SREL support.
4103 (elf64_alpha_emit_dynrel): New.
acc990f2 4104 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
4105 and GOTTPREL relocs to local symbols against the tp base.
4106 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4107
4108 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4109 use count before clobbering r_type.
4110 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4111 ordering would mean dataflow inspection is necessary.
4112
0da35f8b
SS
41132003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4114
4115 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 4116
571fe01f
NC
41172003-01-20 Fabio Alemagna <falemagn@aros.org>
4118
4119 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4120 elfxx-target.h and #undef it before #define'ing it.
4121 * elf32-i386.c: Likewise.
acc990f2
AM
4122 * elf32-sh64.c: Likewise.
4123 * elf64-alpha.c: Likewise.
4124 * elf64-sh64.c: Likewise.
571fe01f 4125
5236c819
MS
41262003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4127
4128 * bfd-in2.h: Regenerate.
4129 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4130 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4131 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4132 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4133 R_390_PLTOFF32 and R_390_PLTOFF64.
4134 (elf_s390_reloc_type_lookup): Likewise.
4135 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4136 of GOTPLT references to a function.
4137 (link_hash_newfunc): Initialize gotplt_refcount.
4138 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4139 and creation of the got section out of the main switch. Add support
4140 for the gotoff, gotplt and pltoff relocations.
4141 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4142 and pltoff.
4143 (elf_s390_adjust_gotplt): New function.
4144 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4145 plt entries.
4146 (allocate_dynrelocs): Add comment.
4147 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4148 for gotoff, gotplt and pltoff relocations.
4149 * elf64-s390.c: Same changes as for elf32-s390.c.
4150 * libbfd.h: Regenerate.
4151 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4152 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4153 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4154 and BFD_RELOC_390_PLTOFF64.
4155
a823975a
JJ
41562003-01-18 Jakub Jelinek <jakub@redhat.com>
4157
4158 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4159 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4160
b3dfd7fe
JJ
41612003-01-16 Jakub Jelinek <jakub@redhat.com>
4162
4163 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4164 self_dtpmod_done and self_dtpmod_offset.
4165 (allocate_global_data_got): Only use one got entry for all
4166 dtpmod relocs against local symbols.
4167 (allocate_dynrel_entries): Only need .rela.got entry for
4168 dtpmod against global symbol.
4169 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4170 Reserve space in .rela.got for the local dtpmod entry.
4171 (set_got_entry): Initialize the common local dtpmod .got entry.
4172 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4173 and R_IA_64_DTPREL64MSB.
4174
04c9666a
AM
41752003-01-16 Alan Modra <amodra@bigpond.net.au>
4176
4177 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4178 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4179 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4180 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4181 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4182 relative relocs, not with absolute ones.
4183 * Makefile.am: Run "make dep-am".
4184 * Makefile.in: Regenerate.
4185 * po/SRC-POTFILES.in: Regenerate.
4186
c87f1ff7
AS
41872003-01-15 Andreas Schwab <schwab@suse.de>
4188
4189 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4190 relocation against a non-allocated readonly section.
4191
86bbe32f
AM
41922003-01-10 Alan Modra <amodra@bigpond.net.au>
4193
4194 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4195 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4196
32d95f29
KD
41972002-01-08 Klee Dienes <kdienes@apple.com>
4198
4199 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4200 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4201 * Makefile.in: Regenerate.
acc990f2 4202
ab7d0aa0
AO
42032003-01-08 Alexandre Oliva <aoliva@redhat.com>
4204
4205 * elfn32-mips.c (prev_reloc_section): New.
4206 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4207 (SET_RELOC_ADDEND): Parenthesize macro argument.
4208
95d0f04a
DA
42092003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4210
4211 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4212 adjust addil instructions if the symbol has no section.
4213
5c9e189c
DD
42142003-01-07 DJ Delorie <dj@redhat.com>
4215
4216 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4217 partial_inplace.
4218
3e829b4a
AS
42192003-01-07 Andreas Schwab <schwab@suse.de>
4220
4221 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4222 PC relative relocations.
4223 (elf_m68k_discard_copies): Set it here instead.
4224
a75473eb
SC
42252002-01-02 Ben Elliston <bje@redhat.com>
4226 Jeff Johnston <jjohnstn@redhat.com>
4227
4228 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4229 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4230 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4231 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4232 (cpu-iq2000.lo): New target.
4233 * Makefile.in: Regenerate.
4234 * config.bfd: Handle iq2000-*-elf.
4235 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4236 (bfd_archures_list): Add bfd_iq2000_arch.
4237 * configure.in: Handle bfd_elf32_iq2000_vec.
4238 * configure: Regenerate.
acc990f2 4239 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4240 and BFD_RELOC_IQ2000_UHI16.
4241 * targets.c (bfd_elf32_iq2000_vec): Declare.
4242 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4243 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4244 * cpu-iq2000.c: New file.
4245 * elf32-iq2000.c: Likewise.
4246 * libbfd.h: Regenerate.
4247 * bfd-in2.h: Likewise.
4248
64543e1a
RS
42492003-01-02 Richard Sandiford <rsandifo@redhat.com>
4250
4251 * elfxx-mips.c: Include libiberty.h.
4252 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4253 (mips_set_isa_flags): New function, split out from...
4254 (_bfd_mips_elf_final_write_processing): ...here. Only call
4255 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4256 (mips_mach_extensions): New array.
4257 (mips_32bit_flags_p): New function.
4258 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4259 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4260 other is 64-bit. When adopting IBFD's architecture, adopt the
4261 bfd_mach as well as the flags.
4262
4852a44e
NC
42632003-01-02 Nick Kelsey <nickk@ubicom.com>
4264
4265 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4266 fix internal errors, fix bad code generation, fix incorrect stabs
4267 information, and improve ability to eliminate redundant page
4268 instructions. Added code to ip2k_final_link_relocate to self-verify
4269 the linker relaxation. Fix formatting problems.
4270
af7ee8bf
CD
42712002-12-30 Chris Demetriou <cgd@broadcom.com>
4272
4273 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4274 * archures.c (bfd_mach_mipsisa32r2): New define.
4275 * bfd-in2.h: Regenerate.
4276 * cpu-mips.c (I_mipsisa32r2): New enum value.
4277 (arch_info_struct): Add entry for I_mipsisa32r2.
4278 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4279 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4280 (_bfd_mips_elf_final_write_processing): Add
4281 bfd_mach_mipsisa32r2 case.
4282 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4283 binaries marked as using MIPS32 Release 2.
4284
2469cfa2
NC
42852002-12-30 Dmitry Diky <diwil@mail.ru>
4286
4287 * Makefile.am: Add msp430 target.
4288 * configure.in: Likewise.
4289 * Makefile.in: Regenerate.
4290 * configure: Regenerate.
4291 * archures.c: Add msp430 architecture vector.
4292 * config.bfd: Likewise.
4293 * reloc.c: Add msp430 relocs.
4294 * targets.c: Add msp320 target.
4295 * cpu-msp430.c: New file: msp430 cpu detection.
4296 * elf32-msp430.c: New file: msp430 reloc processing.
4297 * bfd-in2.h: Regenerate.
4298 * libbfd.h: Regenerate.
4299
eecdbe52
JJ
43002002-12-28 Jakub Jelinek <jakub@redhat.com>
4301
4302 * elf.c (elf_sort_sections): Don't reorder .tbss.
4303 (assign_file_positions_for_segments): Only adjust off/voff
4304 for increased alignment in PT_LOAD or PT_NOTE segment,
4305 but adjust p_filesz for .tbss too. in PT_LOAD consider
4306 .tbss to have zero memory size.
4307 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4308 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4309 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4310 into PT_TLS segment. Never put SHF_TLS sections in
4311 segments other than PT_TLS or PT_LOAD.
4312
4313 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4314 sh_entsize.
4315
213e90f4
DD
43162002-12-23 DJ Delorie <dj@redhat.com>
4317
4318 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4319
75828352
AM
43202002-12-23 Alan Modra <amodra@bigpond.net.au>
4321
4322 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4323
312b768e
NC
43242002-12-23 Nick Clifton <nickc@redhat.com>
4325
4326 * archures.c (bfd_arch_get_compatible): Add third parameter
4327 'accept_unknowns'. Only accept unknown format BFDs if
4328 accept_unknowns is true, or if the format is "binary".
acc990f2 4329 * bfd-in2.h: Regenerate.
312b768e 4330
63222ec9
NC
43312002-12-21 Nick Clifton <nickc@redhat.com>
4332
4333 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4334 that subtracted 8 from pc relative relocations.
4335
19852a2a
KH
43362002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4337
4338 * coff-h8300.c: Fix comment typos.
4339 * coffcode.h: Likewise.
4340 * cpu-cris.c: Likewise.
4341 * elf32-vax.c: Likewise.
4342 * genlink.h: Likewise.
4343 * linker.c: Likewise.
4344 * som.c: Likewise.
4345 * tekhex.c: Likewise.
4346 * vms-misc.c: Likewise.
4347
5fd63999
DD
43482002-12-20 DJ Delorie <dj@redhat.com>
4349
4350 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4351 * libbfd.h: Regenerate.
4352 * bfd-in2.h: Regenerate.
4353 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4354 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4355
4ee79850
KH
43562002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4357
4358 * doc/bfdint.texi: Fix typos.
4359
66e25bab
AM
43602002-12-20 Paul Eggert <eggert@twinsun.com>
4361
4362 Port to POSIX 1003.1-2001.
4363 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4364 * configure.in (build-warnings): Likewise.
4365 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4366 * aclocal.m4: Regenerate.
4367 * config.in: Regenerate.
4368 * configure: Regenerate.
4369
7dc77aaa
AM
43702002-12-19 Alan Modra <amodra@bigpond.net.au>
4371
0171ee92
AM
4372 * coff-h8300.c: Include libiberty.h.
4373 (h8300_reloc16_extra_cases): Check the hash table creator before
4374 referencing h8300 specific fields. Stash the hash table pointer
4375 in a local var. Comment typo fixes.
4376 (h8300_bfd_link_add_symbols): Likewise.
4377
1049f94e 4378 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4379 dst_mask comments.
4380 * bfd-in2.h: Regenerate.
4381
47388f4c
AM
43822002-12-18 Alan Modra <amodra@bigpond.net.au>
4383
4384 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4385 code a little. Comment on dynamic relocs against section symbols.
4386
1b3e3744
AM
43872002-12-17 Roger Sayle <roger@eyesopen.com>
4388
4389 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4390 the HP compiler's "long long".
4391
46f2b541
DD
43922002-12-16 Andrew MacLeod <amacleod@redhat.com>
4393
4394 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4395 and R_XSTORMY16_HI16) howto entries.
4396 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4397 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4398 determine the start of the second reloc table.
4399
af738ea7
NC
44002002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4401
4402 * ecofflink.c: Fix the reading of the debugging information
4403 of Tru64/Alpha binaries that are produced by recent Compaq
4404 compilers.
4405 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4406 table.
4407 (lookup_line): Because of the strange information sometimes
4408 generated by Compaq's recent compilers, change how the FDR
4409 table is searched so that PDRs (procedure descriptors) are
4410 correctly found. Note that this change is really more of a hack;
4411 however, I have included extensive documentation as to why
4412 this is the best solution short of an extensive rewrite or
4413 another hack.
4414 (fdrtab_lookup): Add comments to explain the algorithm.
4415
5354b572
AO
44162002-12-12 Alexandre Oliva <aoliva@redhat.com>
4417
4418 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4419 initializers to match struct declaration.
4420
ab3acfbe
AM
44212002-12-12 Alan Modra <amodra@bigpond.net.au>
4422
4423 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4424 * elf.c (get_program_header_size): Likewise.
4425 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4426 (m32r_elf_generic_reloc): Likewise.
4427 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4428 * elflink.h (elf_bfd_discard_info): Likewise.
4429
6348e046
AM
44302002-12-12 Alan Modra <amodra@bigpond.net.au>
4431
4432 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4433 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4434 DT_RELSZ adjustment, not output section. Avoid writing tags when
4435 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4436 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4437 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4438 DT_RELASZ adjustment, not output section. Avoid writing tags when
4439 unchanged. Adjust DT_RELA.
4440 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4441 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4442
2e7a68a8
AO
44432002-12-12 Alexandre Oliva <aoliva@redhat.com>
4444
4445 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4446 addend by 4.
4447
b15e6682
AO
44482002-12-12 Alexandre Oliva <aoliva@redhat.com>
4449
4450 * elfxx-mips.c (struct mips_got_entry): New.
4451 (struct mips_got_info): Added got_entries field.
4452 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4453 (mips_elf_local_got_index, mips_elf_got_page,
4454 mips_elf_got16_entry): Re-implement in terms of new...
4455 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4456 Change return type.
4457 (mips_elf_highest): Warning clean-up.
4458 (mips_elf_create_got_section): Initialize got_entries.
4459 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4460 local got size.
4461 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4462 GOT_PAGE entries, since we now reuse GOT16 entries.
4463
e6af3a53
NC
44642002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4465
4466 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4467 read-only section that lies after .text and before .data to be
4468 written into the output file and included in a_text.
4469 (translate_to_native_sym_flags): If an otherwise unrepresentable
4470 section was merged with .text, convert its symbols to N_TEXT
4471 symbols.
4472 * libaout.h (aout_section_merge_with_text_p): New macro.
4473
cf3d882d
AM
44742002-12-08 Alan Modra <amodra@bigpond.net.au>
4475
4476 * bfd-in.h: Comment typo fix. Formatting.
4477 * bfd-in2.h: Regenerate.
4478 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4479 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4480 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4481
2f9bd3f6
RH
44822002-12-05 Richard Henderson <rth@redhat.com>
4483
4484 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4485 Only send PCREL21B though the plt. Fix installed reloc type.
4486 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4487 against PCREL22 or PCREL64I; clean up error messages for
4488 branch relocs.
4489
d0112f73
KB
44902002-12-04 Kevin Buettner <kevinb@redhat.com>
4491
4492 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4493 New functions.
4494 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4495
c10d9d8f
JW
44962002-12-04 David Mosberger <davidm@hpl.hp.com>
4497
4498 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4499
d48770d4
L
45002002-12-04 H.J. Lu <hjl@gnu.org>
4501
4502 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4503 BFD address when constructing local name.
4504
b6152c34
AS
45052002-12-04 Andreas Schwab <schwab@suse.de>
4506
4507 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4508 member.
4509 (elf_m68k_link_hash_table_create): Initialize it.
4510 (elf_m68k_check_relocs): Handle symbols that are forced to be
4511 local due to visibility changes.
4512 (elf_m68k_adjust_dynamic_symbol): Likewise.
4513 (elf_m68k_size_dynamic_sections): Likewise.
4514 (elf_m68k_discard_copies): Likewise.
4515 (elf_m68k_relocate_section): Likewise.
4516
73374ef1
AM
45172002-12-04 Alan Modra <amodra@bigpond.net.au>
4518
4519 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4520
c5c1944d
AM
45212002-12-04 Alan Modra <amodra@bigpond.net.au>
4522
4523 * srec.c (srec_write_symbols): Restore '$' prefix to address
4524 accidentally removed in 2002-04-04 change.
4525 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4526
e1a9cb8e
NC
45272002-12-03 Nick Clifton <nickc@redhat.com>
4528
4529 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4530 (apuinfo_list_add): New function: Add a value to the list.
4531 (apuinfo_list_length): New function: Return the number of
4532 values on the list.
4533 (apuinfo_list_element): New function: Return a value on the
4534 list.
4535 (apuinfo_list_finish): New function: Free the resources used
4536 by the list.
4537 (ppc_elf_begin_write_processing): New function. Scan the
4538 input bfds for apuinfo sections.
4539 (ppc_elf_write_section): New function: Delay the creation of
4540 the contents of an apuinfo section in an output bfd.
4541 (ppc_elf_final_write_processing): New function. Create the
4542 contents of an apuinfo section in an output bfd.
4543 (elf_backend_begin_write_processing): Define.
4544 (elf_backend_final_write_processing): Define.
4545 (elf_backend_write_section): Define.
e1a9cb8e 4546
a823923b
RH
45472002-12-03 Richard Henderson <rth@redhat.com>
4548
4549 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4550
30491647
SC
45512002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4552
4553 Fix PR savannah/1417:
4554 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4555 branch if it goes to the start of the deleted region.
4556
bc7c6a90
SC
45572002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4558
4559 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4560 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4561 bfd_mach_m6812s): Declare.
4562
4563 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4564 (_bfd_m68hc12_elf_set_private_flags): Call it.
4565 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4566 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4567 report microcontroller incompatibilities (HC12 vs HCS12).
4568 (elf_backend_object_p): Update.
4569
b34976b6
AM
45702002-11-30 Alan Modra <amodra@bigpond.net.au>
4571
4572 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4573 (enum bfd_boolean, boolean): Delete.
4574 (bfd_boolean): Typedef to an int.
4575 (FALSE, TRUE): Define.
4576 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4577 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4578 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4579 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4580 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4581 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4582 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4583 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4584 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4585 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4586 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4587 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4588 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4589 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4590 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4591 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4592 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4593 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4594 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4595 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4596 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4597 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4598 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4599 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4600 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4601 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4602 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4603 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4604 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4605 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4606 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4607 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4608 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4609 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4610 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4611 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4612 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4613 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4614 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4615 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4616 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4617 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4618 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4619 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4620 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4621 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4622 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4623 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4624 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4625 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4626 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4627 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4628 of bfd_boolean vars with TRUE/FALSE. Formatting.
4629 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4630
947216bf
AM
46312002-11-28 Alan Modra <amodra@bigpond.net.au>
4632
4633 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4634 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4635 with Elf_Internal_Rela.
4636 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4637 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4638 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4639 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4640 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4641 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4642 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4643 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4644 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4645 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4646 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4647 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4648 throughout instead.
4649 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4650 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4651 Remove INLINE keyword.
4652 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4653 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4654 as a bfd_byte *.
4655 (elf_write_relocs): Consolidate REL and RELA code.
4656 (elf_slurp_reloc_table_from_section): Simplify REL code.
4657 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4658 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4659 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4660 RELA code.
4661 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4662 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4663 (elf_link_output_relocs): Likewise.
4664 (elf_reloc_link_order): Likewise.
4665 (elf_finish_pointer_linker_section): Likewise.
4666 (struct elf_link_sort_rela): Remove union.
4667 (elf_link_sort_cmp1): Update to suit.
4668 (elf_link_sort_cmp2): Here too.
4669 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4670 over-allocation for int_rels_per_ext_rel != 1 case.
4671 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4672 * elf32-i386.c: Likewise.
4673 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4674 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4675 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4676 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4677 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4678 elf64-sparc.c, elf64-x86-64.c: Likewise.
4679 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4680 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4681 bfd_elf32_swap_reloc_in.
4682
4683 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4684 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4685 (mips_elf64_swap_reloc_in): Zero r_addend.
4686 (mips_elf64_be_swap_reloc_in): Likewise.
4687 (mips_elf64_slurp_one_reloc_table): Simplify.
4688
4689 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4690 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4691 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4692
1448fa32
KK
46932002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4694
4695 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4696 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4697 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4698
73722af0
AM
46992002-11-26 Alan Modra <amodra@bigpond.net.au>
4700
4701 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4702 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4703 on a relocatable link. Comment typos.
4704 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4705 in the order they are declared. Clear elf_hash_value too.
4706 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4707 eh_info and tls_segment.
4708 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4709 sorted when discarding relocs by turning them into R_*_NONE.
4710
4711 * libbfd.c (warn_deprecated): Comment spelling.
4712 * po/SRC-POTFILES.in: Regenerate.
4713
7c25b72c
RH
47142002-11-21 Richard Henderson <rth@redhat.com>
4715
4716 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4717 arch's st_other bits when merging visibilities.
4718 (elf_link_output_extsym): Tidy clearing of visibility field.
4719
dc12c51f
AM
47202002-11-21 Alan Modra <amodra@bigpond.net.au>
4721
4722 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4723 (SWAP_OUT_RELOC_OFFSET): Define.
4724
963f13ec
AO
47252002-11-20 Alexandre Oliva <aoliva@redhat.com>
4726
4727 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4728 can_refcount is properly extended to the type of
4729 init_refcount.
4730
ee6423ed
AO
47312002-11-19 Alexandre Oliva <aoliva@redhat.com>
4732
4ffba85c
AO
4733 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4734 (_bfd_mips_elf_relocate_section): Use it.
4735
ee6423ed
AO
4736 * elfxx-mips.c (MNAME): New macro.
4737 (_bfd_mips_elf_check_relocs): Use it.
4738 (_bfd_mips_elf_discard_info): Likewise.
4739 (_bfd_mips_elf_final_link): Likewise.
4740
cdcf6e38
AM
47412002-11-19 Alan Modra <amodra@bigpond.net.au>
4742
4743 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4744 rel_hdr.sh_size too.
4745
93509525
KD
47462002-11-18 Klee Dienes <kdienes@apple.com>
4747
4748 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4749 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4750 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4751 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4752 Add dependencies for bfdwin.c, bfdio.c.
4753 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4754 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4755 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4756 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4757 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4758 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4759 bfd_get_size (moved from libbfd.c and bfd.c).
4760 * bfdwin.c New file. Contains _bfd_window_internal,
4761 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4762 libbfd.c and bfd.c).
4763 * po/SRC-POTFILES.in: Regenerate.
4764 * po/bfd.pot: Regenerate.
4765 * libbfd.h: Regenerate.
4766 * bfd-in2.h: Regenerate.
4767 * aclocal.m4: Regenerate.
4768 * Makefile.in: Regenerate.
4769 * configure: Regenerate.
4770
3ae41454
AM
47712002-11-18 Klee Dienes <kdienes@apple.com>
4772
4773 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4774
e514ac71
NC
47752002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4776
4777 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4778 jsr after a short jump.
4779 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4780
eddc4f81
KD
47812002-11-15 Klee Dienes <kdienes@apple.com>
4782
4783 * pef.c (bfd_pef_convert_architecture): Move declaration of
4784 ARCH_POWERPC and ARCH_M68K to the start of the function.
4785
51908eee
SS
47862002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4787
4788 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4789
3416d2e7
HPN
47902002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4791
4792 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4793 For bpo_gregs_section->contents, allocate _raw_size, not
4794 _cooked_size.
4795
b1c58715
AM
47962002-11-13 Klee Dienes <kdienes@apple.com>
4797
4798 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4799
077ca68b
L
48002002-11-13 H.J. Lu <hjl@gnu.org>
4801
4802 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4803
e84d6fca
AM
48042002-11-13 Klee Dienes <kdienes@apple.com>
4805 Alan Modra <amodra@bigpond.net.au>
4806
4807 * bfd.c (struct bfd_preserve): New.
4808 (bfd_preserve_save): New function.
4809 (bfd_preserve_restore): Ditto.
4810 (bfd_preserve_finish): Ditto.
4811 * bfd-in2.h: Regenerate.
4812 * mach-o.c: Formatting.
4813 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4814 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4815 (bfd_mach_o_core_p): Ditto.
4816 (bfd_mach_o_scan): Pass in mdata.
4817 * mach-o.h (bfd_mach_o_scan): Update prototype.
4818 * pef.c: Formatting.
4819 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4820 (bfd_pef_xlib_object_p): Ditto.
4821 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4822 * pef.h (bfd_pef_scan): Update prototype.
4823 * xsym.c: Formatting, K&R fixes.
4824 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4825 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4826 * xsym.h (bfd_sym_scan): Declare.
4827 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4828 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4829 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4830
cd24c222
NC
48312002-11-12 Nick Clifton <nickc@redhat.com>
4832
4833 * po/da.po: Updated Danish translation.
4834
99eb2ac8
AM
48352002-11-12 Alan Modra <amodra@bigpond.net.au>
4836
d6fe2dc1
AM
4837 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4838 relocatable link too.
4839 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4840 eh_frame and stab sections. Zap deleted relocs.
4841 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4842 (elf_bfd_discard_info): Run for relocatable link too.
4843 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4844 Handle ld -r case.
4845 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4846 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4847
126495ed
AM
4848 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4849 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4850 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4851 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4852 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4853 (struct elf_link_hash_table): Add eh_info.
4854 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4855 (_bfd_elf_discard_section_eh_frame): Update prototype.
4856 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4857 (_bfd_elf_write_section_eh_frame): Likewise.
4858 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4859 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4860 param. Get "hdr_info" from link hash table.
4861 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4862 header section from link hash table. Save header section to elf_tdata.
4863 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4864 header section from link hash table. Don't alloc hdr_info. Clear
4865 hdr_sec instead of setting "strip".
4866 (_bfd_elf_eh_frame_section_offset): Formatting.
4867 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4868 Get header section from link hash table.
4869 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4870 Get header section from link hash table.
4871 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4872 (get_program_header_size): Likewise.
4873 (_bfd_elf_section_offset): Formatting.
4874 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4875 section pointer in link hash table.
4876 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4877 and _bfd_elf_write_section_eh_frame calls. Update comment about
4878 eh_frame entries.
4879 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4880 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4881
4882 * po/SRC-POTFILES.in: Regenerate.
4883
99eb2ac8
AM
4884 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4885 relocs for discarded FDEs. Remove dead code.
4886 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4887 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4888 Tidy conditions under which stabs are edited. Formatting.
4889 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4890 from discarded relocs.
4891 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4892 section adjustments after testing magic values.
4893
7c319a27
AM
48942002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4895
4896 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4897 references to large plt symbols.
4898
a95a4550
AM
48992002-11-12 Klee Dienes <kdienes@apple.com>
4900
4901 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4902 looking for an unused section name.
4903
bc7eab72
KH
49042002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4905
4906 * coff-h8300.c: Fix formatting.
4907 * elf32-h8300.c: Likewise.
4908 * reloc16.c: Likewise.
4909
52585bb8
AM
49102002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4911
4912 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4913 section when dynamic section unused; _bfd_strip_section_from_output
4914 instead.
4915
9f632188
AM
49162002-11-08 Alan Modra <amodra@bigpond.net.au>
4917
207b304b
AM
4918 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4919 and sym_vec.
3b029f65 4920
9f632188
AM
4921 * dwarf2.c: Revert last change.
4922
ec4530b5
NC
49232002-11-07 Michal Ludvig <mludvig@suse.cz>
4924
9b5ecbd0 4925 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4926 _bfd_dwarf2_find_nearest_line): Use
4927 bfd_simple_get_relocated_section_contents() instead of
4928 bfd_get_section_contents().
4929 * reloc.c (bfd_perform_relocation): Add sanity check.
4930 * simple.c (simple_get_relocated_section_contents): If the section
4931 does not have any relocs associated with it, just return the
4932 unadjusted contents.
4933
205cfeb0
HPN
49342002-11-07 Hans-Peter Nilsson <hp@axis.com>
4935
4936 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4937 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4938 contents, enabling for a non-DSO, for symbols defined in the
4939 program with --export-dynamic.
4940
87e226ce
AM
49412002-11-07 Alan Modra <amodra@bigpond.net.au>
4942
4943 * elf64-ppc.c: Comment typo fixes.
4944 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4945
235c4794
NC
49462002-11-07 Nick Clifton <nickc@redhat.com>
4947
4948 * po/da.po: Updated Danish translation.
4949
49179469
AO
49502002-11-06 Alexandre Oliva <aoliva@redhat.com>
4951
4952 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4953 exactly three internal relocs per external reloc. Set reloc_count
4954 to the external reloc count.
4955
246178f2
NC
49562002-11-06 Klee Dienes <kdienes@apple.com>
4957
3ae41454 4958 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4959 Fix comment formatting.
4960
3af9a47b
NC
49612002-11-06 Klee Dienes <kdienes@apple.com>
4962
3ae41454 4963 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4964 xsym.lo.
4965 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4966 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4967 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4968 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4969 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4970 sym.
3ae41454 4971 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
4972 * Makefile.in: Regenerate.
4973 * doc/Makefile.in: Regenerate.
3ae41454 4974 * bfd-in2.h: Regenerate.
3af9a47b
NC
4975 * xsym.c: New file. Contains support for the Apple/Metrowerks
4976 xSYM debugging format.
4977 * xsym.h: New file.
4978 * pef.c: New file. Contains support for the Apple Code Fragment
4979 Manager Preferred Executable Format
4980 * pef.h: New file.
4981 * pef-traceback.h: New file. Contains support for parsing PowerPC
4982 traceback tables as used by PEF executables (and perhaps other
4983 systems as well).
3ae41454 4984 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
4985 format.
4986 * mach-o.h: New file.
4987 * mach-o-target.c: New file. Declares the mach-o targets
4988 themselves. Included three times by mach-o.c; each time with a
4989 different set of macros set.
3ae41454 4990
b6821651 49912002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
4992
4993 * Makefile.am: Remove entries for elf32-qnx.[ch].
4994 * Makefile.in: Regenerate.
4995 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4996 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4997 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4998 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4999 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5000 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5001 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5002 * configure: Regenerate.
5003 * elf32-qnx.c: Remove.
5004 * elf32-qnx.h: Remove.
5005 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5006 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
5007 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5008 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
5009 * elf32-i386.c: Remove QNX extended bfd support.
5010 * elf32-ppc.c: Remove QNX extended bfd support.
5011 * elf32-sh.c: Remove QNX extended bfd support.
5012 * elfarm-nabi.c: Remove QNX extended bfd support.
5013 * targets.c: Remove qnx vectors.
5014 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5015 (elf_backend_is_contained_by_filepos): Remove.
5016 (elf_backend_copy_private_bfd_data_p): Remove.
5017 * po/SRC-POTFILES.in: Regenerate.
5018
b6821651
AM
50192002-11-06 David O'Brien <obrien@FreeBSD.org>
5020 Alan Modra <amodra@bigpond.net.au>
5021
5022 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5023 dynamic relocs against section symbols for the output section vma.
5024
50252002-11-05 Alan Modra <amodra@bigpond.net.au>
5026
5027 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5028 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5029
08f74004
AM
50302002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5031 Alan Modra <amodra@bigpond.net.au>
5032
5033 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5034 vectors in target_selvecs.
5035 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5036 in target_selvecs.
5037 (sh-*-netbsdelf*): Likewise.
5038 * configure.in (assocvecs): New variable. Handle assocvecs like
5039 selvecs.
5040 * configure: Regenerate.
5041 * format.c (bfd_check_format_matches): Store bfd_target pointers
5042 in matching_vector instead of target names. Select first target
5043 from bfd_associated_vector that matches a list of ambiguous targets.
5044 * targets.c (_bfd_associated_vector): New array.
5045 (bfd_associated_vector): New variable.
5046 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5047 * libbfd-in.h (bfd_associated_vector): Declare.
5048 * libbfd.h: Regenerate.
5049
89117aab
AM
50502002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5051
5052 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5053 non-NULL before dereferencing.
5054
5e9aae3e
KK
50552002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5056
5057 * vms.c (vms_object_p): Restore the start address when returning
5058 NULL.
5059
c97e73dd
AM
50602002-11-04 Alan Modra <amodra@bigpond.net.au>
5061 Hans-Peter Nilsson <hp@axis.com>
5062
5063 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5064 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5065 Set up a larger symshndxbuf, and write it out. Free it on
5066 exit rather than freeing symbuf twice. Correct section index
5067 on output section symbol loop.
5068 (elf_link_output_sym): Accumulate symbol extension section
5069 indices, reallocating symshndxbuf rather than writing it out.
5070 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5071 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5072 Use bfd_zalloc to clear i_shdrp[0] too.
5073
3463048e
SC
50742002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5075
5076 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5077 _raw_size of cranges section if _cooked_size not yet set.
5078
63a23799
HPN
50792002-11-03 Hans-Peter Nilsson <hp@axis.com>
5080
5081 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5082 for bfd_elf32_swap_symbol_out.
5083
e68cc12e
DB
50842002-10-31 David O'Brien <obrien@FreeBSD.org>
5085
5086 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5087 signed and unsigned in comparison.
5088
db4b6d01
DJ
50892002-10-30 Daniel Jacobowitz <drow@mvista.com>
5090
5091 * coffcode.h: Remove extraneous '\'.
5092
840f0243
L
50932002-10-28 H.J. Lu <hjl@gnu.org>
5094
5095 * Makefile.am (targets.lo): Depend on Makefile instead of
5096 config.status.
5097 (archures.lo): Likewise.
5098 * Makefile.in: Regenerated.
5099
05a7e2db
JT
51002002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5101
5102 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5103 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5104 targ_selvecs.
5105
a0087177
JW
51062002-10-25 Jim Wilson <wilson@redhat.com>
5107
5108 * elf64-sh64.c (sh_elf64_relocate_section): Call
5109 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5110 of SHF_MERGE section.
5111
8718ac9c
HPN
51122002-10-25 Hans-Peter Nilsson <hp@axis.com>
5113
5114 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5115
d45913a0
DA
51162002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5117
5118 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5119 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5120 unsigned int.
5121 (NAME(aout,final_link)): Cast enum used in assignment.
5122 (aout_link_write_symbols): Cast enums in comparisons, int values to
5123 boolean, enums in assignments to int.
5124 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5125 (aout_link_input_section_ext): Likewise. Cast enums used in
5126 comparisons with unsigned ints.
d45913a0
DA
5127 (aout_link_reloc_link_order): Cast enum to int in assignment.
5128 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5129 calls to char *.
5130 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5131 assignment.
5132 * bfd-in2.h (bfd_set_section_vma): Likewise.
5133 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5134 * binary.c (bfd_alloc): Cast enum to long.
5135 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5136 * dwarf2.c (read_abbrevs): Add casts to enum types.
5137 (read_attribute_value): Likewise.
5138 (arange_add): Cast result of bfd_zalloc call.
5139 (comp_unit_contains_address): Return true and false.
5140 (comp_unit_find_nearest_line): Cast return to boolean.
5141 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5142 * gen-aout.c: define macro '_' if not defined.
5143 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5144 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5145 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5146 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5147 (bfd_generic_is_local_label_name): Cast return to boolean.
5148 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5149 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5150 struct bfd_hash_entry *.
5151 (_bfd_generic_link_hash_newfunc): likewise.
5152 (_bfd_generic_final_link): Cast enum to unsigned int.
5153 * merge.c (sec_merge_emit): Cast return to boolean.
5154 (merge_strings): Add casts to const unsigned char *.
5155 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5156 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5157 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5158 to struct bfd_hash_entry *.
d45913a0
DA
5159 (bfd_set_section_content): Add cast to PTR in comparison.
5160 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5161 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5162 simple_dummy_unattached_reloc,
5163 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5164 function definitions.
5165 * srec.c (S3Forced): Initialize to false.
5166 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5167 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5168 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5169 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5170 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5171 comparisons.
5172
475c2a7e
JJ
51732002-10-23 Jakub Jelinek <jakub@redhat.com>
5174
5175 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5176 relocs into shared lib non-allocated reloc sections.
5177
e82ce529
AM
51782002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5179
5180 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5181 sorted even when given an out-of-order line sequence.
5182 (lookup_address_in_line_info_table): When an exact VMA match is
5183 not found, return line information with the closest VMA.
5184
f2482cb2
NC
51852002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5186
5187 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5188 HPUX 11.00 patch PHSS_26559.
5189
c1fd6598
AO
51902002-10-22 Alexandre Oliva <aoliva@redhat.com>
5191
5192 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5193 the options section into a separate section unless IRIX 6
5194 compatibility is enabled.
5195
033fd5f9
AO
51962002-10-22 Alexandre Oliva <aoliva@redhat.com>
5197
5198 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5199 into arrays.
5200 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5201 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5202 into account.
5203 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5204 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5205
ef485c01
AM
52062002-10-21 Graeme Peterson <gp@qnx.com>
5207
5208 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5209
b50afec9
AM
52102002-10-21 Alan Modra <amodra@bigpond.net.au>
5211
5212 * targets.c (bfd_target_list): Don't return the default target twice.
5213
5fe39cae
AM
52142002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5215
5216 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5217 perror with bfd_perror.
5218
5d603aa9
L
52192002-10-19 H.J. Lu <hjl@gnu.org>
5220
5221 * elflink.h (elf_link_add_object_symbols): Correctly handle
5222 DT_RPATH and DT_RUNPATH.
5223
e377ab71
MK
52242002-10-19 Mark Kettenis <kettenis@gnu.org>
5225
5226 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5227
0d09fec6
DC
52282002-10-17 Denis Chertykov <denisc@overta.ru>
5229
5230 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5231 for ip2k port.
5232
acf8aed4
AM
52332002-10-17 Alan Modra <amodra@bigpond.net.au>
5234
5235 * elfxx-target.h (USE_REL): Don't define as 1.
5236 * elf32-arm.h (USE_REL): Provide a default define of 0.
5237 Use #if rather than #ifdef when testing USE_REL.
5238 * elf32-m32r.c: Likewise.
5239
5240 * elf32-arc.c (USE_REL): Define as 1.
5241 * elf32-d10v.c (USE_REL): Likewise.
5242 * elf32-m32r.c (USE_REL): Likewise.
5243 * elf32-m68hc11.c (USE_REL): Likewise.
5244 * elf32-m68hc12.c (USE_REL): Likewise.
5245 * elf32-or32.c (USE_REL): Likewise.
5246 * elfarm-nabi.c (USE_REL): Likewise.
5247
f52d1d64
JJ
52482002-10-16 Jakub Jelinek <jakub@redhat.com>
5249
5250 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5251 (s390x-*-linux*): Add targ_selvecs.
5252
2bc3c89a
AM
52532002-10-16 Alan Modra <amodra@bigpond.net.au>
5254
5255 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5256 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5257 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5258 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5259 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5260 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5261 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5262 (SOURCE_HFILES): Add elf32-qnx.h.
5263 (BUILD_HFILES): Add bfdver.h.
5264 Run "make dep-am".
5265 * Makefile.in: Regenerate.
5266 * configure.in Update bfd vector dependencies.
5267 * configure: Regenerate.
5268 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5269 * elf32-i386qnx.c: Likewise.
5270 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5271 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5272 * elf32-sh-lin.c: Likewise.
5273 * elf32-shqnx.c: Likewise.
5274 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5275 * elf32-sh64-nbsd.c: Likewise.
5276 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5277 * elf64-sh64-nbsd.c: Likewise.
5278 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5279 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5280 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5281 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5282 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5283 (elf_backend_is_contained_by_filepos): Likewise.
5284 (elf_backend_copy_private_bfd_data_p): Likewise.
5285 Globalize and move functions to..
5286 * elf32-qnx.c: ..here. New file.
5287 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5288 emit target vectors when INCLUDE_SHMEDIA.
5289 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5290 end of file.
5291 * elf64-sh64.c: Remove ELF_ARCH test.
5292 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5293 * po/BLD-POTFILES.in: Regenerate.
5294 * po/SRC-POTFILES.in: Regenerate.
5295
90c9df85
AM
52962002-10-16 Alan Modra <amodra@bigpond.net.au>
5297
366f2964
AM
5298 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5299 loaded with --just-symbols.
5300
90c9df85
AM
5301 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5302 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5303 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5304 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5305
2238051f
RH
53062002-10-15 Richard Henderson <rth@redhat.com>
5307
5308 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5309 (BFD64_BACKENDS_CFILES): Likewise.
5310 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5311 * elf64-alpha-fbsd.c: Remove file, move code ...
5312 * elf64-alpha.c: ... here.
5313 * Makefile.in, configure: Rebuild.
5314
64e04ecd
RH
53152002-10-14 Richard Henderson <rth@redhat.com>
5316
5317 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5318 VALUE, not ADDEND.
5319
396a6083
SC
53202002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5321
5322 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5323 datalabel_got_offset with union of datalabel_got
5324 offset and refcount.
5325 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5326 (allocate_dynrelocs): Delete unnecessary code for
5327 STT_DATALABEL type. Create entry in got for
5328 datalabel version of symbol if datalabel_got.refcount > 0.
5329 (sh_elf_relocate_section): Use datalabel_got union.
5330 (sh_elf_gc_sweep_hook): Pull common code to initialize
5331 h and eh out of switch statement. Declare seen_stt_datalabel.
5332 Initialize it. Decrement datalabel_got.refcount for
5333 got relocs when seen_stt_datalabel is true.
5334 Decrement local_got_refcounts entry for datalabel got relocs
5335 of local symbols.
5336 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5337 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5338 Initialize it. When seen_stt_datalabel is true, increment
5339 datalabel_got refcount rather than got.refcount.
5340 (sh_elf_finish_dynamic_symbol): Create relocs to
5341 initialize got entry for datalabel version of symbol.
5342
6a0735ef
AM
53432002-10-14 Alan Modra <amodra@bigpond.net.au>
5344
5345 * Makefile.am: Run "make dep-am".
5346 (BFD_H_FILES): Remove version.h.
5347 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5348 * version.h: ..to here.
5349 * configure.in (bfd_version_date): Remove.
5350 (AC_OUTPUT): Make bfdver.h from version.h.
5351 * bfd.c: #include "bfdver.h".
5352 * vms-hdr.c: Likewise.
5353 * Makefile.in: Regenerate.
5354 * bfd-in2.h: Regenerate.
5355 * configure: Regenerate.
5356 * po/SRC-POTFILES.in: Regenerate.
5357
686e4055
AM
53582002-10-14 Alan Modra <amodra@bigpond.net.au>
5359
5360 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5361 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5362 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5363 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5364 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5365 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5366 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5367 bfd_mach_ip2022, bfd_mach_ip2022ext,
5368 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5369 * bfd-in2.h: Regenerate.
5370
019dca2b
KK
53712002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5372
5373 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5374 endian vector to targ_selvecs.
5375
bce03d3d
AO
53762002-10-13 Alexandre Oliva <aoliva@redhat.com>
5377
5378 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5379 save_addend argument. Don't apply the 32-bit mask to a
5380 GPREL32 value if it's to be used in another relocation. Don't
5381 use forced-check computation of local_p to decide whether to
5382 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5383 of the addend of a non-in-place GPREL16 relocation.
5384 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5385 mips_elf_calculate_relocation().
5386
9b691193
SC
53872002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5388
5389 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5390 with symbols in other sections if we relaxed something; the sections
5391 output offsets must be re-computed before.
5392
1f4c5b47
SC
53932002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5394
5395 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5396 handling to use Elf_Internal_Sym.
5397 (m68hc11_elf_relax_delete_bytes): Likewise.
5398
5dc97655
KK
53992002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5400
5401 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5402 sh_elf_object_p, dtpoff_base): New functions.
5403 (sh_elf_howto_table): Add TLS relocs.
5404 (sh_reloc_map): Likewise.
5405 (sh_elf_info_to_howto): Support TLS relocs.
5406 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5407 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5408 New macros.
5409 (sh_elf_obj_tdata): New.
5410 (elf_sh_link_hash_table): Add tls_ldm_got.
5411 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5412 (allocate_dynrelocs): Support TLS relocs.
5413 (sh_elf_size_dynamic_sections): Likewise.
5414 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5415 .rela.got section when found already. Return false after printing
5416 error about unresolvable relocation.
5417 (sh_elf_gc_sweep_hook): Support TLS relocs.
5418 (sh_elf_check_relocs): Likewise.
5419 (sh_elf_finish_dynamic_symbol): Likewise.
5420 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5421 * reloc.c: Add SH TLS relocs.
5422 * bfd-in2.h, libbfd.h: Regenerate.
5423
6a0735ef
AM
54242002-10-11 Daniel Jacobowitz <drow@mvista.com>
5425
5426 * Makefile.in: Regenerated.
5427
af39267e
DJ
54282002-10-11 Daniel Jacobowitz <drow@mvista.com>
5429
5430 * Makefile.am: Run dep-am.
6a0735ef 5431 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5432 (BFD32_LIBS): Add simple.lo.
5433 (BFD32_LIBS_CFILES): Add simple.c.
5434 * Makefile.in: Regenerated.
5435 * bfd-in2.h: Regenerated.
5436 * simple.c: New file.
5437
0be617ce
AM
54382002-10-11 Alan Modra <amodra@bigpond.net.au>
5439
14a793b2
AM
5440 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5441 (record_thumb_to_arm_glue): Likewise.
5442 * ecoff.c (ecoff_link_add_externals): Likewise.
5443 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5444 (record_thumb_to_arm_glue): Likewise.
5445 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5446 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5447 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5448 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5449 * elf64-ppc.c (func_desc_adjust): Likewise.
5450 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5451 (sh64_elf64_create_dynamic_sections): Likewise.
5452 * elflink.c (_bfd_elf_create_got_section): Likewise.
5453 (_bfd_elf_create_dynamic_sections): Likewise.
5454 (_bfd_elf_create_linker_section): Likewise.
5455 * elflink.h (elf_add_default_symbol): Likewise.
5456 (elf_link_create_dynamic_sections): Likewise.
5457 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5458 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5459 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5460 (_bfd_mips_elf_add_symbol_hook): Likewise.
5461 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5462 * linker.c (generic_link_add_symbol_list): Likewise.
5463 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5464
5465 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5466
0be617ce 5467 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5468 completely removed. Correct local sym adjustment.
0be617ce 5469
0a4ef3f4
SC
54702002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5471
5472 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5473 Correct mistake in calculation of address of .got.
5474 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5475 elf_sh64_pic_plt_entry_le): Likewise.
5476
efacd36e
SC
54772002-10-09 Richard Shann <richard.shann@superh.com>
5478 Stephen Clarke <stephen.clarke@superh.com>
5479
5480 * Makefile.am: Add entries for elf32-sh64-lin.c and
5481 elf64-sh64-lin.c. Regenerate.
5482 * Makefile.in: Regenerate.
9b5ecbd0 5483 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5484 to use sh64 vectors rather than sh vectors.
5485 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5486 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5487 * configure: Regenerate.
5488 * elf32-sh64-lin.c: New file.
5489 * elf64-sh64-lin.c: New file.
5490 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5491 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5492
299bf759
L
54932002-10-08 H.J. Lu <hjl@gnu.org>
5494
5495 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5496 IE->LE transition for R_386_TLS_IE.
5497
51020317
AM
54982002-10-08 Alan Modra <amodra@bigpond.net.au>
5499
5500 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5501
a8fcf378
NC
55022002-10-07 Mark Elbrecht <snowball3@softhome.net>
5503
51020317
AM
5504 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5505 sections.
a8fcf378 5506
a16d5acb
AM
55072002-10-07 Alan Modra <amodra@bigpond.net.au>
5508
a6b511bd
AM
5509 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5510 code.
5511
a16d5acb
AM
5512 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5513
7c4a37eb
AM
55142002-10-06 Alan Modra <amodra@bigpond.net.au>
5515
5516 * opncls.c: Formatting.
5517 (_bfd_new_bfd): Use a smaller section hash table.
5518
7c4ca42d
AO
55192002-10-05 Alexandre Oliva <aoliva@redhat.com>
5520
5521 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5522 of the other two relocations packed with a REL32 to NONE.
5523
4989d792
SC
55242002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5525
5526 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5527 (sh_elf_link_hash_newfunc): Initialize it.
5528 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5529 to got.refcount for symbols that are forced local or when
5530 we have direct got refs.
5531 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5532 to correctly adjust got.refcount and plt.refcount.
5533 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5534 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5535
7c445aa3
JJ
55362002-10-01 Jakub Jelinek <jakub@redhat.com>
5537
5538 * elf32-i386.c (elf_i386_relocate_section): Fix
5539 movl foo@indntpoff, %eax IE->LE transition.
5540
abcf1d52
JJ
55412002-10-01 Jakub Jelinek <jakub@redhat.com>
5542
5543 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5544 sequence and its transitions.
5545
a45bb67d
JJ
55462002-10-01 Jakub Jelinek <jakub@redhat.com>
5547
5548 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5549 to st_value + addend in non-code sections.
5550 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5551 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5552
00707a0e 55532002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5554 Ken Raeburn <raeburn@cygnus.com>
5555 Aldy Hernandez <aldyh@redhat.com>
5556 Eric Christopher <echristo@redhat.com>
5557 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5558
5559 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5560 (bfd_mach_mips5500): New.
5561 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5562 (arch_info_struct): Add corresponding entries here.
5563 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5564 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5565 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5566 bfd_mach_mips5400 and bfd_mach_mips5500.
5567 (_bfd_mips_elf_mach_extends_p): New function.
5568 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5569 the EF_MIPS_MACH flags.
5570 * bfd-in2.h: Regenerate.
5571
624f0b25
JT
55722002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5573
5574 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5575 .got sections.
5576
b89fe0ee
AM
55772002-09-28 Alan Modra <amodra@bigpond.net.au>
5578
5579 * elf.c (map_sections_to_segments): Correct test for start of
5580 writable section in the same page as end of read-only section.
5581
b29635ba
JT
55822002-09-27 Matt Thomas <matt@3am-software.com>
5583
5584 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5585 local_got_refcounts usage. Remove allocation of got slot.
5586 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5587 Remove de-allocation of got slot.
5588 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5589 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5590 sections to be GC'ed.
5591 (elf_vax_instantiate_got_entries): New function.
5592 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5593 tests that are now handled by elf_vax_instantiate_got_entries.
5594 Assert GOT entry falls within .got section size. Remove redundant
5595 comparisions. Fix comments.
5596
bffbf940
JJ
55972002-09-27 Jakub Jelinek <jakub@redhat.com>
5598
5599 * reloc.c: Add x86-64 TLS relocs.
5600 * bfd-in2.h, libbfd.h: Rebuilt.
5601 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5602 relocs. Add TLS relocs.
5603 (x86_64_reloc_map): Add TLS relocs.
5604 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5605 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5606 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5607 (elf64_x86_64_hash_entry): Define.
5608 (struct elf64_x86_64_obj_tdata): New.
5609 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5610 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5611 (link_hash_newfunc): Initialize tls_type.
5612 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5613 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5614 (elf64_x86_64_mkobject): New.
5615 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5616 (elf64_x86_64_tls_transition): New.
5617 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5618 Handle TLS relocs.
5619 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5620 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5621 (elf64_x86_64_size_dynamic_sections): Likewise.
5622 (dtpoff_base, tpoff): New.
5623 (elf64_x86_64_relocate_section): Handle TLS relocs.
5624 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5625 entries.
5626 (bfd_elf64_mkobject): Define.
5627
5628 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5629 DF_STATIC_TLS if shared.
5630
14366460
TS
56312002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5632
5633 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5634 empty relocation sections.
5635
9f951329
AM
56362002-09-26 Alan Modra <amodra@bigpond.net.au>
5637
5638 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5639 (ppc64_elf_build_stubs): Build them here instead.
5640
6b3ac709
JJ
56412002-09-24 Jakub Jelinek <jakub@redhat.com>
5642
5643 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5644 addend into r_addend, not *r_offset.
5645 (elf32_sparc_finish_dynamic_symbol): Likewise.
5646 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5647 R_SPARC_RELATIVE's r_offset.
5648
e2f6d277
NC
56492002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5650
5651 * dwarf2.c (decode_line_info): Update to correctly decode
5652 the (non-standard DWARF2) out-of-order address sequences
5653 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5654
f3961b2b
DD
56552002-09-23 Mark Elbrecht <snowball3@softhome.net>
5656
5657 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5658
ad34bc37
AM
56592002-09-23 Alan Modra <amodra@bigpond.net.au>
5660
5661 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5662 for discarded FDEs. Remove redundant assignment.
5663 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5664
82988bff
L
56652002-09-22 H.J. Lu <hjl@gnu.org>
5666
5667 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5668 the relocation count between different .reloc sections.
5669
5ad8645c
AM
56702002-09-21 Alan Modra <amodra@bigpond.net.au>
5671
5f819128
AM
5672 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5673 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5674 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5675 R_PPC_EMB_RELSDA.
5676
5ad8645c
AM
5677 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5678 unsigned. Move "symcount" assignment out of loop.
5679 * Makefile.am: Run "make dep-am".
5680 * Makefile.in: Regenerate.
5681 * configure: Regenerate.
5682 * po/SRC-POTFILES.in: Regnerate.
5683
75936555
NC
56842002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5685
5686 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5687 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5688 (e.g. IRIX64).
5689
2243deae
L
56902002-09-19 Jakub Jelinek <jakub@redhat.com>
5691
5692 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5693 even if generating R_PPC_RELATIVE reloc.
5694 (ppc_elf_relocate_section): Make sure relocation is performed
5695 if skip == -2. Clear memory at r_offset when creating dynamic
5696 relocation.
5697
37e55690
JJ
56982002-09-19 Jakub Jelinek <jakub@redhat.com>
5699
5700 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5701 BFD_RELOC_386_TLS_GOTIE): Add.
5702 * bfd-in2.h, libbfd.h: Rebuilt.
5703 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5704 and R_386_TLS_GOTIE.
5705 (elf_i386_reloc_type_lookup): Handle it.
5706 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5707 char instead of enum, change GOT_* into defines.
5708 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5709 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5710 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5711 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5712 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5713 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5714 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5715 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5716 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5717 tls_type is GOT_TLS_IE_BOTH.
5718 (elf_i386_size_dynamic_sections): Likewise.
5719 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5720 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5721 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5722 all 4 GOT_TLS_* TLS types.
5723
8e67855b
NC
57242002-09-19 Nick Clifton <nickc@redhat.com>
5725
5726 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5727 follow indirect links.
5728
1c59ba3f
NC
57292002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5730
5731 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5732 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5733 on 64 bit machines.
5734 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5735 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5736 ECOFF information: 'ioptMax' refers to the actual *size*
5737 of the optimization symtab, not the number of entries.
1c59ba3f 5738
9d7404b7
NC
57392002-09-19 Daniel Jacobowitz <drow@mvista.com>
5740
5741 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5742 ELF_LINK_HASH_NEEDS_PLT logic.
5743
05a487dc
DJ
57442002-09-18 Daniel Jacobowitz <drow@mvista.com>
5745
5746 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5747 correct relocation count.
5748
1f70368c
DJ
57492002-09-17 Daniel Jacobowitz <drow@mvista.com>
5750
5751 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5752 * bfd.c (struct _bfd): Add dynsymcount.
5753 * bfd-in2.h: Regenerated.
5754 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5755 abfd->dynsymcount.
5756 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5757 for overflow.
5758
51020317 57592002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5760
5761 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5762 (mips_elf64_final_gp): Don't make up gp value.
5763 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5764 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5765 .MIPS.options/.options section.
5766
290062cc
DB
57672002-09-17 David O'Brien <obrien@FreeBSD.org>
5768
5769 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5770 It is benign for FreeBSD < 4.1. Minor reformatting.
5771 * elf64-alpha-fbsd.c: Likewise.
5772
c5c1f40c
JJ
57732002-09-17 Jakub Jelinek <jakub@redhat.com>
5774
ca1eb0ba
JJ
5775 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5776 addend.
c5c1f40c 5777
562ace6b
AM
57782002-09-17 Alan Modra <amodra@bigpond.net.au>
5779
5780 * elf64-alpha.c (alpha_elf_size_info): Make static.
5781
5af6ead6
AM
57822002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5783
5784 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5785 * cpu-tic4x.c: Ditto.
5786
cb9512fc
TS
57872002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5788
5789 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5790 duplicate define.
5791
4ada7262
DB
57922002-09-16 Bruno Haible <bruno@clisp.org>
5793
5794 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5795 by a target variant implementation.
5796 * elf64-alpha.c: Likewise.
5797 * elf32-i386-fbsd.c: New file.
5798 * elf64-alpha-fbsd.c: New file.
5799 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5800 bfd_elf64_alpha_freebsd_vec.
5801 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5802 bfd_elf64_alpha_freebsd_vec.
5803 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5804 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5805 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5806 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5807 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5808 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5809 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5810
6a30718d
JJ
58112002-09-12 Jakub Jelinek <jakub@redhat.com>
5812
5813 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5814 NULL.
5815 (elf_i386_relocate_section): Return false after printing error about
5816 unresolvable relocation.
5817
6cf9e9fe
NC
58182002-09-12 Nick Clifton <nickc@redhat.com>
5819
5820 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5821 R_ARM_THM_PC11.
5822
10f469bf
DJ
58232002-09-11 Jeffrey Law <law@redhat.com>
5824
5825 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5826
dc43ada5
NC
58272002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5828
5829 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5830 line_ptr before deciding we've found a symbol.
5831
e09f4395
NC
58322002-09-11 Nick Clifton <nickc@redhat.com>
5833
5834 * po/da.po: New Danish translation file.
5835 * configure.in (LINGUAS): Add 'da'.
5836 * configure: Regenerate.
5837
b3018b5f
NC
58382002-09-10 Michael Snyder <msnyder@redhat.com>
5839
5840 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5841 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5842 do_sections64, depending on corefile (32-bit or 64-bit).
5843
2f21f25e
RH
58442002-09-09 Richard Henderson <rth@redhat.com>
5845
5846 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5847 and PCREL21F like PCREL21B.
5848
28b94e7c
KB
58492002-09-04 Kevin Buettner <kevinb@redhat.com>
5850
51020317
AM
5851 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5852 vector.
28b94e7c 5853
5cec6941
NC
58542002-09-02 Nick Clifton <nickc@redhat.com>
5855
5856 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5857 names instead of cryptically overloaded bfd_reloc error
5858 codes.
5859 (v850_elf_relocate_section): Likewise.
5860 (v850_elf_relax_section): Replace caching of external symbols
5861 with caching of internal symbols obtained from calling
5862 bfd_elf_get_elf_syms().
51020317 5863 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5864
3b77b1d5
AM
58652002-09-02 Alan Modra <amodra@bigpond.net.au>
5866
638524b5
AM
5867 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5868 (bfd_pj_arch): Use bfd_default_scan.
5869 * cpu-v850.c (scan): Remove.
5870 (N): Use bfd_default_scan.
5871 * cpu-z8k.c (scan_mach): Remove.
5872 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5873 first. Use bfd_default_scan.
5874
250d94fd
AM
5875 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5876 bfd_mach constants.
5877 (ecoff_get_magic): Likewise.
5878 * elf32-v850.c (v850_elf_object_p): Likewise.
5879 (v850_elf_final_write_processing): Likewise.
5880 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5881 (MY(write_object_contents)): Likewise.
5882 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5883 * coffcode.h (coff_write_object_contents): Likewise.
5884 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5885 Remove unnecessary "machine" assignments.
5886 (coff_write_relocs): Test for the absolute section sym by testing
5887 section and flags.
5888
3b77b1d5
AM
5889 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5890 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5891 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5892
e5b45b83
DA
58932002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5894
5895 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5896 * bfd-in2.h (align_power): Likewise.
5897
37f45cf8
AM
58982002-08-30 Alan Modra <amodra@bigpond.net.au>
5899
5900 * Makefile.am: Run "make dep-am".
5901 * Makefile.in: Regenerate.
5902
5903 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5904 * cpu-powerpc.c (powerpc_compatible): Likewise.
5905 * cpu-rs6000.c (rs6000_compatible): Likewise.
5906
86aba9db
NC
59072002-08-28 Catherine Moore <clm@redhat.com>
5908
9b5ecbd0 5909 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5910 (v850-elf-reloc): Don't resolve pc relative relocs.
5911 (v850_elf_ignore_reloc): New routine.
5912 (v850_elf_final_link_relocate): Handle new relocs.
5913 (v850_elf_relax_delete_bytes ): New routine.
5914 (v850_elf_relax_section): New routine.
5915 (bfd_elf32_bfd_relax_section): Define.
5916 (HOWTO): New entries for new relocs.
5917 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5918 (BFD_RELOC_V850_LONGJUMP): New reloc.
5919 (BFD_RELOC_V850_ALIGN): New reloc.
5920 * archures.c: Remove redundant v850ea architecture.
5921 * cpu-v850.c: Remove redundant v850ea support.
5922 * libbfd.h: Regenerate.
5923 * bfd-in2.h: Regenerated.
5924
026df7c5
NC
59252002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5926
5927 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5928 * configure.in: Add tic4x_coff vector files.
5929 * configure: Regenerate.
5930 * Makefile.am: Add tic4x target.
5931 * Makefile.in: Regenerate.
5932
59332002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5934
5935 * archures.c: Add the BFD arch type tic4x.
5936 * bfd-in.h: Add BFD_IN_MEMORY flag.
5937 * coff-tic4x.c: New file.
5938 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5939 * cpu-tic4x.c: New file.
5940 * targets.c: Added tic4x- in list of xvecs.
5941 * ticoff.h: New file.
5942 * bfd-in2.h: Regenerate.
5943
88f7bcd5
NC
59442002-08-27 Adam Nemet <anemet@lnxw.com>
5945
5946 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5947 bit of DT_INIT and DT_FINI for Thumb functions.
5948
c8e48751
AM
59492002-08-26 Alan Modra <amodra@bigpond.net.au>
5950
5951 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5952
2846975a
AM
59532002-08-26 Alan Modra <amodra@bigpond.net.au>
5954
5955 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5956
067653c5
AM
59572002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5958
5959 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5960 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5961 Likewise.
5962 (struct elf_sh_pcrel_relocs_copied): Removed.
5963 (struct elf_sh_dyn_relocs): New.
5964 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5965 field with dyn_relocs.
5966 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5967 sections and sym_sec.
5968 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5969 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5970 (sh_elf_create_dynamic_sections): Use create_got_section instead
5971 of _bfd_elf_create_got_section.
5972 (sh_elf_check_relocs): Likewise.
5973 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5974 sections.
5975 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5976 sh_elf_relocate_section, sh_elf_check_relocs,
5977 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5978 Likewise.
5979 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5980 dynamic relocations and avoiding the copy relocation when we
5981 didn't find any dynamic relocations in the section which has
5982 contents or is read-only.
5983 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5984 (sh_elf_size_dynamic_sections): Don't reset the size of
5985 .rela.got section even if dynamic_sections_created flag is off.
5986 Don't use sh_elf_discard_copies. Scan all input bfd and use
5987 allocate_dynrelocs. Call readonly_dynrelocs to determine
5988 whether we need DT_TEXTREL.
5989 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5990 whether the symbol was never referred to.
5991 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5992 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5993 (sh_elf_check_relocs): Call create_got_section if the short-cut
5994 to .got is null. Increment reference counters only instead of
5995 allocating space on dynamic sections here. Don't conditionalize
5996 uninitialized got.offset value when marking the symbol as a
5997 global offset table entry. Keep relocations for symbols satisfied
5998 by a dynamic library to avoid copy relocations for the symbol.
5999 Set dynobj field of an elf hash table if needed.
6000 (sh_elf_finish_dynamic_sections): Handle null section pointer
6001 correctly.
6002 (elf_backend_copy_indirect_symbol): Defined.
6003 (elf_backend_can_refcount): Defined.
6004
7e326afc
NC
60052002-08-23 Nick Clifton <nickc@redhat.com>
6006
6007 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6008 previous change. Add comment explaining why.
6009
c8614e8e
AM
60102002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6011
6012 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6013 contents of .got.plt[2] to tr0, not address of .got.plt.
6014 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6015 patching absolute plt entry. For shmedia plt entry, set bottom bit
6016 of branch to plt0 as this is a branch to an shmedia instruction.
6017 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6018 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6019 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6020 branch to plt0.
6021 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6022 patching absolute plt entry. For shmedia plt entry, branch to
6023 plt0 is now ptrel, so use relative offset. Set bottom bit of
6024 branch target as it is a branch to an shmedia instruction.
6025
3b587c71
AM
60262002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6027 Richard Shann <richard.shann@superh.com>
6028
6029 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6030 value if .init is an SHmedia function. Similarly for DT_FINI.
6031 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 6032
957dcaa8
AM
60332002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6034
3b587c71 6035 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 6036 dynamic section.
3b587c71 6037 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 6038
a4263c47
NC
60392002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6040
6041 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 6042 byte read when reading the return address register column.
a4263c47 6043
db4ed121
NC
60442002-08-22 Nick Clifton <nickc@redhat.com>
6045
6046 * config.bfd: Add powepc64-*-*bsd* target.
6047
ed71e111
NC
60482002-08-22 Graeme Peterson <gp@qnx.com>
6049
6050 * Makefile.am: Add entries for elf32-shqnx.c
6051 * Makefile.in: Regenerate.
6052 * config.bfd: Add support sh-*-nto* target.
6053 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6054 * configure: Regenerate.
6055 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6056 * elf32-sh.c: Do not include elf32-target.h if
6057 ELF32_SH_C_INCLUDED is defined.
6058 * elf32-shqnx.c: New file: Support for QNX.
6059 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6060
0ab72ee2
NC
60612002-08-22 Nick Clifton <nickc@redhat.com>
6062
75c83283
NC
6063 * po/tr.po: Updated Turkish translation.
6064
0ab72ee2
NC
6065 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6066 symbols are not read.
6067
56780f18
AM
60682002-08-22 Alan Modra <amodra@bigpond.net.au>
6069
6070 * elf32-m68hc11.c: Formatting fixes.
6071 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6072 * elf32-m68hc12.c: Formatting fixes.
6073 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6074
b48fa14c
AM
60752002-08-22 Alan Modra <amodra@bigpond.net.au>
6076
a7c71b0c
AM
6077 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6078 SEC_DATA.
6079 (pmac_xcoff_vec): Likewise.
6080 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6081 (aix5coff64_vec): Likewise.
6082
56780f18
AM
60832002-08-22 Alan Modra <amodra@bigpond.net.au>
6084
b48fa14c
AM
6085 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6086 param to elf_backend_copy_indirect_symbol.
6087 (_bfd_elf_link_hash_copy_indirect): Likewise.
6088 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6089 calls to copy_indirect_symbol.
6090 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6091 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6092 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6093 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6094 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6095 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6096 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6097 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6098 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6099 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6100 test refcounts for "used" values.
6101
8c2ab17d
AM
61022002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6103
6104 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6105 argument declaration.
6106
d62b1198 61072002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
6108
6109 * archures.c (bfd_mach_ppc_e500): Added.
6110 * bfd-in2.h: Rebuilt.
d62b1198
EZ
6111 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6112
9f88ba09
AM
61132002-08-19 Alan Modra <amodra@bigpond.net.au>
6114
6115 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6116
df622259
AC
61172002-08-17 Andrew Cagney <ac131313@redhat.com>
6118
6119 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6120 `bfd_byte'.
df622259 6121
44c410de
SC
61222002-08-17 Stan Cox <scox@redhat.com>
6123
6124 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6125 IRIX 6 segment layout for NEWABI.
6126
4972a8e9
SC
61272002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6128
1049f94e 6129 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6130 symbols when looking for section referred to by a relocation.
1049f94e 6131 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6132
c5cd6d62
AM
61332002-08-15 Alan Modra <amodra@bigpond.net.au>
6134
6135 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6136
0741c7be
HPN
61372002-08-15 Hans-Peter Nilsson <hp@axis.com>
6138
6139 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6140 missing check for whether the symbol is referenced by DSO before
6141 unexporting it as an unneeded dynamic symbol.
6142
e8d5d179
L
61432002-08-14 H.J. Lu <hjl@gnu.org>
6144
6145 * libbfd.h: Regenerate.
6146
e9229007
L
61472002-08-14 H.J. Lu <hjl@gnu.org>
6148
6149 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6150
1fd03b5a
SC
61512002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6152
6153 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6154 instructions.
6155 (m68hc11_direct_relax): New to define table of relaxable instructions.
6156 (find_relaxable_insn): New, find a relaxable insn.
6157 (compare_reloc): New to compare two relocs.
6158 (m68hc11_elf_relax_section): New, relax text sections.
6159 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6160 (elf32_m68hc11_check_relocs): New function for GC support.
6161 (elf32_m68hc11_relocate_section): New function for GC support.
6162 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6163 (elf_backend_check_relocs): Likewise.
6164 (elf_backend_relocate_section): Likewise.
6165
c828c771
L
61662002-08-13 H.J. Lu <hjl@gnu.org>
6167
6168 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6169 definitions in shared objects when checking symbol with
6170 undefined version.
6171
9b701e44
SC
61722002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6173
6174 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6175 (elf32_m68hc11_gc_sweep_hook): Likewise.
6176 (elf_backend_gc_mark_hook): Define for GC section support.
6177 (elf_backend_gc_sweep_hook): Likewise.
6178 (elf_backend_can_gc_sections): Likewise.
6179
6180 * elf32-m68hc12.c: Likewise.
6181
96405e3c
SC
61822002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6183
6184 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6185 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6186 (_bfd_m68hc11_elf_set_private_flags): New function.
6187 Use them to set/check/print ELF flags specific to 68HC11.
6188
6189 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6190 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6191 (_bfd_m68hc12_elf_set_private_flags): New function.
6192 Use them to set/check/print ELF flags specific to 68HC12.
6193
dae78fb0
SC
61942002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6195
6196 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6197 fix masks for PC-rel relocs.
6198 (m68hc11_elf_ignore_reloc): New function.
6199
6200 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6201 68HC12 banked addressing relocs.
6202 (m68hc12_phys_addr): New to compute physical address of banked memory.
6203 (m68hc12_phys_page): Likewise for page.
6204 (m68hc12_addr_is_banked): New to see if address is in banked area.
6205 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6206
3dbfec86
SC
62072002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6208
6209 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6210 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6211 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6212 * bfd-in2.h: Regenerate.
6213
871da94f
L
62142002-08-12 H.J. Lu <hjl@gnu.org>
6215
6216 * elflink.h (elf_add_default_symbol): Preserve section across
6217 elf_merge_symbol.
6218
59bc061d
NC
62192002-08-09 Graeme Peterson <gp@qnx.com>
6220
51020317 6221 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6222 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6223 * Makefile.in: Regenerate.
6224 * config.bfd: Add support for powerpc{le}-*-nto targets.
6225 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6226 * configure: Regenerate.
6227 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6228 common file "elf32-qnx.h", and now include that file.
6229 * elf32-qnx.h: New file: QNX specific common elf backend.
6230 * elf32-ppc.c: Do not include elf32-target.h if
6231 ELF32_PPC_C_INCLUDED is defined.
6232 * elf32-ppcqnx.c: New file: Support for QNX.
6233 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6234 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6235
2b692c59
NC
62362002-08-09 Nick Clifton <nickc@redhat.com>
6237
6238 * po/sv.po: Updated Swedish translation.
6239
d0c7ff07
TS
62402002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6241
6242 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6243 g->global_gotsym is NULL.
6244
d8bbe778
L
62452002-08-08 H.J. Lu <hjl@gnu.org>
6246
c5cd6d62 6247 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6248 overrides an indirect versioned symbol.
6249
c366c25e
JJ
62502002-08-08 Jakub Jelinek <jakub@redhat.com>
6251
6252 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6253 for R_386_TLS_TPOFF32 relocs against symndx 0.
6254
31941635
L
62552002-08-07 H.J. Lu <hjl@gnu.org>
6256
6257 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6258 with undefined version if needed.
6259 (elf_link_assign_sym_version): Match a default symbol with a
6260 version without definition. No need to hide the default
6261 definition separately.
6262
0f3bd64f
AM
62632002-08-08 Alan Modra <amodra@bigpond.net.au>
6264
7330fb86
AM
6265 * elflink.h (elf_link_output_extsym): Don't output symbols from
6266 SEC_EXCLUDE sections.
6267
0f3bd64f
AM
6268 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6269
a4aa0fb7
AM
62702002-08-07 Alan Modra <amodra@bigpond.net.au>
6271
6272 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6273 entries.
6274
34ea4a36
TS
62752002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6276
6277 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6278 mismatch.
6279
141ff970
TS
62802002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6281
6282 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6283
28458e7e
TS
62842002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6285
6286 * elf32-mips.c (mips_reloc_map): Fix typo.
6287
0121a3da
AM
62882002-08-06 Alan Modra <amodra@bigpond.net.au>
6289
6290 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6291
d006db6c
AM
62922002-08-06 Alan Modra <amodra@bigpond.net.au>
6293
6294 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6295
8ea80f08
AM
62962002-08-06 Alan Modra <amodra@bigpond.net.au>
6297
2a52da53
AM
6298 * libxcoff.h: Use PARAMS on function declarations.
6299 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6300 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6301
8ea80f08
AM
6302 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6303 addend.
6304 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6305
cf9ab45b
AM
63062002-08-06 Alan Modra <amodra@bigpond.net.au>
6307
6308 * coff-rs6000.c: Formatting fixes.
6309 (xcoff_calculate_relocation): Use PARAMS in declaration.
6310 (xcoff_complain_overflow): Likewise.
6311 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6312 (bfd_xcoff_backend_data): Remove useless comments.
6313 (rs6000coff_vec): Likewise.
6314 (bfd_pmac_xcoff_backend_data): Likewise.
6315 (pmac_xcoff_vec): Likewise.
8ea80f08 6316
cf9ab45b
AM
6317 * coff64-rs6000.c: Formatting fixes.
6318 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6319 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6320 (bfd_xcoff_backend_data): Remove useless comments.
6321 (rs6000coff64_vec): Likewise.
6322 (bfd_xcoff_aix5_backend_data): Likewise.
6323 (aix5coff64_vec): Likewise.
6324
48bfecdd
AM
63252002-08-06 Alan Modra <amodra@bigpond.net.au>
6326
a78eab4e
AM
6327 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6328 mask entries. Use complain_overflow_dont for R_REF.
6329 (xcoff_reloc_type_ba): Revert last change.
6330 (xcoff_reloc_type_br): Likewise.
6331 (xcoff_reloc_type_crel): Likewise.
6332 (xcoff_ppc_relocate_section): Likewise.
6333 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6334 (xcoff64_ppc_relocate_section): Likewise.
6335 (xcoff64_howto_table): Revert some of last change to mask entries.
6336 Use complain_overflow_dont for R_REF.
6337
48bfecdd
AM
6338 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6339 relocs with bitsize == 16 have size = 1.
6340 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6341 (xcoff_reloc_type_br): Likewise.
6342 (xcoff_reloc_type_crel): Likewise.
6343 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6344 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6345 dst_mask adjustment.
6346 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6347 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6348 bitsize == 16 have size = 1.
6349
fd13ed0c
DC
63502002-08-01 Denis Chertykov <denisc@overta.ru>
6351
6352 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6353 (struct misc): New field isymbuf. All free_* fields removed.
6354 (symbol_value): Pass in internal syms. No need to swap syms in.
6355 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6356 possibly cached info.
6357 (tidyup_after_error): Removed.
6358 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6359 misc. Use new field.
6360 (adjust_all_relocations): Use internal syms. No need to swap syms
6361 in and out.
6362 (add_page_insn): Don't use removed fields of struct misc.
6363
24a1ba0f
NC
63642002-08-01 Nick Clifton <nickc@redhat.com>
6365
6366 * elf32-arm.h: Revert previous delta.
6367
a6903459
NC
63682002-08-01 Nick Clifton <nickc@redhat.com>
6369
6370 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6371 * configure: Regenerate.
6372
39a2a3eb
L
63732002-07-31 H.J. Lu <hjl@gnu.org>
6374
6375 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6376 selected.
6377
a0dfa6a8
L
63782002-07-31 H.J. Lu <hjl@gnu.org>
6379
6380 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6381 is selected.
6382
cd67d266
JJ
63832002-07-31 Jakub Jelinek <jakub@redhat.com>
6384
6385 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6386 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6387
4eb6b71c
NC
63882002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6389
6390 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6391 There is no 8 byte relocation type for this architecture.
6392 (do_ns32k_reloc): Use bfd_vma instead of native types.
6393 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6394 returns void.
6395 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6396 rely on generic code to do that.
6397 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6398 to all table entries.
6399 (_bfd_ns32k_relocate_contents): put_data returns void.
6400 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6401 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6402 return void.
6403
f7c33884
NC
64042002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6405
6406 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6407 archive object is target dependant.
6408
8f64befb
NC
64092002-07-31 Adam Nemet <anemet@lnxw.com>
6410
6411 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6412 (THUMB_PLT_ENTRY_SIZE): New macro.
6413 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6414 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6415 ARM_PLT_ENTRY_SIZE.
6416 (elf32_arm_plt_entry): Likewise.
6417 (elf_backend_plt_header_size): Likewise.
6418 (elf32_thumb_plt0_entry): New global.
6419 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6420 into .plt.thumb.
6421 (elf32_thumb_plt_entry): New global.
6422 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6423 Thumb entries. Set the bottom bit of the corresponding GOT entry
6424 for a Thumb PLT entry.
6425 (struct elf32_arm_plt_entry_info): New structure.
6426 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6427 type.
6428 (elf32_arm_link_hash_newfunc): Initialize new member.
6429 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6430 relocations against the PLT.
6431 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6432 first_rel_type if this is the first time we encounter the symbol.
6433 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6434 Determine if relocation needs a PLT entry. Set first_rel_type if
6435 this is the first time we encounter the symbol
6436 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6437 functions as well.
6438 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6439 (elf32_arm_create_dynamic_sections): New function. Create the
6440 .plt.thumb section.
6441 (elf_backend_create_dynamic_sections): Call it.
6442
47badb7b
NC
64432002-07-31 Nick Clifton <nickc@redhat.com>
6444
6445 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6446 'alternative' in order to avoid shadowing global symbol of the
6447 same name.
6448 * bfd-in2.h: Regenerate.
6449 * libbfd.h: Regenerate.
6450 * libcoff.h: Regenerate.
6451
8a397dad
TS
64522002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6453
6454 * Makefile.am: Add n32 ABI support.
6455 * Makefile.in: Regenerate.
6456 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6457 bit vectors for mips*-*-linux targets as optional.
6458 * configure.in: Add n32 ABI vectors.
6459 * configure: Regenerate.
6460 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6461 * elfn32-mips.c: New file, n32 ABI support.
6462 * targets.c: Add n32 ABI vectors.
6463
7e392df6 64642002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6465
7e392df6
NC
6466 * elfarmqnx-nabi.c: New file: Support for QNX.
6467 * config.bfd: Add support for arm-*-nto target.
6468 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6469 * configure: Regenerate.
6470 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6471 * Makefile.in: Regenerate.
6472 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6473 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6474 * elfarm-nabi.c: Do not include elf32-arm.h if
6475 ELFARM_NABI_C_INCLUDED is defined.
6476 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6477
7e392df6 64782002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6479
83e1617e
NC
6480 * po/sv.po: Updated Swedish translation.
6481
704afa60
JJ
64822002-07-30 Jakub Jelinek <jakub@redhat.com>
6483
6484 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6485
487e54f2
AM
64862002-07-30 Alan Modra <amodra@bigpond.net.au>
6487
6488 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6489 * archive.c (bfd_generic_archive_p): Likewise.
6490 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6491 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6492 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6493 (xcoff64_archive_p): Likewise.
6494 (xcoff64_openr_next_archived_file): Likewise.
6495 (xcoff64_archive_p): Clean up tdata properly on error.
6496 * coffgen.c (coff_real_object_p): Likewise.
6497 (coff_object_p): Release filehdr and opthdr.
6498 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6499 * ieee.c (ieee_archive_p): Likewise.
6500 * ihex.c (ihex_object_p): Likewise.
6501 (ihex_mkobject): Always allocate tdata.
6502 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6503 * srec.c (srec_mkobject): Always allocate tdata.
6504 (srec_object_p): Clean up tdata properly on error.
6505 (symbolsrec_object_p): Likewise.
6506 * versados.c (versados_object_p): Likewise.
6507 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6508 and bfd_realloc instead of realloc.
6509 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6510 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6511 place of bfd_malloc, simplifying error freeing. Free hash table too.
6512 (vms_object_p): Clean up tdata on error.
6513 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6514 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6515
9d46020e
AM
65162002-07-30 Alan Modra <amodra@bigpond.net.au>
6517
6518 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6519
fb39dac1
RS
65202002-07-26 Chris Demetriou <cgd@broadcom.com>
6521
6522 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6523 flags into resulting BFD.
6524
7a624474
AM
65252002-07-26 Alan Modra <amodra@bigpond.net.au>
6526
6527 From John Reiser <jreiser@BitWagon.com>
6528 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6529 tls_ldm_got.refcount.
6530
a4382ec6
TS
65312002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6532
6533 * elf64-mips.c: Update TODO comment.
6534 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6535 mips_elf64_gprel16_reloca): Remove prototypes.
6536 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6537 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6538 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6539 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6540 R_MIPS_HIGHEST.
6541 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6542 R_MIPS_GOT16. Remove wrong comments.
6543 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6544 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6545 from elf32-mips.c.
6546 (mips_elf64_hi16_reloc): Fix formatting.
6547 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6548 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6549 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6550 (mips_elf64_gprel16_reloc): Make static. Add check for
6551 partial_inplace.
6552 (mips_elf64_gprel16_reloca): Remove.
6553 (mips_elf64_literal_reloc): New function.
6554 (mips_elf64_gprel32_reloc): Fix formatting.
6555 (mips_elf64_shift6_reloc): Fix comment. Make static.
6556 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6557 elf32-mips.c.
6558 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6559 elf32-mips.c
6560 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6561 specific relocations.
6562 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6563 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6564 (ELF_MAXPAGESIZE): Add comment.
6565
219576a4
NC
65662002-07-25 Nick Clifton <nickc@redhat.com>
6567
6568 * po/sv.po: Updated Swedish translation.
6569 * po/es.po: Updated Spanish translation.
6570 * po/fr.po: Updated French translation.
6571
8c58d23b
AM
65722002-07-25 Alan Modra <amodra@bigpond.net.au>
6573
6574 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6575 as elf_link_record_local_dynamic_symbol.
6576 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6577 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6578 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6579 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6580 attempt is made to record a symbol in a discarded section, and
6581 return `2' in that case.
6582
ff3063f5
NC
65832002-07-24 Nick Clifton <nickc@redhat.com>
6584
6585 * po/sv.po: Updated Swedish translation.
6586 * po/es.po: Updated Spanish translation.
6587
f0fe0e16
AM
65882002-07-23 Alan Modra <amodra@bigpond.net.au>
6589
c1fb5f8a
AM
6590 * po/SRC-POTFILES.in: Regenerate.
6591
f0fe0e16
AM
6592 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6593 immediately. Remove code handling relocatable linking.
6594 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6595 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6596 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6597 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6598 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6599 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6600 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6601 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6602 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6603 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6604 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6605 * elf32-avr.c (elf_backend_rela_normal): Define.
6606 * elf32-cris.c: Likewise.
6607 * elf32-fr30.c: Likewise.
de2d743e 6608 * elf32-frv.c: Likewise.
f0fe0e16
AM
6609 * elf32-h8300.c: Likewise.
6610 * elf32-hppa.c: Likewise.
6611 * elf32-ip2k.c: Likewise.
6612 * elf32-sparc.c: Likewise.
6613 * elf32-v850.c: Likewise.
6614 * elf32-vax.c: Likewise.
6615 * elf64-hppa.c: Likewise.
6616 * elf64-sparc.c: Likewise.
6617 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6618 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6619 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6620 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6621 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6622 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6623 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6624 * elf-m10200.c (USE_RELA): Don't define.
6625 * elf-m10300.c: Likewise.
de2d743e 6626 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6627 * elf32-i370.c: Likewise.
6628 * elf32-ip2k.c: Likewise.
6629 * elf32-m68k.c: Likewise.
6630 * elf32-mcore.c: Likewise.
6631 * elf32-ppc.c: Likewise.
6632 * elf32-s390.c: Likewise.
6633 * elf32-vax.c: Likewise.
6634 * elf64-ppc.c: Likewise.
6635 * elf64-s390.c: Likewise.
6636 * elf64-x86-64.c: Likewise.
6637 * elfxx-ia64.c: Likewise.
6638 * elf32-avr.c (USE_REL): Don't undef.
6639 * elf32-ip2k.c: Likewise.
6640
5e8d7549
NC
66412002-07-23 Nick Clifton <nickc@redhat.com>
6642
6643 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6644 'want_p_paddr_set_to_zero'.
6645 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6646 to false;
6647 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6648 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6649
9e12c7db
NC
66502002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6651
6652 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6653 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6654 show the Copyright string.
6655 Minor formatting tidy ups.
6656
0461a601
NC
66572002-07-23 Nick Clifton <nickc@redhat.com>
6658
ff3063f5
NC
6659 * po/fr.po: Updated French translation.
6660 * po/sv.po: Updated Swedish translation.
0461a601 6661
fad2542d
AM
66622002-07-23 Alan Modra <amodra@bigpond.net.au>
6663
6664 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6665 when outputting relocs.
6666
c0647bfc
JT
66672002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6668
6669 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6670 DT_PLTGOT into the dynamic section if there is a PLT.
6671
d01414a5
TS
66722002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6673
6674 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6675 elf32-mips.c.
6676 (_bfd_mips_elf_write_section): Likewise.
6677 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6678 (_bfd_mips_elf_write_section): Likewise.
6679 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6680 (elf32_mips_write_section): Likewise.
6681 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6682 (_bfd_mips_elf_write_section): Likewise.
6683
40c97fc6
AM
66842002-07-19 Alan Modra <amodra@bigpond.net.au>
6685
6686 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6687 PT_IA_64_UNWIND segments for a given section.
6688
58378160
L
66892002-07-17 H.J. Lu <hjl@gnu.org>
6690
6691 * Makefile.am: Fix a typo.
6692 * Makefile.in: Regenerate.
6693
cf88bb9f
NC
66942002-07-15 Denis Chertykov <denisc@overta.ru>
6695 Frank Ch. Eigler <fche@redhat.com>
6696 Ben Elliston <bje@redhat.com>
6697 Alan Lehotsky <alehotsky@cygnus.com>
6698 John Healy <jhealy@redhat.com>
6699 Graham Stott <grahams@redhat.com>
6700 Jeff Johnston <jjohnstn@redhat.com>
6701
6702 * Makefile.am: Add support for ip2k.
6703 * Makefile.in: Regenerate.
6704 * doc/Makefile.in: Regenerate.
6705 * archures.c: Add support for ip2k.
6706 * config.bfd: Add support for ip2k.
6707 * configure.in: Add support for ip2k.
6708 * configure: Regenerate.
6709 * reloc.c: Add support for ip2k.
6710 * targets.c: Add support for ip2k.
6711 * bfd-in2.h: Regenerate.
6712 * libbfd.h: Regenerate.
6713 * cpu-ip2k.c: New file.
6714 * elf32-ip2k.c: New file.
6715
0dafd5f6
RE
67162002-07-17 Ian Rickards <irickard@arm.com>
6717
40c97fc6 6718 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6719 just return the filename.
6720
36b08f12
AM
67212002-07-16 Moritz Jodeit <moritz@jodeit.org>
6722
6723 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6724
58821868
AM
67252002-07-16 Alan Modra <amodra@bigpond.net.au>
6726
6727 * elflink.h: Formatting fixes, tidy prototypes.
6728 (elf_link_assign_sym_version): Move common code out of loop.
6729
c89583f8
AM
67302002-07-16 Alan Modra <amodra@bigpond.net.au>
6731
6732 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6733 reloc section size is zero. Correct reloc output location.
6734
ba94744e
AM
67352002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6736
6737 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6738 the final type for the e_fsel selector when generating PA2.0W code.
6739 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6740 relocations.
6741
96a94295
L
67422002-07-14 H.J. Lu <hjl@gnu.org>
6743
6744 * elflink.h (elf_link_assign_sym_version): Hide the default
6745 definition if there is a hidden versioned definition.
6746
6849c52f
HPN
67472002-07-12 Hans-Peter Nilsson <hp@axis.com>
6748
6749 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6750 dynamic reference test in assertion when initializing GOT with
6751 static contents. Just assert that there are either no dynamic
6752 sections, the symbol is defined in the regular objects or that the
6753 symbol is undef weak. Tweak comment.
6754 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6755 only if the symbol isn't defined in the program and isn't undef
6756 weak.
6757 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6758 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6759 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6760 (elf_cris_discard_excess_program_dynamics): Don't consider
6761 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6762
239e1f3a
AM
67632002-07-11 Alan Modra <amodra@bigpond.net.au>
6764
6765 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6766 unresolved debugging relocs in dynamic applications.
6767 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6768 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6769 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6770 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6771 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6772 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6773
2f6d9989
AM
67742002-07-10 Alan Modra <amodra@bigpond.net.au>
6775
f5e87a1d
AM
6776 * elf64-ppc.c (ONES): Define.
6777 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6778 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6779 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6780
2f6d9989
AM
6781 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6782 (ppc64_elf_set_private_flags): Delete.
6783 (ppc64_elf_section_from_shdr): Delete.
6784 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6785 (ppc64_elf_fake_sections): Delete.
6786 (bfd_elf64_bfd_set_private_flags): Don't define.
6787 (bfd_elf64_get_symbol_info): Likewise.
6788 (elf_backend_section_from_shdr): Likewise.
6789 (elf_backend_fake_sections): Likewise.
6790
0594c12d
AM
67912002-07-10 Marco Walther <Marco.Walther@sun.com>
6792
6793 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6794 when not already set.
6795 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6796 (elf_backend_fake_sections): Define.
6797
699cb9b8
AM
67982002-07-10 Alan Modra <amodra@bigpond.net.au>
6799
6800 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6801 Formatting.
6802 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6803
0a4787a0
HPN
68042002-07-09 Hans-Peter Nilsson <hp@axis.com>
6805
6806 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6807 NULL sym_hashes to just before use.
6808 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6809 symbol with non-default visibility.
6810 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6811 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6812 Ditto.
6813 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6814 symbol with non-default visibility.
6815 (cris_elf_check_relocs): At tests for local symbol before
6816 increasing h->plt.refcount, also check for non-default
6817 visibility. Ditto when checking for local symbol to eliminate
6818 pc-relative runtime relocs.
6819
aecc8f8a
AM
68202002-07-08 Alan Modra <amodra@bigpond.net.au>
6821
6822 * elf.c: Formatting.
6823 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6824 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6825 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6826 segments.
6827
e9168c1e
MM
68282002-07-07 Mark Mitchell <mark@codesourcery.com>
6829 Alan Modra <amodra@bigpond.net.au>
6830
6831 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6832 account the impact of relocation count overflow when computing
6833 section offsets.
6834 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6835 or not to apply the PE COFF reloc overflow handling. Fix a
6836 fencepost error in deciding whether or not to use that technique.
6837
6cdc0ccc
AM
68382002-07-07 Alan Modra <amodra@bigpond.net.au>
6839
6840 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6841 change type of locsyms.
6842 (bfd_elf_get_elf_syms): Declare.
6843 * elf.c (bfd_elf_get_elf_syms): New function.
6844 (group_signature): Use bfd_elf_get_elf_syms.
6845 (bfd_section_from_r_symndx): Likewise.
6846 * elfcode.h (elf_slurp_symbol_table): Likewise.
6847 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6848 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6849 locality of various data structures. Properly free internal relocs.
6850 (elf_bfd_final_link): Properly free internal relocs.
6851 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6852 (elf_link_input_bfd): Likewise.
6853 (elf_gc_mark): Likewise. Properly free internal relocs.
6854 (elf_gc_sweep): Properly free internal relocs.
6855 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6856 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6857 internal relocs.
6858 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6859 Properly free possibly cached info.
6860 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6861 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6862 symbol swapping code.
6863 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6864 Properly free possibly cached info.
6865 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6866 (mn10300_elf_relax_delete_bytes): Likewise.
6867 (mn10300_elf_symbol_address_p): Likewise.
6868 (mn10300_elf_get_relocated_section_contents): Likewise.
6869 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6870 (elf32_h8_relax_delete_bytes): Likewise.
6871 (elf32_h8_symbol_address_p): Likewise.
6872 (elf32_h8_get_relocated_section_contents): Likewise.
6873 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6874 (m32r_elf_relax_delete_bytes): Likewise.
6875 (m32r_elf_get_relocated_section_contents): Likewise.
6876 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6877 elf_section_data to determine whether cached.
6878 (sh_elf_relax_section): As above for elf-m10200.c.
6879 (sh_elf_relax_delete_bytes): Likewise.
6880 (sh_elf_get_relocated_section_contents): Likewise.
6881 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6882 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6883 reading of local syms.
6884 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6885 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6886 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6887 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6888 relocs.
6889 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6890 free internal relocs and section contents. Don't read symbols.
6891 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6892 (elf32_hppa_size_stubs): Don't free local syms.
6893 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6894 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6895 possibly cached info.
6896 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6897 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6898 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6899 all_local_syms.
6900 (get_local_syms): Delete function.
6901 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6902 on exit.
6903 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6904
b3212001
JW
69052002-07-05 Jim Wilson <wilson@redhat.com>
6906
6907 * syms.c (decode_section_type): New.
6908 (bfd_decode_symclass): Call decode_section_type.
6909
894bb1ee
JJ
69102002-07-04 Jakub Jelinek <jakub@redhat.com>
6911
6912 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6913 section content start.
6914 Reported by Michael Schumacher <mike@hightec-rt.com>.
6915
bc0ba537
AM
69162002-07-04 Alan Modra <amodra@bigpond.net.au>
6917
9b5ecbd0 6918 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
6919 link order code. Don't actually remove the output section here;
6920 Just set a flag for the linker to do so.
6921 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6922 sections when setting up output section dynsyms.
6923
797fc050
AM
69242002-07-04 Alan Modra <amodra@bigpond.net.au>
6925
6926 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6927 fudge.
6928 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6929 libs here instead.
6930
99881371
MS
69312002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6932
6933 * elf64-s390.c (create_got_section): Set .got section alignment to
6934 8 bytes.
6935 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6936
47d9a591
AM
69372002-07-02 Alan Modra <amodra@bigpond.net.au>
6938
6939 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6940
179d3252
JT
69412002-07-01 Matt Thomas <matt@3am-software.com>
6942
6943 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6944 to EF_VAX_*.
6945
4a14403c
TS
69462002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6947
6948 * elfxx-mips.c (ABI_64_P): Fix comment.
6949 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6950 new section names for N64 ABI.
6951 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6952 (mips_elf_calculate_relocation): Code formatting.
6953 (mips_elf_create_dynamic_relocation): Likewise.
6954 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6955 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6956 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6957 in any NewABI.
6958 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6959 for NewABI.
6960 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6961 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6962 here, too.
6963
607c0e09
AS
69642002-07-01 Andreas Schwab <schwab@suse.de>
6965
6966 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6967 R_X86_64_64 to R_X86_64_RELATIVE.
6968
ba26fd96
AM
69692002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6970
6971 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6972 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6973 Run "make dep-am".
6974 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6975 host_aout_vec.
6976 * configure.in (vaxbsd_vec): Add.
6977 * targets.c (vaxbsd_vec): Add.
6978 * Makefile.in: Rebuild.
6979 * configure: Rebuild.
6980 * po/SRC-POTFILES.in: Rebuild.
6981
1e2f5b6e
AM
69822002-07-01 Alan Modra <amodra@bigpond.net.au>
6983
6984 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6985 examining to gc_mark_hook, rather than the bfd.
6986 (elf_gc_sections): Adjust.
6987 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6988 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6989 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6990 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6991 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6992 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6993 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6994 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6995 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6996 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6997 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6998 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6999 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7000 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7001 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7002 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7003 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7004 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7005 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7006 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7007 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7008 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7009 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7010 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7011 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7012 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7013 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7014 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7015 redundant local sym tests.
7016 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7017 (link_hash_newfunc): Init is_entry.
7018 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7019 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7020 (create_linkage_sections): Use bfd_make_section_anyway rather than
7021 bfd_make_section.
7022 (ppc64_elf_mark_entry_syms): New function.
7023 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7024 up opd entry to function section map.
7025 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7026 relocs that reference the opd section.
7027 (edit_opd): New function.
7028 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7029 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7030 (get_local_syms): Do so here. Exit if we already have local syms.
7031 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7032 read local syms on non-ELF input.
7033 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7034 than duplicating it's function here. Adjust free of internal
7035 relocs to suit.
7036 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7037 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7038 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7039 _bfd_elf32_link_read_relocs rather than duplicating it's function
7040 here. Adjust free of internal relocs to suit.
7041
1b71fb54
AJ
70422002-07-01 Andreas Jaeger <aj@suse.de>
7043
7044 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7045 are not allowed in shared libs code, enforce -fPIC.
7046
8d28f606
HPN
70472002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7048
7049 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7050 trailing zero-sequences when there's previous left-over data.
7051
5ac81c74
JL
70522002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7053
7054 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7055 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7056 and opd_rel_sec in order for starting rela section. Check _raw_size.
7057 (elf_backend_reloc_type_class): Define.
7058
91a4d569
AM
70592002-06-27 Kevin Buettner <kevinb@redhat.com>
7060
7061 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7062 DWARF2 formats.
7063
feee612b
AM
70642002-06-27 Alan Modra <amodra@bigpond.net.au>
7065
7066 * cpu-powerpc.c: Comment on ordering of arch_info.
7067 * elf32-ppc.c (ppc_elf_object_p): New function.
7068 (elf_backend_object_p): Define.
7069 * elf64-ppc.c (ppc64_elf_object_p): New function.
7070 (elf_backend_object_p): Define.
7071
a4e6cefc
JT
70722002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7073
7074 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7075 * configure: Regenerate.
7076
dae2dd0d
NC
70772002-06-25 Jason Eckhardt <jle@rice.edu>
7078
7079 * dwarf2.c (decode_line_info): Check unit->addr_size
7080 to read in the proper number of prologue bytes.
7081
680f9d5c
NC
70822002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7083
7084 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7085 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
7086 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7087 been enabled.
dae2dd0d 7088
680f9d5c
NC
7089 * targets.c (_bfd_target_vector[]): Only include
7090 aix5coff64_vec if 64-bit bfd support has been enabled.
7091
d4c88bbb
AM
70922002-06-25 Alan Modra <amodra@bigpond.net.au>
7093
7094 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7095 * elf32-hppa.c (hppa_add_stub): Likewise.
7096 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7097 * elflink.h (elf_add_default_symbol): Fix comment typo.
7098 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7099 (elf_link_add_object_symbols): Likewise.
7100 (elf_link_assign_sym_version): Likewise.
7101 * hash.c (bfd_hash_lookup): Likewise.
7102 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7103 * section.c (bfd_get_unique_section_name): Likewise.
7104 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7105 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7106 (assign_section_numbers): Likewise.
7107 (_bfd_elfcore_make_pseudosection): Likewise.
7108 (elfcore_grok_lwpstatus): Likewise.
7109 (elfcore_grok_win32pstatus): Likewise.
7110 (elfcore_write_note): Constify input params. Use PTR instead of
7111 void *. Include terminating NUL in namesz. Correct padding.
7112 Support NULL "name" param. Use memcpy instead of strcpy.
7113 (elfcore_write_prpsinfo): Constify input params.
7114 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7115 (elfcore_write_lwpstatus): Likewise.
7116 (elfcore_write_pstatus): Likewise.
7117 (elfcore_write_prfpreg): Likewise.
7118 (elfcore_write_prxfpreg): Likewise.
7119 * elf-bfd.h (elfcore_write_note): Update declaration.
7120 (elfcore_write_prpsinfo): Likewise.
7121 (elfcore_write_prstatus): Likewise.
7122 (elfcore_write_pstatus): Likewise.
7123 (elfcore_write_prfpreg): Likewise.
7124 (elfcore_write_prxfpreg): Likewise.
7125 (elfcore_write_lwpstatus): Likewise.
7126
b0ac09d2
NC
71272002-06-25 Jason Eckhardt <jle@rice.edu>
7128
7129 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7130 symbols of type stProc and stStaticProc.
7131
71322002-06-25 Nick Clifton <nickc@redhat.com>
7133
7134 * ecoff.c: VArious formatting fixes.
7135
021d6096
AM
71362002-06-25 Alan Modra <amodra@bigpond.net.au>
7137
7138 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7139
82e51918
AM
71402002-06-25 Alan Modra <amodra@bigpond.net.au>
7141
7142 * aout-adobe.c: Don't compare against "true" or "false.
7143 * aout-target.h: Likewise.
7144 * aoutx.h: Likewise.
7145 * archive.c: Likewise.
7146 * bout.c: Likewise.
7147 * cache.c: Likewise.
7148 * coff-a29k.c: Likewise.
7149 * coff-alpha.c: Likewise.
7150 * coff-i386.c: Likewise.
7151 * coff-mips.c: Likewise.
7152 * coff-or32.c: Likewise.
7153 * coff64-rs6000.c: Likewise.
7154 * coffcode.h: Likewise.
7155 * coffgen.c: Likewise.
7156 * cpu-ns32k.c: Likewise.
7157 * ecoff.c: Likewise.
7158 * ecofflink.c: Likewise.
7159 * elf.c: Likewise.
7160 * elf32-arm.h: Likewise.
7161 * elf32-cris.c: Likewise.
7162 * elf32-d30v.c: Likewise.
7163 * elf32-i386.c: Likewise.
7164 * elf32-mcore.c: Likewise.
7165 * elf32-ppc.c: Likewise.
7166 * elf32-sh.c: Likewise.
7167 * elf32-sh64.c: Likewise.
7168 * elf32-v850.c: Likewise.
7169 * elf64-alpha.c: Likewise.
7170 * elf64-sh64.c: Likewise.
7171 * elfcode.h: Likewise.
7172 * elfcore.h: Likewise.
7173 * elflink.h: Likewise.
7174 * elfxx-mips.c: Likewise.
7175 * i386os9k.c: Likewise.
7176 * ieee.c: Likewise.
7177 * libbfd.c: Likewise.
7178 * linker.c: Likewise.
7179 * mmo.c: Likewise.
7180 * nlm32-alpha.c: Likewise.
7181 * nlm32-i386.c: Likewise.
7182 * nlm32-ppc.c: Likewise.
7183 * nlm32-sparc.c: Likewise.
7184 * nlmcode.h: Likewise.
7185 * oasys.c: Likewise.
7186 * pdp11.c: Likewise.
7187 * peicode.h: Likewise.
7188 * reloc.c: Likewise.
7189 * som.c: Likewise.
7190 * srec.c: Likewise.
7191 * tekhex.c: Likewise.
7192 * vms.c: Likewise.
7193 * xcofflink.c: Likewise.
7194 * elf64-sparc.c: Edit comment to not use "== false".
7195
7196 * aoutf1.h: Don't use "? true : false".
7197 * ecoff.c: Likewise.
7198 * format.c: Likewise.
7199 * ieee.c: Likewise.
7200 * linker.c: Likewise.
7201 * mmo.c: Likewise.
7202 * oasys.c: Likewise.
7203
48fc70a2
AM
72042002-06-23 H.J. Lu <hjl@gnu.org>
7205
7206 * elflink.h (elf_link_add_archive_symbols): For the default
7207 version, check references with only one `@' first.
7208
47b7c2db
AM
72092002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7210
7211 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7212 function.
9b5ecbd0 7213 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7214 symbol table.
7215 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7216 (elf64_hppa_size_dynamic_sections): Revise to use
7217 elf64_hppa_mark_milli_and_exported_functions.
7218 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7219 symbols out of dynamic symbol table.
7220
f5d44ba0
AM
72212002-06-23 Alan Modra <amodra@bigpond.net.au>
7222
bb3fff1e
AM
7223 * Makefile.in: Regenerate.
7224 * libbfd.h: Regenerate.
7225 * bfd-in2.h: Regenerate.
7226 * configure: Regenerate.
7227 * po/SRC-POTFILES.in: Regenerate.
7228
f5d44ba0
AM
7229 * elflink.h: Comment typo fixes.
7230
72312002-06-23 H.J. Lu <hjl@gnu.org>
7232
7233 * elf-bfd.h (elf_link_loaded_list): New structure.
7234 (elf_link_hash_table): Add "loaded".
7235 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7236 * elflink.h (elf_link_check_versioned_symbol): New function.
7237 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7238
cc36acdf
NC
72392002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7240
7241 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7242 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7243 nothing needed to be done, rather than false, indicating that the
7244 section's size could not be computed.
7245
4e5ba5b7
DB
72462002-06-18 Dave Brolley <brolley@redhat.com>
7247
7248 From Catherine Moore, Michael Meissner, Dave Brolley:
7249 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7250 * targets.c: Support bfd_elf32_frv_vec.
7251 * reloc.c: Add FRV relocs.
7252 * configure.in: Add support for bfd-elf32-frv-vec.
7253 * config.bfd (targ_cpu): Add support for frv-*-elf.
7254 * archures.c: Add frv arch and machines.
7255 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7256 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7257 (BFD32_BACKENDS): Add elf32-frv.lo.
7258 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7259 (cpu-frv.lo): New target.
7260 (elf32-frv.lo): New target.
7261 * cpu-frv.c: New file.
7262 * elf32-frv.c: New file.
7263
7ece0d85
JJ
72642002-06-18 Jakub Jelinek <jakub@redhat.com>
7265
7266 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7267 e_shnum == 0.
7268 Only read the first section header if e_shoff is non-zero.
7269 Don't consider e_shstrndx if there are no sections.
7270
57fb03ac
TR
72712002-06-17 Tom Rix <trix@redhat.com>
7272
7273 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7274 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7275 complain_overflow_bitfield.
7276
341ca622
AM
72772002-06-17 Alan Modra <amodra@bigpond.net.au>
7278
767e34d1
AM
7279 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7280 (bfd_fdopenr): Likewise.
7281 (bfd_openstreamr): Likewise.
7282 (bfd_openw): Likewise.
7283
341ca622
AM
7284 * targets.c: Sort target vecs.
7285 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7286 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7287 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7288 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7289 * configure.in: Sort target vecs. Add m88kmach3_vec.
7290 * configure: Regenerate.
7291
dfbbae4c
HPN
72922002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7293
7294 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7295 bpo_reloc_no to break sort order ties, not address of items.
7296
d663e1cd
JL
72972002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7298
7299 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7300 Skip excluded sections in determing __gp value.
7301 (elf_hppa_final_link_relocate): Use the symbol's address in
7302 R_PARISC_FPTR64 relocations that don't need an opd entry.
7303 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7304 (elf64_hppa_finalize_dynreloc): Likewise.
7305 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7306 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7307
a8295218
NC
73082002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7309
7310 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7311 alignment for .bss, .data and .text sections so that sse and sse2
7312 code will work.
7313 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7314
73152002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7316
7317 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7318 sh[1234]*-elf*.
7319
3db4b612
JL
73202002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7321
2cb69dd3
JL
7322 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7323 dynamic sections.
7324
3db4b612
JL
7325 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7326 for a symbol that has no output section.
7327 (allocate_dynrel_entries): Correct comment.
7328 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7329 unless we want one.
7330 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7331 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7332 with no section. Remove unnecessary parentheses.
7333
f3813499
TR
73342002-06-11 Tom Rix <trix@redhat.com>
7335
7336 * coffcode.h (coff_compute_section_file_positions): Add data
7337 section to AIX loader alignment check.
7338
f5d44ba0 7339 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7340 alignment to 4 bytes.
7341 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7342 power accessor macro.
7343 (do_shared_object_padding): Remove invalid assertion.
7344
0ebaf185
RS
73452002-06-10 Richard Sandiford <rsandifo@redhat.com>
7346
7347 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7348 for removed output sections.
7349
ebe3e2d1
NC
73502002-06-10 Geoffrey Keating <geoffk@redhat.com>
7351
7352 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7353 htab_alloc.
7354 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7355
0b14c2aa
L
73562002-06-08 H.J. Lu <hjl@gnu.org>
7357
7358 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7359 work around a long long bug in gcc 2.96 on mips.
7360
3c2bfad6
JT
73612002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7362
7363 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7364 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7365 Regenerate dependency lists.
7366 * Makefile.in: Regenerate.
7367 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7368 vax1knetbsd_vec to targ_selvecs.
7369 * configure.in: Add vax1knetbsd_vec.
7370 * configure: Regenerate.
7371 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7372 * vax1knetbsd.c: New file.
7373 * vaxnetbsd.c: Update copyright years.
7374 (TARGET_PAGE_SIZE): Set to 0x1000.
7375 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7376
91149be3
JT
73772002-06-08 Matt Thomas <matt@3am-software.com>
7378
7379 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7380
21e15248
AM
73812002-06-08 Alan Modra <amodra@bigpond.net.au>
7382
7383 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7384
986b7daa
AM
73852002-06-08 Alan Modra <amodra@bigpond.net.au>
7386
e90b95f6
AM
7387 * Makefile.am: Run "make dep-am".
7388 * Makefile.in: Regenerate.
7389
3f9c735e
AM
7390 * armnetbsd.c: Replace CONST with const.
7391 * corefile.c: Likewise.
7392 * elf32-dlx.c: Likewise.
7393 * elf64-mips.c: Likewise.
7394 * mmo.c: Likewise.
7395 * ns32knetbsd.c: Likewise.
7396
986b7daa
AM
7397 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7398 table is elf64-sparc.
7399
5a659663
TS
74002002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7401
7402 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7403 Fix RELA addends to get not shifted in the result. Don't do special
7404 handling of R_MIPS_64 for NewABI.
7405
9bab7074
AM
74062002-06-07 Alan Modra <amodra@bigpond.net.au>
7407
7408 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7409 (NAME(aout,slurp_reloc_table)): Likewise.
7410 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7411 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7412 (xcoff_write_archive_contents_big): Likewise.
7413 (xcoff_generate_rtinit): Likewise.
7414 (xcoff_generate_rtinit): Likewise, and check error return.
7415 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7416 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7417 (coff_get_normalized_symtab): Likewise.
7418 (coff_make_empty_symbol): Likewise.
7419 (bfd_coff_set_symbol_class): Likewise.
7420 * cofflink.c (coff_link_add_symbols): Likewise.
7421 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7422 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7423 (bfd_ecoff_write_accumulated_debug): Likewise.
7424 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7425 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7426 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7427 * ieee.c (do_with_relocs): Use bfd_zalloc.
7428 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7429 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7430 (NAME(aout,slurp_reloc_table)): Likewise.
7431 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7432 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7433 * som.c (som_build_and_write_symbol_table): Likewise.
7434 (som_slurp_string_table): Likewise.
7435 (som_slurp_symbol_table): Likewise.
7436 (som_bfd_ar_write_symbol_stuff): Likewise.
7437 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7438 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7439 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7440 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7441 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7442
1126897b
AM
74432002-06-07 Alan Modra <amodra@bigpond.net.au>
7444
7445 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7446 "group" union.
7447 (elf_group_name): Update.
7448 (elf_group_id): Define.
7449 (bfd_elf_set_group_contents): Declare.
7450 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7451 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7452 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7453 that sym for the signature.
7454 (_bfd_elf_compute_section_file_positions): Don't call
7455 set_group_contents for "ld -r" case.
7456 (swap_out_syms): Use bfd_zalloc.
7457 * elflink.h (elf_link_add_archive_symbols): Likewise.
7458 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7459 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7460
3fad3c7c
AM
74612002-06-07 Alan Modra <amodra@bigpond.net.au>
7462
7463 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7464 relocs in opd for non-shared too.
7465
10f469bf 74662002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7467
7468 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7469 relocations.
7470
7217313c
NC
74712002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7472
7473 * merge.c: Include libiberty.h.
7474 * elf-strtab.c: Include libiberty.h.
7475
6cb22815
AM
74762002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7477
7478 * peXXigen.c (pe_print_idata): Remove unused variable.
7479
1ed89aa9
NC
74802002-06-06 David Heine <dlheine@tensilica.com>
7481
7482 * elf.c (assign_file_positions_for_segments): Remove unallocated
7483 sections from the section to segment mapping for PT_LOAD segments.
7484 Update comment about empty loadable segments.
7485
644c4c80
RS
74862002-06-06 Richard Sandiford <rsandifo@redhat.com>
7487
7488 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7489 is within the .stabstr section.
7490
f8ecb12b
AM
74912002-06-06 Alan Modra <amodra@bigpond.net.au>
7492
7493 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7494 are "const PTR", not "const PTR *".
7495 (bfd_elf32_swap_symbol_in): Likewise.
7496 (bfd_elf64_swap_symbol_in): Likewise.
7497 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7498 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7499 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7500 (elf_link_add_object_symbols): Likewise.
7501 (elf_link_record_local_dynamic_symbol): Likewise.
7502 (elf_link_input_bfd): Likewise.
7503 (elf_gc_mark): Likewise.
7504 (elf_reloc_symbol_deleted_p): Likewise.
7505 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7506 (mn10200_elf_relax_delete_bytes): Likewise.
7507 (mn10200_elf_symbol_address_p): Likewise.
7508 (mn10200_elf_get_relocated_section_contents): Likewise.
7509 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7510 (mn10300_elf_relax_section): Likewise.
7511 (mn10300_elf_relax_delete_bytes): Likewise.
7512 (mn10300_elf_symbol_address_p): Likewise.
7513 (mn10300_elf_get_relocated_section_contents): Likewise.
7514 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7515 (elf32_h8_relax_delete_bytes): Likewise.
7516 (elf32_h8_symbol_address_p): Likewise.
7517 (elf32_h8_get_relocated_section_contents): Likewise.
7518 * elf32-hppa.c (get_local_syms): Likewise.
7519 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7520 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7521 * elf32-sh.c (sh_elf_relax_section): Likewise.
7522 (sh_elf_relax_delete_bytes): Likewise.
7523 (sh_elf_get_relocated_section_contents): Likewise.
7524 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7525 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7526 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7527 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7528 * elf64-ppc.c (get_local_syms): Likewise.
7529 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7530 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7531
1ed89aa9 75322002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7533
7534 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7535
73ff0d56
AM
75362002-06-05 Alan Modra <amodra@bigpond.net.au>
7537
9dce4196
AM
7538 * elf.c (group_signature): Swap in the whole symbol, and handle
7539 extracting section symbol names.
7540 (setup_group): Add comment.
7541 (set_group_contents): When called from objcopy or ld, arrange for
7542 section contents to be written. Write group member output section
7543 indices to allow objcopy to reorganize sections.
7544 (_bfd_elf_copy_private_section_data): Copy group info.
7545
73ff0d56
AM
7546 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7547 (bfd_elf32_swap_symbol_in): Update prototype.
7548 (bfd_elf64_swap_symbol_in): Likewise.
7549 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7550 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7551 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7552 (elf_link_add_object_symbols): Likewise.
7553 (elf_link_record_local_dynamic_symbol): Likewise.
7554 (elf_link_input_bfd): Likewise.
7555 (elf_gc_mark): Likewise.
7556 (elf_reloc_symbol_deleted_p): Likewise.
7557 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7558 (mn10200_elf_relax_delete_bytes): Likewise.
7559 (mn10200_elf_symbol_address_p): Likewise.
7560 (mn10200_elf_get_relocated_section_contents): Likewise.
7561 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7562 (mn10300_elf_relax_section): Likewise.
7563 (mn10300_elf_relax_delete_bytes): Likewise.
7564 (mn10300_elf_symbol_address_p): Likewise.
7565 (mn10300_elf_get_relocated_section_contents): Likewise.
7566 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7567 (elf32_h8_relax_delete_bytes): Likewise.
7568 (elf32_h8_symbol_address_p): Likewise.
7569 (elf32_h8_get_relocated_section_contents): Likewise.
7570 * elf32-hppa.c (get_local_syms): Likewise.
7571 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7572 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7573 * elf32-sh.c (sh_elf_relax_section): Likewise.
7574 (sh_elf_relax_delete_bytes): Likewise.
7575 (sh_elf_get_relocated_section_contents): Likewise.
7576 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7577 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7578 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7579 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7580 * elf64-ppc.c (get_local_syms): Likewise.
7581 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7582 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7583 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7584 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7585 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7586 * elf64-mips.c (mips_elf64_size_info): Likewise.
7587 * elf64-s390.c (s390_elf64_size_info): Likewise.
7588 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7589
53bfd6b4
MR
75902002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7591
7592 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7593 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7594 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7595 _bfd_mips_elf_ignore_discarded_relocs.
7596 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7597
d4df96e6
L
75982002-06-05 H.J. Lu <hjl@gnu.org>
7599
7600 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7601 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7602 the SEC_MERGE section.
7603
e61463e1
AM
76042002-06-05 Alan Modra <amodra@bigpond.net.au>
7605
3cac74d0
AM
7606 * coff-alpha.c: Update copyright date.
7607 * coff-mips.c: Likewise.
7608 * xcoff-target.h: Likewise.
7609
e61463e1
AM
7610 * bfd-in.h: Remove "taken from the source" comment.
7611 * libbfd-in.h: Likewise.
7612 * libcoff-in.h: Likewise.
7613 * bfd-in2.h: Regenerate.
7614 * libbfd.h: Regenerate.
7615 * libcoff.h: Regenerate.
7616
7617 * elf.c (bfd_elf_discard_group): Return true.
7618 * elf-bfd.h (bfd_elf_discard_group): Declare.
7619 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7620 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7621 * bfd.c (bfd_discard_group): Define.
7622 * targets.c (struct bfd_target): Add _bfd_discard_group.
7623 (BFD_JUMP_TABLE_LINK): Here too.
7624 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7625 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7626 * aout-target.h (MY_bfd_discard_group): Define.
7627 * aout-tic30.c (MY_bfd_discard_group): Define.
7628 * binary.c (binary_bfd_discard_group): Define.
7629 * bout.c (b_out_bfd_discard_group): Define.
7630 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7631 * coffcode.h (coff_bfd_discard_group): Define.
7632 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7633 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7634 * i386msdos.c (msdos_bfd_discard_group): Define.
7635 * i386os9k.c (os9k_bfd_discard_group): Define.
7636 * ieee.c (ieee_bfd_discard_group): Define.
7637 * ihex.c (ihex_bfd_discard_group): Define.
7638 * mmo.c (mmo_bfd_discard_group): Define.
7639 * nlm-target.h (nlm_bfd_discard_group): Define.
7640 * oasys.c (oasys_bfd_discard_group): Define.
7641 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7642 * som.c (som_bfd_discard_group): Define.
7643 * srec.c (srec_bfd_discard_group): Define.
7644 * tekhex.c (tekhex_bfd_discard_group): Define.
7645 * versados.c (versados_bfd_discard_group): Define.
7646 * vms.c (vms_bfd_discard_group): Define.
7647 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7648 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7649 (aix5coff64_vec): Likewise.
7650 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7651
9cba27b2
JT
76522002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7653
7654 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7655 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7656 (elf32-sh64-com.lo): New dependency list.
7657 * Makefile.in: Regenerate.
7658 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7659 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7660 elf32-sh64-com.lo.
7661 * configure: Regenerate.
7662 * elf32-sh64.c (sh64_address_in_cranges)
7663 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7664 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7665 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7666 * elf32-sh64-com.c: ...here. New file.
7667
8d2c33be
AM
76682002-06-04 Alan Modra <amodra@bigpond.net.au>
7669
7670 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7671 ATTRIBUTE_UNUSED on used params.
7672 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7673 before calling bfd_section_from_elf_index on local syms.
7674 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7675
5b0e55b6
JT
76762002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7677
7678 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7679 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7680 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7681 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7682 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7683 * Makefile.in: Regenerate.
7684 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7685 (sh64-*-netbsd*): New targets.
7686 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7687 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7688 * configure: Regenerate.
7689 * elf32-sh64-nbsd.c: New file.
7690 * elf64-sh64-nbsd.c: New file.
7691 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7692 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7693 bfd_elf64_sh64lnbsd_vec.
7694
b885599b
AM
76952002-06-04 Alan Modra <amodra@bigpond.net.au>
7696
7697 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7698 (bfd_section_from_shdr): Likewise. Set section name of group
7699 sections from signature.
7700 (group_signature): Split out from setup_group. Ensure symbol table
7701 is available.
7702 (bfd_elf_discard_group): New function.
7703 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7704 .gnu.linkonce* sections if they are members of a group.
7705 (set_group_contents): Set GRP_COMDAT flag.
7706 * section.c (bfd_discard_group): New function.
7707 * bfd-in.h (bfd_elf_discard_group): Declare.
7708 * bfd-in2.h: Regenerate.
7709 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7710 (elf_linkonce_p): Define.
7711
90937f86
AM
77122002-06-04 Alan Modra <amodra@bigpond.net.au>
7713
7714 * elf.c (bfd_section_from_shdr): Make "name" const.
7715 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7716 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7717 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7718 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7719 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7720 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7721 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7722 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7723 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7724 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7725 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7726
cf6fb9ce
MR
77272002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7728
7729 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7730 ABI.
7731
cedb70c5
KH
77322002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7733
7734 * elf32-arc.c: Fix formatting.
7735 * elf32-arm.h: Likewise.
7736 * elf32-cris.c: Likewise.
7737 * elf32-dlx.c: Likewise.
7738 * elf32-hppa.c: Likewise.
7739 * elf32-i386.c: Likewise.
7740 * elf32-i386qnx.c: Likewise.
7741 * elf32-or32.c: Likewise.
7742 * elf32-s390.c: Likewise.
7743 * elf32-sh64.c: Likewise.
7744 * elf32-vax.c: Likewise.
7745 * elf32-xstormy16.c: Likewise.
7746 * elf64-alpha.c: Likewise.
7747 * elf64-mmix.c: Likewise.
7748 * elf64-ppc.c: Likewise.
7749 * elf64-s390.c: Likewise.
7750 * elf64-sh64.c: Likewise.
7751 * elf64-x86-64.c: Likewise.
7752
048d873d
RH
77532002-06-02 Richard Henderson <rth@redhat.com>
7754
7755 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7756 null when there are no got entries for a symbol.
7757 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7758 uninitialized variable warning.
7759
4a67a098
RH
77602002-06-01 Richard Henderson <rth@redhat.com>
7761
7762 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7763 undefined symbols here.
7764 (elf64_alpha_relax_section): Do it here. Also test for not
7765 defined in the current module.
7766 (elf64_alpha_relocate_section_r): Split out of ...
7767 (elf64_alpha_relocate_section): ... here. Don't dereference
7768 NULL when looking up local got entries.
7769
f44f99a5
RH
77702002-06-01 Richard Henderson <rth@redhat.com>
7771
7772 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7773 symbols from JSR relaxation.
7774 (elf64_alpha_size_plt_section_1): New.
7775 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7776 (elf64_alpha_size_rela_got_1): ... here.
7777 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7778 (elf64_alpha_size_rela_got_section): ... here.
7779 (elf64_alpha_size_plt_section): New.
7780 (elf64_alpha_relax_section): Call them.
7781 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7782 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7783
9e756d64
RH
77842002-06-01 Richard Henderson <rth@redhat.com>
7785
7786 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7787 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7788 in shared libraries. Fix DTPRELHI and TPRELHI value.
7789 (INSN_ADDQ, INSN_RDUNIQ): New.
7790 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7791 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7792 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7793 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7794 Handle GOTDTPREL and GOTTPREL relocations.
7795 (elf64_alpha_relax_gprelhilo): New.
7796 (elf64_alpha_relax_tls_get_addr): New.
7797 (elf64_alpha_relax_find_tls_segment): New.
7798 (elf64_alpha_relax_section): Handle TLS relocations.
7799 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7800 (elf64_alpha_check_relocs): Set it.
7801
c853d7f6
RH
78022002-06-01 Richard Henderson <rth@redhat.com>
7803
b646261c
RH
7804 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7805
c853d7f6
RH
7806 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7807 check; don't suppress dynamic relocs for non-allocated sections.
7808
d7e41a96
RH
7809 * elf64-alpha.c: Remove dead code.
7810
5f333394
AM
78112002-05-31 Alan Modra <amodra@bigpond.net.au>
7812
08e0ee05
AM
7813 * bfd-in2.h: Regenerate.
7814 * libbfd.h: Regenerate.
7815 * po/SRC-POTFILES.in: Regenerate.
7816
5f333394
AM
7817 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7818 space for bss .plt.
7819
caf47ea6
AM
78202002-05-31 Graeme Peterson <gp@qnx.com>
7821
7822 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7823 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7824 Run "make dep-am".
7825 * Makefile.in: Regenerate.
7826 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7827 * configure.in: Add bfd_elf32_i386qnx_vec support.
7828 * configure: Regenerate.
7829 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7830 is_contained_by_filepos, and copy_private_bfd_data_p.
7831 * elf.c (assign_file_positions_for_segments): Call backend
7832 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7833 (IS_CONTAINED_BY_FILEPOS): Define.
7834 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7835 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7836 Fix non-K&R call to _bfd_error_handler.
7837 (_bfd_elf_copy_private_section_data): Use backend
7838 copy_private_bfd_data_p.
7839 * elf32-i386.c: Don't include elfxx-target.h when
7840 ELF32_I386_C_INCLUDED is defined.
7841 * elf32-i386qnx.c: New QNX elf backend file.
7842 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7843 elf_backend_is_contained_by_filepos, and
7844 elf_backend_do_copy_private_bfd_data.
7845 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7846
5bc56484
AM
78472002-05-31 Alan Modra <amodra@bigpond.net.au>
7848
7849 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7850 Move other similar defines to start of file.
7851
1b164155
TR
78522002-05-30 Tom Rix <trix@redhat.com>
7853
7854 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7855 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7856
3765b1be
RH
78572002-05-30 Richard Henderson <rth@redhat.com>
7858
7859 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7860 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7861 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7862 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7863 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7864 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7865 n_local_got_entries to total_got_size and local_got_size.
7866 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7867 (alpha_got_entry_size): New.
7868 (elf64_alpha_relax_with_lituse): Use it.
7869 (elf64_alpha_relax_without_lituse): Likewise.
7870 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7871 (get_got_entry): New.
7872 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7873 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7874 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7875 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7876 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7877 (elf64_alpha_calc_got_offsets): Likewise.
7878 (alpha_dynamic_entries_for_reloc): New.
7879 (elf64_alpha_calc_dynrel_sizes): Use it.
7880 (elf64_alpha_size_dynamic_sections): Likewise.
7881 (elf64_alpha_relocate_section): Handle TLS relocations.
7882 * reloc.c: Add Alpha TLS relocations.
7883 * bfd-in2.h, libbfd.h: Rebuild.
7884
5e226794
NC
78852002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7886
7887 * peXXigen.c (pe_print_idata): Remove double printed
7888 import table lines; add Bound-To comment.
7889
90ace9e9
JT
78902002-05-29 Matt Thomas <matt@3am-software.com>
7891
7892 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7893 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7894 (elf32-vax.lo): New rule.
7895 * Makefile.in: Regenerate.
7896 * configure.in (bfd_elf32_vax_vec)
7897 (vaxnetbsd_vec): New vectors.
7898 * configure: Regenerate.
7899 * config.bfd (vax-*-netbsdelf*)
7900 (vax-*-netbsdaout*)
7901 (vax-*-netbsd*): New targets.
7902 * elf32-vax.c: New file.
7903 * reloc.c: Add VAX relocations.
7904 * bfd-in2.h: Regenerate.
7905 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7906
4a253e81
JT
79072002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7908
7909 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7910 and bfd_elf32_bigarm_vec to targ_selvecs.
7911
6e7c73dd
CF
79122002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7913
7914 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7915 with auto-imported symbols.
7916
8afb0e02
NC
79172002-05-29 Adam Nemet <anemet@lnxw.com>
7918
7919 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7920 sections only record bfd.
9bab7074 7921 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7922 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7923 * bfd-in2.h: Regenerate.
8afb0e02 7924
a95653f5
NC
79252002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7926
7927 * syms.c (_bfd_stab_section_find_nearest_line): Move
7928 declaration and initialisation of saw_line and saw_func out of
7929 for loop.
7930
7cdc5bba
AM
79312002-05-29 Alan Modra <amodra@bigpond.net.au>
7932
7933 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7934 (bfd_elf64_get_symbol_info): Define.
7935 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7936
4c7aad1c
AM
79372002-05-29 Andrey Volkov <avolkov@transas.com>
7938
7939 * cpu-h8300.c: Make default h8300 machine first in machine list.
7940
d172d4ba
NC
79412002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7942
7943 * config.bfd: Added DLX configuraton.
7944 * Makefile.am: Added DLX configuraton.
7945 * configure.in: Added DLX configuraton.
7946 * archures.c: Add DLX architecure.
7947 * reloc.c: Add DLX relocs.
7948 * targets.c: Added DLX target vector.
7949 * configure: Regenerate.
7950 * Makefile.in: Regenreate.
7951 * bfd-in2.h: Regenreate.
7952 * elf32-dlx.c: New file: Support DLX target.
7953 * cpu-dlx.c: New file: Support DLX target.
7954
d1329ca3
AM
79552002-05-25 Alan Modra <amodra@bigpond.net.au>
7956
428d0de3
AM
7957 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7958
d1329ca3
AM
7959 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7960 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7961 strings to point inside function code sym string.
7962 (func_desc_adjust): Likewise.
7963 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7964
3bab7989
ML
79652002-05-24 Michal Ludvig <mludvig@suse.cz>
7966
7967 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7968 (elf64_x86_64_grok_psinfo): Added.
7969
436e8db0
NC
79702002-05-24 TAMURA Kent <kent@netbsd.org>
7971
7972 * config.bfd: Add a target for i386-netbsdpe.
7973
ea1e4b0d
AM
79742002-05-24 Alan Modra <amodra@bigpond.net.au>
7975
7976 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7977 and is_func_descriptor.
7978 (func_desc_adjust): Hide function code sym in shared libs unless
7979 there is a matching exported function descriptor sym.
7980
13ae64f3
JJ
79812002-05-23 Jakub Jelinek <jakub@redhat.com>
7982
7983 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7984 for symbols from SHF_TLS section.
7985 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7986 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7987 (map_sections_to_segments): Build PT_TLS segment if necessary.
7988 (assign_file_positions_for_segments): Likewise.
7989 (get_program_header_size): Account for PT_TLS segment.
7990 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7991 SEC_THREAD_LOCAL sections to STT_TLS.
7992 * reloc.c: Add 386 and IA-64 TLS relocs.
7993 * section.c (SEC_THREAD_LOCAL): Define.
7994 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7995 Remove.
7996 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7997 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7998 unconditionally.
7999 (struct elf_final_link_info): Add first_tls_sec.
8000 (elf_bfd_final_link): Set first_tls_sec.
8001 Compute elf_hash_table (info)->tls_segment.
8002 (elf_link_output_extsym): Handle STT_TLS symbols.
8003 (elf_link_input_bfd): Likewise.
8004 * syms.c (BSF_THREAD_LOCAL): Define.
8005 * bfd-in2.h: Rebuilt.
8006 * libbfd.h: Rebuilt.
8007 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8008 elf_i386_mkobject, elf_i386_object_p): New functions.
8009 (elf_howto_table): Add TLS relocs.
8010 (elf_i386_reloc_type_lookup): Support TLS relocs.
8011 (elf_i386_info_to_howto_rel): Likewise.
8012 (struct elf_i386_link_hash_entry): Add tls_type.
8013 (struct elf_i386_obj_tdata): New.
8014 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8015 New macros.
8016 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8017 (link_hash_newfunc): Clear tls_type.
8018 (elf_i386_check_relocs): Support TLS relocs.
8019 (elf_i386_gc_sweep_hook): Likewise.
8020 (allocate_dynrelocs): Likewise.
8021 (elf_i386_size_dynamic_sections): Likewise.
8022 (elf_i386_relocate_section): Likewise.
8023 (elf_i386_finish_dynamic_symbol): Likewise.
8024 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8025 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8026 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8027 want_tprel, want_dtpmod, want_dtprel.
8028 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8029 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8030 R_IA64_LTOFF_TPREL22.
8031 (elf_code_to_howto_index): Add TLS relocs.
8032 (elfNN_ia64_check_relocs): Support TLS relocs.
8033 (allocate_global_data_got): Account for TLS .got data.
8034 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8035 (elfNN_ia64_install_value): Supprt TLS relocs.
8036 (set_got_entry): Support TLS relocs.
8037 (elfNN_ia64_relocate_section): Likewise.
8038
c62e1cc3
NC
80392002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8040
8041 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8042 BLX reloc round the relocation up rather than down.
8043 * coff-arm.c (coff_arm_relocate_section): Likewise.
8044
c5a43a5d
L
80452002-05-21 H.J. Lu (hjl@gnu.org)
8046
8047 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8048 definition.
8049
afbe61cf
AM
80502002-05-22 Alan Modra <amodra@bigpond.net.au>
8051
8052 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8053 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8054
9c07fe7c
AM
80552002-05-22 Alan Modra <amodra@bigpond.net.au>
8056
8057 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8058 unresolved relocs.
8059 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8060
21611032
TS
80612002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8062
c5cd6d62 8063 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
8064 non-ELF targets.
8065
41241523
TS
80662002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8067
8068 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8069 an error value.
8070 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8071 return with false on error.
8072 (elf_link_input_bfd): Check reloc_emitter return value.
8073
658f2588
JT
80742002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8075
8076 * config.bfd (armeb-*-netbsdelf*): New target.
8077
c862ae31
AM
80782002-05-20 Alan Modra <amodra@bigpond.net.au>
8079
8080 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8081 at the plt call stub.
8082
6dd14845
TS
80832002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8084
8085 * cpu-mips.c (mips_compatible): Don't try to check machine
8086 compatibility.
8087
a58d9c34
TR
80882002-05-18 Tom Rix <trix@redhat.com>
8089
9b5ecbd0 8090 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 8091
ef60b7ff
AM
80922002-05-17 Alan Modra <amodra@bigpond.net.au>
8093
8094 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8095 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8096 we've already warned about an undefined symbol. Report more
8097 detail on reloc errors.
8098
a703a6ea
AM
80992002-05-17 Alan Modra <amodra@bigpond.net.au>
8100
8101 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8102 * configure.in: Invoke AM_INSTALL_LIBBFD.
8103 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8104 (install_libbfd): .. New target.
8105 (uninstall_libbfd): Likewise.
8106 (install-bfdlibLTLIBRARIES): Likewise.
8107 (uninstall-bfdlibLTLIBRARIES): Likewise.
8108 (bfdlibdir): New.
8109 (bfdincludedir): New.
8110 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8111 * aclocal.m4: Regenerate.
8112 * configure: Regenerate.
8113 * Makefile.in: Regenerate.
8114
2c13d98b
NC
81152002-05-17 Stuart Balfour <sbalfour@cisco.com>
8116
8117 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8118 hash loop.
8119
629936c5
NC
81202002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8121
8122 * config.bfd: Add targets for sh64-linux (little endian and
8123 big endian).
8124
e4cf60a8
NC
81252002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8126
8127 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8128 is located in the same section as the import table. Instead
8129 check, and if necessary load the section containing the thunk.
8130
d1e66cd4
NC
81312002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8132
8133 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8134 bfd_bread.
8135 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8136 with bfd_bread.
d1e66cd4 8137
2d653fc7
AM
81382002-05-15 Alan Modra <amodra@bigpond.net.au>
8139
8140 * aix5ppc-core.c: Warning fixes.
8141 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8142 * aout-target.h (MY_bfd_link_just_syms): Define.
8143 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8144 * bfd.c (bfd_link_just_syms): Define.
8145 * binary.c (binary_bfd_link_just_syms): Define.
8146 * bout.c (b_out_bfd_link_just_syms): Define.
8147 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8148 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8149 * coffcode.h (coff_bfd_link_just_syms): Define.
8150 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8151 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8152 (_bfd_elf_link_just_syms): Declare.
8153 * elf.c (_bfd_elf_link_just_syms): New function.
8154 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8155 sections haven't already been discarded by the linker.
8156 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8157 sections and SEC_MERGE sections.
8158 (elf_bfd_discard_info): Similarly here.
8159 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8160 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8161 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8162 * ieee.c (ieee_bfd_link_just_syms): Define.
8163 * ihex.c (ihex_bfd_link_just_syms): Define.
8164 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8165 (_bfd_generic_link_just_syms): Declare.
8166 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8167 * linker.c (_bfd_generic_link_just_syms): New function.
8168 * mmo.c (mmo_bfd_link_just_syms): Define.
8169 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8170 * oasys.c (oasys_bfd_link_just_syms): Define.
8171 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8172 * som.c (som_bfd_link_just_syms): Define.
8173 * srec.c (srec_bfd_link_just_syms): Define.
8174 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8175 (BFD_JUMP_TABLE_LINK): And here.
8176 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8177 * versados.c (versados_bfd_link_just_syms): Define.
8178 * vms.c (vms_bfd_link_just_syms): Define.
8179 * libbfd.h: Regenerate.
8180 * bfd-in2.h: Regenerate.
8181
cb7394f2
TS
81822002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8183
8184 * elf32-mips.c: Remove superfluous definitions copied from
8185 elfxx-mips.c.
8186 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8187 SGIish vectors to check the special case.
8188 (mips_elf_hi16_reloc): Fix comment.
8189 (mips_elf_got16_reloc): Likewise.
8190 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8191 (elf_reloc_map): Code cleanup.
8192 (mips_reloc_map): Add comment.
8193 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8194 (mips_elf32_rtype_to_howto): Likewise.
8195 (mips_elf32_discard_info): Likewise.
8196 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8197 lead to IRIX compatibility now.
8198
8dc1a139
TS
81992002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8200
8201 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8202
2051e1b5
JT
82032002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8204
8205 * config.bfd (shle-*-netbsdelf*): Add target which includes
8206 sh64 support.
8207
83954261
AM
82082002-05-13 David Edelsohn <edelsohn@gnu.org>
8209
8210 * configure.in: Revert 2002-04-07. Instead, auto-configure
8211 HAVE_ST_C_IMPL.
8212 * configure: Regenerate.
8213 * config.in: Regenerate.
8214 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8215 or AIX_5_CORE.
8216
a9bf1154
NC
82172002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8218
8219 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8220 corefiles as well.2
8221 * configure: Regenerate.
8222
3129eb7a
AM
82232002-05-13 Alan Modra <amodra@bigpond.net.au>
8224
8225 * Makefile.am (install-data-local): Install headers to
8226 $(exec_prefix)/include.
8227 * Makefile.in: Regenerate.
8228
a9a32010
DJ
82292002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8230 Daniel Jacobowitz <drow@mvista.com>
8231
8232 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8233 map BFD_RELOC_RVA.
8234
82352002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8236
8237 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8238 hppa*-*-openbsd*): New targets.
8239 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8240 * configure: Regenerate.
8241
f1f0d9ab
TR
82422002-05-10 Tom Rix <trix@redhat.com>
8243
ea1e4b0d 8244 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8245 xcoff64_ppc_relocate_section.
8246 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8247 * libxcoff.h: Common xcoff_reloc_type function declaration.
8248
c432ba1a
AM
82492002-05-10 Alan Modra <amodra@bigpond.net.au>
8250
16a10388 8251 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8252 added in 2002-05-09 commit.
16a10388 8253
c432ba1a
AM
8254 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8255 don't look for stubs on all undefined syms.
8256
4a335f3d
AM
82572002-05-09 Alan Modra <amodra@bigpond.net.au>
8258
8fc39d5d
AM
8259 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8260 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8261 pcrel_offset.
8262
4a335f3d
AM
8263 * elf32-i386.c (elf_howto_table): Comments.
8264 (elf_i386_relocate_section): Handle more relocs for relocatable
8265 linking and against SEC_MERGE sections.
8266
41fcb14e
AM
82672002-05-08 Alan Modra <amodra@bigpond.net.au>
8268
8269 * elf32-ppc.c (ppc_elf_create_got): New function.
8270 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8271 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8272 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8273 _bfd_elf_create_got_section.
8274
b491616a
AM
82752002-05-07 Alan Modra <amodra@bigpond.net.au>
8276
8277 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8278 * elfxx-target.h (elf_backend_rela_normal): Define.
8279 (elfNN_bed): Init rela_normal.
8280 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8281 for section symbols here if rela_normal. Simplify abs section test.
8282 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8283 return immediately. Remove code handling relocatable linking.
8284 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8285 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8286 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8287 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8288 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8289 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8290 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8291 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8292 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8293 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8294 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8295 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8296 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8297 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8298 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8299 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8300 * elf-m10200.c (elf_backend_rela_normal): Define.
8301 * elf-m10300.c (elf_backend_rela_normal): Define.
8302 * elf32-fr30.c (elf_backend_rela_normal): Define.
8303 * elf32-i370.c (elf_backend_rela_normal): Define.
8304 * elf32-i860.c (elf_backend_rela_normal): Define.
8305 * elf32-m68k.c (elf_backend_rela_normal): Define.
8306 * elf32-mcore.c (elf_backend_rela_normal): Define.
8307 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8308 * elf32-ppc.c (elf_backend_rela_normal): Define.
8309 * elf32-s390.c (elf_backend_rela_normal): Define.
8310 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8311 * elf64-ppc.c (elf_backend_rela_normal): Define.
8312 * elf64-s390.c (elf_backend_rela_normal): Define.
8313 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8314 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8315 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8316 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8317
df212a7e
NC
83182002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8319
8320 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8321 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8322
3decf53c
AM
83232002-05-06 Alan Modra <amodra@bigpond.net.au>
8324
8325 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8326 when not relocatable. Fix reloc_emitter call for K&R.
8327
f46c2da6
AM
83282002-05-04 Alan Modra <amodra@bigpond.net.au>
8329
8330 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8331 reloading local sym addend mistakenly removed in 2002-05-01 change.
8332
8333 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8334 (read_abbrevs): Change "offset" param to bfd_vma.
8335 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8336 Change "abbrev_offset" to bfd_vma.
8337 (read_indirect_string): Use correct conversion chars in error
8338 message format string, cast bfd_vma's to unsigned long.
8339 (read_abbrevs): Likewise.
8340 (read_attribute_value): Likewise.
8341 (decode_line_info): Likewise.
8342 (scan_unit_for_functions): Likewise.
8343 (parse_comp_unit): Likewise.
8344
59862849
TR
83452002-05-04 Tom Rix <trix@redhat.com>
8346
8347 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8348 (coff_swap_reloc_out): Same.
8349 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8350 (xcoff_swap_reloc_out): Same.
8351 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8352 case some 16 bit relocs. Add reloc value to output.
8353 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8354 R_RBR. Improve names.
59862849
TR
8355 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8356 (bfd_xcoff_backend_data): Update with new reloc swap names.
8357 (bfd_pmac_xcoff_backend_data) : Same.
8358 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8359 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8360 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8361 R_POS. Add reloc value to output.
ea1e4b0d
AM
8362 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8363 bit R_RBR. Improve names, masks.
59862849
TR
8364 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8365 (bfd_xcoff_backend_data): Update with new reloc swap names.
8366 (bfd_xcoff_aix5_backend_data) : Same.
8367
b4655ea9
AM
83682002-05-04 Alan Modra <amodra@bigpond.net.au>
8369
8370 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8371 bfd_count top_index, input_list, all_local_syms.
8372 (elf32_hppa_setup_section_lists): New function, split from
8373 elf32_hppa_size_stubs.
8374 (elf32_hppa_next_input_section): Likewise.
8375 (group_sections): Likewise.
8376 (get_local_syms): Likewise.
8377 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8378 stubs on undefined syms too.
8379 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8380 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8381 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8382 (elf32_hppa_next_input_section): Declare.
8383
301e3139
AM
83842002-05-04 Bob Byrnes <byrnes@curl.com>
8385
8386 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8387 _bfd_new_bfd.
8388
7c5fcef7
L
83892002-05-03 H.J. Lu (hjl@gnu.org)
8390
8391 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8392 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8393 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8394 to hide a global symbol.
8395 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8396 forced_local to true.
7c5fcef7 8397
84de6048
RH
83982002-05-02 Richard Henderson <rth@redhat.com>
8399
8400 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8401 vs SHN_UNDEF to zero.
8402
805fc799
AM
84032002-05-02 Alan Modra <amodra@bigpond.net.au>
8404
c061c2d8
AM
8405 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8406 16 bit reloc.
8407 <R_PPC64_SECTOFF_DS>: Likewise.
8408 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8409 SECTOFF reloc.
8410 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8411 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8412 SECTOFF reloc.
8413
805fc799
AM
8414 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8415 (ppc64_elf_ha_reloc): New function.
8416 (ppc64_elf_brtaken_reloc): New function.
8417 (ppc64_elf_sectoff_reloc): New function.
8418 (ppc64_elf_sectoff_ha_reloc): New function.
8419 (ppc64_elf_toc_reloc): New function.
8420 (ppc64_elf_toc_ha_reloc): New function.
8421 (ppc64_elf_toc64_reloc): New function.
8422 (ppc64_elf_unhandled_reloc): New function.
8423 (ppc64_elf_howto_raw): Use the above.
8424 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8425 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8426 <R_PPC64_SECTOFF_DS>: Likewise.
8427 (IS_ABSOLUTE_RELOC): Update.
8428 (struct ppc_link_hash_table): Add have_undefweak.
8429 (ppc64_elf_link_hash_table_create): Init.
8430 (func_desc_adjust): Set have_undefweak.
8431 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8432 add the .sfpr blr when have_undefweak.
8433 (ppc64_elf_setup_section_lists): Check hash table flavour.
8434 (ppc64_elf_next_input_section): Move output_section->owner test to
8435 ppc64elf.em.
8436 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8437 and relocatable test. Return TOCstart and don't set elf_gp.
8438 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8439 offset calculation. Add assert on weak sym branch tweaks.
8440 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8441 (ppc64_elf_toc): Declare.
8442 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8443
818c39a3
AM
84442002-05-01 Alan Modra <amodra@bigpond.net.au>
8445
8446 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8447 file_name.
8448
721956f4
AM
84492002-05-01 Alan Modra <amodra@bigpond.net.au>
8450
8451 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8452 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8453 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8454 call branches. Correct undefined weak destination.
8455 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8456 .sfpr, and correct case where either only savef* or restf* is
8457 needed.
8458
8459 Long branch stubs, multiple stub sections.
8460 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8461 (ppc64_elf_next_input_section): Declare.
8462 * elf64-ppc.c: Move linker-only prototypes.
8463 (STUB_SUFFIX): Define.
8464 (enum ppc_stub_type): New.
8465 (struct ppc_stub_hash_entry): New.
8466 (struct ppc_branch_hash_entry): New.
8467 (struct ppc_link_hash_entry): Add stub_cache, oh.
8468 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8469 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8470 Rename plt_overflow to stub_error.
8471 (ppc_stub_hash_lookup): Define.
8472 (ppc_branch_hash_lookup): Define.
8473 (stub_hash_newfunc): New function.
8474 (branch_hash_newfunc): New function.
8475 (link_hash_newfunc): Init new fields.
8476 (ppc64_elf_link_hash_table_create): Likewise.
8477 (ppc64_elf_link_hash_table_free): New function.
8478 (ppc_stub_name): New function.
8479 (ppc_get_stub_entry): New function.
8480 (ppc_add_stub): New function.
8481 (create_linkage_sections): Use bfd_make_section_anyway. Create
8482 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8483 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8484 and set up for plt call stubs. Link func and func desc syms.
8485 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8486 (func_desc_adjust): Avoid hash lookup when func desc sym available
8487 via shortcut, and set links when processing.
8488 (ppc64_elf_hide_symbol): Likewise.
8489 (allocate_dynrelocs): Don't allocate stub section here.
8490 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8491 Remove sstub code.
8492 (ppc_type_of_stub): New function.
8493 (build_one_stub): Delete.
8494 (ppc_build_one_stub): New function.
8495 (ppc_size_one_stub): New function.
8496 (ppc64_elf_setup_section_lists): New function.
8497 (ppc64_elf_next_input_section): New function.
8498 (group_sections): New function.
8499 (get_local_syms): New function.
8500 (ppc64_elf_size_stubs): Rewrite.
8501 (ppc64_elf_build_stubs): Rewrite.
8502 (ppc64_elf_relocate_section): Look up stub entry for REL24
8503 relocs. Don't propagate REL14* to dynamic objects. Look for long
8504 branch stubs if REL14* or REL24 relocs won't reach.
8505 (bfd_elf64_bfd_link_hash_table_free): Define.
8506
09c2219b
MM
85072002-04-30 Mark Mitchell <mark@codesourcery.com>
8508
c5cd6d62 8509 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8510
07b678c0
TR
85112002-04-30 Tom Rix <trix@redhat.com>
8512
8513 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8514 symbol names into the hash table.
8515
dbe341c6
TR
85162002-04-28 Tom Rix <trix@redhat.com>
8517
8518 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8519 calulating relocations.
dbe341c6 8520 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8521 (xcoff_ppc_relocate_section): Use relocation and complain function
8522 tables.
8523 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8524 (xcoff_complain_overflow_signed_func): Same.
8525 (xcoff_complain_overflow_bitfield_func): Same.
8526 (xcoff_complain_overflow_dont_func): Same.
8527 (xcoff_reloc_type_crel): New recot function.
8528 (xcoff_reloc_type_br): Same.
8529 (xcoff_reloc_type_ba): Same.
8530 (xcoff_reloc_type_toc): Same.
8531 (xcoff_reloc_type_rel): Same.
8532 (xcoff_reloc_type_neg): Same.
8533 (xcoff_reloc_type_pos): Same.
8534 (xcoff_reloc_type_fail): Same.
8535 (xcoff_reloc_type_noop): Same.
8536 * libxcoff.h : Declare common parts for xcoff64.
8537 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8538 and complain function tables.
dbe341c6 8539
985142a4
AM
85402002-04-28 Alan Modra <amodra@bigpond.net.au>
8541
8542 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8543 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8544
eba91044
AM
85452002-04-26 Alan Modra <amodra@bigpond.net.au>
8546
e54fdaa5
AM
8547 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8548 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8549
a50c1845
AM
8550 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8551 same as the output before calling elf_link_input_bfd.
8552
eba91044
AM
8553 * coffcode.h (coff_compute_section_file_positions): Set
8554 section_tail after shuffling section list.
8555
3c25c5f6
NC
85562002-04-24 Christian Groessler <chris@groessler.org>
8557
8558 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8559 addresses are 23bit with a special layout, not plain 32bit
8560 values. Prevent relocation of immediate values.
8561
40d32fc6
CD
85622002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8563
8564 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8565 MIPS-16 ASE flags are set, print something to indicate that.
8566
067fa4a6
AM
85672002-04-23 Alan Modra <amodra@bigpond.net.au>
8568
8569 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8570 under which a plt call stub is used.
8571 (final_link_relocate): Similarly.
8572 (allocate_plt_static): Clear h-plabel except when plt entry is
8573 exclusively used for a plabel.
8574 (allocate_dynrelocs): Use the above to simplify plt sizing.
8575 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8576 (elf32_hppa_link_hash_table_create): Init.
8577 (BL22_RP): Define.
8578 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8579 (elf32_hppa_check_relocs): Set has_22bit_branch.
8580
8581 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8582 (final_link_relocate): Likewise.
8583
af40ce3c
JJ
85842002-04-22 Jakub Jelinek <jakub@redhat.com>
8585
8586 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8587 search table if some FDE is DW_EH_PE_aligned encoded either.
8588 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8589
09ae86c2
JJ
85902002-04-22 Richard Smith <richard@ex-parrot.com>
8591 Jakub Jelinek <jakub@redhat.com>
8592
8593 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8594 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8595 encoded personality.
8596 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8597 for CIE/FDE removal.
8598
deeb2cd7
TR
85992002-04-20 Tom Rix <trix@redhat.com>
8600
8601 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8602
99dc0092
AM
86032002-04-20 Alan Modra <amodra@bigpond.net.au>
8604
aa3d5824
AM
8605 * archures.c (bfd_lookup_arch): Move the list order comment..
8606 (struct bfd_arch_info): ..to where it belongs.
8607 * bfd-in2.h: Regenerate.
8608
99dc0092
AM
8609 * archures.c (bfd_lookup_arch): Add comment on list order.
8610 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8611 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8612 is always at head of list.
8613
7831a775
NC
86142002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8615
8616 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8617 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8618 definition of these functions for ARM_WINCE builds as they are
8619 not used.
ea1e4b0d 8620 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8621 for ARM_WINCE builds.
8622
86232002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8624
ea1e4b0d 8625 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8626
86272002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8628
8629 * cpu-sh.c (scan_mach): Delete.
8630 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8631 (bfd_sh_arch): Likewise.
8632
3d8dbe36
NC
86332002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8634
8635 * ihex.c (ihex_write_object_contents): Fix check for records
8636 crossing 64K boundaries.
8637
4ab82700
AM
86382002-04-16 Alan Modra <amodra@bigpond.net.au>
8639
8640 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8641 type rather than just assuming entries are ELF.
8642 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8643 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8644 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8645 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8646 rather than elf_link_hash_entry.
8647
036fe0fe
RH
86482002-04-15 Richard Henderson <rth@redhat.com>
8649
8650 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8651 n32 binaries.
8652
c4f3d130
NC
86532002-04-15 Michael Snyder <msnyder@redhat.com>
8654
8655 * opncls.c (bfd_close): Write contents if writeable.
8656 Minor formatting tidy-ups.
8657
4ab82700 86582002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8659
8660 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8661
0c04d169
MS
86622002-04-12 Michael Snyder <msnyder@redhat.com>
8663
8664 * bfd-in.h (bfd_get_section_lma): New access macro.
8665 Minor white-space fix-up.
8666
89d4966f
AM
86672002-04-12 Alan Modra <amodra@bigpond.net.au>
8668
8669 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8670 header pad.
8671
8d0da3c2
DD
86722002-04-09 DJ Delorie <dj@redhat.com>
8673
8674 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8675
05793179
NC
86762002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8677
8678 * coffcode.h (coff_read_word): New.
8679 (coff_compute_checksum): New.
8680 (coff_apply_checksum): New.
8681 (coff_write_object_contents): Call coff_apply_checksum () to
8682 apply checksum to PE image.
8683
46fe4e66
AM
86842002-04-08 Randolph Chung <tausq@debian.org>
8685
8686 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8687 (elf32_hppa_final_link): Split out sorting logic to..
8688 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8689 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8690
3b5b409c
AC
86912002-04-07 Andrew Cagney <ac131313@redhat.com>
8692
8693 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8694 pattern.
8695 * configure: Re-generate.
8696
ac7b6ceb
AC
86972002-04-07 Andrew Cagney <ac131313@redhat.com>
8698
8699 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8700 is greater or equal to 4.3.3.
8701 * configure: Regenerate.
8702 Fix PR gdb/344.
8703
44aa49bb
HPN
87042002-04-05 Hans-Peter Nilsson <hp@axis.com>
8705
8706 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8707 R_CRIS_32_PCREL>: Fix typo in name.
8708 (cris_elf_check_relocs): Always create .rela.got here when
8709 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8710 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8711 assume it's created.
8712
e2d34d7d
DJ
87132002-04-04 Daniel Jacobowitz <drow@mvista.com>
8714
8715 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8716 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8717 define.
8718 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8719 * bfd.c (bfd_link_hash_table_free): Define.
8720 * binary.c (binary_bfd_link_hash_table_free): Define.
8721 * bout.c (b_out_bfd_link_hash_table_free): Define.
8722 * coff-rs6000.c (rs6000coff_vec): Include
8723 _bfd_generic_link_hash_table_free.
8724 (pmac_xcoff_vec): Likewise.
8725 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8726 (aix5coff64_vec): Likewise.
8727 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8728 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8729 (bfd_elf32_bfd_link_hash_table_free): Define.
8730 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8731 (bfd_elf32_bfd_link_hash_table_free): Define.
8732 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8733 define.
8734 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8735 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8736 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8737 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8738 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8739 (_bfd_generic_link_hash_table_free): Add prototype.
8740 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8741 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8742 * linker.c (_bfd_generic_link_hash_table_free): New function.
8743 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8744 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8745 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8746 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8747 * som.c (som_bfd_link_hash_table_free): Define.
8748 * srec.c (srec_bfd_link_hash_table_free): Define.
8749 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8750 * versados.c (versados_bfd_link_hash_table_free): Define.
8751 * vms.c (vms_bfd_link_hash_table_free): New function.
8752 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8753
8754 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8755 instead of bfd_alloc.
8756 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8757 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8758 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8759 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8760 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8761 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8762 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8763 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8764 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8765 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8766 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8767 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8768 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8769 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8770 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8771 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8772 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8773 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8774 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8775 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8776 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8777 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8778 * m68klinux.c (linux_link_hash_table_create): Likewise.
8779 * sparclinux.c (linux_link_hash_table_create): Likewise.
8780 * sunos.c (sunos_link_hash_table_create): Likewise.
8781 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8782
8783 * targets.c: Add _bfd_link_hash_table_free to xvec.
8784
8785 * bfd-in2.h: Regenerate.
8786 * libbfd.h: Regenerate.
8787 * libcoff.h: Regenerate.
8788
830629ab
AM
87892002-04-04 Alan Modra <amodra@bigpond.net.au>
8790
8791 * dep-in.sed: Cope with absolute paths.
8792 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8793 Run "make dep-am".
8794 * Makefile.in: Regenerate.
8795 * coff-arm.c: Fix copyright date.
8796 * cpu-h8300.c: Likewise.
8797 * cpu-i370.c: Likewise.
8798 * cpu-s390.c: Likewise.
8799 * cpu-mips.c: Likewise.
8800 * po/SRC-POTFILES.in: Regenerate.
8801
c6e90b02
TS
88022002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8803
8804 * Makefile.am: Add elfxx-mips.c to the known backends.
8805 (elf32-mips.lo): remove dependency to coff/external.h.
8806 * Makefile.in: Regenerate.
8807 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8808 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8809 accordingly.
8810 * configure: Regenerate.
8811 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8812 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8813 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8814 MIPS specific backend functions.
8815 * elf32-mips.c: Moved most code to elfxx-mips.c.
8816 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8817 static.
8818 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8819 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8820 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8821 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8822 interface to allow selection of the right REL or RELA howto table.
8823 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8824 static. Let it refuse n32 objects.
8825 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8826 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8827 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8828 (elf32_mips_ignore_discarded_relocs): Rename from
8829 _bfd_elf32_mips_ignore_discarded_relocs.
8830 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8831 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8832 (elf_mips_howto_table_rela): Remove.
8833 * elf64-mips.c: Moved most code to elfxx-mips.c.
8834 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8835 (mips_elf64_rtype_to_howto): New function.
8836 (mips_elf64_object_p): Likewise.
8837 (elf64_mips_irix_compat): Likewise.
8838 * elfxx-mips.c: New file containing common code merged together from
8839 elf32-mips.c and elf64-mips.c.
8840 * elfxx-mips.h: New file containing MIPS specific prototypes from
8841 elf-bfd.h.
8842 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8843 elf_backend_mips_rtype_to_howto.
8844
d8dce692
AM
88452002-04-04 Alan Modra <amodra@bigpond.net.au>
8846
8847 * srec.c (MAXCHUNK, Chunk): Revise comments.
8848 (srec_write_record): Correct buffer size.
8849 (srec_write_header): Do without intermediate buffer.
8850 (srec_write_section): Validate Chunk.
8851 (srec_write_terminator): Pass NULL instead of dummy buffer.
8852 (srec_write_symbols): Pass file and symbol names directly to
8853 bfd_bwrite so sprintf won't overflow buffer.
8854
b88a866a
JJ
88552002-04-03 Jakub Jelinek <jakub@redhat.com>
8856
8857 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8858 PC relative relocs against hidden symbols.
8859 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8860
d7866f04
AM
88612002-04-03 Alan Modra <amodra@bigpond.net.au>
8862
8863 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8864 LMAs, loop over segments until p_vaddr and p_memsz specify an
8865 extent enclosing the section.
8866
9e81ee67
NC
88672002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8868
8869 * ihex.c (ihex_write_object_contents): Do not allow records to
8870 cross a 64K boundary - wrap if necessary.
8871
d2b64500
JT
88722002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8873
8874 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8875 which caused the returned LWP ID to always be 0.
8876
e36f7d53
RH
88772002-04-01 Richard Henderson <rth@redhat.com>
8878
8879 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8880 (elf32_sparc_relocate_section): Use it to figure out when to
8881 initialize .got entries.
8882 * elf64-sparc.c: Similarly.
8883
e92d460e
AM
88842002-03-28 Alan Modra <amodra@bigpond.net.au>
8885
8886 * linker.c (link_action): Ignore duplicate warning syms.
8887 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8888 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8889 (elf_adjust_dynamic_symbol): Likewise.
8890 (elf_export_symbol): Likewise.
8891 (elf_link_find_version_dependencies): Likewise.
8892 (elf_link_assign_sym_version): Likewise.
8893 (elf_link_sec_merge_syms): Likewise.
8894 (elf_link_output_extsym): Likewise.
8895 (elf_gc_sweep_symbol): Likewise.
8896 (elf_gc_propagate_vtable_entries_used): Likewise.
8897 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8898 (elf_gc_allocate_got_offsets): Likewise.
8899 (elf_collect_hash_codes): Likewise.
8900 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8901 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8902 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8903 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8904 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8905 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8906 (elf_cris_discard_excess_dso_dynamics): Likewise.
8907 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8908 (mark_PIC_calls): Likewise.
8909 (allocate_plt_static): Likewise.
8910 (allocate_dynrelocs): Likewise.
8911 (readonly_dynrelocs): Likewise.
8912 * elf32-i386.c (allocate_dynrelocs): Likewise.
8913 (readonly_dynrelocs): Likewise.
8914 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8915 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8916 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8917 (mips_elf_sort_hash_table_f): Likewise.
8918 (mips_elf_check_mips16_stubs): Likewise.
8919 * elf32-s390.c (allocate_dynrelocs): Likewise.
8920 (readonly_dynrelocs): Likewise.
8921 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8922 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8923 (xstormy16_relax_plt_realloc): Likewise.
8924 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8925 (elf64_alpha_output_extsym): Likewise.
8926 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8927 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8928 (mips_elf64_check_mips16_stubs): Likewise.
8929 (mips_elf64_output_extsym): Likewise.
8930 * elf64-ppc.c (func_desc_adjust): Likewise.
8931 (allocate_dynrelocs): Likewise.
8932 (readonly_dynrelocs): Likewise.
8933 * elf64-s390.c (allocate_dynrelocs): Likewise.
8934 (readonly_dynrelocs): Likewise.
8935 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8936 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8937 (readonly_dynrelocs): Likewise.
8938 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8939 * aoutx.h (aout_link_write_other_symbol): Likewise.
8940 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8941 (_bfd_coff_write_global_sym): Likewise.
8942 * i386linux.c (linux_tally_symbols): Likewise.
8943 * m68klinux.c (linux_tally_symbols): Likewise.
8944 * sparclinux.c (linux_tally_symbols): Likewise.
8945 * pdp11.c (aout_link_write_other_symbol): Likewise.
8946 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8947 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8948 (xcoff_write_global_symbol): Likewise.
8949
8950 * cofflink.c (_bfd_coff_final_link): Formatting.
8951 * cpu-mips.c (mips_compatible): Make static, prototype.
8952 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8953 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8954 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8955 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8956 (mips_elf64_final_link): Likewise.
8957 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8958 prototype.
8959
2106126f
NC
89602002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8961
8962 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8963 (SWAP_OUT_RELOC_OFFSET): Define.
8964
b99d1833
AM
89652002-03-27 Gregory Steuck <greg@nest.cx>
8966
8967 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8968 terminating NULL if empty symbol table.
8969 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8970
ad43ed4c
L
89712002-03-26 H.J. Lu (hjl@gnu.org)
8972
8973 * elflink.h (elf_link_input_bfd): Revert the last change since
8974 the gcc exception handling isn't fixed yet.
8975
3851fca4
L
89762002-03-26 H.J. Lu (hjl@gnu.org)
8977
8978 * elflink.h (elf_link_input_bfd): Complain about relocations
8979 against local symbols in discarded sections.
8980
b91afed7
AM
89812002-03-26 Alan Modra <amodra@bigpond.net.au>
8982
8983 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8984
dba143ef
AM
89852002-03-23 Alan Modra <amodra@bigpond.net.au>
8986
8987 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8988 section file offset for !SEC_LOAD sections.
8989
ee29b9fb
RE
89902002-03-21 Richard Earnshaw <rearnsha@arm.com>
8991
830629ab
AM
8992 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8993 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 8994
54327882
AM
89952002-03-21 Alan Modra <amodra@bigpond.net.au>
8996
8997 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8998 Whitespace changes.
8999 * archive.c: Update copyright date.
9000 * bfd-in2.h: Regenerate.
9001 * libbfd.h: Regenerate.
9002 * Makefile.am: Run "make dep-am"
9003 * Makefile.in: Regenerate.
9004 * po/SRC-POTFILES.in: Regenerate.
9005
1ee24f27
DJ
90062002-03-20 Daniel Jacobowitz <drow@mvista.com>
9007
9008 * dwarf2.c (struct funcinfo): Move up.
9009 (lookup_address_in_function_table): New argument function_ptr.
9010 Set it.
9011 (lookup_address_in_line_table): New argument function. If function
9012 is non-NULL, use it to handle ``addr'' before the first line note of
9013 the function.
9014 (comp_unit_find_nearest_line): Update and swap calls to
9015 lookup_address_in_function_table and lookup_address_in_line_table.
9016 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9017 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9018
51b9608c
TR
90192002-03-20 Tom Rix <trix@redhat.com>
9020
ea1e4b0d 9021 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 9022 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 9023 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 9024
789c90aa
TR
90252002-03-19 Tom Rix <trix@redhat.com>
9026
ea1e4b0d 9027 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
9028 dynamic objects in archives.
9029
1da54d81
HPN
90302002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9031
9032 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9033 STT_NOTYPE symbols to STT_OBJECT.
9034
7831a775 90352002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
9036
9037 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9038
eb1e0e80
NC
90392002-03-18 Tom Rix <trix@redhat.com>
9040
9041 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9042 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9043 * coff-rs6000 (do_pad) : New function for archive padding.
9044 (do_copy) : New function for object file copying in archives.
9045 (do_shared_object_padding) : New function for padding shared
9046 objects to their text section alignment in archives.
9047 (bfd_xcoff_ar_achive_set_magic) : Stub.
9048 (xcoff_write_armap_big) : Use do_copy and do_pad.
9049 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9050 do_copy and do_pad.
9051 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 9052 bfd_xcoff_magic_number.
eb1e0e80
NC
9053 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9054 fop.
9055 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9056 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9057 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9058 * rs6000-core.c : Update copyright date.
ea1e4b0d 9059 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
9060 csectpp.
9061 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9062 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9063 (coff_set_flags) : Use bfd_xcoff_magic_number.
9064 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9065 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9066 * Makefile.am : Same.
9067 * config.bfd : Same.
9068 * targets.c : Same.
9069 * configure : Regnerate.
9070 * Makefile.in : Same.
9071 * bfd-in2.h : Same.
9072
a1c259a1
NC
90732002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9074
9075 * po/fr.po: Updated version.
9076
4dae1ae7
AM
90772002-03-18 Alan Modra <amodra@bigpond.net.au>
9078
9079 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9080 * libbfd.h: Regenerate.
9081 * archive.c (coff_write_armap): Pass on failures from
9082 bfd_write_bigendian_4byte_int.
9083
36b4f6e7
L
90842002-03-14 H.J. Lu <hjl@gnu.org>
9085
9086 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9087 error to bfd_error_nonrepresentable_section for reinit_array
9088 section in DSO.
9089
a1aefc76
NC
90902002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9091
a181be0a
NC
9092 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9093 OR it in rather than replacing previously selected flags.
9094
a1aefc76
NC
9095 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9096 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9097
c119f9b8
AM
90982002-03-14 Alan Modra <amodra@bigpond.net.au>
9099
9100 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9101 (N): Use the above.
9102 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9103 ensure reloc size matches before calling elf_link_input_bfd.
9104 Add an assert to check reloc size when counting output relocs.
9105
c295a511
NC
91062002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9107
9108 * mmo.c (mmo_get_loc): Return NULL rather than false.
9109
9ce88e60
NC
91102002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9111
9112 * po/fr.po: Updated version.
9113
4ddafab0
AM
91142002-03-13 Alan Modra <amodra@bigpond.net.au>
9115
b74fa2cd
AM
9116 * archures.c (bfd_default_compatible): Test bits_per_word.
9117 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9118 bfd_default_compatible.
9119 * cpu-i370.c (i370_compatible): Likewise.
9120 * cpu-sparc.c (sparc_compatible): Likewise.
9121 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9122
40b829d4
AM
9123 * elflink.h: Formatting fixes.
9124 (elf_link_output_extsym): Merge undefined and undef weak cases.
9125
4ddafab0
AM
9126 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9127 when word size of input matches output word size.
9128
dd53c801
AJ
91292002-03-12 Andreas Jaeger <aj@suse.de>
9130
9131 * cpu-i386.c (i386_compatible): New. Use it instead of
9132 bfd_default_compatible.
9133
aa066ac8
L
91342002-03-07 H.J. Lu (hjl@gnu.org)
9135
9136 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9137 as the type for bfd_reloc_val.
9138
1bf42538
JL
91392002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9140
9141 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9142 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9143 (elf_hppa_final_link_relocate): Correct relocations for indirect
9144 references to local data through the DLT. Fix .opd creation for
9145 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9146 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9147 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9148 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9149 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9150 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9151 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9152
86eaf01e
JJ
91532002-03-05 Jakub Jelinek <jakub@redhat.com>
9154
9155 * merge.c (_bfd_merge_sections): Don't segfault if there
9156 is nothing to merge due to GC.
9157
c44233aa
AM
91582002-03-05 Alan Modra <amodra@bigpond.net.au>
9159
039cc25f
AM
9160 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9161 symbols that have been forced local.
9162
c44233aa
AM
9163 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9164 to output forced local syms for non-shared link.
9165 (elf_link_output_extsym): Tweak condition for calling backend
9166 adjust_dynamic_symbol so that previous behaviour is kept.
9167 Whitespace changes throughout file.
9168
25e27870
L
91692002-03-04 H.J. Lu <hjl@gnu.org>
9170
9171 * elf.c (bfd_section_from_shdr): Handle special sections,
9172 .init_array, .fini_array and .preinit_array.
9173 (elf_fake_sections): Likewise.
9174
9175 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9176 DT entry only if the section is in output for .init_array,
9177 .fini_array and .preinit_array. Complain about .preinit_array
9178 section in DSO.
9179 (elf_bfd_final_link): Warn zero size for .init_array,
9180 .fini_array and .preinit_array sections.
9181
9182 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9183 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9184 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9185 .preinit_array.
9186
bb2a49f2
AM
91872002-03-04 Alan Modra <amodra@bigpond.net.au>
9188
9189 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9190 * configure: Regenerate.
9191
38487e5e
TR
91922002-03-02 Tom Rix <trix@redhat.com>
9193
c44233aa
AM
9194 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9195 symbolic equiv.
38487e5e
TR
9196 * coff-rs6000.c (xcoff_howto_table): Same.
9197
30831527
RH
91982002-03-01 David Mosberger <davidm@hpl.hp.com>
9199
9200 * elflink.h (size_dynamic_sections): If section named
9201 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9202 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9203 ".init_array" and ".fini_array".
9204 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9205 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9206 DT_FINI_ARRAY.
9207
c8e5ddc8
AM
92082002-02-26 Andrew Macleod <amacleod@cygnus.com>
9209
9210 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9211 dynsyms.
9212
96e0dda4
AM
92132002-02-25 Alan Modra <amodra@bigpond.net.au>
9214
1c5b6bf8
AM
9215 * elf64-hppa.h: Update copyright date.
9216
96e0dda4
AM
9217 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9218 (ppc64_elf_relocate_section): Don't generate power4 style branch
9219 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9220
0fb19cbc
JJ
92212002-02-22 Jakub Jelinek <jakub@redhat.com>
9222
9223 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9224 last patch.
9225 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9226
c434dee6
AJ
92272002-02-21 Andreas Jaeger <aj@suse.de>
9228
9229 * elf64-x86-64.c: Major rework that introduces all recent changes
9230 to the x86-64 backend. Get a closer match to elf32-i386.
9231 (struct elf64_x86_64_dyn_relocs): Rename from
9232 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9233 all users.
9234 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9235 sections.
9236 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9237 remove casts, initialize new hash members.
9238 (create_got_section): New.
9239 (elf64_x86_64_create_dynamic_sections): New.
9240 (elf64_x86_64_copy_indirect_symbol): New.
9241 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9242 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9243 Reference count possible .plt and .got entries. Don't test input
9244 section SEC_READONLY here to try to avoid copy relocs, and keep
9245 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9246 DF_TEXTREL here. Delay setting of variables until needed. Cache
9247 pointer to "sreloc" section in elf_section_data. Tweak condition
9248 under which .got created. Report files with bad relocation
9249 section names.
9250 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9251 Reference count possible .plt entries. Don't deallocate .got and
9252 .relgot space here.
9253 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9254 do copy reloc processing for weakdefs. Remove redundant casts and
9255 aborts. Delay setting of vars until needed. Move creation of
9256 dynamic symbols and allocation of .plt and .rela.plt to
9257 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9258 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9259 (allocate_dynrelocs): New.
9260 (readonly_dynrelocs): New.
9261 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9262 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9263 Zero out the dynamic allocated content space.
9264 (elf64_x86_64_discard_copies): Removed.
9265 (elf64_x86_64_relocate_section): Make use of dynamic section
9266 short-cuts. Localise vars, and delay setting. Better error
9267 reporting, replace BFD_ASSERT with abort. Check
9268 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9269 regular object file and tread the weak definition as the normal
9270 one. Don't discard relocs for undefweak or undefined symbols and
9271 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9272 relocs.
9273 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9274 symbols that have been forced local. Use same test to decide if
9275 we can use a relative reloc for got as relocate_section. Expand
9276 SHN_UNDEF comment. Move expressions out of function calls.
9277 Replace BFD_ASSERT with abort.
9278 (bfd_elf64_bfd_final_link): Removed.
9279 (elf_backend_copy_indirect_symbol): Define.
9280
ff3a6ee3
TR
92812002-02-20 Tom Rix <trix@redhat.com>
9282
9283 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9284 (_bfd_xcoff_reloc_type_lookup): Use it.
9285 * coff64-rs6000.c (xcoff64_howto_table): Same.
9286 (xcoff64_reloc_type_lookup): Same.
c434dee6 9287
a68d41fb
AM
92882002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9289
9b5ecbd0 9290 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9291 little endian.
9292
befc3abb
MS
92932002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9294
9295 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9296 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9297 * bfd-in2.h: Regenerate.
9298 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9299 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9300 with "s390:64-bit".
9301 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9302 (elf_s390_reloc_type_lookup): Likewise.
9303 (elf_s390_check_relocs): Likewise.
9304 (elf_s390_gc_sweep_hook): Likewise.
9305 (elf_s390_relocate_section): Likewise.
9306 (elf_s390_object_p): Use renamed architecture define.
9307 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9308
6eeeec9b
FCE
93092002-02-19 Frank Ch. Eigler <fche@redhat.com>
9310
9311 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9312
0bb2d96a
JJ
93132002-02-19 Jakub Jelinek <jakub@redhat.com>
9314
9315 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9316 absptr -> pcrel optimization for shared libs.
9317 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9318 library cannot be converted to pcrel.
9319 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9320 relative.
9321 * elf32-i386.c (elf_i386_relocate_section): If
9322 _bfd_elf_section_offset returned -2, skip, but make sure the
9323 relocation is installed.
9324 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9325 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9326 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9327 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9328 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9329 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9330 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9331 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9332 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9333 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9334 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9335 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9336 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9337 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9338 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9339 _bfd_elf_section_offset returning -2 the same way as -1.
9340 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9341 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9342 and BFD_ASSERT.
9343 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9344
69f284c7
TR
93452002-02-18 Tom Rix <trix@redhat.com>
9346
9347 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9348 (bfd_xcoff_size_dynamic_sections): Same.
9349 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9350 (bfd_xcoff_size_dynamic_sections): Same.
9351 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9352 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9353 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9354 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9355 * bfd-in2.h: Regenerate.
9356
82bd7b59
AM
93572002-02-18 Alan Modra <amodra@bigpond.net.au>
9358
9359 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9360 (struct ppc_link_hash_table): Add sfpr.
9361 (ppc64_elf_link_hash_table_create): Init it.
9362 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9363 .glink out to..
9364 (create_linkage_sections): ..here. Make .sfpr too.
9365 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9366 dynobj early.
9367 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9368 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9369 ._restf* functions, and create as needed.
9370 (func_desc_adjust): Only force_local for shared libs.
9371
ef1355e8
NC
93722002-02-18 David O'Brien <obrien@FreeBSD.org>
9373
9374 * configure.in: Bump version number post 2.12 branching.
9375 * configure: Regenerate.
9376
dfa36a69
HPN
93772002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9378
9379 * mmo.c: Correct and improve comments.
9380 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9381 zero-pad. Use input to fill up non-empty bfd buffer.
9382 (mmo_flush_chunk): New function.
9383 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9384 changed. Don't emit location specifier if VMA is same as
9385 *LAST_VMAP after omitting leading zero contents. Call
9386 mmo_flush_chunk before emitting location specifier.
9387 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9388 with mmo_write_loc_chunk calls.
9389 (mmo_internal_write_section): Call mmo_flush_chunk after
9390 mmo_write_chunk.
9391 (mmo_write_symbols_and_terminator): Move :Main to first position
9392 in symbol array. Add faked one if it does not exist if there are
9393 other symbols. Don't add it if there are no symbols at all. Move
9394 out test for value of :Main from symbol loop. Rename table
9395 fakemain to maintable and variable mainsym to fakemain.
9396
ccf00ab6
RH
93972002-02-15 Richard Henderson <rth@redhat.com>
9398
9399 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9400 section with no got matches any got. Simplify error generaion.
9401
88eaccc2
AM
94022002-02-15 Alan Modra <amodra@bigpond.net.au>
9403
fd96f80f
AM
9404 Support arbitrary length fill patterns.
9405 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9406 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9407 Call default_data_link_order.
9408 (default_fill_link_order): Delete.
9409 (default_data_link_order): New function.
9410 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9411 of bfd_fill_link_order with bfd_data_link_order.
9412 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9413 * elf64-mips.c (mips_elf64_final_link): Likewise.
9414
88eaccc2
AM
9415 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9416 Correct value returned in "end" for "0x<non-hex>".
9417
e2fd756b
NC
94182002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9419
9420 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9421 (scan): Test against 'mach' field in info structure.
9422
edd29cf9
AM
94232002-02-14 Alan Modra <amodra@bigpond.net.au>
9424
9425 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9426
1e30956e 94272002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9428
9429 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9430 EF_M68000.
9431
bf36db18
NC
94322002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9433
9434 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9435 non-zero physical addresses when adjusting the LMAs of new
9436 sections.
bf36db18 9437
189c6563
AM
94382002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9439
9440 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9441 from _bfd_elf_hppa_gen_reloc_type.
9442 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9443 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9444 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9445 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9446
e948afaf
AO
94472002-02-12 Alexandre Oliva <aoliva@redhat.com>
9448
9449 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9450 loading its contents if there's nothing to do in it.
9451
19397422
AM
94522002-02-12 Alan Modra <amodra@bigpond.net.au>
9453
0ad3a73b
AM
9454 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9455 64k boundary.
9456
19397422
AM
9457 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9458 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9459 (ppc64_elf_finish_dynamic_sections): Set values for them.
9460
51316059
MS
94612002-02-11 Michael Snyder <msnyder@redhat.com>
9462
9463 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9464 * elf.c (elfcore_grok_pstatus): Add prototype.
9465 (elfcore_grok_lwpstatus): Add prototype.
9466 (elfcore_write_lwpstatus): New function.
9467 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9468
518313c3
AO
94692002-02-11 Alexandre Oliva <aoliva@redhat.com>
9470
9471 * elf32-sh.c: Added missing prototypes.
9472 * elf32-sh64.c: Likewise.
9473 (sh_elf_align_loads): Mark unused args as such.
9474 * elf64-sh64.c: Added missing prototypes.
9475 (struct elf_sh64_link_hash_entry): Fix typo.
9476 (sh_elf64_relocate_section): Fix info argument passed to
9477 _bfd_elf_section_offset.
9478
2c73f9d8
AM
94792002-02-11 Alan Modra <amodra@bigpond.net.au>
9480
9481 * Makefile.am: "make dep-am".
9482 * Makefile.in: Regenerate.
9483 * aclocal.m4: Regenerate.
9484 * config.in: Regenerate.
9485 * configure: Regenerate.
9486
d426c6b0
DJ
94872002-02-10 Daniel Jacobowitz <drow@mvista.com>
9488
9489 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9490 variable warnings.
9491 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9492 comparison warning.
9493 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9494 cast warnings for the common case.
9495
e58ee0cd
HPN
94962002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9497
9498 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9499 vectors.
9500 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9501 vectors.
9502
7793f4d0
RH
95032002-02-09 Richard Henderson <rth@redhat.com>
9504
9505 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9506 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9507 (elf64_alpha_relocate_section): Likewise.
9508 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9509 * bfd-in2.h, libbfd.h: Rebuild.
9510
7e799044
HPN
95112002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9512
9513 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9514 that base-plus-offset reloc accounting is consistent.
9515 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9516 up to date for undefined symbols.
9517
027d73eb
EC
95182002-02-08 Eric Christopher <echristo@redhat.com>
9519
9520 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9521
9522 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9523 sections for the O32 ABI.
9524
517662d4
CD
95252002-02-08 Chris Demetriou <cgd@broadcom.com>
9526
9527 * elf32-arm.h: Fix formatting of _("...").
9528 * elf32-d10v.c: Likewise.
9529 * elf32-m68k.c: Likewise.
9530 * elf32-mips.c: Likewise.
9531
5e37cc46
NC
95322002-02-08 Ivan Guzvinec <ivang@opencores.org>
9533
9534 * coff-or32.c: Fix compile time warning messages.
9535
fbca6ad9
AO
95362002-02-08 Alexandre Oliva <aoliva@redhat.com>
9537
9538 Contribute sh64-elf.
9539 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9540 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9541 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9542 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9543 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9544 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9545 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9546 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9547 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9548 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9549 New relocs.
9550 * libbfd.h, bfd-in2.h: Rebuilt.
9551 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9552 (sh_reloc_map): Map them.
9553 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9554 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9555 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9556 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9557 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9558 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9559 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9560 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9561 datalabel_got_offset.
9562 (sh_elf_link_hash_newfunc): Initialize it.
9563 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9564 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9565 GOT and GOTOFF handling to new SHmedia relocation types. Support
9566 GOT_BIAS.
9567 (sh_elf_check_relocs): Likewise.
9568 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9569 PLT entries using movi_shori_putval. Support GOT_BIAS.
9570 (sh_elf_finish_dynamic_sections): Likewise.
9571 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9572 relocation, it's now done by the caller.
9573 (GOT_BIAS): New.
9574 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9575 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9576 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9577 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9578 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9579 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9580 sh64_elf64_hash_table): New.
9581 (sh_elf64_howto_table): Introduce new relocs.
9582 (sh_elf64_info_to_howto): Accept new PIC relocs.
9583 (sh_elf64_relocate_section): Augment the scope of
9584 seen_stt_datalabel. Support new PIC relocs.
9585 (sh_elf64_check_relocs): Support new PIC relocs.
9586 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9587 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9588 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9589 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9590 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9591 movi_shori_putval, movi_3shori_putval,
9592 sh64_elf64_create_dynamic_sections,
9593 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9594 sh64_elf64_size_dynamic_sections,
9595 sh64_elf64_finish_dynamic_symbol,
9596 sh64_elf64_finish_dynamic_sections): New.
9597 (elf_backend_create_dynamic-sections,
9598 bfd_elf64_bfd_link_hash_table_create,
9599 elf_backend_adjust_dynamic_symbol,
9600 elf_backend_size_dynamic_sections,
9601 elf_backend_finish_dynamic_symbol,
9602 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9603 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9604 elf_backend_got_header_size, elf_backend_plt_header_size):
9605 Define.
9606 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9607 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9608 match official numbers and names; moved unmaching ones to the
9609 range 0xf2-0xff.
9610 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9611 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9612 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9613 sections.
9b5ecbd0 9614 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9615 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9616 be aligned.
9617 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9618 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9619 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9620 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9621 .cranges section with SEC_SORT_ENTRIES set.
9622 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9623 incoming sorted .cranges section.
9624 (sh64_bfd_elf_copy_private_section_data): New.
9625 (sh64_elf_final_write_processing): Only sort .cranges and modify
9626 start address if called by linker.
9627 2001-01-08 Ben Elliston <bje@redhat.com>
9628 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9629 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9630 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9631 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9632 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9633 line. Add comments before all entries.
9634 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9635 comment.
9636 (sh_elf64_reloc): Correct head comment.
9637 (sh_elf64_relocate_section): Correct spacing.
9638 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9639 instead call reloc_dangerous callback.
9640 <case R_SH_SHMEDIA_CODE>: New case.
9641 (sh_elf64_gc_mark_hook): Correct spacing.
9642 (sh_elf64_check_relocs): Ditto.
9643 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9644 New case.
9645 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9646 functions.
9647 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9648 clarify describing comment. Add comments before all entries.
9649 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9650 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9651 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9652 Sort .cranges section in final link. Prepare to set bit 0 on
9653 entry address.
9654 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9655 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9656 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9657 .cranges section.
9658 (sh64_backend_section_from_shdr): New, to recognize
9659 SHT_SH5_CR_SORTED on incoming .cranges section.
9660 (elf_backend_section_from_shdr): Define.
9661 (sh64_elf_final_write_processing): Sort outgoing .cranges
9662 section. (New, temporarily disabled:) Set bit 0 on entry address
9663 according to ISA type.
9664 (sh64_find_section_for_address): New.
9665 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9666 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9667 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9668 bfd_malloc, not xmalloc.
9669 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9670 global.
9671 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9672 temporarily disabled) setting bit 0 on entry address.
9673 (elf_backend_final_write_processing): Define.
9b5ecbd0 9674 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9675 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9676 be a proper relocation for PTA and PTB rather than a marker.
9677 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9678 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9679 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9680 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9681 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9682 Zero src_mask.
9683 * elf64-sh64.c: Ditto.
9684 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9685 * elf32-sh64.c: Include opcodes/sh64-opc.h
9686 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9687 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9688 parameters. No unused parameters. Caller changed.
9689 <case R_SH_PT_16>: New case.
9690 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9691 * Makefile.in: Regenerate.
9b5ecbd0 9692 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9693 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9694 all code sections.
9695 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9696 (sh64_elf_merge_private_data): Ditto.
9697 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9698 to access stored section flags.
9699 (sh64_elf_final_write_processing): Return immediately unless
9700 called by linker. Use sh64_elf_section_data (cranges) to get size
9701 of linker-generated cranges entries.
9702 (sh64_elf_copy_private_data): Add missing "return true".
9703 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9704 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9705 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9706 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9707 elf64-sh64.c:sh64_elf_fake_sections.
9708 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9709 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9710 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9711 (sh64_elf_final_write_processing): New.
9712 (elf_backend_final_write_processing): Define.
9713 (sh64_elf_fake_sections): Get header flags from tdata field.
9714 (sh64_elf_copy_private_data): Do not call
9715 sh64_elf_copy_private_data_internal, just copy e_flags field.
9716 (sh64_elf_merge_private_data): Do not call
9717 sh64_elf_copy_private_data_internal.
9b5ecbd0 9718 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9719 Remove EF_SH64_ABI64, let ELF size make difference.
9720 Remove SH64-specific BFD section flag.
9721 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9722 containing SHmedia through elf_section_data (asect)->tdata
9723 non-zero, not using a BFD section flag.
9724 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9725 (sh64_elf_merge_private_data): Similar.
9726 (elf_backend_section_flags): Don't define.
9727 (sh64_elf_backend_section_flags): Delete.
9728 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9729 not EF_SH64_ABI64.
9730 (sh_elf64_merge_private_data): Similar.
9731 * section.c (Section flags definitions): Don't define
9732 SEC_SH_ISA_SHMEDIA.
9733 (bfd-in2.h): Regenerate.
9b5ecbd0 9734 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9735 Make DataLabel references work with partial linking.
9736 * elf32-sh64.c: Fix formatting.
9737 (sh64_elf_link_output_symbol_hook): New.
9738 (elf_backend_link_output_symbol_hook): Define to
9739 sh64_elf_link_output_symbol_hook.
9740 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9741 undefined if partial linking. Adjust sanity check.
9742 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9743 (elf_backend_link_output_symbol_hook): Define to
9744 sh64_elf64_link_output_symbol_hook.
9745 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9746 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9747 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9748 Implement semantics for inter-file DataLabel references.
9749 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9750 (sh64_elf64_add_symbol_hook): New.
9751 (sh_elf64_relocate_section): If passing an indirect symbol with
9752 st_type STT_DATALABEL on the way to a symbol with st_other
9753 STO_SH5_ISA32, do not bitor 1 to the relocation.
9754 (elf_backend_add_symbol_hook): Define to
9755 sh64_elf64_add_symbol_hook.
9756 * elf64-sh32.c: Tweak comments.
9757 (DATALABEL_SUFFIX): Define.
9758 (sh64_elf_add_symbol_hook): New.
9759 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9760 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9761 symbol with st_type STT_DATALABEL on the way to a symbol with
9762 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9763 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9764 Pass through STT_DATALABEL.
9765 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9766 (elf_backend_get_symbol_type): Define.
9767 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9768 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9769 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9770 * elf32-sh64.c: Tweak comments.
9771 (sh64_elf_copy_private_data_internal): Add prototype.
9772 (bfd_elf32_bfd_set_private_flags): Define.
9773 (sh64_elf_copy_private_data_internal): Compare machine name, not
9774 textual BFD target name, to check whether to copy section flag
9775 SHF_SH5_ISA32.
9776 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9777 Tweak section-contents-type-mismatch message.
9778 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9779 Validize reloc-types.
9780 * elf64-sh64.c: New file.
9781 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9782 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9783 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9784 Regenerate dependencies.
9785 * Makefile.in: Regenerate.
9786 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9787 bfd_elf64_sh64l_vec.
9788 * configure.in: Handle bfd_elf64_sh64_vec and
9789 bfd_elf64_sh64l_vec.
9790 * configure: Regenerate.
9791 * po/POTFILES.in: Regenerate.
9792 * po/bfd.pot: Regenerate.
9b5ecbd0 9793 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9794 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9795 anything else but EF_SH64 and EF_SH64_ABI64.
9796 (sh64_elf_merge_private_data): Emit error for anything else but
9797 EF_SH64 and EF_SH64_ABI64.
9798 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9799 from targ_selvecs.
9800 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9801 bfd_elf32_sh64l_vec as a temporary measure.
9802 * configure: Regenerate.
9b5ecbd0 9803 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9804 * cpu-sh.c (arch_info_struct): Include sh5 item
9805 unconditionalized.
9806 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9807 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9808 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9809 * elf32-sh64.c: Tweak comments.
9810 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9811 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9812 (sh64_elf_copy_private_data_internal): Wrap long line.
9813 (sh64_elf_merge_private_data): Rewrite to allow objects from
9814 SH64 subsets to be linked together.
9815 (INCLUDE_SHMEDIA): Define.
9816 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9817 Parenthesize plus-expression inside or-expression.
9818 <global symbol>: Ditto.
9819 (sh_elf_set_mach_from_flags): Remove code refusing
9820 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9821 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9822 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9823 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9824 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9825 (sh_elf_relocate_section) <local symbol>: Or 1 in
9826 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9827 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9828 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9829 relocation.
9b5ecbd0 9830 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9831 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9832 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9833 Regenerate dependencies.
9834 * Makefile.in: Regenerate.
9835 * archures.c: Add bfd_mach_sh5.
9836 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9837 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9838 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9839 * configure: Regenerate.
9840 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9841 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9842 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9843 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9844 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9845 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9846 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9847 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9848 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9849 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9850 in item for SH5.
9851 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9852 for SHmedia relocs.
9853 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9854 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9855 shmedia_prepare_reloc, goto final_link_relocate if it returns
9856 non-zero, else fail as before.
9857 (sh_elf_set_mach_from_flags): Provide function only if not defined
9858 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9859 (sh_elf_set_private_flags): Provide function only if not defined
9860 as a macro.
9861 (sh_elf_copy_private_data): Similar.
9862 (sh_elf_merge_private_data): Similar.
9863 * section.c (SEC_SH_ISA_SHMEDIA): New.
9864 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9865 * elf32-sh64.c: New file.
9866 * libbfd.h: Regenerate.
9867 * bfd-in2.h: Regenerate.
9868 * po/POTFILES.in: Regenerate.
9869 * po/bfd.pot: Regenerate.
9870 * bfd-in2.h: Regenerate.
9871 * libbfd.h: Regenerate.
9872
e108f470
DJ
98732002-02-07 Daniel Jacobowitz <drow@mvista.com>
9874
9875 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9876 been included, not drag it in.
9877 * bfd-in2.h: Regenerate.
9878
259d18a3
L
98792002-02-06 H.J. Lu (hjl@gnu.org)
9880
9881 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9882 the mach and ISA fields if necessary.
9883
f13b834e
NC
98842002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9885
9886 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9887 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9888 be sure exactly which architecture this represents.
9889
82f6addb
NC
98902002-02-05 Nick Clifton <nickc@redhat.com>
9891
9892 * po/tr.po: Updated translation.
9893
899f54f5
AM
98942002-02-05 Alan Modra <amodra@bigpond.net.au>
9895
9896 From Jimi X <jimix@watson.ibm.com>
9897 * archures (bfd_mach_ppc64): Define.
9898 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9899 (bfd_powerpc_arch): Define.
9900 * bfd-in2.h: Regenerate.
9901 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9902 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9903 (bfd_powerpc_archs): Add default powerpc64 arch.
9904
248866a8
AM
99052002-02-05 Alan Modra <amodra@bigpond.net.au>
9906
9907 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9908 against section syms in readonly sections. Don't do the global
9909 sym check if we find one.
9910 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9911 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9912 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
9913 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9914 (elf_s390_grok_prstatus): Add missing prototype.
9915
4fa5c2a8
HPN
99162002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9917
9918 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9919 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9920 Call bfd_get_section_by_name only once. Initialize
9921 bpodata->n_bpo_relocs_this_section.
9922 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9923 referring to DSOs.
9924 (bpo_reloc_request_sort_fn): Don't use difference of values as
9925 return-value.
9926
537c972e
DB
99272002-02-02 David O'Brien <obrien@FreeBSD>
9928
9929 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9930 version 4.5 and later the same as 5-CURRENT.
9931 * configure: Re-generate.
9932
006336b8
JT
99332002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9934
9935 * config.bfd (hppa*-*-netbsd*): New target.
9936
6c571f00
PT
99372002-01-31 Philipp Thomas <pthomas@suse.de>
9938
19397422
AM
9939 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9940 to front of message. Unify messages with elf32-arm.h. Use
9941 commas where neccessary.
9942 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9943 ERROR in messages. Unify messages with coff-arm.c. Correct
9944 VFP/FPA error message.
9945 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9946 APCS-32 for translation.
6c571f00 9947
930b4cb2
HPN
99482002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9949
9950 Perform on-demand global register allocation from
9951 R_MMIX_BASE_PLUS_OFFSET relocs.
9952 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9953 bpo_reloc_request, struct bpo_greg_section_info): New.
9954 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9955 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9956 _bfd_mmix_check_all_relocs,
9957 _bfd_mmix_prepare_linker_allocated_gregs,
9958 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9959 (elf_mmix_howto_table): Correct src_mask for most relocs.
9960 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9961 case.
9962 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9963 case. Fix typo in comment. New label do_mmix_reloc.
9964 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9965 store first object file with a base-plus-offset reloc. Call
9966 mmix_elf_check_common_relocs for the part common with mmo.
9967 (mmix_elf_final_link): Write out linker-allocated register
9968 contents section.
9969 (elf_backend_gc_sweep_hook): Define.
9970 (bfd_elf64_bfd_relax_section): Define.
9971
9972 * mmo.c: Don't include <ctype.h>
9973 (mmo_init): Correct init-once logic.
9974
3e36d993
TR
99752002-02-01 Tom Rix <trix@redhat.com>
9976
9977 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9978
ba323545
AM
99792002-02-01 Alan Modra <amodra@bigpond.net.au>
9980
9981 * Makefile.am: Run "make dep-am"
9982 * Makefile.in: Regenerate.
9983
012884d6
DB
99842002-01-31 David O'Brien <obrien@FreeBSD>
9985
9986 * configure.in: Recognize the differences in core files from FreeBSD
9987 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9988 5-CURRENT.
9989 * configure: Regenerate.
9990
3b16e843
NC
99912002-01-31 Ivan Guzvinec <ivang@opencores.org>
9992
9993 * coff-or32.c: New file.
9994 * cpu-or32.c: New file.
9995 * elf32-or32.c: New file.
9996 * archures.c: Add support for or32.
9997 * targets.c: Add support for or32.
9998 * bfd-in2.h: Regenerate.
7dc0ab31 9999 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
10000 coff_write_object_contents): Add support for or32.
10001 * config.bfd: Add target.
10002 * configure.in: Add support for or32.
10003 * configure: Regenerate.
10004 * Makefile.am: Add support for or32.
10005 * Makefile.in: Regenerate.
3b16e843
NC
10006 * po/SRC-POTFILES.in: Add or32 files.
10007 * po/bfd.pot: Regenerate.
7dc0ab31 10008
caf8ca8e
NC
100092002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10010 Don Lindsay <lindsayd@cisco.com>
10011
10012 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10013 false' with a return of a bfd_reloc_ error code.
10014
e5dfef09
HPN
100152002-01-31 Hans-Peter Nilsson <hp@axis.com>
10016
10017 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10018 unexport unreferenced symbols when --export-dynamic. Call
10019 _bfd_elf_strtab_delref when unexporting.
10020
4e4770d0
DJ
100212002-01-30 Daniel Jacobowitz <drow@mvista.com>
10022
10023 * bfd-in.h: Include <stdbool.h> if it is available.
10024 * bfd-in2.h: Regenerated.
10025
e1fa50e7
AM
100262002-01-31 Alan Modra <amodra@bigpond.net.au>
10027
10028 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10029 not go via the plt.
10030
b5f79c76
NC
100312002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10032
b5f79c76
NC
10033 * archures.c: Tidy up formatting of embedded comments.
10034 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 10035 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
10036 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10037 * section.c: Tidy up formatting of embedded comments.
10038 * syms.c: Tidy up formatting of embedded comments.
10039 * targets.c: Tidy up formatting of embedded comments.
10040
10041 * bfd-in2.h: Regenerate.
10042
ca09e32b
NC
100432002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10044
10045 * vms-tir.c (cmd_name): New function.
10046 (tir_cmd_name): New function.
10047 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10048 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10049 Fix formatting.
7dc0ab31 10050
ca09e32b
NC
10051 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10052 translation.
9b5ecbd0 10053 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
10054
10055 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10056 translation.
10057
10058 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10059
10060 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10061
10062 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10063 message to aid in translation.
10064
10065 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10066 to aid in translation.
10067
10068 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10069
7dc0ab31 100702002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
10071
10072 * coff-arm.c, elf32-elf.h: Unify messages.
10073
05f64ac6
NC
100742002-01-30 Nick Clifton <nickc@redhat.com>
10075
10076 * po/sv.po: Updated translation.
10077
f5a3e38a
NC
100782002-01-30 Philipp Thomas <pthomas@suse.de>
10079
10080 * dwarf2.c (read_abbrev): Use full section name in error message.
10081 (decode_line_info): Likewise.
661a3fd4
NC
10082
10083 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10084 message.
10085
d926e03d
AM
100862002-01-30 Alan Modra <amodra@bigpond.net.au>
10087
10088 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10089 descriptor symbols for undefined function code syms. Clear
10090 ELF_LINK_NON_ELF so that they can stay weak.
10091
030d18fb 100922002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 10093 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
10094
10095 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10096 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10097 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10098 generation.
10099 * bfd-in2.h: Regenerate.
10100
fcc76bea
CD
101012002-01-29 Chris Demetriou <cgd@broadcom.com>
10102
10103 * elf32-mips.c: Add additional comments about HI16 relocation
10104 processing.
10105 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10106 pc-relative relocations. (Reverts change made on 2001-10-31.)
10107 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10108 for pc-relative relocations.
10109 (mips_elf_calculate_relocation): Add a comment about a kludge
10110 in the R_MIPS_GNU_REL_HI16 handling.
10111 (_bfd_mips_elf_relocate_section): Implement that kludge;
10112 adjust pc-relative HI16 relocation for difference in HI16 and
10113 LO16 addresses, since it can't easily be done in
10114 mips_elf_calculate_relocation.
10115
f9cd9119
MS
101162002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10117
10118 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10119 relocations with PC32 relocations for undefined or weak symbols.
10120 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10121 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10122
702248bb
JT
101232002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10124
10125 * elfcore.h (elf_core_file_p): Improve comment for last change.
10126
4867be41
DJ
101272002-01-27 Daniel Jacobowitz <drow@mvista.com>
10128
10129 * configure: Regenerated.
10130
a94cef6a
JT
101312002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10132
10133 * elfcore.h (elf_core_file_p): Set the machine architecture
10134 before processing the program headers.
10135
7562a296
HPN
101362002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10137
966abd70
HPN
10138 * configure.in <64-bit configuration>: If using gcc, check and
10139 emit error for egcs-1.1.2.
10140 * configure: Regenerate.
10141
e8eab623
NC
101422002-01-26 Egor Duda <deo@logos-m.ru>
10143
10144 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10145 as possible to avoid stack corruption.
10146
73896efb
RH
101472002-01-26 Richard Henderson <rth@redhat.com>
10148
10149 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10150 for non-allocated sections.
10151
101522002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10153
10154 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10155 prstat.pr_reg even if it is a struct.
10156
73896efb 101572002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10158
c5cd6d62 10159 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10160
3d66c4f7
NC
101612002-01-25 Philipp Thomas <pthomas@suse.de>
10162
10163 * coffgen.c (coff_print_symbol): Don't mark info message
10164 for translation.
10165
9460ecda
NC
101662002-01-25 Nick Clifton <nickc@redhat.com>
10167
10168 * po/fr.po: Updated translation.
10169 * po/es.po: Updated translation.
10170
cc9ff76a
AM
101712002-01-25 Philipp Thomas <pthomas@suse.de>
10172
10173 * coff-alpha.c (alpha_relocate_section): Unify warning message
10174 for GP relative relocations without GP defined.
10175 * coff-mips.c (mips_relocate_section): Likewise.
10176
c68836a9
AM
101772002-01-25 Alan Modra <amodra@bigpond.net.au>
10178
10179 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10180 unsigned overflow when new_offset < old_offset.
10181
e8eab623 101822002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10183
10184 * bfd.c (_bfd_abort): Fix typo.
10185
8ba89f17
RH
101862002-01-23 Richard Henderson <rth@redhat.com>
10187
10188 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10189 plt entries for undefweak symbols.
10190
c6953948
NC
101912002-01-23 Steve Ellcey <sje@cup.hp.com>
10192
c5cd6d62 10193 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10194 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10195 (bfd_elf32_h8300_vec): Ditto.
10196
41bd81ab
AM
101972002-01-23 Alan Modra <amodra@bigpond.net.au>
10198
10199 * elf64-ppc.c: Remove stale part of ABI comment.
10200 (NO_OPD_RELOCS): Define.
10201 (ppc64_elf_check_relocs): Use it.
10202 (ppc64_elf_relocate_section): Here too.
10203 (build_one_stub): Don't point function syms at the stub. Instead,
10204 hijack plt.offset.
10205 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10206 really go to the stub. Make all dynamic relocs in opd against
10207 locals.
10208 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10209 plt.offset.
10210
f304919d
RH
102112002-01-22 Richard Henderson <rth@redhat.com>
10212
10213 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10214
c0ef99a7
AM
102152002-01-22 Alan Modra <amodra@bigpond.net.au>
10216
60ee0d4a
AM
10217 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10218 TOC_BASE_OFF adjustment.
10219
c0ef99a7
AM
10220 * Makefile.am: Run "make dep-am".
10221 * Makefile.in: Regenerate.
10222 * po/SRC-POTFILES.in: Regenerate.
10223
64328b46
AM
102242002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10225
10226 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10227 host defines.
10228
59953665 102292002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10230
10231 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10232 Check for and emit error if sgot is NULL at this point.
10233
9596feea
JT
102342002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10235
10236 * config.bfd (ia64*-*-netbsd*): New target.
10237
7b45c6e1
AM
102382002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10239
10240 * som.c (som_write_space_strings): Comment typo fix.
10241
e5094212
AM
102422002-01-21 Alan Modra <amodra@bigpond.net.au>
10243
e86ce104
AM
10244 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10245 is_func_descriptor fields.
10246 (link_hash_newfunc): Init them.
10247 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10248 dot are candidates for plt entries. When processing .opd relocs,
10249 set function descriptor strings to point inside function code
10250 string, and set new ppc_link_hash_entry fields.
10251 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10252 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10253 function descriptors. It's now done in..
10254 (func_desc_adjust): New.
10255 (ppc64_elf_func_desc_adjust): New.
10256 (define elf_backend_always_size_sections): Define.
10257 (ppc64_elf_hide_symbol): New.
10258 (define elf_backend_hide_symbol): Define.
10259 (allocate_dynrelocs): Remove code looking up function descriptors
10260 as that has been done earlier.
10261 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10262 table.
10263 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10264 up function descriptor.
10265 (build_one_stub): Look up the function code sym. Check for
10266 invalid plt offsets.
10267 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10268 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10269
e5094212
AM
10270 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10271 boolean param.
10272 (_bfd_elf_link_hash_hide_symbol): Likewise.
10273 * elflink.h (elf_link_add_object_symbols): Adjust call to
10274 elf_backend_hide_symbol.
10275 (elf_fix_symbol_flags): Likewise.
10276 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10277 than bfd_alloc.
10278 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10279 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10280 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10281 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10282 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10283 and adjust to suit.
10284 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10285 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10286 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10287
40b8271b
AM
102882002-01-18 Alan Modra <amodra@bigpond.net.au>
10289
10290 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10291 dynamic function descriptor symbol, not the associated function
10292 symbol.
10293
55baa95b
EC
102942002-01-17 Eric Christopher <echristo@redhat.com>
10295
10296 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10297
328577ad
NC
102982002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10299
10300 * po/bfd.pot: Regenerate.
10301 * po/fr.po: Regenerate.
10302
af746e92
AM
103032002-01-17 Alan Modra <amodra@bigpond.net.au>
10304
10305 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10306 Remove "Elf_Internal_Shdr *" param.
10307 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10308 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10309 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10310 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10311 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10312 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10313 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10314 function to override special sections. Remove hdr arg from
10315 backend call, and don't loop.
10316
175e9962
EC
103172002-01-16 Eric Christopher <echristo@redhat.com>
10318
10319 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10320 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10321 relocations requiring gp0 and gp.
10322
96a846ea
RE
103232002-01-16 Richard Earnshaw <rearnsha@arm.com>
10324
175e9962 10325 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10326 EF_ARM_VFP_FLOAT.
10327 (elf32_arm_print_private_bfd_data): Likewise.
10328
af3ae48d
NC
103292002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10330
10331 * po/tr.po: Import new version.
10332
10ed1bba
AM
103332002-01-16 Alan Modra <amodra@bigpond.net.au>
10334
10335 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10336 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10337 (ORI_R0_R0_0): Correct.
10338
5d1634d7
AM
103392002-01-16 Alan Modra <amodra@bigpond.net.au>
10340
10341 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10342 when plt_not_loaded.
10343 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10344 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10345 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10346 (ppc64_elf_glink_code): Delete.
10347 (PPC64_ELF_GLINK_SIZE): Delete.
10348 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10349 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10350 ORI_R0_R0_0): Define.
10351 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10352 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10353 (ppc64_elf_link_hash_table_create): Init them.
10354 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10355 Don't copy to shared lib.
10356 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10357 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10358 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10359 room for .stub and .glink code.
10360 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10361 DT_PPC64_GLINK.
10362 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10363 bfd_elf64_bfd_final_link.
10364 (bfd_elf64_bfd_final_link): Don't define.
10365 (ppc64_elf_size_stubs): New.
10366 (build_plt_stub): New.
10367 (build_one_stub): New.
10368 (ppc64_elf_build_stubs): New.
10369 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10370 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10371 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10372 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10373 case output sections not separate. Adjust DT_RELASZ to not
10374 include plt relocs. Set reserved got entry. Set got and plt
10375 entry size.
10376 (elf_backend_got_header_size): Set to 8.
10377 * elf64-ppc.h: New file.
10378
c601ffdb
AM
103792002-01-16 Alan Modra <amodra@bigpond.net.au>
10380
10381 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10382 sections, use bfd_section_list_remove.
10383 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10384 * elflink.h (elf_link_add_object_symbols): When removing all
10385 sections, use bfd_section_list_clear.
10386
8fb4cb7f
NC
103872002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10388
10389 * po/sv.po: New file: Swedish translation.
10390 * configure.in (ALL_LINGUAS): Add sv.
10391 * configure: Regenerate.
10392
d3c456e9
JJ
103932002-01-15 Jakub Jelinek <jakub@redhat.com>
10394
10395 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10396 * elf.c (merge_sections_remove_hook): New function.
10397 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10398 _bfd_merge_sections.
10399 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10400 * libbfd.h: Rebuilt.
10401 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10402 Call remove_hook if a SEC_EXCLUDE section is encountered.
10403
1f7fd478
NC
104042002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10405
10406 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10407 (xstormy16_reloc_map): Initialise new field with correct howto
10408 table.
10409 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10410 howto entry.
10411
b87011e9
MS
104122002-01-10 Michael Snyder <msnyder@redhat.com>
10413
10414 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10415 (elfcore_write_pstatus): Use long instead of pid_t;
10416 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10417
175e9962 104182002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10419
10420 * elf.c: Update copyright years.
10421 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10422 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10423
7c76fa91
MS
104242002-01-08 Michael Snyder <msnyder@redhat.com>
10425
10426 Add capability to write corefile note sections, for gdb.
10427 * elf.c (elfcore_write_note): New function.
10428 (elfcore_write_prpsinfo): New function.
10429 (elfcore_write_prstatus): New function.
10430 (elfcore_write_pstatus): New function.
10431 (elfcore_write_prfpreg): New function.
10432 (elfcore_write_prxfpreg): New function.
97996af6 10433 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10434
e1fddb6b
AO
104352002-01-08 Alexandre Oliva <aoliva@redhat.com>
10436
10437 * elf.c (elf_fake_sections): Propagate errors from
10438 elf_backend_fake_section.
10439
8d05742f
JT
104402002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10441
10442 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10443 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10444 (elf32-sh-nbsd.lo): New rule.
10445 * Makefile.in: Regenerate.
10446 * config.bfd (sh*le-*-netbsdelf*): New target.
10447 (sh*-*-netbsdelf*): New target.
10448 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10449 (bfd_elf32_shnbsd_vec): New vector.
10450 (bfd_elf32_shlnbsd_vec): New vector.
10451 * configure: Regenerate.
10452 * elf32-sh-nbsd.c: New file.
10453 * targets.c: Update copyright years.
175e9962 10454 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10455 bfd_elf32_shnbsd_vec.
10456
1dba4cb4
AH
104572002-01-07 Aldy Hernandez <aldyh@redhat.com>
10458
10459 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10460
47b22aef
GK
104612002-01-07 Geoffrey Keating <geoffk@redhat.com>
10462
10463 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10464 of a symbol in a section that will be deleted.
10465
be2d1673
NC
104662002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10467
10468 * po/es.po: New file: Spanish translation.
10469 * configure.in (ALL_LINGUAS): Add es.
10470 * configure: Regenerate.
10471
d9cf1b54
AM
104722002-01-06 Steve Ellcey <sje@cup.hp.com>
10473
10474 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10475 argument so we can handle HP-UX specially.
10476 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10477 (elfNN_hpux_backend_section_from_bfd_section): New for support
10478 of SHN_IA_64_ANSI_COMMON.
10479 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10480 (is_unwind_section_name): Add special HP-UX support.
10481 (elfNN_ia64_section_from_shdr): Add support for more sections.
10482 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10483 add support for more sections.
10484 (elfNN_ia64_additional_program_headers): Modify
10485 is_unwind_section_name call.
10486 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10487 only one unwind section in segment.
10488
3f3c5c34
AM
104892002-01-06 Alan Modra <amodra@bigpond.net.au>
10490
10491 * syms.c (_bfd_generic_make_empty_symbol): New function.
10492 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10493 _bfd_generic_make_empty_symbol.
10494 * libbfd.h: Regenerate.
10495 * bfd-in2.h: Regenerate.
10496 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10497 (hppabsd_core_get_symtab_upper_bound): Don't define.
10498 (hppabsd_core_get_symtab): Likewise.
10499 (hppabsd_core_print_symbol): Likewise.
10500 (hppabsd_core_get_symbol_info): Likewise.
10501 (hppabsd_core_bfd_is_local_label_name): Likewise.
10502 (hppabsd_core_get_lineno): Likewise.
10503 (hppabsd_core_find_nearest_line): Likewise.
10504 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10505 (hppabsd_core_read_minisymbols): Likewise.
10506 (hppabsd_core_minisymbol_to_symbol): Likewise.
10507 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10508 Formatting fixes.
10509 * hpux-core.c: Similarly.
10510 * irix-core.c: Similarly.
10511 * osf-core.c: Similarly.
10512 * sco5-core.c: Similarly.
10513 * binary.c (binary_make_empty_symbol): Remove function, define as
10514 _bfd_generic_make_empty_symbol.
10515 * ihex.c (ihex_make_empty_symbol): Likewise.
10516 * mmo.c (mmo_make_empty_symbol): Likewise.
10517 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10518 * srec.c (srec_make_empty_symbol): Likewise.
10519 * versados.c (versados_make_empty_symbol): Likewise.
10520 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10521 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10522 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10523 rather than _bfd_vms_make_empty_symbol.
10524 * vms-misc.c (new_symbol): Likewise.
10525
3f0a7f7f
AM
105262002-01-05 Alan Modra <amodra@bigpond.net.au>
10527
9e7b37b3
AM
10528 * section.c (bfd_section_init): Remove unnecessary initialisations.
10529 (bfd_section_list_clear): New function.
10530 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10531 (_bfd_strip_section_from_output): Use them.
10532 * coffcode.h (coff_set_alignment_hook): Likewise.
10533 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10534 * elf64-mips.c (mips_elf64_final_link): Likewise.
10535 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10536 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10537 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10538 * bfd-in2.h: Regenerate.
10539
10540 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10541 rather than doing our own section handling. Clean up after errors
10542 with bfd_release and bfd_section_list_clear. Handle unexpected
10543 flags.
10544 * aoutf1.h (sunos4_core_file_p): Likewise.
10545 * aix386-core.c (aix386_core_file_p): Likewise.
10546 * cisco-core.c (cisco_core_file_validate): Likewise.
10547 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10548 * trad-core.c (trad_unix_core_file_p): Likewise.
10549
9b5ecbd0 10550 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10551 with bfd_release and bfd_section_list_clear.
10552 * hpux-core.c (hpux_core_core_file_p): Likewise.
10553 * irix-core.c (irix_core_core_file_p): Likewise.
10554 * lynx-core.c (lynx_core_file_p): Likewise.
10555 * osf-core.c (osf_core_core_file_p): Likewise.
10556 * rs6000-core.c (rs6000coff_core_p): Likewise.
10557 * sco5-core.c (sco5_core_file_p): Likewise.
10558
3f0a7f7f
AM
10559 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10560 sign extension adjustments without conditionals.
10561
a3aa38ee
JJ
105622002-01-04 Jakub Jelinek <jakub@redhat.com>
10563
10564 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10565 CIE at .eh_frame start is removed due to no FDEs referencing it.
10566
8a8b2d4b
AJ
105672002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10568
10569 * config.bfd (x86_64-*-netbsd*): New target.
10570 * configure.in (x86_64-*-netbsd*): Set COREFILE
10571 to netbsd-core.lo.
10572 * configure: Regenerated.
10573
04b5af89
TR
105742002-01-03 Tom Rix <trix@redhat.com>
10575
10576 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10577 for recent bfd_make_section_anyway change.
10578
51c5503b
NC
105792002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10580
10581 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10582 R_ARM_THM_PC11 reloc.
10583
07f7c046
NC
105842002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10585
10586 * configure.in (LINGUAS): Add ja.
10587 * configure: Regenerate.
10588 * po/ja.po: Import from translation project's web site.
10589
5eefb65f
NC
105902002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10591
10592 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10593 messages to ease translation into other languages.
10594
39e90f10 10595For older changes see ChangeLog-0001
56882138
AM
10596\f
10597Local Variables:
10598mode: change-log
10599left-margin: 8
10600fill-column: 74
10601version-control: never
10602End:
This page took 0.77954 seconds and 4 git commands to generate.