bfd/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
5e35cbc2
L
12003-10-24 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
4 hash table for real symbols.
5
9c3ed942
MS
62003-10-23 Michael Snyder <msnyder@redhat.com>
7
8 * section.c (asection): Fix typo in comment.
9
0d4792f7
AM
102003-10-23 Alan Modra <amodra@bigpond.net.au>
11
12 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
13 reloc symbol index to it. Don't allow gd syms in shared libs
14 to be optimized.
15 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
16 (ppc64_elf_size_stubs): Likewise.
17 (ppc64_elf_relocate_section): Check that tls relocs are only used
18 with tls syms, and similarly for non-tls. Correct symbol used
19 when optimizing toc tls code.
20
c9ac8978
NC
212003-10-22 Nick Clifton <nickc@redhat.com>
22
23 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
24 processing an executable.
25
108ba305
JJ
262003-10-22 Jakub Jelinek <jakub@redhat.com>
27
28 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
29 field changes.
30 (_bfd_elf_link_assign_sym_version): Likewise.
31 * elflink.h (size_dynamic_sections): Likewise.
32
af9ba621
CV
332003-10-21 Alexandre Oliva <aoliva@redhat.com>,
34 Michael Snyder <msnyder@redhat.com>
35
36 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
37 bfd_mach_sh4a_nofpu): New machine types.
38 * bfd-in2.h: Rebuilt.
39 * cpu-sh.c (compatible): Remove unused function.
40 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
41 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
42 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
43
5a21e886
NC
442003-10-21 Wouter van Heyst <wouter@vidicode.nl>
45
46 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
47 describing mismatched formats involving the Maverick FP type.
48
b749473b
NC
492003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
50
51 * binary.c (binary_object_p): Pass machine flag along with
52 architecture.
53
3e602632
NC
542003-10-21 Thorsten Brehm <brehm@gmx.net>
55
56 * archures.c (bfd_default_scan): Add support for mcf528x.
57 * ieee.c (ieee_write_processor): Likewise.
58
592003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
60 Bernardo Innocenti <bernie@develer.com>
61
62 * archures.c: Add MCF528x (MCFv4) support.
63 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
64 * bfd-in2.h: Regenerate.
65
198beae2
AC
662003-10-20 Andrew Cagney <cagney@redhat.com>
67
68 * targets.c: Replace "struct sec" with "struct bfd_section"
69 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
70 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
71 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
72 * aout-tic30.c, aout-target.h:
73 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
74
4e2147ff
HPN
752003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
76
f60ebe14
HPN
77 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
78 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
79 (struct _mmix_elf_section_data): New member pjs.
80 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
81 functions.
82 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
83 (mmix_reloc_map): Ditto.
84 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
85 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
86 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
87 unused.
88 (mmix_elf_check_relocs): Move early return to after
89 mmix_elf_check_common_relocs call.
90 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
91 (_bfd_mmix_before_linker_allocation): Rename from
92 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
93 Arrange to set the initial relaxable size of sections.
94 (_bfd_mmix_after_linker_allocation): Rename from
95 _bfd_mmix_finalize_linker_allocated_gregs.
96 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
97 (bfd_elf64_get_section_contents): Define.
98 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
99 * libbfd.h, bfd-in2.h: Regenerate.
100
4e2147ff
HPN
101 * reloc.c (bfd_generic_relax_section): Default-set
102 section->_cooked_size here.
103 (bfd_generic_get_relocated_section_contents): Don't set it here.
104 Explain why.
105
4b71bec0
DA
1062003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
107
108 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
109 output section has been discarded.
110
d4e2de6b
NC
1112003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
112
113 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
114 (h8300_reloc16_extra_cases): Likewise.
115 (h8300_bfd_link_add_symbols): Likewise.
116
1172003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
118
119 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
120 (h8300sn_info_struct): Likewise.
121 (h8300hn_info_struct): Likewise.
122
98a96df7
CF
1232003-10-16 Pavel Roskin <proski@gnu.org>
124
125 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
126 for sections which lack size info.
127
2cefff79
DS
1282003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
129
130 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
131 mingw32.
132
3e0e1ef1
L
1332003-10-16 H.J. Lu <hongjiu.lu@intel.com>
134
135 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
136 undefined patterns with '*'.
137
9da84788
L
1382003-10-16 H.J. Lu <hongjiu.lu@intel.com>
139
140 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
141 use the last CIE from a different section.
142 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
143 size of the output section.
144
ac393995
RM
1452003-10-07 Roland McGrath <roland@redhat.com>
146
147 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
148 new section from p_align header field.
149
7aaa0689
L
1502003-10-16 H.J. Lu <hongjiu.lu@intel.com>
151
152 * elf32-xtensa.c (xtensa_read_table_entries): The external size
153 of entry is 8 bytes.
154
6cee3f79
AC
1552003-10-15 Andrew Cagney <cagney@redhat.com>
156
157 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
158 with NAME##_canonicalize_symtab.
159 * libcoff-in.h (coff_canonicalize_symtab): Update.
160 * xsym.h (bfd_sym_canonicalize_symtab): Update.
161 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
162 * coffgen.c (coff_canonicalize_symtab): Update.
163 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
164 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
165 * ieee.c (ieee_vec): Update comment.
166 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
167 * mmo.c (mmo_canonicalize_symtab): Update.
168 * nlm-target.h (nlm_canonicalize_symtab): Update.
169 * nlmcode.h (nlm_canonicalize_symtab): Update.
170 * i386msdos.c (msdos_canonicalize_symtab): Update.
171 * hp300hpux.c (MY (canonicalize_symtab)): Update.
172 * oasys.c (oasys_canonicalize_symtab): Update.
173 * som.c (som_canonicalize_symtab): Update.
174 * pef.c (bfd_pef_canonicalize_symtab): Update.
175 * nlmcode.h (nlm_canonicalize_symtab): Update.
176 * xsym.c (bfd_sym_canonicalize_symtab): Update.
177 * vms.c (vms_canonicalize_symtab): Update.
178 * versados.c (versados_canonicalize_symtab): Update.
179 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
180 * ieee.c (ieee_canonicalize_symtab): Update.
181 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
182 * reloc.c: Update comment.
183 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
184 * coff64-rs6000.c (aix5coff64_vec): Update.
185 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
186 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
187 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
188 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
189 * hp300hpux.c (MY_canonicalize_symtab): Update.
190 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
191 * aout-tic30.c (MY_canonicalize_symtab): Update.
192 * aout-target.h (MY_canonicalize_symtab): Update.
193 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
194 * elf.c (_bfd_elf_canonicalize_symtab): Update.
195 * elfcode.h (elf_canonicalize_symtab): Update.
196 * ihex.c (ihex_canonicalize_symtab): Update.
197 * tekhex.c (tekhex_canonicalize_symtab): Update.
198 * binary.c (binary_canonicalize_symtab): Update.
199 * srec.c (srec_canonicalize_symtab): Update.
200
6288878d
KH
2012003-10-15 Kazu Hirata <kazu@cs.umass.edu>
202
203 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
204
46e993b9
KK
2052003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
206
207 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
208 relocations.
209 (sh_elf_check_relocs): Likewise.
210
211 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
212 (sh64_elf_merge_symbol_attribute): New.
213 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
214 (sh64_elf64_merge_symbol_attribute): New.
215
9bf7216d
KK
2162003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
217
218 * elf-bfd.h (struct elf_backend_data): New function pointer member
219 elf_backend_merge_symbol_attribute.
220 * elflink.h (elf_link_add_object_symbols): Adjust call to
221 elf_backend_merge_symbol_attribute if the backend defined it.
222 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
223 (elfNN_bed): Add that to the initializer.
224
b614a702
BW
2252003-10-14 Bob Wilson <bob.wilson@acm.org>
226
227 * elf32-xtensa.c (get_is_linkonce_section): Delete.
228 (xtensa_is_property_section, xtensa_is_littable_section): Use
229 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
230 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
231 (xtensa_get_property_section_name): Check section name instead of
232 calling get_is_linkonce_section. Remove unused bfd parameter. Use
233 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
234 linkonce section names by appending ".xt.insn" or ".xt.lit".
235 (xtensa_read_table_entries): Remove bfd argument in call to
236 xtensa_get_property_section_name. Free section name when done.
237 (elf_xtensa_combine_prop_entries): Free leaking table.
238
98a8deaf
RS
2392003-10-13 Richard Sandiford <rsandifo@redht.com>
240
241 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
242 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
243 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
244 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
245 that were needed.
246 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
247 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
248
3f7deb8a
L
2492003-10-13 H.J. Lu <hongjiu.lu@intel.com>
250
251 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
252 (bfd_elf64_ia64_after_parse): Likewise.
253 * bfd-in2.h: Regenerated.
254
255 * elfxx-ia64.c (oor_ip): New.
256 (oor_branch_size): Likewise.
257 (bfd_elfNN_ia64_after_parse): Likewise.
258 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
259 equals sizeof (oor_ip).
260
0c72ffe0
KK
2612003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
262
263 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
264 renumbering of some relocation numbers.
265
8d6ad26e
AM
2662003-10-11 Alan Modra <amodra@bigpond.net.au>
267
268 * coff-sh.c: Move definition of MAP and guard more code with
269 COFF_IMAGE_WITH_PE.
a7f49d81
AM
270
271 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 272 * bfd-in2.h: Regenerate.
a7f49d81 273
ede6aaf3
L
2742003-10-10 H.J. Lu <hongjiu.lu@intel.com>
275
276 * Makefile.am: Run "make dep-am".
277 * Makefile.in: Regenerate.
278 * doc/Makefile.in: Likewise.
279
a3aa4448
L
2802003-10-09 H.J. Lu <hongjiu.lu@intel.com>
281
282 * cofflink.c: Include "safe-ctype.h".
283 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
284
9c8ee639
DB
2852003-10-08 Dave Brolley <brolley@redhat.com>
286 On behalf of Michael Snyder <msnyder@redhat.com>
287
288 * archures.c: Add FRV fr550 machine.
289 * cpu-frv.c: Ditto.
290 * elf32-frv.c: Ditto.
291 * bfd-in2.h: Regenerate.
292
6a691779
TS
2932003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
294
295 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
296 for non-SGI N64 ABI. Improve code consitency.
297
b15b52ef
AO
2982003-10-07 Alexandre Oliva <aoliva@redhat.com>
299
300 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
301 rightshift to 2.
302
cd339148
NS
3032003-10-07 Nathan Sidwell <nathan@codesourcery.com>
304
29ca8dc5
NS
305 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
306 parameter.
307 * cofflink.c (coff_link_add_symbols): Deal with split stab
308 sections.
309 * elflink.h (elf_link_add_object_symbols): Deal with split stab
310 sections.
311 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
312 * libbfd.h: Regenerated.
313
cd339148
NS
314 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
315 overflow, set reloc start position to after the count
316 reloc. Subtract one from num relocs. Give error on 0xffff relocs
317 and no overflow.
318 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
319 overflow.
320 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
321 0xffff.
322
10cf14ea
L
3232003-10-06 H.J. Lu <hongjiu.lu@intel.com>
324
325 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
326 last CIE/FDE if needed.
327
afa105f8
NC
3282003-10-06 Nick Clifton <nickc@redhat.com>
329
330 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
331 BFD64 is enabled.
332
85cf2a8a
NC
3332003-10-06 Matt Thomas <matt@3am-software.com>
334
8d6ad26e 335 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 336
4615568e
NC
3372003-10-06 Robert Millan <robertmh@gnu.org>
338
339 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
340 * config.bfd: Likewise.
341 * configure: Regenerate.
342
8b7cf393
CG
3432003-10-04 Christian Groessler <chris@groessler.org>
344
345 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
346 and R_CALLR.
347
0a6a3ebe
SC
3482003-10-04 Stephane Carrez <stcarrez@nerim.fr>
349
350 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
351 * elf32-m68hc11.c: Likewise.
352 * elf32-m68hc12.c: Likewise.
353 * elf32-m68hc1x.h: Likewise.
354
17e58af0
SC
3552003-10-04 Stephane Carrez <stcarrez@nerim.fr>
356
357 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
358 of flags between HC12 and HCS12.
359
27c630ba
NC
3602003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
361
362 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
363 which become empty after merging.
364
1fc0d173
JJ
3652003-09-30 Jakub Jelinek <jakub@redhat.com>
366
367 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
368 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
369
5f74bc13
CD
3702003-09-30 Chris Demetriou <cgd@broadcom.com>
371
372 * archures.c (bfd_mach_mipsisa64r2): New define.
373 * bfd-in2.h: Regenerate.
374 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
375 * cpu-mips.c (I_mipsisa64r2): New enum value.
376 (arch_info_struct): Add entry for I_mipsisa64r2.
377 * elfxx-mips.c (_bfd_elf_mips_mach)
378 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
379 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
380 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
381
b59dd4a5
L
3822003-09-29 H.J. Lu <hongjiu.lu@intel.com>
383
384 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
385 Handle SHN_IA_64_ANSI_COMMON.
386 (elf_backend_section_from_bfd_section): Defined.
387
243ef1e0
L
3882003-09-26 H.J. Lu <hongjiu.lu@intel.com>
389
390 * elflink.c (elf_link_read_relocs_from_section): Add an argument
391 of a pointer to section. Check bad symbol index.
392 (_bfd_elf_link_read_relocs): Modify calls to
393 elf_link_read_relocs_from_section.
394
d38eb334
DD
3952003-09-23 DJ Delorie <dj@redhat.com>
396
397 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
398 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
399 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
400 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
401 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
402 R_SH_PSHA, R_SH_PSHL added.
403 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
404 (sh_elf_relocate_section): Support new relocs.
405
f0578e28
BW
4062003-09-23 Bob Wilson <bob.wilson@acm.org>
407
408 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
409 dynamic relocation offsets.
410
010b84c1
AM
4112003-09-23 Alan Modra <alan@modra.org>
412
413 * simple.c (bfd_simple_get_relocated_section_contents): Free the
414 hash table using _bfd_generic_link_hash_table_free.
415
7dcb9820
AM
4162003-09-23 Alan Modra <alan@modra.org>
417
418 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
419 type of prefix_length and suffix_length to int. Rename "attributes"
420 to "attr". Comment.
421 (_bfd_elf_get_sec_type_attr): Update prototype.
422 * elf.c (get_special_section): Rewrite.
423 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
424 attr and type pointers.
425 (_bfd_elf_new_section_hook): Adjust for above.
426 (special_sections): Merge suffix with prefix. Set
427 prefix_length for all entries. Set suffix_length appropriately.
428 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
429 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
430 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
431 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
432 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
433 * elf32-v850.c (v850_elf_special_sections): Likewise.
434 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
435 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
436 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
437 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
438 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
439 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
440 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
441 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
442
61bcf373
DJ
4432003-09-21 Daniel Jacobowitz <drow@mvista.com>
444
445 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
446 ->got if the section already exists.
447
8bfd78b3
NS
4482003-09-19 Nathan Sidwell <nathan@codesourcery.com>
449
450 * dwarf2.c (decode_line_info): Cope with an initially empty
451 filename table.
452
6726e1ea
L
4532003-09-18 H.J. Lu <hongjiu.lu@intel.com>
454
455 * acinclude.m4: Include ../config/accross.m4.
456 * aclocal.m4: Regenerated.
457
458 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
459 or long long.
460 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
461 (host64): Remove if HOST_64BIT_TYPE is set to long.
462
463 * configure.in (HOST_64BIT_TYPE): Set according to the size of
464 long and long long.
465 (HOST_U_64BIT_TYPE): Likewise.
466 (host64): Likewise.
467 * configure: Regenerated.
468
5de3bf90
AM
4692003-09-19 Alan Modra <amodra@bigpond.net.au>
470
471 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
472 since some ABIs round up the size of the struct.
473
9e4d8df3
L
4742003-09-18 H.J. Lu <hongjiu.lu@intel.com>
475
476 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
477 the old symbol is undefined and the new symbol is defined.
478
228ce064
AS
4792003-09-18 Andreas Schwab <schwab@suse.de>
480
481 * simple.c (bfd_simple_get_relocated_section_contents): Use
482 _bfd_generic_link_hash_table_create instead of
483 bfd_link_hash_table_create.
484
fdbdabdd
L
4852003-09-10 H.J. Lu <hongjiu.lu@intel.com>
486
487 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
488 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
489
a252afa4
DA
4902003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
491 Randolph Chung <randolph@tausq.org>
492
493 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
494 hppa_link_hash_newfunc, hppa_build_one_stub,
495 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
496 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
497 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
498 for generating import stubs for calls to statically linked PIC
499 functions.
500 (hppa_type_of_stub): Don't generate an import stub for calls to
501 statically linked pic functions. Generate import stubs for calls
502 in a shared object, to functions not in a regular file, and to
503 defined weak functions. Add new argument INFO.
504 (hppa_build_one_stub): Don't undef ADDIL_DP.
505 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
506 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
507 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
508 non-shared link. Convert instructions that use the the linkage table
509 pointer, or a facsimile thereof, to use the global data pointer when
510 the reloc has been changed.
511
42acdc7c
JB
5122003-09-08 Joel Brobecker <brobecker@gnat.com>
513
514 * archures.c: Add new machine names for hppa.
515 * bfd-in2.h: Regenerate.
516 * cpu-hppa.c: Use the new machine names.
517
2a0e29b4
SC
5182003-09-06 Stephane Carrez <stcarrez@nerim.fr>
519
520 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
521 all_local_syms member.
522 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
523 to get the local symbols.
524
3f533aa9
SC
5252003-09-06 Stephane Carrez <stcarrez@nerim.fr>
526
527 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
528 (elf_backend_special_sections): Define.a
529
530 PR savannah/4950:
531 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
532 section is read-only.
533
8ad30312
NC
5342003-09-04 Nick Clifton <nickc@redhat.com>
535
536 * archures.c (bfd_mach_v850e1): Define.
537 * bfd-in2.h: Regenerate.
538 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
539 (arch_info_struct): Include an entry for bfd_mach_v850e1.
540 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
541 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
542 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
543 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
544 linked with v850e binaries. Mark the output as v850e.
5de3bf90 545
3922a8c1
NC
5462003-09-03 Nick Clifton <nickc@redhat.com>
547
5de3bf90 548 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
549 symbols that are used in relocs.
550
13dfd2d0
NC
5512003-08-30 Robert Millan <robertmh@gnu.org>
552
553 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
554 * config.bfd: Likewise.
555 * configure: Regenerate.
556
1c0881dd
CG
5572003-08-31 Christian Groessler <chris@groessler.org>
558
559 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
560 instead of returning bfd_reloc_continue.
561
ac0e732e
AJ
5622003-08-31 Andreas Jaeger <aj@suse.de>
563
564 * merge.c: Update to ISO C90.
565
ec317fb1
ILT
5662003-08-27 Ian Lance Taylor <ian@airs.com>
567
49c97a80
ILT
568 * configure.in: Check for strtoull.
569 * bfd.c (bfd_scan_vma): Use strtoull when available.
570 * configure, config.in: Regenerate.
571
ec317fb1
ILT
572 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
573 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
574 __GNUC__ when deciding whether to use long long for
575 BFD_HOST_64_BIT.
576 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
577
d539b3aa
CG
5782003-08-27 Christian Groessler <chris@groessler.org>
579
580 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
581 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
582 functions.
583 (elf32_i860_howto_table): Insert the new functions as
584 'special_function's in the proper reloc type entries.
585
73052b5e
RS
5862003-08-27 Richard Sandiford <rsandifo@redhat.com>
587
588 * elf32-frv.c (elf32_frv_relocate_section): Use
589 _bfd_elf_rela_local_sym.
590
2c848f79
MS
5912003-08-26 Michael Snyder <msnyder@redhat.com>
592
593 * cpu-frv.c: Remove unused enum.
594
980491e6
MR
5952003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
596
597 * reloc.c: Fix documentation for MIPS ELF relocations.
598 libbfd.h: Regenerate.
599 bfd-in2.h: Regenerate.
600
6d1227b8
JE
6012003-08-24 Jason Eckhardt <jle@rice.edu>
602
5de3bf90 603 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 604
f680ea79
JE
6052003-08-24 Jason Eckhardt <jle@rice.edu>
606
607 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
608 shift by 2 before storing the relocated value.
609
c28b1c28
JE
6102003-08-23 Jason Eckhardt <jle@rice.edu>
611
5de3bf90 612 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
613 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
614 LOWn, SPLITn, and BRADDR.
615 (RTYPE2HOWTO): Check that the r_type is within the howto_table
616 before trying to access the entry.
617 (coff_i860_rtype_to_howto): Likewise.
618 (coff_i860_reloc_type_lookup): New function.
619 (i860_reloc_processing): New function.
620 (coff_bfd_reloc_type_lookup): Define macro.
621 (RELOC_PROCESSING): Define macro.
622 Minor formatting adjustments.
623
40a0491a
AM
6242003-08-23 Alan Modra <amodra@bigpond.net.au>
625
626 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
627
69bbc4c0
L
6282003-08-22 H.J. Lu <hongjiu.lu@intel.com>
629
630 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
631 .got section at 8 bytes.
632
8b956130
NC
6332003-08-21 Nick Clifton <nickc@redhat.com>
634
85db1db4 635 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 636
6c21aa76
NC
6372003-08-21 Randolph Chung <tausq@debian.org>
638
639 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
640 can have OSABI=Linux or OSABI=SysV. Check for both.
641 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
642
3673a93e
NC
6432003-08-21 Nick Clifton <nickc@redhat.com>
644
645 * po/sv.po: Updated Swedish translation.
646
427b80f4
RS
6472003-08-20 Richard Sandiford <rsandifo@redhat.com>
648
649 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
650
560e09e9
NC
6512003-08-20 Nick Clifton <nickc@redhat.com>
652
653 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
654 replace some duplicated code in most elfxx-xxxx.c files. This
655 version uses the new fields in bfd_link_info.
656
40a0491a
AM
657 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
658 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
659 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
660 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
661 * elf32-i386.c (elf_i386_relocate_section): Likewise.
662 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
663 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
664 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
665 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
666 * elf32-s390.c (elf_s390_relocate_section): Likewise.
667 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
668 * elf32-vax.c (elf_vax_relocate_section): Likewise.
669 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
670 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
671 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
672 * elf64-s390.c (elf_s390_relocate_section): Likewise.
673 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
674 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
675 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
676
677 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
678 elf_hppa_remark_useless_dynamic_symbols,
679 elf_hppa_relocate_section): Use the new fields in
680 bfd_link_info structure.
681 * elf32-sh.c (sh_elf_relocate_section): Likewise.
682 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
683 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
684 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
685 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
686 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
687
688 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
689 undefined symbols in shared libraries. Remove redundant test
690 of shlib_undefined when reporting references to forced local
691 symbols.
560e09e9 692
4091ea4e
L
6932003-08-18 Andreas Schwab <schwab@suse.de>
694
695 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
696 executables.
697
b0cdc7bc
HPN
6982003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
699
700 * simple.c (bfd_simple_get_relocated_section_contents): Move
701 reloc_done hack to before first bfd_section_size call. Change all
702 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
703
c1993d04
AM
7042003-08-16 Alan Modra <amodra@bigpond.net.au>
705
706 * elf64-ppc.c: Don't include elf/ppc.h.
707
792b4a53
RS
7082003-08-14 Richard Sandiford <rsandifo@redhat.com>
709
710 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
711 code to work with 64-bit bfds.
712
fdc09da8
AM
7132003-08-14 Alan Modra <amodra@bigpond.net.au>
714
715 * dep-in.sed: Remove libintl.h.
716 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
717 (POTFILES.in): Remove target.
718 * Makefile.in: Regenerate.
719
ee87f2da
AM
7202003-08-12 Alan Modra <amodra@bigpond.net.au>
721
722 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
723 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
724 use the function sym from the previous reloc.
725
15f40dfc
JJ
7262003-08-11 Jakub Jelinek <jakub@redhat.com>
727
728 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
729 fatal if -pie.
730 * elf32-s390.c (elf_s390_relocate_section): Likewise.
731 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
732 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
733 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
734 * elf64-s390.c (elf_s390_relocate_section): Likewise.
735 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
736 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
737 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
738 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
739 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
740 on undefined symbols if -pie.
741 * elf32-sh.c (sh_elf_relocate_section): Likewise.
742
6ab189d5
AM
7432003-08-11 Alan Modra <amodra@bigpond.net.au>
744
745 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
746 branch to __libc_start_main.
747
3b260895
NC
7482003-08-08 Dmitry Diky <diwil@mail.ru>
749
6ab189d5
AM
750 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
751 gcc order.
3b260895
NC
752 * cpu-msp430.c: Likewise.
753 * elf32-msp430.c: Likewise.
754 * bfd-in2.h: Regenerate.
755
c39a58e6
AM
7562003-08-07 Alan Modra <amodra@bigpond.net.au>
757
9c5bfbb7
AM
758 * elfxx-target.h: Remove PTR cast.
759 * targets.c (bfd_target): Make backend_data const void *.
760 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
761 * elf-m10300.c: Likewise.
762 * elf.c: Likewise.
763 * elf32-hppa.c: Likewise.
764 * elf32-i386.c: Likewise.
765 * elf32-m68hc1x.c: Likewise.
766 * elf32-ppc.c: Likewise.
767 * elf32-s390.c: Likewise.
768 * elf32-sh.c: Likewise.
769 * elf32-sh64.c: Likewise.
770 * elf32-sparc.c: Likewise.
771 * elf32-xtensa.c: Likewise.
772 * elf64-mips.c: Likewise.
773 * elf64-ppc.c: Likewise.
774 * elf64-s390.c: Likewise.
775 * elf64-sh64.c: Likewise.
776 * elf64-sparc.c: Likewise.
777 * elf64-x86-64.c: Likewise.
778 * elfcode.h: Likewise.
779 * elfcore.h: Likewise.
780 * elflink.c: Likewise.
781 * elflink.h: Likewise.
782 * elfxx-ia64.c: Likewise.
783 * elfxx-mips.c: Likewise.
784 * elfxx-mips.h: Likewise.
785 * elf.c (prep_headers): Remove useless check for null backend_data.
786 * bfd-in2.h: Regenerate.
787
c39a58e6
AM
788 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
789 (NAME): Use ## rather than CONCAT4 macro.
790 * elfcode.h: Remove one remaining PARAMS macro.
791 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
792 * elf-strtab.c: Likewise.
793 * elf-hppa.h: Likewise.
794 * elf32-hppa.h: Likewise.
795 * elf32-hppa.c: Likewise.
796 (elf32_hppa_add_symbol_hook): Delete.
797 (elf_backend_add_symbol_hook): Don't define.
798 * libhppa.h: Convert to C90. Replace INLINE with inline.
799
97b639ba
AM
8002003-08-06 Alan Modra <amodra@bigpond.net.au>
801
802 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
803 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
804 function descriptors, but warn.
805 (ppc_build_one_stub): Remove a couple of vars. Move code creating
806 stub syms so that we can avoid a stub sym if we already have a
807 plt sym. Do not redefine an existing symbol.
808 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
809 glink.
810
9e7d479d
NC
8112003-08-06 Nick Clifton <nickc@redhat.com>
812
813 * po/fr.po: Updated French translation.
814
77f3d027
AM
8152003-08-06 Alan Modra <amodra@bigpond.net.au>
816
817 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
818 SEC_LINKER_CREATED.
819
50d6c878
DJ
8202003-08-05 Daniel Jacobowitz <drow@mvista.com>
821
822 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
823 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
824
14abcef9
NC
8252003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
826
4a21a492 827 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
828 message if the line number table could not be read.
829
8c675694
NC
8302003-08-04 Nick Clifton <nickc@redhat.com>
831
832 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
833 to messages produced for .gnu.warning.SYMBOL sections.
834
268b6b39
AM
8352003-08-04 Alan Modra <amodra@bigpond.net.au>
836
837 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
838 * elfcore.h: Likewise.
839 * elflink.c: Likewise.
840 * elflink.h: Likewise.
841 * elf.c (sym_is_global): Remove INLINE.
842 (align_file_position): Replace INLINE with inline.
843 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
844 (elf_file_p): Replace INLINE with inline.
845
866f48b7
KK
8462003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
847
848 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
849
8651fcf9
L
8502003-08-01 H.J. Lu <hongjiu.lu@intel.com>
851
852 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
853
37cd2629
L
8542003-08-01 H.J. Lu <hongjiu.lu@intel.com>
855
856 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
857 ElfNN_External_Rela instead of Elf64_External_Rela.
858
91fb2a9d
NC
8592003-08-01 Nick Clifton <nickc@redhat.com>
860
861 * config.bfd: Add code to catch obsolete configurations and warn
862 about them unless --enable-obsolete is used. Use this to mark
863 vax-vms port as obsolete.
864
e656e369
AM
8652003-07-30 Alan Modra <amodra@bigpond.net.au>
866
867 * elf32-ppc.c (ppc_elf_install_value): Tidy.
868 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
869 Formatting.
870 * elfxx-target.h: Remove PARAMS macro. Formatting.
871
50bc7936
AM
8722003-07-30 Alan Modra <amodra@bigpond.net.au>
873
874 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
875 * elf64-ppc.c (get_fdh): New function, split out from
876 ppc64_elf_edit_opd.
877 (ppc64_elf_check_relocs): Use get_fdh.
878 (func_desc_adjust): Likewise. Tidy.
879 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
880 exit. Use get_fdh. Account for superfluous dynamic relocs.
881 (ppc64_elf_relocate_section): Warning fix.
882
a62d170c
JE
8832003-07-30 Jason Eckhardt <jle@rice.edu>
884
885 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
886
7734b6e9
JE
8872003-07-30 Jason Eckhardt <jle@rice.edu>
888
889 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
890
37f4508b
AM
8912003-07-30 Randolph Chung <tausq@debian.org>
892
893 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
894 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
895
217aa764
AM
8962003-07-30 Alan Modra <amodra@bigpond.net.au>
897
898 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
899 Replace PTR with void *. Formatting.
900 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
901 (make_mapping): Likewise.
902
494dac0c
AM
9032003-07-29 Alan Modra <amodra@bigpond.net.au>
904
905 * elf64-ppc.c (func_desc_adjust): Give linker created function
906 descriptor symbols a size and type.
907 (ppc64_elf_relocate_section): Correct lq insn test.
908
deaaf2f3
EC
9092003-07-28 Eric Christopher <echristo@redhat.com>
910
911 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
912 (ppc_elf_install_value): New function.
913 (ppc_elf_sort_rela): Remove.
914 (ppc_elf_relax_section): Rewrite. Remove old relaxation
915 and replace with out of range branch stubs.
916 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
917
709e685d
AO
9182003-07-29 Alexandre Oliva <aoliva@redhat.com>
919
920 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
921 from input_bfd.
922
36c506c5
AM
9232003-07-28 Alan Modra <amodra@bigpond.net.au>
924
925 * elf.c (special_sections): Set attributes for .got and .plt.
926
5d35169e
AM
9272003-07-27 Alan Modra <amodra@bigpond.net.au>
928
929 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
930 on function descriptors.
931 (ELIMINATE_COPY_RELOCS): Expand comment.
932 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
933 Do include ".toc1".
934
3cddba1e
L
9352003-07-25 H.J. Lu <hongjiu.lu@intel.com>
936
937 * elf.c (_bfd_elf_new_section_hook): Set the default section
938 type to SHT_NULL.
939 (elf_fake_sections): Set the section type based on asect->flags
940 if it is SHT_NULL. Don't abort on processor specific section
941 types.
942
d622ef4b
L
9432003-07-25 H.J. Lu <hongjiu.lu@intel.com>
944
945 * bfd-in2.h: Regenerated.
946
2f89ff8d
L
9472003-07-25 H.J. Lu <hongjiu.lu@intel.com>
948
949 * elf-bfd.h (bfd_elf_special_section): New.
950 (elf_backend_data): Add special_sections, a pointer to
951 bfd_elf_special_section.
952 (elf_section_type). New.
953 (elf_section_flags): New.
954 (_bfd_elf_get_sec_type_attr): New.
955
956 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
957 real section type/flags.
958 (special_sections): New.
959 (get_special_section): New.
960 (_bfd_elf_get_sec_type_attr): New.
961 (_bfd_elf_new_section_hook): Check special_section to set
962 elf_section_type and elf_section_flags.
963 (elf_fake_sections): Don't use section name to set ELF section
964 data.
965
966 * elf32-m32r.c (m32r_elf_special_sections): New.
967 (elf_backend_special_sections): Defined.
968
969 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
970 (elf_backend_special_sections): Defined.
971
972 * elf32-mcore.c (mcore_elf_special_sections): New.
973 (elf_backend_special_sections): Defined.
974
975 * elf32-ppc.c (ppc_elf_special_sections): New.
976 (elf_backend_special_sections): Defined.
977
978 * elf32-sh64.c (sh64_elf_special_sections): New.
979 (elf_backend_special_sections): Defined.
980
981 * elf32-v850.c (v850_elf_special_sections): New.
982 (elf_backend_special_sections): Defined.
983
984 * elf32-xtensa.c (elf_xtensa_special_sections): New.
985 (elf_backend_special_sections): Defined.
986
987 * elf64-alpha.c (elf64_alpha_special_sections): New.
988 (elf_backend_special_sections): Defined.
989
990 * elf64-hppa.c (elf64_hppa_special_sections): New.
991 (elf_backend_special_sections): Defined.
992
993 * elf64-ppc.c (ppc64_elf_special_sections): New.
994 (elf_backend_special_sections): Defined.
995
996 * elf64-sh64.c (sh64_elf64_special_sections): New.
997 (elf_backend_special_sections): Defined.
998
999 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1000 (elf_backend_special_sections): Defined.
1001
1002 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1003
1004 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1005 (elf_backend_special_sections): Defined.
1006
1007 * elfxx-target.h (elf_backend_special_sections): New. Default
1008 to NULL.
1009 (elfNN_bed): Initialize special_sections.
1010
1011 * section.c (bfd_abs_section): Remove const.
1012 (bfd_und_section): Likewise.
1013 (bfd_com_section): Likewise.
1014 (bfd_ind_section): Likewise.
1015
20650579
NC
10162003-07-24 Nick Clifton <nickc@redhat.com>
1017
1018 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1019 sections are assigned the LOAD attribute.
1020
deaaf2f3 10212003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
1022
1023 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1024 * elf32-sh64-com.c: Likewise.
1025 * elf32-sh64.c: Likewise.
1026 * elf32-sh64.h: Likewise.
1027 * elf64-sh64.c: Likewise.
1028
3d85aebe
KK
10292003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1030
1031 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1032 (allocate_dynrelocs): Likewise.
1033 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1034 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1035
834d807b
NC
10362003-07-24 Nick Clifton <nickc@redhat.com>
1037
1038 * po/fr.po: Updated French translation.
1039
571b5725
BW
10402003-07-23 Bob Wilson <bob.wilson@acm.org>
1041
1042 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1043 near the beginning of the file. Swap order of arguments. Call
1044 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1045 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1046 (elf_xtensa_relocate_section): Likewise.
1047 (shrink_dynamic_reloc_sections): Likewise.
1048
b536dc1e
BW
10492003-07-23 Bob Wilson <bob.wilson@acm.org>
1050
1051 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1052 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1053 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1054 first printing an error message.
1055 (elf_xtensa_finish_dynamic_sections): Likewise.
1056 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1057 discarding literal table entries.
1058 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1059 (elf_xtensa_do_asm_simplify): Likewise.
1060
7f888330
SC
10612003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1062
1063 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1064 we have a local symbol in common section.
1065
ecc27c31
L
10662003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1067
1068 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1069 weak symbols.
1070
f9f3cf65
NC
10712003-07-22 Nick Clifton <nickc@redhat.com>
1072
1073 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1074 expected RS6000 storage classes.
1075
bb32e54f
L
10762003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1077
1078 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1079 output_bfd unused to silence gcc.
1080
796f2a93
NC
10812003-07-21 Nick Clifton <nickc@redhat.com>
1082
1083 * po/sv.po: Updated Swedish translation.
1084
f6c52c13
AM
10852003-07-21 Alan Modra <amodra@bigpond.net.au>
1086
1087 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1088 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1089 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1090 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1091 now done in _bfd_elf_symbol_refs_local_p.
1092 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1093 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1094 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1095
aa37626c
L
10962003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1097
1098 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1099
1e364ec9
L
11002003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1101
1102 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1103 (SYMBOL_CALLS_LOCAL): Likewise.
1104
1105 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1106 immediately if symbol isn't defined locally.
1107
986a241f
RH
11082003-07-18 Richard Henderson <rth@redhat.com>
1109
1110 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1111 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1112 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1113 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1114 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1115 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1116 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1117 Update all callers to provide the relocation being resolved.
1118
ac4b3dd8
NC
11192003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1120
1121 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1122 targ_cflags.
1123
6c37ac4d
NC
11242003-07-17 Nick Clifton <nickc@redhat.com>
1125
1126 * po/es.po: New Spanish translation.
1127 * po/sv.po: New Swedish translation.
1128 * po/opcodes.pot: Regenerate.
1129
02e6ad56
RH
11302003-07-16 Richard Henderson <rth@redhat.com>
1131
1132 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1133 * elfxx-ia64.c, targets.c: Likewise.
1134
5686517c
RH
11352003-07-16 Richard Henderson <rth@redhat.com>
1136
1137 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1138 for symbols defined locally plus -Bsymbolic. Tidy logic.
1139
5a7ea749
RS
11402003-07-15 Richard Sandiford <rsandifo@redhat.com>
1141
1142 * archures.c (bfd_mach_mips7000): New.
1143 * bfd-in2.h: Regenerated.
1144 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1145 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1146 (mips_mach_extensions): Add an entry for it.
1147
76bff705
NC
11482003-07-14 Nick Clifton <nickc@redhat.com>
1149
1150 * po/tr.po: Update with latest version.
1151 * po/SRC-POTFILES.in: Regenerate.
1152 * po/bfd.pot: Regenerate.
1153 * Makfile.in: Regenerate.
1154 * configure: Regenerate.
1155
d0facd1b
NC
11562003-07-12 Jeff Baker <jbaker@qnx.com>
1157
1158 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1159 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1160 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1161 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1162
bcb9b88d
NC
11632003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1164
1165 * coffcode.h (coff_set_section_contents): Set the
1166 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1167
7a9823f1
RS
11682003-07-11 Richard Sandiford <rsandifo@redhat.com>
1169
1170 * bfd-in.h (bfd_h8300_pad_address): Declare.
1171 * bfd-in2.h: Regenerate.
1172 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1173 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1174 addresses before checking whether they can be relaxed.
1175 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1176 Don't complain about overflows in general 8-bit relocations.
1177 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1178 Fix handling of R_H8_DIR24A8.
1179
c6baf75e
RS
11802003-07-11 Richard Sandiford <rsandifo@redhat.com>
1181
1182 * elf32-h8300.c: Convert function prototypes and definitions
1183 to C90 syntax.
1184 * coff-h8300.c: Likewise.
1185 * cpu-h8300.c: Likewise.
1186
fce00800
AM
11872003-07-11 Alan Modra <amodra@bigpond.net.au>
1188
1189 * po/SRC-POTFILES.in: Regenerate.
1190 * po/bfd.pot: Likewise.
1191
e901de89
BW
11922003-07-10 Bob Wilson <bob.wilson@acm.org>
1193
1194 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1195 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1196 .xt.lit.plt section.
1197 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1198 and allocate memory for it.
1199 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1200 section to the .got.loc section.
1201 (elf_xtensa_finish_dynamic_sections): Fix up call to
1202 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1203 the address of .got.loc.
1204 (relax_property_section): Shrink .got.loc to match changes in any
1205 literal table section.
1206 (xtensa_is_property_section): Change to match
1207 xtensa_get_property_section_name.
1208 (xtensa_is_littable_section): New.
1209
eff26f78
L
12102003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1211
1212 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1213 -1LL.
1214
942e0f42
AM
12152003-07-10 Alan Modra <amodra@bigpond.net.au>
1216
1217 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1218 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1219 Run "make dep-am".
1220 * Makefile.in: Regenerate.
1221
73c3cd1c
AO
12222003-07-10 Alexandre Oliva <aoliva@redhat.com>
1223
1224 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1225 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1226 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1227 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1228 * elf32-am33lin.c: Rename global functions.
1229 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1230 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1231 * configure.in (bfd_elf32_am33lin_vec): Added.
1232 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1233 (elf32-am33lin.lo): List dependencies.
1234 * aclocal.m4, configure, Makefile.in: Rebuilt.
1235 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1236 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1237 ELF_ARCH was not defined before.
1238 (elf_symbol_leading_char): Define if not defined.
1239 * elf32-am33lin.c: Override the definitions above.
1240 * targets.c (bfd_elf32_am33lin_vec): New.
1241
03a12831
AO
12422003-07-09 Alexandre Oliva <aoliva@redhat.com>
1243
1244 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1245 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1246 pcrel_relocs_copied.
1247 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1248 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1249 ld-linux.so.2 to ld.so.1.
1250 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1251 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1252 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1253 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1254 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1255 .rela.* section contents with bfd_zalloc.
1256 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1257 * elf-m10300.c: Added declarations for functions missing them.
1258 Merge some shared-library changes from the i386 back-end. Use
1259 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1260 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1261 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1262 members of elf_link_hash_entry. Adjusted references.
1263 (mn10300_elf_final_link_relocate): dynobj was already loaded
1264 into a local variable, use it.
1265 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1266 * elf-m10300.c: Add missing function prototypes.
1267 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1268 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1269 relocation for dynamic relocations.
1270 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1271 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1272 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1273 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1274 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1275 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1276 adress is already known at the time we compute relaxations.
1277 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1278 and PLT32 to narrower relocations.
1279 * libbfd.h, bfd-in2.h: Rebuilt.
1280 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1281 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1282 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1283 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1284 BFD_RELOC_MN10300_RELATIVE): New relocs.
1285 * libbfd.h, bfd-in2.h: Rebuilt.
1286 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1287 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1288 fields.
1289 (elf_mn10300_howto): Defined new relocation types.
1290 (mn10300_reloc_map): Map them.
1291 (_bfd_mn10300_elf_create_got_section): New fn.
1292 (mn10300_elf_check_relocs): Handle PIC relocs.
1293 (mn10300_elf_final_link_relocate): Likewise.
1294 (mn10300_elf_relocate_section): Handle DSOs.
1295 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1296 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1297 elf_mn10300_pic_plt_entry): New.
1298 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1299 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1300 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1301 elf_mn10300_plt_reloc_offset: New macros.
1302 (ELF_DYNAMIC_INTERPRETER): Likewise.
1303 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1304 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1305 (_bfd_mn10300_elf_discard_copies): Likewise.
1306 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1307 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1308 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1309 (elf_backend_can_gc_sections,
1310 elf_backend_create_dynamic_sections,
1311 elf_backend_adjust_dynamic_sections,
1312 elf_backend_size_dynamic_sections,
1313 elf_backend_finish_dynamic_symbol,
1314 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1315 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1316 elf_backend_got_header_size, elf_backend_plt_header_size): New
1317 macros.
1318
b08fa4d3
AO
13192003-07-09 Alexandre Oliva <aoliva@redhat.com>
1320
1321 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1322 * elf-m10300.c (compute_function_info): Account for AM33
1323 registers in `movm' when computing stack space for `call' when
1324 linking for AM33/2.0 link.
1325 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1326 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1327 * bfd-in2.h: Rebuilt.
1328 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1329 * elf-m10300.c: Updated.
1330 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1331 * archures.c (bfd_mach_am332): Defined.
1332 * bfd-in2.h: Rebuilt.
1333 * cpu-m10300.c (bfd_am332_arch): Defined.
1334 (bfd_am33_arch): Chained with am33-2.
1335 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1336 (_bfd_mn10300_elf_final_write_processing): Likewise.
1337
201933ea
L
13382003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1339
1340 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1341
e717da7e
AM
13422003-07-10 Alan Modra <amodra@bigpond.net.au>
1343
1344 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1345 (struct ppc64_elf_obj_tdata): New.
1346 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1347 (ppc64_elf_mkobject): New function.
1348 (struct got_entry): Add "owner". Move "tls_type".
1349 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1350 (ppc64_elf_init_stub_bfd): New function.
1351 (create_got_section): Create header .got in dynobj. Create .got
1352 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1353 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1354 Look for dynobj .got, and test it.
1355 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1356 (update_local_sym_info): Likewise.
1357 (ppc64_elf_check_relocs): Likewise.
1358 (ppc64_elf_gc_sweep_hook): Likewise.
1359 (ppc64_elf_tls_optimize): Likewise.
1360 (allocate_dynrelocs): Likewise.
1361 (ppc64_elf_size_dynamic_sections): Likewise.
1362 (ppc64_elf_relocate_section): Likewise.
1363 (ppc64_elf_next_toc_section): Update comment.
1364 (toc_adjusting_stub_needed): Remove unneeded cast.
1365 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1366 testing section flags.
1367 (ppc64_elf_build_stubs): Likewise.
1368 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1369 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1370 (func_desc_adjust): Copy over dynamic info for undef weaks.
1371 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1372 (ppc64_elf_size_stubs): Update prototype.
1373 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1374 input sections rather than scanning dynobj.
1375
18ad015f
RS
13762003-07-09 Richard Sandiford <rsandifo@redhat.com>
1377
1378 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1379 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1380 (mips_elf_create_msym_section): Delete.
1381 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1382 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1383 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1384 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1385 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1386 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1387 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1388
e10609d3
RS
13892003-07-09 Richard Sandiford <rsandifo@redhat.com>
1390
1391 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1392 symbols protected.
1393
0d591ff7
RS
13942003-07-09 Richard Sandiford <rsandifo@redhat.com>
1395
1396 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1397 of relocations whose offset is -2.
1398
fdd07405
RS
13992003-07-09 Richard Sandiford <rsandifo@redhat.com>
1400
1401 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1402 forced-local symbols like other locals. Don't create relocations
1403 against STN_UNDEF in irix objects.
1404
d2fba50d
RS
14052003-07-09 Richard Sandiford <rsandifo@redhat.com>
1406
1407 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1408 compatible objects, add the values of defined external symbols
1409 to the addend.
1410
6eaa6adc
RS
14112003-07-09 Richard Sandiford <rsandifo@redhat.com>
1412
1413 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1414 initialize a GOT entry to the symbol's st_value.
1415
0c83546a
AM
14162003-07-08 Alan Modra <amodra@bigpond.net.au>
1417
43c40ab2
AM
1418 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1419 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1420 (ppc_elf_tdata): Define.
1421 (elf_local_ptr_offsets): Adjust.
1422 (ppc_elf_mkobject): New function.
1423 (bfd_elf32_mkobject): Define.
1424
0c83546a
AM
1425 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1426 * elfcore.h (elf_core_file_p): Likewise.
1427 * section.c (bfd_section_init): Remove prototype.
1428
58111eb7
AM
14292003-07-08 Alan Modra <amodra@bigpond.net.au>
1430
1431 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1432 field.
1433 (enum elf_linker_section_enum): Delete.
1434 (struct elf_linker_section): Delete.
1435 (struct elf_linker_section_pointers): Delete.
1436 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1437 Make linker_section_pointers a void**.
1438 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1439 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1440 of old item in elf-bfd.h.
1441 (struct elf_linker_section): Likewise.
1442 (struct elf_linker_section_pointers): Likewise.
1443 (elf_local_ptr_offsets): Define.
1444 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1445 (ppc_elf_link_hash_newfunc): Init it.
1446 (struct ppc_elf_link_hash_table): Add sbss.
1447 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1448 individual fields.
1449 (elf_create_linker_section): Fold into..
1450 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1451 Make rela section here if shared.
1452 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1453 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1454 clearing in a loop.
1455 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1456 section here.
1457 (ppc_elf_check_relocs): Adjust.
1458 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1459 creating .sbss by hand.
1460 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1461
15f8604d
JJ
14622003-07-04 Jakub Jelinek <jakub@redhat.com>
1463
1464 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1465 complain_overflow_bitfield.
1466 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1467 complain_overflow_bitfield.
1468
3368a7fb
JJ
14692003-07-04 Jakub Jelinek <jakub@redhat.com>
1470
1471 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1472 true even if -pie.
1473
9203ba99
JJ
14742003-07-04 Jakub Jelinek <jakub@redhat.com>
1475
1476 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1477 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1478 !info->executable.
1479 (get_fptr): For -pie create .opd as writable section and create
1480 .rela.opd as well.
1481 (elfNN_ia64_check_relocs): Change info->shared into
1482 !info->executable.
1483 (allocate_fptr): Likewise.
1484 (allocate_dynrel_entries): Account for a relative reloc for -pie
1485 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1486 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1487 section if -pie.
1488 (set_got_entry): Don't create a relative reloc if -pie
1489 want_ltoff_fptr for undefweak symbol.
1490 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1491 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1492 @fptr().
1493
1494 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1495 even if -pie.
1496 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1497 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1498 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1499 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1500 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1501 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1502 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1503 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1504 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1505
e0a868d1 15062003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1507
1508 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1509 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1510 <R_H8_DIR32A16>: Fix type of relocation.
1511
35cad4c4
KK
15122003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1513
1514 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1515 sections were created already. Remove unnecessary tests of
1516 the previous change.
1517
03151a5a
KK
15182003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1519
1520 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1521 bfd_make_section for existing sections.
1522
003d627e
AM
15232003-07-04 Alan Modra <amodra@bigpond.net.au>
1524
2293c499
AM
1525 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1526 create_got_section if we already have done so.
1527 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1528 (sh_elf_check_relocs): Likewise.
1529 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1530 htab->root.dynobj instead.
1531 (sh_elf_check_relocs): Likewise.
1532 (sh_elf_finish_dynamic_sections): Likewise.
1533
003d627e
AM
1534 * section.c (bfd_make_section): Return NULL for existing section.
1535
fa681e5d
AM
15362003-07-04 Alan Modra <amodra@bigpond.net.au>
1537
1538 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1539 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1540
1541 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1542 (_bfd_elf_find_pointer_linker_section): Likewise.
1543 (bfd_elf32_create_pointer_linker_section): Likewise.
1544 (bfd_elf32_finish_pointer_linker_section): Likewise.
1545 (bfd_elf64_create_pointer_linker_section): Likewise.
1546 (bfd_elf64_finish_pointer_linker_section): Likewise.
1547 (_bfd_elf_make_linker_section_rela): Likewise.
1548 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1549 (elf_finish_pointer_linker_section): Likewise.
1550 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1551 (_bfd_elf_create_linker_section): Move this function..
1552 (_bfd_elf_find_pointer_linker_section): ..and this..
1553 * elflink.h (elf_create_pointer_linker_section): ..and this..
1554 (elf_finish_pointer_linker_section): ..and this..
1555 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1556 calls.
1557 (elf_create_linker_section): Convert to C90, tidy.
1558 (elf_find_pointer_linker_section): Likewise.
1559 (elf_create_pointer_linker_section): Likewise.
1560 (elf_finish_pointer_linker_section): Likewise.
1561 * elf32-i370.c: Delete #if 0 code.
1562
772119ce
AM
15632003-07-02 Alan Modra <amodra@bigpond.net.au>
1564
1565 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1566 _restf* to be satisfied by shared libs, and always force them local.
1567 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1568 Correct test for "bl".
1569 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1570 primary opcode 31.
1571
bd1ea41b
MS
15722003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1573
1574 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1575 (s390_tls_reloc): New function.
1576 (elf_howto_table): Add long displacement relocations R_390_20,
1577 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1578 (elf_s390_reloc_type_lookup): Likewise.
1579 (elf_s390_check_relocs): Likewise.
1580 (elf_s390_gc_sweep_hook): Likewise.
1581 (elf_s390_relocate_section): Likewise.
1582 * elf64-s390.c: Same changes as for elf32-s390.c.
1583 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1584 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1585 BFD_RELOC_390_TLS_GOTIE20.
1586 * bfd-in2.h: Regenerate.
1587 * libbfd.h: Likewise.
1588
113202d6
AM
15892003-06-30 Alan Modra <amodra@bigpond.net.au>
1590
1591 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1592 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1593
c58b9523
AM
15942003-06-29 Alan Modra <amodra@bigpond.net.au>
1595
1596 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1597 Replace PTR with void *. Formatting.
1598 * archive64.c: Likewise.
1599 * archures.c: Likewise.
1600 * bfd-in.h: Likewise.
1601 * bfd.c: Likewise.
1602 * bfdio.c: Likewise.
1603 * bfdwin.c: Likewise.
1604 * cache.c: Likewise.
1605 * corefile.c: Likewise.
1606 * format.c: Likewise.
1607 * init.c: Likewise.
1608 * libbfd-in.h: Likewise.
1609 * libbfd.c: Likewise.
1610 * linker.c: Likewise.
1611 * opncls.c: Likewise.
1612 * reloc.c: Likewise.
1613 * section.c: Likewise.
1614 * simple.c: Likewise.
1615 * syms.c: Likewise.
1616 * targets.c: Likewise.
1617 * bfd-in2.h: Regenerate.
1618 * libbfd.h: Regenerate.
1619
1620 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1621 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1622 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1623 (bfd_getb64): Rewrite without parens.
1624 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1625 * cache.c (insert, snip): Remove INLINE.
1626 * linker.c (bfd_link_add_undef): Likewise.
1627
27482721
AJ
16282003-06-29 Andreas Jaeger <aj@suse.de>
1629
1630 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1631 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1632 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1633 trim plt entries. Move undefweak non-default visibility test ...
1634 (allocate_dynrelocs): ... from here.
1635 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1636 Change all callers.
1637 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1638 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1639 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1640 dynreloc and .got relocs.
1641 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1642 for .got relocs.
27482721 1643
2b86c02e
TS
16442003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1645
1646 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1647
e7c81c25
NC
16482003-06-27 Nick Clifton <nickc@redhat.com>
1649
1650 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1651 bfd_add_gnu_debuglink_section and only create the section, do not
1652 fill in its contents.
1653 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1654 contents of a .gnu-debuglink section.
1655 * bfd-in2.h: Regenerate.
1656
72b4917c
TS
16572003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1658
1659 * elfxx-mips.c: Revert .got alignment to 2**4.
1660
91709090
TS
16612003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1662
1663 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1664
7a79a000
TS
16652003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1666
1667 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1668 relocation header setup.
1669
e47cd125
AM
16702003-06-25 Alan Modra <amodra@bigpond.net.au>
1671
1672 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1673 (ppc_elf_reloc_type_lookup): Modify comment.
1674 (ppc_elf_info_to_howto): Ditto.
1675 (ppc_elf_relocate_section): Ditto.
1676 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1677
1049f94e
AM
16782003-06-25 Alan Modra <amodra@bigpond.net.au>
1679
1680 * aout-ns32k.c: Correct spelling of "relocatable".
1681 * aoutx.h: Likewise.
1682 * bfd-in.h: Likewise.
1683 * bfd.c: Likewise.
1684 * bout.c: Likewise.
1685 * coff-a29k.c: Likewise.
1686 * coff-alpha.c: Likewise.
1687 * coff-arm.c: Likewise.
1688 * coff-i386.c: Likewise.
1689 * coff-i860.c: Likewise.
1690 * coff-i960.c: Likewise.
1691 * coff-m68k.c: Likewise.
1692 * coff-m88k.c: Likewise.
1693 * coff-mcore.c: Likewise.
1694 * coff-mips.c: Likewise.
1695 * coff-or32.c: Likewise.
1696 * coff-ppc.c: Likewise.
1697 * coff-rs6000.c: Likewise.
1698 * coff-sh.c: Likewise.
1699 * coff-tic80.c: Likewise.
1700 * coff64-rs6000.c: Likewise.
1701 * cofflink.c: Likewise.
1702 * cpu-ns32k.c: Likewise.
1703 * ecoff.c: Likewise.
1704 * ecofflink.c: Likewise.
1705 * elf-bfd.h: Likewise.
1706 * elf-eh-frame.c: Likewise.
1707 * elf-hppa.h: Likewise.
1708 * elf-m10200.c: Likewise.
1709 * elf-m10300.c: Likewise.
1710 * elf.c: Likewise.
1711 * elf32-arm.h: Likewise.
1712 * elf32-avr.c: Likewise.
1713 * elf32-cris.c: Likewise.
1714 * elf32-d10v.c: Likewise.
1715 * elf32-dlx.c: Likewise.
1716 * elf32-fr30.c: Likewise.
1717 * elf32-frv.c: Likewise.
1718 * elf32-h8300.c: Likewise.
1719 * elf32-hppa.c: Likewise.
1720 * elf32-i370.c: Likewise.
1721 * elf32-i386.c: Likewise.
1722 * elf32-i860.c: Likewise.
1723 * elf32-i960.c: Likewise.
1724 * elf32-ip2k.c: Likewise.
1725 * elf32-iq2000.c: Likewise.
1726 * elf32-m32r.c: Likewise.
1727 * elf32-m68hc11.c: Likewise.
1728 * elf32-m68hc1x.c: Likewise.
1729 * elf32-m68k.c: Likewise.
1730 * elf32-mcore.c: Likewise.
1731 * elf32-mips.c: Likewise.
1732 * elf32-msp430.c: Likewise.
1733 * elf32-openrisc.c: Likewise.
1734 * elf32-ppc.c: Likewise.
1735 * elf32-s390.c: Likewise.
1736 * elf32-sh.c: Likewise.
1737 * elf32-sh64.c: Likewise.
1738 * elf32-sparc.c: Likewise.
1739 * elf32-v850.c: Likewise.
1740 * elf32-vax.c: Likewise.
1741 * elf32-xstormy16.c: Likewise.
1742 * elf32-xtensa.c: Likewise.
1743 * elf64-alpha.c: Likewise.
1744 * elf64-hppa.c: Likewise.
1745 * elf64-mips.c: Likewise.
1746 * elf64-mmix.c: Likewise.
1747 * elf64-ppc.c: Likewise.
1748 * elf64-s390.c: Likewise.
1749 * elf64-sh64.c: Likewise.
1750 * elf64-sparc.c: Likewise.
1751 * elf64-x86-64.c: Likewise.
1752 * elfcode.h: Likewise.
1753 * elflink.h: Likewise.
1754 * elfn32-mips.c: Likewise.
1755 * elfxx-ia64.c: Likewise.
1756 * elfxx-mips.c: Likewise.
1757 * i386linux.c: Likewise.
1758 * ieee.c: Likewise.
1759 * libcoff-in.h: Likewise.
1760 * linker.c: Likewise.
1761 * m68klinux.c: Likewise.
1762 * pdp11.c: Likewise.
1763 * pe-mips.c: Likewise.
1764 * peXXigen.c: Likewise.
1765 * reloc.c: Likewise.
1766 * reloc16.c: Likewise.
1767 * sparclinux.c: Likewise.
1768 * sunos.c: Likewise.
1769 * syms.c: Likewise.
1770 * versados.c: Likewise.
1771 * vms.c: Likewise.
1772 * xcofflink.c: Likewise.
1773 * bfd-in2.h: Regenerate.
1774 * libcoff.h: Regenerate.
1775 * libbfd.h: Regenerate.
1776
55fd94b0
AM
17772003-06-24 Alan Modra <amodra@bigpond.net.au>
1778
d85f2c7d
AM
1779 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1780 local sym errors.
1781
55fd94b0
AM
1782 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1783 prototypes and casts. Replace PTR with void *. Formatting.
1784 * elf32-ppc.c: Likewise. Break long strings too.
1785 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1786 (ppc_elf_unhandled_reloc): Internationalize error message.
1787 * elf32-ppc.h: Remove PARAMS.
1788
88810f8c
MM
17892003-06-23 Mark Mitchell <mark@codesourcery.com>
1790
1791 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1792 APUinfo slots.
1793 (ppc_elf_final_write_processing): Likewise.
1794
6e35c4da
L
17952003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1796
1797 * elflink.h (elf_link_input_bfd): Check raw size when using
1798 kept_section to preserve debug information discarded by
1799 linkonce.
1800
8f3bab57
AM
18012003-06-20 Alan Modra <amodra@bigpond.net.au>
1802
1803 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1804 (ppc64_elf_setup_section_lists): Set it.
1805 (ppc64_elf_relocate_section): Check sym section id against top_id.
1806 (ppc_build_one_stub): Comment on top_id.
1807
efbc813e
NC
18082003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1809
1810 * config.bfd: Add tic4x-*-rtems*.
1811
4ce794b7
AM
18122003-06-20 Alan Modra <amodra@bigpond.net.au>
1813
1814 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1815 prototypes and casts. Replace PTR with void *. Format copyright.
1816 Mention ABI links.
1817 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1818 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1819 (ppc_type_of_stub): Make r_type an enum.
1820 (ppc64_elf_size_stubs): Likewise.
1821 * elf64-ppc.h: Remove PARAMS macro.
1822
d2a300cf
AM
18232003-06-19 Alan Modra <amodra@bigpond.net.au>
1824
3254fd24
AM
1825 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1826 elf hash tab fields.
1827
d2a300cf
AM
1828 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1829 (ppc64_elf_info_to_howto): Likewise.
1830 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1831 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1832
83615de0
AM
18332003-06-19 Alan Modra <amodra@bigpond.net.au>
1834
1835 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1836 reloc overflow on discarded eh_frame entries.
1837
9b5ecbd0
AM
18382003-06-19 Alan Modra <amodra@bigpond.net.au>
1839
1840 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1841 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1842 Return error condition.
1843 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1844 that have has_gp_reloc set.
1845 (struct ppc_link_hash_table): Add stub_count.
1846 (ppc_build_one_stub): Increment it.
1847 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1848 individual fields.
1849 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1850
64c456e1
AM
18512003-06-18 Alan Modra <amodra@bigpond.net.au>
1852
1853 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1854 size calculation from addend. Round size up.
1855
3dab95d3
HPN
18562003-06-18 Hans-Peter Nilsson <hp@axis.com>
1857
1858 * elf32-cris.c (cris_elf_relocate_section) <case
1859 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1860 symbol from a normal object or an undefined weak symbol.
1861
0b13192e
AM
18622003-06-18 Alan Modra <amodra@bigpond.net.au>
1863
1864 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1865 R_PPC64_TOC relocs.
1866
f97b9cb8
L
18672003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1868
1869 * section.c (struct sec): Put back kept_section.
1870 (STD_SECTION): Put back kept_section initialization.
1871 * bfd-in2.h: Regenerate.
1872
1873 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1874 sections for relocateable output. Use kept_section to preserve
1875 debug information discarded by linkonce.
1876
9f1c3a0a
L
18772003-06-17 Roland McGrath <roland@redhat.com>
1878
1879 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1880 segment-relative relocation between different segments.
1881
734b6cf9
AM
18822003-06-17 Alan Modra <amodra@bigpond.net.au>
1883
1cf1f670
AM
1884 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1885 optimizations earlier.
1886
734b6cf9
AM
1887 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1888 Restore previous input_list type.
1889 (ppc64_elf_link_hash_table_create): Undo last change.
1890 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1891 per output section, but don't bother with bfd_abs_section marker.
1892 (ppc64_elf_next_input_section): Adjust for multiple input section
1893 lists.
1894 (group_sections): Likewise.
1895
23fbd6fa
JJ
18962003-06-17 Jakub Jelinek <jakub@redhat.com>
1897
1898 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1899 *r_offset == r_addend for RELATIVE relocs against .got.
1900
dad27d18
AM
19012003-06-17 Alan Modra <amodra@bigpond.net.au>
1902
1903 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1904
b613960a
NC
19052003-06-17 Nick Clifton <nickc@redhat.com>
1906
1907 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1908 in the vtable_entries_used array to allow for the accessing
1909 the largest element.
b613960a 1910
000732f7
AM
19112003-06-17 Alan Modra <amodra@bigpond.net.au>
1912
3d6f9012
AM
1913 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1914 input_list.
1915 (ppc64_elf_link_hash_table_create): Init input_list here.
1916 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1917 per output section. Set toc_off for abs and other standard sections.
1918 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1919 (ppc64_elf_next_input_section): Adjust for single input section list.
1920 Don't set toc_curr from input bfds that haven't set elf_gp.
1921 (group_sections): Adjust for single input section list.
1922
000732f7
AM
1923 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1924
81407a69
AM
19252003-06-16 Alan Modra <amodra@bigpond.net.au>
1926
1927 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1928 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1929 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1930 got section for RELATIVE relocs. Fix wrong comment. Change condition
1931 under which dynamic relocs update the section contents.
1932
a06a29f2
NC
19332003-06-13 Robert Millan <zeratul2@wanadoo.es>
1934
1935 * config.bfd: Add i386-netbsd-gnu target.
1936
7d1ebfb2
NC
19372003-06-12 Nick Clifton <nickc@redhat.com>
1938
1939 * opncls.c (calc_crc32): Rename to
1940 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1941 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1942 hard-coded ".gnu_debuglink" in the code.
81407a69 1943 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1944 xmalloc with a call to malloc.
81407a69 1945 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1946 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1947 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1948 section to a bfd.
1949 * bfd-in2.h: Regenerate.
1950
19512003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1952
7d1ebfb2
NC
1953 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1954 New target (was i[3-7]86-*-openbsd* before).
1955 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1956 (vax-*-openbsd*): New target.
1957
d80dcc6a
TS
19582003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1959
1960 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1961 for n32, too.
1962 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1963 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1964 (mips_elf_create_got_section): Likewise.
1965 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1966
a7ebbfdf
TS
19672003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1968
1969 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1970 (elf_mips_howto_table_rel): Use it.
1971 (gprel32_with_gp): Move prototype.
1972 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1973 Use mips_elf_generic_reloc.
1974 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1975 Code cleanup.
1976 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1977 zero addend.
1978 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1979 as in the other *_gprel*_reloc functions.
1980 (gprel32_with_gp): Handle partial_inplace properly.
1981 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1982 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1983 Do addend handling directly instead of calling
1984 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1985 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1986 of zero addend. Handle partial_inplace properly.
1987 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1988 addend.
1989 (mips_elf64_gprel16_reloc): Likewise.
1990 (mips_elf64_literal_reloc): Likewise.
1991 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1992 logic as in the other *_gprel*_reloc functions. Handle
1993 partial_inplace properly.
1994 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1995 addend. Handle partial_inplace properly.
1996 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1997 of calling _bfd_mips_elf_gprel16_with_gp.
1998 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1999 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2000 of zero addend.
2001 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2002 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2003 of calling _bfd_mips_elf_gprel16_with_gp.
2004 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2005 partial_inplace properly. Fix wrong addend handling. Fix overflow
2006 check.
2007 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2008 exported.
2009 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2010 (_bfd_mips_elf_relocate_section): Likewise.
2011 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2012 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2013 (_bfd_mips_elf_sign_extend): New prototype.
2014
49ba19a4 20152003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2016
49ba19a4
NC
2017 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2018 New target (was sparc-*-openbsd* before).
2019 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 2020
de6e5e1a
NC
2021 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2022 * configure: Regenerate.
2023
3b443373
L
20242003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2025
2026 * po/Make-in (DESTDIR): New.
2027 (install-data-yes): Support $(DESTDIR).
2028 (uninstall): Likewise.
2029
795bb480
AM
20302003-06-11 Alan Modra <amodra@bigpond.net.au>
2031
2032 * Makefile.am (config.status): Depend on version.h.
2033 Run "make dep-am".
2034 * Makefile.in: Regenerate.
2035 * po/SRC-POTFILES.in: Regenerate.
2036
adadcc0c
AM
20372003-06-10 Alan Modra <amodra@bigpond.net.au>
2038 Gary Hade <garyhade@us.ibm.com>
2039
2040 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2041
f4984206
RS
20422003-06-10 Richard Sandiford <rsandifo@redhat.com>
2043
2044 * archures.c (bfd_mach_h8300sxn): New architecture.
2045 * bfd-in2.h: Regenerate.
2046 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2047 (h8300sxn_info_struct): New.
2048 (h8300sx_info_struct): Link to it.
2049 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2050 (elf32_h8_final_write_processing): Likewise.
2051
ad8e1ba5
AM
20522003-06-08 Alan Modra <amodra@bigpond.net.au>
2053
2054 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2055 elfxx-target.h so that we can use elf_backend_got_header_size.
2056 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2057 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2058 associated macros.
2059 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2060 dst_mask.
2061 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2062 ppc_stub_plt_branch_r2off.
2063 (struct ppc_stub_hash_entry): Reorganize.
2064 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2065 toc_curr, toc_off and emit_stub_syms.
2066 (ppc64_elf_link_hash_table_create): Init them.
2067 (ppc_stub_name): Correct string size.
2068 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2069 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2070 used.
2071 (ppc_type_of_stub): Tweak root.type test.
2072 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2073 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2074 ppc_stub_plt_branch_r2off.
2075 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2076 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2077 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2078 Initialize elf_gp and toc_curr.
2079 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2080 (ppc64_elf_next_input_section): Set toc_off.
2081 (group_sections): Ensure groups have the same TOC.
2082 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2083 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2084 Build new glink stub.
2085 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2086 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2087 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2088 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2089 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2090 (STD_SECTION): Update.
2091 * ecoff.c (bfd_debug_section): Update comment.
2092 * bfd-in2.h: Regenerate.
2093
90fff0d4
DJ
20942003-06-05 Daniel Jacobowitz <drow@mvista.com>
2095
2096 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2097 NULL function pointers.
2098
c82b20e4
DJ
20992003-06-05 Daniel Jacobowitz <drow@mvista.com>
2100
2101 * simple.c (bfd_simple_get_relocated_section_contents): Call
2102 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2103
53d4437a
SS
21042003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2105
5a5b9651
SS
2106 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2107 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2108 swaptables.
2109 * coff-tic4x.c: Ditto
53d4437a
SS
2110 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2111 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
2112 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2113 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2114 swap tables.
53d4437a
SS
2115 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2116 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2117 * coff-apollo.c: Ditto
2118 * coff-arm.c: Ditto
2119 * coff-h8300.c: Ditto
2120 * coff-h8500.c: Ditto
2121 * coff-i960.c: Ditto
2122 * coff-m68k.c: Ditto
2123 * coff-m88k.c: Ditto
2124 * coff-mcore.c: Ditto
2125 * coff-sh.c: Ditto
2126 * coff-sparc.c: Ditto
2127 * coff-tic80.c: Ditto
2128 * coff-we32k.c: Ditto
2129 * coff-z8k.c: Ditto
2130 * coff-w65.c: Ditto
2131
736694c8
SS
21322003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2133
2134 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2135 initialization bug
2136
9ee5e499
JJ
21372003-06-03 Jakub Jelinek <jakub@redhat.com>
2138
2139 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2140 (bfd_section_from_phdr): Likewise.
2141 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2142 (get_program_header_size): Count with PT_GNU_STACK.
2143 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2144 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2145
6f6f27f8
L
21462003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2147
2148 * elflink.h (elf_link_input_bfd): Call linker error_handler
2149 for discarded definitions.
2150
a3b6428f
NC
21512003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2152
2153 * syms.c (decode_section_type): Return 'n' if section flags are
2154 SEC_HAS_CONTENTS && SEC_READONLY.
2155
e30ddb24
NC
21562003-06-03 Nick Clifton <nickc@redhat.com>
2157
2158 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2159 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2160 (v850_elf_reloc_map): Likewise.
2161 (v850_elf_check_relocs): Likewise.
2162 (v850_elf_perform_relocation): Likewise.
2163 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2164 to make R_V850_REl32 pc-relative.
adadcc0c 2165
2558b9a9
KK
21662003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2167
2168 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2169 and DT_DEBUG dynamic tag even for position independent executables.
2170 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2171
f15398ef
DJ
21722003-06-02 Daniel Jacobowitz <drow@mvista.com>
2173
2174 * config.bfd: Move obsolete entries out of the range of the
2175 targmatch sed script.
2176
cad28985
DJ
21772003-06-02 Daniel Jacobowitz <drow@mvista.com>
2178
2179 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2180
f2c822e3
JJ
21812003-05-31 Jakub Jelinek <jakub@redhat.com>
2182
2183 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2184 plt entries, not just 8191.
2185
c9c27aad
DJ
21862003-05-30 Daniel Jacobowitz <drow@mvista.com>
2187
2188 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2189 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2190
36af4a4e
JJ
21912003-05-30 Ulrich Drepper <drepper@redhat.com>
2192 Jakub Jelinek <jakub@redhat.com>
2193
2194 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2195 instead of info->shared where appropriate.
2196 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2197 * elflink.c (_bfd_elf_create_got_section): Likewise.
2198 (_bfd_elf_link_create_dynamic_sections): Likewise.
2199 (_bfd_elf_link_assign_sym_version): Likewise.
2200 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2201 and DT_DEBUG dynamic tag even for position independent executables.
2202 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2203 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2204 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2205 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2206 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2207 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2208 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2209 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2210 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2211
f8843e87
AM
22122003-05-30 Kris Warkentin <kewarken@qnx.com>
2213
2214 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2215 signalled thread.
2216 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2217
29e1a6e4
NC
22182003-05-29 Nick Clifton <nickc@redhat.com>
2219
2220 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2221 Tidy up formatting.
2222 * Makefile.am: Add dependency on safe-ctype.h.
2223 * Makefile.in: Regenerate.
2224
4b555070
TS
22252003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2226
2227 * elfxx-mips.c: Don't force symbols local unconditionally.
2228
0236e03e
L
22292003-05-28 Alan Modra <amodra@bigpond.net.au>
2230
2231 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2232 undefined_symbol call.
2233
9e4aeb93
RS
22342003-05-27 Richard Sandiford <rsandifo@redhat.com>
2235
2236 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2237 (mips_elf_link_hash_table): Likewise.
2238
d0c728db
TS
22392003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2240
2241 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2242 R_MIPS_GNU_REL16_S2 support.
2243 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2244 (mips_elf64_rtype_to_howto): Use it.
2245 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2246 R_MIPS_GNU_REL16_S2 support.
2247 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2248 (mips_elf_n32_rtype_to_howto): Use it.
2249
759ebd76
DA
22502003-05-21 Stuart F. Downing <sdowning@fame.com>
2251
2252 * som.h: Define PA_2_0 before including a.out.h
2253
143d77c5
EC
22542003-05-07 Eric Christopher <echristo@redhat.com>
2255 Alexandre Oliva <aoliva@redhat.com>
2256
2257 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2258 pic tests, change to warning.
2259 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2260
cea3d58d
NC
22612003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2262
2263 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2264 well as shle-...-netbsdelf. Remove duplicate entry.
2265
385a4c14
NC
22662003-05-21 Nick Clifton <nickc@redhat.com>
2267
60e42408
NC
2268 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2269 for X_STORMY16_REL_12 reloc.
2270
385a4c14 2271 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2272 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2273 (bfd_elf_get_runpath_list): Likewise.
2274
129b8c20
RM
22752003-05-19 Roland McGrath <roland@redhat.com>
2276
2277 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2278 * bfd-in.h: Declare it.
2279 * bfd-in2.h: Regenerated.
2280 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2281 * elf-bfd.h (struct elf_backend_data): New function pointer member
2282 elf_backend_bfd_from_remote_memory.
2283 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2284 Declare them.
2285 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2286 (elfNN_bed): Add that to the initializer.
2287
22882003-05-15 Roland McGrath <roland@redhat.com>
2289
2290 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2291
22d5e339
L
22922003-05-20 Jakub Jelinek <jakub@redhat.com>
2293
2294 * elflink.h (elf_link_output_extsym): Only issue error about !=
2295 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2296
22972003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2298
2299 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2300 when removing the old definition for symbols with non-default
2301 visibility.
2302
b645cb17
JE
23032003-05-18 Jason Eckhardt <jle@rice.edu>
2304
2305 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2306
d2ff124f
AS
23072003-05-17 Andreas Schwab <schwab@suse.de>
2308
2309 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2310 elf_section_data during processing of pc-relative and absolute
2311 relocations.
2312 (elf_m68k_relocate_section): Use the cached reloc section instead
2313 of computing it again. Fix handling of visibility. Don't modify
2314 addend when copying over a relocation into the output.
2315
9c7a29a3
AM
23162003-05-17 Alan Modra <amodra@bigpond.net.au>
2317
2318 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2319 to trim plt entries. Move undefweak non-default visibility test..
2320 (allocate_dynrelocs): ..from here.
2321 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2322 dynamic_sections_created here. Update comment. Move undefweak
2323 non-default visibility test..
2324 (allocate_dynrelocs): ..from here. Fix comment.
2325 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2326 to trim plt entries. Move undefweak non-default visibility test..
2327 (allocate_dynrelocs): ..from here. Fix comment.
2328 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2329 STV_DEFAULT rather than comparing with zero.
2330 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2331 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2332
9bcf4de0
TS
23332003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2334
2335 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2336 pointers.
2337 (_bfd_set_gp_value): Likewise.
2338
5d1db417
MS
23392003-05-16 Michael Snyder <msnyder@redhat.com>
2340 From Bernd Schmidt <bernds@redhat.com>
2341 * archures.c (bfd_mach_h8300sx): New.
2342 * bfd-in2.h: Regenerate.
2343 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2344 (h8300sx_info_struct): New.
2345 (h8300s_info_struct): Link to it.
2346 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2347 (elf32_h8_final_write_processing): Likewise.
2348 (elf32_h8_relax_section): Likewise.
2349
80c7c40a
NC
23502003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2351
2352 * config.bfd: Accept i[3-7]86 variants.
2353 * configure.host: Likewise.
2354 * configure.in: Likewise.
2355 * configure: Regenerate.
2356
c1be741f
L
23572003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2358
2359 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2360 symbol.
2361
a15d9d3a
L
23622003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2363
2364 * elflink.h (elf_link_check_versioned_symbol): Also allow
2365 the base version.
2366
09695f56
AM
23672003-05-15 Alan Modra <amodra@bigpond.net.au>
2368 H.J. Lu <hongjiu.lu@intel.com>
2369
2370 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2371 (elf_i386_relocate_section): Likewise.
2372 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2373 (ppc_elf_relocate_section): Likewise.
2374 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2375 (ppc64_elf_relocate_section): Likewise.
2376
40f62fa0
TS
23772003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2378
2379 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2380
47247ced
SC
23812003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2382
2383 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2384 processor capability, allow merge of HC12 and HCS12 in some cases.
2385 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2386 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2387 (bfd_m68hc12_arch): Link it.
2388 (scan_mach): New function.
2389
32dfa85d
AH
23902003-05-13 Andrew Haley <aph@redhat.com>
2391
2392 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2393
586119b3
AM
23942003-05-13 Alan Modra <amodra@bigpond.net.au>
2395 H.J. Lu <hongjiu.lu@intel.com>
2396
2397 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2398 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2399 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2400 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2401 (ppc_elf_relocate_section): Likewise.
2402 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2403 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2404 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2405 relocs need no other types.
2406 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2407 dynreloc check.
2408 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2409 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2410 .got relocs.
2411
04e534c3
KK
24122003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2413
2414 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2415 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2416 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2417 visibility, a) don't allocate plt entries, b) don't allocate
2418 .got relocs, c) discard dyn rel space
adadcc0c
AM
2419 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2420 don't generate dynamic relocs.
04e534c3
KK
2421 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2422 for weakdefs when symbol already adjusted.
2423
0afb2dc0
NC
24242003-05-12 Nick Clifton <nickc@redhat.com>
2425
2426 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2427 overflow detection for R_XSTORMY16_16 reloc.
2428
9d29900b
NC
24292003-05-12 Paul Clarke <paulc@senet.com.au>
2430
2431 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2432
a48c6a54
JE
24332003-05-11 Jason Eckhardt <jle@rice.edu>
2434
2435 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2436 adjust upper bits.
2437 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2438 proper place.
2439 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2440 proper place.
2441
44f745a6
AS
24422003-05-11 Andreas Schwab <schwab@suse.de>
2443
2444 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2445 complicated tests for unresolvable relocs with a simple direct
2446 scheme using "unresolved_reloc" var. Report some detail on
2447 bfd_reloc_outofrange and similar errors.
2448
4ec72bde
MS
24492003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2450
2451 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2452 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2453 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2454 * elf64-s390.c: Likewise.
2455
64285810
MS
24562003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2457
2458 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2459 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2460 ELF_LINK_NON_GOT_REF from weakdef.
2461 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2462 already been adjusted before treating it specially.
2463 * el64-s390.c: Likwise.
2464
82058a73
MS
24652003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2466
2467 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2468 non-default visibility, a) don't make them dynamic, b) discard
2469 space for dynamic relocs.
2470 (elf_s390_relocate_section): Initialize the GOT entries and skip
2471 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2472 symbols with non-default visibility.
2473 * elf64-s390.c: Likewise.
2474
60d8b524
AM
24752003-05-09 Alan Modra <amodra@bigpond.net.au>
2476
2477 * cpu-arm.c (arm_check_note): Warning fix.
2478 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2479 to keep relocs if edited.
2480 (iq2000_elf_print_private_bfd_data): Return TRUE.
2481 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2482 ELF64_R_SYM.
2483 (elfNN_ia64_relax_ldxmov): Warning fix.
2484 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2485 * xtensa-modules.c (get_num_opcodes): Warning fix.
2486
e57b5356
AM
24872003-05-09 Andrey Petrov <petrov@netbsd.org>
2488
2489 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2490
45d6a902
AM
24912003-05-09 Alan Modra <amodra@bigpond.net.au>
2492
2493 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2494 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2495 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2496 (bfd_elf_record_link_assignment): Move from elflink.h.
2497 (_bfd_elf_merge_symbol): Likewise.
2498 (_bfd_elf_add_default_symbol): Likewise.
2499 (_bfd_elf_export_symbol): Likewise.
2500 (_bfd_elf_link_find_version_dependencies): Likewise.
2501 (_bfd_elf_link_assign_sym_version): Likewise.
2502 (_bfd_elf_link_read_relocs): Likewise.
2503 (_bfd_elf_link_size_reloc_section): Likewise.
2504 (_bfd_elf_fix_symbol_flags): Likewise.
2505 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2506 (_bfd_elf_link_sec_merge_syms): Likewise.
2507 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2508 and bed->s->sizeof_rela.
2509 (_bfd_elf_link_output_relocs): Likewise.
2510 * elf-bfd.h (struct elf_size_info): Rename file_align to
2511 log_file_align.
2512 (struct elf_info_failed): Move from elflink.h.
2513 (struct elf_assign_sym_version_info): Likewise.
2514 (struct elf_find_verdep_info): Likewise.
2515 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2516 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2517 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2518 _bfd_elf_link_assign_sym_version,
2519 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2520 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2521 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2522 _bfd_elf_link_sec_merge_syms): Declare.
2523 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2524 (_bfd_elf32_link_read_relocs): Likewise.
2525 (bfd_elf64_link_create_dynamic_sections): Likewise.
2526 (_bfd_elf64_link_read_relocs): Likewise.
2527 * elflink.h: Move lots o' stuff elsewhere.
2528 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2529 (bfd_elf64_record_link_assignment): Likewise.
2530 (bfd_elf_record_link_assignment): Declare.
2531 * bfd-in2.h: Regenerate.
2532 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2533 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2534 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2535 (assign_file_positions_for_segments): Likewise.
2536 (assign_file_positions_except_relocs): Likewise.
2537 (swap_out_syms, elfcore_write_note): Likewise.
2538 * elf-m10200.c: Adjust for changed function names.
2539 * elf-m10300.c: Likewise.
2540 * elf32-arm.h: Likewise.
2541 * elf32-h8300.c: Likewise.
2542 * elf32-hppa.c: Likewise.
2543 * elf32-ip2k.c: Likewise.
2544 * elf32-m32r.c: Likewise.
2545 * elf32-m68hc11.c: Likewise.
2546 * elf32-m68hc1x.c: Likewise.
2547 * elf32-m68k.c: Likewise.
2548 * elf32-mips.c: Likewise.
2549 * elf32-ppc.c: Likewise.
2550 * elf32-sh.c: Likewise.
2551 * elf32-v850.c: Likewise.
2552 * elf32-xtensa.c: Likewise.
2553 * elf64-alpha.c: Likewise.
2554 * elf64-hppa.c: Likewise.
2555 * elf64-mmix.c: Likewise.
2556 * elf64-ppc.c: Likewise.
2557 * elf64-sh64.c: Likewise.
2558 * elfxx-ia64.c: Likewise.
2559 * elfxx-mips.c: Likewise.
2560 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2561 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2562 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2563 * elf64-mips.c (mips_elf64_size_info): Likewise.
2564 * elf64-s390.c (s390_elf64_size_info): Likewise.
2565 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2566
bf1e742e
L
25672003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2568
2569 * elflink.h (elf_add_default_symbol): After skipping the
2570 unversioned symbol, go to non-default one.
2571
6a32c710
L
25722003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2573
2574 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2575 want_plt field.
2576 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2577 for symbols with non-default visibility.
2578
71552942
L
25792003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2580
2581 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2582 case that a DSO references a hidden symbol which may be
2583 satisfied by a versioned symbol in another DSO.
2584 (elf_link_output_extsym): Check versioned definition for hidden
2585 symbol referenced by a DSO.
2586
208c2cd6
NC
25872003-05-07 Nick Clifton <nickc@redhat.com>
2588
2589 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2590 R_XSTORMY16_16 reloc to ignore overflows.
2591
aa701218
AO
25922003-05-06 Alexandre Oliva <aoliva@redhat.com>
2593
2594 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2595 error message for mixing different-endian files. Check for ABI
2596 compatibility of input files with the selected emulation.
2597
4e795f50
AM
25982003-05-05 Alan Modra <amodra@bigpond.net.au>
2599
2600 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2601 non-default visibility, a) don't make them dynamic, b) discard
2602 space for dynamic relocs.
2603 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2604
2605 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2606 non-default visibility, a) don't allocate plt entries, b) don't
2607 allocate .got relocs, c) discard dyn rel space,
2608 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2609 don't generate dynamic relocs.
2610 * elf64-ppc.c (allocate_dynrelocs): As above.
2611 (ppc64_elf_relocate_section): As above.
2612
4bc6e03a
AJ
26132003-05-05 Andreas Jaeger <aj@suse.de>
2614
2615 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2616 relocation entries for weak undefined symbols with non-default
2617 visibility.
2618 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2619 skip R_386_32/R_386_PC32 for weak undefined symbols with
2620 non-default visibility.
2621
ef5aade5
L
26222003-05-04 H.J. Lu <hjl@gnu.org>
2623
2624 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2625 relocation entries for weak undefined symbols with non-default
2626 visibility.
2627 (elf_i386_relocate_section): Initialize the GOT entries and
2628 skip R_386_32/R_386_PC32 for weak undefined symbols with
2629 non-default visibility.
129b8c20 2630
ef5aade5
L
2631 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2632 descriptors for weak undefined symbols with non-default
2633 visibility.
2634 (allocate_dynrel_entries): Don't allocate relocation entries
2635 for symbols resolved to 0.
2636 (set_got_entry): Don't install dynamic relocation for weak
2637 undefined symbols with non-default visibility.
2638 (set_pltoff_entry): Likewise.
2639
2640 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2641 with non-default visibility.
2642 (elf_link_output_extsym): Don't make weak undefined symbols
2643 with non-default visibility dynamic.
2644
c424e0e9
L
26452003-05-04 H.J. Lu <hjl@gnu.org>
2646
2647 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2648
d31e3dfe
L
26492003-05-04 H.J. Lu <hjl@gnu.org>
2650
2651 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2652 symbol dynamic. Check indirection when removing the old
2653 definition for symbols with non-default visibility.
2654 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2655
4d2e1ff0
NC
26562003-05-02 Nick Clifton <nickc@redhat.com>
2657
2658 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2659 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2660 unsigned overflow.
2661
d40d037c
AJ
26622003-05-02 Andreas Jaeger <aj@suse.de>
2663
2664 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2665 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2666 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2667 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2668 ELF_LINK_NON_GOT_REF from weakdef.
2669
c5d1701e
NC
26702003-05-02 Charles Lepple <clepple@ghz.cc>
2671 Nick Clifton <nickc@redhat.com>
2672
2673 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2674 * aclocal.m4: Regenerate.
2675 * configure: Regenerate.
2676 * Makefile.in: Regenerate.
2677
81848ca0
AM
26782003-05-01 Alan Modra <amodra@bigpond.net.au>
2679
2680 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2681 weakdef sym has already been adjusted before treating it specially.
2682 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2683 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2684 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2685 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2686
c7996ad6
L
26872003-04-28 H.J. Lu <hjl@gnu.org>
2688
2689 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2690 the relax finalize pass.
2691
2692 * section.c (struct sec): Add need_finalize_relax and remove
2693 flag11.
2694 (STD_SECTION): Update struct sec initializer.
2695 * bfd-in2.h: Regenerated.
2696
f006af20
L
26972003-04-28 H.J. Lu <hjl@gnu.org>
2698
2699 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2700 to copy any information related to dynamic linking when we flip
2701 the indirection.
2702
1b1fe8fe
L
27032003-04-27 H.J. Lu <hjl@gnu.org>
2704
2705 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2706 (ELF_LINK_DYNAMIC_WEAK): New.
2707
2708 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2709 a symbol should be skipped. Ignore definitions in dynamic
2710 objects for symbols with non-default visibility.
2711 (elf_add_default_symbol): Adjusted.
2712 (elf_link_add_object_symbols): Check if a symbol should be
2713 skipped. Don't merge the visibility field with the one from
2714 a dynamic object.
2715 (elf_link_check_versioned_symbol): Use undef_bfd.
2716 (elf_link_output_extsym): Warn if a forced local symbol is
2717 referenced from dynamic objects. Make non-weak undefined symbol
2718 with non-default visibility a fatal error.
2719
052a450c
DJ
27202003-04-27 Daniel Jacobowitz <drow@mvista.com>
2721
2722 * configure.in: Bump version on HEAD to 2.14.90.
2723 * configure: Regenerated.
2724
d204f4c0
SC
27252003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2726
2727 PR savannah/3331:
2728 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2729 when we couldn't relax something.
2730
3c0a515d
L
27312003-04-25 Alan Modra <amodra@bigpond.net.au>
2732
2733 * elflink.h (elf_merge_symbol): When we find a regular definition
2734 for an indirect symbol, flip the indirection so that the old
2735 direct symbol now points to the new definition.
2736
d145330d
RM
27372003-04-24 Roland McGrath <roland@redhat.com>
2738
2739 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2740
fc0bffd6
AM
27412003-04-24 Alan Modra <amodra@bigpond.net.au>
2742
2743 * elf32-ppc.c: Formatting and comment fixes.
2744 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2745 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2746
27472003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2748
2749 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2750 * bfd-in2.h: Rebuilt.
2751 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2752 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2753 & H8300SNMAGIC.
2754 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2755 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2756 (h8300sn_info_struct, h8300hn_info_struct): New.
2757 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2758 (elf32_h8_final_write_processing): Likewise.
2759
267fb3c1
KK
27602003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2761
2762 * elf32-sh.c (tpoff): New.
2763 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2764 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2765 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2766 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2767 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2768 (dtpoff_base): Fix wrong indentation.
2769 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2770 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2771 R_SH_TLS_TPOFF32 relocations.
2772
ef230218
JR
27732003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2774
2775 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2776 * cpu-sh.c: Likewise.
2777 * elf32-sh.c: Likewise.
2778 * reloc.c (bfd_reloc_code_real): Likewise.
2779 * elf32-sh64-com.c: Change comment to refer to SuperH.
2780 * elf32-sh64.c: Likewise.
2781 * elf64-sh64.c: Likewise.
2782 * bfd-in2.h (enum bfd_architecture): Regenerate.
2783
8c29f035
AM
27842003-04-23 Alan Modra <amodra@bigpond.net.au>
2785
2786 From Julien LEMOINE <speedblue@debian.org>
2787 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2788 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2789
26597c86
NC
27902003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2791
2792 * archures.c: Replace references to Mitsubishi M32R with references
2793 to Renesas M32R.
2794 * relocs.c: Likewise.
2795 * bfd-in2.h: Regenerate.
2796
cc13e3ef
RH
27972003-04-21 Richard Henderson <rth@redhat.com>
2798
2799 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2800 executable when a symbol is defined both regular and dynamic.
2801
f5a6f915
SC
28022003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2803
2804 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2805 (elf32-m68hc1x.lo): Update dependencies
2806 * configure.in: Add elf32-m68hc1x.lo.
2807 * configure: Rebuild.
2808 * Makefile.in: Rebuild.
2809
3a65329d
SC
28102003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2811
2812 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2813 (m68hc11_elf_hash_table_create): New function.
2814 (elf32_m68hc11_link_hash_table_free): New function.
2815 (stub_hash_newfunc): New function.
2816 (m68hc11_add_stub): New function.
2817 (elf32_m68hc11_add_symbol_hook): New function.
2818 (elf32_m68hc11_setup_section_lists): New function.
2819 (elf32_m68hc11_next_input_section): New function.
2820 (elf32_m68hc11_size_stubs): New function.
2821 (elf32_m68hc11_build_stubs): New function.
2822 (m68hc11_get_relocation_value): New function.
2823 (elf32_m68hc11_relocate_section): Call the above to redirect
2824 some relocations to the trampoline code.
2825 (m68hc11_elf_export_one_stub): New function.
2826 (m68hc11_elf_set_symbol): New function.
2827 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2828 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2829 is not yet initialized.
2830
2831 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2832 (elf32_m68hc11_stub_hash_entry): New struct.
2833 (m68hc11_page_info): Add trampoline handler address.
2834 (m68hc11_elf_link_hash_table): Add stubs generation members.
2835 (elf32_m68hc11_add_symbol_hook): Declare.
2836 (elf32_m68hc11_setup_section_lists): Declare.
2837 (elf32_m68hc11_size_stubs): Declare.
2838 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2839
3a65329d
SC
2840 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2841 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2842 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2843 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2844 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2845 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2846 (bfd_elf32_bfd_link_hash_table_create): Define.
2847 (elf_backend_add_symbol_hook): Define.
2848 (m68hc11_elf_bfd_link_hash_table_create): New function.
2849 (m68hc11_elf_build_one_stub): New function.
2850 (m68hc11_elf_size_one_stub): New function.
2851 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2852 (bfd_elf32_bfd_link_hash_table_create): Define.
2853
2854 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2855 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2856 (m68hc12_phys_addr): Ditto.
2857 (m68hc12_phys_page): Ditto.
2858 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2859 (elf32_m68hc11_gc_mark_hook): Likewise.
2860 (elf32_m68hc11_gc_sweep_hook): Likewise.
2861 (elf32_m68hc11_check_relocs): Likewise.
2862 (elf32_m68hc11_relocate_section): Likewise.
2863 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2864 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2865 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2866 (m68hc12_elf_build_one_stub): New function.
2867 (m68hc12_elf_size_one_stub): New function.
2868 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2869 (elf_backend_add_symbol_hook): Define.
2870 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2871
4081944f
NC
28722003-04-18 Nick Clifton <nickc@redhat.com>
2873
2874 * format.c (bfd_check_format_matches): Only check associated
2875 vector if the matching_vector has been created.
2876
060dc71d
AO
28772003-04-15 Alexandre Oliva <aoliva@redhat.com>
2878
2879 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2880 2003-04-09's change.
2881
a3476bef
NC
28822003-04-15 Brian Ford <ford@vss.fsi.com>
2883
2884 * peicode.h (coff_swap_scnhdr_in): If a section holds
2885 uninitialized data and is from an object file or from an
2886 executable image that has not initialized the s_size field, or if
2887 the physical size is padded, use the virtual size (stored in
2888 s_paddr) instead.
2889
ca4fa240
NC
28902003-04-15 H.J. Lu <hjl@gnu.org>
2891
2892 * elflink.h (elf_link_add_object_symbols): Properly report
2893 filename for alignment reduction.
2894
c2dcd04e
NC
28952003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2896
2897 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2898 * reloc.c: Likewise.
2899 * coff-h8300.c: Likewise.
2900 * coff-h8500.c: Likewise.
2901 * coff-sh.c: Likewise.
2902 * cpu-h8300.c: Likewise.
2903 * cpu-sh.c: Likewise.
2904 * elf32-h8300.c: Likewise.
2905 * elf32-sh.c: Likewise.
2906 * elf32-sh64-com.c: Likewise.
2907 * elf32-sh64.c: Likewise.
2908 * elf64-sh64.c: Likewise.
2909 * bfd-in2.h: Regenerate.
2910
f7661995
NC
29112003-04-14 H.J. Lu <hjl@gnu.org>
2912
2913 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2914 alignment for common symbols. Warn reducing alignment for
2915 common symbols. Report old filename when symbol size changes.
2916
93a2b7ae
AO
29172003-04-12 Alexandre Oliva <aoliva@redhat.com>
2918
2919 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2920 occurrences of the same test changed in the previous patch.
2921 Optimize.
2922
0176c794
AO
29232003-04-11 Alexandre Oliva <aoliva@redhat.com>
2924
2925 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2926 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2927 GOT_DISP/addend only if the symbol got a global GOT entry.
2928
0fdc1bf1
AO
29292003-04-10 Alexandre Oliva <aoliva@redhat.com>
2930
2931 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2932 GOT_PAGE/GOT_OFST referencing overridable symbol to
2933 GOT_DISP/addend.
2934 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2935 global symbol as GOT_DISP.
2936
9b8c98a4
BW
29372003-04-10 Bob Wilson <bob.wilson@acm.org>
2938
2939 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2940 next relocation on an undefined symbol.
2941
ec1659c8
RH
29422003-04-09 Richard Henderson <rth@redhat.com>
2943
2944 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2945 Ignore relocations against r_symndx == 0.
2946
7dfb07f7
L
29472003-04-09 H.J. Lu <hjl@gnu.org>
2948
2949 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2950 FALSE for undefined symbols.
2951 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2952
a3805e4e
AO
29532003-04-09 Alexandre Oliva <aoliva@redhat.com>
2954
2955 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2956 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2957 addr_size.
2958
69931e60
AO
29592003-04-08 Alexandre Oliva <aoliva@redhat.com>
2960
2961 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2962 pointer size from ABI, not arch_bits_per_address.
2963
59a8c196
KB
29642003-04-07 Kevin Buettner <kevinb@redhat.com>
2965
2966 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2967 constants for n32 ABI.
2968
8e16317c
NC
29692003-04-06 Andrew Cagney <cagney@redhat.com>
2970
2971 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2972 free that leads to GDB vs BFD memory corruption.
2973
196486be
SC
29742003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2975
2976 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2977 symbols that mark the end of the section.
2978 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2979 converting to a relative branch so that the offset is computed after
2980 the relaxation; also relocate a jsr into a bsr if possible but don't
2981 relax them if they are to a far symbol as we need to call the
2982 trampoline code.
2983 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2984
be33c5dd
SS
29852003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2986
2987 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2988 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2989 * bfd-in2.h: Regenerate
2990 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2991 * cpu-tic4x.c: Ditto
2992
ff0c9faf
NC
29932003-04-03 Nick Clifton <nickc@redhat.com>
2994
2995 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2996 differently for object files and executables.
2997 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2998 for object files or for executables who have not already
2999 initialised the field.
3000 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3001 the PE format bfd is an executable.
3002
2b98e6c0
AM
30032003-04-03 Alan Modra <amodra@bigpond.net.au>
3004
3005 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3006 here as it's too early to reliably determine locality.
3007 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 3008 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 3009
92403579
BW
30102003-04-02 Bob Wilson <bob.wilson@acm.org>
3011
3012 * xtensa-modules.c: Remove comment indicating that this is a
3013 generated file.
3014
c45a316a
AM
30152003-04-02 Alan Modra <amodra@bigpond.net.au>
3016
3017 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3018
e0001a05
NC
30192003-04-01 Bob Wilson <bob.wilson@acm.org>
3020
8c29f035
AM
3021 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3022 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3023 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3024 xtensa-modules.lo.
3025 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3026 xtensa-modules.c.
3027 (cpu-xtensa.lo): New target.
3028 (elf32-xtensa.lo): Likewise.
3029 (xtensa-isa.lo): Likewise.
3030 (xtensa-modules.lo): Likewise.
3031 * Makefile.in: Regenerate.
3032 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3033 (bfd_archures_list): Add bfd_xtensa_arch.
3034 * config.bfd: Handle xtensa-*-*.
3035 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3036 * configure: Regenerate.
3037 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3038 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3039 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3040 (bfd_elf32_xtensa_le_vec): Likewise.
3041 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3042 * cpu-xtensa.c: New file.
3043 * elf32-xtensa.c: Likewise.
3044 * xtensa-isa.c: Likewise.
3045 * xtensa-modules.c: Likewise.
3046 * libbfd.h: Regenerate.
3047 * bfd-in2.h: Likewise.
e0001a05 3048
5a6c6817
NC
30492003-04-01 Nick Clifton <nickc@redhat.com>
3050
3051 * archures.c (bfd_mach_arm_unknown): Define.
3052 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3053 bfd_arm_get_mach_from_notes): Prototype.
3054 * bfd-in2.h: Regenerate.
3055 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3056 bfd_arm_merge_machines.
3057 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3058 * coffcode.h (coff_set_arch_mach_hook): Call
3059 bfd_arm_get_mach_from_notes.
3060 * coffgen.c (coff_real_object_p): Revert previous delta.
3061 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3062 .note section.
3063 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3064 binaries compiled for different architectures..
3065 (bfd_arm_update_notes): New function: Update an ARM note section.
3066 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3067 number from an ARM note section.
3068 * elf32-arm.h (elf32_arm_object_p): Use
3069 bfd_arm_get_mach_from_notes.
3070 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3071 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 3072
0cc1cf99
BE
30732003-04-01 Ben Elliston <bje@wasabisystems.com>
3074
3075 * dwarf2.c (read_attribute_value): Correct typo in comment.
3076
af3ef9fe
NC
30772003-04-01 Nick Clifton <nickc@redhat.com>
3078
3079 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3080 instead of concat().
3081 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
3082 (add_line_info): Make a copy of the filename when storing it into
3083 the info structure.
af3ef9fe 3084
6e84a906
DJ
30852003-03-31 Andreas Schwab <schwab@suse.de>
3086 Daniel Jacobowitz <drow@mvista.com>
3087
3088 * simple.c (bfd_simple_get_relocated_section_contents): Add
3089 parameter symbol_table. Optionally use it instead of the symbol
3090 table from the bfd. Save and restore output offsets and output
3091 sections around bfd_get_relocated_section_contents. Fix a memory
3092 leak.
3093 (simple_save_output_info, simple_restore_output_info): New
3094 functions.
3095 * bfd-in2.h: Regenerate.
3096 * dwarf2.c (read_abbrevs): Use
3097 bfd_simple_get_relocated_section_contents instead of
3098 bfd_get_section_contents.
3099 (decode_line_info): Likewise.
3100 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3101 find_rela_addend.
3102 (find_rela_addend): Remove.
3103 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3104 debugging sections.
3105 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3106 not bfd_zalloc.
3107
5ed6aba4
NC
31082003-03-31 David Heine <dlheine@suif.stanford.edu>
3109
3110 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3111 bfd_alloc.
3112 * dwarf2.c (concat_filename): Always allocate space for the
3113 returned filename.
3114 (decode_line_info): Free the allocated filename returned by
3115 concat_filename.
3116 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3117 * elf.c (copy_private_bfd_data): Likewise.
3118 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3119 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3120 * format.c (bfd_check_format_matches): Likewise.
3121 * linker.c (bfd_generic_final_link): Likewise.
3122 * opncls.c (find_separate_debug_info): Likewise.
3123 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3124
5941afc1
L
31252003-03-28 H.J. Lu <hjl@gnu.org>
3126
3127 * elflink.h (elf_link_add_object_symbols): Correctly combine
3128 visibilities.
3129
9d73f260
JJ
31302003-03-27 Jakub Jelinek <jakub@redhat.com>
3131
3132 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3133 to -1 before recomputing got offsets.
3134
a5ad465a
AS
31352003-03-26 Andreas Schwab <schwab@suse.de>
3136
3137 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3138 (elf_m68k_relocate_section): Use it to correctly handle symbols
3139 forced to be local.
3140 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3141 entries for symbols that are forced to be local.
3142
d0647110
AO
31432003-03-25 Alexandre Oliva <aoliva@redhat.com>
3144
3145 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3146 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3147 * elfn32-mips.c, elf64-mips.c: Use it.
3148
e16bb312
NC
31492003-03-25 Stan Cox <scox@redhat.com>
3150 Nick Clifton <nickc@redhat.com>
8c29f035 3151
9b5ecbd0 3152 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3153
3154 * archures.c: Add bfd_mach_arm_iWMMXt.
3155 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3156 * bfd-in2.h: Regenerate.
3157 * libbfd.h: Regenerate.
3158 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3159 object files to be linked with XScale ones.
3160 (coff_arm_final_link_postscript): Update note section.
3161 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3162 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3163 after identifying a coff binary.
3164 * cpu-arm.c (processors): Add iWMMXt.
3165 (arch_inf): Likewise.
3166 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3167 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3168 be linked with XScale ones.
3169 (elf32_arm_section_flags): New function: Set flags on note section.
3170 (elf32_arm_final_write_processing): Handle note section.
3171
25f14c34
DD
31722003-03-21 DJ Delorie <dj@redhat.com>
3173
3174 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3175 _bfd_elf_rela_local_sym.
3176
04b3329b
L
31772003-03-20 H.J. Lu <hjl@gnu.org>
3178
3179 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3180 non-ELF outputs.
3181
c25cfdf8
NC
31822003-03-20 Nick Clifton <nickc@redhat.com>
3183
3184 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3185 $idata5 in case bfd_coff_final_link is not called.
3186
3e1d7f19
JJ
31872003-03-19 Jakub Jelinek <jakub@redhat.com>
3188
3189 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3190 field.
3191 (canon_reloc_count): Define.
3192 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3193 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3194 reloc_count.
3195 (sparc64_elf_canonicalize_reloc): New routine.
3196 (bfd_elf64_canonicalize_reloc): Define.
3197
3fa1d917
JJ
31982003-03-18 Jakub Jelinek <jakub@redhat.com>
3199
3200 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3201 againt mergeable sections. Take r_addend into account when caching
3202 trampolines.
3203
f86b235a
RH
32042003-03-18 Richard Henderson <rth@redhat.com>
3205
8c29f035
AM
3206 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3207 local symbols that have no dyninfo.
f86b235a 3208
49ae03bf
NC
32092003-03-14 Gene Smith <gene.smith@siemens.com>
3210
3211 * ieee.c (ieee_write_expression): Handle the case where symbol is
3212 NULL.
3213 General formatting improvements.
3214
6a457e5c
NC
32152003-03-13 Nick Clifton <nickc@redhat.com>
3216
3217 * configure.in (LINGUAS): Add zh_CN.
3218 * configure: Regenerate.
3219 * po/zh_CN.po: New file.
3220
93516ec3
NC
32212003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3222
3223 * aout-cris.c (BYTES_IN_WORD): Don't define.
3224 aout-encap.c: Likewise.
3225 aout-ns32k.c: Likewise.
3226 aout-tic30.c: Likewise.
3227 hp300bsd.c: Likewise.
3228 i386aout.c: Likewise.
3229 i386dynix.c: Likewise.
3230 i386linux.c: Likewise.
3231 i386lynx.c: Likewise.
3232 i386mach3.c: Likewise.
3233 m68k4knetbsd.c: Likewise.
3234 m68klinux.c: Likewise.
3235 m68klynx.c: Likewise.
3236 m68knetbsd.c: Likewise.
3237 m88kmach3.c: Likewise.
3238 mipsbsd.c: Likewise.
3239 newsos3.c: Likewise.
3240 sparclinux.c: Likewise.
3241 sparclynx.c: Likewise.
3242 sparcnetbsd.c: Likewise.
3243 vaxbsd.c: Likewise. Fix comment formatting.
3244
fee24f1c
AO
32452003-03-12 Alexandre Oliva <aoliva@redhat.com>
3246
0b25d3e6
AO
3247 * Reverted 2003-03-02's patch.
3248
fee24f1c
AO
3249 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3250 overridable.
3251 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3252 mips_elf64_get_dynamic_reloc_upper_bound,
3253 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3254 (bfd_elf64_get_canonicalize_reloc,
3255 bfd_elf64_get_dynamic_reloc_upper_bound,
3256 bfd_elf64_canonicalize_dynamic_reloc): Define.
3257 (mips_elf64_slurp_reloc_table): Support dynamic.
3258 (mips_elf64_slurp_one_reloc_table): Adjust.
3259
64fb1839
NC
32602003-03-12 Nick Clifton <nickc@redhat.com>
3261
3262 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3263 'index' to 'offset' in test for zero value.
3264
908488f1
AO
32652003-03-11 Alexandre Oliva <aoliva@redhat.com>
3266
3267 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3268 dynamic relocations pointing to local or section symbols, use the
3269 NULL symbol instead. Document the choice to not emit an
3270 additional R_MIPS_64 relocation.
3271
e515b051
AM
32722003-03-11 Alan Modra <amodra@bigpond.net.au>
3273
3274 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3275 zero index dynamic tls relocs generated for the GOT. Tidy code.
3276 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3277 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3278
a23b6845
AM
32792003-03-07 Alan Modra <amodra@bigpond.net.au>
3280
87d243f1
AM
3281 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3282 a tls_get_addr call.
3283
a23b6845
AM
3284 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3285 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3286 ELF_LINK_NON_GOT_REF from weakdef.
3287 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3288 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3289 ELF_LINK_NON_GOT_REF from weakdef.
3290 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3291 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3292 ELF_LINK_NON_GOT_REF from weakdef.
3293
2d36fe5f
AH
32942003-03-06 Jakub Jelinek <jakub@redhat.com>
3295 Andrew Haley <aph@redhat.com>
3296
3297 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3298 output is relocateable.
3299
34f304a7
NC
33002003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3301
3302 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3303 R_COMMENT.
3304
7b609f53
AM
33052003-03-06 Alan Modra <amodra@bigpond.net.au>
3306
3307 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3308 error messages.
3309 (ELIMINATE_COPY_RELOCS): Define to zero.
3310 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3311 TLSLD relocs. Report reloc types on a number of errors. Optimize
3312 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3313 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3314 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3315 calculating TLSLD relocs. Report reloc types on a number of errors.
3316 Don't capitalize error messages.
3317
6a0fb186
L
33182003-03-03 H.J. Lu <hjl@gnu.org>
3319
3320 * elfxx-ia64.c (USE_BRL): Removed.
3321 (oor_ip): Removed.
3322
34f304a7 33232003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3324
3325 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3326 relocation (no special function), and make it non-partial_inplace.
3327 (sh_elf_relax_section): When creating a bsr, use a consistent value
3328 no matter if the symbol is extern or not; set addend to -4.
3329 Don't swap load / non-load instructions for SH4.
3330 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3331 rather than if the symbol is external to determine if adjusting the
3332 offset makes sense. Adjust the addend too if appropriate.
3333 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3334 relocation.
3335
a9d68a1e
NC
33362003-03-03 Nick Clifton <nickc@redhat.com>
3337
3338 * po/da.po: Installed latest translation.
3339
7c2be35c
TS
33402003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3341
3342 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3343 R_MIPS_PC16 to rightshift 2.
3344 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3345 (bfd_elf32_bfd_reloc_type_lookup): Support
3346 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3347 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3348 R_MIPS_PC16 to rightshift 2.
3349 (mips_elf64_howto_table_rela): Likewise.
3350 (mips_reloc_map): Map to rightshifted BFD reloc.
3351 * elfn32-mips.c: The same as in elf64-mips.c.
3352 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3353 (mips_elf_calculate_relocation): Handle rightshifted addends for
3354 R_MIPS_PC16.
3355 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3356 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3357 * libbfd.h: Regenerate.
3358 * bfd-in2.h: Regenerate.
3359
484a4f9c
RH
33602003-02-28 Richard Henderson <rth@redhat.com>
3361
3362 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3363 for ltoff22x relaxation.
3364
2ce40c65
AM
33652003-03-01 Alan Modra <amodra@bigpond.net.au>
3366
3367 * bfd-in.h (_bfd): Don't define.
3368 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3369 * syms.c: Likewise.
3370 * bfd-in2.h: Regenerate.
3371
2c4c2bc0
RH
33722003-02-27 Richard Henderson <rth@redhat.com>
3373
3374 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3375 (elfNN_ia64_check_relocs): Set it.
3376 (allocate_global_data_got): Check it.
3377 (allocate_local_got): Likewise.
3378 (allocate_dynrel_entries): Likewise.
3379 (elfNN_ia64_relax_ldxmov): New.
3380 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3381 (elfNN_ia64_choose_gp): Split out from ...
3382 (elfNN_ia64_final_link): ... here.
8c29f035 3383
c2852e88
AC
33842003-02-27 Andrew Cagney <cagney@redhat.com>
3385
3386 * bfd.c (struct bfd): Rename "struct _bfd".
3387 * bfd-in.h: Update copyright.
3388 (struct bfd): Rename "struct _bfd".
3389 (_bfd): Define for backward compatibility.
3390 * bfd-in2.h: Regenerate.
3391
3f87cb70
AM
33922003-02-25 Alan Modra <amodra@bigpond.net.au>
3393
3f9a32bd
AM
3394 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3395 and rel_hdr2 when initially counting input relocs rather than after
3396 creating output reloc sections.
4fabe71e
AM
3397 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3398 sizes.
3f9a32bd 3399
3f87cb70
AM
3400 * Makefile.am: Run "make dep-am".
3401 * Makefile.in: Regenerate.
3402
07c6e936
NC
34032003-02-24 Kris Warkentin <kewarken@qnx.com>
3404
3405 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3406 (elfcore_grog_nto_note): New function.
3407 (elfcore_grog_nto_gregs): New function.
3408 (elfcore_grog_nto_status): New function.
3409
aad5d350
AM
34102003-02-24 Alan Modra <amodra@bigpond.net.au>
3411
3412 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3413 section flags before concluding that we've already been called.
3414 Don't use register keyword.
3415 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3416 (_bfd_elf_create_linker_section): Formatting.
3417
2ab1486e
NC
34182003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3419
3420 * coff-h8300.c: Fix typo: intial -> initial.
3421 * coff-ppc.c: Likewise.
3422
70bccea4
AM
34232003-02-20 Alan Modra <amodra@bigpond.net.au>
3424
3425 * elf32-ppc.c: Formatting.
3426 (allocate_dynrelocs): LD and GD relocs against the same sym need
3427 separate GOT entries.
3428 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3429 entries per symbol.
3430
ee05f2fe
AM
34312003-02-19 Alan Modra <amodra@bigpond.net.au>
3432
26e41594
AM
3433 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3434 removal. Localize vars. Remove unnecessary dynobj test.
3435 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3436 of INFO.
3437 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3438 and optimize.
3439 (elf_i386_relocate_section): Likewise.
3440 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3441 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3442 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3443 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3444 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3445 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3446 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3447 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3448 Formatting.
3449
f4656909
AM
3450 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3451 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3452 test.
3453 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3454 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3455 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3456 and optimize. Use ELIMINATE_COPY_RELOCS.
3457 (ppc64_elf_relocate_section): Likewise.
3458
ee05f2fe
AM
3459 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3460 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3461 (ELIMINATE_COPY_RELOCS): Define.
3462 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3463 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3464 (MUST_BE_DYN_RELOC): Define.
3465 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3466 and optimize. Trim dyn_relocs.
3467 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3468 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3469 track of pc_rel dyn relocs.
3470 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3471 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3472 allocate_dynrelocs. Don't recalculate "sec".
3473
7619e7c7
AM
34742003-02-18 Alan Modra <amodra@bigpond.net.au>
3475
d881513a
AM
3476 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3477 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3478 on invalid LD relocs.
3479 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3480 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3481 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3482
7619e7c7
AM
3483 * elf32-ppc.h: New file.
3484 * elf32-ppc.c: Include elf32-ppc.h.
3485 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3486 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3487 Add "tls_mask" field.
3488 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3489 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3490 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3491 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3492 Make use of htab shortcuts throughout file.
3493 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3494 (ppc_elf_link_hash_table_create): Init new fields.
3495 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3496 (ppc_elf_howto_raw): Add tls relocs.
3497 (ppc_elf_reloc_type_lookup): Handle them.
3498 (ppc_elf_unhandled_reloc): New function.
3499 (ppc_elf_create_got): Stash got section pointer in hash table,
3500 return status. Make .rela.got too.
3501 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3502 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3503 NON_GOT_REF set. Don't allocate space in .plt here..
3504 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3505 not allocating plt entries unnecessarily. Allocate got entries here.
3506 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3507 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3508 "info" during allocate_dynrelocs hash traversal. Use htab section
3509 shortcuts rather than searching for named sections. Get rid of
3510 "plt" and "strip" booleans.
3511 (update_local_sym_info, bad_shared_reloc): New functions.
3512 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3513 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3514 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3515 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3516 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3517 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3518 relocs that might use a plt entry. Set NON_GOT_REF too.
3519 Enumerate all do-nothing relocs.
3520 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3521 tls relocs and all plt relocs.
3522 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3523 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3524 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3525 shortcuts.
3526 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3527 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3528 entries and got relocs here. Warn on non-zero got reloc addend.
3529 Split out branch taken/not taken reloc code into a separate switch
3530 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3531 Split out HA reloc adjustments to separate switch statement. Don't
3532 warn on reloc overflow if we've already warned about undefined.
3533 Don't rebuild sym name when reporting errors. Report all possible
3534 errors from _bfd_final_link_relocate.
3535 (bfd_elf32_bfd_final_link): Don't define.
3536
cd27b276
AM
35372003-02-18 Alan Modra <amodra@bigpond.net.au>
3538
3539 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3540 rebuild sym name when reporting errors.
3541
ae9a127f
NC
35422003-02-17 Nick Clifton <nickc@redhat.com>
3543
3f9a32bd 3544 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3545 allow_shlib_undefined for shared libraries.
3546 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3547 of allow_shlib_undefined.
3548 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3549 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3550 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3551 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3552 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3553 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3554 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3555 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3556 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3557 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3558 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3559 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3560 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3561 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3562 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3563 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3564
b5f852ea
NC
35652003-02-17 Nick Clifton <nickc@redhat.com>
3566
3567 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3568 address field to use in the comparison.
3f9a32bd 3569 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3570
3193e234
NC
35712003-02-14 Bob Wilson <bob.wilson@acm.org>
3572
3573 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3574 backends when checking if the generic ELF target should be used.
3575
21efdc8d
NC
3576 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3577 outside of functions, treat values as absolute addresses.
3578
ed781d5d
NC
3579 * bfd.c: Change embedded documentation to use consistent indentation
3580 and to split up long lines. Change informal style of description
3581 for functions lacking real documentation.
3582 * coffcode.h: Break up long lines in embedded documentation.
3583 * format.c: Likewise.
3584 * targets.c: Likewise.
3585 * libcoff.h: Regenerate.
3586 * bfd-in2.h: Regenerate.
3587
58ac9f71
AM
35882003-02-14 Alan Modra <amodra@bigpond.net.au>
3589
3590 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3591 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3592 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3593 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3594 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3595 (group_sections): Don't share a stub section if stubs are for a large
3596 section. Adjust comment.
3597 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3598 !stubs_always_before_branch.
3599 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3600 treat undefined and undefweak specially when processing dyn relocs.
3601
9147e853
JJ
36022003-02-13 Jakub Jelinek <jakub@redhat.com>
3603
3604 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3605
427bfd90
NC
36062003-02-13 Nick Clifton <nickc@redhat.com>
3607
3608 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3609 in computation of offset to insert into BL instruction.
3610
42b5d0ea
NC
36112003-02-11 Uwe Stieber <uwe@wwws.de>
3612
3613 * config.bfd: Add support for kaOS as cross build target system.
3614
a48ebf4d
AM
36152003-02-11 Alan Modra <amodra@bigpond.net.au>
3616
3617 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3618 .__tls_get_addr too.
3619 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3620
c95b8a7a
KK
36212003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3622
3623 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3624 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3625 (sh_elf_link_hash_newfunc): Remove the initialization of
3626 tls_tpoff32 field.
3627 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3628 for which tls_tpoff32 flag is set.
3629 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3630 of the symbol includes the entry matched with the input_section
3631 and having tls_tpoff32 flag on. When linking statically, set
3632 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3633 is defined in this executable.
3634 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3635
a779acda
JJ
36362003-02-10 Jakub Jelinek <jakub@redhat.com>
3637
3638 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3639 even if there is just non-empty .rela.plt.
3640
fde78edd
NC
36412003-02-10 Nick Clifton <nickc@redhat.com>
3642
3643 * archures.c (bfd_mach_arm_ep9312): Define.
3644 * bfd-in2.h: Regenerate.
3645 * cpu-arm.c (processors[]): Add ep9312.
3646 (bfd_arm_arch): Add ep9312.
3647 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3648 messages and add test for Maverick floating point support.
3649 (elf32_arm_print_private_bfd_data): Handle
3650 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3651 (elf32_arm_object_p): New function.
3652 (elf_backend_object_p): Define.
fde78edd 3653
e7b938ca
AM
36542003-02-10 Alan Modra <amodra@bigpond.net.au>
3655
3656 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3657 variables, structure fields or function params to tls_mask or
3658 similar to better reflect usage.
3659 (struct got_entry): Comment.
9b5ecbd0 3660 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3661 (get_tls_mask): Rename from get_tls_type.
3662
951fd09b
AM
36632003-02-09 Alan Modra <amodra@bigpond.net.au>
3664
3665 * elf64-ppc.c (TLS_GD_LD): Don't define..
3666 (TLS_GD): ..define this instead and update all uses.
3667 (TLS_TPRELGD): Define.
3668 (ppc64_elf_link_hash_table_create): Tweak initialization of
3669 init_refcount and init_offset.
3670 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3671 Mark second slot of GD or LD toc entries.
3672 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3673 from other tls types.
3674 (ppc64_elf_tls_setup): New function, split out from..
3675 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3676 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3677 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3678 return value to properly decide whether toc GD and LD entries can
3679 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3680 to determine GD or LD rather than looking at TLS_LD flag. Don't
3681 attempt to adjust got entry tls_type here..
3682 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3683 look for possible merges.
3684 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3685 optimization.
3686 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3687 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3688 Make use of return value from get_tls_type to properly detect GD and
3689 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3690 handle tls_get_addr removal when looking at REL24 relocs, do it when
3691 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3692 GD or LD.
3693 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3694
acc990f2
AM
36952003-02-08 Alan Modra <amodra@bigpond.net.au>
3696
00b28bb0
AM
3697 * elf32-hppa.c (group_sections): Don't share a stub section if
3698 stubs are for a large section.
3699
acc990f2
AM
3700 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3701 stubs if !stubs_always_before_branch.
3702
589e6347
NC
37032003-02-07 Nick Clifton <nickc@redhat.com>
3704
3705 * elf.c (swap_out_syms): Generate an error message if an
3706 equivalent output section cannot be found for a symbol.
3707
c328dc3f
JJ
37082003-02-07 Jakub Jelinek <jakub@redhat.com>
3709
3710 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3711 local_got_entries is NULL.
3712
84f97cb6
AS
37132003-02-06 Andreas Schwab <schwab@suse.de>
3714
3715 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3716 (read_value): Add parameter is_signed, use signed extraction if
3717 the value is signed.
3718 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3719 encoding to read_value.
3720
6349e628
AM
37212003-02-06 Alan Modra <amodra@bigpond.net.au>
3722
3723 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3724 plt info when called to transfer weak sym info.
3725
411e1bfb
AM
37262003-02-05 Alan Modra <amodra@bigpond.net.au>
3727
3728 * reloc.c: Add PPC and PPC64 TLS relocs.
3729 * libbfd.h: Regenerate.
3730 * bfd-in2.h: Regenerate.
3731 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3732 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3733 against a 32 bit field.
3734 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3735 (_ppc64_elf_section_data): Add t_symndx and comments.
3736 (ppc64_elf_section_data): Use elf_section_data macro.
3737 (ppc64_elf_new_section_hook): American spelling.
3738 (struct got_entry, struct plt_entry): New.
3739 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3740 (struct ppc_stub_hash_entry): Add "addend" field.
3741 (struct ppc_link_hash_entry): Add "tls_type".
3742 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3743 TLS_EXPLICIT): Define.
3744 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3745 (link_hash_newfunc): Init new fields.
58ac9f71 3746 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3747 init_offset to NULL.
3748 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3749 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3750 there.
3751 (update_local_sym_info, update_plt_info): New functions.
3752 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3753 handling to use got.glist rather than got.refcount. Likewise for PLT.
3754 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3755 (func_desc_adjust): Adjust for new PLT list.
3756 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3757 (get_sym_h, get_tls_type): New functions.
3758 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3759 (ppc64_elf_tls_optimize): New function.
3760 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3761 TLS relocs.
3762 (ppc64_elf_size_dynamic_sections): Likewise.
3763 (ppc_type_of_stub): Adjust for new PLT list.
3764 (ppc_build_one_stub): Likewise.
3765 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3766 calls specially.
3767 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3768 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3769 init GOT entries that have a reloc. Generate GOT relocs here..
3770 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3771 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3772
0cca5f05
AS
37732003-02-04 Andreas Schwab <schwab@suse.de>
3774
3775 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3776 (elf_m68k_link_hash_traverse): Remove.
3777 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3778 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3779 reduce casting.
3780 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3781 casting.
3782 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3783 instead of elf_m68k_link_hash_traverse.
3784 (elf_m68k_discard_copies): Change first parameter to pointer to
3785 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3786 elf_m68k_link_hash_entry is needed.
3787
5cab59f6
AM
37882003-02-04 Alan Modra <amodra@bigpond.net.au>
3789
3790 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3791 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3792 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3793 "plt" field.
3794 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3795 Add "init_offset" field.
3796 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3797 (elf_local_got_ents): Declare.
3798 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3799 and "plt".
3800 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3801 (_bfd_elf_link_hash_table_init): Set "init_offset".
3802 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3803 from init_offset.
3804 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3805
3806 * elf.c (bfd_elf_local_sym_name): Split out from..
3807 (group_signature): ..here.
3808 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3809
68bfbfcc
AM
38102003-02-04 Alan Modra <amodra@bigpond.net.au>
3811
3812 * elf-bfd.h (enum elf_link_info_type): Remove.
3813 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3814 to struct sec. Remove linkonce_p field.
3815 (elf_linkonce_p): Delete.
3816 (elf_discarded_section): Update for sec_info_type change.
3817 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3818 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3819 (ELF_INFO_TYPE_NONE): Define.
3820 (ELF_INFO_TYPE_STABS): Define.
3821 (ELF_INFO_TYPE_MERGE): Define.
3822 (ELF_INFO_TYPE_EH_FRAME): Define.
3823 (ELF_INFO_TYPE_JUST_SYMS): Define.
3824 (STD_SECTION): Update struct sec initializer.
3825 * ecoff.c (bfd_debug_section): Likewise.
3826 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3827 * elflink.h: Likewise.
3828 * elf-eh-frame.c: Likewise.
3829 * elf64-alpha.c: Likewise.
3830 * elfxx-ia64.c: Likewise.
3831 * elfxx-mips.c: Likewise.
3832 * bfd-in2.h: Regenerate.
3833
3834 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3835 referring to used_by_bfd.
3836 * elf64-sparc.c (sec_do_relax): Likewise.
3837 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3838 * elfxx-mips.c (mips_elf_section_data): Likewise.
3839 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3840 (ieee_get_section_contents): Likewise.
3841 (ieee_new_section_hook): Formatting.
3842 (ieee_canonicalize_reloc): Remove commented out code.
3843 * mmo.c (mmo_section_data): Define. Use throughout file.
3844 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3845
31f7ba04
NC
38462003-01-31 Graydon Hoare <graydon@redhat.com>
3847
3848 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3849 * Makefile.in: Regenerate.
3850 * opncls.c (calc_crc32, get_debug_link_info,
3851 seperate_debug_file_exists, find_seperate_debug_file): New
3852 internal functions.
3853 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3854 contained inside a .gnu_debuglink section.
3855 * bfd-in2.h: Regenerate.
3856
38985a1c
AO
38572003-01-29 Alexandre Oliva <aoliva@redhat.com>
3858
3859 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3860 entry->abfd when it's NULL.
3861
4bb9a95f
AO
38622003-01-27 Alexandre Oliva <aoliva@redhat.com>
3863
3864 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3865 _bfd_elf_section_offset returning -2 the same way as -1.
3866
f4416af6
AO
3867 * elfxx-mips.c (mips_elf_multi_got): New function.
3868 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3869 addend into union along with address and link hash entry.
3870 (struct mips_got_info): Added bfd2got and next.
3871 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3872 (mips_elf_got_section, mips_elf_create_got_section): Use
3873 SEC_EXCLUDE bit to tell whether we really need the got
3874 section. Take boolean arguments to disregard an excluded
3875 section, or to create it as excluded. Adjust all callers.
3876 Use mips_elf_got_section all over.
3877 (mips_elf_local_got_index, mips_elf_got_page,
3878 mips_elf_got16_entry): Take input bfd as argument, and pass it
3879 on to mips_elf_create_local_got_entry.
3880 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3881 Take input bfd as argument, and manage entries in the
3882 appropriate GOT.
3883 (mips_elf_got_offset_from_index): Take input bfd as argument,
3884 and use it to adjust the GP offset of the bfd.
3885 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3886 unreferenced GOT entries of global symbols to the end.
3887 (mips_elf_record_global_got_symbol): Take input bfd as
3888 argument. Add entries to the master GOT hash table.
3889 (struct mips_elf_bfd2got_hash): New.
3890 (struct mips_elf_got_per_bfd_arg): New.
3891 (struct mips_elf_set_global_got_offset_arg): New.
3892 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3893 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3894 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3895 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3896 mips_elf_resolve_final_got_entry,
3897 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3898 mips_elf_got_for_ibfd): New functions.
3899 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3900 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3901 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3902 (mips_elf_got_entry_hash): Take new fields into account. Use
3903 mips_elf_hash_bfd_vma.
3904 (mips_elf_got_entry_eq): Take new fields into account.
3905 (mips_elf_create_got_section): Initialize new fields.
3906 (mips_elf_calculate_relocation): Pass input_bfd to functions
3907 that now take it. Adjust gp for the input_bfd.
3908 (mips_elf_allocate_dynamic_relocation,
3909 mips_elf_create_dynamic_relocation,
3910 _bfd_mips_elf_create_dynamic_sections): Use...
3911 (mips_elf_rel_dyn_section): New function. Borrow code from...
3912 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3913 now take it. Create the got section if needed, even if
3914 excluded, before recording a global got symbol. Move some
3915 code to...
3916 (mips_elf_record_local_got_symbol): New fn.
3917 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3918 Compute multi-got global entries offsets. Move GOT code to...
3919 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3920 if the GOT is too big.
3921 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3922 undefweak symbol to zero. Generate dynamic relocations for
3923 non-primary GOT entries for global symbols.
3924 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3925 case. Generate dynamic relocations for local got entries.
3926 Sort dynamic relocations on N64 too, using...
3927 (sort_dynamic_relocs_64): New fns.
3928 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3929 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3930
52b69c9e
AO
39312003-01-27 Alexandre Oliva <aoliva@redhat.com>
3932
3933 * bfd.c (struct _bfd): Added id field.
3934 * opncls.c (_bfd_id_counter): New static variable.
3935 (_bfd_new_bfd): Use it.
3936 * bfd-in2.h: Rebuilt.
3937
71e5db1c
AM
39382003-01-25 Alan Modra <amodra@bigpond.net.au>
3939
3940 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3941
b9734f35
JJ
39422003-01-25 Jakub Jelinek <jakub@redhat.com>
3943
3944 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3945 (elf32_sparc_rev32_howto): New variable.
3946 (sparc_reloc_map): Add TLS relocs.
3947 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3948 Handle REV32.
3949 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3950 New functions.
3951 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3952 struct elf32_sparc_link_hash_table):
3953 New structures.
3954 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3955 elf32_sparc_hash_table): Define.
3956 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3957 create_got_section, elf32_sparc_create_dynamic_sections,
3958 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3959 functions.
3960 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3961 reference counting.
3962 (elf32_sparc_gc_sweep_hook): Likewise.
3963 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3964 (elf32_sparc_size_dynamic_sections): Likewise.
3965 (elf32_sparc_relocate_section): Likewise.
3966 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3967 New functions.
3968 (elf32_sparc_object_p): Allocate backend private object data.
3969 (bfd_elf32_bfd_link_hash_table_create,
3970 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3971 elf_backend_can_refcount): Define.
3972 (elf_backend_create_dynamic_sections): Define to
3973 elf32_sparc_create_dynamic_sections.
3974 * reloc.c: Add SPARC TLS relocs.
3975 * bfd-in2.h, libbfd.h: Rebuilt.
3976 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3977 (sparc_reloc_map): Likewise.
3978
69fc87f1
MS
39792003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3980
3981 * bfd-in2.h: Regenerate.
3982 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3983 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3984 (elf_howto_table): Add TLS relocs.
3985 (elf_s390_reloc_type_lookup): Likewise.
3986 (elf_s390_link_hash_entry): Add tls_type.
3987 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3988 New macros.
3989 (elf_s390_link_hash_table): Add tls_ldm_got.
3990 (link_hash_newfunc): Initialize tls_type.
3991 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3992 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3993 (elf_s390_check_relocs): Support TLS relocs.
3994 (elf_s390_gc_sweep_hook): Likewise.
3995 (allocate_dynrelocs): Likewise.
3996 (elf_s390_size_dynamic_sections): Likewise.
3997 (elf_s390_relocate_section): Likewise.
3998 (elf_s390_finish_dynamic_symbol): Likewise.
3999 (bfd_elf32_mkobject): Define for TLS.
4000 * elf64-s390.c: Same changes as for elf32-s390.c.
4001 * libbfd.h: Regenerate.
4002 * reloc.c: Add s390 TLS relocations.
4003
c5d1701e 40042003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
4005
4006 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4007
5177500f
NC
40082003-01-23 Nick Clifton <nickc@redhat.com>
4009
4010 * Add sh2e support:
5177500f 4011 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
4012 * archures.c (bfd_mach_sh2e): Added.
4013 * bfd-in2.h: Rebuilt.
4014 * cpu-sh.c (arch_info_struct): Added SH2e.
4015 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 4016
f0abc2a1
AM
40172003-01-23 Alan Modra <amodra@bigpond.net.au>
4018
4019 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4020 dynindx to an int. Rearrange for better packing.
4021 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4022 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4023 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4024 (struct _sh64_elf_section_data): New struct.
4025 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4026 * elf32-sh64-com.c: Include elf32-sh64.h.
4027 * elf32-sh64.c: Likewise.
4028 (sh64_elf_new_section_hook): New function.
4029 (bfd_elf32_new_section_hook): Define.
4030 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4031 (sh64_bfd_elf_copy_private_section_data): Likewise.
4032 (sh64_elf_final_write_processing): Likewise.
4033 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4034 (elf32_sparc_new_section_hook): New function.
4035 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4036 (sec_do_relax): Define.
4037 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4038 (elf32_sparc_relocate_section): Likewise.
4039 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4040 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4041 (mmix_elf_section_data): Define. Use throughout file.
4042 (mmix_elf_new_section_hook): New function.
4043 (bfd_elf64_new_section_hook): Define.
4044 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4045 (ppc64_elf_section_data): Define. Use throughout.
4046 (ppc64_elf_new_section_hook): New function.
4047 (bfd_elf64_new_section_hook): Define.
4048 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4049 (sparc64_elf_new_section_hook): New function.
4050 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4051 (sec_do_relax): Define.
4052 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4053 (sparc64_elf_relocate_section): Likewise.
4054 (bfd_elf64_new_section_hook): Define.
4055 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4056 * elfxx-mips.c (struct _mips_elf_section_data): New.
4057 (mips_elf_section_data): Define. Use throughout.
4058 (_bfd_mips_elf_new_section_hook): New function.
4059 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4060 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4061 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4062 * Makefile.am: Run "make dep-am".
4063 * Makefile.in: Regenerate.
4064
cc03ec80
RH
40652003-01-21 Richard Henderson <rth@redhat.com>
4066
4067 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4068 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4069 (elf64_alpha_adjust_dynamic_symbol): Set them.
4070 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4071 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4072 symbol index when relaxing LDM to TPREL.
4073 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4074 relocs, even if the target isn't locally defined.
4075 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4076 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4077 relocs vs symndx 0 to the tp base.
4078
da896d3f
NC
40792003-01-21 Fabio Alemagna <falemagn@aros.org>
4080
4081 * config.bfd: Handle i[3456]86-*-aros*.
4082
7fce784e
AS
40832003-01-21 Andreas Schwab <schwab@suse.de>
4084
4085 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4086 (struct ppc_elf_link_hash_entry): Define.
4087 (ppc_elf_hash_entry): New function.
4088 (struct ppc_elf_link_hash_table): Define.
4089 (ppc_elf_hash_table): New function.
4090 (ppc_elf_link_hash_newfunc): New function.
4091 (ppc_elf_link_hash_table_create): New function.
4092 (ppc_elf_copy_indirect_symbol): New function.
4093 (allocate_dynrelocs): New function.
4094 (readonly_dynrelocs): New function.
4095 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4096 relocs and determine DT_TEXTREL.
4097 (ppc_elf_check_relocs): Don't do that here, just count the
4098 dynamic relocs.
4099 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4100 removed section.
4101 (bfd_elf32_bfd_link_hash_table_create): Define.
4102 (elf_backend_copy_indirect_symbol): Define.
4103
1bbc9cec
RH
41042003-01-21 Richard Henderson <rth@redhat.com>
4105
4106 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4107 TPREL also get a reloc if shared. Remove SREL support.
4108 (elf64_alpha_emit_dynrel): New.
acc990f2 4109 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
4110 and GOTTPREL relocs to local symbols against the tp base.
4111 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4112
4113 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4114 use count before clobbering r_type.
4115 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4116 ordering would mean dataflow inspection is necessary.
4117
0da35f8b
SS
41182003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4119
4120 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 4121
571fe01f
NC
41222003-01-20 Fabio Alemagna <falemagn@aros.org>
4123
4124 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4125 elfxx-target.h and #undef it before #define'ing it.
4126 * elf32-i386.c: Likewise.
acc990f2
AM
4127 * elf32-sh64.c: Likewise.
4128 * elf64-alpha.c: Likewise.
4129 * elf64-sh64.c: Likewise.
571fe01f 4130
5236c819
MS
41312003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4132
4133 * bfd-in2.h: Regenerate.
4134 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4135 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4136 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4137 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4138 R_390_PLTOFF32 and R_390_PLTOFF64.
4139 (elf_s390_reloc_type_lookup): Likewise.
4140 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4141 of GOTPLT references to a function.
4142 (link_hash_newfunc): Initialize gotplt_refcount.
4143 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4144 and creation of the got section out of the main switch. Add support
4145 for the gotoff, gotplt and pltoff relocations.
4146 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4147 and pltoff.
4148 (elf_s390_adjust_gotplt): New function.
4149 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4150 plt entries.
4151 (allocate_dynrelocs): Add comment.
4152 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4153 for gotoff, gotplt and pltoff relocations.
4154 * elf64-s390.c: Same changes as for elf32-s390.c.
4155 * libbfd.h: Regenerate.
4156 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4157 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4158 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4159 and BFD_RELOC_390_PLTOFF64.
4160
a823975a
JJ
41612003-01-18 Jakub Jelinek <jakub@redhat.com>
4162
4163 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4164 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4165
b3dfd7fe
JJ
41662003-01-16 Jakub Jelinek <jakub@redhat.com>
4167
4168 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4169 self_dtpmod_done and self_dtpmod_offset.
4170 (allocate_global_data_got): Only use one got entry for all
4171 dtpmod relocs against local symbols.
4172 (allocate_dynrel_entries): Only need .rela.got entry for
4173 dtpmod against global symbol.
4174 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4175 Reserve space in .rela.got for the local dtpmod entry.
4176 (set_got_entry): Initialize the common local dtpmod .got entry.
4177 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4178 and R_IA_64_DTPREL64MSB.
4179
04c9666a
AM
41802003-01-16 Alan Modra <amodra@bigpond.net.au>
4181
4182 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4183 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4184 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4185 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4186 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4187 relative relocs, not with absolute ones.
4188 * Makefile.am: Run "make dep-am".
4189 * Makefile.in: Regenerate.
4190 * po/SRC-POTFILES.in: Regenerate.
4191
c87f1ff7
AS
41922003-01-15 Andreas Schwab <schwab@suse.de>
4193
4194 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4195 relocation against a non-allocated readonly section.
4196
86bbe32f
AM
41972003-01-10 Alan Modra <amodra@bigpond.net.au>
4198
4199 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4200 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4201
32d95f29
KD
42022002-01-08 Klee Dienes <kdienes@apple.com>
4203
4204 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4205 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4206 * Makefile.in: Regenerate.
acc990f2 4207
ab7d0aa0
AO
42082003-01-08 Alexandre Oliva <aoliva@redhat.com>
4209
4210 * elfn32-mips.c (prev_reloc_section): New.
4211 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4212 (SET_RELOC_ADDEND): Parenthesize macro argument.
4213
95d0f04a
DA
42142003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4215
4216 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4217 adjust addil instructions if the symbol has no section.
4218
5c9e189c
DD
42192003-01-07 DJ Delorie <dj@redhat.com>
4220
4221 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4222 partial_inplace.
4223
3e829b4a
AS
42242003-01-07 Andreas Schwab <schwab@suse.de>
4225
4226 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4227 PC relative relocations.
4228 (elf_m68k_discard_copies): Set it here instead.
4229
a75473eb
SC
42302002-01-02 Ben Elliston <bje@redhat.com>
4231 Jeff Johnston <jjohnstn@redhat.com>
4232
4233 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4234 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4235 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4236 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4237 (cpu-iq2000.lo): New target.
4238 * Makefile.in: Regenerate.
4239 * config.bfd: Handle iq2000-*-elf.
4240 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4241 (bfd_archures_list): Add bfd_iq2000_arch.
4242 * configure.in: Handle bfd_elf32_iq2000_vec.
4243 * configure: Regenerate.
acc990f2 4244 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4245 and BFD_RELOC_IQ2000_UHI16.
4246 * targets.c (bfd_elf32_iq2000_vec): Declare.
4247 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4248 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4249 * cpu-iq2000.c: New file.
4250 * elf32-iq2000.c: Likewise.
4251 * libbfd.h: Regenerate.
4252 * bfd-in2.h: Likewise.
4253
64543e1a
RS
42542003-01-02 Richard Sandiford <rsandifo@redhat.com>
4255
4256 * elfxx-mips.c: Include libiberty.h.
4257 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4258 (mips_set_isa_flags): New function, split out from...
4259 (_bfd_mips_elf_final_write_processing): ...here. Only call
4260 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4261 (mips_mach_extensions): New array.
4262 (mips_32bit_flags_p): New function.
4263 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4264 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4265 other is 64-bit. When adopting IBFD's architecture, adopt the
4266 bfd_mach as well as the flags.
4267
4852a44e
NC
42682003-01-02 Nick Kelsey <nickk@ubicom.com>
4269
4270 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4271 fix internal errors, fix bad code generation, fix incorrect stabs
4272 information, and improve ability to eliminate redundant page
4273 instructions. Added code to ip2k_final_link_relocate to self-verify
4274 the linker relaxation. Fix formatting problems.
4275
af7ee8bf
CD
42762002-12-30 Chris Demetriou <cgd@broadcom.com>
4277
4278 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4279 * archures.c (bfd_mach_mipsisa32r2): New define.
4280 * bfd-in2.h: Regenerate.
4281 * cpu-mips.c (I_mipsisa32r2): New enum value.
4282 (arch_info_struct): Add entry for I_mipsisa32r2.
4283 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4284 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4285 (_bfd_mips_elf_final_write_processing): Add
4286 bfd_mach_mipsisa32r2 case.
4287 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4288 binaries marked as using MIPS32 Release 2.
4289
2469cfa2
NC
42902002-12-30 Dmitry Diky <diwil@mail.ru>
4291
4292 * Makefile.am: Add msp430 target.
4293 * configure.in: Likewise.
4294 * Makefile.in: Regenerate.
4295 * configure: Regenerate.
4296 * archures.c: Add msp430 architecture vector.
4297 * config.bfd: Likewise.
4298 * reloc.c: Add msp430 relocs.
4299 * targets.c: Add msp320 target.
4300 * cpu-msp430.c: New file: msp430 cpu detection.
4301 * elf32-msp430.c: New file: msp430 reloc processing.
4302 * bfd-in2.h: Regenerate.
4303 * libbfd.h: Regenerate.
4304
eecdbe52
JJ
43052002-12-28 Jakub Jelinek <jakub@redhat.com>
4306
4307 * elf.c (elf_sort_sections): Don't reorder .tbss.
4308 (assign_file_positions_for_segments): Only adjust off/voff
4309 for increased alignment in PT_LOAD or PT_NOTE segment,
4310 but adjust p_filesz for .tbss too. in PT_LOAD consider
4311 .tbss to have zero memory size.
4312 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4313 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4314 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4315 into PT_TLS segment. Never put SHF_TLS sections in
4316 segments other than PT_TLS or PT_LOAD.
4317
4318 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4319 sh_entsize.
4320
213e90f4
DD
43212002-12-23 DJ Delorie <dj@redhat.com>
4322
4323 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4324
75828352
AM
43252002-12-23 Alan Modra <amodra@bigpond.net.au>
4326
4327 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4328
312b768e
NC
43292002-12-23 Nick Clifton <nickc@redhat.com>
4330
4331 * archures.c (bfd_arch_get_compatible): Add third parameter
4332 'accept_unknowns'. Only accept unknown format BFDs if
4333 accept_unknowns is true, or if the format is "binary".
acc990f2 4334 * bfd-in2.h: Regenerate.
312b768e 4335
63222ec9
NC
43362002-12-21 Nick Clifton <nickc@redhat.com>
4337
4338 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4339 that subtracted 8 from pc relative relocations.
4340
19852a2a
KH
43412002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4342
4343 * coff-h8300.c: Fix comment typos.
4344 * coffcode.h: Likewise.
4345 * cpu-cris.c: Likewise.
4346 * elf32-vax.c: Likewise.
4347 * genlink.h: Likewise.
4348 * linker.c: Likewise.
4349 * som.c: Likewise.
4350 * tekhex.c: Likewise.
4351 * vms-misc.c: Likewise.
4352
5fd63999
DD
43532002-12-20 DJ Delorie <dj@redhat.com>
4354
4355 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4356 * libbfd.h: Regenerate.
4357 * bfd-in2.h: Regenerate.
4358 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4359 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4360
4ee79850
KH
43612002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4362
4363 * doc/bfdint.texi: Fix typos.
4364
66e25bab
AM
43652002-12-20 Paul Eggert <eggert@twinsun.com>
4366
4367 Port to POSIX 1003.1-2001.
4368 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4369 * configure.in (build-warnings): Likewise.
4370 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4371 * aclocal.m4: Regenerate.
4372 * config.in: Regenerate.
4373 * configure: Regenerate.
4374
7dc77aaa
AM
43752002-12-19 Alan Modra <amodra@bigpond.net.au>
4376
0171ee92
AM
4377 * coff-h8300.c: Include libiberty.h.
4378 (h8300_reloc16_extra_cases): Check the hash table creator before
4379 referencing h8300 specific fields. Stash the hash table pointer
4380 in a local var. Comment typo fixes.
4381 (h8300_bfd_link_add_symbols): Likewise.
4382
1049f94e 4383 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4384 dst_mask comments.
4385 * bfd-in2.h: Regenerate.
4386
47388f4c
AM
43872002-12-18 Alan Modra <amodra@bigpond.net.au>
4388
4389 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4390 code a little. Comment on dynamic relocs against section symbols.
4391
1b3e3744
AM
43922002-12-17 Roger Sayle <roger@eyesopen.com>
4393
4394 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4395 the HP compiler's "long long".
4396
46f2b541
DD
43972002-12-16 Andrew MacLeod <amacleod@redhat.com>
4398
4399 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4400 and R_XSTORMY16_HI16) howto entries.
4401 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4402 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4403 determine the start of the second reloc table.
4404
af738ea7
NC
44052002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4406
4407 * ecofflink.c: Fix the reading of the debugging information
4408 of Tru64/Alpha binaries that are produced by recent Compaq
4409 compilers.
4410 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4411 table.
4412 (lookup_line): Because of the strange information sometimes
4413 generated by Compaq's recent compilers, change how the FDR
4414 table is searched so that PDRs (procedure descriptors) are
4415 correctly found. Note that this change is really more of a hack;
4416 however, I have included extensive documentation as to why
4417 this is the best solution short of an extensive rewrite or
4418 another hack.
4419 (fdrtab_lookup): Add comments to explain the algorithm.
4420
5354b572
AO
44212002-12-12 Alexandre Oliva <aoliva@redhat.com>
4422
4423 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4424 initializers to match struct declaration.
4425
ab3acfbe
AM
44262002-12-12 Alan Modra <amodra@bigpond.net.au>
4427
4428 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4429 * elf.c (get_program_header_size): Likewise.
4430 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4431 (m32r_elf_generic_reloc): Likewise.
4432 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4433 * elflink.h (elf_bfd_discard_info): Likewise.
4434
6348e046
AM
44352002-12-12 Alan Modra <amodra@bigpond.net.au>
4436
4437 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4438 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4439 DT_RELSZ adjustment, not output section. Avoid writing tags when
4440 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4441 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4442 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4443 DT_RELASZ adjustment, not output section. Avoid writing tags when
4444 unchanged. Adjust DT_RELA.
4445 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4446 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4447
2e7a68a8
AO
44482002-12-12 Alexandre Oliva <aoliva@redhat.com>
4449
4450 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4451 addend by 4.
4452
b15e6682
AO
44532002-12-12 Alexandre Oliva <aoliva@redhat.com>
4454
4455 * elfxx-mips.c (struct mips_got_entry): New.
4456 (struct mips_got_info): Added got_entries field.
4457 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4458 (mips_elf_local_got_index, mips_elf_got_page,
4459 mips_elf_got16_entry): Re-implement in terms of new...
4460 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4461 Change return type.
4462 (mips_elf_highest): Warning clean-up.
4463 (mips_elf_create_got_section): Initialize got_entries.
4464 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4465 local got size.
4466 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4467 GOT_PAGE entries, since we now reuse GOT16 entries.
4468
e6af3a53
NC
44692002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4470
4471 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4472 read-only section that lies after .text and before .data to be
4473 written into the output file and included in a_text.
4474 (translate_to_native_sym_flags): If an otherwise unrepresentable
4475 section was merged with .text, convert its symbols to N_TEXT
4476 symbols.
4477 * libaout.h (aout_section_merge_with_text_p): New macro.
4478
cf3d882d
AM
44792002-12-08 Alan Modra <amodra@bigpond.net.au>
4480
4481 * bfd-in.h: Comment typo fix. Formatting.
4482 * bfd-in2.h: Regenerate.
4483 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4484 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4485 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4486
2f9bd3f6
RH
44872002-12-05 Richard Henderson <rth@redhat.com>
4488
4489 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4490 Only send PCREL21B though the plt. Fix installed reloc type.
4491 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4492 against PCREL22 or PCREL64I; clean up error messages for
4493 branch relocs.
4494
d0112f73
KB
44952002-12-04 Kevin Buettner <kevinb@redhat.com>
4496
4497 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4498 New functions.
4499 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4500
c10d9d8f
JW
45012002-12-04 David Mosberger <davidm@hpl.hp.com>
4502
4503 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4504
d48770d4
L
45052002-12-04 H.J. Lu <hjl@gnu.org>
4506
4507 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4508 BFD address when constructing local name.
4509
b6152c34
AS
45102002-12-04 Andreas Schwab <schwab@suse.de>
4511
4512 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4513 member.
4514 (elf_m68k_link_hash_table_create): Initialize it.
4515 (elf_m68k_check_relocs): Handle symbols that are forced to be
4516 local due to visibility changes.
4517 (elf_m68k_adjust_dynamic_symbol): Likewise.
4518 (elf_m68k_size_dynamic_sections): Likewise.
4519 (elf_m68k_discard_copies): Likewise.
4520 (elf_m68k_relocate_section): Likewise.
4521
73374ef1
AM
45222002-12-04 Alan Modra <amodra@bigpond.net.au>
4523
4524 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4525
c5c1944d
AM
45262002-12-04 Alan Modra <amodra@bigpond.net.au>
4527
4528 * srec.c (srec_write_symbols): Restore '$' prefix to address
4529 accidentally removed in 2002-04-04 change.
4530 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4531
e1a9cb8e
NC
45322002-12-03 Nick Clifton <nickc@redhat.com>
4533
4534 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4535 (apuinfo_list_add): New function: Add a value to the list.
4536 (apuinfo_list_length): New function: Return the number of
4537 values on the list.
4538 (apuinfo_list_element): New function: Return a value on the
4539 list.
4540 (apuinfo_list_finish): New function: Free the resources used
4541 by the list.
4542 (ppc_elf_begin_write_processing): New function. Scan the
4543 input bfds for apuinfo sections.
4544 (ppc_elf_write_section): New function: Delay the creation of
4545 the contents of an apuinfo section in an output bfd.
4546 (ppc_elf_final_write_processing): New function. Create the
4547 contents of an apuinfo section in an output bfd.
4548 (elf_backend_begin_write_processing): Define.
4549 (elf_backend_final_write_processing): Define.
4550 (elf_backend_write_section): Define.
e1a9cb8e 4551
a823923b
RH
45522002-12-03 Richard Henderson <rth@redhat.com>
4553
4554 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4555
30491647
SC
45562002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4557
4558 Fix PR savannah/1417:
4559 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4560 branch if it goes to the start of the deleted region.
4561
bc7c6a90
SC
45622002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4563
4564 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4565 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4566 bfd_mach_m6812s): Declare.
4567
4568 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4569 (_bfd_m68hc12_elf_set_private_flags): Call it.
4570 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4571 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4572 report microcontroller incompatibilities (HC12 vs HCS12).
4573 (elf_backend_object_p): Update.
4574
b34976b6
AM
45752002-11-30 Alan Modra <amodra@bigpond.net.au>
4576
4577 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4578 (enum bfd_boolean, boolean): Delete.
4579 (bfd_boolean): Typedef to an int.
4580 (FALSE, TRUE): Define.
4581 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4582 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4583 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4584 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4585 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4586 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4587 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4588 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4589 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4590 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4591 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4592 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4593 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4594 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4595 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4596 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4597 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4598 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4599 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4600 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4601 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4602 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4603 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4604 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4605 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4606 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4607 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4608 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4609 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4610 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4611 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4612 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4613 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4614 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4615 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4616 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4617 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4618 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4619 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4620 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4621 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4622 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4623 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4624 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4625 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4626 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4627 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4628 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4629 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4630 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4631 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4632 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4633 of bfd_boolean vars with TRUE/FALSE. Formatting.
4634 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4635
947216bf
AM
46362002-11-28 Alan Modra <amodra@bigpond.net.au>
4637
4638 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4639 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4640 with Elf_Internal_Rela.
4641 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4642 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4643 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4644 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4645 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4646 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4647 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4648 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4649 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4650 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4651 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4652 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4653 throughout instead.
4654 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4655 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4656 Remove INLINE keyword.
4657 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4658 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4659 as a bfd_byte *.
4660 (elf_write_relocs): Consolidate REL and RELA code.
4661 (elf_slurp_reloc_table_from_section): Simplify REL code.
4662 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4663 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4664 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4665 RELA code.
4666 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4667 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4668 (elf_link_output_relocs): Likewise.
4669 (elf_reloc_link_order): Likewise.
4670 (elf_finish_pointer_linker_section): Likewise.
4671 (struct elf_link_sort_rela): Remove union.
4672 (elf_link_sort_cmp1): Update to suit.
4673 (elf_link_sort_cmp2): Here too.
4674 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4675 over-allocation for int_rels_per_ext_rel != 1 case.
4676 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4677 * elf32-i386.c: Likewise.
4678 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4679 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4680 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4681 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4682 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4683 elf64-sparc.c, elf64-x86-64.c: Likewise.
4684 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4685 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4686 bfd_elf32_swap_reloc_in.
4687
4688 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4689 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4690 (mips_elf64_swap_reloc_in): Zero r_addend.
4691 (mips_elf64_be_swap_reloc_in): Likewise.
4692 (mips_elf64_slurp_one_reloc_table): Simplify.
4693
4694 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4695 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4696 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4697
1448fa32
KK
46982002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4699
4700 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4701 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4702 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4703
73722af0
AM
47042002-11-26 Alan Modra <amodra@bigpond.net.au>
4705
4706 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4707 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4708 on a relocatable link. Comment typos.
4709 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4710 in the order they are declared. Clear elf_hash_value too.
4711 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4712 eh_info and tls_segment.
4713 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4714 sorted when discarding relocs by turning them into R_*_NONE.
4715
4716 * libbfd.c (warn_deprecated): Comment spelling.
4717 * po/SRC-POTFILES.in: Regenerate.
4718
7c25b72c
RH
47192002-11-21 Richard Henderson <rth@redhat.com>
4720
4721 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4722 arch's st_other bits when merging visibilities.
4723 (elf_link_output_extsym): Tidy clearing of visibility field.
4724
dc12c51f
AM
47252002-11-21 Alan Modra <amodra@bigpond.net.au>
4726
4727 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4728 (SWAP_OUT_RELOC_OFFSET): Define.
4729
963f13ec
AO
47302002-11-20 Alexandre Oliva <aoliva@redhat.com>
4731
4732 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4733 can_refcount is properly extended to the type of
4734 init_refcount.
4735
ee6423ed
AO
47362002-11-19 Alexandre Oliva <aoliva@redhat.com>
4737
4ffba85c
AO
4738 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4739 (_bfd_mips_elf_relocate_section): Use it.
4740
ee6423ed
AO
4741 * elfxx-mips.c (MNAME): New macro.
4742 (_bfd_mips_elf_check_relocs): Use it.
4743 (_bfd_mips_elf_discard_info): Likewise.
4744 (_bfd_mips_elf_final_link): Likewise.
4745
cdcf6e38
AM
47462002-11-19 Alan Modra <amodra@bigpond.net.au>
4747
4748 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4749 rel_hdr.sh_size too.
4750
93509525
KD
47512002-11-18 Klee Dienes <kdienes@apple.com>
4752
4753 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4754 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4755 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4756 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4757 Add dependencies for bfdwin.c, bfdio.c.
4758 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4759 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4760 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4761 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4762 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4763 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4764 bfd_get_size (moved from libbfd.c and bfd.c).
4765 * bfdwin.c New file. Contains _bfd_window_internal,
4766 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4767 libbfd.c and bfd.c).
4768 * po/SRC-POTFILES.in: Regenerate.
4769 * po/bfd.pot: Regenerate.
4770 * libbfd.h: Regenerate.
4771 * bfd-in2.h: Regenerate.
4772 * aclocal.m4: Regenerate.
4773 * Makefile.in: Regenerate.
4774 * configure: Regenerate.
4775
3ae41454
AM
47762002-11-18 Klee Dienes <kdienes@apple.com>
4777
4778 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4779
e514ac71
NC
47802002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4781
4782 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4783 jsr after a short jump.
4784 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4785
eddc4f81
KD
47862002-11-15 Klee Dienes <kdienes@apple.com>
4787
4788 * pef.c (bfd_pef_convert_architecture): Move declaration of
4789 ARCH_POWERPC and ARCH_M68K to the start of the function.
4790
51908eee
SS
47912002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4792
4793 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4794
3416d2e7
HPN
47952002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4796
4797 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4798 For bpo_gregs_section->contents, allocate _raw_size, not
4799 _cooked_size.
4800
b1c58715
AM
48012002-11-13 Klee Dienes <kdienes@apple.com>
4802
4803 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4804
077ca68b
L
48052002-11-13 H.J. Lu <hjl@gnu.org>
4806
4807 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4808
e84d6fca
AM
48092002-11-13 Klee Dienes <kdienes@apple.com>
4810 Alan Modra <amodra@bigpond.net.au>
4811
4812 * bfd.c (struct bfd_preserve): New.
4813 (bfd_preserve_save): New function.
4814 (bfd_preserve_restore): Ditto.
4815 (bfd_preserve_finish): Ditto.
4816 * bfd-in2.h: Regenerate.
4817 * mach-o.c: Formatting.
4818 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4819 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4820 (bfd_mach_o_core_p): Ditto.
4821 (bfd_mach_o_scan): Pass in mdata.
4822 * mach-o.h (bfd_mach_o_scan): Update prototype.
4823 * pef.c: Formatting.
4824 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4825 (bfd_pef_xlib_object_p): Ditto.
4826 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4827 * pef.h (bfd_pef_scan): Update prototype.
4828 * xsym.c: Formatting, K&R fixes.
4829 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4830 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4831 * xsym.h (bfd_sym_scan): Declare.
4832 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4833 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4834 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4835
cd24c222
NC
48362002-11-12 Nick Clifton <nickc@redhat.com>
4837
4838 * po/da.po: Updated Danish translation.
4839
99eb2ac8
AM
48402002-11-12 Alan Modra <amodra@bigpond.net.au>
4841
d6fe2dc1
AM
4842 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4843 relocatable link too.
4844 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4845 eh_frame and stab sections. Zap deleted relocs.
4846 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4847 (elf_bfd_discard_info): Run for relocatable link too.
4848 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4849 Handle ld -r case.
4850 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4851 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4852
126495ed
AM
4853 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4854 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4855 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4856 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4857 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4858 (struct elf_link_hash_table): Add eh_info.
4859 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4860 (_bfd_elf_discard_section_eh_frame): Update prototype.
4861 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4862 (_bfd_elf_write_section_eh_frame): Likewise.
4863 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4864 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4865 param. Get "hdr_info" from link hash table.
4866 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4867 header section from link hash table. Save header section to elf_tdata.
4868 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4869 header section from link hash table. Don't alloc hdr_info. Clear
4870 hdr_sec instead of setting "strip".
4871 (_bfd_elf_eh_frame_section_offset): Formatting.
4872 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4873 Get header section from link hash table.
4874 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4875 Get header section from link hash table.
4876 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4877 (get_program_header_size): Likewise.
4878 (_bfd_elf_section_offset): Formatting.
4879 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4880 section pointer in link hash table.
4881 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4882 and _bfd_elf_write_section_eh_frame calls. Update comment about
4883 eh_frame entries.
4884 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4885 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4886
4887 * po/SRC-POTFILES.in: Regenerate.
4888
99eb2ac8
AM
4889 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4890 relocs for discarded FDEs. Remove dead code.
4891 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4892 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4893 Tidy conditions under which stabs are edited. Formatting.
4894 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4895 from discarded relocs.
4896 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4897 section adjustments after testing magic values.
4898
7c319a27
AM
48992002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4900
4901 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4902 references to large plt symbols.
4903
a95a4550
AM
49042002-11-12 Klee Dienes <kdienes@apple.com>
4905
4906 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4907 looking for an unused section name.
4908
bc7eab72
KH
49092002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4910
4911 * coff-h8300.c: Fix formatting.
4912 * elf32-h8300.c: Likewise.
4913 * reloc16.c: Likewise.
4914
52585bb8
AM
49152002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4916
4917 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4918 section when dynamic section unused; _bfd_strip_section_from_output
4919 instead.
4920
9f632188
AM
49212002-11-08 Alan Modra <amodra@bigpond.net.au>
4922
207b304b
AM
4923 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4924 and sym_vec.
3b029f65 4925
9f632188
AM
4926 * dwarf2.c: Revert last change.
4927
ec4530b5
NC
49282002-11-07 Michal Ludvig <mludvig@suse.cz>
4929
9b5ecbd0 4930 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4931 _bfd_dwarf2_find_nearest_line): Use
4932 bfd_simple_get_relocated_section_contents() instead of
4933 bfd_get_section_contents().
4934 * reloc.c (bfd_perform_relocation): Add sanity check.
4935 * simple.c (simple_get_relocated_section_contents): If the section
4936 does not have any relocs associated with it, just return the
4937 unadjusted contents.
4938
205cfeb0
HPN
49392002-11-07 Hans-Peter Nilsson <hp@axis.com>
4940
4941 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4942 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4943 contents, enabling for a non-DSO, for symbols defined in the
4944 program with --export-dynamic.
4945
87e226ce
AM
49462002-11-07 Alan Modra <amodra@bigpond.net.au>
4947
4948 * elf64-ppc.c: Comment typo fixes.
4949 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4950
235c4794
NC
49512002-11-07 Nick Clifton <nickc@redhat.com>
4952
4953 * po/da.po: Updated Danish translation.
4954
49179469
AO
49552002-11-06 Alexandre Oliva <aoliva@redhat.com>
4956
4957 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4958 exactly three internal relocs per external reloc. Set reloc_count
4959 to the external reloc count.
4960
246178f2
NC
49612002-11-06 Klee Dienes <kdienes@apple.com>
4962
3ae41454 4963 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4964 Fix comment formatting.
4965
3af9a47b
NC
49662002-11-06 Klee Dienes <kdienes@apple.com>
4967
3ae41454 4968 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4969 xsym.lo.
4970 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4971 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4972 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4973 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4974 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4975 sym.
3ae41454 4976 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
4977 * Makefile.in: Regenerate.
4978 * doc/Makefile.in: Regenerate.
3ae41454 4979 * bfd-in2.h: Regenerate.
3af9a47b
NC
4980 * xsym.c: New file. Contains support for the Apple/Metrowerks
4981 xSYM debugging format.
4982 * xsym.h: New file.
4983 * pef.c: New file. Contains support for the Apple Code Fragment
4984 Manager Preferred Executable Format
4985 * pef.h: New file.
4986 * pef-traceback.h: New file. Contains support for parsing PowerPC
4987 traceback tables as used by PEF executables (and perhaps other
4988 systems as well).
3ae41454 4989 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
4990 format.
4991 * mach-o.h: New file.
4992 * mach-o-target.c: New file. Declares the mach-o targets
4993 themselves. Included three times by mach-o.c; each time with a
4994 different set of macros set.
3ae41454 4995
b6821651 49962002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
4997
4998 * Makefile.am: Remove entries for elf32-qnx.[ch].
4999 * Makefile.in: Regenerate.
5000 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5001 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5002 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5003 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5004 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5005 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5006 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5007 * configure: Regenerate.
5008 * elf32-qnx.c: Remove.
5009 * elf32-qnx.h: Remove.
5010 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5011 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
5012 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5013 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
5014 * elf32-i386.c: Remove QNX extended bfd support.
5015 * elf32-ppc.c: Remove QNX extended bfd support.
5016 * elf32-sh.c: Remove QNX extended bfd support.
5017 * elfarm-nabi.c: Remove QNX extended bfd support.
5018 * targets.c: Remove qnx vectors.
5019 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5020 (elf_backend_is_contained_by_filepos): Remove.
5021 (elf_backend_copy_private_bfd_data_p): Remove.
5022 * po/SRC-POTFILES.in: Regenerate.
5023
b6821651
AM
50242002-11-06 David O'Brien <obrien@FreeBSD.org>
5025 Alan Modra <amodra@bigpond.net.au>
5026
5027 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5028 dynamic relocs against section symbols for the output section vma.
5029
50302002-11-05 Alan Modra <amodra@bigpond.net.au>
5031
5032 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5033 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5034
08f74004
AM
50352002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5036 Alan Modra <amodra@bigpond.net.au>
5037
5038 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5039 vectors in target_selvecs.
5040 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5041 in target_selvecs.
5042 (sh-*-netbsdelf*): Likewise.
5043 * configure.in (assocvecs): New variable. Handle assocvecs like
5044 selvecs.
5045 * configure: Regenerate.
5046 * format.c (bfd_check_format_matches): Store bfd_target pointers
5047 in matching_vector instead of target names. Select first target
5048 from bfd_associated_vector that matches a list of ambiguous targets.
5049 * targets.c (_bfd_associated_vector): New array.
5050 (bfd_associated_vector): New variable.
5051 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5052 * libbfd-in.h (bfd_associated_vector): Declare.
5053 * libbfd.h: Regenerate.
5054
89117aab
AM
50552002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5056
5057 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5058 non-NULL before dereferencing.
5059
5e9aae3e
KK
50602002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5061
5062 * vms.c (vms_object_p): Restore the start address when returning
5063 NULL.
5064
c97e73dd
AM
50652002-11-04 Alan Modra <amodra@bigpond.net.au>
5066 Hans-Peter Nilsson <hp@axis.com>
5067
5068 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5069 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5070 Set up a larger symshndxbuf, and write it out. Free it on
5071 exit rather than freeing symbuf twice. Correct section index
5072 on output section symbol loop.
5073 (elf_link_output_sym): Accumulate symbol extension section
5074 indices, reallocating symshndxbuf rather than writing it out.
5075 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5076 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5077 Use bfd_zalloc to clear i_shdrp[0] too.
5078
3463048e
SC
50792002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5080
5081 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5082 _raw_size of cranges section if _cooked_size not yet set.
5083
63a23799
HPN
50842002-11-03 Hans-Peter Nilsson <hp@axis.com>
5085
5086 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5087 for bfd_elf32_swap_symbol_out.
5088
e68cc12e
DB
50892002-10-31 David O'Brien <obrien@FreeBSD.org>
5090
5091 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5092 signed and unsigned in comparison.
5093
db4b6d01
DJ
50942002-10-30 Daniel Jacobowitz <drow@mvista.com>
5095
5096 * coffcode.h: Remove extraneous '\'.
5097
840f0243
L
50982002-10-28 H.J. Lu <hjl@gnu.org>
5099
5100 * Makefile.am (targets.lo): Depend on Makefile instead of
5101 config.status.
5102 (archures.lo): Likewise.
5103 * Makefile.in: Regenerated.
5104
05a7e2db
JT
51052002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5106
5107 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5108 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5109 targ_selvecs.
5110
a0087177
JW
51112002-10-25 Jim Wilson <wilson@redhat.com>
5112
5113 * elf64-sh64.c (sh_elf64_relocate_section): Call
5114 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5115 of SHF_MERGE section.
5116
8718ac9c
HPN
51172002-10-25 Hans-Peter Nilsson <hp@axis.com>
5118
5119 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5120
d45913a0
DA
51212002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5122
5123 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5124 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5125 unsigned int.
5126 (NAME(aout,final_link)): Cast enum used in assignment.
5127 (aout_link_write_symbols): Cast enums in comparisons, int values to
5128 boolean, enums in assignments to int.
5129 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5130 (aout_link_input_section_ext): Likewise. Cast enums used in
5131 comparisons with unsigned ints.
d45913a0
DA
5132 (aout_link_reloc_link_order): Cast enum to int in assignment.
5133 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5134 calls to char *.
5135 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5136 assignment.
5137 * bfd-in2.h (bfd_set_section_vma): Likewise.
5138 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5139 * binary.c (bfd_alloc): Cast enum to long.
5140 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5141 * dwarf2.c (read_abbrevs): Add casts to enum types.
5142 (read_attribute_value): Likewise.
5143 (arange_add): Cast result of bfd_zalloc call.
5144 (comp_unit_contains_address): Return true and false.
5145 (comp_unit_find_nearest_line): Cast return to boolean.
5146 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5147 * gen-aout.c: define macro '_' if not defined.
5148 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5149 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5150 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5151 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5152 (bfd_generic_is_local_label_name): Cast return to boolean.
5153 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5154 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5155 struct bfd_hash_entry *.
5156 (_bfd_generic_link_hash_newfunc): likewise.
5157 (_bfd_generic_final_link): Cast enum to unsigned int.
5158 * merge.c (sec_merge_emit): Cast return to boolean.
5159 (merge_strings): Add casts to const unsigned char *.
5160 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5161 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5162 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5163 to struct bfd_hash_entry *.
d45913a0
DA
5164 (bfd_set_section_content): Add cast to PTR in comparison.
5165 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5166 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5167 simple_dummy_unattached_reloc,
5168 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5169 function definitions.
5170 * srec.c (S3Forced): Initialize to false.
5171 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5172 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5173 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5174 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5175 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5176 comparisons.
5177
475c2a7e
JJ
51782002-10-23 Jakub Jelinek <jakub@redhat.com>
5179
5180 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5181 relocs into shared lib non-allocated reloc sections.
5182
e82ce529
AM
51832002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5184
5185 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5186 sorted even when given an out-of-order line sequence.
5187 (lookup_address_in_line_info_table): When an exact VMA match is
5188 not found, return line information with the closest VMA.
5189
f2482cb2
NC
51902002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5191
5192 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5193 HPUX 11.00 patch PHSS_26559.
5194
c1fd6598
AO
51952002-10-22 Alexandre Oliva <aoliva@redhat.com>
5196
5197 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5198 the options section into a separate section unless IRIX 6
5199 compatibility is enabled.
5200
033fd5f9
AO
52012002-10-22 Alexandre Oliva <aoliva@redhat.com>
5202
5203 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5204 into arrays.
5205 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5206 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5207 into account.
5208 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5209 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5210
ef485c01
AM
52112002-10-21 Graeme Peterson <gp@qnx.com>
5212
5213 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5214
b50afec9
AM
52152002-10-21 Alan Modra <amodra@bigpond.net.au>
5216
5217 * targets.c (bfd_target_list): Don't return the default target twice.
5218
5fe39cae
AM
52192002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5220
5221 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5222 perror with bfd_perror.
5223
5d603aa9
L
52242002-10-19 H.J. Lu <hjl@gnu.org>
5225
5226 * elflink.h (elf_link_add_object_symbols): Correctly handle
5227 DT_RPATH and DT_RUNPATH.
5228
e377ab71
MK
52292002-10-19 Mark Kettenis <kettenis@gnu.org>
5230
5231 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5232
0d09fec6
DC
52332002-10-17 Denis Chertykov <denisc@overta.ru>
5234
5235 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5236 for ip2k port.
5237
acf8aed4
AM
52382002-10-17 Alan Modra <amodra@bigpond.net.au>
5239
5240 * elfxx-target.h (USE_REL): Don't define as 1.
5241 * elf32-arm.h (USE_REL): Provide a default define of 0.
5242 Use #if rather than #ifdef when testing USE_REL.
5243 * elf32-m32r.c: Likewise.
5244
5245 * elf32-arc.c (USE_REL): Define as 1.
5246 * elf32-d10v.c (USE_REL): Likewise.
5247 * elf32-m32r.c (USE_REL): Likewise.
5248 * elf32-m68hc11.c (USE_REL): Likewise.
5249 * elf32-m68hc12.c (USE_REL): Likewise.
5250 * elf32-or32.c (USE_REL): Likewise.
5251 * elfarm-nabi.c (USE_REL): Likewise.
5252
f52d1d64
JJ
52532002-10-16 Jakub Jelinek <jakub@redhat.com>
5254
5255 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5256 (s390x-*-linux*): Add targ_selvecs.
5257
2bc3c89a
AM
52582002-10-16 Alan Modra <amodra@bigpond.net.au>
5259
5260 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5261 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5262 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5263 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5264 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5265 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5266 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5267 (SOURCE_HFILES): Add elf32-qnx.h.
5268 (BUILD_HFILES): Add bfdver.h.
5269 Run "make dep-am".
5270 * Makefile.in: Regenerate.
5271 * configure.in Update bfd vector dependencies.
5272 * configure: Regenerate.
5273 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5274 * elf32-i386qnx.c: Likewise.
5275 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5276 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5277 * elf32-sh-lin.c: Likewise.
5278 * elf32-shqnx.c: Likewise.
5279 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5280 * elf32-sh64-nbsd.c: Likewise.
5281 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5282 * elf64-sh64-nbsd.c: Likewise.
5283 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5284 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5285 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5286 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5287 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5288 (elf_backend_is_contained_by_filepos): Likewise.
5289 (elf_backend_copy_private_bfd_data_p): Likewise.
5290 Globalize and move functions to..
5291 * elf32-qnx.c: ..here. New file.
5292 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5293 emit target vectors when INCLUDE_SHMEDIA.
5294 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5295 end of file.
5296 * elf64-sh64.c: Remove ELF_ARCH test.
5297 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5298 * po/BLD-POTFILES.in: Regenerate.
5299 * po/SRC-POTFILES.in: Regenerate.
5300
90c9df85
AM
53012002-10-16 Alan Modra <amodra@bigpond.net.au>
5302
366f2964
AM
5303 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5304 loaded with --just-symbols.
5305
90c9df85
AM
5306 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5307 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5308 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5309 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5310
2238051f
RH
53112002-10-15 Richard Henderson <rth@redhat.com>
5312
5313 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5314 (BFD64_BACKENDS_CFILES): Likewise.
5315 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5316 * elf64-alpha-fbsd.c: Remove file, move code ...
5317 * elf64-alpha.c: ... here.
5318 * Makefile.in, configure: Rebuild.
5319
64e04ecd
RH
53202002-10-14 Richard Henderson <rth@redhat.com>
5321
5322 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5323 VALUE, not ADDEND.
5324
396a6083
SC
53252002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5326
5327 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5328 datalabel_got_offset with union of datalabel_got
5329 offset and refcount.
5330 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5331 (allocate_dynrelocs): Delete unnecessary code for
5332 STT_DATALABEL type. Create entry in got for
5333 datalabel version of symbol if datalabel_got.refcount > 0.
5334 (sh_elf_relocate_section): Use datalabel_got union.
5335 (sh_elf_gc_sweep_hook): Pull common code to initialize
5336 h and eh out of switch statement. Declare seen_stt_datalabel.
5337 Initialize it. Decrement datalabel_got.refcount for
5338 got relocs when seen_stt_datalabel is true.
5339 Decrement local_got_refcounts entry for datalabel got relocs
5340 of local symbols.
5341 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5342 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5343 Initialize it. When seen_stt_datalabel is true, increment
5344 datalabel_got refcount rather than got.refcount.
5345 (sh_elf_finish_dynamic_symbol): Create relocs to
5346 initialize got entry for datalabel version of symbol.
5347
6a0735ef
AM
53482002-10-14 Alan Modra <amodra@bigpond.net.au>
5349
5350 * Makefile.am: Run "make dep-am".
5351 (BFD_H_FILES): Remove version.h.
5352 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5353 * version.h: ..to here.
5354 * configure.in (bfd_version_date): Remove.
5355 (AC_OUTPUT): Make bfdver.h from version.h.
5356 * bfd.c: #include "bfdver.h".
5357 * vms-hdr.c: Likewise.
5358 * Makefile.in: Regenerate.
5359 * bfd-in2.h: Regenerate.
5360 * configure: Regenerate.
5361 * po/SRC-POTFILES.in: Regenerate.
5362
686e4055
AM
53632002-10-14 Alan Modra <amodra@bigpond.net.au>
5364
5365 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5366 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5367 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5368 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5369 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5370 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5371 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5372 bfd_mach_ip2022, bfd_mach_ip2022ext,
5373 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5374 * bfd-in2.h: Regenerate.
5375
019dca2b
KK
53762002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5377
5378 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5379 endian vector to targ_selvecs.
5380
bce03d3d
AO
53812002-10-13 Alexandre Oliva <aoliva@redhat.com>
5382
5383 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5384 save_addend argument. Don't apply the 32-bit mask to a
5385 GPREL32 value if it's to be used in another relocation. Don't
5386 use forced-check computation of local_p to decide whether to
5387 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5388 of the addend of a non-in-place GPREL16 relocation.
5389 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5390 mips_elf_calculate_relocation().
5391
9b691193
SC
53922002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5393
5394 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5395 with symbols in other sections if we relaxed something; the sections
5396 output offsets must be re-computed before.
5397
1f4c5b47
SC
53982002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5399
5400 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5401 handling to use Elf_Internal_Sym.
5402 (m68hc11_elf_relax_delete_bytes): Likewise.
5403
5dc97655
KK
54042002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5405
5406 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5407 sh_elf_object_p, dtpoff_base): New functions.
5408 (sh_elf_howto_table): Add TLS relocs.
5409 (sh_reloc_map): Likewise.
5410 (sh_elf_info_to_howto): Support TLS relocs.
5411 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5412 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5413 New macros.
5414 (sh_elf_obj_tdata): New.
5415 (elf_sh_link_hash_table): Add tls_ldm_got.
5416 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5417 (allocate_dynrelocs): Support TLS relocs.
5418 (sh_elf_size_dynamic_sections): Likewise.
5419 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5420 .rela.got section when found already. Return false after printing
5421 error about unresolvable relocation.
5422 (sh_elf_gc_sweep_hook): Support TLS relocs.
5423 (sh_elf_check_relocs): Likewise.
5424 (sh_elf_finish_dynamic_symbol): Likewise.
5425 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5426 * reloc.c: Add SH TLS relocs.
5427 * bfd-in2.h, libbfd.h: Regenerate.
5428
6a0735ef
AM
54292002-10-11 Daniel Jacobowitz <drow@mvista.com>
5430
5431 * Makefile.in: Regenerated.
5432
af39267e
DJ
54332002-10-11 Daniel Jacobowitz <drow@mvista.com>
5434
5435 * Makefile.am: Run dep-am.
6a0735ef 5436 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5437 (BFD32_LIBS): Add simple.lo.
5438 (BFD32_LIBS_CFILES): Add simple.c.
5439 * Makefile.in: Regenerated.
5440 * bfd-in2.h: Regenerated.
5441 * simple.c: New file.
5442
0be617ce
AM
54432002-10-11 Alan Modra <amodra@bigpond.net.au>
5444
14a793b2
AM
5445 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5446 (record_thumb_to_arm_glue): Likewise.
5447 * ecoff.c (ecoff_link_add_externals): Likewise.
5448 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5449 (record_thumb_to_arm_glue): Likewise.
5450 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5451 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5452 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5453 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5454 * elf64-ppc.c (func_desc_adjust): Likewise.
5455 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5456 (sh64_elf64_create_dynamic_sections): Likewise.
5457 * elflink.c (_bfd_elf_create_got_section): Likewise.
5458 (_bfd_elf_create_dynamic_sections): Likewise.
5459 (_bfd_elf_create_linker_section): Likewise.
5460 * elflink.h (elf_add_default_symbol): Likewise.
5461 (elf_link_create_dynamic_sections): Likewise.
5462 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5463 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5464 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5465 (_bfd_mips_elf_add_symbol_hook): Likewise.
5466 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5467 * linker.c (generic_link_add_symbol_list): Likewise.
5468 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5469
5470 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5471
0be617ce 5472 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5473 completely removed. Correct local sym adjustment.
0be617ce 5474
0a4ef3f4
SC
54752002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5476
5477 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5478 Correct mistake in calculation of address of .got.
5479 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5480 elf_sh64_pic_plt_entry_le): Likewise.
5481
efacd36e
SC
54822002-10-09 Richard Shann <richard.shann@superh.com>
5483 Stephen Clarke <stephen.clarke@superh.com>
5484
5485 * Makefile.am: Add entries for elf32-sh64-lin.c and
5486 elf64-sh64-lin.c. Regenerate.
5487 * Makefile.in: Regenerate.
9b5ecbd0 5488 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5489 to use sh64 vectors rather than sh vectors.
5490 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5491 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5492 * configure: Regenerate.
5493 * elf32-sh64-lin.c: New file.
5494 * elf64-sh64-lin.c: New file.
5495 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5496 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5497
299bf759
L
54982002-10-08 H.J. Lu <hjl@gnu.org>
5499
5500 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5501 IE->LE transition for R_386_TLS_IE.
5502
51020317
AM
55032002-10-08 Alan Modra <amodra@bigpond.net.au>
5504
5505 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5506
a8fcf378
NC
55072002-10-07 Mark Elbrecht <snowball3@softhome.net>
5508
51020317
AM
5509 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5510 sections.
a8fcf378 5511
a16d5acb
AM
55122002-10-07 Alan Modra <amodra@bigpond.net.au>
5513
a6b511bd
AM
5514 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5515 code.
5516
a16d5acb
AM
5517 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5518
7c4a37eb
AM
55192002-10-06 Alan Modra <amodra@bigpond.net.au>
5520
5521 * opncls.c: Formatting.
5522 (_bfd_new_bfd): Use a smaller section hash table.
5523
7c4ca42d
AO
55242002-10-05 Alexandre Oliva <aoliva@redhat.com>
5525
5526 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5527 of the other two relocations packed with a REL32 to NONE.
5528
4989d792
SC
55292002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5530
5531 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5532 (sh_elf_link_hash_newfunc): Initialize it.
5533 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5534 to got.refcount for symbols that are forced local or when
5535 we have direct got refs.
5536 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5537 to correctly adjust got.refcount and plt.refcount.
5538 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5539 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5540
7c445aa3
JJ
55412002-10-01 Jakub Jelinek <jakub@redhat.com>
5542
5543 * elf32-i386.c (elf_i386_relocate_section): Fix
5544 movl foo@indntpoff, %eax IE->LE transition.
5545
abcf1d52
JJ
55462002-10-01 Jakub Jelinek <jakub@redhat.com>
5547
5548 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5549 sequence and its transitions.
5550
a45bb67d
JJ
55512002-10-01 Jakub Jelinek <jakub@redhat.com>
5552
5553 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5554 to st_value + addend in non-code sections.
5555 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5556 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5557
00707a0e 55582002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5559 Ken Raeburn <raeburn@cygnus.com>
5560 Aldy Hernandez <aldyh@redhat.com>
5561 Eric Christopher <echristo@redhat.com>
5562 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5563
5564 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5565 (bfd_mach_mips5500): New.
5566 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5567 (arch_info_struct): Add corresponding entries here.
5568 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5569 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5570 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5571 bfd_mach_mips5400 and bfd_mach_mips5500.
5572 (_bfd_mips_elf_mach_extends_p): New function.
5573 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5574 the EF_MIPS_MACH flags.
5575 * bfd-in2.h: Regenerate.
5576
624f0b25
JT
55772002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5578
5579 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5580 .got sections.
5581
b89fe0ee
AM
55822002-09-28 Alan Modra <amodra@bigpond.net.au>
5583
5584 * elf.c (map_sections_to_segments): Correct test for start of
5585 writable section in the same page as end of read-only section.
5586
b29635ba
JT
55872002-09-27 Matt Thomas <matt@3am-software.com>
5588
5589 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5590 local_got_refcounts usage. Remove allocation of got slot.
5591 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5592 Remove de-allocation of got slot.
5593 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5594 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5595 sections to be GC'ed.
5596 (elf_vax_instantiate_got_entries): New function.
5597 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5598 tests that are now handled by elf_vax_instantiate_got_entries.
5599 Assert GOT entry falls within .got section size. Remove redundant
5600 comparisions. Fix comments.
5601
bffbf940
JJ
56022002-09-27 Jakub Jelinek <jakub@redhat.com>
5603
5604 * reloc.c: Add x86-64 TLS relocs.
5605 * bfd-in2.h, libbfd.h: Rebuilt.
5606 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5607 relocs. Add TLS relocs.
5608 (x86_64_reloc_map): Add TLS relocs.
5609 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5610 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5611 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5612 (elf64_x86_64_hash_entry): Define.
5613 (struct elf64_x86_64_obj_tdata): New.
5614 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5615 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5616 (link_hash_newfunc): Initialize tls_type.
5617 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5618 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5619 (elf64_x86_64_mkobject): New.
5620 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5621 (elf64_x86_64_tls_transition): New.
5622 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5623 Handle TLS relocs.
5624 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5625 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5626 (elf64_x86_64_size_dynamic_sections): Likewise.
5627 (dtpoff_base, tpoff): New.
5628 (elf64_x86_64_relocate_section): Handle TLS relocs.
5629 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5630 entries.
5631 (bfd_elf64_mkobject): Define.
5632
5633 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5634 DF_STATIC_TLS if shared.
5635
14366460
TS
56362002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5637
5638 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5639 empty relocation sections.
5640
9f951329
AM
56412002-09-26 Alan Modra <amodra@bigpond.net.au>
5642
5643 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5644 (ppc64_elf_build_stubs): Build them here instead.
5645
6b3ac709
JJ
56462002-09-24 Jakub Jelinek <jakub@redhat.com>
5647
5648 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5649 addend into r_addend, not *r_offset.
5650 (elf32_sparc_finish_dynamic_symbol): Likewise.
5651 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5652 R_SPARC_RELATIVE's r_offset.
5653
e2f6d277
NC
56542002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5655
5656 * dwarf2.c (decode_line_info): Update to correctly decode
5657 the (non-standard DWARF2) out-of-order address sequences
5658 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5659
f3961b2b
DD
56602002-09-23 Mark Elbrecht <snowball3@softhome.net>
5661
5662 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5663
ad34bc37
AM
56642002-09-23 Alan Modra <amodra@bigpond.net.au>
5665
5666 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5667 for discarded FDEs. Remove redundant assignment.
5668 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5669
82988bff
L
56702002-09-22 H.J. Lu <hjl@gnu.org>
5671
5672 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5673 the relocation count between different .reloc sections.
5674
5ad8645c
AM
56752002-09-21 Alan Modra <amodra@bigpond.net.au>
5676
5f819128
AM
5677 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5678 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5679 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5680 R_PPC_EMB_RELSDA.
5681
5ad8645c
AM
5682 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5683 unsigned. Move "symcount" assignment out of loop.
5684 * Makefile.am: Run "make dep-am".
5685 * Makefile.in: Regenerate.
5686 * configure: Regenerate.
5687 * po/SRC-POTFILES.in: Regnerate.
5688
75936555
NC
56892002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5690
5691 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5692 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5693 (e.g. IRIX64).
5694
2243deae
L
56952002-09-19 Jakub Jelinek <jakub@redhat.com>
5696
5697 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5698 even if generating R_PPC_RELATIVE reloc.
5699 (ppc_elf_relocate_section): Make sure relocation is performed
5700 if skip == -2. Clear memory at r_offset when creating dynamic
5701 relocation.
5702
37e55690
JJ
57032002-09-19 Jakub Jelinek <jakub@redhat.com>
5704
5705 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5706 BFD_RELOC_386_TLS_GOTIE): Add.
5707 * bfd-in2.h, libbfd.h: Rebuilt.
5708 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5709 and R_386_TLS_GOTIE.
5710 (elf_i386_reloc_type_lookup): Handle it.
5711 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5712 char instead of enum, change GOT_* into defines.
5713 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5714 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5715 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5716 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5717 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5718 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5719 (elf_i386_gc_sweep_hook): 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 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5722 tls_type is GOT_TLS_IE_BOTH.
5723 (elf_i386_size_dynamic_sections): Likewise.
5724 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5725 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5726 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5727 all 4 GOT_TLS_* TLS types.
5728
8e67855b
NC
57292002-09-19 Nick Clifton <nickc@redhat.com>
5730
5731 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5732 follow indirect links.
5733
1c59ba3f
NC
57342002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5735
5736 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5737 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5738 on 64 bit machines.
5739 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5740 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5741 ECOFF information: 'ioptMax' refers to the actual *size*
5742 of the optimization symtab, not the number of entries.
1c59ba3f 5743
9d7404b7
NC
57442002-09-19 Daniel Jacobowitz <drow@mvista.com>
5745
5746 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5747 ELF_LINK_HASH_NEEDS_PLT logic.
5748
05a487dc
DJ
57492002-09-18 Daniel Jacobowitz <drow@mvista.com>
5750
5751 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5752 correct relocation count.
5753
1f70368c
DJ
57542002-09-17 Daniel Jacobowitz <drow@mvista.com>
5755
5756 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5757 * bfd.c (struct _bfd): Add dynsymcount.
5758 * bfd-in2.h: Regenerated.
5759 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5760 abfd->dynsymcount.
5761 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5762 for overflow.
5763
51020317 57642002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5765
5766 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5767 (mips_elf64_final_gp): Don't make up gp value.
5768 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5769 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5770 .MIPS.options/.options section.
5771
290062cc
DB
57722002-09-17 David O'Brien <obrien@FreeBSD.org>
5773
5774 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5775 It is benign for FreeBSD < 4.1. Minor reformatting.
5776 * elf64-alpha-fbsd.c: Likewise.
5777
c5c1f40c
JJ
57782002-09-17 Jakub Jelinek <jakub@redhat.com>
5779
ca1eb0ba
JJ
5780 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5781 addend.
c5c1f40c 5782
562ace6b
AM
57832002-09-17 Alan Modra <amodra@bigpond.net.au>
5784
5785 * elf64-alpha.c (alpha_elf_size_info): Make static.
5786
5af6ead6
AM
57872002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5788
5789 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5790 * cpu-tic4x.c: Ditto.
5791
cb9512fc
TS
57922002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5793
5794 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5795 duplicate define.
5796
4ada7262
DB
57972002-09-16 Bruno Haible <bruno@clisp.org>
5798
5799 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5800 by a target variant implementation.
5801 * elf64-alpha.c: Likewise.
5802 * elf32-i386-fbsd.c: New file.
5803 * elf64-alpha-fbsd.c: New file.
5804 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5805 bfd_elf64_alpha_freebsd_vec.
5806 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5807 bfd_elf64_alpha_freebsd_vec.
5808 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5809 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5810 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5811 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5812 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5813 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5814 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5815
6a30718d
JJ
58162002-09-12 Jakub Jelinek <jakub@redhat.com>
5817
5818 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5819 NULL.
5820 (elf_i386_relocate_section): Return false after printing error about
5821 unresolvable relocation.
5822
6cf9e9fe
NC
58232002-09-12 Nick Clifton <nickc@redhat.com>
5824
5825 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5826 R_ARM_THM_PC11.
5827
10f469bf
DJ
58282002-09-11 Jeffrey Law <law@redhat.com>
5829
5830 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5831
dc43ada5
NC
58322002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5833
5834 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5835 line_ptr before deciding we've found a symbol.
5836
e09f4395
NC
58372002-09-11 Nick Clifton <nickc@redhat.com>
5838
5839 * po/da.po: New Danish translation file.
5840 * configure.in (LINGUAS): Add 'da'.
5841 * configure: Regenerate.
5842
b3018b5f
NC
58432002-09-10 Michael Snyder <msnyder@redhat.com>
5844
5845 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5846 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5847 do_sections64, depending on corefile (32-bit or 64-bit).
5848
2f21f25e
RH
58492002-09-09 Richard Henderson <rth@redhat.com>
5850
5851 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5852 and PCREL21F like PCREL21B.
5853
28b94e7c
KB
58542002-09-04 Kevin Buettner <kevinb@redhat.com>
5855
51020317
AM
5856 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5857 vector.
28b94e7c 5858
5cec6941
NC
58592002-09-02 Nick Clifton <nickc@redhat.com>
5860
5861 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5862 names instead of cryptically overloaded bfd_reloc error
5863 codes.
5864 (v850_elf_relocate_section): Likewise.
5865 (v850_elf_relax_section): Replace caching of external symbols
5866 with caching of internal symbols obtained from calling
5867 bfd_elf_get_elf_syms().
51020317 5868 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5869
3b77b1d5
AM
58702002-09-02 Alan Modra <amodra@bigpond.net.au>
5871
638524b5
AM
5872 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5873 (bfd_pj_arch): Use bfd_default_scan.
5874 * cpu-v850.c (scan): Remove.
5875 (N): Use bfd_default_scan.
5876 * cpu-z8k.c (scan_mach): Remove.
5877 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5878 first. Use bfd_default_scan.
5879
250d94fd
AM
5880 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5881 bfd_mach constants.
5882 (ecoff_get_magic): Likewise.
5883 * elf32-v850.c (v850_elf_object_p): Likewise.
5884 (v850_elf_final_write_processing): Likewise.
5885 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5886 (MY(write_object_contents)): Likewise.
5887 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5888 * coffcode.h (coff_write_object_contents): Likewise.
5889 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5890 Remove unnecessary "machine" assignments.
5891 (coff_write_relocs): Test for the absolute section sym by testing
5892 section and flags.
5893
3b77b1d5
AM
5894 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5895 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5896 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5897
e5b45b83
DA
58982002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5899
5900 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5901 * bfd-in2.h (align_power): Likewise.
5902
37f45cf8
AM
59032002-08-30 Alan Modra <amodra@bigpond.net.au>
5904
5905 * Makefile.am: Run "make dep-am".
5906 * Makefile.in: Regenerate.
5907
5908 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5909 * cpu-powerpc.c (powerpc_compatible): Likewise.
5910 * cpu-rs6000.c (rs6000_compatible): Likewise.
5911
86aba9db
NC
59122002-08-28 Catherine Moore <clm@redhat.com>
5913
9b5ecbd0 5914 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5915 (v850-elf-reloc): Don't resolve pc relative relocs.
5916 (v850_elf_ignore_reloc): New routine.
5917 (v850_elf_final_link_relocate): Handle new relocs.
5918 (v850_elf_relax_delete_bytes ): New routine.
5919 (v850_elf_relax_section): New routine.
5920 (bfd_elf32_bfd_relax_section): Define.
5921 (HOWTO): New entries for new relocs.
5922 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5923 (BFD_RELOC_V850_LONGJUMP): New reloc.
5924 (BFD_RELOC_V850_ALIGN): New reloc.
5925 * archures.c: Remove redundant v850ea architecture.
5926 * cpu-v850.c: Remove redundant v850ea support.
5927 * libbfd.h: Regenerate.
5928 * bfd-in2.h: Regenerated.
5929
026df7c5
NC
59302002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5931
5932 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5933 * configure.in: Add tic4x_coff vector files.
5934 * configure: Regenerate.
5935 * Makefile.am: Add tic4x target.
5936 * Makefile.in: Regenerate.
5937
59382002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5939
5940 * archures.c: Add the BFD arch type tic4x.
5941 * bfd-in.h: Add BFD_IN_MEMORY flag.
5942 * coff-tic4x.c: New file.
5943 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5944 * cpu-tic4x.c: New file.
5945 * targets.c: Added tic4x- in list of xvecs.
5946 * ticoff.h: New file.
5947 * bfd-in2.h: Regenerate.
5948
88f7bcd5
NC
59492002-08-27 Adam Nemet <anemet@lnxw.com>
5950
5951 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5952 bit of DT_INIT and DT_FINI for Thumb functions.
5953
c8e48751
AM
59542002-08-26 Alan Modra <amodra@bigpond.net.au>
5955
5956 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5957
2846975a
AM
59582002-08-26 Alan Modra <amodra@bigpond.net.au>
5959
5960 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5961
067653c5
AM
59622002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5963
5964 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5965 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5966 Likewise.
5967 (struct elf_sh_pcrel_relocs_copied): Removed.
5968 (struct elf_sh_dyn_relocs): New.
5969 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5970 field with dyn_relocs.
5971 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5972 sections and sym_sec.
5973 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5974 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5975 (sh_elf_create_dynamic_sections): Use create_got_section instead
5976 of _bfd_elf_create_got_section.
5977 (sh_elf_check_relocs): Likewise.
5978 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5979 sections.
5980 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5981 sh_elf_relocate_section, sh_elf_check_relocs,
5982 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5983 Likewise.
5984 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5985 dynamic relocations and avoiding the copy relocation when we
5986 didn't find any dynamic relocations in the section which has
5987 contents or is read-only.
5988 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5989 (sh_elf_size_dynamic_sections): Don't reset the size of
5990 .rela.got section even if dynamic_sections_created flag is off.
5991 Don't use sh_elf_discard_copies. Scan all input bfd and use
5992 allocate_dynrelocs. Call readonly_dynrelocs to determine
5993 whether we need DT_TEXTREL.
5994 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5995 whether the symbol was never referred to.
5996 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5997 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5998 (sh_elf_check_relocs): Call create_got_section if the short-cut
5999 to .got is null. Increment reference counters only instead of
6000 allocating space on dynamic sections here. Don't conditionalize
6001 uninitialized got.offset value when marking the symbol as a
6002 global offset table entry. Keep relocations for symbols satisfied
6003 by a dynamic library to avoid copy relocations for the symbol.
6004 Set dynobj field of an elf hash table if needed.
6005 (sh_elf_finish_dynamic_sections): Handle null section pointer
6006 correctly.
6007 (elf_backend_copy_indirect_symbol): Defined.
6008 (elf_backend_can_refcount): Defined.
6009
7e326afc
NC
60102002-08-23 Nick Clifton <nickc@redhat.com>
6011
6012 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6013 previous change. Add comment explaining why.
6014
c8614e8e
AM
60152002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6016
6017 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6018 contents of .got.plt[2] to tr0, not address of .got.plt.
6019 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6020 patching absolute plt entry. For shmedia plt entry, set bottom bit
6021 of branch to plt0 as this is a branch to an shmedia instruction.
6022 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6023 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6024 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6025 branch to plt0.
6026 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6027 patching absolute plt entry. For shmedia plt entry, branch to
6028 plt0 is now ptrel, so use relative offset. Set bottom bit of
6029 branch target as it is a branch to an shmedia instruction.
6030
3b587c71
AM
60312002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6032 Richard Shann <richard.shann@superh.com>
6033
6034 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6035 value if .init is an SHmedia function. Similarly for DT_FINI.
6036 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 6037
957dcaa8
AM
60382002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6039
3b587c71 6040 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 6041 dynamic section.
3b587c71 6042 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 6043
a4263c47
NC
60442002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6045
6046 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 6047 byte read when reading the return address register column.
a4263c47 6048
db4ed121
NC
60492002-08-22 Nick Clifton <nickc@redhat.com>
6050
6051 * config.bfd: Add powepc64-*-*bsd* target.
6052
ed71e111
NC
60532002-08-22 Graeme Peterson <gp@qnx.com>
6054
6055 * Makefile.am: Add entries for elf32-shqnx.c
6056 * Makefile.in: Regenerate.
6057 * config.bfd: Add support sh-*-nto* target.
6058 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6059 * configure: Regenerate.
6060 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6061 * elf32-sh.c: Do not include elf32-target.h if
6062 ELF32_SH_C_INCLUDED is defined.
6063 * elf32-shqnx.c: New file: Support for QNX.
6064 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6065
0ab72ee2
NC
60662002-08-22 Nick Clifton <nickc@redhat.com>
6067
75c83283
NC
6068 * po/tr.po: Updated Turkish translation.
6069
0ab72ee2
NC
6070 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6071 symbols are not read.
6072
56780f18
AM
60732002-08-22 Alan Modra <amodra@bigpond.net.au>
6074
6075 * elf32-m68hc11.c: Formatting fixes.
6076 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6077 * elf32-m68hc12.c: Formatting fixes.
6078 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6079
b48fa14c
AM
60802002-08-22 Alan Modra <amodra@bigpond.net.au>
6081
a7c71b0c
AM
6082 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6083 SEC_DATA.
6084 (pmac_xcoff_vec): Likewise.
6085 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6086 (aix5coff64_vec): Likewise.
6087
56780f18
AM
60882002-08-22 Alan Modra <amodra@bigpond.net.au>
6089
b48fa14c
AM
6090 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6091 param to elf_backend_copy_indirect_symbol.
6092 (_bfd_elf_link_hash_copy_indirect): Likewise.
6093 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6094 calls to copy_indirect_symbol.
6095 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6096 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6097 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6098 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6099 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6100 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6101 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6102 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6103 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6104 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6105 test refcounts for "used" values.
6106
8c2ab17d
AM
61072002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6108
6109 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6110 argument declaration.
6111
d62b1198 61122002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
6113
6114 * archures.c (bfd_mach_ppc_e500): Added.
6115 * bfd-in2.h: Rebuilt.
d62b1198
EZ
6116 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6117
9f88ba09
AM
61182002-08-19 Alan Modra <amodra@bigpond.net.au>
6119
6120 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6121
df622259
AC
61222002-08-17 Andrew Cagney <ac131313@redhat.com>
6123
6124 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6125 `bfd_byte'.
df622259 6126
44c410de
SC
61272002-08-17 Stan Cox <scox@redhat.com>
6128
6129 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6130 IRIX 6 segment layout for NEWABI.
6131
4972a8e9
SC
61322002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6133
1049f94e 6134 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6135 symbols when looking for section referred to by a relocation.
1049f94e 6136 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6137
c5cd6d62
AM
61382002-08-15 Alan Modra <amodra@bigpond.net.au>
6139
6140 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6141
0741c7be
HPN
61422002-08-15 Hans-Peter Nilsson <hp@axis.com>
6143
6144 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6145 missing check for whether the symbol is referenced by DSO before
6146 unexporting it as an unneeded dynamic symbol.
6147
e8d5d179
L
61482002-08-14 H.J. Lu <hjl@gnu.org>
6149
6150 * libbfd.h: Regenerate.
6151
e9229007
L
61522002-08-14 H.J. Lu <hjl@gnu.org>
6153
6154 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6155
1fd03b5a
SC
61562002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6157
6158 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6159 instructions.
6160 (m68hc11_direct_relax): New to define table of relaxable instructions.
6161 (find_relaxable_insn): New, find a relaxable insn.
6162 (compare_reloc): New to compare two relocs.
6163 (m68hc11_elf_relax_section): New, relax text sections.
6164 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6165 (elf32_m68hc11_check_relocs): New function for GC support.
6166 (elf32_m68hc11_relocate_section): New function for GC support.
6167 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6168 (elf_backend_check_relocs): Likewise.
6169 (elf_backend_relocate_section): Likewise.
6170
c828c771
L
61712002-08-13 H.J. Lu <hjl@gnu.org>
6172
6173 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6174 definitions in shared objects when checking symbol with
6175 undefined version.
6176
9b701e44
SC
61772002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6178
6179 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6180 (elf32_m68hc11_gc_sweep_hook): Likewise.
6181 (elf_backend_gc_mark_hook): Define for GC section support.
6182 (elf_backend_gc_sweep_hook): Likewise.
6183 (elf_backend_can_gc_sections): Likewise.
6184
6185 * elf32-m68hc12.c: Likewise.
6186
96405e3c
SC
61872002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6188
6189 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6190 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6191 (_bfd_m68hc11_elf_set_private_flags): New function.
6192 Use them to set/check/print ELF flags specific to 68HC11.
6193
6194 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6195 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6196 (_bfd_m68hc12_elf_set_private_flags): New function.
6197 Use them to set/check/print ELF flags specific to 68HC12.
6198
dae78fb0
SC
61992002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6200
6201 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6202 fix masks for PC-rel relocs.
6203 (m68hc11_elf_ignore_reloc): New function.
6204
6205 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6206 68HC12 banked addressing relocs.
6207 (m68hc12_phys_addr): New to compute physical address of banked memory.
6208 (m68hc12_phys_page): Likewise for page.
6209 (m68hc12_addr_is_banked): New to see if address is in banked area.
6210 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6211
3dbfec86
SC
62122002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6213
6214 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6215 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6216 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6217 * bfd-in2.h: Regenerate.
6218
871da94f
L
62192002-08-12 H.J. Lu <hjl@gnu.org>
6220
6221 * elflink.h (elf_add_default_symbol): Preserve section across
6222 elf_merge_symbol.
6223
59bc061d
NC
62242002-08-09 Graeme Peterson <gp@qnx.com>
6225
51020317 6226 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6227 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6228 * Makefile.in: Regenerate.
6229 * config.bfd: Add support for powerpc{le}-*-nto targets.
6230 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6231 * configure: Regenerate.
6232 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6233 common file "elf32-qnx.h", and now include that file.
6234 * elf32-qnx.h: New file: QNX specific common elf backend.
6235 * elf32-ppc.c: Do not include elf32-target.h if
6236 ELF32_PPC_C_INCLUDED is defined.
6237 * elf32-ppcqnx.c: New file: Support for QNX.
6238 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6239 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6240
2b692c59
NC
62412002-08-09 Nick Clifton <nickc@redhat.com>
6242
6243 * po/sv.po: Updated Swedish translation.
6244
d0c7ff07
TS
62452002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6246
6247 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6248 g->global_gotsym is NULL.
6249
d8bbe778
L
62502002-08-08 H.J. Lu <hjl@gnu.org>
6251
c5cd6d62 6252 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6253 overrides an indirect versioned symbol.
6254
c366c25e
JJ
62552002-08-08 Jakub Jelinek <jakub@redhat.com>
6256
6257 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6258 for R_386_TLS_TPOFF32 relocs against symndx 0.
6259
31941635
L
62602002-08-07 H.J. Lu <hjl@gnu.org>
6261
6262 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6263 with undefined version if needed.
6264 (elf_link_assign_sym_version): Match a default symbol with a
6265 version without definition. No need to hide the default
6266 definition separately.
6267
0f3bd64f
AM
62682002-08-08 Alan Modra <amodra@bigpond.net.au>
6269
7330fb86
AM
6270 * elflink.h (elf_link_output_extsym): Don't output symbols from
6271 SEC_EXCLUDE sections.
6272
0f3bd64f
AM
6273 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6274
a4aa0fb7
AM
62752002-08-07 Alan Modra <amodra@bigpond.net.au>
6276
6277 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6278 entries.
6279
34ea4a36
TS
62802002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6281
6282 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6283 mismatch.
6284
141ff970
TS
62852002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6286
6287 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6288
28458e7e
TS
62892002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6290
6291 * elf32-mips.c (mips_reloc_map): Fix typo.
6292
0121a3da
AM
62932002-08-06 Alan Modra <amodra@bigpond.net.au>
6294
6295 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6296
d006db6c
AM
62972002-08-06 Alan Modra <amodra@bigpond.net.au>
6298
6299 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6300
8ea80f08
AM
63012002-08-06 Alan Modra <amodra@bigpond.net.au>
6302
2a52da53
AM
6303 * libxcoff.h: Use PARAMS on function declarations.
6304 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6305 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6306
8ea80f08
AM
6307 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6308 addend.
6309 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6310
cf9ab45b
AM
63112002-08-06 Alan Modra <amodra@bigpond.net.au>
6312
6313 * coff-rs6000.c: Formatting fixes.
6314 (xcoff_calculate_relocation): Use PARAMS in declaration.
6315 (xcoff_complain_overflow): Likewise.
6316 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6317 (bfd_xcoff_backend_data): Remove useless comments.
6318 (rs6000coff_vec): Likewise.
6319 (bfd_pmac_xcoff_backend_data): Likewise.
6320 (pmac_xcoff_vec): Likewise.
8ea80f08 6321
cf9ab45b
AM
6322 * coff64-rs6000.c: Formatting fixes.
6323 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6324 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6325 (bfd_xcoff_backend_data): Remove useless comments.
6326 (rs6000coff64_vec): Likewise.
6327 (bfd_xcoff_aix5_backend_data): Likewise.
6328 (aix5coff64_vec): Likewise.
6329
48bfecdd
AM
63302002-08-06 Alan Modra <amodra@bigpond.net.au>
6331
a78eab4e
AM
6332 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6333 mask entries. Use complain_overflow_dont for R_REF.
6334 (xcoff_reloc_type_ba): Revert last change.
6335 (xcoff_reloc_type_br): Likewise.
6336 (xcoff_reloc_type_crel): Likewise.
6337 (xcoff_ppc_relocate_section): Likewise.
6338 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6339 (xcoff64_ppc_relocate_section): Likewise.
6340 (xcoff64_howto_table): Revert some of last change to mask entries.
6341 Use complain_overflow_dont for R_REF.
6342
48bfecdd
AM
6343 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6344 relocs with bitsize == 16 have size = 1.
6345 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6346 (xcoff_reloc_type_br): Likewise.
6347 (xcoff_reloc_type_crel): Likewise.
6348 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6349 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6350 dst_mask adjustment.
6351 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6352 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6353 bitsize == 16 have size = 1.
6354
fd13ed0c
DC
63552002-08-01 Denis Chertykov <denisc@overta.ru>
6356
6357 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6358 (struct misc): New field isymbuf. All free_* fields removed.
6359 (symbol_value): Pass in internal syms. No need to swap syms in.
6360 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6361 possibly cached info.
6362 (tidyup_after_error): Removed.
6363 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6364 misc. Use new field.
6365 (adjust_all_relocations): Use internal syms. No need to swap syms
6366 in and out.
6367 (add_page_insn): Don't use removed fields of struct misc.
6368
24a1ba0f
NC
63692002-08-01 Nick Clifton <nickc@redhat.com>
6370
6371 * elf32-arm.h: Revert previous delta.
6372
a6903459
NC
63732002-08-01 Nick Clifton <nickc@redhat.com>
6374
6375 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6376 * configure: Regenerate.
6377
39a2a3eb
L
63782002-07-31 H.J. Lu <hjl@gnu.org>
6379
6380 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6381 selected.
6382
a0dfa6a8
L
63832002-07-31 H.J. Lu <hjl@gnu.org>
6384
6385 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6386 is selected.
6387
cd67d266
JJ
63882002-07-31 Jakub Jelinek <jakub@redhat.com>
6389
6390 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6391 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6392
4eb6b71c
NC
63932002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6394
6395 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6396 There is no 8 byte relocation type for this architecture.
6397 (do_ns32k_reloc): Use bfd_vma instead of native types.
6398 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6399 returns void.
6400 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6401 rely on generic code to do that.
6402 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6403 to all table entries.
6404 (_bfd_ns32k_relocate_contents): put_data returns void.
6405 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6406 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6407 return void.
6408
f7c33884
NC
64092002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6410
6411 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6412 archive object is target dependant.
6413
8f64befb
NC
64142002-07-31 Adam Nemet <anemet@lnxw.com>
6415
6416 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6417 (THUMB_PLT_ENTRY_SIZE): New macro.
6418 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6419 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6420 ARM_PLT_ENTRY_SIZE.
6421 (elf32_arm_plt_entry): Likewise.
6422 (elf_backend_plt_header_size): Likewise.
6423 (elf32_thumb_plt0_entry): New global.
6424 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6425 into .plt.thumb.
6426 (elf32_thumb_plt_entry): New global.
6427 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6428 Thumb entries. Set the bottom bit of the corresponding GOT entry
6429 for a Thumb PLT entry.
6430 (struct elf32_arm_plt_entry_info): New structure.
6431 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6432 type.
6433 (elf32_arm_link_hash_newfunc): Initialize new member.
6434 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6435 relocations against the PLT.
6436 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6437 first_rel_type if this is the first time we encounter the symbol.
6438 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6439 Determine if relocation needs a PLT entry. Set first_rel_type if
6440 this is the first time we encounter the symbol
6441 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6442 functions as well.
6443 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6444 (elf32_arm_create_dynamic_sections): New function. Create the
6445 .plt.thumb section.
6446 (elf_backend_create_dynamic_sections): Call it.
6447
47badb7b
NC
64482002-07-31 Nick Clifton <nickc@redhat.com>
6449
6450 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6451 'alternative' in order to avoid shadowing global symbol of the
6452 same name.
6453 * bfd-in2.h: Regenerate.
6454 * libbfd.h: Regenerate.
6455 * libcoff.h: Regenerate.
6456
8a397dad
TS
64572002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6458
6459 * Makefile.am: Add n32 ABI support.
6460 * Makefile.in: Regenerate.
6461 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6462 bit vectors for mips*-*-linux targets as optional.
6463 * configure.in: Add n32 ABI vectors.
6464 * configure: Regenerate.
6465 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6466 * elfn32-mips.c: New file, n32 ABI support.
6467 * targets.c: Add n32 ABI vectors.
6468
7e392df6 64692002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6470
7e392df6
NC
6471 * elfarmqnx-nabi.c: New file: Support for QNX.
6472 * config.bfd: Add support for arm-*-nto target.
6473 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6474 * configure: Regenerate.
6475 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6476 * Makefile.in: Regenerate.
6477 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6478 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6479 * elfarm-nabi.c: Do not include elf32-arm.h if
6480 ELFARM_NABI_C_INCLUDED is defined.
6481 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6482
7e392df6 64832002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6484
83e1617e
NC
6485 * po/sv.po: Updated Swedish translation.
6486
704afa60
JJ
64872002-07-30 Jakub Jelinek <jakub@redhat.com>
6488
6489 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6490
487e54f2
AM
64912002-07-30 Alan Modra <amodra@bigpond.net.au>
6492
6493 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6494 * archive.c (bfd_generic_archive_p): Likewise.
6495 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6496 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6497 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6498 (xcoff64_archive_p): Likewise.
6499 (xcoff64_openr_next_archived_file): Likewise.
6500 (xcoff64_archive_p): Clean up tdata properly on error.
6501 * coffgen.c (coff_real_object_p): Likewise.
6502 (coff_object_p): Release filehdr and opthdr.
6503 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6504 * ieee.c (ieee_archive_p): Likewise.
6505 * ihex.c (ihex_object_p): Likewise.
6506 (ihex_mkobject): Always allocate tdata.
6507 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6508 * srec.c (srec_mkobject): Always allocate tdata.
6509 (srec_object_p): Clean up tdata properly on error.
6510 (symbolsrec_object_p): Likewise.
6511 * versados.c (versados_object_p): Likewise.
6512 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6513 and bfd_realloc instead of realloc.
6514 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6515 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6516 place of bfd_malloc, simplifying error freeing. Free hash table too.
6517 (vms_object_p): Clean up tdata on error.
6518 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6519 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6520
9d46020e
AM
65212002-07-30 Alan Modra <amodra@bigpond.net.au>
6522
6523 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6524
fb39dac1
RS
65252002-07-26 Chris Demetriou <cgd@broadcom.com>
6526
6527 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6528 flags into resulting BFD.
6529
7a624474
AM
65302002-07-26 Alan Modra <amodra@bigpond.net.au>
6531
6532 From John Reiser <jreiser@BitWagon.com>
6533 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6534 tls_ldm_got.refcount.
6535
a4382ec6
TS
65362002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6537
6538 * elf64-mips.c: Update TODO comment.
6539 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6540 mips_elf64_gprel16_reloca): Remove prototypes.
6541 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6542 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6543 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6544 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6545 R_MIPS_HIGHEST.
6546 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6547 R_MIPS_GOT16. Remove wrong comments.
6548 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6549 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6550 from elf32-mips.c.
6551 (mips_elf64_hi16_reloc): Fix formatting.
6552 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6553 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6554 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6555 (mips_elf64_gprel16_reloc): Make static. Add check for
6556 partial_inplace.
6557 (mips_elf64_gprel16_reloca): Remove.
6558 (mips_elf64_literal_reloc): New function.
6559 (mips_elf64_gprel32_reloc): Fix formatting.
6560 (mips_elf64_shift6_reloc): Fix comment. Make static.
6561 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6562 elf32-mips.c.
6563 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6564 elf32-mips.c
6565 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6566 specific relocations.
6567 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6568 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6569 (ELF_MAXPAGESIZE): Add comment.
6570
219576a4
NC
65712002-07-25 Nick Clifton <nickc@redhat.com>
6572
6573 * po/sv.po: Updated Swedish translation.
6574 * po/es.po: Updated Spanish translation.
6575 * po/fr.po: Updated French translation.
6576
8c58d23b
AM
65772002-07-25 Alan Modra <amodra@bigpond.net.au>
6578
6579 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6580 as elf_link_record_local_dynamic_symbol.
6581 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6582 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6583 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6584 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6585 attempt is made to record a symbol in a discarded section, and
6586 return `2' in that case.
6587
ff3063f5
NC
65882002-07-24 Nick Clifton <nickc@redhat.com>
6589
6590 * po/sv.po: Updated Swedish translation.
6591 * po/es.po: Updated Spanish translation.
6592
f0fe0e16
AM
65932002-07-23 Alan Modra <amodra@bigpond.net.au>
6594
c1fb5f8a
AM
6595 * po/SRC-POTFILES.in: Regenerate.
6596
f0fe0e16
AM
6597 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6598 immediately. Remove code handling relocatable linking.
6599 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6600 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6601 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6602 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6603 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6604 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6605 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6606 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6607 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6608 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6609 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6610 * elf32-avr.c (elf_backend_rela_normal): Define.
6611 * elf32-cris.c: Likewise.
6612 * elf32-fr30.c: Likewise.
de2d743e 6613 * elf32-frv.c: Likewise.
f0fe0e16
AM
6614 * elf32-h8300.c: Likewise.
6615 * elf32-hppa.c: Likewise.
6616 * elf32-ip2k.c: Likewise.
6617 * elf32-sparc.c: Likewise.
6618 * elf32-v850.c: Likewise.
6619 * elf32-vax.c: Likewise.
6620 * elf64-hppa.c: Likewise.
6621 * elf64-sparc.c: Likewise.
6622 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6623 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6624 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6625 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6626 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6627 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6628 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6629 * elf-m10200.c (USE_RELA): Don't define.
6630 * elf-m10300.c: Likewise.
de2d743e 6631 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6632 * elf32-i370.c: Likewise.
6633 * elf32-ip2k.c: Likewise.
6634 * elf32-m68k.c: Likewise.
6635 * elf32-mcore.c: Likewise.
6636 * elf32-ppc.c: Likewise.
6637 * elf32-s390.c: Likewise.
6638 * elf32-vax.c: Likewise.
6639 * elf64-ppc.c: Likewise.
6640 * elf64-s390.c: Likewise.
6641 * elf64-x86-64.c: Likewise.
6642 * elfxx-ia64.c: Likewise.
6643 * elf32-avr.c (USE_REL): Don't undef.
6644 * elf32-ip2k.c: Likewise.
6645
5e8d7549
NC
66462002-07-23 Nick Clifton <nickc@redhat.com>
6647
6648 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6649 'want_p_paddr_set_to_zero'.
6650 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6651 to false;
6652 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6653 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6654
9e12c7db
NC
66552002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6656
6657 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6658 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6659 show the Copyright string.
6660 Minor formatting tidy ups.
6661
0461a601
NC
66622002-07-23 Nick Clifton <nickc@redhat.com>
6663
ff3063f5
NC
6664 * po/fr.po: Updated French translation.
6665 * po/sv.po: Updated Swedish translation.
0461a601 6666
fad2542d
AM
66672002-07-23 Alan Modra <amodra@bigpond.net.au>
6668
6669 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6670 when outputting relocs.
6671
c0647bfc
JT
66722002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6673
6674 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6675 DT_PLTGOT into the dynamic section if there is a PLT.
6676
d01414a5
TS
66772002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6678
6679 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6680 elf32-mips.c.
6681 (_bfd_mips_elf_write_section): Likewise.
6682 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6683 (_bfd_mips_elf_write_section): Likewise.
6684 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6685 (elf32_mips_write_section): Likewise.
6686 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6687 (_bfd_mips_elf_write_section): Likewise.
6688
40c97fc6
AM
66892002-07-19 Alan Modra <amodra@bigpond.net.au>
6690
6691 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6692 PT_IA_64_UNWIND segments for a given section.
6693
58378160
L
66942002-07-17 H.J. Lu <hjl@gnu.org>
6695
6696 * Makefile.am: Fix a typo.
6697 * Makefile.in: Regenerate.
6698
cf88bb9f
NC
66992002-07-15 Denis Chertykov <denisc@overta.ru>
6700 Frank Ch. Eigler <fche@redhat.com>
6701 Ben Elliston <bje@redhat.com>
6702 Alan Lehotsky <alehotsky@cygnus.com>
6703 John Healy <jhealy@redhat.com>
6704 Graham Stott <grahams@redhat.com>
6705 Jeff Johnston <jjohnstn@redhat.com>
6706
6707 * Makefile.am: Add support for ip2k.
6708 * Makefile.in: Regenerate.
6709 * doc/Makefile.in: Regenerate.
6710 * archures.c: Add support for ip2k.
6711 * config.bfd: Add support for ip2k.
6712 * configure.in: Add support for ip2k.
6713 * configure: Regenerate.
6714 * reloc.c: Add support for ip2k.
6715 * targets.c: Add support for ip2k.
6716 * bfd-in2.h: Regenerate.
6717 * libbfd.h: Regenerate.
6718 * cpu-ip2k.c: New file.
6719 * elf32-ip2k.c: New file.
6720
0dafd5f6
RE
67212002-07-17 Ian Rickards <irickard@arm.com>
6722
40c97fc6 6723 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6724 just return the filename.
6725
36b08f12
AM
67262002-07-16 Moritz Jodeit <moritz@jodeit.org>
6727
6728 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6729
58821868
AM
67302002-07-16 Alan Modra <amodra@bigpond.net.au>
6731
6732 * elflink.h: Formatting fixes, tidy prototypes.
6733 (elf_link_assign_sym_version): Move common code out of loop.
6734
c89583f8
AM
67352002-07-16 Alan Modra <amodra@bigpond.net.au>
6736
6737 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6738 reloc section size is zero. Correct reloc output location.
6739
ba94744e
AM
67402002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6741
6742 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6743 the final type for the e_fsel selector when generating PA2.0W code.
6744 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6745 relocations.
6746
96a94295
L
67472002-07-14 H.J. Lu <hjl@gnu.org>
6748
6749 * elflink.h (elf_link_assign_sym_version): Hide the default
6750 definition if there is a hidden versioned definition.
6751
6849c52f
HPN
67522002-07-12 Hans-Peter Nilsson <hp@axis.com>
6753
6754 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6755 dynamic reference test in assertion when initializing GOT with
6756 static contents. Just assert that there are either no dynamic
6757 sections, the symbol is defined in the regular objects or that the
6758 symbol is undef weak. Tweak comment.
6759 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6760 only if the symbol isn't defined in the program and isn't undef
6761 weak.
6762 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6763 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6764 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6765 (elf_cris_discard_excess_program_dynamics): Don't consider
6766 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6767
239e1f3a
AM
67682002-07-11 Alan Modra <amodra@bigpond.net.au>
6769
6770 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6771 unresolved debugging relocs in dynamic applications.
6772 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6773 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6774 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6775 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6776 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6777 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6778
2f6d9989
AM
67792002-07-10 Alan Modra <amodra@bigpond.net.au>
6780
f5e87a1d
AM
6781 * elf64-ppc.c (ONES): Define.
6782 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6783 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6784 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6785
2f6d9989
AM
6786 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6787 (ppc64_elf_set_private_flags): Delete.
6788 (ppc64_elf_section_from_shdr): Delete.
6789 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6790 (ppc64_elf_fake_sections): Delete.
6791 (bfd_elf64_bfd_set_private_flags): Don't define.
6792 (bfd_elf64_get_symbol_info): Likewise.
6793 (elf_backend_section_from_shdr): Likewise.
6794 (elf_backend_fake_sections): Likewise.
6795
0594c12d
AM
67962002-07-10 Marco Walther <Marco.Walther@sun.com>
6797
6798 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6799 when not already set.
6800 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6801 (elf_backend_fake_sections): Define.
6802
699cb9b8
AM
68032002-07-10 Alan Modra <amodra@bigpond.net.au>
6804
6805 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6806 Formatting.
6807 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6808
0a4787a0
HPN
68092002-07-09 Hans-Peter Nilsson <hp@axis.com>
6810
6811 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6812 NULL sym_hashes to just before use.
6813 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6814 symbol with non-default visibility.
6815 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6816 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6817 Ditto.
6818 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6819 symbol with non-default visibility.
6820 (cris_elf_check_relocs): At tests for local symbol before
6821 increasing h->plt.refcount, also check for non-default
6822 visibility. Ditto when checking for local symbol to eliminate
6823 pc-relative runtime relocs.
6824
aecc8f8a
AM
68252002-07-08 Alan Modra <amodra@bigpond.net.au>
6826
6827 * elf.c: Formatting.
6828 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6829 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6830 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6831 segments.
6832
e9168c1e
MM
68332002-07-07 Mark Mitchell <mark@codesourcery.com>
6834 Alan Modra <amodra@bigpond.net.au>
6835
6836 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6837 account the impact of relocation count overflow when computing
6838 section offsets.
6839 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6840 or not to apply the PE COFF reloc overflow handling. Fix a
6841 fencepost error in deciding whether or not to use that technique.
6842
6cdc0ccc
AM
68432002-07-07 Alan Modra <amodra@bigpond.net.au>
6844
6845 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6846 change type of locsyms.
6847 (bfd_elf_get_elf_syms): Declare.
6848 * elf.c (bfd_elf_get_elf_syms): New function.
6849 (group_signature): Use bfd_elf_get_elf_syms.
6850 (bfd_section_from_r_symndx): Likewise.
6851 * elfcode.h (elf_slurp_symbol_table): Likewise.
6852 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6853 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6854 locality of various data structures. Properly free internal relocs.
6855 (elf_bfd_final_link): Properly free internal relocs.
6856 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6857 (elf_link_input_bfd): Likewise.
6858 (elf_gc_mark): Likewise. Properly free internal relocs.
6859 (elf_gc_sweep): Properly free internal relocs.
6860 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6861 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6862 internal relocs.
6863 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6864 Properly free possibly cached info.
6865 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6866 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6867 symbol swapping code.
6868 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6869 Properly free possibly cached info.
6870 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6871 (mn10300_elf_relax_delete_bytes): Likewise.
6872 (mn10300_elf_symbol_address_p): Likewise.
6873 (mn10300_elf_get_relocated_section_contents): Likewise.
6874 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6875 (elf32_h8_relax_delete_bytes): Likewise.
6876 (elf32_h8_symbol_address_p): Likewise.
6877 (elf32_h8_get_relocated_section_contents): Likewise.
6878 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6879 (m32r_elf_relax_delete_bytes): Likewise.
6880 (m32r_elf_get_relocated_section_contents): Likewise.
6881 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6882 elf_section_data to determine whether cached.
6883 (sh_elf_relax_section): As above for elf-m10200.c.
6884 (sh_elf_relax_delete_bytes): Likewise.
6885 (sh_elf_get_relocated_section_contents): Likewise.
6886 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6887 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6888 reading of local syms.
6889 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6890 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6891 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6892 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6893 relocs.
6894 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6895 free internal relocs and section contents. Don't read symbols.
6896 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6897 (elf32_hppa_size_stubs): Don't free local syms.
6898 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6899 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6900 possibly cached info.
6901 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6902 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6903 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6904 all_local_syms.
6905 (get_local_syms): Delete function.
6906 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6907 on exit.
6908 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6909
b3212001
JW
69102002-07-05 Jim Wilson <wilson@redhat.com>
6911
6912 * syms.c (decode_section_type): New.
6913 (bfd_decode_symclass): Call decode_section_type.
6914
894bb1ee
JJ
69152002-07-04 Jakub Jelinek <jakub@redhat.com>
6916
6917 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6918 section content start.
6919 Reported by Michael Schumacher <mike@hightec-rt.com>.
6920
bc0ba537
AM
69212002-07-04 Alan Modra <amodra@bigpond.net.au>
6922
9b5ecbd0 6923 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
6924 link order code. Don't actually remove the output section here;
6925 Just set a flag for the linker to do so.
6926 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6927 sections when setting up output section dynsyms.
6928
797fc050
AM
69292002-07-04 Alan Modra <amodra@bigpond.net.au>
6930
6931 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6932 fudge.
6933 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6934 libs here instead.
6935
99881371
MS
69362002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6937
6938 * elf64-s390.c (create_got_section): Set .got section alignment to
6939 8 bytes.
6940 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6941
47d9a591
AM
69422002-07-02 Alan Modra <amodra@bigpond.net.au>
6943
6944 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6945
179d3252
JT
69462002-07-01 Matt Thomas <matt@3am-software.com>
6947
6948 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6949 to EF_VAX_*.
6950
4a14403c
TS
69512002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6952
6953 * elfxx-mips.c (ABI_64_P): Fix comment.
6954 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6955 new section names for N64 ABI.
6956 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6957 (mips_elf_calculate_relocation): Code formatting.
6958 (mips_elf_create_dynamic_relocation): Likewise.
6959 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6960 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6961 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6962 in any NewABI.
6963 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6964 for NewABI.
6965 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6966 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6967 here, too.
6968
607c0e09
AS
69692002-07-01 Andreas Schwab <schwab@suse.de>
6970
6971 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6972 R_X86_64_64 to R_X86_64_RELATIVE.
6973
ba26fd96
AM
69742002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6975
6976 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6977 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6978 Run "make dep-am".
6979 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6980 host_aout_vec.
6981 * configure.in (vaxbsd_vec): Add.
6982 * targets.c (vaxbsd_vec): Add.
6983 * Makefile.in: Rebuild.
6984 * configure: Rebuild.
6985 * po/SRC-POTFILES.in: Rebuild.
6986
1e2f5b6e
AM
69872002-07-01 Alan Modra <amodra@bigpond.net.au>
6988
6989 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6990 examining to gc_mark_hook, rather than the bfd.
6991 (elf_gc_sections): Adjust.
6992 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6993 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6994 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6995 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6996 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6997 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6998 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6999 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7000 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7001 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7002 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7003 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7004 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7005 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7006 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7007 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7008 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7009 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7010 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7011 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7012 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7013 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7014 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7015 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7016 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7017 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7018 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7019 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7020 redundant local sym tests.
7021 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7022 (link_hash_newfunc): Init is_entry.
7023 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7024 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7025 (create_linkage_sections): Use bfd_make_section_anyway rather than
7026 bfd_make_section.
7027 (ppc64_elf_mark_entry_syms): New function.
7028 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7029 up opd entry to function section map.
7030 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7031 relocs that reference the opd section.
7032 (edit_opd): New function.
7033 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7034 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7035 (get_local_syms): Do so here. Exit if we already have local syms.
7036 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7037 read local syms on non-ELF input.
7038 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7039 than duplicating it's function here. Adjust free of internal
7040 relocs to suit.
7041 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7042 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7043 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7044 _bfd_elf32_link_read_relocs rather than duplicating it's function
7045 here. Adjust free of internal relocs to suit.
7046
1b71fb54
AJ
70472002-07-01 Andreas Jaeger <aj@suse.de>
7048
7049 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7050 are not allowed in shared libs code, enforce -fPIC.
7051
8d28f606
HPN
70522002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7053
7054 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7055 trailing zero-sequences when there's previous left-over data.
7056
5ac81c74
JL
70572002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7058
7059 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7060 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7061 and opd_rel_sec in order for starting rela section. Check _raw_size.
7062 (elf_backend_reloc_type_class): Define.
7063
91a4d569
AM
70642002-06-27 Kevin Buettner <kevinb@redhat.com>
7065
7066 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7067 DWARF2 formats.
7068
feee612b
AM
70692002-06-27 Alan Modra <amodra@bigpond.net.au>
7070
7071 * cpu-powerpc.c: Comment on ordering of arch_info.
7072 * elf32-ppc.c (ppc_elf_object_p): New function.
7073 (elf_backend_object_p): Define.
7074 * elf64-ppc.c (ppc64_elf_object_p): New function.
7075 (elf_backend_object_p): Define.
7076
a4e6cefc
JT
70772002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7078
7079 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7080 * configure: Regenerate.
7081
dae2dd0d
NC
70822002-06-25 Jason Eckhardt <jle@rice.edu>
7083
7084 * dwarf2.c (decode_line_info): Check unit->addr_size
7085 to read in the proper number of prologue bytes.
7086
680f9d5c
NC
70872002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7088
7089 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7090 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
7091 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7092 been enabled.
dae2dd0d 7093
680f9d5c
NC
7094 * targets.c (_bfd_target_vector[]): Only include
7095 aix5coff64_vec if 64-bit bfd support has been enabled.
7096
d4c88bbb
AM
70972002-06-25 Alan Modra <amodra@bigpond.net.au>
7098
7099 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7100 * elf32-hppa.c (hppa_add_stub): Likewise.
7101 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7102 * elflink.h (elf_add_default_symbol): Fix comment typo.
7103 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7104 (elf_link_add_object_symbols): Likewise.
7105 (elf_link_assign_sym_version): Likewise.
7106 * hash.c (bfd_hash_lookup): Likewise.
7107 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7108 * section.c (bfd_get_unique_section_name): Likewise.
7109 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7110 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7111 (assign_section_numbers): Likewise.
7112 (_bfd_elfcore_make_pseudosection): Likewise.
7113 (elfcore_grok_lwpstatus): Likewise.
7114 (elfcore_grok_win32pstatus): Likewise.
7115 (elfcore_write_note): Constify input params. Use PTR instead of
7116 void *. Include terminating NUL in namesz. Correct padding.
7117 Support NULL "name" param. Use memcpy instead of strcpy.
7118 (elfcore_write_prpsinfo): Constify input params.
7119 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7120 (elfcore_write_lwpstatus): Likewise.
7121 (elfcore_write_pstatus): Likewise.
7122 (elfcore_write_prfpreg): Likewise.
7123 (elfcore_write_prxfpreg): Likewise.
7124 * elf-bfd.h (elfcore_write_note): Update declaration.
7125 (elfcore_write_prpsinfo): Likewise.
7126 (elfcore_write_prstatus): Likewise.
7127 (elfcore_write_pstatus): Likewise.
7128 (elfcore_write_prfpreg): Likewise.
7129 (elfcore_write_prxfpreg): Likewise.
7130 (elfcore_write_lwpstatus): Likewise.
7131
b0ac09d2
NC
71322002-06-25 Jason Eckhardt <jle@rice.edu>
7133
7134 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7135 symbols of type stProc and stStaticProc.
7136
71372002-06-25 Nick Clifton <nickc@redhat.com>
7138
7139 * ecoff.c: VArious formatting fixes.
7140
021d6096
AM
71412002-06-25 Alan Modra <amodra@bigpond.net.au>
7142
7143 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7144
82e51918
AM
71452002-06-25 Alan Modra <amodra@bigpond.net.au>
7146
7147 * aout-adobe.c: Don't compare against "true" or "false.
7148 * aout-target.h: Likewise.
7149 * aoutx.h: Likewise.
7150 * archive.c: Likewise.
7151 * bout.c: Likewise.
7152 * cache.c: Likewise.
7153 * coff-a29k.c: Likewise.
7154 * coff-alpha.c: Likewise.
7155 * coff-i386.c: Likewise.
7156 * coff-mips.c: Likewise.
7157 * coff-or32.c: Likewise.
7158 * coff64-rs6000.c: Likewise.
7159 * coffcode.h: Likewise.
7160 * coffgen.c: Likewise.
7161 * cpu-ns32k.c: Likewise.
7162 * ecoff.c: Likewise.
7163 * ecofflink.c: Likewise.
7164 * elf.c: Likewise.
7165 * elf32-arm.h: Likewise.
7166 * elf32-cris.c: Likewise.
7167 * elf32-d30v.c: Likewise.
7168 * elf32-i386.c: Likewise.
7169 * elf32-mcore.c: Likewise.
7170 * elf32-ppc.c: Likewise.
7171 * elf32-sh.c: Likewise.
7172 * elf32-sh64.c: Likewise.
7173 * elf32-v850.c: Likewise.
7174 * elf64-alpha.c: Likewise.
7175 * elf64-sh64.c: Likewise.
7176 * elfcode.h: Likewise.
7177 * elfcore.h: Likewise.
7178 * elflink.h: Likewise.
7179 * elfxx-mips.c: Likewise.
7180 * i386os9k.c: Likewise.
7181 * ieee.c: Likewise.
7182 * libbfd.c: Likewise.
7183 * linker.c: Likewise.
7184 * mmo.c: Likewise.
7185 * nlm32-alpha.c: Likewise.
7186 * nlm32-i386.c: Likewise.
7187 * nlm32-ppc.c: Likewise.
7188 * nlm32-sparc.c: Likewise.
7189 * nlmcode.h: Likewise.
7190 * oasys.c: Likewise.
7191 * pdp11.c: Likewise.
7192 * peicode.h: Likewise.
7193 * reloc.c: Likewise.
7194 * som.c: Likewise.
7195 * srec.c: Likewise.
7196 * tekhex.c: Likewise.
7197 * vms.c: Likewise.
7198 * xcofflink.c: Likewise.
7199 * elf64-sparc.c: Edit comment to not use "== false".
7200
7201 * aoutf1.h: Don't use "? true : false".
7202 * ecoff.c: Likewise.
7203 * format.c: Likewise.
7204 * ieee.c: Likewise.
7205 * linker.c: Likewise.
7206 * mmo.c: Likewise.
7207 * oasys.c: Likewise.
7208
48fc70a2
AM
72092002-06-23 H.J. Lu <hjl@gnu.org>
7210
7211 * elflink.h (elf_link_add_archive_symbols): For the default
7212 version, check references with only one `@' first.
7213
47b7c2db
AM
72142002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7215
7216 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7217 function.
9b5ecbd0 7218 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7219 symbol table.
7220 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7221 (elf64_hppa_size_dynamic_sections): Revise to use
7222 elf64_hppa_mark_milli_and_exported_functions.
7223 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7224 symbols out of dynamic symbol table.
7225
f5d44ba0
AM
72262002-06-23 Alan Modra <amodra@bigpond.net.au>
7227
bb3fff1e
AM
7228 * Makefile.in: Regenerate.
7229 * libbfd.h: Regenerate.
7230 * bfd-in2.h: Regenerate.
7231 * configure: Regenerate.
7232 * po/SRC-POTFILES.in: Regenerate.
7233
f5d44ba0
AM
7234 * elflink.h: Comment typo fixes.
7235
72362002-06-23 H.J. Lu <hjl@gnu.org>
7237
7238 * elf-bfd.h (elf_link_loaded_list): New structure.
7239 (elf_link_hash_table): Add "loaded".
7240 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7241 * elflink.h (elf_link_check_versioned_symbol): New function.
7242 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7243
cc36acdf
NC
72442002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7245
7246 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7247 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7248 nothing needed to be done, rather than false, indicating that the
7249 section's size could not be computed.
7250
4e5ba5b7
DB
72512002-06-18 Dave Brolley <brolley@redhat.com>
7252
7253 From Catherine Moore, Michael Meissner, Dave Brolley:
7254 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7255 * targets.c: Support bfd_elf32_frv_vec.
7256 * reloc.c: Add FRV relocs.
7257 * configure.in: Add support for bfd-elf32-frv-vec.
7258 * config.bfd (targ_cpu): Add support for frv-*-elf.
7259 * archures.c: Add frv arch and machines.
7260 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7261 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7262 (BFD32_BACKENDS): Add elf32-frv.lo.
7263 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7264 (cpu-frv.lo): New target.
7265 (elf32-frv.lo): New target.
7266 * cpu-frv.c: New file.
7267 * elf32-frv.c: New file.
7268
7ece0d85
JJ
72692002-06-18 Jakub Jelinek <jakub@redhat.com>
7270
7271 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7272 e_shnum == 0.
7273 Only read the first section header if e_shoff is non-zero.
7274 Don't consider e_shstrndx if there are no sections.
7275
57fb03ac
TR
72762002-06-17 Tom Rix <trix@redhat.com>
7277
7278 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7279 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7280 complain_overflow_bitfield.
7281
341ca622
AM
72822002-06-17 Alan Modra <amodra@bigpond.net.au>
7283
767e34d1
AM
7284 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7285 (bfd_fdopenr): Likewise.
7286 (bfd_openstreamr): Likewise.
7287 (bfd_openw): Likewise.
7288
341ca622
AM
7289 * targets.c: Sort target vecs.
7290 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7291 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7292 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7293 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7294 * configure.in: Sort target vecs. Add m88kmach3_vec.
7295 * configure: Regenerate.
7296
dfbbae4c
HPN
72972002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7298
7299 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7300 bpo_reloc_no to break sort order ties, not address of items.
7301
d663e1cd
JL
73022002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7303
7304 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7305 Skip excluded sections in determing __gp value.
7306 (elf_hppa_final_link_relocate): Use the symbol's address in
7307 R_PARISC_FPTR64 relocations that don't need an opd entry.
7308 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7309 (elf64_hppa_finalize_dynreloc): Likewise.
7310 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7311 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7312
a8295218
NC
73132002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7314
7315 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7316 alignment for .bss, .data and .text sections so that sse and sse2
7317 code will work.
7318 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7319
73202002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7321
7322 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7323 sh[1234]*-elf*.
7324
3db4b612
JL
73252002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7326
2cb69dd3
JL
7327 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7328 dynamic sections.
7329
3db4b612
JL
7330 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7331 for a symbol that has no output section.
7332 (allocate_dynrel_entries): Correct comment.
7333 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7334 unless we want one.
7335 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7336 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7337 with no section. Remove unnecessary parentheses.
7338
f3813499
TR
73392002-06-11 Tom Rix <trix@redhat.com>
7340
7341 * coffcode.h (coff_compute_section_file_positions): Add data
7342 section to AIX loader alignment check.
7343
f5d44ba0 7344 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7345 alignment to 4 bytes.
7346 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7347 power accessor macro.
7348 (do_shared_object_padding): Remove invalid assertion.
7349
0ebaf185
RS
73502002-06-10 Richard Sandiford <rsandifo@redhat.com>
7351
7352 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7353 for removed output sections.
7354
ebe3e2d1
NC
73552002-06-10 Geoffrey Keating <geoffk@redhat.com>
7356
7357 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7358 htab_alloc.
7359 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7360
0b14c2aa
L
73612002-06-08 H.J. Lu <hjl@gnu.org>
7362
7363 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7364 work around a long long bug in gcc 2.96 on mips.
7365
3c2bfad6
JT
73662002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7367
7368 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7369 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7370 Regenerate dependency lists.
7371 * Makefile.in: Regenerate.
7372 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7373 vax1knetbsd_vec to targ_selvecs.
7374 * configure.in: Add vax1knetbsd_vec.
7375 * configure: Regenerate.
7376 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7377 * vax1knetbsd.c: New file.
7378 * vaxnetbsd.c: Update copyright years.
7379 (TARGET_PAGE_SIZE): Set to 0x1000.
7380 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7381
91149be3
JT
73822002-06-08 Matt Thomas <matt@3am-software.com>
7383
7384 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7385
21e15248
AM
73862002-06-08 Alan Modra <amodra@bigpond.net.au>
7387
7388 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7389
986b7daa
AM
73902002-06-08 Alan Modra <amodra@bigpond.net.au>
7391
e90b95f6
AM
7392 * Makefile.am: Run "make dep-am".
7393 * Makefile.in: Regenerate.
7394
3f9c735e
AM
7395 * armnetbsd.c: Replace CONST with const.
7396 * corefile.c: Likewise.
7397 * elf32-dlx.c: Likewise.
7398 * elf64-mips.c: Likewise.
7399 * mmo.c: Likewise.
7400 * ns32knetbsd.c: Likewise.
7401
986b7daa
AM
7402 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7403 table is elf64-sparc.
7404
5a659663
TS
74052002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7406
7407 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7408 Fix RELA addends to get not shifted in the result. Don't do special
7409 handling of R_MIPS_64 for NewABI.
7410
9bab7074
AM
74112002-06-07 Alan Modra <amodra@bigpond.net.au>
7412
7413 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7414 (NAME(aout,slurp_reloc_table)): Likewise.
7415 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7416 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7417 (xcoff_write_archive_contents_big): Likewise.
7418 (xcoff_generate_rtinit): Likewise.
7419 (xcoff_generate_rtinit): Likewise, and check error return.
7420 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7421 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7422 (coff_get_normalized_symtab): Likewise.
7423 (coff_make_empty_symbol): Likewise.
7424 (bfd_coff_set_symbol_class): Likewise.
7425 * cofflink.c (coff_link_add_symbols): Likewise.
7426 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7427 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7428 (bfd_ecoff_write_accumulated_debug): Likewise.
7429 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7430 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7431 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7432 * ieee.c (do_with_relocs): Use bfd_zalloc.
7433 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7434 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7435 (NAME(aout,slurp_reloc_table)): Likewise.
7436 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7437 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7438 * som.c (som_build_and_write_symbol_table): Likewise.
7439 (som_slurp_string_table): Likewise.
7440 (som_slurp_symbol_table): Likewise.
7441 (som_bfd_ar_write_symbol_stuff): Likewise.
7442 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7443 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7444 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7445 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7446 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7447
1126897b
AM
74482002-06-07 Alan Modra <amodra@bigpond.net.au>
7449
7450 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7451 "group" union.
7452 (elf_group_name): Update.
7453 (elf_group_id): Define.
7454 (bfd_elf_set_group_contents): Declare.
7455 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7456 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7457 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7458 that sym for the signature.
7459 (_bfd_elf_compute_section_file_positions): Don't call
7460 set_group_contents for "ld -r" case.
7461 (swap_out_syms): Use bfd_zalloc.
7462 * elflink.h (elf_link_add_archive_symbols): Likewise.
7463 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7464 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7465
3fad3c7c
AM
74662002-06-07 Alan Modra <amodra@bigpond.net.au>
7467
7468 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7469 relocs in opd for non-shared too.
7470
10f469bf 74712002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7472
7473 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7474 relocations.
7475
7217313c
NC
74762002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7477
7478 * merge.c: Include libiberty.h.
7479 * elf-strtab.c: Include libiberty.h.
7480
6cb22815
AM
74812002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7482
7483 * peXXigen.c (pe_print_idata): Remove unused variable.
7484
1ed89aa9
NC
74852002-06-06 David Heine <dlheine@tensilica.com>
7486
7487 * elf.c (assign_file_positions_for_segments): Remove unallocated
7488 sections from the section to segment mapping for PT_LOAD segments.
7489 Update comment about empty loadable segments.
7490
644c4c80
RS
74912002-06-06 Richard Sandiford <rsandifo@redhat.com>
7492
7493 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7494 is within the .stabstr section.
7495
f8ecb12b
AM
74962002-06-06 Alan Modra <amodra@bigpond.net.au>
7497
7498 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7499 are "const PTR", not "const PTR *".
7500 (bfd_elf32_swap_symbol_in): Likewise.
7501 (bfd_elf64_swap_symbol_in): Likewise.
7502 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7503 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7504 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7505 (elf_link_add_object_symbols): Likewise.
7506 (elf_link_record_local_dynamic_symbol): Likewise.
7507 (elf_link_input_bfd): Likewise.
7508 (elf_gc_mark): Likewise.
7509 (elf_reloc_symbol_deleted_p): Likewise.
7510 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7511 (mn10200_elf_relax_delete_bytes): Likewise.
7512 (mn10200_elf_symbol_address_p): Likewise.
7513 (mn10200_elf_get_relocated_section_contents): Likewise.
7514 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7515 (mn10300_elf_relax_section): Likewise.
7516 (mn10300_elf_relax_delete_bytes): Likewise.
7517 (mn10300_elf_symbol_address_p): Likewise.
7518 (mn10300_elf_get_relocated_section_contents): Likewise.
7519 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7520 (elf32_h8_relax_delete_bytes): Likewise.
7521 (elf32_h8_symbol_address_p): Likewise.
7522 (elf32_h8_get_relocated_section_contents): Likewise.
7523 * elf32-hppa.c (get_local_syms): Likewise.
7524 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7525 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7526 * elf32-sh.c (sh_elf_relax_section): Likewise.
7527 (sh_elf_relax_delete_bytes): Likewise.
7528 (sh_elf_get_relocated_section_contents): Likewise.
7529 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7530 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7531 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7532 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7533 * elf64-ppc.c (get_local_syms): Likewise.
7534 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7535 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7536
1ed89aa9 75372002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7538
7539 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7540
73ff0d56
AM
75412002-06-05 Alan Modra <amodra@bigpond.net.au>
7542
9dce4196
AM
7543 * elf.c (group_signature): Swap in the whole symbol, and handle
7544 extracting section symbol names.
7545 (setup_group): Add comment.
7546 (set_group_contents): When called from objcopy or ld, arrange for
7547 section contents to be written. Write group member output section
7548 indices to allow objcopy to reorganize sections.
7549 (_bfd_elf_copy_private_section_data): Copy group info.
7550
73ff0d56
AM
7551 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7552 (bfd_elf32_swap_symbol_in): Update prototype.
7553 (bfd_elf64_swap_symbol_in): Likewise.
7554 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7555 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7556 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7557 (elf_link_add_object_symbols): Likewise.
7558 (elf_link_record_local_dynamic_symbol): Likewise.
7559 (elf_link_input_bfd): Likewise.
7560 (elf_gc_mark): Likewise.
7561 (elf_reloc_symbol_deleted_p): Likewise.
7562 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7563 (mn10200_elf_relax_delete_bytes): Likewise.
7564 (mn10200_elf_symbol_address_p): Likewise.
7565 (mn10200_elf_get_relocated_section_contents): Likewise.
7566 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7567 (mn10300_elf_relax_section): Likewise.
7568 (mn10300_elf_relax_delete_bytes): Likewise.
7569 (mn10300_elf_symbol_address_p): Likewise.
7570 (mn10300_elf_get_relocated_section_contents): Likewise.
7571 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7572 (elf32_h8_relax_delete_bytes): Likewise.
7573 (elf32_h8_symbol_address_p): Likewise.
7574 (elf32_h8_get_relocated_section_contents): Likewise.
7575 * elf32-hppa.c (get_local_syms): Likewise.
7576 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7577 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7578 * elf32-sh.c (sh_elf_relax_section): Likewise.
7579 (sh_elf_relax_delete_bytes): Likewise.
7580 (sh_elf_get_relocated_section_contents): Likewise.
7581 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7582 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7583 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7584 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7585 * elf64-ppc.c (get_local_syms): Likewise.
7586 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7587 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7588 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7589 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7590 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7591 * elf64-mips.c (mips_elf64_size_info): Likewise.
7592 * elf64-s390.c (s390_elf64_size_info): Likewise.
7593 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7594
53bfd6b4
MR
75952002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7596
7597 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7598 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7599 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7600 _bfd_mips_elf_ignore_discarded_relocs.
7601 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7602
d4df96e6
L
76032002-06-05 H.J. Lu <hjl@gnu.org>
7604
7605 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7606 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7607 the SEC_MERGE section.
7608
e61463e1
AM
76092002-06-05 Alan Modra <amodra@bigpond.net.au>
7610
3cac74d0
AM
7611 * coff-alpha.c: Update copyright date.
7612 * coff-mips.c: Likewise.
7613 * xcoff-target.h: Likewise.
7614
e61463e1
AM
7615 * bfd-in.h: Remove "taken from the source" comment.
7616 * libbfd-in.h: Likewise.
7617 * libcoff-in.h: Likewise.
7618 * bfd-in2.h: Regenerate.
7619 * libbfd.h: Regenerate.
7620 * libcoff.h: Regenerate.
7621
7622 * elf.c (bfd_elf_discard_group): Return true.
7623 * elf-bfd.h (bfd_elf_discard_group): Declare.
7624 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7625 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7626 * bfd.c (bfd_discard_group): Define.
7627 * targets.c (struct bfd_target): Add _bfd_discard_group.
7628 (BFD_JUMP_TABLE_LINK): Here too.
7629 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7630 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7631 * aout-target.h (MY_bfd_discard_group): Define.
7632 * aout-tic30.c (MY_bfd_discard_group): Define.
7633 * binary.c (binary_bfd_discard_group): Define.
7634 * bout.c (b_out_bfd_discard_group): Define.
7635 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7636 * coffcode.h (coff_bfd_discard_group): Define.
7637 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7638 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7639 * i386msdos.c (msdos_bfd_discard_group): Define.
7640 * i386os9k.c (os9k_bfd_discard_group): Define.
7641 * ieee.c (ieee_bfd_discard_group): Define.
7642 * ihex.c (ihex_bfd_discard_group): Define.
7643 * mmo.c (mmo_bfd_discard_group): Define.
7644 * nlm-target.h (nlm_bfd_discard_group): Define.
7645 * oasys.c (oasys_bfd_discard_group): Define.
7646 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7647 * som.c (som_bfd_discard_group): Define.
7648 * srec.c (srec_bfd_discard_group): Define.
7649 * tekhex.c (tekhex_bfd_discard_group): Define.
7650 * versados.c (versados_bfd_discard_group): Define.
7651 * vms.c (vms_bfd_discard_group): Define.
7652 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7653 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7654 (aix5coff64_vec): Likewise.
7655 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7656
9cba27b2
JT
76572002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7658
7659 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7660 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7661 (elf32-sh64-com.lo): New dependency list.
7662 * Makefile.in: Regenerate.
7663 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7664 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7665 elf32-sh64-com.lo.
7666 * configure: Regenerate.
7667 * elf32-sh64.c (sh64_address_in_cranges)
7668 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7669 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7670 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7671 * elf32-sh64-com.c: ...here. New file.
7672
8d2c33be
AM
76732002-06-04 Alan Modra <amodra@bigpond.net.au>
7674
7675 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7676 ATTRIBUTE_UNUSED on used params.
7677 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7678 before calling bfd_section_from_elf_index on local syms.
7679 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7680
5b0e55b6
JT
76812002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7682
7683 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7684 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7685 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7686 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7687 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7688 * Makefile.in: Regenerate.
7689 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7690 (sh64-*-netbsd*): New targets.
7691 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7692 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7693 * configure: Regenerate.
7694 * elf32-sh64-nbsd.c: New file.
7695 * elf64-sh64-nbsd.c: New file.
7696 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7697 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7698 bfd_elf64_sh64lnbsd_vec.
7699
b885599b
AM
77002002-06-04 Alan Modra <amodra@bigpond.net.au>
7701
7702 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7703 (bfd_section_from_shdr): Likewise. Set section name of group
7704 sections from signature.
7705 (group_signature): Split out from setup_group. Ensure symbol table
7706 is available.
7707 (bfd_elf_discard_group): New function.
7708 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7709 .gnu.linkonce* sections if they are members of a group.
7710 (set_group_contents): Set GRP_COMDAT flag.
7711 * section.c (bfd_discard_group): New function.
7712 * bfd-in.h (bfd_elf_discard_group): Declare.
7713 * bfd-in2.h: Regenerate.
7714 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7715 (elf_linkonce_p): Define.
7716
90937f86
AM
77172002-06-04 Alan Modra <amodra@bigpond.net.au>
7718
7719 * elf.c (bfd_section_from_shdr): Make "name" const.
7720 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7721 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7722 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7723 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7724 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7725 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7726 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7727 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7728 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7729 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7730 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7731
cf6fb9ce
MR
77322002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7733
7734 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7735 ABI.
7736
cedb70c5
KH
77372002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7738
7739 * elf32-arc.c: Fix formatting.
7740 * elf32-arm.h: Likewise.
7741 * elf32-cris.c: Likewise.
7742 * elf32-dlx.c: Likewise.
7743 * elf32-hppa.c: Likewise.
7744 * elf32-i386.c: Likewise.
7745 * elf32-i386qnx.c: Likewise.
7746 * elf32-or32.c: Likewise.
7747 * elf32-s390.c: Likewise.
7748 * elf32-sh64.c: Likewise.
7749 * elf32-vax.c: Likewise.
7750 * elf32-xstormy16.c: Likewise.
7751 * elf64-alpha.c: Likewise.
7752 * elf64-mmix.c: Likewise.
7753 * elf64-ppc.c: Likewise.
7754 * elf64-s390.c: Likewise.
7755 * elf64-sh64.c: Likewise.
7756 * elf64-x86-64.c: Likewise.
7757
048d873d
RH
77582002-06-02 Richard Henderson <rth@redhat.com>
7759
7760 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7761 null when there are no got entries for a symbol.
7762 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7763 uninitialized variable warning.
7764
4a67a098
RH
77652002-06-01 Richard Henderson <rth@redhat.com>
7766
7767 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7768 undefined symbols here.
7769 (elf64_alpha_relax_section): Do it here. Also test for not
7770 defined in the current module.
7771 (elf64_alpha_relocate_section_r): Split out of ...
7772 (elf64_alpha_relocate_section): ... here. Don't dereference
7773 NULL when looking up local got entries.
7774
f44f99a5
RH
77752002-06-01 Richard Henderson <rth@redhat.com>
7776
7777 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7778 symbols from JSR relaxation.
7779 (elf64_alpha_size_plt_section_1): New.
7780 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7781 (elf64_alpha_size_rela_got_1): ... here.
7782 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7783 (elf64_alpha_size_rela_got_section): ... here.
7784 (elf64_alpha_size_plt_section): New.
7785 (elf64_alpha_relax_section): Call them.
7786 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7787 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7788
9e756d64
RH
77892002-06-01 Richard Henderson <rth@redhat.com>
7790
7791 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7792 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7793 in shared libraries. Fix DTPRELHI and TPRELHI value.
7794 (INSN_ADDQ, INSN_RDUNIQ): New.
7795 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7796 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7797 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7798 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7799 Handle GOTDTPREL and GOTTPREL relocations.
7800 (elf64_alpha_relax_gprelhilo): New.
7801 (elf64_alpha_relax_tls_get_addr): New.
7802 (elf64_alpha_relax_find_tls_segment): New.
7803 (elf64_alpha_relax_section): Handle TLS relocations.
7804 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7805 (elf64_alpha_check_relocs): Set it.
7806
c853d7f6
RH
78072002-06-01 Richard Henderson <rth@redhat.com>
7808
b646261c
RH
7809 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7810
c853d7f6
RH
7811 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7812 check; don't suppress dynamic relocs for non-allocated sections.
7813
d7e41a96
RH
7814 * elf64-alpha.c: Remove dead code.
7815
5f333394
AM
78162002-05-31 Alan Modra <amodra@bigpond.net.au>
7817
08e0ee05
AM
7818 * bfd-in2.h: Regenerate.
7819 * libbfd.h: Regenerate.
7820 * po/SRC-POTFILES.in: Regenerate.
7821
5f333394
AM
7822 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7823 space for bss .plt.
7824
caf47ea6
AM
78252002-05-31 Graeme Peterson <gp@qnx.com>
7826
7827 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7828 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7829 Run "make dep-am".
7830 * Makefile.in: Regenerate.
7831 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7832 * configure.in: Add bfd_elf32_i386qnx_vec support.
7833 * configure: Regenerate.
7834 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7835 is_contained_by_filepos, and copy_private_bfd_data_p.
7836 * elf.c (assign_file_positions_for_segments): Call backend
7837 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7838 (IS_CONTAINED_BY_FILEPOS): Define.
7839 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7840 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7841 Fix non-K&R call to _bfd_error_handler.
7842 (_bfd_elf_copy_private_section_data): Use backend
7843 copy_private_bfd_data_p.
7844 * elf32-i386.c: Don't include elfxx-target.h when
7845 ELF32_I386_C_INCLUDED is defined.
7846 * elf32-i386qnx.c: New QNX elf backend file.
7847 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7848 elf_backend_is_contained_by_filepos, and
7849 elf_backend_do_copy_private_bfd_data.
7850 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7851
5bc56484
AM
78522002-05-31 Alan Modra <amodra@bigpond.net.au>
7853
7854 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7855 Move other similar defines to start of file.
7856
1b164155
TR
78572002-05-30 Tom Rix <trix@redhat.com>
7858
7859 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7860 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7861
3765b1be
RH
78622002-05-30 Richard Henderson <rth@redhat.com>
7863
7864 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7865 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7866 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7867 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7868 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7869 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7870 n_local_got_entries to total_got_size and local_got_size.
7871 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7872 (alpha_got_entry_size): New.
7873 (elf64_alpha_relax_with_lituse): Use it.
7874 (elf64_alpha_relax_without_lituse): Likewise.
7875 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7876 (get_got_entry): New.
7877 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7878 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7879 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7880 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7881 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7882 (elf64_alpha_calc_got_offsets): Likewise.
7883 (alpha_dynamic_entries_for_reloc): New.
7884 (elf64_alpha_calc_dynrel_sizes): Use it.
7885 (elf64_alpha_size_dynamic_sections): Likewise.
7886 (elf64_alpha_relocate_section): Handle TLS relocations.
7887 * reloc.c: Add Alpha TLS relocations.
7888 * bfd-in2.h, libbfd.h: Rebuild.
7889
5e226794
NC
78902002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7891
7892 * peXXigen.c (pe_print_idata): Remove double printed
7893 import table lines; add Bound-To comment.
7894
90ace9e9
JT
78952002-05-29 Matt Thomas <matt@3am-software.com>
7896
7897 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7898 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7899 (elf32-vax.lo): New rule.
7900 * Makefile.in: Regenerate.
7901 * configure.in (bfd_elf32_vax_vec)
7902 (vaxnetbsd_vec): New vectors.
7903 * configure: Regenerate.
7904 * config.bfd (vax-*-netbsdelf*)
7905 (vax-*-netbsdaout*)
7906 (vax-*-netbsd*): New targets.
7907 * elf32-vax.c: New file.
7908 * reloc.c: Add VAX relocations.
7909 * bfd-in2.h: Regenerate.
7910 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7911
4a253e81
JT
79122002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7913
7914 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7915 and bfd_elf32_bigarm_vec to targ_selvecs.
7916
6e7c73dd
CF
79172002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7918
7919 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7920 with auto-imported symbols.
7921
8afb0e02
NC
79222002-05-29 Adam Nemet <anemet@lnxw.com>
7923
7924 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7925 sections only record bfd.
9bab7074 7926 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7927 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7928 * bfd-in2.h: Regenerate.
8afb0e02 7929
a95653f5
NC
79302002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7931
7932 * syms.c (_bfd_stab_section_find_nearest_line): Move
7933 declaration and initialisation of saw_line and saw_func out of
7934 for loop.
7935
7cdc5bba
AM
79362002-05-29 Alan Modra <amodra@bigpond.net.au>
7937
7938 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7939 (bfd_elf64_get_symbol_info): Define.
7940 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7941
4c7aad1c
AM
79422002-05-29 Andrey Volkov <avolkov@transas.com>
7943
7944 * cpu-h8300.c: Make default h8300 machine first in machine list.
7945
d172d4ba
NC
79462002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7947
7948 * config.bfd: Added DLX configuraton.
7949 * Makefile.am: Added DLX configuraton.
7950 * configure.in: Added DLX configuraton.
7951 * archures.c: Add DLX architecure.
7952 * reloc.c: Add DLX relocs.
7953 * targets.c: Added DLX target vector.
7954 * configure: Regenerate.
7955 * Makefile.in: Regenreate.
7956 * bfd-in2.h: Regenreate.
7957 * elf32-dlx.c: New file: Support DLX target.
7958 * cpu-dlx.c: New file: Support DLX target.
7959
d1329ca3
AM
79602002-05-25 Alan Modra <amodra@bigpond.net.au>
7961
428d0de3
AM
7962 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7963
d1329ca3
AM
7964 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7965 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7966 strings to point inside function code sym string.
7967 (func_desc_adjust): Likewise.
7968 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7969
3bab7989
ML
79702002-05-24 Michal Ludvig <mludvig@suse.cz>
7971
7972 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7973 (elf64_x86_64_grok_psinfo): Added.
7974
436e8db0
NC
79752002-05-24 TAMURA Kent <kent@netbsd.org>
7976
7977 * config.bfd: Add a target for i386-netbsdpe.
7978
ea1e4b0d
AM
79792002-05-24 Alan Modra <amodra@bigpond.net.au>
7980
7981 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7982 and is_func_descriptor.
7983 (func_desc_adjust): Hide function code sym in shared libs unless
7984 there is a matching exported function descriptor sym.
7985
13ae64f3
JJ
79862002-05-23 Jakub Jelinek <jakub@redhat.com>
7987
7988 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7989 for symbols from SHF_TLS section.
7990 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7991 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7992 (map_sections_to_segments): Build PT_TLS segment if necessary.
7993 (assign_file_positions_for_segments): Likewise.
7994 (get_program_header_size): Account for PT_TLS segment.
7995 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7996 SEC_THREAD_LOCAL sections to STT_TLS.
7997 * reloc.c: Add 386 and IA-64 TLS relocs.
7998 * section.c (SEC_THREAD_LOCAL): Define.
7999 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8000 Remove.
8001 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8002 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8003 unconditionally.
8004 (struct elf_final_link_info): Add first_tls_sec.
8005 (elf_bfd_final_link): Set first_tls_sec.
8006 Compute elf_hash_table (info)->tls_segment.
8007 (elf_link_output_extsym): Handle STT_TLS symbols.
8008 (elf_link_input_bfd): Likewise.
8009 * syms.c (BSF_THREAD_LOCAL): Define.
8010 * bfd-in2.h: Rebuilt.
8011 * libbfd.h: Rebuilt.
8012 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8013 elf_i386_mkobject, elf_i386_object_p): New functions.
8014 (elf_howto_table): Add TLS relocs.
8015 (elf_i386_reloc_type_lookup): Support TLS relocs.
8016 (elf_i386_info_to_howto_rel): Likewise.
8017 (struct elf_i386_link_hash_entry): Add tls_type.
8018 (struct elf_i386_obj_tdata): New.
8019 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8020 New macros.
8021 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8022 (link_hash_newfunc): Clear tls_type.
8023 (elf_i386_check_relocs): Support TLS relocs.
8024 (elf_i386_gc_sweep_hook): Likewise.
8025 (allocate_dynrelocs): Likewise.
8026 (elf_i386_size_dynamic_sections): Likewise.
8027 (elf_i386_relocate_section): Likewise.
8028 (elf_i386_finish_dynamic_symbol): Likewise.
8029 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8030 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8031 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8032 want_tprel, want_dtpmod, want_dtprel.
8033 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8034 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8035 R_IA64_LTOFF_TPREL22.
8036 (elf_code_to_howto_index): Add TLS relocs.
8037 (elfNN_ia64_check_relocs): Support TLS relocs.
8038 (allocate_global_data_got): Account for TLS .got data.
8039 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8040 (elfNN_ia64_install_value): Supprt TLS relocs.
8041 (set_got_entry): Support TLS relocs.
8042 (elfNN_ia64_relocate_section): Likewise.
8043
c62e1cc3
NC
80442002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8045
8046 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8047 BLX reloc round the relocation up rather than down.
8048 * coff-arm.c (coff_arm_relocate_section): Likewise.
8049
c5a43a5d
L
80502002-05-21 H.J. Lu (hjl@gnu.org)
8051
8052 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8053 definition.
8054
afbe61cf
AM
80552002-05-22 Alan Modra <amodra@bigpond.net.au>
8056
8057 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8058 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8059
9c07fe7c
AM
80602002-05-22 Alan Modra <amodra@bigpond.net.au>
8061
8062 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8063 unresolved relocs.
8064 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8065
21611032
TS
80662002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8067
c5cd6d62 8068 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
8069 non-ELF targets.
8070
41241523
TS
80712002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8072
8073 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8074 an error value.
8075 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8076 return with false on error.
8077 (elf_link_input_bfd): Check reloc_emitter return value.
8078
658f2588
JT
80792002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8080
8081 * config.bfd (armeb-*-netbsdelf*): New target.
8082
c862ae31
AM
80832002-05-20 Alan Modra <amodra@bigpond.net.au>
8084
8085 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8086 at the plt call stub.
8087
6dd14845
TS
80882002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8089
8090 * cpu-mips.c (mips_compatible): Don't try to check machine
8091 compatibility.
8092
a58d9c34
TR
80932002-05-18 Tom Rix <trix@redhat.com>
8094
9b5ecbd0 8095 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 8096
ef60b7ff
AM
80972002-05-17 Alan Modra <amodra@bigpond.net.au>
8098
8099 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8100 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8101 we've already warned about an undefined symbol. Report more
8102 detail on reloc errors.
8103
a703a6ea
AM
81042002-05-17 Alan Modra <amodra@bigpond.net.au>
8105
8106 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8107 * configure.in: Invoke AM_INSTALL_LIBBFD.
8108 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8109 (install_libbfd): .. New target.
8110 (uninstall_libbfd): Likewise.
8111 (install-bfdlibLTLIBRARIES): Likewise.
8112 (uninstall-bfdlibLTLIBRARIES): Likewise.
8113 (bfdlibdir): New.
8114 (bfdincludedir): New.
8115 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8116 * aclocal.m4: Regenerate.
8117 * configure: Regenerate.
8118 * Makefile.in: Regenerate.
8119
2c13d98b
NC
81202002-05-17 Stuart Balfour <sbalfour@cisco.com>
8121
8122 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8123 hash loop.
8124
629936c5
NC
81252002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8126
8127 * config.bfd: Add targets for sh64-linux (little endian and
8128 big endian).
8129
e4cf60a8
NC
81302002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8131
8132 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8133 is located in the same section as the import table. Instead
8134 check, and if necessary load the section containing the thunk.
8135
d1e66cd4
NC
81362002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8137
8138 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8139 bfd_bread.
8140 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8141 with bfd_bread.
d1e66cd4 8142
2d653fc7
AM
81432002-05-15 Alan Modra <amodra@bigpond.net.au>
8144
8145 * aix5ppc-core.c: Warning fixes.
8146 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8147 * aout-target.h (MY_bfd_link_just_syms): Define.
8148 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8149 * bfd.c (bfd_link_just_syms): Define.
8150 * binary.c (binary_bfd_link_just_syms): Define.
8151 * bout.c (b_out_bfd_link_just_syms): Define.
8152 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8153 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8154 * coffcode.h (coff_bfd_link_just_syms): Define.
8155 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8156 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8157 (_bfd_elf_link_just_syms): Declare.
8158 * elf.c (_bfd_elf_link_just_syms): New function.
8159 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8160 sections haven't already been discarded by the linker.
8161 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8162 sections and SEC_MERGE sections.
8163 (elf_bfd_discard_info): Similarly here.
8164 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8165 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8166 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8167 * ieee.c (ieee_bfd_link_just_syms): Define.
8168 * ihex.c (ihex_bfd_link_just_syms): Define.
8169 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8170 (_bfd_generic_link_just_syms): Declare.
8171 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8172 * linker.c (_bfd_generic_link_just_syms): New function.
8173 * mmo.c (mmo_bfd_link_just_syms): Define.
8174 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8175 * oasys.c (oasys_bfd_link_just_syms): Define.
8176 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8177 * som.c (som_bfd_link_just_syms): Define.
8178 * srec.c (srec_bfd_link_just_syms): Define.
8179 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8180 (BFD_JUMP_TABLE_LINK): And here.
8181 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8182 * versados.c (versados_bfd_link_just_syms): Define.
8183 * vms.c (vms_bfd_link_just_syms): Define.
8184 * libbfd.h: Regenerate.
8185 * bfd-in2.h: Regenerate.
8186
cb7394f2
TS
81872002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8188
8189 * elf32-mips.c: Remove superfluous definitions copied from
8190 elfxx-mips.c.
8191 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8192 SGIish vectors to check the special case.
8193 (mips_elf_hi16_reloc): Fix comment.
8194 (mips_elf_got16_reloc): Likewise.
8195 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8196 (elf_reloc_map): Code cleanup.
8197 (mips_reloc_map): Add comment.
8198 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8199 (mips_elf32_rtype_to_howto): Likewise.
8200 (mips_elf32_discard_info): Likewise.
8201 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8202 lead to IRIX compatibility now.
8203
8dc1a139
TS
82042002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8205
8206 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8207
2051e1b5
JT
82082002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8209
8210 * config.bfd (shle-*-netbsdelf*): Add target which includes
8211 sh64 support.
8212
83954261
AM
82132002-05-13 David Edelsohn <edelsohn@gnu.org>
8214
8215 * configure.in: Revert 2002-04-07. Instead, auto-configure
8216 HAVE_ST_C_IMPL.
8217 * configure: Regenerate.
8218 * config.in: Regenerate.
8219 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8220 or AIX_5_CORE.
8221
a9bf1154
NC
82222002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8223
8224 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8225 corefiles as well.2
8226 * configure: Regenerate.
8227
3129eb7a
AM
82282002-05-13 Alan Modra <amodra@bigpond.net.au>
8229
8230 * Makefile.am (install-data-local): Install headers to
8231 $(exec_prefix)/include.
8232 * Makefile.in: Regenerate.
8233
a9a32010
DJ
82342002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8235 Daniel Jacobowitz <drow@mvista.com>
8236
8237 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8238 map BFD_RELOC_RVA.
8239
82402002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8241
8242 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8243 hppa*-*-openbsd*): New targets.
8244 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8245 * configure: Regenerate.
8246
f1f0d9ab
TR
82472002-05-10 Tom Rix <trix@redhat.com>
8248
ea1e4b0d 8249 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8250 xcoff64_ppc_relocate_section.
8251 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8252 * libxcoff.h: Common xcoff_reloc_type function declaration.
8253
c432ba1a
AM
82542002-05-10 Alan Modra <amodra@bigpond.net.au>
8255
16a10388 8256 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8257 added in 2002-05-09 commit.
16a10388 8258
c432ba1a
AM
8259 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8260 don't look for stubs on all undefined syms.
8261
4a335f3d
AM
82622002-05-09 Alan Modra <amodra@bigpond.net.au>
8263
8fc39d5d
AM
8264 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8265 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8266 pcrel_offset.
8267
4a335f3d
AM
8268 * elf32-i386.c (elf_howto_table): Comments.
8269 (elf_i386_relocate_section): Handle more relocs for relocatable
8270 linking and against SEC_MERGE sections.
8271
41fcb14e
AM
82722002-05-08 Alan Modra <amodra@bigpond.net.au>
8273
8274 * elf32-ppc.c (ppc_elf_create_got): New function.
8275 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8276 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8277 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8278 _bfd_elf_create_got_section.
8279
b491616a
AM
82802002-05-07 Alan Modra <amodra@bigpond.net.au>
8281
8282 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8283 * elfxx-target.h (elf_backend_rela_normal): Define.
8284 (elfNN_bed): Init rela_normal.
8285 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8286 for section symbols here if rela_normal. Simplify abs section test.
8287 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8288 return immediately. Remove code handling relocatable linking.
8289 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8290 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8291 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8292 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8293 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8294 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8295 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8296 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8297 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8298 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8299 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8300 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8301 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8302 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8303 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8304 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8305 * elf-m10200.c (elf_backend_rela_normal): Define.
8306 * elf-m10300.c (elf_backend_rela_normal): Define.
8307 * elf32-fr30.c (elf_backend_rela_normal): Define.
8308 * elf32-i370.c (elf_backend_rela_normal): Define.
8309 * elf32-i860.c (elf_backend_rela_normal): Define.
8310 * elf32-m68k.c (elf_backend_rela_normal): Define.
8311 * elf32-mcore.c (elf_backend_rela_normal): Define.
8312 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8313 * elf32-ppc.c (elf_backend_rela_normal): Define.
8314 * elf32-s390.c (elf_backend_rela_normal): Define.
8315 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8316 * elf64-ppc.c (elf_backend_rela_normal): Define.
8317 * elf64-s390.c (elf_backend_rela_normal): Define.
8318 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8319 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8320 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8321 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8322
df212a7e
NC
83232002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8324
8325 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8326 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8327
3decf53c
AM
83282002-05-06 Alan Modra <amodra@bigpond.net.au>
8329
8330 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8331 when not relocatable. Fix reloc_emitter call for K&R.
8332
f46c2da6
AM
83332002-05-04 Alan Modra <amodra@bigpond.net.au>
8334
8335 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8336 reloading local sym addend mistakenly removed in 2002-05-01 change.
8337
8338 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8339 (read_abbrevs): Change "offset" param to bfd_vma.
8340 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8341 Change "abbrev_offset" to bfd_vma.
8342 (read_indirect_string): Use correct conversion chars in error
8343 message format string, cast bfd_vma's to unsigned long.
8344 (read_abbrevs): Likewise.
8345 (read_attribute_value): Likewise.
8346 (decode_line_info): Likewise.
8347 (scan_unit_for_functions): Likewise.
8348 (parse_comp_unit): Likewise.
8349
59862849
TR
83502002-05-04 Tom Rix <trix@redhat.com>
8351
8352 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8353 (coff_swap_reloc_out): Same.
8354 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8355 (xcoff_swap_reloc_out): Same.
8356 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8357 case some 16 bit relocs. Add reloc value to output.
8358 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8359 R_RBR. Improve names.
59862849
TR
8360 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8361 (bfd_xcoff_backend_data): Update with new reloc swap names.
8362 (bfd_pmac_xcoff_backend_data) : Same.
8363 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8364 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8365 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8366 R_POS. Add reloc value to output.
ea1e4b0d
AM
8367 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8368 bit R_RBR. Improve names, masks.
59862849
TR
8369 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8370 (bfd_xcoff_backend_data): Update with new reloc swap names.
8371 (bfd_xcoff_aix5_backend_data) : Same.
8372
b4655ea9
AM
83732002-05-04 Alan Modra <amodra@bigpond.net.au>
8374
8375 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8376 bfd_count top_index, input_list, all_local_syms.
8377 (elf32_hppa_setup_section_lists): New function, split from
8378 elf32_hppa_size_stubs.
8379 (elf32_hppa_next_input_section): Likewise.
8380 (group_sections): Likewise.
8381 (get_local_syms): Likewise.
8382 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8383 stubs on undefined syms too.
8384 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8385 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8386 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8387 (elf32_hppa_next_input_section): Declare.
8388
301e3139
AM
83892002-05-04 Bob Byrnes <byrnes@curl.com>
8390
8391 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8392 _bfd_new_bfd.
8393
7c5fcef7
L
83942002-05-03 H.J. Lu (hjl@gnu.org)
8395
8396 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8397 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8398 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8399 to hide a global symbol.
8400 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8401 forced_local to true.
7c5fcef7 8402
84de6048
RH
84032002-05-02 Richard Henderson <rth@redhat.com>
8404
8405 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8406 vs SHN_UNDEF to zero.
8407
805fc799
AM
84082002-05-02 Alan Modra <amodra@bigpond.net.au>
8409
c061c2d8
AM
8410 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8411 16 bit reloc.
8412 <R_PPC64_SECTOFF_DS>: Likewise.
8413 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8414 SECTOFF reloc.
8415 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8416 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8417 SECTOFF reloc.
8418
805fc799
AM
8419 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8420 (ppc64_elf_ha_reloc): New function.
8421 (ppc64_elf_brtaken_reloc): New function.
8422 (ppc64_elf_sectoff_reloc): New function.
8423 (ppc64_elf_sectoff_ha_reloc): New function.
8424 (ppc64_elf_toc_reloc): New function.
8425 (ppc64_elf_toc_ha_reloc): New function.
8426 (ppc64_elf_toc64_reloc): New function.
8427 (ppc64_elf_unhandled_reloc): New function.
8428 (ppc64_elf_howto_raw): Use the above.
8429 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8430 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8431 <R_PPC64_SECTOFF_DS>: Likewise.
8432 (IS_ABSOLUTE_RELOC): Update.
8433 (struct ppc_link_hash_table): Add have_undefweak.
8434 (ppc64_elf_link_hash_table_create): Init.
8435 (func_desc_adjust): Set have_undefweak.
8436 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8437 add the .sfpr blr when have_undefweak.
8438 (ppc64_elf_setup_section_lists): Check hash table flavour.
8439 (ppc64_elf_next_input_section): Move output_section->owner test to
8440 ppc64elf.em.
8441 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8442 and relocatable test. Return TOCstart and don't set elf_gp.
8443 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8444 offset calculation. Add assert on weak sym branch tweaks.
8445 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8446 (ppc64_elf_toc): Declare.
8447 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8448
818c39a3
AM
84492002-05-01 Alan Modra <amodra@bigpond.net.au>
8450
8451 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8452 file_name.
8453
721956f4
AM
84542002-05-01 Alan Modra <amodra@bigpond.net.au>
8455
8456 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8457 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8458 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8459 call branches. Correct undefined weak destination.
8460 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8461 .sfpr, and correct case where either only savef* or restf* is
8462 needed.
8463
8464 Long branch stubs, multiple stub sections.
8465 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8466 (ppc64_elf_next_input_section): Declare.
8467 * elf64-ppc.c: Move linker-only prototypes.
8468 (STUB_SUFFIX): Define.
8469 (enum ppc_stub_type): New.
8470 (struct ppc_stub_hash_entry): New.
8471 (struct ppc_branch_hash_entry): New.
8472 (struct ppc_link_hash_entry): Add stub_cache, oh.
8473 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8474 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8475 Rename plt_overflow to stub_error.
8476 (ppc_stub_hash_lookup): Define.
8477 (ppc_branch_hash_lookup): Define.
8478 (stub_hash_newfunc): New function.
8479 (branch_hash_newfunc): New function.
8480 (link_hash_newfunc): Init new fields.
8481 (ppc64_elf_link_hash_table_create): Likewise.
8482 (ppc64_elf_link_hash_table_free): New function.
8483 (ppc_stub_name): New function.
8484 (ppc_get_stub_entry): New function.
8485 (ppc_add_stub): New function.
8486 (create_linkage_sections): Use bfd_make_section_anyway. Create
8487 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8488 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8489 and set up for plt call stubs. Link func and func desc syms.
8490 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8491 (func_desc_adjust): Avoid hash lookup when func desc sym available
8492 via shortcut, and set links when processing.
8493 (ppc64_elf_hide_symbol): Likewise.
8494 (allocate_dynrelocs): Don't allocate stub section here.
8495 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8496 Remove sstub code.
8497 (ppc_type_of_stub): New function.
8498 (build_one_stub): Delete.
8499 (ppc_build_one_stub): New function.
8500 (ppc_size_one_stub): New function.
8501 (ppc64_elf_setup_section_lists): New function.
8502 (ppc64_elf_next_input_section): New function.
8503 (group_sections): New function.
8504 (get_local_syms): New function.
8505 (ppc64_elf_size_stubs): Rewrite.
8506 (ppc64_elf_build_stubs): Rewrite.
8507 (ppc64_elf_relocate_section): Look up stub entry for REL24
8508 relocs. Don't propagate REL14* to dynamic objects. Look for long
8509 branch stubs if REL14* or REL24 relocs won't reach.
8510 (bfd_elf64_bfd_link_hash_table_free): Define.
8511
09c2219b
MM
85122002-04-30 Mark Mitchell <mark@codesourcery.com>
8513
c5cd6d62 8514 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8515
07b678c0
TR
85162002-04-30 Tom Rix <trix@redhat.com>
8517
8518 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8519 symbol names into the hash table.
8520
dbe341c6
TR
85212002-04-28 Tom Rix <trix@redhat.com>
8522
8523 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8524 calulating relocations.
dbe341c6 8525 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8526 (xcoff_ppc_relocate_section): Use relocation and complain function
8527 tables.
8528 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8529 (xcoff_complain_overflow_signed_func): Same.
8530 (xcoff_complain_overflow_bitfield_func): Same.
8531 (xcoff_complain_overflow_dont_func): Same.
8532 (xcoff_reloc_type_crel): New recot function.
8533 (xcoff_reloc_type_br): Same.
8534 (xcoff_reloc_type_ba): Same.
8535 (xcoff_reloc_type_toc): Same.
8536 (xcoff_reloc_type_rel): Same.
8537 (xcoff_reloc_type_neg): Same.
8538 (xcoff_reloc_type_pos): Same.
8539 (xcoff_reloc_type_fail): Same.
8540 (xcoff_reloc_type_noop): Same.
8541 * libxcoff.h : Declare common parts for xcoff64.
8542 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8543 and complain function tables.
dbe341c6 8544
985142a4
AM
85452002-04-28 Alan Modra <amodra@bigpond.net.au>
8546
8547 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8548 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8549
eba91044
AM
85502002-04-26 Alan Modra <amodra@bigpond.net.au>
8551
e54fdaa5
AM
8552 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8553 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8554
a50c1845
AM
8555 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8556 same as the output before calling elf_link_input_bfd.
8557
eba91044
AM
8558 * coffcode.h (coff_compute_section_file_positions): Set
8559 section_tail after shuffling section list.
8560
3c25c5f6
NC
85612002-04-24 Christian Groessler <chris@groessler.org>
8562
8563 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8564 addresses are 23bit with a special layout, not plain 32bit
8565 values. Prevent relocation of immediate values.
8566
40d32fc6
CD
85672002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8568
8569 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8570 MIPS-16 ASE flags are set, print something to indicate that.
8571
067fa4a6
AM
85722002-04-23 Alan Modra <amodra@bigpond.net.au>
8573
8574 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8575 under which a plt call stub is used.
8576 (final_link_relocate): Similarly.
8577 (allocate_plt_static): Clear h-plabel except when plt entry is
8578 exclusively used for a plabel.
8579 (allocate_dynrelocs): Use the above to simplify plt sizing.
8580 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8581 (elf32_hppa_link_hash_table_create): Init.
8582 (BL22_RP): Define.
8583 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8584 (elf32_hppa_check_relocs): Set has_22bit_branch.
8585
8586 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8587 (final_link_relocate): Likewise.
8588
af40ce3c
JJ
85892002-04-22 Jakub Jelinek <jakub@redhat.com>
8590
8591 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8592 search table if some FDE is DW_EH_PE_aligned encoded either.
8593 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8594
09ae86c2
JJ
85952002-04-22 Richard Smith <richard@ex-parrot.com>
8596 Jakub Jelinek <jakub@redhat.com>
8597
8598 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8599 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8600 encoded personality.
8601 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8602 for CIE/FDE removal.
8603
deeb2cd7
TR
86042002-04-20 Tom Rix <trix@redhat.com>
8605
8606 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8607
99dc0092
AM
86082002-04-20 Alan Modra <amodra@bigpond.net.au>
8609
aa3d5824
AM
8610 * archures.c (bfd_lookup_arch): Move the list order comment..
8611 (struct bfd_arch_info): ..to where it belongs.
8612 * bfd-in2.h: Regenerate.
8613
99dc0092
AM
8614 * archures.c (bfd_lookup_arch): Add comment on list order.
8615 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8616 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8617 is always at head of list.
8618
7831a775
NC
86192002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8620
8621 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8622 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8623 definition of these functions for ARM_WINCE builds as they are
8624 not used.
ea1e4b0d 8625 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8626 for ARM_WINCE builds.
8627
86282002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8629
ea1e4b0d 8630 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8631
86322002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8633
8634 * cpu-sh.c (scan_mach): Delete.
8635 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8636 (bfd_sh_arch): Likewise.
8637
3d8dbe36
NC
86382002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8639
8640 * ihex.c (ihex_write_object_contents): Fix check for records
8641 crossing 64K boundaries.
8642
4ab82700
AM
86432002-04-16 Alan Modra <amodra@bigpond.net.au>
8644
8645 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8646 type rather than just assuming entries are ELF.
8647 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8648 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8649 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8650 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8651 rather than elf_link_hash_entry.
8652
036fe0fe
RH
86532002-04-15 Richard Henderson <rth@redhat.com>
8654
8655 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8656 n32 binaries.
8657
c4f3d130
NC
86582002-04-15 Michael Snyder <msnyder@redhat.com>
8659
8660 * opncls.c (bfd_close): Write contents if writeable.
8661 Minor formatting tidy-ups.
8662
4ab82700 86632002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8664
8665 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8666
0c04d169
MS
86672002-04-12 Michael Snyder <msnyder@redhat.com>
8668
8669 * bfd-in.h (bfd_get_section_lma): New access macro.
8670 Minor white-space fix-up.
8671
89d4966f
AM
86722002-04-12 Alan Modra <amodra@bigpond.net.au>
8673
8674 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8675 header pad.
8676
8d0da3c2
DD
86772002-04-09 DJ Delorie <dj@redhat.com>
8678
8679 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8680
05793179
NC
86812002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8682
8683 * coffcode.h (coff_read_word): New.
8684 (coff_compute_checksum): New.
8685 (coff_apply_checksum): New.
8686 (coff_write_object_contents): Call coff_apply_checksum () to
8687 apply checksum to PE image.
8688
46fe4e66
AM
86892002-04-08 Randolph Chung <tausq@debian.org>
8690
8691 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8692 (elf32_hppa_final_link): Split out sorting logic to..
8693 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8694 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8695
3b5b409c
AC
86962002-04-07 Andrew Cagney <ac131313@redhat.com>
8697
8698 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8699 pattern.
8700 * configure: Re-generate.
8701
ac7b6ceb
AC
87022002-04-07 Andrew Cagney <ac131313@redhat.com>
8703
8704 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8705 is greater or equal to 4.3.3.
8706 * configure: Regenerate.
8707 Fix PR gdb/344.
8708
44aa49bb
HPN
87092002-04-05 Hans-Peter Nilsson <hp@axis.com>
8710
8711 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8712 R_CRIS_32_PCREL>: Fix typo in name.
8713 (cris_elf_check_relocs): Always create .rela.got here when
8714 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8715 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8716 assume it's created.
8717
e2d34d7d
DJ
87182002-04-04 Daniel Jacobowitz <drow@mvista.com>
8719
8720 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8721 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8722 define.
8723 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8724 * bfd.c (bfd_link_hash_table_free): Define.
8725 * binary.c (binary_bfd_link_hash_table_free): Define.
8726 * bout.c (b_out_bfd_link_hash_table_free): Define.
8727 * coff-rs6000.c (rs6000coff_vec): Include
8728 _bfd_generic_link_hash_table_free.
8729 (pmac_xcoff_vec): Likewise.
8730 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8731 (aix5coff64_vec): Likewise.
8732 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8733 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8734 (bfd_elf32_bfd_link_hash_table_free): Define.
8735 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8736 (bfd_elf32_bfd_link_hash_table_free): Define.
8737 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8738 define.
8739 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8740 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8741 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8742 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8743 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8744 (_bfd_generic_link_hash_table_free): Add prototype.
8745 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8746 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8747 * linker.c (_bfd_generic_link_hash_table_free): New function.
8748 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8749 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8750 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8751 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8752 * som.c (som_bfd_link_hash_table_free): Define.
8753 * srec.c (srec_bfd_link_hash_table_free): Define.
8754 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8755 * versados.c (versados_bfd_link_hash_table_free): Define.
8756 * vms.c (vms_bfd_link_hash_table_free): New function.
8757 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8758
8759 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8760 instead of bfd_alloc.
8761 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8762 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8763 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8764 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8765 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8766 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8767 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8768 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8769 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8770 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8771 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8772 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8773 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8774 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8775 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8776 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8777 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8778 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8779 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8780 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8781 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8782 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8783 * m68klinux.c (linux_link_hash_table_create): Likewise.
8784 * sparclinux.c (linux_link_hash_table_create): Likewise.
8785 * sunos.c (sunos_link_hash_table_create): Likewise.
8786 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8787
8788 * targets.c: Add _bfd_link_hash_table_free to xvec.
8789
8790 * bfd-in2.h: Regenerate.
8791 * libbfd.h: Regenerate.
8792 * libcoff.h: Regenerate.
8793
830629ab
AM
87942002-04-04 Alan Modra <amodra@bigpond.net.au>
8795
8796 * dep-in.sed: Cope with absolute paths.
8797 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8798 Run "make dep-am".
8799 * Makefile.in: Regenerate.
8800 * coff-arm.c: Fix copyright date.
8801 * cpu-h8300.c: Likewise.
8802 * cpu-i370.c: Likewise.
8803 * cpu-s390.c: Likewise.
8804 * cpu-mips.c: Likewise.
8805 * po/SRC-POTFILES.in: Regenerate.
8806
c6e90b02
TS
88072002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8808
8809 * Makefile.am: Add elfxx-mips.c to the known backends.
8810 (elf32-mips.lo): remove dependency to coff/external.h.
8811 * Makefile.in: Regenerate.
8812 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8813 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8814 accordingly.
8815 * configure: Regenerate.
8816 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8817 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8818 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8819 MIPS specific backend functions.
8820 * elf32-mips.c: Moved most code to elfxx-mips.c.
8821 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8822 static.
8823 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8824 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8825 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8826 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8827 interface to allow selection of the right REL or RELA howto table.
8828 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8829 static. Let it refuse n32 objects.
8830 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8831 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8832 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8833 (elf32_mips_ignore_discarded_relocs): Rename from
8834 _bfd_elf32_mips_ignore_discarded_relocs.
8835 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8836 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8837 (elf_mips_howto_table_rela): Remove.
8838 * elf64-mips.c: Moved most code to elfxx-mips.c.
8839 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8840 (mips_elf64_rtype_to_howto): New function.
8841 (mips_elf64_object_p): Likewise.
8842 (elf64_mips_irix_compat): Likewise.
8843 * elfxx-mips.c: New file containing common code merged together from
8844 elf32-mips.c and elf64-mips.c.
8845 * elfxx-mips.h: New file containing MIPS specific prototypes from
8846 elf-bfd.h.
8847 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8848 elf_backend_mips_rtype_to_howto.
8849
d8dce692
AM
88502002-04-04 Alan Modra <amodra@bigpond.net.au>
8851
8852 * srec.c (MAXCHUNK, Chunk): Revise comments.
8853 (srec_write_record): Correct buffer size.
8854 (srec_write_header): Do without intermediate buffer.
8855 (srec_write_section): Validate Chunk.
8856 (srec_write_terminator): Pass NULL instead of dummy buffer.
8857 (srec_write_symbols): Pass file and symbol names directly to
8858 bfd_bwrite so sprintf won't overflow buffer.
8859
b88a866a
JJ
88602002-04-03 Jakub Jelinek <jakub@redhat.com>
8861
8862 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8863 PC relative relocs against hidden symbols.
8864 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8865
d7866f04
AM
88662002-04-03 Alan Modra <amodra@bigpond.net.au>
8867
8868 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8869 LMAs, loop over segments until p_vaddr and p_memsz specify an
8870 extent enclosing the section.
8871
9e81ee67
NC
88722002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8873
8874 * ihex.c (ihex_write_object_contents): Do not allow records to
8875 cross a 64K boundary - wrap if necessary.
8876
d2b64500
JT
88772002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8878
8879 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8880 which caused the returned LWP ID to always be 0.
8881
e36f7d53
RH
88822002-04-01 Richard Henderson <rth@redhat.com>
8883
8884 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8885 (elf32_sparc_relocate_section): Use it to figure out when to
8886 initialize .got entries.
8887 * elf64-sparc.c: Similarly.
8888
e92d460e
AM
88892002-03-28 Alan Modra <amodra@bigpond.net.au>
8890
8891 * linker.c (link_action): Ignore duplicate warning syms.
8892 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8893 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8894 (elf_adjust_dynamic_symbol): Likewise.
8895 (elf_export_symbol): Likewise.
8896 (elf_link_find_version_dependencies): Likewise.
8897 (elf_link_assign_sym_version): Likewise.
8898 (elf_link_sec_merge_syms): Likewise.
8899 (elf_link_output_extsym): Likewise.
8900 (elf_gc_sweep_symbol): Likewise.
8901 (elf_gc_propagate_vtable_entries_used): Likewise.
8902 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8903 (elf_gc_allocate_got_offsets): Likewise.
8904 (elf_collect_hash_codes): Likewise.
8905 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8906 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8907 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8908 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8909 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8910 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8911 (elf_cris_discard_excess_dso_dynamics): Likewise.
8912 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8913 (mark_PIC_calls): Likewise.
8914 (allocate_plt_static): Likewise.
8915 (allocate_dynrelocs): Likewise.
8916 (readonly_dynrelocs): Likewise.
8917 * elf32-i386.c (allocate_dynrelocs): Likewise.
8918 (readonly_dynrelocs): Likewise.
8919 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8920 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8921 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8922 (mips_elf_sort_hash_table_f): Likewise.
8923 (mips_elf_check_mips16_stubs): Likewise.
8924 * elf32-s390.c (allocate_dynrelocs): Likewise.
8925 (readonly_dynrelocs): Likewise.
8926 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8927 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8928 (xstormy16_relax_plt_realloc): Likewise.
8929 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8930 (elf64_alpha_output_extsym): Likewise.
8931 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8932 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8933 (mips_elf64_check_mips16_stubs): Likewise.
8934 (mips_elf64_output_extsym): Likewise.
8935 * elf64-ppc.c (func_desc_adjust): Likewise.
8936 (allocate_dynrelocs): Likewise.
8937 (readonly_dynrelocs): Likewise.
8938 * elf64-s390.c (allocate_dynrelocs): Likewise.
8939 (readonly_dynrelocs): Likewise.
8940 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8941 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8942 (readonly_dynrelocs): Likewise.
8943 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8944 * aoutx.h (aout_link_write_other_symbol): Likewise.
8945 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8946 (_bfd_coff_write_global_sym): Likewise.
8947 * i386linux.c (linux_tally_symbols): Likewise.
8948 * m68klinux.c (linux_tally_symbols): Likewise.
8949 * sparclinux.c (linux_tally_symbols): Likewise.
8950 * pdp11.c (aout_link_write_other_symbol): Likewise.
8951 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8952 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8953 (xcoff_write_global_symbol): Likewise.
8954
8955 * cofflink.c (_bfd_coff_final_link): Formatting.
8956 * cpu-mips.c (mips_compatible): Make static, prototype.
8957 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8958 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8959 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8960 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8961 (mips_elf64_final_link): Likewise.
8962 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8963 prototype.
8964
2106126f
NC
89652002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8966
8967 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8968 (SWAP_OUT_RELOC_OFFSET): Define.
8969
b99d1833
AM
89702002-03-27 Gregory Steuck <greg@nest.cx>
8971
8972 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8973 terminating NULL if empty symbol table.
8974 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8975
ad43ed4c
L
89762002-03-26 H.J. Lu (hjl@gnu.org)
8977
8978 * elflink.h (elf_link_input_bfd): Revert the last change since
8979 the gcc exception handling isn't fixed yet.
8980
3851fca4
L
89812002-03-26 H.J. Lu (hjl@gnu.org)
8982
8983 * elflink.h (elf_link_input_bfd): Complain about relocations
8984 against local symbols in discarded sections.
8985
b91afed7
AM
89862002-03-26 Alan Modra <amodra@bigpond.net.au>
8987
8988 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8989
dba143ef
AM
89902002-03-23 Alan Modra <amodra@bigpond.net.au>
8991
8992 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8993 section file offset for !SEC_LOAD sections.
8994
ee29b9fb
RE
89952002-03-21 Richard Earnshaw <rearnsha@arm.com>
8996
830629ab
AM
8997 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8998 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 8999
54327882
AM
90002002-03-21 Alan Modra <amodra@bigpond.net.au>
9001
9002 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9003 Whitespace changes.
9004 * archive.c: Update copyright date.
9005 * bfd-in2.h: Regenerate.
9006 * libbfd.h: Regenerate.
9007 * Makefile.am: Run "make dep-am"
9008 * Makefile.in: Regenerate.
9009 * po/SRC-POTFILES.in: Regenerate.
9010
1ee24f27
DJ
90112002-03-20 Daniel Jacobowitz <drow@mvista.com>
9012
9013 * dwarf2.c (struct funcinfo): Move up.
9014 (lookup_address_in_function_table): New argument function_ptr.
9015 Set it.
9016 (lookup_address_in_line_table): New argument function. If function
9017 is non-NULL, use it to handle ``addr'' before the first line note of
9018 the function.
9019 (comp_unit_find_nearest_line): Update and swap calls to
9020 lookup_address_in_function_table and lookup_address_in_line_table.
9021 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9022 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9023
51b9608c
TR
90242002-03-20 Tom Rix <trix@redhat.com>
9025
ea1e4b0d 9026 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 9027 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 9028 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 9029
789c90aa
TR
90302002-03-19 Tom Rix <trix@redhat.com>
9031
ea1e4b0d 9032 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
9033 dynamic objects in archives.
9034
1da54d81
HPN
90352002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9036
9037 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9038 STT_NOTYPE symbols to STT_OBJECT.
9039
7831a775 90402002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
9041
9042 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9043
eb1e0e80
NC
90442002-03-18 Tom Rix <trix@redhat.com>
9045
9046 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9047 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9048 * coff-rs6000 (do_pad) : New function for archive padding.
9049 (do_copy) : New function for object file copying in archives.
9050 (do_shared_object_padding) : New function for padding shared
9051 objects to their text section alignment in archives.
9052 (bfd_xcoff_ar_achive_set_magic) : Stub.
9053 (xcoff_write_armap_big) : Use do_copy and do_pad.
9054 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9055 do_copy and do_pad.
9056 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 9057 bfd_xcoff_magic_number.
eb1e0e80
NC
9058 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9059 fop.
9060 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9061 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9062 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9063 * rs6000-core.c : Update copyright date.
ea1e4b0d 9064 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
9065 csectpp.
9066 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9067 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9068 (coff_set_flags) : Use bfd_xcoff_magic_number.
9069 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9070 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9071 * Makefile.am : Same.
9072 * config.bfd : Same.
9073 * targets.c : Same.
9074 * configure : Regnerate.
9075 * Makefile.in : Same.
9076 * bfd-in2.h : Same.
9077
a1c259a1
NC
90782002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9079
9080 * po/fr.po: Updated version.
9081
4dae1ae7
AM
90822002-03-18 Alan Modra <amodra@bigpond.net.au>
9083
9084 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9085 * libbfd.h: Regenerate.
9086 * archive.c (coff_write_armap): Pass on failures from
9087 bfd_write_bigendian_4byte_int.
9088
36b4f6e7
L
90892002-03-14 H.J. Lu <hjl@gnu.org>
9090
9091 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9092 error to bfd_error_nonrepresentable_section for reinit_array
9093 section in DSO.
9094
a1aefc76
NC
90952002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9096
a181be0a
NC
9097 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9098 OR it in rather than replacing previously selected flags.
9099
a1aefc76
NC
9100 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9101 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9102
c119f9b8
AM
91032002-03-14 Alan Modra <amodra@bigpond.net.au>
9104
9105 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9106 (N): Use the above.
9107 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9108 ensure reloc size matches before calling elf_link_input_bfd.
9109 Add an assert to check reloc size when counting output relocs.
9110
c295a511
NC
91112002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9112
9113 * mmo.c (mmo_get_loc): Return NULL rather than false.
9114
9ce88e60
NC
91152002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9116
9117 * po/fr.po: Updated version.
9118
4ddafab0
AM
91192002-03-13 Alan Modra <amodra@bigpond.net.au>
9120
b74fa2cd
AM
9121 * archures.c (bfd_default_compatible): Test bits_per_word.
9122 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9123 bfd_default_compatible.
9124 * cpu-i370.c (i370_compatible): Likewise.
9125 * cpu-sparc.c (sparc_compatible): Likewise.
9126 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9127
40b829d4
AM
9128 * elflink.h: Formatting fixes.
9129 (elf_link_output_extsym): Merge undefined and undef weak cases.
9130
4ddafab0
AM
9131 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9132 when word size of input matches output word size.
9133
dd53c801
AJ
91342002-03-12 Andreas Jaeger <aj@suse.de>
9135
9136 * cpu-i386.c (i386_compatible): New. Use it instead of
9137 bfd_default_compatible.
9138
aa066ac8
L
91392002-03-07 H.J. Lu (hjl@gnu.org)
9140
9141 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9142 as the type for bfd_reloc_val.
9143
1bf42538
JL
91442002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9145
9146 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9147 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9148 (elf_hppa_final_link_relocate): Correct relocations for indirect
9149 references to local data through the DLT. Fix .opd creation for
9150 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9151 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9152 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9153 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9154 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9155 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9156 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9157
86eaf01e
JJ
91582002-03-05 Jakub Jelinek <jakub@redhat.com>
9159
9160 * merge.c (_bfd_merge_sections): Don't segfault if there
9161 is nothing to merge due to GC.
9162
c44233aa
AM
91632002-03-05 Alan Modra <amodra@bigpond.net.au>
9164
039cc25f
AM
9165 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9166 symbols that have been forced local.
9167
c44233aa
AM
9168 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9169 to output forced local syms for non-shared link.
9170 (elf_link_output_extsym): Tweak condition for calling backend
9171 adjust_dynamic_symbol so that previous behaviour is kept.
9172 Whitespace changes throughout file.
9173
25e27870
L
91742002-03-04 H.J. Lu <hjl@gnu.org>
9175
9176 * elf.c (bfd_section_from_shdr): Handle special sections,
9177 .init_array, .fini_array and .preinit_array.
9178 (elf_fake_sections): Likewise.
9179
9180 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9181 DT entry only if the section is in output for .init_array,
9182 .fini_array and .preinit_array. Complain about .preinit_array
9183 section in DSO.
9184 (elf_bfd_final_link): Warn zero size for .init_array,
9185 .fini_array and .preinit_array sections.
9186
9187 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9188 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9189 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9190 .preinit_array.
9191
bb2a49f2
AM
91922002-03-04 Alan Modra <amodra@bigpond.net.au>
9193
9194 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9195 * configure: Regenerate.
9196
38487e5e
TR
91972002-03-02 Tom Rix <trix@redhat.com>
9198
c44233aa
AM
9199 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9200 symbolic equiv.
38487e5e
TR
9201 * coff-rs6000.c (xcoff_howto_table): Same.
9202
30831527
RH
92032002-03-01 David Mosberger <davidm@hpl.hp.com>
9204
9205 * elflink.h (size_dynamic_sections): If section named
9206 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9207 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9208 ".init_array" and ".fini_array".
9209 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9210 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9211 DT_FINI_ARRAY.
9212
c8e5ddc8
AM
92132002-02-26 Andrew Macleod <amacleod@cygnus.com>
9214
9215 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9216 dynsyms.
9217
96e0dda4
AM
92182002-02-25 Alan Modra <amodra@bigpond.net.au>
9219
1c5b6bf8
AM
9220 * elf64-hppa.h: Update copyright date.
9221
96e0dda4
AM
9222 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9223 (ppc64_elf_relocate_section): Don't generate power4 style branch
9224 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9225
0fb19cbc
JJ
92262002-02-22 Jakub Jelinek <jakub@redhat.com>
9227
9228 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9229 last patch.
9230 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9231
c434dee6
AJ
92322002-02-21 Andreas Jaeger <aj@suse.de>
9233
9234 * elf64-x86-64.c: Major rework that introduces all recent changes
9235 to the x86-64 backend. Get a closer match to elf32-i386.
9236 (struct elf64_x86_64_dyn_relocs): Rename from
9237 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9238 all users.
9239 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9240 sections.
9241 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9242 remove casts, initialize new hash members.
9243 (create_got_section): New.
9244 (elf64_x86_64_create_dynamic_sections): New.
9245 (elf64_x86_64_copy_indirect_symbol): New.
9246 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9247 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9248 Reference count possible .plt and .got entries. Don't test input
9249 section SEC_READONLY here to try to avoid copy relocs, and keep
9250 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9251 DF_TEXTREL here. Delay setting of variables until needed. Cache
9252 pointer to "sreloc" section in elf_section_data. Tweak condition
9253 under which .got created. Report files with bad relocation
9254 section names.
9255 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9256 Reference count possible .plt entries. Don't deallocate .got and
9257 .relgot space here.
9258 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9259 do copy reloc processing for weakdefs. Remove redundant casts and
9260 aborts. Delay setting of vars until needed. Move creation of
9261 dynamic symbols and allocation of .plt and .rela.plt to
9262 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9263 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9264 (allocate_dynrelocs): New.
9265 (readonly_dynrelocs): New.
9266 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9267 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9268 Zero out the dynamic allocated content space.
9269 (elf64_x86_64_discard_copies): Removed.
9270 (elf64_x86_64_relocate_section): Make use of dynamic section
9271 short-cuts. Localise vars, and delay setting. Better error
9272 reporting, replace BFD_ASSERT with abort. Check
9273 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9274 regular object file and tread the weak definition as the normal
9275 one. Don't discard relocs for undefweak or undefined symbols and
9276 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9277 relocs.
9278 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9279 symbols that have been forced local. Use same test to decide if
9280 we can use a relative reloc for got as relocate_section. Expand
9281 SHN_UNDEF comment. Move expressions out of function calls.
9282 Replace BFD_ASSERT with abort.
9283 (bfd_elf64_bfd_final_link): Removed.
9284 (elf_backend_copy_indirect_symbol): Define.
9285
ff3a6ee3
TR
92862002-02-20 Tom Rix <trix@redhat.com>
9287
9288 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9289 (_bfd_xcoff_reloc_type_lookup): Use it.
9290 * coff64-rs6000.c (xcoff64_howto_table): Same.
9291 (xcoff64_reloc_type_lookup): Same.
c434dee6 9292
a68d41fb
AM
92932002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9294
9b5ecbd0 9295 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9296 little endian.
9297
befc3abb
MS
92982002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9299
9300 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9301 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9302 * bfd-in2.h: Regenerate.
9303 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9304 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9305 with "s390:64-bit".
9306 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9307 (elf_s390_reloc_type_lookup): Likewise.
9308 (elf_s390_check_relocs): Likewise.
9309 (elf_s390_gc_sweep_hook): Likewise.
9310 (elf_s390_relocate_section): Likewise.
9311 (elf_s390_object_p): Use renamed architecture define.
9312 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9313
6eeeec9b
FCE
93142002-02-19 Frank Ch. Eigler <fche@redhat.com>
9315
9316 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9317
0bb2d96a
JJ
93182002-02-19 Jakub Jelinek <jakub@redhat.com>
9319
9320 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9321 absptr -> pcrel optimization for shared libs.
9322 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9323 library cannot be converted to pcrel.
9324 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9325 relative.
9326 * elf32-i386.c (elf_i386_relocate_section): If
9327 _bfd_elf_section_offset returned -2, skip, but make sure the
9328 relocation is installed.
9329 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9330 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9331 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9332 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9333 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9334 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9335 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9336 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9337 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9338 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9339 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9340 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9341 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9342 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9343 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9344 _bfd_elf_section_offset returning -2 the same way as -1.
9345 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9346 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9347 and BFD_ASSERT.
9348 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9349
69f284c7
TR
93502002-02-18 Tom Rix <trix@redhat.com>
9351
9352 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9353 (bfd_xcoff_size_dynamic_sections): Same.
9354 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9355 (bfd_xcoff_size_dynamic_sections): Same.
9356 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9357 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9358 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9359 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9360 * bfd-in2.h: Regenerate.
9361
82bd7b59
AM
93622002-02-18 Alan Modra <amodra@bigpond.net.au>
9363
9364 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9365 (struct ppc_link_hash_table): Add sfpr.
9366 (ppc64_elf_link_hash_table_create): Init it.
9367 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9368 .glink out to..
9369 (create_linkage_sections): ..here. Make .sfpr too.
9370 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9371 dynobj early.
9372 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9373 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9374 ._restf* functions, and create as needed.
9375 (func_desc_adjust): Only force_local for shared libs.
9376
ef1355e8
NC
93772002-02-18 David O'Brien <obrien@FreeBSD.org>
9378
9379 * configure.in: Bump version number post 2.12 branching.
9380 * configure: Regenerate.
9381
dfa36a69
HPN
93822002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9383
9384 * mmo.c: Correct and improve comments.
9385 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9386 zero-pad. Use input to fill up non-empty bfd buffer.
9387 (mmo_flush_chunk): New function.
9388 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9389 changed. Don't emit location specifier if VMA is same as
9390 *LAST_VMAP after omitting leading zero contents. Call
9391 mmo_flush_chunk before emitting location specifier.
9392 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9393 with mmo_write_loc_chunk calls.
9394 (mmo_internal_write_section): Call mmo_flush_chunk after
9395 mmo_write_chunk.
9396 (mmo_write_symbols_and_terminator): Move :Main to first position
9397 in symbol array. Add faked one if it does not exist if there are
9398 other symbols. Don't add it if there are no symbols at all. Move
9399 out test for value of :Main from symbol loop. Rename table
9400 fakemain to maintable and variable mainsym to fakemain.
9401
ccf00ab6
RH
94022002-02-15 Richard Henderson <rth@redhat.com>
9403
9404 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9405 section with no got matches any got. Simplify error generaion.
9406
88eaccc2
AM
94072002-02-15 Alan Modra <amodra@bigpond.net.au>
9408
fd96f80f
AM
9409 Support arbitrary length fill patterns.
9410 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9411 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9412 Call default_data_link_order.
9413 (default_fill_link_order): Delete.
9414 (default_data_link_order): New function.
9415 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9416 of bfd_fill_link_order with bfd_data_link_order.
9417 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9418 * elf64-mips.c (mips_elf64_final_link): Likewise.
9419
88eaccc2
AM
9420 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9421 Correct value returned in "end" for "0x<non-hex>".
9422
e2fd756b
NC
94232002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9424
9425 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9426 (scan): Test against 'mach' field in info structure.
9427
edd29cf9
AM
94282002-02-14 Alan Modra <amodra@bigpond.net.au>
9429
9430 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9431
1e30956e 94322002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9433
9434 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9435 EF_M68000.
9436
bf36db18
NC
94372002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9438
9439 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9440 non-zero physical addresses when adjusting the LMAs of new
9441 sections.
bf36db18 9442
189c6563
AM
94432002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9444
9445 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9446 from _bfd_elf_hppa_gen_reloc_type.
9447 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9448 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9449 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9450 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9451
e948afaf
AO
94522002-02-12 Alexandre Oliva <aoliva@redhat.com>
9453
9454 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9455 loading its contents if there's nothing to do in it.
9456
19397422
AM
94572002-02-12 Alan Modra <amodra@bigpond.net.au>
9458
0ad3a73b
AM
9459 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9460 64k boundary.
9461
19397422
AM
9462 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9463 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9464 (ppc64_elf_finish_dynamic_sections): Set values for them.
9465
51316059
MS
94662002-02-11 Michael Snyder <msnyder@redhat.com>
9467
9468 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9469 * elf.c (elfcore_grok_pstatus): Add prototype.
9470 (elfcore_grok_lwpstatus): Add prototype.
9471 (elfcore_write_lwpstatus): New function.
9472 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9473
518313c3
AO
94742002-02-11 Alexandre Oliva <aoliva@redhat.com>
9475
9476 * elf32-sh.c: Added missing prototypes.
9477 * elf32-sh64.c: Likewise.
9478 (sh_elf_align_loads): Mark unused args as such.
9479 * elf64-sh64.c: Added missing prototypes.
9480 (struct elf_sh64_link_hash_entry): Fix typo.
9481 (sh_elf64_relocate_section): Fix info argument passed to
9482 _bfd_elf_section_offset.
9483
2c73f9d8
AM
94842002-02-11 Alan Modra <amodra@bigpond.net.au>
9485
9486 * Makefile.am: "make dep-am".
9487 * Makefile.in: Regenerate.
9488 * aclocal.m4: Regenerate.
9489 * config.in: Regenerate.
9490 * configure: Regenerate.
9491
d426c6b0
DJ
94922002-02-10 Daniel Jacobowitz <drow@mvista.com>
9493
9494 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9495 variable warnings.
9496 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9497 comparison warning.
9498 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9499 cast warnings for the common case.
9500
e58ee0cd
HPN
95012002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9502
9503 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9504 vectors.
9505 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9506 vectors.
9507
7793f4d0
RH
95082002-02-09 Richard Henderson <rth@redhat.com>
9509
9510 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9511 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9512 (elf64_alpha_relocate_section): Likewise.
9513 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9514 * bfd-in2.h, libbfd.h: Rebuild.
9515
7e799044
HPN
95162002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9517
9518 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9519 that base-plus-offset reloc accounting is consistent.
9520 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9521 up to date for undefined symbols.
9522
027d73eb
EC
95232002-02-08 Eric Christopher <echristo@redhat.com>
9524
9525 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9526
9527 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9528 sections for the O32 ABI.
9529
517662d4
CD
95302002-02-08 Chris Demetriou <cgd@broadcom.com>
9531
9532 * elf32-arm.h: Fix formatting of _("...").
9533 * elf32-d10v.c: Likewise.
9534 * elf32-m68k.c: Likewise.
9535 * elf32-mips.c: Likewise.
9536
5e37cc46
NC
95372002-02-08 Ivan Guzvinec <ivang@opencores.org>
9538
9539 * coff-or32.c: Fix compile time warning messages.
9540
fbca6ad9
AO
95412002-02-08 Alexandre Oliva <aoliva@redhat.com>
9542
9543 Contribute sh64-elf.
9544 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9545 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9546 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9547 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9548 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9549 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9550 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9551 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9552 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9553 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9554 New relocs.
9555 * libbfd.h, bfd-in2.h: Rebuilt.
9556 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9557 (sh_reloc_map): Map them.
9558 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9559 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9560 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9561 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9562 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9563 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9564 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9565 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9566 datalabel_got_offset.
9567 (sh_elf_link_hash_newfunc): Initialize it.
9568 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9569 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9570 GOT and GOTOFF handling to new SHmedia relocation types. Support
9571 GOT_BIAS.
9572 (sh_elf_check_relocs): Likewise.
9573 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9574 PLT entries using movi_shori_putval. Support GOT_BIAS.
9575 (sh_elf_finish_dynamic_sections): Likewise.
9576 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9577 relocation, it's now done by the caller.
9578 (GOT_BIAS): New.
9579 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9580 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9581 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9582 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9583 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9584 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9585 sh64_elf64_hash_table): New.
9586 (sh_elf64_howto_table): Introduce new relocs.
9587 (sh_elf64_info_to_howto): Accept new PIC relocs.
9588 (sh_elf64_relocate_section): Augment the scope of
9589 seen_stt_datalabel. Support new PIC relocs.
9590 (sh_elf64_check_relocs): Support new PIC relocs.
9591 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9592 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9593 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9594 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9595 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9596 movi_shori_putval, movi_3shori_putval,
9597 sh64_elf64_create_dynamic_sections,
9598 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9599 sh64_elf64_size_dynamic_sections,
9600 sh64_elf64_finish_dynamic_symbol,
9601 sh64_elf64_finish_dynamic_sections): New.
9602 (elf_backend_create_dynamic-sections,
9603 bfd_elf64_bfd_link_hash_table_create,
9604 elf_backend_adjust_dynamic_symbol,
9605 elf_backend_size_dynamic_sections,
9606 elf_backend_finish_dynamic_symbol,
9607 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9608 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9609 elf_backend_got_header_size, elf_backend_plt_header_size):
9610 Define.
9611 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9612 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9613 match official numbers and names; moved unmaching ones to the
9614 range 0xf2-0xff.
9615 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9616 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9617 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9618 sections.
9b5ecbd0 9619 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9620 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9621 be aligned.
9622 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9623 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9624 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9625 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9626 .cranges section with SEC_SORT_ENTRIES set.
9627 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9628 incoming sorted .cranges section.
9629 (sh64_bfd_elf_copy_private_section_data): New.
9630 (sh64_elf_final_write_processing): Only sort .cranges and modify
9631 start address if called by linker.
9632 2001-01-08 Ben Elliston <bje@redhat.com>
9633 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9634 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9635 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9636 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9637 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9638 line. Add comments before all entries.
9639 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9640 comment.
9641 (sh_elf64_reloc): Correct head comment.
9642 (sh_elf64_relocate_section): Correct spacing.
9643 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9644 instead call reloc_dangerous callback.
9645 <case R_SH_SHMEDIA_CODE>: New case.
9646 (sh_elf64_gc_mark_hook): Correct spacing.
9647 (sh_elf64_check_relocs): Ditto.
9648 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9649 New case.
9650 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9651 functions.
9652 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9653 clarify describing comment. Add comments before all entries.
9654 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9655 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9656 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9657 Sort .cranges section in final link. Prepare to set bit 0 on
9658 entry address.
9659 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9660 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9661 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9662 .cranges section.
9663 (sh64_backend_section_from_shdr): New, to recognize
9664 SHT_SH5_CR_SORTED on incoming .cranges section.
9665 (elf_backend_section_from_shdr): Define.
9666 (sh64_elf_final_write_processing): Sort outgoing .cranges
9667 section. (New, temporarily disabled:) Set bit 0 on entry address
9668 according to ISA type.
9669 (sh64_find_section_for_address): New.
9670 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9671 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9672 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9673 bfd_malloc, not xmalloc.
9674 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9675 global.
9676 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9677 temporarily disabled) setting bit 0 on entry address.
9678 (elf_backend_final_write_processing): Define.
9b5ecbd0 9679 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9680 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9681 be a proper relocation for PTA and PTB rather than a marker.
9682 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9683 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9684 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9685 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9686 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9687 Zero src_mask.
9688 * elf64-sh64.c: Ditto.
9689 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9690 * elf32-sh64.c: Include opcodes/sh64-opc.h
9691 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9692 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9693 parameters. No unused parameters. Caller changed.
9694 <case R_SH_PT_16>: New case.
9695 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9696 * Makefile.in: Regenerate.
9b5ecbd0 9697 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9698 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9699 all code sections.
9700 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9701 (sh64_elf_merge_private_data): Ditto.
9702 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9703 to access stored section flags.
9704 (sh64_elf_final_write_processing): Return immediately unless
9705 called by linker. Use sh64_elf_section_data (cranges) to get size
9706 of linker-generated cranges entries.
9707 (sh64_elf_copy_private_data): Add missing "return true".
9708 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9709 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9710 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9711 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9712 elf64-sh64.c:sh64_elf_fake_sections.
9713 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9714 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9715 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9716 (sh64_elf_final_write_processing): New.
9717 (elf_backend_final_write_processing): Define.
9718 (sh64_elf_fake_sections): Get header flags from tdata field.
9719 (sh64_elf_copy_private_data): Do not call
9720 sh64_elf_copy_private_data_internal, just copy e_flags field.
9721 (sh64_elf_merge_private_data): Do not call
9722 sh64_elf_copy_private_data_internal.
9b5ecbd0 9723 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9724 Remove EF_SH64_ABI64, let ELF size make difference.
9725 Remove SH64-specific BFD section flag.
9726 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9727 containing SHmedia through elf_section_data (asect)->tdata
9728 non-zero, not using a BFD section flag.
9729 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9730 (sh64_elf_merge_private_data): Similar.
9731 (elf_backend_section_flags): Don't define.
9732 (sh64_elf_backend_section_flags): Delete.
9733 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9734 not EF_SH64_ABI64.
9735 (sh_elf64_merge_private_data): Similar.
9736 * section.c (Section flags definitions): Don't define
9737 SEC_SH_ISA_SHMEDIA.
9738 (bfd-in2.h): Regenerate.
9b5ecbd0 9739 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9740 Make DataLabel references work with partial linking.
9741 * elf32-sh64.c: Fix formatting.
9742 (sh64_elf_link_output_symbol_hook): New.
9743 (elf_backend_link_output_symbol_hook): Define to
9744 sh64_elf_link_output_symbol_hook.
9745 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9746 undefined if partial linking. Adjust sanity check.
9747 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9748 (elf_backend_link_output_symbol_hook): Define to
9749 sh64_elf64_link_output_symbol_hook.
9750 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9751 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9752 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9753 Implement semantics for inter-file DataLabel references.
9754 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9755 (sh64_elf64_add_symbol_hook): New.
9756 (sh_elf64_relocate_section): If passing an indirect symbol with
9757 st_type STT_DATALABEL on the way to a symbol with st_other
9758 STO_SH5_ISA32, do not bitor 1 to the relocation.
9759 (elf_backend_add_symbol_hook): Define to
9760 sh64_elf64_add_symbol_hook.
9761 * elf64-sh32.c: Tweak comments.
9762 (DATALABEL_SUFFIX): Define.
9763 (sh64_elf_add_symbol_hook): New.
9764 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9765 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9766 symbol with st_type STT_DATALABEL on the way to a symbol with
9767 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9768 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9769 Pass through STT_DATALABEL.
9770 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9771 (elf_backend_get_symbol_type): Define.
9772 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9773 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9774 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9775 * elf32-sh64.c: Tweak comments.
9776 (sh64_elf_copy_private_data_internal): Add prototype.
9777 (bfd_elf32_bfd_set_private_flags): Define.
9778 (sh64_elf_copy_private_data_internal): Compare machine name, not
9779 textual BFD target name, to check whether to copy section flag
9780 SHF_SH5_ISA32.
9781 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9782 Tweak section-contents-type-mismatch message.
9783 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9784 Validize reloc-types.
9785 * elf64-sh64.c: New file.
9786 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9787 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9788 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9789 Regenerate dependencies.
9790 * Makefile.in: Regenerate.
9791 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9792 bfd_elf64_sh64l_vec.
9793 * configure.in: Handle bfd_elf64_sh64_vec and
9794 bfd_elf64_sh64l_vec.
9795 * configure: Regenerate.
9796 * po/POTFILES.in: Regenerate.
9797 * po/bfd.pot: Regenerate.
9b5ecbd0 9798 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9799 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9800 anything else but EF_SH64 and EF_SH64_ABI64.
9801 (sh64_elf_merge_private_data): Emit error for anything else but
9802 EF_SH64 and EF_SH64_ABI64.
9803 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9804 from targ_selvecs.
9805 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9806 bfd_elf32_sh64l_vec as a temporary measure.
9807 * configure: Regenerate.
9b5ecbd0 9808 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9809 * cpu-sh.c (arch_info_struct): Include sh5 item
9810 unconditionalized.
9811 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9812 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9813 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9814 * elf32-sh64.c: Tweak comments.
9815 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9816 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9817 (sh64_elf_copy_private_data_internal): Wrap long line.
9818 (sh64_elf_merge_private_data): Rewrite to allow objects from
9819 SH64 subsets to be linked together.
9820 (INCLUDE_SHMEDIA): Define.
9821 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9822 Parenthesize plus-expression inside or-expression.
9823 <global symbol>: Ditto.
9824 (sh_elf_set_mach_from_flags): Remove code refusing
9825 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9826 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9827 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9828 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9829 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9830 (sh_elf_relocate_section) <local symbol>: Or 1 in
9831 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9832 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9833 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9834 relocation.
9b5ecbd0 9835 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9836 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9837 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9838 Regenerate dependencies.
9839 * Makefile.in: Regenerate.
9840 * archures.c: Add bfd_mach_sh5.
9841 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9842 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9843 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9844 * configure: Regenerate.
9845 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9846 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9847 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9848 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9849 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9850 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9851 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9852 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9853 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9854 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9855 in item for SH5.
9856 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9857 for SHmedia relocs.
9858 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9859 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9860 shmedia_prepare_reloc, goto final_link_relocate if it returns
9861 non-zero, else fail as before.
9862 (sh_elf_set_mach_from_flags): Provide function only if not defined
9863 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9864 (sh_elf_set_private_flags): Provide function only if not defined
9865 as a macro.
9866 (sh_elf_copy_private_data): Similar.
9867 (sh_elf_merge_private_data): Similar.
9868 * section.c (SEC_SH_ISA_SHMEDIA): New.
9869 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9870 * elf32-sh64.c: New file.
9871 * libbfd.h: Regenerate.
9872 * bfd-in2.h: Regenerate.
9873 * po/POTFILES.in: Regenerate.
9874 * po/bfd.pot: Regenerate.
9875 * bfd-in2.h: Regenerate.
9876 * libbfd.h: Regenerate.
9877
e108f470
DJ
98782002-02-07 Daniel Jacobowitz <drow@mvista.com>
9879
9880 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9881 been included, not drag it in.
9882 * bfd-in2.h: Regenerate.
9883
259d18a3
L
98842002-02-06 H.J. Lu (hjl@gnu.org)
9885
9886 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9887 the mach and ISA fields if necessary.
9888
f13b834e
NC
98892002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9890
9891 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9892 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9893 be sure exactly which architecture this represents.
9894
82f6addb
NC
98952002-02-05 Nick Clifton <nickc@redhat.com>
9896
9897 * po/tr.po: Updated translation.
9898
899f54f5
AM
98992002-02-05 Alan Modra <amodra@bigpond.net.au>
9900
9901 From Jimi X <jimix@watson.ibm.com>
9902 * archures (bfd_mach_ppc64): Define.
9903 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9904 (bfd_powerpc_arch): Define.
9905 * bfd-in2.h: Regenerate.
9906 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9907 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9908 (bfd_powerpc_archs): Add default powerpc64 arch.
9909
248866a8
AM
99102002-02-05 Alan Modra <amodra@bigpond.net.au>
9911
9912 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9913 against section syms in readonly sections. Don't do the global
9914 sym check if we find one.
9915 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9916 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9917 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
9918 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9919 (elf_s390_grok_prstatus): Add missing prototype.
9920
4fa5c2a8
HPN
99212002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9922
9923 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9924 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9925 Call bfd_get_section_by_name only once. Initialize
9926 bpodata->n_bpo_relocs_this_section.
9927 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9928 referring to DSOs.
9929 (bpo_reloc_request_sort_fn): Don't use difference of values as
9930 return-value.
9931
537c972e
DB
99322002-02-02 David O'Brien <obrien@FreeBSD>
9933
9934 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9935 version 4.5 and later the same as 5-CURRENT.
9936 * configure: Re-generate.
9937
006336b8
JT
99382002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9939
9940 * config.bfd (hppa*-*-netbsd*): New target.
9941
6c571f00
PT
99422002-01-31 Philipp Thomas <pthomas@suse.de>
9943
19397422
AM
9944 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9945 to front of message. Unify messages with elf32-arm.h. Use
9946 commas where neccessary.
9947 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9948 ERROR in messages. Unify messages with coff-arm.c. Correct
9949 VFP/FPA error message.
9950 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9951 APCS-32 for translation.
6c571f00 9952
930b4cb2
HPN
99532002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9954
9955 Perform on-demand global register allocation from
9956 R_MMIX_BASE_PLUS_OFFSET relocs.
9957 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9958 bpo_reloc_request, struct bpo_greg_section_info): New.
9959 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9960 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9961 _bfd_mmix_check_all_relocs,
9962 _bfd_mmix_prepare_linker_allocated_gregs,
9963 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9964 (elf_mmix_howto_table): Correct src_mask for most relocs.
9965 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9966 case.
9967 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9968 case. Fix typo in comment. New label do_mmix_reloc.
9969 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9970 store first object file with a base-plus-offset reloc. Call
9971 mmix_elf_check_common_relocs for the part common with mmo.
9972 (mmix_elf_final_link): Write out linker-allocated register
9973 contents section.
9974 (elf_backend_gc_sweep_hook): Define.
9975 (bfd_elf64_bfd_relax_section): Define.
9976
9977 * mmo.c: Don't include <ctype.h>
9978 (mmo_init): Correct init-once logic.
9979
3e36d993
TR
99802002-02-01 Tom Rix <trix@redhat.com>
9981
9982 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9983
ba323545
AM
99842002-02-01 Alan Modra <amodra@bigpond.net.au>
9985
9986 * Makefile.am: Run "make dep-am"
9987 * Makefile.in: Regenerate.
9988
012884d6
DB
99892002-01-31 David O'Brien <obrien@FreeBSD>
9990
9991 * configure.in: Recognize the differences in core files from FreeBSD
9992 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9993 5-CURRENT.
9994 * configure: Regenerate.
9995
3b16e843
NC
99962002-01-31 Ivan Guzvinec <ivang@opencores.org>
9997
9998 * coff-or32.c: New file.
9999 * cpu-or32.c: New file.
10000 * elf32-or32.c: New file.
10001 * archures.c: Add support for or32.
10002 * targets.c: Add support for or32.
10003 * bfd-in2.h: Regenerate.
7dc0ab31 10004 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
10005 coff_write_object_contents): Add support for or32.
10006 * config.bfd: Add target.
10007 * configure.in: Add support for or32.
10008 * configure: Regenerate.
10009 * Makefile.am: Add support for or32.
10010 * Makefile.in: Regenerate.
3b16e843
NC
10011 * po/SRC-POTFILES.in: Add or32 files.
10012 * po/bfd.pot: Regenerate.
7dc0ab31 10013
caf8ca8e
NC
100142002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10015 Don Lindsay <lindsayd@cisco.com>
10016
10017 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10018 false' with a return of a bfd_reloc_ error code.
10019
e5dfef09
HPN
100202002-01-31 Hans-Peter Nilsson <hp@axis.com>
10021
10022 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10023 unexport unreferenced symbols when --export-dynamic. Call
10024 _bfd_elf_strtab_delref when unexporting.
10025
4e4770d0
DJ
100262002-01-30 Daniel Jacobowitz <drow@mvista.com>
10027
10028 * bfd-in.h: Include <stdbool.h> if it is available.
10029 * bfd-in2.h: Regenerated.
10030
e1fa50e7
AM
100312002-01-31 Alan Modra <amodra@bigpond.net.au>
10032
10033 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10034 not go via the plt.
10035
b5f79c76
NC
100362002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10037
b5f79c76
NC
10038 * archures.c: Tidy up formatting of embedded comments.
10039 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 10040 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
10041 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10042 * section.c: Tidy up formatting of embedded comments.
10043 * syms.c: Tidy up formatting of embedded comments.
10044 * targets.c: Tidy up formatting of embedded comments.
10045
10046 * bfd-in2.h: Regenerate.
10047
ca09e32b
NC
100482002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10049
10050 * vms-tir.c (cmd_name): New function.
10051 (tir_cmd_name): New function.
10052 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10053 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10054 Fix formatting.
7dc0ab31 10055
ca09e32b
NC
10056 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10057 translation.
9b5ecbd0 10058 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
10059
10060 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10061 translation.
10062
10063 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10064
10065 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10066
10067 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10068 message to aid in translation.
10069
10070 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10071 to aid in translation.
10072
10073 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10074
7dc0ab31 100752002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
10076
10077 * coff-arm.c, elf32-elf.h: Unify messages.
10078
05f64ac6
NC
100792002-01-30 Nick Clifton <nickc@redhat.com>
10080
10081 * po/sv.po: Updated translation.
10082
f5a3e38a
NC
100832002-01-30 Philipp Thomas <pthomas@suse.de>
10084
10085 * dwarf2.c (read_abbrev): Use full section name in error message.
10086 (decode_line_info): Likewise.
661a3fd4
NC
10087
10088 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10089 message.
10090
d926e03d
AM
100912002-01-30 Alan Modra <amodra@bigpond.net.au>
10092
10093 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10094 descriptor symbols for undefined function code syms. Clear
10095 ELF_LINK_NON_ELF so that they can stay weak.
10096
030d18fb 100972002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 10098 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
10099
10100 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10101 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10102 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10103 generation.
10104 * bfd-in2.h: Regenerate.
10105
fcc76bea
CD
101062002-01-29 Chris Demetriou <cgd@broadcom.com>
10107
10108 * elf32-mips.c: Add additional comments about HI16 relocation
10109 processing.
10110 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10111 pc-relative relocations. (Reverts change made on 2001-10-31.)
10112 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10113 for pc-relative relocations.
10114 (mips_elf_calculate_relocation): Add a comment about a kludge
10115 in the R_MIPS_GNU_REL_HI16 handling.
10116 (_bfd_mips_elf_relocate_section): Implement that kludge;
10117 adjust pc-relative HI16 relocation for difference in HI16 and
10118 LO16 addresses, since it can't easily be done in
10119 mips_elf_calculate_relocation.
10120
f9cd9119
MS
101212002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10122
10123 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10124 relocations with PC32 relocations for undefined or weak symbols.
10125 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10126 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10127
702248bb
JT
101282002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10129
10130 * elfcore.h (elf_core_file_p): Improve comment for last change.
10131
4867be41
DJ
101322002-01-27 Daniel Jacobowitz <drow@mvista.com>
10133
10134 * configure: Regenerated.
10135
a94cef6a
JT
101362002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10137
10138 * elfcore.h (elf_core_file_p): Set the machine architecture
10139 before processing the program headers.
10140
7562a296
HPN
101412002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10142
966abd70
HPN
10143 * configure.in <64-bit configuration>: If using gcc, check and
10144 emit error for egcs-1.1.2.
10145 * configure: Regenerate.
10146
e8eab623
NC
101472002-01-26 Egor Duda <deo@logos-m.ru>
10148
10149 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10150 as possible to avoid stack corruption.
10151
73896efb
RH
101522002-01-26 Richard Henderson <rth@redhat.com>
10153
10154 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10155 for non-allocated sections.
10156
101572002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10158
10159 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10160 prstat.pr_reg even if it is a struct.
10161
73896efb 101622002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10163
c5cd6d62 10164 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10165
3d66c4f7
NC
101662002-01-25 Philipp Thomas <pthomas@suse.de>
10167
10168 * coffgen.c (coff_print_symbol): Don't mark info message
10169 for translation.
10170
9460ecda
NC
101712002-01-25 Nick Clifton <nickc@redhat.com>
10172
10173 * po/fr.po: Updated translation.
10174 * po/es.po: Updated translation.
10175
cc9ff76a
AM
101762002-01-25 Philipp Thomas <pthomas@suse.de>
10177
10178 * coff-alpha.c (alpha_relocate_section): Unify warning message
10179 for GP relative relocations without GP defined.
10180 * coff-mips.c (mips_relocate_section): Likewise.
10181
c68836a9
AM
101822002-01-25 Alan Modra <amodra@bigpond.net.au>
10183
10184 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10185 unsigned overflow when new_offset < old_offset.
10186
e8eab623 101872002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10188
10189 * bfd.c (_bfd_abort): Fix typo.
10190
8ba89f17
RH
101912002-01-23 Richard Henderson <rth@redhat.com>
10192
10193 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10194 plt entries for undefweak symbols.
10195
c6953948
NC
101962002-01-23 Steve Ellcey <sje@cup.hp.com>
10197
c5cd6d62 10198 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10199 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10200 (bfd_elf32_h8300_vec): Ditto.
10201
41bd81ab
AM
102022002-01-23 Alan Modra <amodra@bigpond.net.au>
10203
10204 * elf64-ppc.c: Remove stale part of ABI comment.
10205 (NO_OPD_RELOCS): Define.
10206 (ppc64_elf_check_relocs): Use it.
10207 (ppc64_elf_relocate_section): Here too.
10208 (build_one_stub): Don't point function syms at the stub. Instead,
10209 hijack plt.offset.
10210 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10211 really go to the stub. Make all dynamic relocs in opd against
10212 locals.
10213 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10214 plt.offset.
10215
f304919d
RH
102162002-01-22 Richard Henderson <rth@redhat.com>
10217
10218 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10219
c0ef99a7
AM
102202002-01-22 Alan Modra <amodra@bigpond.net.au>
10221
60ee0d4a
AM
10222 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10223 TOC_BASE_OFF adjustment.
10224
c0ef99a7
AM
10225 * Makefile.am: Run "make dep-am".
10226 * Makefile.in: Regenerate.
10227 * po/SRC-POTFILES.in: Regenerate.
10228
64328b46
AM
102292002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10230
10231 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10232 host defines.
10233
59953665 102342002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10235
10236 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10237 Check for and emit error if sgot is NULL at this point.
10238
9596feea
JT
102392002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10240
10241 * config.bfd (ia64*-*-netbsd*): New target.
10242
7b45c6e1
AM
102432002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10244
10245 * som.c (som_write_space_strings): Comment typo fix.
10246
e5094212
AM
102472002-01-21 Alan Modra <amodra@bigpond.net.au>
10248
e86ce104
AM
10249 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10250 is_func_descriptor fields.
10251 (link_hash_newfunc): Init them.
10252 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10253 dot are candidates for plt entries. When processing .opd relocs,
10254 set function descriptor strings to point inside function code
10255 string, and set new ppc_link_hash_entry fields.
10256 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10257 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10258 function descriptors. It's now done in..
10259 (func_desc_adjust): New.
10260 (ppc64_elf_func_desc_adjust): New.
10261 (define elf_backend_always_size_sections): Define.
10262 (ppc64_elf_hide_symbol): New.
10263 (define elf_backend_hide_symbol): Define.
10264 (allocate_dynrelocs): Remove code looking up function descriptors
10265 as that has been done earlier.
10266 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10267 table.
10268 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10269 up function descriptor.
10270 (build_one_stub): Look up the function code sym. Check for
10271 invalid plt offsets.
10272 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10273 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10274
e5094212
AM
10275 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10276 boolean param.
10277 (_bfd_elf_link_hash_hide_symbol): Likewise.
10278 * elflink.h (elf_link_add_object_symbols): Adjust call to
10279 elf_backend_hide_symbol.
10280 (elf_fix_symbol_flags): Likewise.
10281 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10282 than bfd_alloc.
10283 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10284 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10285 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10286 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10287 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10288 and adjust to suit.
10289 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10290 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10291 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10292
40b8271b
AM
102932002-01-18 Alan Modra <amodra@bigpond.net.au>
10294
10295 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10296 dynamic function descriptor symbol, not the associated function
10297 symbol.
10298
55baa95b
EC
102992002-01-17 Eric Christopher <echristo@redhat.com>
10300
10301 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10302
328577ad
NC
103032002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10304
10305 * po/bfd.pot: Regenerate.
10306 * po/fr.po: Regenerate.
10307
af746e92
AM
103082002-01-17 Alan Modra <amodra@bigpond.net.au>
10309
10310 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10311 Remove "Elf_Internal_Shdr *" param.
10312 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10313 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10314 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10315 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10316 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10317 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10318 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10319 function to override special sections. Remove hdr arg from
10320 backend call, and don't loop.
10321
175e9962
EC
103222002-01-16 Eric Christopher <echristo@redhat.com>
10323
10324 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10325 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10326 relocations requiring gp0 and gp.
10327
96a846ea
RE
103282002-01-16 Richard Earnshaw <rearnsha@arm.com>
10329
175e9962 10330 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10331 EF_ARM_VFP_FLOAT.
10332 (elf32_arm_print_private_bfd_data): Likewise.
10333
af3ae48d
NC
103342002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10335
10336 * po/tr.po: Import new version.
10337
10ed1bba
AM
103382002-01-16 Alan Modra <amodra@bigpond.net.au>
10339
10340 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10341 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10342 (ORI_R0_R0_0): Correct.
10343
5d1634d7
AM
103442002-01-16 Alan Modra <amodra@bigpond.net.au>
10345
10346 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10347 when plt_not_loaded.
10348 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10349 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10350 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10351 (ppc64_elf_glink_code): Delete.
10352 (PPC64_ELF_GLINK_SIZE): Delete.
10353 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10354 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10355 ORI_R0_R0_0): Define.
10356 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10357 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10358 (ppc64_elf_link_hash_table_create): Init them.
10359 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10360 Don't copy to shared lib.
10361 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10362 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10363 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10364 room for .stub and .glink code.
10365 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10366 DT_PPC64_GLINK.
10367 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10368 bfd_elf64_bfd_final_link.
10369 (bfd_elf64_bfd_final_link): Don't define.
10370 (ppc64_elf_size_stubs): New.
10371 (build_plt_stub): New.
10372 (build_one_stub): New.
10373 (ppc64_elf_build_stubs): New.
10374 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10375 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10376 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10377 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10378 case output sections not separate. Adjust DT_RELASZ to not
10379 include plt relocs. Set reserved got entry. Set got and plt
10380 entry size.
10381 (elf_backend_got_header_size): Set to 8.
10382 * elf64-ppc.h: New file.
10383
c601ffdb
AM
103842002-01-16 Alan Modra <amodra@bigpond.net.au>
10385
10386 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10387 sections, use bfd_section_list_remove.
10388 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10389 * elflink.h (elf_link_add_object_symbols): When removing all
10390 sections, use bfd_section_list_clear.
10391
8fb4cb7f
NC
103922002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10393
10394 * po/sv.po: New file: Swedish translation.
10395 * configure.in (ALL_LINGUAS): Add sv.
10396 * configure: Regenerate.
10397
d3c456e9
JJ
103982002-01-15 Jakub Jelinek <jakub@redhat.com>
10399
10400 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10401 * elf.c (merge_sections_remove_hook): New function.
10402 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10403 _bfd_merge_sections.
10404 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10405 * libbfd.h: Rebuilt.
10406 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10407 Call remove_hook if a SEC_EXCLUDE section is encountered.
10408
1f7fd478
NC
104092002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10410
10411 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10412 (xstormy16_reloc_map): Initialise new field with correct howto
10413 table.
10414 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10415 howto entry.
10416
b87011e9
MS
104172002-01-10 Michael Snyder <msnyder@redhat.com>
10418
10419 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10420 (elfcore_write_pstatus): Use long instead of pid_t;
10421 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10422
175e9962 104232002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10424
10425 * elf.c: Update copyright years.
10426 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10427 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10428
7c76fa91
MS
104292002-01-08 Michael Snyder <msnyder@redhat.com>
10430
10431 Add capability to write corefile note sections, for gdb.
10432 * elf.c (elfcore_write_note): New function.
10433 (elfcore_write_prpsinfo): New function.
10434 (elfcore_write_prstatus): New function.
10435 (elfcore_write_pstatus): New function.
10436 (elfcore_write_prfpreg): New function.
10437 (elfcore_write_prxfpreg): New function.
97996af6 10438 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10439
e1fddb6b
AO
104402002-01-08 Alexandre Oliva <aoliva@redhat.com>
10441
10442 * elf.c (elf_fake_sections): Propagate errors from
10443 elf_backend_fake_section.
10444
8d05742f
JT
104452002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10446
10447 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10448 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10449 (elf32-sh-nbsd.lo): New rule.
10450 * Makefile.in: Regenerate.
10451 * config.bfd (sh*le-*-netbsdelf*): New target.
10452 (sh*-*-netbsdelf*): New target.
10453 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10454 (bfd_elf32_shnbsd_vec): New vector.
10455 (bfd_elf32_shlnbsd_vec): New vector.
10456 * configure: Regenerate.
10457 * elf32-sh-nbsd.c: New file.
10458 * targets.c: Update copyright years.
175e9962 10459 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10460 bfd_elf32_shnbsd_vec.
10461
1dba4cb4
AH
104622002-01-07 Aldy Hernandez <aldyh@redhat.com>
10463
10464 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10465
47b22aef
GK
104662002-01-07 Geoffrey Keating <geoffk@redhat.com>
10467
10468 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10469 of a symbol in a section that will be deleted.
10470
be2d1673
NC
104712002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10472
10473 * po/es.po: New file: Spanish translation.
10474 * configure.in (ALL_LINGUAS): Add es.
10475 * configure: Regenerate.
10476
d9cf1b54
AM
104772002-01-06 Steve Ellcey <sje@cup.hp.com>
10478
10479 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10480 argument so we can handle HP-UX specially.
10481 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10482 (elfNN_hpux_backend_section_from_bfd_section): New for support
10483 of SHN_IA_64_ANSI_COMMON.
10484 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10485 (is_unwind_section_name): Add special HP-UX support.
10486 (elfNN_ia64_section_from_shdr): Add support for more sections.
10487 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10488 add support for more sections.
10489 (elfNN_ia64_additional_program_headers): Modify
10490 is_unwind_section_name call.
10491 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10492 only one unwind section in segment.
10493
3f3c5c34
AM
104942002-01-06 Alan Modra <amodra@bigpond.net.au>
10495
10496 * syms.c (_bfd_generic_make_empty_symbol): New function.
10497 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10498 _bfd_generic_make_empty_symbol.
10499 * libbfd.h: Regenerate.
10500 * bfd-in2.h: Regenerate.
10501 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10502 (hppabsd_core_get_symtab_upper_bound): Don't define.
10503 (hppabsd_core_get_symtab): Likewise.
10504 (hppabsd_core_print_symbol): Likewise.
10505 (hppabsd_core_get_symbol_info): Likewise.
10506 (hppabsd_core_bfd_is_local_label_name): Likewise.
10507 (hppabsd_core_get_lineno): Likewise.
10508 (hppabsd_core_find_nearest_line): Likewise.
10509 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10510 (hppabsd_core_read_minisymbols): Likewise.
10511 (hppabsd_core_minisymbol_to_symbol): Likewise.
10512 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10513 Formatting fixes.
10514 * hpux-core.c: Similarly.
10515 * irix-core.c: Similarly.
10516 * osf-core.c: Similarly.
10517 * sco5-core.c: Similarly.
10518 * binary.c (binary_make_empty_symbol): Remove function, define as
10519 _bfd_generic_make_empty_symbol.
10520 * ihex.c (ihex_make_empty_symbol): Likewise.
10521 * mmo.c (mmo_make_empty_symbol): Likewise.
10522 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10523 * srec.c (srec_make_empty_symbol): Likewise.
10524 * versados.c (versados_make_empty_symbol): Likewise.
10525 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10526 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10527 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10528 rather than _bfd_vms_make_empty_symbol.
10529 * vms-misc.c (new_symbol): Likewise.
10530
3f0a7f7f
AM
105312002-01-05 Alan Modra <amodra@bigpond.net.au>
10532
9e7b37b3
AM
10533 * section.c (bfd_section_init): Remove unnecessary initialisations.
10534 (bfd_section_list_clear): New function.
10535 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10536 (_bfd_strip_section_from_output): Use them.
10537 * coffcode.h (coff_set_alignment_hook): Likewise.
10538 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10539 * elf64-mips.c (mips_elf64_final_link): Likewise.
10540 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10541 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10542 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10543 * bfd-in2.h: Regenerate.
10544
10545 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10546 rather than doing our own section handling. Clean up after errors
10547 with bfd_release and bfd_section_list_clear. Handle unexpected
10548 flags.
10549 * aoutf1.h (sunos4_core_file_p): Likewise.
10550 * aix386-core.c (aix386_core_file_p): Likewise.
10551 * cisco-core.c (cisco_core_file_validate): Likewise.
10552 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10553 * trad-core.c (trad_unix_core_file_p): Likewise.
10554
9b5ecbd0 10555 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10556 with bfd_release and bfd_section_list_clear.
10557 * hpux-core.c (hpux_core_core_file_p): Likewise.
10558 * irix-core.c (irix_core_core_file_p): Likewise.
10559 * lynx-core.c (lynx_core_file_p): Likewise.
10560 * osf-core.c (osf_core_core_file_p): Likewise.
10561 * rs6000-core.c (rs6000coff_core_p): Likewise.
10562 * sco5-core.c (sco5_core_file_p): Likewise.
10563
3f0a7f7f
AM
10564 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10565 sign extension adjustments without conditionals.
10566
a3aa38ee
JJ
105672002-01-04 Jakub Jelinek <jakub@redhat.com>
10568
10569 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10570 CIE at .eh_frame start is removed due to no FDEs referencing it.
10571
8a8b2d4b
AJ
105722002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10573
10574 * config.bfd (x86_64-*-netbsd*): New target.
10575 * configure.in (x86_64-*-netbsd*): Set COREFILE
10576 to netbsd-core.lo.
10577 * configure: Regenerated.
10578
04b5af89
TR
105792002-01-03 Tom Rix <trix@redhat.com>
10580
10581 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10582 for recent bfd_make_section_anyway change.
10583
51c5503b
NC
105842002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10585
10586 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10587 R_ARM_THM_PC11 reloc.
10588
07f7c046
NC
105892002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10590
10591 * configure.in (LINGUAS): Add ja.
10592 * configure: Regenerate.
10593 * po/ja.po: Import from translation project's web site.
10594
5eefb65f
NC
105952002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10596
10597 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10598 messages to ease translation into other languages.
10599
39e90f10 10600For older changes see ChangeLog-0001
56882138
AM
10601\f
10602Local Variables:
10603mode: change-log
10604left-margin: 8
10605fill-column: 74
10606version-control: never
10607End:
This page took 0.642457 seconds and 4 git commands to generate.